]> granicus.if.org Git - php/commitdiff
- Fixed Apache 2.0 SAPI build against Apache 2 HEAD. (Patch by Joe Orton)
authorDerick Rethans <derick@php.net>
Mon, 23 Aug 2004 09:00:09 +0000 (09:00 +0000)
committerDerick Rethans <derick@php.net>
Mon, 23 Aug 2004 09:00:09 +0000 (09:00 +0000)
NEWS
sapi/apache2filter/config.m4
sapi/apache2handler/config.m4

diff --git a/NEWS b/NEWS
index 1fcb55797def86c75948cedde9cca6a3e624f6f4..87750c796da2735d1ac9f75d4467616ce4d9042b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP                                                                        NEWS
 ?? ??? 2004, PHP 5.0.2
 - Added PHP_EOL constant that contains the OS way of representing newlines.
   (Paul Hudson, Derick)
+- Fixed Apache 2.0 SAPI build against Apache 2 HEAD. (Joe Orton, Derick)
 - Fixed bug with raw_post_data not getting set (Brian)
 - Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
 - Fixed bug #29737 (ip2long should return -1 if IP is 255.255.255.255 and FALSE
index 4ce866b17d6daf0f298d74dbe3716b144aae4ac8..decdd803cfe56c94e17bf90c1a41f3cc20ac2c58 100644 (file)
@@ -40,8 +40,14 @@ AC_ARG_WITH(apxs2filter,
   APU_BINDIR=`$APXS -q APU_BINDIR`
   APR_BINDIR=`$APXS -q APR_BINDIR`
 
-  APU_INCLUDEDIR="`$APU_BINDIR/apu-config --includes`"
-  APR_INCLUDEDIR="`$APR_BINDIR/apr-config --includes`"
+  # Pick up ap[ru]-N-config if using httpd >=2.1
+  APR_CONFIG=`$APXS -q APR_CONFIG 2>/dev/null ||
+    echo $APR_BINDIR/apr-config`
+  APU_CONFIG=`$APXS -q APU_CONFIG 2>/dev/null ||
+    echo $APU_BINDIR/apu-config`
+
+  APR_CFLAGS="`$APR_CONFIG --cppflags --includes`"
+  APU_CFLAGS="`$APU_CONFIG --includes`"
 
   for flag in $APXS_CFLAGS; do
     case $flag in
@@ -49,7 +55,7 @@ AC_ARG_WITH(apxs2filter,
     esac
   done
 
-  APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APU_INCLUDEDIR $APR_INCLUDEDIR"
+  APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS"
 
   # Test that we're trying to configure with apache 2.x
   PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
index 5b29914976146c7f0c92bef486ebd1d621a1f0be..b370aa99abca5adaaa402d907e7e22fd294c3825 100644 (file)
@@ -39,8 +39,14 @@ AC_ARG_WITH(apxs2,
   APU_BINDIR=`$APXS -q APU_BINDIR`
   APR_BINDIR=`$APXS -q APR_BINDIR`
 
-  APU_INCLUDEDIR="`$APU_BINDIR/apu-config --includes`"
-  APR_INCLUDEDIR="`$APR_BINDIR/apr-config --includes`"
+  # Pick up ap[ru]-N-config if using httpd >=2.1
+  APR_CONFIG=`$APXS -q APR_CONFIG 2>/dev/null ||
+    echo $APR_BINDIR/apr-config`
+  APU_CONFIG=`$APXS -q APU_CONFIG 2>/dev/null ||
+    echo $APU_BINDIR/apu-config`
+
+  APR_CFLAGS="`$APR_CONFIG --cppflags --includes`"
+  APU_CFLAGS="`$APU_CONFIG --includes`"
 
   for flag in $APXS_CFLAGS; do
     case $flag in
@@ -48,7 +54,7 @@ AC_ARG_WITH(apxs2,
     esac
   done
 
-  APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APU_INCLUDEDIR $APR_INCLUDEDIR"
+  APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS"
 
   # Test that we're trying to configure with apache 2.x
   PHP_AP_EXTRACT_VERSION($APXS_HTTPD)