From: John D. <jd...@re...> - 2006-04-10 19:13:26
|
On Mon, 2006-04-10 at 09:11 +0200, qx...@gm... wrote: > So what switch was defined for Sparc Solaris systems for that project? There are several ways to skin this cat, one solution would be adding this to configure.ac AC_DEFINE_UNQUOTED([HOST_OS], "$host_os", [target operating system]) Then in autoconfig.h you'll get something like this: /* target operating system */ #define HOST_OS "solaris" Then in your C code you can do something like this: #if HOST_OS = "solaris" #endif Note: I'm not sure the exact string that solaris will produce for HOST_OS, you'll just have to run autoreconf;configure and see how HOST_OS gets defined, but "solaris" is a pretty good bet (note on linux it's "linux-gnu") If its a sparc only distinction you'll have to add "host_cpu" too. > > Btw: The autoconf/automake tools IMHO are a monstrosity, complicated and > mainly unnecessary chump of software. I agree that autoconf/automake has a steep learning curve and at times can be frustrating, but its the only viable game in town for open source configuration and the definitive standard. Like it or not, its the right way to do things. IMHO the autotool support that was added by Remi was a huge improvement over the previous non-portable feature poor makefiles (they couldn't even produce a debug static library, which is now trival using automake). -- John Dennis <jd...@re...> Red Hat Inc. |