cvs: php4 /sapi/apache config.m4 /sapi/apache2filter config.m4

From: Date: Fri, 26 Apr 2002 03:07:18 +0000
Subject: cvs: php4 /sapi/apache config.m4 /sapi/apache2filter config.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11444@lists.php.net to get a copy of this message
sniper Thu Apr 25 23:07:18 2002 EDT Modified files: /php4/sapi/apache config.m4 /php4/sapi/apache2filter config.m4 Log: - Fix for bug: #16791. (more reliable test) Index: php4/sapi/apache/config.m4 diff -u php4/sapi/apache/config.m4:1.53 php4/sapi/apache/config.m4:1.54 --- php4/sapi/apache/config.m4:1.53 Mon Apr 22 22:58:54 2002 +++ php4/sapi/apache/config.m4 Thu Apr 25 23:06:52 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.53 2002/04/23 02:58:54 sniper Exp $ +dnl $Id: config.m4,v 1.54 2002/04/26 03:06:52 sniper Exp $ dnl AC_MSG_CHECKING(for Apache 1.x module support via DSO through APXS) @@ -33,6 +33,14 @@ APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@" APXS_INCLUDEDIR=$APXS -q INCLUDEDIR APXS_CFLAGS=$APXS -q CFLAGS + APXS_HTTPD=$APXS -q SBINDIR/$APXS -q TARGET + + # Test that we're trying to configure with apache 1.x + APACHE_VERSION=$APXS_HTTPD -v | head -1 | cut -f3 -d' ' | cut -f2 -d'/' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}' + if test "$APACHE_VERSION" -ge 2000000; then + AC_MSG_ERROR([Use --with-apxs2 with Apache 2.x!]) + fi + for flag in $APXS_CFLAGS; do case $flag in -D*) CPPFLAGS="$CPPFLAGS $flag";; @@ -45,7 +53,6 @@ PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) ;; *darwin*) - APXS_HTTPD=$APXS -q SBINDIR/$APXS -q TARGET MH_BUNDLE_FLAGS="-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD" PHP_SUBST(MH_BUNDLE_FLAGS) SAPI_SHARED=libs/libphp4.so @@ -55,11 +62,6 @@ PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) ;; esac - - # Test that we're trying to configure with apache 1.x - if test -f "$APXS_INCLUDEDIR/ap_mpm.h"; then - AC_MSG_ERROR([Use --with-apxs2 with Apache 2.x!]) - fi # Test whether apxs support -S option $APXS -q -S CFLAGS="$APXS_CFLAGS" CFLAGS >/dev/null 2>&1 Index: php4/sapi/apache2filter/config.m4 diff -u php4/sapi/apache2filter/config.m4:1.11 php4/sapi/apache2filter/config.m4:1.12 --- php4/sapi/apache2filter/config.m4:1.11 Mon Apr 22 11:37:54 2002 +++ php4/sapi/apache2filter/config.m4 Thu Apr 25 23:07:16 2002 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.11 2002/04/22 15:37:54 markonen Exp $ +dnl $Id: config.m4,v 1.12 2002/04/26 03:07:16 sniper Exp $ dnl AC_MSG_CHECKING(for Apache 2.0 module support via DSO through APXS) @@ -32,13 +32,23 @@ fi APXS_INCLUDEDIR=$APXS -q INCLUDEDIR + APXS_HTTPD=$APXS -q SBINDIR/$APXS -q TARGET APXS_CFLAGS=$APXS -q CFLAGS + for flag in $APXS_CFLAGS; do case $flag in -D*) CPPFLAGS="$CPPFLAGS $flag";; esac done + # Test that we're trying to configure with apache 2.x + APACHE_VERSION=$APXS_HTTPD -v | head -1 | cut -f3 -d' ' | cut -f2 -d'/' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}' + if test "$APACHE_VERSION" -le 2000000; then + AC_MSG_ERROR([Use --with-apxs with Apache 1.3.x!]) + elif test "$APACHE_VERSION" -lt 2000035; then + AC_MSG_ERROR([Apache version >= 2.0.35 required.]) + fi + case $host_alias in *aix*) APXS_SBINDIR=$APXS -q SBINDIR @@ -47,7 +57,6 @@ INSTALL_IT="$APXS -i -a -n php4 $SAPI_LIBTOOL" ;; *darwin*) - APXS_HTTPD=$APXS -q SBINDIR/$APXS -q TARGET MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD" PHP_SUBST(MH_BUNDLE_FLAGS) PHP_SELECT_SAPI(apache2filter, bundle, sapi_apache2.c apache_config.c php_functions.c) @@ -59,11 +68,6 @@ INSTALL_IT="$APXS -i -a -n php4 $SAPI_LIBTOOL" ;; esac - - # Test that we're trying to configure with apache 2.x - if test ! -f "$APXS_INCLUDEDIR/ap_mpm.h"; then - AC_MSG_ERROR([Use --with-apxs with Apache 1.3.x!]) - fi PHP_ADD_INCLUDE($APXS_INCLUDEDIR) PHP_BUILD_THREAD_SAFE

« previous php.cvs (#11444) next »