summaryrefslogtreecommitdiff
path: root/scripts/phpize.m4
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/phpize.m4')
-rw-r--r--scripts/phpize.m416
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/phpize.m4 b/scripts/phpize.m4
index ba668c889..adf15811e 100644
--- a/scripts/phpize.m4
+++ b/scripts/phpize.m4
@@ -17,11 +17,15 @@ AC_DEFUN([PHP_ALWAYS_SHARED],[
test "[$]$1" = "no" && $1=yes
])dnl
dnl
+
+test -z "$CFLAGS" && auto_cflags=1
+
abs_srcdir=`(cd $srcdir && pwd)`
abs_builddir=`pwd`
-AC_PROG_CC
+AC_PROG_CC([cc gcc])
PHP_DETECT_ICC
+PHP_DETECT_SUNCC
AC_PROG_CC_C_O
dnl Support systems with system libraries in e.g. /usr/lib64
@@ -73,6 +77,7 @@ php_debug_is_enabled
],[
PHP_DEBUG=no
])
+CPPFLAGS=$old_CPPFLAGS
AC_MSG_RESULT([$PHP_DEBUG])
AC_MSG_CHECKING([if zts is enabled])
@@ -116,6 +121,15 @@ if test "$PHP_DEBUG" = "yes"; then
CFLAGS="$CFLAGS -O0"
CXXFLAGS="$CXXFLAGS -O0"
fi
+ if test "$SUNCC" = "yes"; then
+ if test -n "$auto_cflags"; then
+ CFLAGS="-g"
+ CXXFLAGS="-g"
+ else
+ CFLAGS="$CFLAGS -g"
+ CXXFLAGS="$CFLAGS -g"
+ fi
+ fi
else
PHP_DEBUG=0
ZEND_DEBUG=no