diff options
author | Sascha Schumann <sas@php.net> | 1999-10-04 15:18:26 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 1999-10-04 15:18:26 +0000 |
commit | 232afa4816c60a20d3db48c304ac59312d46ec46 (patch) | |
tree | dd8df9145c12f6b14fe751f6cc862aa8c0768e06 | |
parent | ec01d01400c67fd6d1bf2ae0e170771260e1ecc0 (diff) | |
download | php-git-232afa4816c60a20d3db48c304ac59312d46ec46.tar.gz |
* archive-based convenience libraries completely replaced
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, 313 insertions, 1084 deletions
diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000000..33e7e815be --- /dev/null +++ b/Makefile.am @@ -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 index ed58baecd3..0000000000 --- a/Makefile.in +++ /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: diff --git a/acinclude.m4 b/acinclude.m4 index 85d804ebc1..b2d87256fc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -3,6 +3,27 @@ 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 dnl execute code, if variable is not set in namespace @@ -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 @@ -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 diff --git a/configure.in b/configure.in index 75a8594bea..035e7f12ad 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/ext/Makefile.am b/ext/Makefile.am index 8833023226..49372bc0d3 100644 --- a/ext/Makefile.am +++ b/ext/Makefile.am @@ -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 diff --git a/ext/apache/Makefile.am b/ext/apache/Makefile.am index c9006e13bb..9a7d7ab1b3 100644 --- a/ext/apache/Makefile.am +++ b/ext/apache/Makefile.am @@ -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 diff --git a/ext/apache/config.m4 b/ext/apache/config.m4 index e878cdbb8b..88575c9e98 100644 --- a/ext/apache/config.m4 +++ b/ext/apache/config.m4 @@ -1,5 +1,2 @@ dnl $Id$ -if test -n "$APACHE_INCLUDE"; then - PHP_EXTENSION(apache) -fi diff --git a/ext/aspell/Makefile.am b/ext/aspell/Makefile.am index 2d739171f7..f352b50b58 100644 --- a/ext/aspell/Makefile.am +++ b/ext/aspell/Makefile.am @@ -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 diff --git a/ext/bcmath/Makefile.am b/ext/bcmath/Makefile.am index b5f9acdee0..e73bafce78 100644 --- a/ext/bcmath/Makefile.am +++ b/ext/bcmath/Makefile.am @@ -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 diff --git a/ext/dav/Makefile.am b/ext/dav/Makefile.am index 58f9fe1009..3b9e629cea 100644 --- a/ext/dav/Makefile.am +++ b/ext/dav/Makefile.am @@ -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 diff --git a/ext/db/Makefile.am b/ext/db/Makefile.am index c9dbfa4872..71d2ea180b 100644 --- a/ext/db/Makefile.am +++ b/ext/db/Makefile.am @@ -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 diff --git a/ext/dba/Makefile.am b/ext/dba/Makefile.am index b609be3bf3..2c36702cd1 100644 --- a/ext/dba/Makefile.am +++ b/ext/dba/Makefile.am @@ -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 diff --git a/ext/dbase/Makefile.am b/ext/dbase/Makefile.am index c04a5ccb86..d9ce4aa738 100644 --- a/ext/dbase/Makefile.am +++ b/ext/dbase/Makefile.am @@ -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 index 0000000000..993db56b1a --- /dev/null +++ b/ext/ereg/regex/Makefile.am @@ -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 index 4561974b06..0000000000 --- a/ext/ereg/regex/Makefile.in +++ /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 diff --git a/ext/ext_skel b/ext/ext_skel index 85f61a077b..3b077c1eab 100755 --- a/ext/ext_skel +++ b/ext/ext_skel @@ -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 diff --git a/ext/fdf/Makefile.am b/ext/fdf/Makefile.am index 91e9efef83..2dd7234f81 100644 --- a/ext/fdf/Makefile.am +++ b/ext/fdf/Makefile.am @@ -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 diff --git a/ext/filepro/Makefile.am b/ext/filepro/Makefile.am index ff539050be..78e397fa29 100644 --- a/ext/filepro/Makefile.am +++ b/ext/filepro/Makefile.am @@ -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 diff --git a/ext/ftp/Makefile.am b/ext/ftp/Makefile.am index ea032672b0..11f1ce5742 100644 --- a/ext/ftp/Makefile.am +++ b/ext/ftp/Makefile.am @@ -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 diff --git a/ext/gd/Makefile.am b/ext/gd/Makefile.am index 6483056bfa..d767120564 100644 --- a/ext/gd/Makefile.am +++ b/ext/gd/Makefile.am @@ -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) diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index 50fdafc4d9..60ff629311 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -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 diff --git a/ext/gettext/Makefile.am b/ext/gettext/Makefile.am index 295ca2c889..a5b29b6cd5 100644 --- a/ext/gettext/Makefile.am +++ b/ext/gettext/Makefile.am @@ -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 diff --git a/ext/hyperwave/Makefile.am b/ext/hyperwave/Makefile.am index c5be33e128..3b92146327 100644 --- a/ext/hyperwave/Makefile.am +++ b/ext/hyperwave/Makefile.am @@ -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 diff --git a/ext/icap/Makefile.am b/ext/icap/Makefile.am index 3322c1ccf8..964fd7de0a 100644 --- a/ext/icap/Makefile.am +++ b/ext/icap/Makefile.am @@ -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 diff --git a/ext/imap/Makefile.am b/ext/imap/Makefile.am index 51e2641464..5ab4011b34 100644 --- a/ext/imap/Makefile.am +++ b/ext/imap/Makefile.am @@ -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 diff --git a/ext/informix/Makefile.am b/ext/informix/Makefile.am index 18b8a4fd08..2cafd8c3c2 100644 --- a/ext/informix/Makefile.am +++ b/ext/informix/Makefile.am @@ -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 \ diff --git a/ext/interbase/Makefile.am b/ext/interbase/Makefile.am index 494e3b9ef9..fd0e7fdfdf 100644 --- a/ext/interbase/Makefile.am +++ b/ext/interbase/Makefile.am @@ -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 diff --git a/ext/ldap/Makefile.am b/ext/ldap/Makefile.am index ca39511757..cf5d5d241b 100644 --- a/ext/ldap/Makefile.am +++ b/ext/ldap/Makefile.am @@ -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 diff --git a/ext/mcal/Makefile.am b/ext/mcal/Makefile.am index 3ee9cdd58f..ce59b52e19 100644 --- a/ext/mcal/Makefile.am +++ b/ext/mcal/Makefile.am @@ -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 diff --git a/ext/mcrypt/Makefile.am b/ext/mcrypt/Makefile.am index 01baf80148..aaaee46d69 100644 --- a/ext/mcrypt/Makefile.am +++ b/ext/mcrypt/Makefile.am @@ -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 diff --git a/ext/mhash/Makefile.am b/ext/mhash/Makefile.am index 18be9497da..792f7be6e0 100644 --- a/ext/mhash/Makefile.am +++ b/ext/mhash/Makefile.am @@ -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 diff --git a/ext/mysql/Makefile.am b/ext/mysql/Makefile.am index f035f76af9..0bf2a7ddeb 100644 --- a/ext/mysql/Makefile.am +++ b/ext/mysql/Makefile.am @@ -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) diff --git a/ext/mysql/config.m4 b/ext/mysql/config.m4 index ceda6acf4b..e900835359 100644 --- a/ext/mysql/config.m4 +++ b/ext/mysql/config.m4 @@ -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) diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 0a686149d8..7302599067 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -24,10 +24,6 @@ * ? Safe mode implementation */ -#ifdef PIC -# define COMPILE_DL 1 -#endif - #if COMPILE_DL #include "dl/phpdl.h" #endif diff --git a/ext/mysql/php_mysql.h b/ext/mysql/php_mysql.h index 0dc55a4076..80bd0d6793 100644 --- a/ext/mysql/php_mysql.h +++ b/ext/mysql/php_mysql.h @@ -38,7 +38,7 @@ #define DLEXPORT #endif -#ifdef ZTS +#ifdef __ZTS #include "TSRM.h" #endif diff --git a/ext/oci8/Makefile.am b/ext/oci8/Makefile.am index 8693894388..30ad74dabc 100644 --- a/ext/oci8/Makefile.am +++ b/ext/oci8/Makefile.am @@ -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 diff --git a/ext/odbc/Makefile.am b/ext/odbc/Makefile.am index 3daf4a20ec..c43878c88a 100644 --- a/ext/odbc/Makefile.am +++ b/ext/odbc/Makefile.am @@ -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 diff --git a/ext/oracle/Makefile.am b/ext/oracle/Makefile.am index 503d31a8de..f5becaea9a 100644 --- a/ext/oracle/Makefile.am +++ b/ext/oracle/Makefile.am @@ -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 diff --git a/ext/pcre/Makefile.am b/ext/pcre/Makefile.am index b6c926519f..c9c39d9362 100644 --- a/ext/pcre/Makefile.am +++ b/ext/pcre/Makefile.am @@ -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@ diff --git a/ext/pcre/config.m4 b/ext/pcre/config.m4 index 2480ff7e6a..09a6a6a91d 100644 --- a/ext/pcre/config.m4 +++ b/ext/pcre/config.m4 @@ -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) diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index 2480ff7e6a..09a6a6a91d 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -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) diff --git a/ext/pcre/pcrelib/Makefile.am b/ext/pcre/pcrelib/Makefile.am index 8f7cad1372..81825f9bc1 100644 --- a/ext/pcre/pcrelib/Makefile.am +++ b/ext/pcre/pcrelib/Makefile.am @@ -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 diff --git a/ext/pdf/Makefile.am b/ext/pdf/Makefile.am index 6b4304d337..bbae6167ff 100644 --- a/ext/pdf/Makefile.am +++ b/ext/pdf/Makefile.am @@ -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 diff --git a/ext/pgsql/Makefile.am b/ext/pgsql/Makefile.am index 5a4a3e8605..1fe55e8517 100644 --- a/ext/pgsql/Makefile.am +++ b/ext/pgsql/Makefile.am @@ -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) diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4 index a64dc47824..d78136bc5c 100644 --- a/ext/pgsql/config.m4 +++ b/ext/pgsql/config.m4 @@ -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 diff --git a/ext/session/Makefile.am b/ext/session/Makefile.am index b9fd66bd67..a059151bea 100644 --- a/ext/session/Makefile.am +++ b/ext/session/Makefile.am @@ -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 diff --git a/ext/snmp/Makefile.am b/ext/snmp/Makefile.am index badfe55541..63afdb9a92 100644 --- a/ext/snmp/Makefile.am +++ b/ext/snmp/Makefile.am @@ -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) diff --git a/ext/standard/Makefile.am b/ext/standard/Makefile.am index 2d04b692a4..e3a4d8cc59 100644 --- a/ext/standard/Makefile.am +++ b/ext/standard/Makefile.am @@ -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 $@ diff --git a/ext/standard/info.c b/ext/standard/info.c index 5eca918d4a..4e1bc84729 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -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"); diff --git a/ext/sybase/Makefile.am b/ext/sybase/Makefile.am index 1f75a648f2..ce5758b3e3 100644 --- a/ext/sybase/Makefile.am +++ b/ext/sybase/Makefile.am @@ -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 diff --git a/ext/sybase_ct/Makefile.am b/ext/sybase_ct/Makefile.am index 7b32991c10..0187dba26e 100644 --- a/ext/sybase_ct/Makefile.am +++ b/ext/sybase_ct/Makefile.am @@ -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 diff --git a/ext/sysvsem/Makefile.am b/ext/sysvsem/Makefile.am index 7ed09a0337..c74bf56b60 100644 --- a/ext/sysvsem/Makefile.am +++ b/ext/sysvsem/Makefile.am @@ -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 diff --git a/ext/sysvshm/Makefile.am b/ext/sysvshm/Makefile.am index 9c759a02bb..0d13164046 100644 --- a/ext/sysvshm/Makefile.am +++ b/ext/sysvshm/Makefile.am @@ -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 diff --git a/ext/wddx/Makefile.am b/ext/wddx/Makefile.am index 435d1604b1..83187b2fdb 100644 --- a/ext/wddx/Makefile.am +++ b/ext/wddx/Makefile.am @@ -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 diff --git a/ext/xml/Makefile.am b/ext/xml/Makefile.am index 17d3f47864..2299ba2ce0 100644 --- a/ext/xml/Makefile.am +++ b/ext/xml/Makefile.am @@ -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) diff --git a/ext/xml/config.m4 b/ext/xml/config.m4 index 7a597e7916..8c55e8eac3 100644 --- a/ext/xml/config.m4 +++ b/ext/xml/config.m4 @@ -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" diff --git a/ext/xml/xml.c b/ext/xml/xml.c index f66d6415cf..b8f1bf4bc4 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -20,11 +20,6 @@ /* $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 diff --git a/ext/yp/Makefile.am b/ext/yp/Makefile.am index c3701cf6ba..6ba4b6b3cb 100644 --- a/ext/yp/Makefile.am +++ b/ext/yp/Makefile.am @@ -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 diff --git a/ext/zlib/Makefile.am b/ext/zlib/Makefile.am index ef7d3ea49c..c879e8caf9 100644 --- a/ext/zlib/Makefile.am +++ b/ext/zlib/Makefile.am @@ -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 index 89fc9b098b..0000000000 --- a/install-sh +++ /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/regex/Makefile.am b/regex/Makefile.am new file mode 100644 index 0000000000..993db56b1a --- /dev/null +++ b/regex/Makefile.am @@ -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 index 4561974b06..0000000000 --- a/regex/Makefile.in +++ /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 diff --git a/sapi/Makefile.am b/sapi/Makefile.am index bc9794a370..98c7104787 100644 --- a/sapi/Makefile.am +++ b/sapi/Makefile.am @@ -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) diff --git a/sapi/README b/sapi/README index 8c843e9e50..7560abe643 100644 --- a/sapi/README +++ b/sapi/README @@ -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. diff --git a/sapi/aolserver/Makefile.am b/sapi/aolserver/Makefile.am index 4a8edf6074..7a3c745808 100644 --- a/sapi/aolserver/Makefile.am +++ b/sapi/aolserver/Makefile.am @@ -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 index b96cdababf..0000000000 --- a/sapi/aolserver/Makefile.inc +++ /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) diff --git a/sapi/aolserver/config.m4 b/sapi/aolserver/config.m4 index 854785df04..f96659f3f9 100644 --- a/sapi/aolserver/config.m4 +++ b/sapi/aolserver/config.m4 @@ -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/sapi/apache/Makefile.am b/sapi/apache/Makefile.am index e5c8b14a99..38404758dc 100644 --- a/sapi/apache/Makefile.am +++ b/sapi/apache/Makefile.am @@ -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 index bef1954320..0000000000 --- a/sapi/apache/Makefile.inc +++ /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) diff --git a/sapi/apache/config.m4 b/sapi/apache/config.m4 index 2a1e66298c..ad685fe181 100644 --- a/sapi/apache/config.m4 +++ b/sapi/apache/config.m4 @@ -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 diff --git a/sapi/apache/libphp4.module.in b/sapi/apache/libphp4.module.in index 9b80f6c742..687c1c46ac 100644 --- a/sapi/apache/libphp4.module.in +++ b/sapi/apache/libphp4.module.in @@ -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 diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index bb67e4a9f5..aff778db0b 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -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; diff --git a/sapi/apache/apache.c b/sapi/apache/sapi_apache.c index 0e8b8029af..0e8b8029af 100644 --- a/sapi/apache/apache.c +++ b/sapi/apache/sapi_apache.c diff --git a/sapi/cgi/Makefile.am b/sapi/cgi/Makefile.am index 9525e44240..4310bb66a8 100644 --- a/sapi/cgi/Makefile.am +++ b/sapi/cgi/Makefile.am @@ -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 index b48bd31b1c..0000000000 --- a/sapi/cgi/Makefile.inc +++ /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 index d64acf40eb..0000000000 --- a/sapi/isapi/Makefile.inc +++ /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) diff --git a/sapi/nsapi/Makefile.am b/sapi/nsapi/Makefile.am index 4a8edf6074..7a3c745808 100644 --- a/sapi/nsapi/Makefile.am +++ b/sapi/nsapi/Makefile.am @@ -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 index b96cdababf..0000000000 --- a/sapi/nsapi/Makefile.inc +++ /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) diff --git a/sapi/nsapi/config.m4 b/sapi/nsapi/config.m4 index 854785df04..f96659f3f9 100644 --- a/sapi/nsapi/config.m4 +++ b/sapi/nsapi/config.m4 @@ -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 index 0000000000..e69de29bb2 --- /dev/null +++ b/stub.c |