From 949ef40139a008c9bbf387a677018f3a85fbf75a Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Fri, 2 Mar 2012 00:07:41 +0000 Subject: Fixed bug #61172 (Add Apache 2.4 support) --- sapi/apache2filter/config.m4 | 13 ++++++++++--- sapi/apache2handler/config.m4 | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'sapi') diff --git a/sapi/apache2filter/config.m4 b/sapi/apache2filter/config.m4 index b10720a18a..c49488d182 100644 --- a/sapi/apache2filter/config.m4 +++ b/sapi/apache2filter/config.m4 @@ -39,7 +39,6 @@ if test "$PHP_APXS2FILTER" != "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` @@ -118,8 +117,16 @@ if test "$PHP_APXS2FILTER" != "no"; then ;; esac - if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser"; 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) diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 index 95217908fd..702f91f5d2 100644 --- a/sapi/apache2handler/config.m4 +++ b/sapi/apache2handler/config.m4 @@ -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) -- cgit v1.2.1