diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-01 03:43:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-01 03:43:48 +0000 |
commit | 51807235ef6d938c75bd6e242a47e4bf5ba30e2a (patch) | |
tree | 441f87a4421eaebd652a4434a90391b09cc9ad70 /configure.in | |
parent | 93cbd9808a83eabe2f0a9ea5bf749adcefefcc00 (diff) | |
download | ruby-51807235ef6d938c75bd6e242a47e4bf5ba30e2a.tar.gz |
* configure.in (darwin): _XOPEN_SOURCE is necessary to make ucontext_t
consistent with the library implementation of MacOS X 10.5.
[ruby-dev:33461]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@15363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;], |