Move the platform-specific defines after the compiler has been found.

Without this change, on OpenSolaris, it's possible that the compiler will
be reported, by default, as failing to produce executables, since
_XOPEN_SOURCE=600 requires a C99 compiler to compile even the simples of
the programs.
This commit is contained in:
Diego Elio 'Flameeyes' Pettenò 2009-11-20 21:08:05 +01:00
parent 6daf112ce0
commit 70ba21e78a

View file

@ -66,19 +66,6 @@ if type -p stow > /dev/null && test -d /usr/local/stow ; then
ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
fi
#### Platform hacks ####
case $host in
*-*-solaris* )
AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris)
AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
;;
*-*-darwin* )
AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X])
AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X])
;;
esac
AM_SILENT_RULES([yes])
#### Checks for programs. ####
@ -95,6 +82,19 @@ AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
AC_USE_SYSTEM_EXTENSIONS
#### Platform hacks ####
case $host in
*-*-solaris* )
AC_DEFINE(_XOPEN_SOURCE, 600, Needed to get declarations for msg_control and msg_controllen on Solaris)
AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
;;
*-*-darwin* )
AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X])
AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X])
;;
esac
# M4
AC_CHECK_PROGS([M4], gm4 m4, no)