dsp Thu Nov 6 20:42:12 2008 UTC Modified files: (Branch: PHP_5_3) /php-src acinclude.m4 configure.in NEWS Log: MFH: Detect Sun C compiler and set default flags if it is used http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.26.2.10&r2=1.332.2.14.2.26.2.11&diff_format=u Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.332.2.14.2.26.2.10 php-src/acinclude.m4:1.332.2.14.2.26.2.11 --- php-src/acinclude.m4:1.332.2.14.2.26.2.10 Mon Sep 8 10:24:25 2008 +++ php-src/acinclude.m4 Thu Nov 6 20:42:11 2008 @@ -1,5 +1,5 @@ dnl -dnl $Id: acinclude.m4,v 1.332.2.14.2.26.2.10 2008/09/08 10:24:25 tony2001 Exp $ +dnl $Id: acinclude.m4,v 1.332.2.14.2.26.2.11 2008/11/06 20:42:11 dsp Exp $ dnl dnl This file contains local autoconf functions. dnl @@ -2766,6 +2766,22 @@ ) ]) +dnl PHP_DETECT_SUNCC +dnl Detect if the systems default compiler is suncc. +dnl We also set some usefull CFLAGS if the user didn't set any +AC_DEFUN([PHP_DETECT_SUNCC],[ + SUNCC="no" + AC_MSG_CHECKING([for suncc]) + AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C], + SUNCC="no" + AC_MSG_RESULT([no]), + SUNCC="yes" + test -n "$auto_cflags" && CFLAGS="-fsimple=2 -xnorunpath -xO4 -xalias_level=basic -xipo=1 -xlibmopt -xprefetch_level=1 -xprefetch=auto -xstrconst -xtarget=native -zlazyload" + GCC="" + AC_MSG_RESULT([yes]) + ) +]) + dnl dnl PHP_CRYPT_R_STYLE dnl detect the style of crypt_r() is any is available http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.77.2.31&r2=1.579.2.52.2.77.2.32&diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.579.2.52.2.77.2.31 php-src/configure.in:1.579.2.52.2.77.2.32 --- php-src/configure.in:1.579.2.52.2.77.2.31 Mon Sep 1 20:51:57 2008 +++ php-src/configure.in Thu Nov 6 20:42:11 2008 @@ -1,4 +1,4 @@ -## $Id: configure.in,v 1.579.2.52.2.77.2.31 2008/09/01 20:51:57 johannes Exp $ -*- autoconf -*- +## $Id: configure.in,v 1.579.2.52.2.77.2.32 2008/11/06 20:42:11 dsp Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -142,6 +142,7 @@ AC_PROG_CC PHP_DETECT_ICC +PHP_DETECT_SUNCC 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 @@ -214,6 +215,10 @@ CFLAGS="$CFLAGS -ieee" fi ;; + sparc*) + if test "$SUNCC" = "yes"; then + CFLAGS="$CFLAGS -xmemalign=8s" + fi esac dnl activate some gcc specific optimizations for gcc >= 4 @@ -788,6 +793,15 @@ CFLAGS="$CFLAGS -O0" CXXFLAGS="$CXXFLAGS -O0" fi + if test "$SUNCC" = "yes"; then + if -n "$auto_cflags"; then + CFLAGS="-g" + CXXFLAGS="-g" + else + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CFLAGS -g" + fi + fi else PHP_DEBUG=0 ZEND_DEBUG=no http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.366&r2=1.2027.2.547.2.965.2.367&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.366 php-src/NEWS:1.2027.2.547.2.965.2.367 --- php-src/NEWS:1.2027.2.547.2.965.2.366 Thu Nov 6 01:38:56 2008 +++ php-src/NEWS Thu Nov 6 20:42:11 2008 @@ -17,6 +17,7 @@ - Added concatenation option to bz2.decompress stream filter. (Keisial at gmail dot com, Greg) - Added support for using compressed connections with PDO_mysql. (Johannes) +- Added default flags for suncc compiler. (David Soria Parra) - Deprecated define_syslog_variables(). (Kalle)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php