]> granicus.if.org Git - php/commitdiff
- fix APXS VPATH build
authorSascha Schumann <sas@php.net>
Sat, 29 May 1999 16:15:21 +0000 (16:15 +0000)
committerSascha Schumann <sas@php.net>
Sat, 29 May 1999 16:15:21 +0000 (16:15 +0000)
- libzend/TSRM build in their own directories
- ext/Makefile was generated twice

****NOTE******

If you use any kind of VPATH, you need to do a "make distclean" in your
libzend/TSRM directory, before running configure again.

Makefile.in
configure.in.in

index e3f62ef77ee78e68ad6fefec4430a38c86e4f04e..1c500c07943423779112acd308410c4713f54e59 100644 (file)
@@ -33,9 +33,12 @@ srcdir = @srcdir@
 VPATH = @srcdir@
 bindir = @bindir@
 
+top_builddir = .
+
 ZEND_DIR = $(srcdir)/libzend
-SUBDIRS=$(srcdir)/libzend ext @TSRM_DIR@
+SUBDIRS=libzend ext @TSRM_DIR@
 
+LN_S = @LN_S@
 CC = @CC@
 AR = ar rc
 BINNAME = @BINNAME@
@@ -68,7 +71,7 @@ OBJS = main.o internal_functions.o snprintf.o php3_sprintf.o \
        safe_mode.o fopen-wrappers.o php3_realpath.o alloca.o output.o \
        php_ini.o SAPI.o cgi_main.o rfc1867.o
 
-PHPLIBS = -L@top_srcdir@/libzend -lzend -Lext -lphpext
+PHPLIBS = -Llibzend -lzend -Lext -lphpext
 LIBS = $(PHPLIBS) $(EXTRA_LIBS) @LIBS@
 
 all: $(BINNAME)
@@ -94,15 +97,16 @@ libphp4.a libmodphp4.a: all-recursive $(OBJS) @REGEX_LIB@
        $(RANLIB) $(BINNAME)
 
 # Apache modules
-libmodphp4-so.a: all-recursive $(OBJS)
+libmodphp4-so.a: all-recursive $(OBJS) @REGEX_LIB@
        $(AR) $@.tmp $(OBJS)
        $(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a libzend/libzend.a @TSRM_LIB@
        @rm -f $@.tmp
        $(RANLIB) libmodphp4-so.a
 
 # Apache 1.3 shared module
-libphp4.so: $(srcdir)/mod_php4.c libmodphp4-so.a
-       $(APXS) -I$(srcdir)/libzend -c -o libphp4.so $(APXS_LDFLAGS) $(srcdir)/mod_php4.c libmodphp4-so.a
+libphp4.so: $(srcdir)/mod_php4.c libmodphp4-so.a @REGEX_LIB@
+       -@$(LN_S) $(srcdir)/mod_php4.c mod_php4.c
+       $(APXS) $(INCLUDE) -c -o libphp4.so $(APXS_LDFLAGS) mod_php4.c libmodphp4-so.a
 
 regex/libregex.a:
        (cd regex; $(MAKE) lib)
index 89b3414e48980c1ae59d573a1030a1903d0eea21..f223d15de62949c8840a0624b8758ade104b4a4f 100644 (file)
@@ -18,9 +18,9 @@ done
 
 if test "$recurse" = "yes"; then
        cwd=`pwd`
-       (set -x; cd $srcdir/libzend; ./configure --cache-file=$cwd/config.cache $@)
+       (set -x; mkdir -p libzend ; cd libzend; $cwd/$srcdir/libzend/configure --cache-file=$cwd/config.cache $@)
        if test "$threadsafe" = "yes"; then
-               (set -x; cd $srcdir/TSRM; ./configure --cache-file=$cwd/config.cache $@)
+               (set -x; mkdir -p TSRM; cd TSRM; $cwd/$srcdir/TSRM/configure --cache-file=$cwd/config.cache $@)
        fi
 fi
 
@@ -83,6 +83,7 @@ dnl## LIBS=$OLDLIBS
 
 AC_PROG_RANLIB
 AC_PROG_CC_C_O
+AC_PROG_LN_S
 AC_PATH_PROG(PERL_PATH, perl)
 
 dnl Ugly hack to get around a problem with gcc on AIX.
@@ -155,7 +156,7 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
        LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
 fi
 
-INCLUDES=""
+INCLUDES="-I\$(top_builddir)/libzend -I\$(top_builddir)/TSRM"
 AC_SUBST(INCLUDES)
 
 AC_CHECK_LIB(nsl, gethostname, [
@@ -874,7 +875,7 @@ PHP_OS=`uname`
 AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS")
 
 AC_OUTPUT(Makefile libphp4.module
-          scripts/mkextlib regex/Makefile ext/Makefile
+          scripts/mkextlib regex/Makefile
           @@EXT_MAKEFILES@@ build-defs.h, [
 ], [