Index: acinclude.m4 =================================================================== RCS file: /repository/php-src/acinclude.m4,v retrieving revision 1.332.2.14.2.5 diff -u -p -d -r1.332.2.14.2.5 acinclude.m4 --- acinclude.m4 2 Oct 2006 20:49:23 -0000 1.332.2.14.2.5 +++ acinclude.m4 4 Dec 2006 18:19:18 -0000 @@ -2574,3 +2574,19 @@ ifelse([$1],[],:,[$1]) 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]) + ) +]) + Index: configure.in =================================================================== RCS file: /repository/php-src/configure.in,v retrieving revision 1.579.2.52.2.27 diff -u -p -d -r1.579.2.52.2.27 configure.in --- configure.in 30 Nov 2006 17:10:46 -0000 1.579.2.52.2.27 +++ configure.in 4 Dec 2006 18:19:19 -0000 @@ -122,6 +122,7 @@ dnl Checks for programs. 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 @@ -686,8 +687,11 @@ if test "$PHP_DEBUG" = "yes"; then 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