summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorDavid Soria Parra <dsp@php.net>2008-11-06 20:42:11 +0000
committerDavid Soria Parra <dsp@php.net>2008-11-06 20:42:11 +0000
commit47e909faed8ef36d5348d515d09c5eaf225a13fc (patch)
tree5cb280f9f30f5cc5c3ff1500ced61e2d7c1cd21f /acinclude.m4
parent737c3c89c6fbb67536fa71b30894d1ef474887c0 (diff)
downloadphp-git-47e909faed8ef36d5348d515d09c5eaf225a13fc.tar.gz
MFH: Detect Sun C compiler and set default flags if it is used
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index bd63b6f65e..aac7ad554b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2766,6 +2766,22 @@ AC_DEFUN([PHP_DETECT_ICC],
)
])
+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