diff options
author | Gwynne Raskind <gwynne@php.net> | 2008-03-10 15:17:47 +0000 |
---|---|---|
committer | Gwynne Raskind <gwynne@php.net> | 2008-03-10 15:17:47 +0000 |
commit | 0c2ef3cece5c9cf7d30d859628eb489296b7aa89 (patch) | |
tree | e310d55abcdddc8c638da4f5ac7cac15cd102c19 /configure.in | |
parent | 1f46cab626ca9c773ddabb78dbe8260584bf95fa (diff) | |
download | php-git-0c2ef3cece5c9cf7d30d859628eb489296b7aa89.tar.gz |
Improve the Darwin 9 hack considerably and switch to using dl*() instead of NS*() on Darwin 8+.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/configure.in b/configure.in index cb27bb9491..57c37be79d 100644 --- a/configure.in +++ b/configure.in @@ -129,8 +129,8 @@ dnl messing with the CFLAGS here to trick it. php_did_darwin9_cheat=0 case $host_alias in *darwin9*) - echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)' 2>/dev/null >/dev/null - if test "$?" -ne 0; then + hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'` + if test x"$hasg" = "x"; then php_did_darwin9_cheat=1 CFLAGS="$CFLAGS -gstabs" fi @@ -391,7 +391,6 @@ langinfo.h \ limits.h \ locale.h \ monetary.h \ -mach-o/dyld.h \ netdb.h \ pwd.h \ resolv.h \ @@ -443,6 +442,18 @@ assert.h #endif ]) +dnl Don't use mach-o/dyld.h on Darwin 8+, dl* is recommended by Apple from there on +dnl See http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/Articles/loading_code.html +case $host_alias in +*darwin[[89]]*) + ;; +*) + AC_CHECK_HEADERS([ \ +mach-o/dyld.h +],[],[][]) + ;; +esac + PHP_FOPENCOOKIE PHP_BROKEN_GETCWD PHP_BROKEN_GLIBC_FOPEN_APPEND @@ -737,10 +748,6 @@ if test "$PHP_DEBUG" = "yes"; then CXXFLAGS="$CXXFLAGS -O0" fi else - dnl Finish the Darwin hack - if test "$php_did_darwin9_cheat" -eq 1; then - CFLAGS=`echo "$CFLAGS" | $SED -e 's/-gstabs//g'` - fi PHP_DEBUG=0 ZEND_DEBUG=no fi @@ -1222,6 +1229,15 @@ SHARED_LIBTOOL='$(LIBTOOL)' CC=$old_CC +dnl Finish the Darwin hack +if test "$php_did_darwin9_cheat" -eq 1; then + if test "$PHP_DEBUG" = "yes"; then + CFLAGS=`echo "$CFLAGS" | $SED -e 's/-gstabs/-g/g'` + else + CFLAGS=`echo "$CFLAGS" | $SED -e 's/-gstabs//g'` + fi +fi + PHP_CONFIGURE_PART(Generating files) CXXFLAGS_CLEAN=$CXXFLAGS |