more useful LINUX/UNIX defines

This commit is contained in:
Glenn Maynard
2004-06-13 19:30:45 +00:00
parent 5a81e7a80e
commit fc202fc210
+11 -8
View File
@@ -200,17 +200,20 @@ AC_CHECK_DECL(truncf, , AC_DEFINE([NEED_TRUNCF],1,[Need truncf]), [#include <mat
AC_CHECK_DECLS([SIGPWR],,,[#include <signal.h>])
# Define UNIX for all Unix-like systems. Don't define it for cross-compiling to
# non-Unix-like systems. (-DUNIX selects the archutils and ArchHooks to use; if
# your platform doesn't use the Unix ones, you probably don't want to define UNIX.)
case $host in
# This is just a general define for things we do in Linux that aren't
# yet fully generalized. It should probably be defined in other *nixes,
# too.
*)
AC_DEFINE(LINUX, 1, [Linux])
;;
*-linux-*)
AC_DEFINE(LINUX, 1, [Linux])
AC_DEFINE(UNIX, 1, [Unix])
;;
*)
AC_DEFINE(UNIX, 1, [Unix])
;;
esac
# If you're using autoconf, you're in "Unix", as far as we're concerned.
AC_DEFINE(UNIX, 1, [Unix])
AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [Build test programs]), enable_tests=$enableval, enable_tests=no)
AM_CONDITIONAL(BUILD_TESTS, test "$enable_tests" = "yes" )