Subject: Re: `sun' and sparc/sun3's (was: Re: Diaspora, politics, and MI)
To: Eduardo E. Horvath <eeh@one-o.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 09/26/1996 16:42:23
On Thu, 26 Sep 1996 16:38:47 -0700 (PDT) 
 "Eduardo E. Horvath" <eeh@one-o.com> wrote:

 > For precisely that reason I would like to see some define specifying what
 > architecture you are running on.   Not all ports use native X servers
 > based on
 > XFree86.

If the compiler did this, it would pretty much be a screw for
cross-compiling, esp. if you want the same xc/config/cf files to work
on any supported NetBSD platform...

The way I handled this was to change imake(1) to:

	- Check the MACHINE environment variable, or failing that...

	- use uname(3) to determine which machine type we're running
	  on.

It then defines __MACHINE__, so that the .cf files can make the appropriate
decisions... I.e. __sun3__, __amiga__, __hp300__, etc.  This is especially
handy since, before, those three ports were lumped ino __m68k__ :-)

Anyhow, the net effect of this is that I can build, say, a sun3 server
on a fast 040 amiga and then, without any changes to anything, build
a mac68k server.

(And, before anyone asks, yes, I plan on distributing my diffs to
X as soon as I finish up some things... :-)

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939