Browse Source

Improve the Darwin 9 hack considerably and switch to using dl*() instead of NS*() on Darwin 8+.

experimental/first_unicode_implementation
Gwynne Raskind 18 years ago
parent
commit
0c2ef3cece
  1. 30
      configure.in

30
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

Loading…
Cancel
Save