From: Derick Rethans Date: Mon, 23 Aug 2004 09:00:09 +0000 (+0000) Subject: - Fixed Apache 2.0 SAPI build against Apache 2 HEAD. (Patch by Joe Orton) X-Git-Tag: php-5.0.2RC1~107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ee05c9da898e74e0a4ae00bb9add3b6cf8a700b;p=php - Fixed Apache 2.0 SAPI build against Apache 2 HEAD. (Patch by Joe Orton) --- diff --git a/NEWS b/NEWS index 1fcb55797d..87750c796d 100644 --- 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 diff --git a/sapi/apache2filter/config.m4 b/sapi/apache2filter/config.m4 index 4ce866b17d..decdd803cf 100644 --- a/sapi/apache2filter/config.m4 +++ b/sapi/apache2filter/config.m4 @@ -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) diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 index 5b29914976..b370aa99ab 100644 --- a/sapi/apache2handler/config.m4 +++ b/sapi/apache2handler/config.m4 @@ -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)