tony2001 Mon Dec 4 18:28:34 2006 UTC
Modified files:
/php-src acinclude.m4 configure.in
Log:
fix build with Sun compiler, which doesn't support -O0
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.350&r2=1.351&diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.350 php-src/acinclude.m4:1.351
--- php-src/acinclude.m4:1.350 Mon Oct 2 20:49:13 2006
+++ php-src/acinclude.m4 Mon Dec 4 18:28:34 2006
@@ -1,5 +1,5 @@
dnl
-dnl $Id: acinclude.m4,v 1.350 2006/10/02 20:49:13 tony2001 Exp $
+dnl $Id: acinclude.m4,v 1.351 2006/12/04 18:28:34 tony2001 Exp $
dnl
dnl This file contains local autoconf functions.
dnl
@@ -2574,3 +2574,19 @@
ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
fi
])
+
+dnl
+dnl PHP_DETECT_ICC
+dnl
+AC_DEFUN([PHP_DETECT_ICC],
+[
+ ICC="no"
+ AC_MSG_CHECKING([for icc])
+ AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
+ ICC="no"
+ AC_MSG_RESULT([no]),
+ ICC="yes"
+ AC_MSG_RESULT([yes])
+ )
+])
+
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.615&r2=1.616&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.615 php-src/configure.in:1.616
--- php-src/configure.in:1.615 Thu Nov 30 17:10:55 2006
+++ php-src/configure.in Mon Dec 4 18:28:34 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.615 2006/11/30 17:10:55 iliaa Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.616 2006/12/04 18:28:34 tony2001 Exp $ -*- autoconf
-*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -120,6 +120,7 @@
dnl -------------------------------------------------------------------------
AC_PROG_CC
+PHP_DETECT_ICC
AC_PROG_CC_C_O
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
dnl AC_PROG_CC_STDC
@@ -684,8 +685,11 @@
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9]*//g'`
changequote([,])
- CFLAGS="$CFLAGS -O0"
- CXXFLAGS="$CXXFLAGS -O0"
+ dnl add -O0 only if GCC or ICC is used
+ if test "$GCC" = "yes" || test "$ICC" = "yes"; then
+ CFLAGS="$CFLAGS -O0"
+ CXXFLAGS="$CXXFLAGS -O0"
+ fi
else
PHP_DEBUG=0
ZEND_DEBUG=no
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php