]> granicus.if.org Git - php/commitdiff
Allow the version checks for --with-apxs= and --with-apxs2= to work
authorCliff Woolley <jwoolley@php.net>
Fri, 17 May 2002 08:07:14 +0000 (08:07 +0000)
committerCliff Woolley <jwoolley@php.net>
Fri, 17 May 2002 08:07:14 +0000 (08:07 +0000)
with development version of Apache, whose version strings end in "-dev",
eg "Apache/2.0.37-dev".

PR: 17233
Submitted by: Dale Ghent <daleg@elemental.org>

sapi/apache/config.m4
sapi/apache2filter/config.m4

index cb56d9c24e2ee4a150a908deb78d33a273d6f459..f0d1fae255083445a27bc5798c4387d27b707fb5 100644 (file)
@@ -36,7 +36,7 @@ AC_ARG_WITH(apxs,
   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;}'`
+  APACHE_VERSION=`$APXS_HTTPD -v | head -1 | cut -f3 -d' ' | cut -f2 -d'/' | cut -f1 -d'-' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
   if test "$APACHE_VERSION" -ge 2000000; then
     AC_MSG_ERROR([You have enabled Apache 1.3 support while your server is Apache 2.  Please use the appropiate switch --with-apxs2]) 
   fi
index 7a3b91b04f1437b36f22b26224e92c105e8616c9..76248f6f8c2edb0abf244b5930f838b157216132 100644 (file)
@@ -42,7 +42,7 @@ AC_ARG_WITH(apxs2,
   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;}'`
+  APACHE_VERSION=`$APXS_HTTPD -v | head -1 | cut -f3 -d' ' | cut -f2 -d'/' | cut -f1 -d'-' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
   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 2000035; then