]> granicus.if.org Git - php/commitdiff
* archive-based convenience libraries completely replaced
authorSascha Schumann <sas@php.net>
Mon, 4 Oct 1999 15:18:26 +0000 (15:18 +0000)
committerSascha Schumann <sas@php.net>
Mon, 4 Oct 1999 15:18:26 +0000 (15:18 +0000)
          with libtool components

        * SAPI targets can enable thread-safe mode and define
          shared/static/program build target

        * all configure scripts use the same config.cache

        * phplibdir is $(top_builddir)/modules to avoid
          permission problems

        * sapi/*/Makefile.inc are gone

        * runpath handling cleaned up

        * top-level Makefile.in obsoleted through Makefile.am

        * --enable-versioning uses libtool's cleaner and more
          portable -export-symbols feature

82 files changed:
Makefile.am [new file with mode: 0644]
Makefile.in [deleted file]
acinclude.m4
buildconf
configure.in
ext/Makefile.am
ext/apache/Makefile.am
ext/apache/config.m4
ext/aspell/Makefile.am
ext/bcmath/Makefile.am
ext/dav/Makefile.am
ext/db/Makefile.am
ext/dba/Makefile.am
ext/dbase/Makefile.am
ext/ereg/regex/Makefile.am [new file with mode: 0644]
ext/ereg/regex/Makefile.in [deleted file]
ext/ext_skel
ext/fdf/Makefile.am
ext/filepro/Makefile.am
ext/ftp/Makefile.am
ext/gd/Makefile.am
ext/gd/config.m4
ext/gettext/Makefile.am
ext/hyperwave/Makefile.am
ext/icap/Makefile.am
ext/imap/Makefile.am
ext/informix/Makefile.am
ext/interbase/Makefile.am
ext/ldap/Makefile.am
ext/mcal/Makefile.am
ext/mcrypt/Makefile.am
ext/mhash/Makefile.am
ext/mysql/Makefile.am
ext/mysql/config.m4
ext/mysql/php_mysql.c
ext/mysql/php_mysql.h
ext/oci8/Makefile.am
ext/odbc/Makefile.am
ext/oracle/Makefile.am
ext/pcre/Makefile.am
ext/pcre/config.m4
ext/pcre/config0.m4
ext/pcre/pcrelib/Makefile.am
ext/pdf/Makefile.am
ext/pgsql/Makefile.am
ext/pgsql/config.m4
ext/session/Makefile.am
ext/snmp/Makefile.am
ext/standard/Makefile.am
ext/standard/info.c
ext/sybase/Makefile.am
ext/sybase_ct/Makefile.am
ext/sysvsem/Makefile.am
ext/sysvshm/Makefile.am
ext/wddx/Makefile.am
ext/xml/Makefile.am
ext/xml/config.m4
ext/xml/xml.c
ext/yp/Makefile.am
ext/zlib/Makefile.am
install-sh [deleted file]
php.sym [moved from php.map with 100% similarity]
regex/Makefile.am [new file with mode: 0644]
regex/Makefile.in [deleted file]
sapi/Makefile.am
sapi/README
sapi/aolserver/Makefile.am
sapi/aolserver/Makefile.inc [deleted file]
sapi/aolserver/config.m4
sapi/apache/Makefile.am
sapi/apache/Makefile.inc [deleted file]
sapi/apache/config.m4
sapi/apache/libphp4.module.in
sapi/apache/mod_php4.c
sapi/apache/sapi_apache.c [moved from sapi/apache/apache.c with 100% similarity]
sapi/cgi/Makefile.am
sapi/cgi/Makefile.inc [deleted file]
sapi/isapi/Makefile.inc [deleted file]
sapi/nsapi/Makefile.am
sapi/nsapi/Makefile.inc [deleted file]
sapi/nsapi/config.m4
stub.c [new file with mode: 0644]

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..33e7e81
--- /dev/null
@@ -0,0 +1,42 @@
+AUTOMAKE_OPTIONS = foreign
+
+ZEND_DIR = $(srcdir)/libzend
+SUBDIRS = libzend ext sapi $(TSRM_DIR) regex
+
+CPPFLAGS := $(INCLUDES) -I$(ZEND_DIR) -I$(srcdir)/TSRM
+
+BUILDLDFLAGS = $(EXTRA_LDFLAGS) $(LDFLAGS) $(EXTRA_LIBS)
+
+noinst_LTLIBRARIES = libphp_util.la
+libphp_util_la_SOURCES = \
+       main.c internal_functions.c snprintf.c php3_sprintf.c \
+       configuration-parser.y configuration-scanner.l request_info.c \
+       safe_mode.c fopen-wrappers.c php3_realpath.c alloca.c output.c \
+       php_ini.c SAPI.c rfc1867.c dlist.c php_content_types.c strlcpy.c \
+          strlcat.c
+
+libphp_util_la_LIBADD = libzend/libzend.la \
+               sapi/$(PHP_SAPI)/libphpsapi_$(PHP_SAPI).la \
+               regex/libregex.la $(EXT_LTLIBS) $(TSRM_LIB)
+               
+
+configuration-parser.h configuration-parser.c: configuration-parser.y
+       $(YACC) -p cfg -v -d $< -o configuration-parser.c
+
+configuration-scanner.c: configuration-scanner.l
+       $(LEX) -Pcfg -o$@ -i $<
+
+EXTRA_PROGRAMS = php
+
+phptemp_LTLIBRARIES = libphp4.la
+libphp4_la_SOURCES = stub.c
+libphp4_la_LIBADD = libphp_util.la
+libphp4_la_LDFLAGS = -module -avoid-version $(BUILDLDFLAGS) $(NATIVE_RPATHS)
+
+noinst_PROGRAMS = $(PHP_PROGRAM)
+php_SOURCES = stub.c
+php_LDADD = libphp_util.la
+php_LDFLAGS = -export-dynamic $(BUILDLDFLAGS) $(PHP_RPATHS)
+
+install-data-local:
+       $(INSTALL_IT)
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644 (file)
index ed58bae..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-# +----------------------------------------------------------------------+
-# | PHP HTML Embedded Scripting Language Version 4.0                     |
-# +----------------------------------------------------------------------+
-# | Copyright (c) 1997-1999 PHP Development Team (See Credits file)      |
-# +----------------------------------------------------------------------+
-# | This program is free software; you can redistribute it and/or modify |
-# | it under the terms of one of the following licenses:                 |
-# |                                                                      |
-# |  A) the GNU General Public License as published by the Free Software |
-# |     Foundation; either version 2 of the License, or (at your option) |
-# |     any later version.                                               |
-# |                                                                      |
-# |  B) the PHP License as published by the PHP Development Team and     |
-# |     included in the distribution in the file: LICENSE                |
-# |                                                                      |
-# | This program is distributed in the hope that it will be useful,      |
-# | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
-# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
-# | GNU General Public License for more details.                         |
-# |                                                                      |
-# | You should have received a copy of both licenses referred to here.   |
-# | If you did not, or have any questions about PHP licensing, please    |
-# | contact core@php.net.                                                |
-# +----------------------------------------------------------------------+
-
-#
-# $Id$
-#
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-srcdir = @srcdir@
-VPATH = @srcdir@
-bindir = @bindir@
-
-top_builddir = .
-
-ZEND_DIR = $(srcdir)/libzend
-TSRM_DIR = @TSRM_DIR@
-SUBDIRS=libzend ext $(TSRM_DIR) sapi
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-LN_S = @LN_S@
-CC = @CC@
-AR = ar rc
-PHP_SAPI = @PHP_SAPI@
-SAPI_TARGET = @SAPI_TARGET@
-INSTALL_IT = @INSTALL_IT@
-EXTRA_LIBS = @EXTRA_LIBS@
-EXT_LIBS = @EXT_LIBS@
-INCLUDES = @INCLUDES@
-INCLUDE = -I$(srcdir) -I. -I$(ZEND_DIR) -I$(srcdir)/TSRM $(INCLUDES)
-PROF_CFLAGS =
-CFLAGS_SHLIB = @CFLAGS_SHLIB@
-LDFLAGS_SHLIB = @LDFLAGS_SHLIB@
-LDFLAGS_SHLIB_EXPORT = @LDFLAGS_SHLIB_EXPORT@
-CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@
-VERSION_SCRIPT = @VERSION_SCRIPT@
-RPATHS = @RPATHS@
-CFLAGS = @CFLAGS@ @DEBUG_CFLAGS@ $(PROF_CFLAGS)
-COMPILE = $(CC) $(CFLAGS) $(CFLAGS_SHLIB) $(CPPFLAGS) $(INCLUDE) $(DEFS) @STRONGHOLD@ 
-LDFLAGS = $(VERSION_SCRIPT) $(RPATHS) @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT) -L$(ZEND_DIR)
-REGCFLAGS = $(CFLAGS)
-RANLIB = @RANLIB@
-YACC = @YACC@
-MAINT = @MAINT@
-APXS = @APXS@
-APXS_LDFLAGS = $(EXTRA_LIBS) $(LIBS)
-APXS_EXP = @APXS_EXP@
-WARNING_LEVEL = @WARNING_LEVEL@
-LEX_CFLAGS = -w$(WARNING_LEVEL) @LEX_CFLAGS@
-EXT_SHARED = @EXT_SHARED@
-LIBOBJS = @LIBOBJS@
-REGEX_LIB = @REGEX_LIB@
-FHTTPD_LIB = @FHTTPD_LIB@
-TSRM_LIB = @TSRM_LIB@
-APACHE_INSTALL = @APACHE_INSTALL@
-
-SOURCE = main.c internal_functions.c snprintf.c php3_sprintf.c \
-       configuration-parser.c configuration-scanner.c request_info.c \
-       safe_mode.c fopen-wrappers.c php3_realpath.c alloca.c output.c \
-       php_ini.c SAPI.c rfc1867.c dlist.c php_content_types.c
-
-OBJS = $(SOURCE:.c=.o) $(LIBOBJS)
-PHPLIBS = -Llibzend -lzend -Lext -lphpext
-LIBS = $(PHPLIBS) $(EXTRA_LIBS) @LIBS@
-
-all: $(SAPI_TARGET)
-
-all-recursive clean-recursive distclean-recursive \
-maintainer-clean-depend-recursive:
-       @set fnord $(MAKEFLAGS); amf=$$2; \
-       for subdir in $(SUBDIRS); do \
-               target=`echo $@ | sed s/-recursive//`; \
-               echo "Making $$target in $$subdir"; \
-               (cd $$subdir && $(MAKE) $$target) || fail=yes; \
-       done && test -z "$$fail"
-
-include $(srcdir)/sapi/$(PHP_SAPI)/Makefile.inc
-
-regex/libregex.a:
-       (cd regex; $(MAKE) lib)
-
-configuration-parser.h configuration-parser.c: $(srcdir)/configuration-parser.y
-       bison -p cfg -v -d $(srcdir)/configuration-parser.y -o configuration-parser.c
-
-configuration-scanner.o:       configuration-scanner.c
-       $(COMPILE) $(LEX_CFLAGS) -c configuration-scanner.c
-
-configuration-scanner.c:       $(srcdir)/configuration-scanner.l
-       flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l
-
-clean: clean-recursive
-       -rm -f libphp4.a libmodphp4.a libphp4.so php *.o
-       -rm -f test/php.desc test/php.in test/php.out test/php.test
-       -rm -f test/a.tmp test/b.tmp test/test.dbm*
-
-distclean: clean distclean-recursive
-       -rm -f *-parser.[ch] *-scanner.c *.output
-       -rm -f config.status config.cache config.log
-       -rm -f Makefile Makefile.depend php_config.h build-defs.h
-       -rm -f libphp4.module stamp-h buildconf.stamp
-       -rm -f regex/*.o regex/*.a regex/*.ih
-       -rm -f doc/checkdoc doc/funcparse doc/version.ent
-       -rm -f do-conf test/test.log
-       -rm -f doc/Makefile regex/Makefile
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-
-dist: distdir
-       -chmod -R a+r $(distdir)
-       tar chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
-
-distdir:
-       -rm -rf $(distdir)
-       files=`echo *` ;\
-       mkdir $(distdir) ;\
-       for file in $$files ; do \
-               d=$(srcdir); \
-               if test -d $$d/$$file ; then \
-                       cp -pr $$d/$$file $(distdir)/$$file; \
-               else \
-                       test -f $(distdir)/$$file \
-                       || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-                       || cp -p $$d/$$file $(distdir)/$$file || :; \
-               fi; \
-       done
-       (cd $(distdir) ; $(MAKE) distclean)
-       cd $(distdir)/libzend ;\
-       flex -Pzend -ozend-scanner.c -i zend-scanner.l ;\
-       bison -p zend -v -d zend-parser.y -o zend-parser.c
-       cd $(distdir) ;\
-       flex -Pcfg -oconfiguration-scanner.c -i configuration-scanner.l ;\
-       bison -p cfg -v -d configuration-parser.y -o configuration-parser.c
-       find $(distdir) -name CVS -o -name .cvsignore | xargs rm -rf
-
-maintainer-clean-depend: maintainer-clean-depend-recursive
-
-bench: php
-       ./php -c. tests/bench.phtml
-
-# can't use a single rule for this because 'test' is a directory
-test: regression
-regression check: php
-       cd test && ./testall
-
-config.status: configure
-       ./config.status --recheck
-
-build-defs.h php_config.h: stamp-h
-stamp-h: php_config.h.in config.status
-       CONFIG_FILES='build-defs.h stamp-h' ./config.status
-
-Makefile: Makefile.in config.status
-       CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
-
-#
-# You must use '--enable-maintainer-mode' with configure to enable
-# these rules, which requires autoconf be installed.
-#
-configure: @MAINT@ configure.in aclocal.m4
-       cd $(srcdir) && autoconf
-
-php_config.h.in: @MAINT@ stamp-h.in
-stamp-h.in: configure.in aclocal.m4 acconfig.h
-       cd ${srcdir} && autoheader && touch ${srcdir}/stamp-h.in
-
-install: install-recursive $(SAPI_TARGET)
-       $(INSTALL_IT)
-
-install-recursive:
-       if test "$(EXT_SHARED)" != ""; then \
-               for dir in X $(EXT_SHARED); do \
-                       test -d ext/$$dir && (cd ext/$$dir; $(MAKE) install); \
-               done; \
-       fi
-
-indent:        clean
-       indent -v -kr -cli4 -ts4 \
-       -T pval -T HashTable -T Bucket -T Token -T TokenCache -T TokenCacheManager \
-       -T switch_expr -T internal_function -T control_structure_data \
-       -T MemoryHashTable -T MemoryBucket \
-       -T pvalue_value -T Stack *.c *.h
-       rm -f *~
-
-.c.o:
-       $(COMPILE) -c $< 
-
-parser-scanner:        configuration-parser.c configuration-scanner.c
-
-depend:        parser-scanner
-       $(CC) $(CFLAGS) -MM $(SOURCE) | perl -pe 's|regex/regex.h||;' > Makefile.depend
-       $(CC) $(CFLAGS) -MM $(FUNCTIONS_SOURCE) | perl -pe 's|^(.+\.o)|functions/$$1|; s|regex/regex.h||;' >> Makefile.depend
-
-# Local Variables:
-# tab-width: 4
-# End:
index 85d804ebc1ee747e383ed9dbd9b3e0b360f1ac55..b2d87256fce909a8aafaa30792ad73f4e8830876 100644 (file)
@@ -2,6 +2,27 @@ dnl $Id$
 dnl
 dnl This file contains local autoconf functions.
 
+dnl
+dnl PHP_BUILD_SHARED
+dnl
+AC_DEFUN(PHP_BUILD_SHARED,[
+  php_build_target=shared
+])
+
+dnl
+dnl PHP_BUILD_STATIC
+dnl
+AC_DEFUN(PHP_BUILD_STATIC,[
+  php_build_target=static
+])
+
+dnl
+dnl PHP_BUILD_PROGRAM
+dnl
+AC_DEFUN(PHP_BUILD_PROGRAM,[
+  php_build_target=program
+])
+
 dnl
 dnl AC_PHP_ONCE(namespace, variable, code)
 dnl
@@ -51,15 +72,12 @@ dnl builds RPATH from PHP_RPATHS
 dnl
 AC_DEFUN(AC_BUILD_RPATH,[
   if test "$enable_rpath" = "yes" && test -n "$PHP_RPATHS"; then
-    if test -n "$APXS"; then
-      for i in $PHP_RPATHS; do
-        RPATHS="$RPATHS ${apxs_runpath_switch}$i'"
-      done
-    else
-      for i in $PHP_RPATHS; do
-        RPATHS="$RPATHS ${ld_runpath_switch}$i"
-      done
-    fi
+    OLD_RPATHS="$PHP_RPATHS"
+       PHP_RPATHS=""
+       for i in $OLD_RPATHS; do
+           PHP_RPATHS="$PHP_RPATHS -R $i"
+        NATIVE_RPATHS="$NATIVE_RPATHS ${ld_runpath_switch}$i"
+         done
   fi
 ])
 
@@ -172,7 +190,8 @@ AC_DEFUN(PHP_EXTENSION,[
     EXT_SUBDIRS="$EXT_SUBDIRS $1"
     if test "$2" != "shared" -a "$2" != "yes"; then
       _extlib="libphpext_$1.a"
-      EXT_LIBS="$EXT_LIBS $1/$_extlib"
+      EXT_LTLIBS="$EXT_LTLIBS ext/$1/libphpext_$1.la"
+         EXT_LIBS="$EXT_LIBS $1/$_extlib"
       EXT_STATIC="$EXT_STATIC $1"
     else
       EXT_SHARED="$EXT_SHARED $1"
@@ -185,6 +204,7 @@ AC_SUBST(EXT_SUBDIRS)
 AC_SUBST(EXT_STATIC)
 AC_SUBST(EXT_SHARED)
 AC_SUBST(EXT_LIBS)
+AC_SUBST(EXT_LTLIBS)
 
 dnl
 dnl Solaris requires main code to be position independent in order
index baf5b935891930746556d635e4e5d85846c9b6c5..4b573b99775c8840944aaf0521864c3a96be0891 100755 (executable)
--- a/buildconf
+++ b/buildconf
@@ -150,6 +150,6 @@ else
 fi
 
 if test "$supplied_flag" != "--local"; then
-  (cd libzend; ./buildconf libzend/)
-  (cd TSRM; ./buildconf TSRM/)
+  (cd libzend; ./buildconf $automake_flags libzend/)
+  (cd TSRM; ./buildconf $automake_flags TSRM/)
 fi
index 75a8594bea245510663ef0e3cf9c558220bccb0a..035e7f12ad31f533ac5e81c8715964188230d341 100644 (file)
@@ -12,14 +12,8 @@ if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
   exit 1
 fi
 
-if test "$no_recursion" != "yes"; then
-       cwd=`pwd`
-       (set -x; test -d libzend || mkdir libzend; cd libzend; $cwd/$srcdir/libzend/configure --cache-file=$cache_file $@) || exit 1
-       if test "$enable_thread_safety" = "yes"; then
-               (set -x; test -d TSRM || mkdir TSRM; cd TSRM && $cwd/$srcdir/TSRM/configure --cache-file=$cache_file $@) || exit 1
-       fi
-       (set -x; cd $srcdir; sh ltconfig --disable-static --enable-dlopen --cache-file=$cache_file ltmain.sh)
-fi
+cwd=`pwd`
+passthru="$@"
 
 dnl ## Diversion 1 is the initial checking of OS features, programs,
 dnl ## libraries and so on.
@@ -69,8 +63,6 @@ dnl   test -n "$GCC" || CFLAGS="-Ae $CFLAGS -D_HPUX_SOURCE"
 dnl fi
 
 dnl Checks for programs.
-AM_PROG_LIBTOOL
-AM_SET_LIBTOOL_VARIABLE([--silent])
 AC_PROG_YACC
 if test "$YACC" != "bison -y"; then
     AC_MSG_WARN(You will need bison if you want to regenerate the PHP parsers.)
@@ -97,6 +89,7 @@ AC_PROG_CC_C_O
 AC_PROG_LN_S
 AC_PATH_PROG(PERL_PATH, perl)
 
+AM_PROG_LEX
 
 dnl Make flex scanners use const if they can, even if __STDC__ is not
 dnl true, for compilers like Sun's that only set __STDC__ true in
@@ -129,7 +122,6 @@ AC_CACHE_VAL(php_cv_cc_dashr,[
 AC_MSG_RESULT($php_cv_cc_dashr)
 if test $php_cv_cc_dashr = "yes"; then
        ld_runpath_switch="-R"
-       apxs_runpath_switch="-Wl,-R'"
 else
        AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
        AC_CACHE_VAL(php_cv_cc_rpath,[
@@ -140,42 +132,12 @@ else
        AC_MSG_RESULT($php_cv_cc_rpath)
        if test $php_cv_cc_rpath = "yes"; then
                ld_runpath_switch="-Wl,-rpath,"
-               apxs_runpath_switch="-Wl,'-rpath "
        else
                dnl something innocuous
                ld_runpath_switch="-L"
-               apxs_runpath_switch="-L'"
        fi
 fi
 
-AC_MSG_CHECKING([if compiler supports -Wl,--version-script])
-AC_CACHE_VAL(php_cv_cc_vscript,[
-               SLIBS=$LIBS
-               LIBS="-Wl,--version-script=$srcdir/php.map $LIBS"
-               AC_TRY_LINK([],[],php_cv_cc_vscript=yes,php_cv_cc_vscript=no)
-               LIBS=$SLIBS ])
-AC_MSG_RESULT($php_cv_cc_vscript)
-
-
-dnl Check compiler support for -rdynamic
-AC_MSG_CHECKING(if compiler supports -rdynamic)
-AC_CACHE_VAL(php_cc_rdynamic,[
-       SAVE_LIBS="${LIBS}"
-       LIBS="-rdynamic ${LIBS}"
-       AC_TRY_LINK([], [], php_cc_rdynamic=yes, php_cc_rdynamic=no)
-       LIBS="${SAVE_LIBS}"])
-AC_MSG_RESULT($php_cc_rdynamic)
-if test $php_cc_rdynamic = "yes"; then
-  AC_CHECK_CC_OPTION(rdynamic)
-fi
-if test $php_cc_rdynamic = "yes"; then
-       LDFLAGS="${LDFLAGS} -rdynamic"
-       RDYNAMIC_LFLAGS="-rdynamic"
-else
-       RDYNAMIC_LFLAGS=""
-fi
-AC_SUBST(RDYNAMIC_LFLAGS)
-
 dnl AC_PROG_INSTALL
 AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib)
 if test -n "$PROG_SENDMAIL"; then
@@ -192,7 +154,6 @@ if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
 fi
 
 INCLUDES="-I\$(top_builddir)/libzend -I\$(top_builddir)/TSRM"
-EXTRA_LIBS="$EXTRA_LIBS \`$cwd/libzend/zend_config --libs\`"
 AC_SUBST(INCLUDES)
 
 AC_CHECK_LIB(nsl, gethostname, [
@@ -410,30 +371,18 @@ abs_builddir=`pwd`
 AC_SUBST(abs_srcdir)
 AC_SUBST(abs_builddir)
 
-versioning="no"
+RESULT=no
 AC_MSG_CHECKING(whether to enable versioning)
 AC_ARG_ENABLE(versioning,
 [  --enable-versioning     Take advantage of versioning and scoping.
                           See INSTALL for more information],
 [
   if test "$enableval" = "yes" ; then
-    case "`uname -sr`" in
-    "SunOS 5"*)
-        VERSION_SCRIPT="-Wl,'-M $abs_srcdir/php.map'"
-    ;;
-    *)
-               if test "$php_cv_cc_vscript" = "yes" ; then
-          VERSION_SCRIPT="-Wl,--version-script=$abs_srcdir/php.map"
-               else 
-          AC_MSG_ERROR(versioning is not supported on your OS)
-           fi
-    ;;
-    esac
-    versioning="yes"
+    EXTRA_LDFLAGS="-export-symbols \$(srcdir)/php.sym"
+    RESULT="yes"
   fi
 ])
-AC_MSG_RESULT($versioning)
-AC_SUBST(VERSION_SCRIPT)
+AC_MSG_RESULT($RESULT)
 
 AC_MSG_CHECKING(whether to use bundled regex library)
 AC_ARG_WITH(system-regex,
@@ -466,8 +415,7 @@ AC_ARG_WITH(system-regex,
 AC_MSG_RESULT($HSREGEX)
 
 if test "$HSREGEX" = "yes"; then
-  REGEX_LIB=regex/libregex.a
-  EXTRA_LIBS="-L$abs_builddir/regex -lregex $EXTRA_LIBS"
+  REGEX_LIB=regex/libregex.la
   AC_DEFINE(HSREGEX)
   AC_DEFINE(REGEX,1)
 else
@@ -610,26 +558,6 @@ AC_ARG_ENABLE(magic-quotes,
 ]) 
 
 
-AC_MSG_CHECKING(whether to build PHP thread-safe)
-AC_ARG_ENABLE(thread-safety,
-[  --enable-thread-safety  Whether to build PHP thread-safe.],[
-  if test "$enableval" = "yes"; then
-    TSRM_LIB='TSRM/libtsrm.a'
-    TSRM_DIR=TSRM
-    EXTRA_LIBS="$EXTRA_LIBS \$(TSRM_DIR)/libtsrm.a \`\$(TSRM_DIR)/tsrm_config --libs\`"
-    AC_DEFINE(ZTS)
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_RESULT(no)
-  fi
-],[
-  TSRM_DIR=""
-  TSRM_LIB=""
-  AC_MSG_RESULT(no)
-])
-AC_SUBST(TSRM_DIR)
-AC_SUBST(TSRM_LIB)
-
 AC_MSG_CHECKING(whether to enable runpaths)
 AC_ARG_ENABLE(rpath,
 [  --disable-rpath         Disable passing additional runtime library
@@ -696,12 +624,14 @@ AC_MSG_RESULT($DMALLOC_RESULT)
 dnl ## This is the default server API.
 PHP_SAPI=cgi
 SAPI_TARGET=php
+PHP_BUILD_PROGRAM
 
 esyscmd(./scripts/config-stubs sapi)
 
 divert(3)
 
 AC_SUBST(EXTRA_LIBS)
+AC_SUBST(EXTRA_LDFLAGS)
 
 # reading config stubs
 esyscmd(./scripts/config-stubs ext)
@@ -710,9 +640,54 @@ PHP_OUTPUT(sapi/$PHP_SAPI/Makefile)
 
 divert(4)
 
+enable_shared=yes
+enable_static=yes
+
+case "$php_build_target" in
+program)
+       enable_static=no
+    PHP_PROGRAM=php
+       passthru="$passthru --disable-static"
+;;
+shared)
+       enable_static=no
+    passthru="$passthru --disable-static"
+;;
+static)
+       enable_shared=no
+       passthru="$passthru --disable-shared"
+;;
+esac
+
+
+
+AM_PROG_LIBTOOL
+if test "$enable_debug" != "yes"; then
+  AM_SET_LIBTOOL_VARIABLE([--silent])
+fi
+
 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"
 
+AC_MSG_CHECKING(whether to build PHP thread-safe)
+AC_ARG_ENABLE(thread-safety,
+[  --enable-thread-safety  Whether to build PHP thread-safe.],[
+  if test "$enableval" = "yes"; then
+    TSRM_LIB='TSRM/libtsrm.la'
+    TSRM_DIR=TSRM
+    AC_DEFINE(ZTS)
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+  fi
+],[
+  TSRM_DIR=""
+  TSRM_LIB=""
+  AC_MSG_RESULT(no)
+])
+AC_SUBST(TSRM_DIR)
+AC_SUBST(TSRM_LIB)
+
 dnl *** Commented out - generates slow code and consumes a lot of 
 dnl *** resources during compilation - we need to figure out how
 dnl *** to supply it only when absolutely necessary
@@ -720,16 +695,23 @@ dnl If we are using gcc add -fpic to make dl() work on some platforms
 dnl test -n "$GCC" && CFLAGS="$CFLAGS -fpic"
 
 dnl add -fPIC option on Solaris if we are building dynamic extensions
-PHP_SOLARIS_PIC_WEIRDNESS
+dnl PHP_SOLARIS_PIC_WEIRDNESS
 
 AC_BUILD_RPATH
 
+phplibdir="`pwd`/modules"
+phptempdir="`pwd`/libs"
+AC_SUBST(phplibdir)
+AC_SUBST(phptempdir)
+LDFLAGS="$LDFLAGS -module"
+EXTRA_LIBS="$LIBS $EXTRA_LIBS"
+LIBS=""
+
 AC_SUBST(CFLAGS)
 AC_SUBST(PROG_SENDMAIL)
-AC_SUBST(CFLAGS_SHLIB)
-AC_SUBST(LDFLAGS_SHLIB)
-AC_SUBST(LDFLAGS_SHLIB_EXPORT)
-AC_SUBST(RPATHS)
+AC_SUBST(PHP_RPATHS)
+AC_SUBST(NATIVE_RPATHS)
+AC_SUBST(PHP_PROGRAM)
        
 PHP_BUILD_DATE=`date '+%Y-%m-%d'`
 AC_SUBST(PHP_BUILD_DATE)
@@ -741,7 +723,9 @@ AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS")
 
 AC_SUBST(PHP_LIBS)
 AC_SUBST(PHP_SAPI)
-AC_SUBST(SAPI_TARGET)
+AC_SUBST(INSTALL_IT)
+
+PHP_OUTPUT_FILES=`echo $PHP_OUTPUT_FILES | sort`
 
 #libphp4.module 
 AC_OUTPUT([Makefile php4.spec ext/Makefile sapi/Makefile $PHP_OUTPUT_FILES
@@ -754,6 +738,14 @@ if test ! -f $srcdir/ext/bcmath/number.c; then
        echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
 fi
 
+if test "$no_recursion" != "yes"; then
+       (set -x; test -d libzend || mkdir libzend; cd libzend; $cwd/$srcdir/libzend/configure --cache-file=../$cache_file $passthru) || exit 1
+       if test "$enable_thread_safety" = "yes"; then
+               (set -x; test -d TSRM || mkdir TSRM; cd TSRM && $cwd/$srcdir/TSRM/configure --cache-file=../$cache_file $passthru) || exit 1
+       fi
+dnl    (set -x; cd $srcdir; sh ltconfig --disable-static --enable-dlopen --cache-file=$cache_file ltmain.sh)
+fi
+
 # run this only when generating all the files?
 if true; then
   chmod +x scripts/mkextlib
index 88330232264508bd980dcce4377d83ec3e34918a..49372bc0d392eb7af1065a9ea9e14e1f6458d016 100644 (file)
@@ -1,10 +1,4 @@
 ## Process this file with automake to produce Makefile.in
 
 SUBDIRS = @EXT_SUBDIRS@
-EXT_STATIC = @EXT_STATIC@
 
-noinst_LIBRARIES=libphpext.a
-
-libphpext.a: @EXT_LIBS@
-       top_srcdir=$(top_srcdir) $(top_builddir)/scripts/mkextlib $@ $(EXT_STATIC)
-       @test "`uname -s`" = "Rhapsody" && $(RANLIB) $@ || exit 0
index c9006e13bb8c9f0f71475490d978f8c32353a901..9a7d7ab1b356bf5d3885ab733b45bd2c98bab8cc 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_apache.a
-libphpext_apache_a_SOURCES=apache.c
+noinst_LTLIBRARIES=libphpext_apache.la
+libphpext_apache_la_SOURCES=apache.c
 
index e878cdbb8b72140ad402d553726939d527c43fe2..88575c9e9854cadfa038ae280213b3d84ce4046e 100644 (file)
@@ -1,5 +1,2 @@
 dnl $Id$
 
-if test -n "$APACHE_INCLUDE"; then
-    PHP_EXTENSION(apache)
-fi
index 2d739171f72413b156ae3b66e09e4e955e2f25ae..f352b50b58540107b872e0189a9e9772147b4ec1 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_aspell.a
-libphpext_aspell_a_SOURCES=aspell.c
+noinst_LTLIBRARIES=libphpext_aspell.la
+libphpext_aspell_la_SOURCES=aspell.c
 
index b5f9acdee07240b5d1eb9097fefb9a77b7474c89..e73bafce78ed7dfe09a97c665f03b73a629ce4b7 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_bcmath.a
-libphpext_bcmath_a_SOURCES=bcmath.c number.c
+noinst_LTLIBRARIES=libphpext_bcmath.la
+libphpext_bcmath_la_SOURCES=bcmath.c number.c
index 58f9fe10097559a9bd256d74a28fd4dc2f794282..3b9e629ceafdc61f6a38cb23dce0e5246a7ac0bc 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_dav.a
-libphpext_dav_a_SOURCES=dav.c
+noinst_LTLIBRARIES=libphpext_dav.la
+libphpext_dav_la_SOURCES=dav.c
 
index c9dbfa4872628c0549eaef6fd9fc98765add9c5f..71d2ea180b9919aeb859354142558a73e655e577 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_db.a
-libphpext_db_a_SOURCES=db.c
+noinst_LTLIBRARIES=libphpext_db.la
+libphpext_db_la_SOURCES=db.c
 
index b609be3bf3ffbc7531a293ae1b370fb354ee0d4f..2c36702cd155956a7d7e6b8282027e3497e3d7de 100644 (file)
@@ -1,7 +1,7 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_dba.a
-libphpext_dba_a_SOURCES=dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c \
+noinst_LTLIBRARIES=libphpext_dba.la
+libphpext_dba_la_SOURCES=dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c \
                dba_ndbm.c
 
index c04a5ccb869399df704ba89960f0bdd7178420e9..d9ce4aa738fe793ceda967cc2b918ac7459a6929 100644 (file)
@@ -1,5 +1,5 @@
 ## Process this file with automake to produce Makefile.in -*- makefile -*-
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_dbase.a
-libphpext_dbase_a_SOURCES=dbf_head.c dbf_rec.c dbf_misc.c dbf_ndx.c dbase.c
+noinst_LTLIBRARIES=libphpext_dbase.la
+libphpext_dbase_la_SOURCES=dbf_head.c dbf_rec.c dbf_misc.c dbf_ndx.c dbase.c
 
diff --git a/ext/ereg/regex/Makefile.am b/ext/ereg/regex/Makefile.am
new file mode 100644 (file)
index 0000000..993db56
--- /dev/null
@@ -0,0 +1,3 @@
+noinst_LTLIBRARIES = libregex.la
+
+libregex_la_SOURCES = regcomp.c regexec.c regerror.c regfree.c
diff --git a/ext/ereg/regex/Makefile.in b/ext/ereg/regex/Makefile.in
deleted file mode 100644 (file)
index 4561974..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-SHELL = /bin/sh
-
-srcdir=@srcdir@
-VPATH=@srcdir@
-
-CC=@CC@
-RANLIB=@RANLIB@
-
-# You probably want to take -DREDEBUG out of CFLAGS, and put something like
-# -O in, *after* testing (-DREDEBUG strengthens testing by enabling a lot of
-# internal assertion checking and some debugging facilities).
-# Put -Dconst= in for a pre-ANSI compiler.
-# Do not take -DPOSIX_MISTAKE out.
-# REGCFLAGS isn't important to you (it's for my use in some special contexts).
-CFLAGS=@CFLAGS@
-COMPILE=$(CC) $(CFLAGS) -I$(srcdir) -I. -DPOSIX_MISTAKE
-
-# If you have a pre-ANSI compiler, put -o into MKHFLAGS.  If you want
-# the Berkeley __P macro, put -b in.
-MKHFLAGS=
-
-# Flags for linking but not compiling, if any.
-LDFLAGS=@LDFLAGS@
-
-# Extra libraries for linking, if any.
-LIBS=
-
-# Internal stuff, should not need changing.
-OBJPRODN=regcomp.o regexec.o regerror.o regfree.o
-OBJS=$(OBJPRODN) split.o debug.o main.o
-H=cclass.h cname.h regex2.h utils.h
-REGSRC=regcomp.c regerror.c regexec.c regfree.c
-ALLSRC=$(REGSRC) engine.c debug.c main.c split.c
-
-# Stuff that matters only if you're trying to lint the package.
-LINTFLAGS=-I. -Dstatic= -Dconst= -DREDEBUG
-LINTC=regcomp.c regexec.c regerror.c regfree.c debug.c main.c
-JUNKLINT=possible pointer alignment|null effect
-
-# arrangements to build forward-reference header files
-.SUFFIXES:     .ih .h
-.c.ih:
-       sh $(srcdir)/mkh $(MKHFLAGS) -p $< >$@
-
-.c.o:
-       $(COMPILE) -c $<
-
-all lib: libregex.a
-
-libregex.a: $(OBJPRODN)
-       rm -f libregex.a
-       ar cr libregex.a $(OBJPRODN)
-       $(RANLIB) libregex.a
-
-default:       r
-
-purge:
-       rm -f *.o
-
-# stuff to build regex.h
-REGEXH=regex.h
-REGEXHSRC=regex2.h $(REGSRC)
-$(REGEXH):     $(REGEXHSRC) mkh
-       sh $(srcdir)/./mkh $(MKHFLAGS) -i _REGEX_H_ $(REGEXHSRC) >regex.h
-       #cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h
-       #rm -f regex.tmp
-
-# dependencies
-$(OBJPRODN) debug.o:   utils.h regex.h regex2.h
-regcomp.o:     cclass.h cname.h regcomp.ih
-regexec.o:     engine.c engine.ih
-regerror.o:    regerror.ih
-debug.o:       debug.ih
-main.o:        main.ih
-
-# tester
-re:    $(OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
-
-# regression test
-r:     re tests
-       ./re <tests
-       ./re -el <tests
-       ./re -er <tests
-
-# 57 variants, and other stuff, for development use -- not useful to you
-ra:    ./re tests
-       -./re <tests
-       -./re -el <tests
-       -./re -er <tests
-
-rx:    ./re tests
-       ./re -x <tests
-       ./re -x -el <tests
-       ./re -x -er <tests
-
-t:     ./re tests
-       -time ./re <tests
-       -time ./re -cs <tests
-       -time ./re -el <tests
-       -time ./re -cs -el <tests
-
-l:     $(LINTC)
-       lint $(LINTFLAGS) -h $(LINTC) 2>&1 | egrep -v '$(JUNKLINT)' | tee lint
-
-fullprint:
-       ti README WHATSNEW notes todo | list
-       ti *.h | list
-       list *.c
-       list regex.3 regex.7
-
-print:
-       ti README WHATSNEW notes todo | list
-       ti *.h | list
-       list reg*.c engine.c
-
-
-mf.tmp:        Makefile
-       sed '/^REGEXH=/s/=.*/=regex.h/' Makefile | sed '/#DEL$$/d' >$@
-
-DTRH=cclass.h cname.h regex2.h utils.h
-PRE=COPYRIGHT README WHATSNEW
-POST=mkh regex.3 regex.7 tests $(DTRH) $(ALLSRC) fake/*.[ch]
-FILES=$(PRE) Makefile $(POST)
-DTR=$(PRE) Makefile=mf.tmp $(POST)
-dtr:   $(FILES) mf.tmp
-       makedtr $(DTR) >$@
-       rm mf.tmp
-
-cio:   $(FILES)
-       cio $(FILES)
-
-rdf:   $(FILES)
-       rcsdiff -c $(FILES) 2>&1 | p
-
-# various forms of cleanup
-tidy:
-       rm -f junk* core core.* *.core dtr *.tmp lint
-
-clean: tidy
-       rm -f *.o *.s re libregex.a
-
-# don't do this one unless you know what you're doing
-spotless:      clean
-       rm -f mkh regex.h
index 85f61a077b7c1bb0a1a0eb2cd92a3f25b9dbb479..3b077c1eab1277d74b16c8b84fde447abf77118f 100755 (executable)
@@ -47,8 +47,8 @@ cat >Makefile.am <<eof
 # \$Id\$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_$extname.a
-libphpext_${extname}_a_SOURCES=$extname.c
+noinst_LTLIBRARIES=libphpext_$extname.la
+libphpext_${extname}_la_SOURCES=$extname.c
 
 eof
 
index 91e9efef83b36670f53b89f7baaaf7f897e636a4..2dd7234f8144dc36586b0c96fa467879846bbcc0 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_fdf.a
-libphpext_fdf_a_SOURCES=fdf.c
+noinst_LTLIBRARIES=libphpext_fdf.la
+libphpext_fdf_la_SOURCES=fdf.c
 
index ff539050be652fa3a3308981b0ead132be368638..78e397fa29f8a454a086905891513e623a50e604 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_filepro.a
-libphpext_filepro_a_SOURCES=filepro.c
+noinst_LTLIBRARIES=libphpext_filepro.la
+libphpext_filepro_la_SOURCES=filepro.c
 
index ea032672b0cae6167dd9afa038b939f74fcc50d5..11f1ce57429fe7fedd7bd13cc73f0df698bcbad1 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_ftp.a
-libphpext_ftp_a_SOURCES=php_ftp.c ftp.c
+noinst_LTLIBRARIES=libphpext_ftp.la
+libphpext_ftp_la_SOURCES=php_ftp.c ftp.c
index 6483056bfa022ffe74a67e7a7e59867b4be97840..d76712056452e8ab8672cfc950ac5fc4d6924c78 100644 (file)
@@ -1,15 +1,12 @@
 ## Process this file with automake to produce Makefile.in
 
-phplibdir=$(libdir)/php
-
 SRC=gd.c gdcache.c gdttf.c
 INCLUDES=@INCLUDES@ @GD_INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=@GD_STATIC@
-EXTRA_LIBRARIES=libphpext_gd.a
-libphpext_gd_a_SOURCES=$(SRC)
+noinst_LTLIBRARIES=@GD_STATIC@
+EXTRA_LTLIBRARIES=libphpext_gd.la gd.la
+libphpext_gd_la_SOURCES=$(SRC)
 
 phplib_LTLIBRARIES=@GD_SHARED@
-EXTRA_LTLIBRARIES=gd.la
 gd_la_SOURCES=$(SRC)
 gd_la_LIBADD=@GD_LFLAGS@ @GD_LIBS@
 gd_la_LDFLAGS=-avoid-version -module -rpath $(phplibdir)
index 50fdafc4d91984bf5571c3be6760ffcbec983324..60ff62931198332da53dd21ce79fca08d6285135 100644 (file)
@@ -139,7 +139,7 @@ if test "$ac_cv_lib_gd_gdImageLine" = "yes"; then
   PHP_EXTENSION(gd, $shared)
   if test "$shared" != "yes"; then
     AC_ADD_INCLUDE($GD_INCLUDE)
-    GD_STATIC="libphpext_gd.a"
+    GD_STATIC="libphpext_gd.la"
   else 
     AC_EXPAND_PATH($GD_INCLUDE, GD_INCLUDE)
     if test -n "$GD_INCLUDE"; then
index 295ca2c8896d355e0ab168e16fe84946f7ebb548..a5b29b6cd55562072f81ad96599f1eae59682f1b 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_gettext.a
-libphpext_gettext_a_SOURCES=gettext.c
+noinst_LTLIBRARIES=libphpext_gettext.la
+libphpext_gettext_la_SOURCES=gettext.c
 
index c5be33e128e426dae7c42a3c15ba15ae208e3724..3b92146327aee12ab4974978b98ffdbdde9ce8e0 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_hyperwave.a
-libphpext_hyperwave_a_SOURCES=hw.c hg_comm.c
+noinst_LTLIBRARIES=libphpext_hyperwave.la
+libphpext_hyperwave_la_SOURCES=hw.c hg_comm.c
 
index 3322c1ccf83855070e7a0448e5ada5891bed1aa3..964fd7de0a59e6c3fd077f95c461f23d7ff81327 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_icap.a
-libphpext_icap_a_SOURCES=php3_icap.c
+noinst_LTLIBRARIES=libphpext_icap.la
+libphpext_icap_la_SOURCES=php3_icap.c
 
index 51e264146451522793f10d660d92aadb1f8bb312..5ab4011b34fde54c5bc2aa0b3c60940f4773d6ea 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_imap.a
-libphpext_imap_a_SOURCES=imap.c
+noinst_LTLIBRARIES=libphpext_imap.la
+libphpext_imap_la_SOURCES=imap.c
 
index 18b8a4fd0855d56305486d251bedaa82734be496..2cafd8c3c2e71cc81ee327fe24a8d8ab4ae36bee 100644 (file)
@@ -1,8 +1,8 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_informix.a
-libphpext_informix_a_SOURCES=ifx.c
+noinst_LTLIBRARIES=libphpext_informix.la
+libphpext_informix_la_SOURCES=ifx.c
 
 ifx.c: ifx.ec
        (if test -d @INFORMIXDIR@; then \
index 494e3b9ef919fd3eb7a64aff209cf114bb07265a..fd0e7fdfdf2b6b2c0aa2647c8d82949ba7dd75f0 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_interbase.a
-libphpext_interbase_a_SOURCES=interbase.c
+noinst_LTLIBRARIES=libphpext_interbase.la
+libphpext_interbase_la_SOURCES=interbase.c
 
index ca395117577b78e5217dcc43832b3218b6067ecd..cf5d5d241b86b3480f6a7d93cd362aee0c6e5da4 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_ldap.a
-libphpext_ldap_a_SOURCES=ldap.c
+noinst_LTLIBRARIES=libphpext_ldap.la
+libphpext_ldap_la_SOURCES=ldap.c
 
index 3ee9cdd58f8c9cdac48f267841a140e97486d435..ce59b52e196c885529847be39c25b7d2ce608fe3 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_mcal.a
-libphpext_mcal_a_SOURCES=php3_mcal.c
+noinst_LTLIBRARIES=libphpext_mcal.la
+libphpext_mcal_la_SOURCES=php3_mcal.c
 
index 01baf80148a4321b408106c1f5e1e6414fcd8003..aaaee46d69682fcfdf0a744e107083362d646e91 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_mcrypt.a
-libphpext_mcrypt_a_SOURCES=mcrypt.c
+noinst_LTLIBRARIES=libphpext_mcrypt.la
+libphpext_mcrypt_la_SOURCES=mcrypt.c
 
index 18be9497daa6211747e60ed55dc55b94298f2ad4..792f7be6e01c7eee19661a06ff526c2f323580d7 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_mhash.a
-libphpext_mhash_a_SOURCES=mhash.c
+noinst_LTLIBRARIES=libphpext_mhash.la
+libphpext_mhash_la_SOURCES=mhash.c
 
index f035f76af9bd2055c451c552f1a4ac1beaca6445..0bf2a7ddeb438860f6953a91fd5d7fdc1e3bcf2c 100644 (file)
@@ -1,14 +1,12 @@
 # $Id$
 
-phplibdir=$(libdir)/php
-
 SRC=php_mysql.c
 INCLUDES=@INCLUDES@ @MYSQL_INCLUDE@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=@MYSQL_STATIC@
-EXTRA_LIBRARIES=libphpext_mysql.a
-libphpext_mysql_a_SOURCES=$(SRC)
+noinst_LTLIBRARIES=@MYSQL_STATIC@
+EXTRA_LTLIBRARIES=libphpext_mysql.la mysql.la
+libphpext_mysql_la_SOURCES=$(SRC)
+
 phplib_LTLIBRARIES=@MYSQL_SHARED@
-EXTRA_LTLIBRARIES=mysql.la
 mysql_la_SOURCES=$(SRC)
 mysql_la_LIBADD=@MYSQL_LFLAGS@ -lmysqlclient
 mysql_la_LDFLAGS=-avoid-version -module -rpath $(phplibdir)
index ceda6acf4b674238bb400dbe3bbab8b3246d1722..e90083535965782f67ac0adb35b2af45cb59bc1c 100644 (file)
@@ -57,7 +57,7 @@ AC_ARG_WITH(mysql,
             AC_MSG_RESULT(yes (static))
             AC_ADD_LIBRARY_WITH_PATH(mysqlclient, $MYSQL_LIBDIR)
             AC_ADD_INCLUDE($MYSQL_INCDIR)
-            MYSQL_STATIC="libphpext_mysql.a"
+            MYSQL_STATIC="libphpext_mysql.la"
         fi
         PHP_EXTENSION(mysql, $shared)
 
index 0a686149d831c85d71cea9f85710d4a1fbb36a07..7302599067118dc61ca648f75fa7c753b9afd015 100644 (file)
  * ? Safe mode implementation
  */
 
