diff options
author | foobar <sniper@php.net> | 2002-04-26 03:07:16 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-04-26 03:07:16 +0000 |
commit | 492efe963f8bd072131852007dc5b5e1c0cefeb5 (patch) | |
tree | 772815fccdc20faa12d37ba3776e9564eda04c72 /sapi/apache/config.m4 | |
parent | 77b99c3ce27abf5ba814dbfbeeddbd1d4544eee5 (diff) | |
download | php-git-492efe963f8bd072131852007dc5b5e1c0cefeb5.tar.gz |
- Fix for bug: #16791. (more reliable test)
Diffstat (limited to 'sapi/apache/config.m4')
-rw-r--r-- | sapi/apache/config.m4 | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sapi/apache/config.m4 b/sapi/apache/config.m4 index 497bbeafdd..c38bd4940e 100644 --- a/sapi/apache/config.m4 +++ b/sapi/apache/config.m4 @@ -33,6 +33,14 @@ AC_ARG_WITH(apxs, 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 @@ AC_ARG_WITH(apxs, 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 @@ -56,11 +63,6 @@ AC_ARG_WITH(apxs, ;; 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 |