components/php-5_3/php-sapi/patches/016_php_sapi_apache2filter_config.m4.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 13 Oct 2015 18:21:51 -0700
changeset 4945 d9d54aa673b6
parent 846 fe258446a1ae
permissions -rw-r--r--
21292090 "gmake test" failures for re2c plus hookup system tests

--- 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