-#ifdef PIC
-# define COMPILE_DL 1
-#endif
-
 #if COMPILE_DL
 #include "dl/phpdl.h"
 #endif
index 0dc55a4076ace6ff60fc32781185c6e77513c81f..80bd0d679304f0e4e6336b346064d041d0033ee2 100644 (file)
@@ -38,7 +38,7 @@
 #define DLEXPORT
 #endif
 
-#ifdef ZTS
+#ifdef __ZTS
 #include "TSRM.h"
 #endif
 
index 869389438835f588f0a22516bb6d1b2c5c389374..30ad74dabcfea51c5800183951aef17ca3d9e844 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_oci8.a
-libphpext_oci8_a_SOURCES=oci8.c
+noinst_LTLIBRARIES=libphpext_oci8.la
+libphpext_oci8_la_SOURCES=oci8.c
 
index 3daf4a20ec6bead94c0be66a3fd41a800394f26d..c43878c88ab78175e0c9f535cf2a9ffc41c4b416 100644 (file)
@@ -1,4 +1,4 @@
 ## Process this file with automake to produce Makefile.in
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_odbc.a
-libphpext_odbc_a_SOURCES=php_odbc.c velocis.c
+noinst_LTLIBRARIES=libphpext_odbc.la
+libphpext_odbc_la_SOURCES=php_odbc.c velocis.c
index 503d31a8de1da550a0f79786327029b3ecc0d568..f5becaea9a859dffb1485efda3f5ca910f22a34e 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_oracle.a
-libphpext_oracle_a_SOURCES=oracle.c
+noinst_LTLIBRARIES=libphpext_oracle.la
+libphpext_oracle_la_SOURCES=oracle.c
index b6c926519f0793a1988bc357f21538d9282ff16b..c9c39d936241cbc83c755bc3892ea3fc6e47fc1f 100644 (file)
@@ -1,6 +1,8 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_pcre.a
-libphpext_pcre_a_SOURCES=php_pcre.c
-SUBDIRS=@PCRE_SUBDIR@
+noinst_LTLIBRARIES=libphpext_pcre.la
+libphpext_pcre_la_SOURCES=php_pcre.c
+libphpext_pcre_la_LIBADD = @PCRE_LIBADD@
+
+SUBDIRS = @PCRE_SUBDIRS@
index 2480ff7e6aaccac8784dd9d0719383cf1749f107..09a6a6a91dee0b20eca85f3ca04bcbeb601c6987 100644 (file)
@@ -51,11 +51,12 @@ AC_ARG_WITH(pcre-regex,
                        ;;
        esac
 ],[
-  EXTRA_LIBS="-L$abs_builddir/ext/pcre/pcrelib -lpcre $EXTRA_LIBS"
-  PCRE_SUBDIR="pcrelib"
+  PCRE_LIBADD=pcrelib/libpcre.la
+  PCRE_SUBDIRS=pcrelib
   AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
   AC_MSG_RESULT(yes)
   PHP_EXTENSION(pcre)
   PHP_OUTPUT(ext/pcre/pcrelib/Makefile)
 ]) 
