-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Benoit SIGOURE on 9/6/2007 3:40 PM: > On Sep 6, 2007, at 10:27 PM, Adam PAPAI wrote: > >> Dear list, >> > > The question has already been answered but I'd like to point out that I'd also like to point out that: > >> case "$host" in >> *-linux*) >> AC_DEFINE(PLATFORM_LINUX, 1, [Define if you are compiling for Linux]) >> ;; Many variants of these defines are already available in system headers or predefined by the compiler, so you need not litter them into your config.h file. Furthermore, platform-specific checks are not the autoconf way... > > but you're also missing other flavors of BSD (I think DragonFly BSD is > also quite popular), I'd be tempted to throw a *-*bsd*) in there :D ...and this is why. By doing feature checks, instead of platform checks, a user of a new platform can automatically test for features on new platforms that you as the developer had no access to. But if you use hard-coded platform checks, it is more porting work for new users, and more maintenance work for you. Yes, there are some cases where platform-specific checks are necessary (such as cross-compilation), but even then, you should provide default (although perhaps pessimistic) fallbacks that work if none of your hard-coded choices occur. - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4MXu84KuGfSFAYARAvW1AKCExzIopKoR+tiFNDI/hE5ISYlmvwCeMcIJ kSqIH+gj7fPBUC3Mi8moku8= =UFhy -----END PGP SIGNATURE----- _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf