--- embedaddon/php/sapi/apache2handler/config.m4 2012/02/21 23:48:06 1.1.1.1 +++ embedaddon/php/sapi/apache2handler/config.m4 2012/05/29 12:34:35 1.1.1.2 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.1.1.1 2012/02/21 23:48:06 misho Exp $ +dnl $Id: config.m4,v 1.1.1.2 2012/05/29 12:34:35 misho Exp $ dnl PHP_ARG_WITH(apxs2,, @@ -38,7 +38,6 @@ if test "$PHP_APXS2" != "no"; then APXS_BINDIR=`$APXS -q BINDIR` APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET` APXS_CFLAGS=`$APXS -q CFLAGS` - APXS_MPM=`$APXS -q MPM_NAME` APU_BINDIR=`$APXS -q APU_BINDIR` APR_BINDIR=`$APXS -q APR_BINDIR` @@ -117,8 +116,16 @@ if test "$PHP_APXS2" != "no"; then ;; esac - if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then - PHP_BUILD_THREAD_SAFE + if test "$APACHE_VERSION" -lt 2004001; then + APXS_MPM=`$APXS -q MPM_NAME` + if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then + PHP_BUILD_THREAD_SAFE + fi + else + APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'` + if test -n "$APACHE_THREADED_MPM"; then + PHP_BUILD_THREAD_SAFE + fi fi AC_MSG_RESULT(yes) PHP_SUBST(APXS)