)
])
+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
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
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
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