summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m416
-rw-r--r--configure.in45
-rw-r--r--ext/standard/config.m412
-rw-r--r--sapi/apache/config.m46
4 files changed, 36 insertions, 43 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index b2d87256fc..65ab8c3263 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -144,6 +144,22 @@ AC_DEFUN(AC_CHECK_CC_OPTION,[
fi
])
+AC_DEFUN(PHP_HSREGEX,[
+AC_MSG_CHECKING(whether to use bundled regex library)
+AC_MSG_RESULT($HSREGEX)
+
+if test "$HSREGEX" = "yes"; then
+ REGEX_LIB=regex/libregex.la
+ AC_DEFINE(HSREGEX)
+ AC_DEFINE(REGEX,1)
+else
+ REGEX_LIB=
+ AC_DEFINE(REGEX,0)
+fi
+
+AC_SUBST(REGEX_LIB)
+AC_SUBST(HSREGEX)
+])
dnl
dnl See if we have broken header files like SunOS has.
diff --git a/configure.in b/configure.in
index bd943cbca3..cbf3489673 100644
--- a/configure.in
+++ b/configure.in
@@ -386,49 +386,6 @@ AC_ARG_ENABLE(versioning,
])
AC_MSG_RESULT($RESULT)
-AC_MSG_CHECKING(whether to use bundled regex library)
-AC_ARG_WITH(system-regex,
-[ --with-system-regex Do not use the bundled regex library],
-[
- if test -n "$APXS"; then
- if test -n "`$APXS -q CFLAGS | grep USE_HSREGEX`"; then
- HSREGEX=yes
- else
- HSREGEX=no
- fi
- else
- if test "$withval" = "no"; then
- HSREGEX=yes
- else
- HSREGEX=no
- fi
- fi
-],[
- if test -n "$APXS"; then
- if test -n "`$APXS -q CFLAGS | grep USE_HSREGEX`"; then
- HSREGEX=yes
- else
- HSREGEX=no
- fi
- else
- HSREGEX=yes
- fi
-])
-AC_MSG_RESULT($HSREGEX)
-
-if test "$HSREGEX" = "yes"; then
- REGEX_LIB=regex/libregex.la
- AC_DEFINE(HSREGEX)
- AC_DEFINE(REGEX,1)
-else
- REGEX_LIB=
- AC_DEFINE(REGEX,0)
-fi
-
-AC_SUBST(REGEX_LIB)
-AC_SUBST(HSREGEX)
-
-
AC_MSG_CHECKING(whether to use a configuration file)
AC_ARG_WITH(config-file-path,
[ --with-config-file-path=PATH
@@ -672,6 +629,8 @@ if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
+PHP_HSREGEX
+
dnl If we are using gcc and the user has not specified CFLAGS, add -O2.
test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O2"
diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
index 9949ffbd94..cde845c2e8 100644
--- a/ext/standard/config.m4
+++ b/ext/standard/config.m4
@@ -123,6 +123,18 @@ AC_CHECK_FUNCS(getwd)
divert(3)
+AC_ARG_WITH(system-regex,
+[ --with-system-regex Do not use the bundled regex library],
+[
+ if test "$withval" = "no"; then
+ HSREGEX=yes
+ else
+ HSREGEX=no
+ fi
+],[
+ HSREGEX=yes
+])
+
AC_CRYPT_CAP
PHP_EXTENSION(standard)
diff --git a/sapi/apache/config.m4 b/sapi/apache/config.m4
index 10a8cc457b..1641fa6dec 100644
--- a/sapi/apache/config.m4
+++ b/sapi/apache/config.m4
@@ -16,6 +16,11 @@ 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"
@@ -173,6 +178,7 @@ AC_ARG_WITH(mod_charset,
])
if test -n "$APACHE_MODULE"; then
+ HSREGEX=no
PHP_EXTENSION(apache)
PHP_OUTPUT(sapi/apache/libphp4.module)
PHP_BUILD_STATIC