-AC_SUBST(PCRE_SUBDIR)
+AC_SUBST(PCRE_LIBADD)
+AC_SUBST(PCRE_SUBDIRS)
index 2480ff7e6aaccac8784dd9d0719383cf1749f107..09a6a6a91dee0b20eca85f3ca04bcbeb601c6987 100644 (file)
@@ -51,11 +51,12 @@ AC_ARG_WITH(pcre-regex,
                        ;;
        esac
 ],[
-  EXTRA_LIBS="-L$abs_builddir/ext/pcre/pcrelib -lpcre $EXTRA_LIBS"
-  PCRE_SUBDIR="pcrelib"
+  PCRE_LIBADD=pcrelib/libpcre.la
+  PCRE_SUBDIRS=pcrelib
   AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
   AC_MSG_RESULT(yes)
   PHP_EXTENSION(pcre)
   PHP_OUTPUT(ext/pcre/pcrelib/Makefile)
 ]) 
-AC_SUBST(PCRE_SUBDIR)
+AC_SUBST(PCRE_LIBADD)
+AC_SUBST(PCRE_SUBDIRS)
index 8f7cad1372f907363448b7b34e1888f27229ab42..81825f9bc1b92a01afa6e850dcd6a9afa67bfdd3 100644 (file)
@@ -1,2 +1,2 @@
-noinst_LIBRARIES = libpcre.a
-libpcre_a_SOURCES = maketables.c get.c study.c pcre.c
+noinst_LTLIBRARIES = libpcre.la
+libpcre_la_SOURCES = maketables.c get.c study.c pcre.c
index 6b4304d337d2918d6694c8be451a5ee4b30ac5ea..bbae6167ff978699628da966a1fae9ce45495fa3 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_pdf.a
-libphpext_pdf_a_SOURCES=pdf.c
+noinst_LTLIBRARIES=libphpext_pdf.la
+libphpext_pdf_la_SOURCES=pdf.c
 
