gwynne Sun Mar 9 14:27:25 2008 UTC Modified files: (Branch: PHP_5_3) /php-src configure.in Log: MFH: Fix Darwin 9/Mac OS X 10.5 build problems, or at least patch them http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.77.2.11&r2=1.579.2.52.2.77.2.12&diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.579.2.52.2.77.2.11 php-src/configure.in:1.579.2.52.2.77.2.12 --- php-src/configure.in:1.579.2.52.2.77.2.11 Sun Feb 17 20:50:03 2008 +++ php-src/configure.in Sun Mar 9 14:27:25 2008 @@ -1,4 +1,4 @@ -## $Id: configure.in,v 1.579.2.52.2.77.2.11 2008/02/17 20:50:03 helly Exp $ -*- autoconf -*- +## $Id: configure.in,v 1.579.2.52.2.77.2.12 2008/03/09 14:27:25 gwynne Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -122,6 +122,21 @@ $php_shtool mkdir -p libs rm -f libs/* +dnl Darwin 9 hack +dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5 +dnl causes errors in all current and past versions of Autoconf, we do a little +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 + php_did_darwin9_cheat=1 + CFLAGS="$CFLAGS -gstabs" + fi + ;; +esac + dnl Checks for programs. dnl ------------------------------------------------------------------------- @@ -167,7 +182,14 @@ dnl activate some gcc specific optimizations for gcc >= 4 if test "$GCC" = "yes"; then - GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*\([[0-9]]\+\)\.[[0-9]]\+\..*/\1/;1p'` + case $host_alias in + *darwin*) + GCC_MAJOR_VERSION=`$CC -dumpversion | $SED -nE '1s/([[0-9]]+)\.[[0-9]]+\..*/\1/;1p'` + ;; + *) + GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*\([[0-9]]\+\)\.[[0-9]]\+\..*/\1/;1p'` + ;; + esac if test $GCC_MAJOR_VERSION -ge 4; then CFLAGS="$CFLAGS -fvisibility=hidden" fi @@ -716,6 +738,10 @@ 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
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php