summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-11-13 16:51:33 +0000
committerSascha Schumann <sas@php.net>1999-11-13 16:51:33 +0000
commitbcb2214e9951b271d073314870bf09a6a87435f5 (patch)
treeb3a1540deb25e4480d62c57854ba092479191e28 /sapi
parentc166a6fb835c5b43a782da141c1543e8a1878229 (diff)
downloadphp-git-bcb2214e9951b271d073314870bf09a6a87435f5.tar.gz
Improve regex library selection. It lets user specify whether they want
system, apache, or php's regex library by using the --with-regex option. "php" is the default; if you use --with-apache in combination with Apache 1.3.x, the default is "apache".
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache/config.m422
-rw-r--r--sapi/apache/libphp4.module.in2
2 files changed, 17 insertions, 7 deletions
diff --git a/sapi/apache/config.m4 b/sapi/apache/config.m4
index 1641fa6dec..9aed624498 100644
--- a/sapi/apache/config.m4
+++ b/sapi/apache/config.m4
@@ -16,11 +16,6 @@ AC_ARG_WITH(apxs,
XML_INCLUDE="$APXS_INCLUDEDIR/xml"
fi
AC_ADD_INCLUDE($APXS_INCLUDEDIR)
- if test -n "`$APXS -q CFLAGS | grep USE_HSREGEX`"; then
- HSREGEX=yes
- else
- HSREGEX=no
- fi
PHP_EXTENSION(apache)
PHP_SAPI=apache
APACHE_INSTALL="$APXS -i -a -n php4 $SAPI_SHARED"
@@ -64,6 +59,7 @@ AC_ARG_WITH(apache,
fi
# For Apache 1.3.x
elif test -f $withval/src/main/httpd.h; then
+ APACHE_HAS_REGEX=1
APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap"
APACHE_TARGET=$withval/src/modules/php4
if test ! -d $APACHE_TARGET; then
@@ -90,6 +86,7 @@ AC_ARG_WITH(apache,
fi
# Also for Apache 1.3.x
elif test -f $withval/src/include/httpd.h; then
+ APACHE_HAS_REGEX=1
APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
APACHE_TARGET=$withval/src/modules/php4
if test -d $withval/src/lib/expat-lite ; then
@@ -177,8 +174,21 @@ AC_ARG_WITH(mod_charset,
AC_MSG_RESULT(no)
])
+if test "$with_regex" = "apache" && test -z "$APACHE_HAS_REGEX"; then
+ with_regex=php
+fi
+
+if test -z "$with_regex" && test -n "$APACHE_HAS_REGEX"; then
+ with_regex=apache
+fi
+
if test -n "$APACHE_MODULE"; then
- HSREGEX=no
+ if test "$with_regex" = "apache"; then
+ APACHE_WANT_HSREGEX=yes
+ else
+ APACHE_WANT_HSREGEX=no
+ fi
+ AC_SUBST(APACHE_WANT_HSREGEX)
PHP_EXTENSION(apache)
PHP_OUTPUT(sapi/apache/libphp4.module)
PHP_BUILD_STATIC
diff --git a/sapi/apache/libphp4.module.in b/sapi/apache/libphp4.module.in
index 687c1c46ac..8ecf83ebaa 100644
--- a/sapi/apache/libphp4.module.in
+++ b/sapi/apache/libphp4.module.in
@@ -1,6 +1,6 @@
Name: php4_module
ConfigStart
- RULE_WANTHSREGEX=@HSREGEX@
+ RULE_WANTHSREGEX=@APACHE_WANT_HSREGEX@
LIBS="@NATIVE_RPATHS@ @PHP_LIBS@ @EXTRA_LIBS@ @LIBS@ $LIBS"
RULE_HIDE=yes
CFLAGS="$CFLAGS -I@abs_srcdir@ -I@abs_srcdir@/libzend -I@abs_builddir@/libzend -I@abs_builddir@"