]> granicus.if.org Git - php/commitdiff
Enable selective regex library compilation.
authorSascha Schumann <sas@php.net>
Fri, 12 Nov 1999 20:56:30 +0000 (20:56 +0000)
committerSascha Schumann <sas@php.net>
Fri, 12 Nov 1999 20:56:30 +0000 (20:56 +0000)
acinclude.m4
configure.in
ext/standard/config.m4
sapi/apache/config.m4

index b2d87256fce909a8aafaa30792ad73f4e8830876..65ab8c32635f7dd437bad94cdf5c0234d66d9982 100644 (file)
@@ -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.
index bd943cbca31613c55cdede4ee9671137a64d74b2..cbf3489673d2b4c6090b000317703dc2637844c1 100644 (file)
@@ -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"
 
index 9949ffbd943741717ef56c4fc850261316ccf5a1..cde845c2e8ea53e1e80592a077db44e7990592ff 100644 (file)
@@ -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)
index 10a8cc457b521bea8d125e128e4f90d46654ace4..1641fa6decdc9adccdf2d494632b1a5009234561 100644 (file)
@@ -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