Path: utzoo!attcan!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!purdue!decwrl!labrea!csli!gandalf From: gandalf@csli.STANFORD.EDU (Juergen Wagner) Newsgroups: comp.unix.questions Subject: Re: Telling csh about multiple, machine-dependent libraries Keywords: csh bin libraries Message-ID: <6490@csli.STANFORD.EDU> Date: 18 Nov 88 05:05:52 GMT References: <173@heart-of-gold> <14592@mimsy.UUCP> Reply-To: wagner@arisia.xerox.com (Juergen Wagner) Organization: Center for the Study of Language and Information, Stanford U. Lines: 41 In article <14592@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >... >This should work. If you have the `machine' command (and it does >the right thing) you can also use >... > set mtype = `machine` >... On our Sun4, the "arch" command is what your "machine" command is. The point is, different machine architectures might use different commands. The way I am finding out what machine type I am on is quite simple (though a bit more CPU expensive than a short script): setenv HOSTTYPE "`/lib/cpp -P < ${HOME}/conf/hosttype`" where the file ~/conf/hosttype contains something like # undef ok # ifndef ok # if sun # undef sun # ifdef sparc # undef sparc sparc # else sun # endif # define ok # endif # endif ... # ifndef ok unknown # endif This uses the guaranteed feature of cpp to have the predefined symbols "sun", "sparc", "vax", "hpux", etc. Everything else seemed to be different across machine architectures. -- Juergen Wagner gandalf@csli.stanford.edu wagner@arisia.xerox.com