]> granicus.if.org Git - php/commitdiff
port over autoconf fixes from php3
authorSascha Schumann <sas@php.net>
Sun, 27 Jun 1999 21:14:00 +0000 (21:14 +0000)
committerSascha Schumann <sas@php.net>
Sun, 27 Jun 1999 21:14:00 +0000 (21:14 +0000)
Makefile.in
acinclude.m4
configure.in.in

index ae470dc11606c093a7c47aacf4ba326763b36945..26c8d8cf50a6a0661f27897fd2d75d7455212a24 100644 (file)
@@ -59,7 +59,7 @@ RANLIB = @RANLIB@
 YACC = @YACC@
 MAINT = @MAINT@
 APXS = @APXS@
-APXS_LDFLAGS = @RPATHS@ $(EXTRA_LIBS) $(LIBS)
+APXS_LDFLAGS = $(EXTRA_LIBS) $(LIBS)
 WARNING_LEVEL = @WARNING_LEVEL@
 
 SOURCE = main.c internal_functions.c snprintf.c php3_sprintf.c \
@@ -106,7 +106,7 @@ libmodphp4-so.a: all-recursive $(OBJS) @REGEX_LIB@
 # Apache 1.3 shared module
 libphp4.so: $(srcdir)/mod_php4.c libmodphp4-so.a @REGEX_LIB@
        -@test -f mod_php4.c || test -L mod_php4.c || $(LN_S) $(srcdir)/mod_php4.c mod_php4.c
-       $(APXS) $(INCLUDE) -c -o libphp4.so mod_php4.c libmodphp4-so.a $(APXS_LDFLAGS)
+       $(APXS) $(INCLUDE) -c -o libphp4.so @RPATHS@ mod_php4.c libmodphp4-so.a $(APXS_LDFLAGS)
 
 regex/libregex.a:
        (cd regex; $(MAKE) lib)
index c3a2fc6e4c217e97a67f9ed6cd164e1a9b7e3d82..22a26353e1034adcb497127af38d5ee23ac89a32 100644 (file)
@@ -22,10 +22,10 @@ dnl
 dnl expands path to an absolute path and assigns it to variable
 dnl
 AC_DEFUN(AC_EXPAND_PATH,[
-  if echo "$1" | grep -v '^/' >/dev/null ; then
-    $2="`pwd`/$1"
-  else
+  if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
     $2="$1"
+  else
+    $2="`pwd`/$1"
   fi
 ])
 
index 1a8ef8a8e51fb95a44205df55a6199c346f5e426..e7c11631e9f6b0fa70f19fc5871113f51c258dc8 100644 (file)
@@ -309,18 +309,42 @@ AC_MSG_CHECKING(whether to use bundled regex library)
 AC_ARG_WITH(system-regex,
 [  --with-system-regex     Do not use the bundled regex library],
 [
-       REGEX_LIB=
-       HSREGEX=no
-       AC_MSG_RESULT(no)
-       AC_DEFINE(REGEX,0)
+    if test -n "$APXS"; then
+        if test -z "`$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
 ],[
-       REGEX_LIB=regex/libregex.a
-       EXTRA_LIBS="-L$abs_builddir/regex -lregex $EXTRA_LIBS"
-       HSREGEX=yes
-       AC_MSG_RESULT(yes)
-    AC_DEFINE(HSREGEX)
-       AC_DEFINE(REGEX,1)
+    if test -n "$APXS"; then
+        if test -z "`$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.a
+  EXTRA_LIBS="-L$abs_builddir/regex -lregex $EXTRA_LIBS"
+  AC_DEFINE(HSREGEX)
+  AC_DEFINE(REGEX,1)
+else
+  REGEX_LIB=
+  AC_DEFINE(REGEX,0)
+fi
+
 AC_SUBST(REGEX_LIB)
 AC_SUBST(HSREGEX)