From: Jani Taskinen Date: Sat, 9 May 2009 20:28:03 +0000 (+0000) Subject: MFH: sync + - Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi) X-Git-Tag: php-5.2.10RC1~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7bc9053e1e864b94036808e2846783a03c949bd;p=php MFH: sync + - Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi) --- diff --git a/NEWS b/NEWS index e2f7b56c1d..9ee859c12e 100644 --- a/NEWS +++ b/NEWS @@ -12,7 +12,6 @@ PHP NEWS - Fixed leaks in imap when a mail_criteria is used. (Pierre) - Fixed bug #48156 (Added support for lcov v1.7). (Ilia) - - Fixed bug #48131 (Don't try to bind ipv4 addresses to ipv6 ips via bindto). (Ilia) - Fixed bug #48132 (configure check for curl ssl support fails with @@ -58,6 +57,7 @@ PHP NEWS - Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia) - Fixed bug #47487 (performance degraded when reading large chunks after fix of bug #44607). (Arnaud) +- Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi). (Jani) - Fixed bug #47365 (ip2long() may allow some invalid values on certain 64bit systems). (Ilia) - Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6 diff --git a/acinclude.m4 b/acinclude.m4 index bd63b6f65e..486d28d0b4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -920,7 +920,7 @@ AC_DEFUN([PHP_GEN_BUILD_DIRS],[ ]) dnl -dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx[, zend_ext]]]]]) +dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]]) dnl dnl Includes an extension in the build. dnl @@ -968,12 +968,15 @@ dnl ---------------------------------------------- Shared module if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then dnl ---------------------------------------------- CLI static module [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no - if test "$PHP_SAPI" = "cgi"; then - PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) - EXT_STATIC="$EXT_STATIC $1" - else - PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) - fi + case "$PHP_SAPI" in + cgi|embed[)] + PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) + EXT_STATIC="$EXT_STATIC $1" + ;; + *[)] + PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) + ;; + esac EXT_CLI_STATIC="$EXT_CLI_STATIC $1" fi PHP_ADD_BUILD_DIR($ext_builddir) @@ -2766,6 +2769,23 @@ 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" + GCC="no" + 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