index 5a4a3e86053d931515cce947fe55d0db196f0d65..1fe55e851793019806380f8df308ce18b802294d 100644 (file)
@@ -1,14 +1,11 @@
 # $Id$
 
-phplibdir=$(libdir)/php
-
 SRC=pgsql.c
 INCLUDES=@INCLUDES@ @PGSQL_INCLUDE@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=@PGSQL_STATIC@
-EXTRA_LIBRARIES=libphpext_pgsql.a
-libphpext_pgsql_a_SOURCES=$(SRC)
+noinst_LTLIBRARIES=@PGSQL_STATIC@
+EXTRA_LTLIBRARIES=libphpext_pgsql.la pgsql.la
+libphpext_pgsql_la_SOURCES=$(SRC)
 phplib_LTLIBRARIES=@PGSQL_SHARED@
-EXTRA_LTLIBRARIES=pgsql.la
 pgsql_la_SOURCES=$(SRC)
 pgsql_la_LIBADD=@PGSQL_LFLAGS@ @PGSQL_LIBS@
 pgsql_la_LDFLAGS=-avoid-version -module -rpath $(phplibdir)
index a64dc478240d54fc0f31fc1cdc5f864c43323335..d78136bc5c9cdb4052ed49d48afce74080dd0a48 100644 (file)
@@ -47,7 +47,7 @@ AC_ARG_WITH(pgsql,
       AC_MSG_RESULT(yes (static))
       AC_ADD_LIBRARY_WITH_PATH(pq, $PGSQL_LIBDIR)
       AC_ADD_INCLUDE($PGSQL_INCDIR)
-      PGSQL_STATIC="libphpext_pgsql.a"
+      PGSQL_STATIC="libphpext_pgsql.la"
     fi
     AC_CHECK_FUNC(PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES))
     CFLAGS=$old_CFLAGS; LDFLAGS=$old_LDFLAGS; LIBS=$old_LIBS
