gwynne Mon Mar 10 15:17:47 2008 UTC Modified files: /php-src configure.in Log: Improve the Darwin 9 hack considerably and switch to using dl*() instead of NS*() on Darwin 8+. http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.648&r2=1.649&diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.648 php-src/configure.in:1.649 --- php-src/configure.in:1.648 Sun Mar 9 14:27:15 2008 +++ php-src/configure.in Mon Mar 10 15:17:47 2008 @@ -1,4 +1,4 @@ -## $Id: configure.in,v 1.648 2008/03/09 14:27:15 gwynne Exp $ -*- autoconf -*- +## $Id: configure.in,v 1.649 2008/03/10 15:17:47 gwynne Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -129,8 +129,8 @@ 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 @@ limits.h \ locale.h \ monetary.h \ -mach-o/dyld.h \ netdb.h \ pwd.h \ resolv.h \ @@ -443,6 +442,18 @@ #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 @@ 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 @@ 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
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php