--- embedaddon/php/ext/standard/config.m4 2012/02/21 23:48:02 1.1.1.1 +++ embedaddon/php/ext/standard/config.m4 2013/10/14 08:02:34 1.1.1.3 @@ -1,7 +1,5 @@ -dnl $Id: config.m4,v 1.1.1.1 2012/02/21 23:48:02 misho Exp $ -*- autoconf -*- +dnl $Id: config.m4,v 1.1.1.3 2013/10/14 08:02:34 misho Exp $ -*- autoconf -*- -divert(6006003)dnl - dnl dnl Check if flush should be called explicitly after buffered io dnl @@ -342,8 +340,6 @@ dnl AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy) AC_FUNC_FNMATCH -divert(6006005)dnl - dnl dnl Check if there is a support means of creating a new process dnl and defining which handles it receives @@ -362,7 +358,29 @@ else AC_MSG_RESULT(no) fi -if test "$PHP_SAPI" = "cgi" || test "$PHP_SAPI" = "cli" || test "$PHP_SAPI" = "embed"; then +PHP_ENABLE_CHROOT_FUNC=no +case "$PHP_SAPI" in + embed) + PHP_ENABLE_CHROOT_FUNC=yes + ;; + + none) + for PROG in $PHP_BINARIES; do + case "$PROG" in + cgi|cli) + PHP_ENABLE_CHROOT_FUNC=yes + ;; + + *) + PHP_ENABLE_CHROOT_FUNC=no + break + ;; + esac + done + ;; +esac + +if test "$PHP_ENABLE_CHROOT_FUNC" = "yes"; then AC_DEFINE(ENABLE_CHROOT_FUNC, 1, [Whether to enable chroot() function]) fi