index b9fd66bd671886a9ad11dbe6f460021d308ef0a2..a059151bea76eecd5526d3e64041c09ac60d9ae8 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_session.a
-libphpext_session_a_SOURCES=session.c mod_files.c mod_mm.c mod_user.c
+noinst_LTLIBRARIES=libphpext_session.la
+libphpext_session_la_SOURCES=session.c mod_files.c mod_mm.c mod_user.c
 
index badfe5554189a2eeb20efa4a59fa7c0faf425b82..63afdb9a92c1999e431bb23f376bf8cb6950fbd8 100644 (file)
@@ -1,14 +1,11 @@
 # $Id$
 
-phplibdir=$(libdir)/php
-
 SRC=snmp.c
 INCLUDES=@INCLUDES@ @SNMP_INCLUDE@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=@SNMP_STATIC@
-EXTRA_LIBRARIES=libphpext_snmp.a
-libphpext_snmp_a_SOURCES=$(SRC)
+noinst_LTLIBRARIES=@SNMP_STATIC@
+EXTRA_LTLIBRARIES=libphpext_snmp.la snmp.la
+libphpext_snmp_la_SOURCES=$(SRC)
 phplib_LTLIBRARIES=@SNMP_SHARED@
-EXTRA_LTLIBRARIES=snmp.la
 snmp_la_SOURCES=$(SRC)
 snmp_la_LIBADD=@SNMP_LIBDIR@ -lsnmp @KSTAT_LIBS@
 snmp_la_LDFLAGS=-avoid-version -module -rpath $(phplibdir)
