cvs: php-src(PHP_5_2) / acinclude.m4 configure.in

From: Date: Mon, 04 Dec 2006 18:28:49 +0000
Subject: cvs: php-src(PHP_5_2) / acinclude.m4 configure.in
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-41880@lists.php.net to get a copy of this message
tony2001 Mon Dec 4 18:28:49 2006 UTC Modified files: (Branch: PHP_5_2) /php-src acinclude.m4 configure.in Log: MFH: fix build with Sun compiler, which doesn't support -O0 http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.5&r2=1.332.2.14.2.6&diff_format=u Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.332.2.14.2.5 php-src/acinclude.m4:1.332.2.14.2.6 --- php-src/acinclude.m4:1.332.2.14.2.5 Mon Oct 2 20:49:23 2006 +++ php-src/acinclude.m4 Mon Dec 4 18:28:49 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: acinclude.m4,v 1.332.2.14.2.5 2006/10/02 20:49:23 tony2001 Exp $ +dnl $Id: acinclude.m4,v 1.332.2.14.2.6 2006/12/04 18:28:49 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.579.2.52.2.27&r2=1.579.2.52.2.28&diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.579.2.52.2.27 php-src/configure.in:1.579.2.52.2.28 --- php-src/configure.in:1.579.2.52.2.27 Thu Nov 30 17:10:46 2006 +++ php-src/configure.in Mon Dec 4 18:28:49 2006 @@ -1,4 +1,4 @@ - ## $Id: configure.in,v 1.579.2.52.2.27 2006/11/30 17:10:46 iliaa Exp $ -*- autoconf -*- + ## $Id: configure.in,v 1.579.2.52.2.28 2006/12/04 18:28:49 tony2001 Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -122,6 +122,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 @@ -686,8 +687,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

« previous php.cvs (#41880) next »