]> code.delx.au - pulseaudio/commitdiff
Move the platform-specific defines after the compiler has been found.
authorDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 20 Nov 2009 20:08:05 +0000 (21:08 +0100)
committerDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 20 Nov 2009 20:08:05 +0000 (21:08 +0100)
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.

configure.ac

index 2bc068e6dcef3860b34327f0bc661efe75b24051..a3a97a630b2d13b0048707e7a52867f770183b2c 100644 (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)