index 2d04b692a40f3f67aaf860a88c9cd9af17246280..e3a4d8cc590a2e584b3e3ccc64ab222f3d1e712b 100644 (file)
@@ -1,14 +1,13 @@
 ## Process this file with automake to produce Makefile.in
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_standard.a
-libphpext_standard_a_SOURCES=\
-       base64.c basic_functions.c browscap.c datetime.c dir.c \
-       dns.c exec.c file.c filestat.c formatted_print.c fsock.c \
-       html.c image.c info.c link.c mail.c math.c md5.c microtime.c \
-       pack.c pageinfo.c rand.c reg.c soundex.c string.c \
-       syslog.c type.c uniqid.c url.c iptc.c var.c quot_print.c \
-       cyr_convert.c flock_compat.c crypt.c dl.c head.c post.c \
-       parsedate.y lcg.c url_scanner.c metaphone.c
+noinst_LTLIBRARIES=libphpext_standard.la
+libphpext_standard_la_SOURCES=\
+       base64.c basic_functions.c browscap.c crypt.c cyr_convert.c datetime.c \
+       dir.c dl.c dns.c exec.c file.c filestat.c flock_compat.c \
+       formatted_print.c fsock.c head.c html.c image.c info.c iptc.c lcg.c \
+       link.c mail.c math.c md5.c metaphone.c microtime.c pack.c pageinfo.c \
+       parsedate.y post.c quot_print.c rand.c reg.c soundex.c string.c \
+       syslog.c type.c uniqid.c url.c url_scanner.c var.c 
 
 $(srcdir)/url_scanner.c: $(srcdir)/url_scanner.re
        -re2c $< > $@.new && mv $@.new $@
index 5eca918d4a40b0e9306d77c576392677a3d24974..4e1bc847292f6d60b52d0572f48baf56c7c83e5b 100644 (file)
@@ -303,7 +303,7 @@ void php_print_credits(int flag)
                php_info_print_table_header(2, "Contribution", "Authors");
                CREDIT_LINE("Zend Scripting Language Engine", "Andi Gutmans, Zeev Suraski");
                CREDIT_LINE("Extension Module API", "Andi Gutmans, Zeev Suraski");
-               CREDIT_LINE("UNIX Build and Modularization", "Stig Bakken");
+               CREDIT_LINE("UNIX Build and Modularization", "Stig Bakken, Sascha Schumann");
                CREDIT_LINE("Win32 Port", "Shane Caraveo, Zeev Suraski");
                CREDIT_LINE("Server API (SAPI) Abstraction Layer", "Andi Gutmans, Shane Caraveo, Zeev Suraski");
                CREDIT_LINE("Apache SAPI Module", "Rasmus Lerdorf, Zeev Suraski");
index 1f75a648f2afb04720ed8b7fc1c4e669fcd68dd0..ce5758b3e3f6406cb7d60396f00509f47a906b28 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_sybase.a
-libphpext_sybase_a_SOURCES=sybase.c
+noinst_LTLIBRARIES=libphpext_sybase.la
+libphpext_sybase_la_SOURCES=sybase.c
 
index 7b32991c10d73c9ca3b62b88a333000db40da149..0187dba26e2df3744441ff07c0d5cfbee34571d9 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_sybase_ct.a
-libphpext_sybase_ct_a_SOURCES=php_sybase_ct.c
+noinst_LTLIBRARIES=libphpext_sybase_ct.la
+libphpext_sybase_ct_la_SOURCES=php_sybase_ct.c
 
index 7ed09a033765abb5a116c71bec5c829ec92752db..c74bf56b603d77ed65dd1731001d92b8600d647c 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_sysvsem.a
-libphpext_sysvsem_a_SOURCES=sysvsem.c
+noinst_LTLIBRARIES=libphpext_sysvsem.la
+libphpext_sysvsem_la_SOURCES=sysvsem.c
 
index 9c759a02bbd1d4302f092af2b56b639f1df5b6ab..0d13164046ce1699192d500196d32b494fff4cec 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_sysvshm.a
-libphpext_sysvshm_a_SOURCES=sysvshm.c
+noinst_LTLIBRARIES=libphpext_sysvshm.la
+libphpext_sysvshm_la_SOURCES=sysvshm.c
 
index 435d1604b166cecfd507a70393e8a20dfd167d37..83187b2fdb406e6e237459b1e3b008739867bd5a 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_wddx.a
-libphpext_wddx_a_SOURCES=wddx.c
+noinst_LTLIBRARIES=libphpext_wddx.la
+libphpext_wddx_la_SOURCES=wddx.c
 
index 17d3f47864769017cf36995e443176e76e1ff3ac..2299ba2ce02128d6f3edd202e2e7e376770c5c3d 100644 (file)
@@ -2,11 +2,10 @@
 
 SRC=xml.c
 INCLUDES=@INCLUDES@ @XML_INCLUDE@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=@XML_STATIC@
-EXTRA_LIBRARIES=libphpext_xml.a
-libphpext_xml_a_SOURCES=$(SRC)
+noinst_LTLIBRARIES=@XML_STATIC@
+EXTRA_LTLIBRARIES=libphpext_xml.la xml.la
+libphpext_xml_la_SOURCES=$(SRC)
 phplib_LTLIBRARIES=@XML_SHARED@
-EXTRA_LTLIBRARIES=xml.la
 xml_la_SOURCES=$(SRC)
 xml_la_LIBADD=@XML_LIBS@
 xml_la_LDFLAGS=-avoid-version -module -rpath $(phplibdir)
