From: Sascha Schumann Date: Sun, 27 Jun 1999 21:14:00 +0000 (+0000) Subject: port over autoconf fixes from php3 X-Git-Tag: BEFORE_REMOVING_GC_STEP1~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa4e00b33cd15427429f580cff9ae3df89cb9047;p=php port over autoconf fixes from php3 --- diff --git a/Makefile.in b/Makefile.in index ae470dc116..26c8d8cf50 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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) diff --git a/acinclude.m4 b/acinclude.m4 index c3a2fc6e4c..22a26353e1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 ]) diff --git a/configure.in.in b/configure.in.in index 1a8ef8a8e5..e7c11631e9 100644 --- a/configure.in.in +++ b/configure.in.in @@ -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)