diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 02fedabd5e..9a085e35b0 100644 --- a/configure.in +++ b/configure.in @@ -371,6 +371,7 @@ nextstep*) ;; openstep*) ;; rhapsody*) ;; darwin*) LIBS="-lobjc $LIBS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE" AC_TRY_CPP([#include <AvailabilityMacros.h> #if MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 #error pre OS X 10.4 @@ -380,7 +381,6 @@ darwin*) LIBS="-lobjc $LIBS" [ AC_DEFINE(BROKEN_SETREUID, 1) AC_DEFINE(BROKEN_SETREGID, 1) - ac_cv_header_ucontext_h=no ]) ;; hpux*) LIBS="-lm $LIBS" @@ -585,12 +585,18 @@ fi AC_DEFUN([RUBY_CHECK_VARTYPE], [dnl AC_CACHE_CHECK([for external $1], rb_cv_var_$1, [rb_cv_var_$1=no - AC_TRY_COMPILE([#define _XOPEN_SOURCE 1 + AC_TRY_COMPILE([ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif $2 const volatile void *volatile t;], [t = &(&$1)[0];], [for t in $3; do - AC_TRY_COMPILE([#define _XOPEN_SOURCE 1 + AC_TRY_COMPILE([ +#ifndef _XOPEN_SOURCE +#define _XOPEN_SOURCE 1 +#endif $2 extern $t $1; const volatile void *volatile t;], |