index 7a597e79167b8cebc94320732566bf2c18424d6f..8c55e8eac3e5d805ee383e3de5e4c0b6c7e233c9 100644 (file)
@@ -41,7 +41,7 @@ AC_ARG_WITH(xml,
       EXTRA_LIBS="$EXTRA_LIBS $XML_LIBS"
       AC_ADD_INCLUDE($XML_INCLUDE)
       XML_INCLUDE=""
-      XML_STATIC="libphpext_xml.a"
+      XML_STATIC="libphpext_xml.la"
     else
       XML_INCLUDE="-I$XML_INCLUDE"
       XML_SHARED="xml.la"
index f66d6415cfb23693a152dc83cab4476882d196c0..b8f1bf4bc4eafd339f221f5de35c248b0ba5c926 100644 (file)
 /* $Id$ */
 #define IS_EXT_MODULE
 
-/* boldly assume that if PIC is defined, we are being compiled dynamically */
-#ifdef PIC
-# define COMPILE_DL 1
-#endif
-
 #if COMPILE_DL
 # include "dl/phpdl.h"
 #endif
index c3701cf6baf79e1e33364ee99e3490cf2213f950..6ba4b6b3cb75f0192669fcc034297aeaa7d1ae21 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_yp.a
-libphpext_yp_a_SOURCES=yp.c
+noinst_LTLIBRARIES=libphpext_yp.la
+libphpext_yp_la_SOURCES=yp.c
 
index ef7d3ea49cc55cfc207ff7e51e2b9a6fcbae6594..c879e8caf9ec2fd293b2b9d856a279566923a3ed 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpext_zlib.a
-libphpext_zlib_a_SOURCES=zlib.c
+noinst_LTLIBRARIES=libphpext_zlib.la
+libphpext_zlib_la_SOURCES=zlib.c
 
diff --git a/install-sh b/install-sh
deleted file mode 100644 (file)
index 89fc9b0..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-#! /bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-tranformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd="$cpprog"
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd="$stripprog"
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-       echo "install:  no input file specified"
-       exit 1
-else
-       true
-fi
-
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-       
-       if [ -d $dst ]; then
-               instcmd=:
-       else
-               instcmd=mkdir
-       fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-       if [ -f $src -o -d $src ]
-       then
-               true
-       else
-               echo "install:  $src does not exist"
-               exit 1
-       fi
-       
-       if [ x"$dst" = x ]
-       then
-               echo "install:  no destination specified"
-               exit 1
-       else
-               true
-       fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-       if [ -d $dst ]
-       then
-               dst="$dst"/`basename $src`
-       else
-               true
-       fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='   
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-       pathcomp="${pathcomp}${1}"
-       shift
-
-       if [ ! -d "${pathcomp}" ] ;
-        then
-               $mkdirprog "${pathcomp}"
-       else
-               true
-       fi
-
-       pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd $dst &&
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-       if [ x"$transformarg" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               dstfile=`basename $dst $transformbasename | 
-                       sed $transformarg`$transformbasename
-       fi
-
-# don't allow the sed command to completely eliminate the filename
-
-       if [ x"$dstfile" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               true
-       fi
-
-# Make a temp file name in the proper directory.
-
-       dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-       $doit $instcmd $src $dsttmp &&
-
-       trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-       $doit $rmcmd -f $dstdir/$dstfile &&
-       $doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/php.map b/php.sym
similarity index 100%
rename from php.map
rename to php.sym
diff --git a/regex/Makefile.am b/regex/Makefile.am
new file mode 100644 (file)
index 0000000..993db56
--- /dev/null
@@ -0,0 +1,3 @@
+noinst_LTLIBRARIES = libregex.la
+
+libregex_la_SOURCES = regcomp.c regexec.c regerror.c regfree.c
diff --git a/regex/Makefile.in b/regex/Makefile.in
deleted file mode 100644 (file)
index 4561974..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-SHELL = /bin/sh
-
-srcdir=@srcdir@
-VPATH=@srcdir@
-
-CC=@CC@
-RANLIB=@RANLIB@
-
-# You probably want to take -DREDEBUG out of CFLAGS, and put something like
-# -O in, *after* testing (-DREDEBUG strengthens testing by enabling a lot of
-# internal assertion checking and some debugging facilities).
-# Put -Dconst= in for a pre-ANSI compiler.
-# Do not take -DPOSIX_MISTAKE out.
-# REGCFLAGS isn't important to you (it's for my use in some special contexts).
-CFLAGS=@CFLAGS@
-COMPILE=$(CC) $(CFLAGS) -I$(srcdir) -I. -DPOSIX_MISTAKE
-
-# If you have a pre-ANSI compiler, put -o into MKHFLAGS.  If you want
-# the Berkeley __P macro, put -b in.
-MKHFLAGS=
-
-# Flags for linking but not compiling, if any.
-LDFLAGS=@LDFLAGS@
-
-# Extra libraries for linking, if any.
-LIBS=
-
-# Internal stuff, should not need changing.
-OBJPRODN=regcomp.o regexec.o regerror.o regfree.o
-OBJS=$(OBJPRODN) split.o debug.o main.o
-H=cclass.h cname.h regex2.h utils.h
-REGSRC=regcomp.c regerror.c regexec.c regfree.c
-ALLSRC=$(REGSRC) engine.c debug.c main.c split.c
-
-# Stuff that matters only if you're trying to lint the package.
-LINTFLAGS=-I. -Dstatic= -Dconst= -DREDEBUG
-LINTC=regcomp.c regexec.c regerror.c regfree.c debug.c main.c
-JUNKLINT=possible pointer alignment|null effect
-
-# arrangements to build forward-reference header files
-.SUFFIXES:     .ih .h
-.c.ih:
-       sh $(srcdir)/mkh $(MKHFLAGS) -p $< >$@
-
-.c.o:
-       $(COMPILE) -c $<
-
-all lib: libregex.a
-
-libregex.a: $(OBJPRODN)
-       rm -f libregex.a
-       ar cr libregex.a $(OBJPRODN)
-       $(RANLIB) libregex.a
-
-default:       r
-
-purge:
-       rm -f *.o
-
-# stuff to build regex.h
-REGEXH=regex.h
-REGEXHSRC=regex2.h $(REGSRC)
-$(REGEXH):     $(REGEXHSRC) mkh
-       sh $(srcdir)/./mkh $(MKHFLAGS) -i _REGEX_H_ $(REGEXHSRC) >regex.h
-       #cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h
-       #rm -f regex.tmp
-
-# dependencies
-$(OBJPRODN) debug.o:   utils.h regex.h regex2.h
-regcomp.o:     cclass.h cname.h regcomp.ih
-regexec.o:     engine.c engine.ih
-regerror.o:    regerror.ih
-debug.o:       debug.ih
-main.o:        main.ih
-
-# tester
-re:    $(OBJS)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
-
-# regression test
-r:     re tests
-       ./re <tests
-       ./re -el <tests
-       ./re -er <tests
-
-# 57 variants, and other stuff, for development use -- not useful to you
-ra:    ./re tests
-       -./re <tests
-       -./re -el <tests
-       -./re -er <tests
-
-rx:    ./re tests
-       ./re -x <tests
-       ./re -x -el <tests
-       ./re -x -er <tests
-
-t:     ./re tests
-       -time ./re <tests
-       -time ./re -cs <tests
-       -time ./re -el <tests
-       -time ./re -cs -el <tests
-
-l:     $(LINTC)
-       lint $(LINTFLAGS) -h $(LINTC) 2>&1 | egrep -v '$(JUNKLINT)' | tee lint
-
-fullprint:
-       ti README WHATSNEW notes todo | list
-       ti *.h | list
-       list *.c
-       list regex.3 regex.7
-
-print:
-       ti README WHATSNEW notes todo | list
-       ti *.h | list
-       list reg*.c engine.c
-
-
-mf.tmp:        Makefile
-       sed '/^REGEXH=/s/=.*/=regex.h/' Makefile | sed '/#DEL$$/d' >$@
-
-DTRH=cclass.h cname.h regex2.h utils.h
-PRE=COPYRIGHT README WHATSNEW
-POST=mkh regex.3 regex.7 tests $(DTRH) $(ALLSRC) fake/*.[ch]
-FILES=$(PRE) Makefile $(POST)
-DTR=$(PRE) Makefile=mf.tmp $(POST)
-dtr:   $(FILES) mf.tmp
-       makedtr $(DTR) >$@
-       rm mf.tmp
-
-cio:   $(FILES)
-       cio $(FILES)
-
-rdf:   $(FILES)
-       rcsdiff -c $(FILES) 2>&1 | p
-
-# various forms of cleanup
-tidy:
-       rm -f junk* core core.* *.core dtr *.tmp lint
-
-clean: tidy
-       rm -f *.o *.s re libregex.a
-
-# don't do this one unless you know what you're doing
-spotless:      clean
-       rm -f mkh regex.h
index bc9794a3706a98daa1a5c31562d12dd59d6bbad1..98c7104787f06a442eae1793cf7bb9c5ab8202bb 100644 (file)
@@ -1,14 +1,4 @@
 ## Process this file with automake to produce Makefile.in
 
-PHP_SAPI=@PHP_SAPI@
-PHP_SAPI_LIB=$(PHP_SAPI)/libphpsapi_$(PHP_SAPI).a
 SUBDIRS = $(PHP_SAPI)
 
-noinst_LIBRARIES=libphpsapi.a
-
-libphpsapi.a: $(PHP_SAPI_LIB)
-       cp $(PHP_SAPI_LIB) $@
-       @test "`uname -s`" = "Rhapsody" && $(RANLIB) $@ || exit 0
-
-$(PHP_SAPI_LIB):
-       (cd $(PHP_SAPI); $(MAKE) libphpsapi_$(PHP_SAPI).a)
index 8c843e9e504b8d68b3168140f8531dc93c9d58a3..7560abe64312f33e4487fb198a6195efd6222741 100644 (file)
@@ -4,15 +4,17 @@ config.m4: just like for extensions, this file contains
 autoconf/automake directives that end up in the configure script.  The
 only difference is that the sapi config.m4 files are read in diversion
 (output block) 2 instead of 3.  The sapi config.m4 files should set
-two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET
-(the name of the resulting library or program, previously BINNAME).
-If they are not specified, they will default to "cgi" and "php",
-respectively.
+two variables: PHP_SAPI (which sapi backend to choose) and INSTALL_IT
+(the actions performed when "make install" is executed).  If they are
+not specified, they will default to "cgi" and "do nothing,"
+respectively.  Additionally, the following m4 macros can be used to
+influence what is created during "make":
 
-Makefile.inc: has to exist, has to define "INSTALL_IT" to the command
-used to install the final target (or ":" for no operation).  It also
-has to define a plain Makefile rule (without autoconf substitutions)
-to build $(SAPI_TARGET)
+PHP_BUILD_SHARED    -- build shared target      libs/php_lib.so
+PHP_BUILD_STATIC    -- build static target      libs/php_lib.a
+PHP_BUILD_PROGRAM   -- build executable         php
+
+(paths relative to top build dir)
 
 Makefile.am: just what you think.  Make sure your target is called
-"libphpsapi_NNN.a", where NNN is the value of PHP_SAPI.
+"libphpsapi_NNN.la", where NNN is the value of PHP_SAPI.
index 4a8edf6074678ebca84dbe58b314f93645eeff76..7a3c745808c765fa8ce74dfafc0ec2c4384ac5f9 100644 (file)
@@ -1,5 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpsapi_nsapi.a
-libphpsapi_nsapi_a_SOURCES=aolserver.c
+noinst_LTLIBRARIES=libphpsapi_nsapi.la
+libphpsapi_nsapi_la_SOURCES=aolserver.c
diff --git a/sapi/aolserver/Makefile.inc b/sapi/aolserver/Makefile.inc
deleted file mode 100644 (file)
index b96cdab..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# NSAPI/AOLserver module
-
-INSTALL_IT=:
-
-php4_nsapi.so: all-recursive
-       g++ $(LDFLAGS) -shared sapi/nsapi/aolserver.o -o $@ libmodphp4-so.a $(LIBS)
index 854785df04d77fef37f6fa202ae492897bb67607..f96659f3f9ad87c4c67aa82c698908448218b726 100644 (file)
@@ -8,15 +8,14 @@ AC_ARG_WITH(aolserver,
        if test ! -d $withval ; then
                AC_MSG_ERROR(You did not specify a directory)
        fi
-       if test "$enable_thread_safety" != "yes"; then
-               AC_MSG_ERROR(AOLserver must be compiled using --enable-thread-safety)
-       fi
+       enable_thread_safety=yes
+       passthru="$passthru --enable-thread-safety"
        NS_DIR=$withval
        AC_ADD_INCLUDE($NS_DIR/include)
        AC_DEFINE(HAVE_AOLSERVER)
        PHP_SAPI=nsapi
-       SAPI_TARGET=php4_nsapi.so
-       INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_TARGET $NS_DIR/root/bin/$SAPI_TARGET"
+       PHP_BUILD_SHARED
+       INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 libs/libphp4.so $NS_DIR/root/bin/libphp4.so"
        RESULT=yes
 ])
 AC_MSG_RESULT($RESULT)
index e5c8b14a996a799a57e77254651a082466691414..38404758dc05de7556ee82b597debe015fef3b1a 100644 (file)
@@ -2,5 +2,5 @@
 
 APACHE_INCLUDE=@APACHE_INCLUDE@
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend $(APACHE_INCLUDE)
-noinst_LIBRARIES=libphpsapi_apache.a
-libphpsapi_apache_a_SOURCES=apache.c
+noinst_LTLIBRARIES=libphpsapi_apache.la
+libphpsapi_apache_la_SOURCES=sapi_apache.c mod_php4.c
diff --git a/sapi/apache/Makefile.inc b/sapi/apache/Makefile.inc
deleted file mode 100644 (file)
index bef1954..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- makefile -*-
-
-INSTALL_IT=$(APACHE_INSTALL)
-
-# Apache modules
-libphp4.a libmodphp4.a: all-recursive $(OBJS) sapi/libphpsapi.a $(REGEX_LIB)
-       $(AR) $@.tmp $(OBJS)
-       $(srcdir)/scripts/armerge $@ $@.tmp \
-           ext/libphpext.a libzend/libzend.a sapi/libphpsapi.a $(TSRM_LIB)
-       @rm -f $@.tmp
-       $(RANLIB) $(SAPI_TARGET)
-
-# Apache modules
-libmodphp4-so.a: all-recursive $(OBJS) sapi/libphpsapi.a $(REGEX_LIB)
-       $(AR) $@.tmp $(OBJS)
-       $(srcdir)/scripts/armerge $@ $@.tmp \
-           ext/libphpext.a libzend/libzend.a sapi/libphpsapi.a $(TSRM_LIB)
-       @rm -f $@.tmp
-       $(RANLIB) libmodphp4-so.a
-
-# Apache 1.3 shared module
-libphp4.so: libmodphp4-so.a $(REGEX_LIB)
-       (cd sapi/apache; $(MAKE) mod_php4.o)
-       $(APXS) $(INCLUDE) -c -o libphp4.so $(VERSION_SCRIPT) $(RPATHS) sapi/apache/mod_php4.o libmodphp4-so.a $(APXS_LDFLAGS) $(APXS_EXP)
index 2a1e66298c0dcd93b2855b7df0310416b5771e6d..ad685fe1815c97e727e40fc476409ed9f859121b 100644 (file)
@@ -15,16 +15,16 @@ AC_ARG_WITH(apxs,
        if test -d "$APXS_INCLUDEDIR/xml" ; then
                XML_INCLUDE="$APXS_INCLUDEDIR/xml"
        fi
-       APACHE_INCLUDE="-I$APXS_INCLUDEDIR"
+       AC_ADD_INCLUDE($APXS_INCLUDEDIR)
+    PHP_EXTENSION(apache)
        PHP_SAPI=apache
        SAPI_TARGET=libphp4.so
-       APACHE_INSTALL="\$(APXS) -i -a -n php4 $SAPI_TARGET"
+    APACHE_INSTALL="$APXS -i -a -n php4 libs/libphp4.so"
+       PHP_BUILD_SHARED
        CFLAGS_SHLIB=`perl -V:cccdlflags | cut -d\' -f2`
        LDFLAGS_SHLIB=`perl -V:lddlflags | cut -d\' -f2`
        LDFLAGS_SHLIB_EXPORT=`perl -V:ccdlflags | cut -d\' -f2`
-       PHP_LIBS=
        STRONGHOLD=
-       INCLUDES="$INCLUDES $APACHE_INCLUDE"
        AC_DEFINE(APACHE)
        AC_DEFINE(HAVE_AP_CONFIG_H)
        AC_DEFINE(HAVE_AP_COMPAT_H)
@@ -35,7 +35,6 @@ AC_ARG_WITH(apxs,
 
 APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php4.* sapi/apache/libphp4.module"
 
-if test "$SAPI_TARGET" != "libmodphp4-so.a"; then
 if test "$SAPI_TARGET" != "libphp4.so"; then
 AC_MSG_CHECKING(for Apache module support)
 AC_ARG_WITH(apache,
@@ -71,8 +70,8 @@ AC_ARG_WITH(apache,
                                mkdir $APACHE_TARGET
                        fi
                        PHP_SAPI=apache
-                       SAPI_TARGET=libmodphp4.a
-                       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_TARGET $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
+                       SAPI_TARGET=libs/libphp4.a
+                       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_TARGET $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
                        PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
                        AC_DEFINE(APACHE)
                        AC_MSG_RESULT(yes - Apache 1.3.x)
@@ -101,9 +100,9 @@ AC_ARG_WITH(apache,
                                mkdir $APACHE_TARGET
                        fi
                        PHP_SAPI=apache
-                       SAPI_TARGET=libmodphp4.a
+                       SAPI_TARGET=libs/libphp4.a
                        PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
-                       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_TARGET $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
+                       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_TARGET $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
                        AC_DEFINE(APACHE)
                        AC_MSG_RESULT(yes - Apache 1.3.x)
                        STRONGHOLD=
@@ -125,9 +124,9 @@ AC_ARG_WITH(apache,
                        APACHE_INCLUDE=-"I$withval/apache -I$withval/ssl/include"
                        APACHE_TARGET=$withval/apache
                        PHP_SAPI=apache
-                       SAPI_TARGET=libmodphp4.a
+                       SAPI_TARGET=libs/libphp4.a
                        PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4"
-                       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_TARGET $APACHE_INSTALL_FILES $APACHE_TARGET"
+                       APACHE_INSTALL="mkdir -p $APACHE_TARGET; cp $SAPI_TARGET $APACHE_TARGET/libmodphp4.a; cp $APACHE_INSTALL_FILES $APACHE_TARGET"
                        STRONGHOLD=-DSTRONGHOLD=1
                        AC_DEFINE(APACHE)
                        AC_MSG_RESULT(yes - StrongHold)
@@ -158,7 +157,6 @@ AC_ARG_WITH(apache,
 INCLUDES="$INCLUDES $APACHE_INCLUDE"
 dnl## AC_SUBST(APACHE_INCLUDE)
 fi
-fi
 
 if test "x$APXS" != "x" -a "`uname -sv`" = "AIX 4" -a "$GCC" != "yes"; then
        APXS_EXP="-bE:sapi/apache/mod_php4.exp"
@@ -183,9 +181,14 @@ AC_ARG_WITH(mod_charset,
 ])
 
 if test -n "$APACHE_MODULE"; then
+  PHP_EXTENSION(apache)
   PHP_OUTPUT(sapi/apache/libphp4.module)
+  PHP_BUILD_STATIC
 fi
 
+if test -n "$APACHE_INSTALL"; then
+  INSTALL_IT=$APACHE_INSTALL
+fi
 
 dnl ## Local Variables:
 dnl ## tab-width: 4
index 9b80f6c742d9fc867596366873342410071a418e..687c1c46ac1c7d0ccaa15f1d4b7916a436731eae 100644 (file)
@@ -1,7 +1,7 @@
 Name: php4_module
 ConfigStart
        RULE_WANTHSREGEX=@HSREGEX@
-       LIBS="@RPATHS@ @PHP_LIBS@ @EXTRA_LIBS@ @LIBS@ @RDYNAMIC_LFLAGS@ $LIBS"
+       LIBS="@NATIVE_RPATHS@ @PHP_LIBS@ @EXTRA_LIBS@ @LIBS@ $LIBS"
        RULE_HIDE=yes
        CFLAGS="$CFLAGS -I@abs_srcdir@ -I@abs_srcdir@/libzend -I@abs_builddir@/libzend -I@abs_builddir@"
 ConfigEnd
index bb67e4a9f5d6c78e7903a5dd38e5331f192964da..aff778db0bc839c1930b86964faff8a8b94ff1f3 100644 (file)
@@ -65,7 +65,7 @@ PHPAPI int apache_php_module_main(request_rec *r, int fd, int display_source_mod
 module MODULE_VAR_EXPORT php4_module;
 
 int saved_umask;
-static unsigned char apache_php_initialized=0;
+static unsigned char apache_php_initialized;
 
 typedef struct _php_per_dir_entry {
        char *key;
index 9525e4424011783d86801e8eb86281de80051545..4310bb66a89ffa9513b9d6ae61939b17b09fb0df 100644 (file)
@@ -1,5 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpsapi_cgi.a
-libphpsapi_cgi_a_SOURCES=cgi_main.c
+noinst_LTLIBRARIES=libphpsapi_cgi.la
+libphpsapi_cgi_la_SOURCES=cgi_main.c
diff --git a/sapi/cgi/Makefile.inc b/sapi/cgi/Makefile.inc
deleted file mode 100644 (file)
index b48bd31..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# CGI binary or fhttpd module
-
-INSTALL_IT=:
-
-php: all-recursive $(OBJS) $(REGEX_LIB) $(FHTTPD_LIB)
-       $(CC) $(CFLAGS) -o $(SAPI_TARGET) $(LDFLAGS) $(OBJS) -Lsapi -lphpsapi $(LIBS)
diff --git a/sapi/isapi/Makefile.inc b/sapi/isapi/Makefile.inc
deleted file mode 100644 (file)
index d64acf4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# ISAPI/Zeus module
-
-INSTALL_IT=:
-
-php4isapi.so: libmodphp4-so.a
-       g++ $(LDFLAGS) -shared sapi/isapi/php4isapi.o -o $@ libmodphp4-so.a $(LIBS)
index 4a8edf6074678ebca84dbe58b314f93645eeff76..7a3c745808c765fa8ce74dfafc0ec2c4384ac5f9 100644 (file)
@@ -1,5 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
 INCLUDES=@INCLUDES@ -I@top_srcdir@ -I@top_srcdir@/libzend
-noinst_LIBRARIES=libphpsapi_nsapi.a
-libphpsapi_nsapi_a_SOURCES=aolserver.c
+noinst_LTLIBRARIES=libphpsapi_nsapi.la
+libphpsapi_nsapi_la_SOURCES=aolserver.c
diff --git a/sapi/nsapi/Makefile.inc b/sapi/nsapi/Makefile.inc
deleted file mode 100644 (file)
index b96cdab..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# NSAPI/AOLserver module
-
-INSTALL_IT=:
-
-php4_nsapi.so: all-recursive
-       g++ $(LDFLAGS) -shared sapi/nsapi/aolserver.o -o $@ libmodphp4-so.a $(LIBS)
index 854785df04d77fef37f6fa202ae492897bb67607..f96659f3f9ad87c4c67aa82c698908448218b726 100644 (file)
@@ -8,15 +8,14 @@ AC_ARG_WITH(aolserver,
        if test ! -d $withval ; then
                AC_MSG_ERROR(You did not specify a directory)
        fi
-       if test "$enable_thread_safety" != "yes"; then
-               AC_MSG_ERROR(AOLserver must be compiled using --enable-thread-safety)
-       fi
+       enable_thread_safety=yes
+       passthru="$passthru --enable-thread-safety"
        NS_DIR=$withval
        AC_ADD_INCLUDE($NS_DIR/include)
        AC_DEFINE(HAVE_AOLSERVER)
        PHP_SAPI=nsapi
-       SAPI_TARGET=php4_nsapi.so
-       INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $SAPI_TARGET $NS_DIR/root/bin/$SAPI_TARGET"
+       PHP_BUILD_SHARED
+       INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 libs/libphp4.so $NS_DIR/root/bin/libphp4.so"
        RESULT=yes
 ])
 AC_MSG_RESULT($RESULT)
diff --git a/stub.c b/stub.c
new file mode 100644 (file)
index 0000000..e69de29