diff options
author | David Soria Parra <dsp@php.net> | 2008-11-06 20:42:11 +0000 |
---|---|---|
committer | David Soria Parra <dsp@php.net> | 2008-11-06 20:42:11 +0000 |
commit | 47e909faed8ef36d5348d515d09c5eaf225a13fc (patch) | |
tree | 5cb280f9f30f5cc5c3ff1500ced61e2d7c1cd21f /configure.in | |
parent | 737c3c89c6fbb67536fa71b30894d1ef474887c0 (diff) | |
download | php-git-47e909faed8ef36d5348d515d09c5eaf225a13fc.tar.gz |
MFH: Detect Sun C compiler and set default flags if it is used
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.in b/configure.in index ee4ad51499..1a3aada3f9 100644 --- a/configure.in +++ b/configure.in @@ -142,6 +142,7 @@ dnl ------------------------------------------------------------------------- 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 @@ case $host_cpu in 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 @@ if test "$PHP_DEBUG" = "yes"; then 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 |