diff options
author | foobar <sniper@php.net> | 2002-04-23 02:58:54 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-04-23 02:58:54 +0000 |
commit | eb18c5c38c9335f48a30aa856aa97ff285dd6aef (patch) | |
tree | 40f0af33266a4fcb38ac62ec6fe10f4aa869eac2 /sapi/apache | |
parent | 50f91c18fb2002e66d3e1fb603320a0ce1d43ade (diff) | |
download | php-git-eb18c5c38c9335f48a30aa856aa97ff285dd6aef.tar.gz |
Part 3 of static apache build fixes:
- Use the PHP_CFLAGS when compiling the php4 module in apache tree.
- Use the apache include dir only when compiling sapi/apache
o Fixes the fnmatch.h issue Wez complained about :)
Diffstat (limited to 'sapi/apache')
-rw-r--r-- | sapi/apache/apMakefile.tmpl | 8 | ||||
-rw-r--r-- | sapi/apache/config.m4 | 17 | ||||
-rw-r--r-- | sapi/apache/libphp4.module.in | 8 |
3 files changed, 17 insertions, 16 deletions
diff --git a/sapi/apache/apMakefile.tmpl b/sapi/apache/apMakefile.tmpl index f77b9975ba..80fe346561 100644 --- a/sapi/apache/apMakefile.tmpl +++ b/sapi/apache/apMakefile.tmpl @@ -34,7 +34,7 @@ libphp4.: $(OBJS) $(OBJS_LIB) # build the shared object library by linking the object files libphp4.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) rm -f $@ - $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) $(LIBS) + $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) $(LIBS) $(PHP_LIBS) # 1. extension .o for shared objects cannot be used here because # first these files aren't still shared objects and second we @@ -45,9 +45,9 @@ libphp4.so: $(SHLIB_OBJS) $(SHLIB_OBJS_LIB) # extension .so-o .SUFFIXES: .o .so-o .c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(SPACER) $< + $(CC) -c $(INCLUDES) $(CFLAGS) $(PHP_CFLAGS) $(CPPFLAGS) $(SPACER) $< .c.so-o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $(CPPFLAGS) $(SPACER) $< && mv $*.o $*.so-o + $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $(PHP_CFLAGS) $(CPPFLAGS) $(SPACER) $< && mv $*.o $*.so-o # cleanup clean: @@ -59,7 +59,7 @@ clean: depend: cp Makefile.tmpl Makefile.tmpl.bak \ && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \ - && gcc -MM $(INCLUDES) $(CFLAGS) $(CPPFLAGS) *.c >> Makefile.new \ + && gcc -MM $(INCLUDES) $(CFLAGS) $(PHP_CFLAGS) $(CPPFLAGS) *.c >> Makefile.new \ && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' Makefile.new \ > Makefile.tmpl \ && rm Makefile.new diff --git a/sapi/apache/config.m4 b/sapi/apache/config.m4 index 94e2652761..497bbeafdd 100644 --- a/sapi/apache/config.m4 +++ b/sapi/apache/config.m4 @@ -42,17 +42,17 @@ AC_ARG_WITH(apxs, *aix*) APXS_LIBEXECDIR=`$APXS -q LIBEXECDIR` EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp" - PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c) + PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) ;; *darwin*) APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET` MH_BUNDLE_FLAGS="-dynamic -twolevel_namespace -bundle -bundle_loader $APXS_HTTPD" PHP_SUBST(MH_BUNDLE_FLAGS) SAPI_SHARED=libs/libphp4.so - PHP_SELECT_SAPI(apache, bundle, sapi_apache.c mod_php4.c php_apache.c) + PHP_SELECT_SAPI(apache, bundle, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) ;; *) - PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c) + PHP_SELECT_SAPI(apache, shared, sapi_apache.c mod_php4.c php_apache.c, -I$APXS_INCLUDEDIR) ;; esac @@ -61,8 +61,6 @@ AC_ARG_WITH(apxs, AC_MSG_ERROR([Use --with-apxs2 with Apache 2.x!]) fi - PHP_ADD_INCLUDE($APXS_INCLUDEDIR) - # Test whether apxs support -S option $APXS -q -S CFLAGS="$APXS_CFLAGS" CFLAGS >/dev/null 2>&1 @@ -101,7 +99,7 @@ AC_ARG_WITH(apache, if test -f $withval/src/httpd.h; then APACHE_INCLUDE=-I$withval/src APACHE_TARGET=$withval/src - PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c) + PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c, $APACHE_INCLUDE) APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_INSTALL_FILES $APACHE_TARGET" PHP_LIBS="-L. -lphp3" AC_MSG_RESULT(yes - Apache 1.2.x) @@ -121,7 +119,7 @@ AC_ARG_WITH(apache, if test ! -d $APACHE_TARGET; then mkdir $APACHE_TARGET fi - PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c) + PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c, $APACHE_INCLUDE) APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir" PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" AC_MSG_RESULT(yes - Apache 1.3.x) @@ -147,7 +145,7 @@ AC_ARG_WITH(apache, if test ! -d $APACHE_TARGET; then mkdir $APACHE_TARGET fi - PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c) + PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c, $APACHE_INCLUDE) PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/sapi/apache/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/sapi/apache/apMakefile.libdir $APACHE_TARGET/Makefile.libdir" AC_MSG_RESULT(yes - Apache 1.3.x) @@ -169,7 +167,7 @@ AC_ARG_WITH(apache, elif test -f $withval/apache/httpd.h; then APACHE_INCLUDE=-"I$withval/apache -I$withval/ssl/include" APACHE_TARGET=$withval/apache - PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c) + PHP_SELECT_SAPI(apache, static, sapi_apache.c mod_php4.c php_apache.c, $APACHE_INCLUDE) PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_STATIC $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET" STRONGHOLD=-DSTRONGHOLD=1 @@ -198,7 +196,6 @@ AC_ARG_WITH(apache, AC_MSG_RESULT(no) ]) - INCLUDES="$INCLUDES $APACHE_INCLUDE" fi if test "x$APXS" != "x" -a "`uname -sv`" = "AIX 4" -a "$GCC" != "yes"; then diff --git a/sapi/apache/libphp4.module.in b/sapi/apache/libphp4.module.in index 277394b722..e296ac2f80 100644 --- a/sapi/apache/libphp4.module.in +++ b/sapi/apache/libphp4.module.in @@ -1,7 +1,11 @@ Name: php4_module ConfigStart RULE_WANTHSREGEX=no - LIBS="@NATIVE_RPATHS@ @PHP_LDFLAGS@ @PHP_LIBS@ @EXTRA_LIBS@ $LIBS" RULE_HIDE=yes - CFLAGS="$CFLAGS -I@abs_srcdir@ -I@abs_srcdir@/main -I@abs_builddir@/main -I@abs_srcdir@/Zend -I@abs_builddir@/Zend -I@abs_builddir@/TSRM -I@abs_srcdir@/TSRM -I@abs_builddir@" + PHP_LIBS="@NATIVE_RPATHS@ @PHP_LDFLAGS@ @PHP_LIBS@ @EXTRA_LIBS@ $LIBS" + PHP_CFLAGS="$CFLAGS -I@OPENSSL_INCDIR@ -I@php_abs_top_srcdir@ -I@php_abs_top_srcdir@/sapi -I@php_abs_top_srcdir@/sapi/apache -I@php_abs_top_srcdir@/main -I@php_abs_top_srcdir@/Zend -I@php_abs_top_srcdir@/TSRM" + my_outfile="Makefile.config" + echo "PHP_CFLAGS=$PHP_CFLAGS" >>$my_outfile + echo "PHP_LIBS=$PHP_LIBS" >>$my_outfile + LIBS=$PHP_LIBS ConfigEnd |