--- php-5.3.10/sapi/apache2filter/config.m4_orig Sun Mar 9 05:35:56 2008
+++ php-5.3.10/sapi/apache2filter/config.m4 Wed Feb 8 11:25:25 2012
@@ -9,6 +9,23 @@
AC_MSG_CHECKING([for Apache 2.0 filter-module support via DSO through APXS])
+dnl PHP_AP2_EXTRACT_VERSION(/path/httpd)
+dnl
+dnl This macro is used to get a comparable
+dnl version for apache2.
+dnl
+AC_DEFUN([PHP_AP2_EXTRACT_VERSION],[
+ ac_output=`env LD_LIBRARY_PATH=$APXS_LIBDIR $1 -v 2>&1 | grep version`
+ ac_IFS=$IFS
+IFS="- /.
+"
+ set $ac_output
+ IFS=$ac_IFS
+
+ APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
+])
+
+dnl
if test "$PHP_APXS2FILTER" != "no"; then
if test "$PHP_APXS2FILTER" = "yes"; then
APXS=apxs
@@ -37,6 +54,7 @@
APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
APXS_BINDIR=`$APXS -q BINDIR`
+ APXS_LIBDIR=`$APXS -q LIBDIR`
APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
APXS_CFLAGS=`$APXS -q CFLAGS`
APXS_MPM=`$APXS -q MPM_NAME`
@@ -62,6 +80,7 @@
# Test that we're trying to configure with apache 2.x
PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
+ PHP_AP2_EXTRACT_VERSION($APXS_HTTPD)
if test "$APACHE_VERSION" -le 2000000; then
AC_MSG_ERROR([You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropiate switch --with-apxs (without the 2)])
elif test "$APACHE_VERSION" -lt 2000040; then