summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-05-01 02:42:55 +0000
committerSascha Schumann <sas@php.net>2000-05-01 02:42:55 +0000
commita481fddfb363d13ed28036bf94974c968197ca2b (patch)
treea22e7dd88d624ee9c6cec95a3a3090cf37e098bc
parentce38236221274ba91b33f694e619ecf7c3f04ce5 (diff)
downloadphp-git-a481fddfb363d13ed28036bf94974c968197ca2b.tar.gz
Improved in-tree shared libraries build system
The following new/revived shared modules are available now: ... MySQL (*) ... PCRE (*) ... Session ... SWF (*) capable of using bundled library or external library All changes: The m4 macro PHP_EXTENSION was revamped. Uses LIB_BUILD now. This effectively means that all extensions have to use dynlib. ext/mysql/config.m4 was revamped. Uses LIB_BUILD for building bundled library. ext/pcre/config.m4 was revamped. Uses LIB_BUILD for building bundled library. ext/ext_skel was changed to reflect that more modules should be compileable as shared module. ext/Makefile.in has been simplified enormously. Dependencies are now stored in the build tree. Empty dependencies are not generated by buildconf anymore. They are now dynamically created during the build process. Implicit rules for .S were removed. The NO_RECURSION feature was removed. "libs.mk" has been added to all cvsignore files in ext.
-rw-r--r--acinclude.m480
-rw-r--r--build/build2.mk11
-rw-r--r--build/dynlib.mk5
-rw-r--r--build/rules.mk45
-rw-r--r--configure.in10
-rw-r--r--dynlib.m464
-rw-r--r--ext/Makefile.in14
-rw-r--r--ext/aspell/Makefile.in2
-rw-r--r--ext/bcmath/Makefile.in2
-rw-r--r--ext/calendar/Makefile.in2
-rw-r--r--ext/cpdf/Makefile.in2
-rw-r--r--ext/cybercash/Makefile.in2
-rw-r--r--ext/dav/Makefile.in2
-rw-r--r--ext/db/Makefile.in2
-rw-r--r--ext/dba/Makefile.in2
-rw-r--r--ext/dbase/Makefile.in2
-rw-r--r--ext/domxml/Makefile.in2
-rwxr-xr-xext/ext_skel10
-rw-r--r--ext/fdf/Makefile.in2
-rw-r--r--ext/filepro/Makefile.in2
-rw-r--r--ext/ftp/Makefile.in2
-rw-r--r--ext/gd/Makefile.in2
-rw-r--r--ext/gettext/Makefile.in2
-rw-r--r--ext/hyperwave/Makefile.in2
-rw-r--r--ext/icap/Makefile.in2
-rw-r--r--ext/imap/Makefile.in2
-rw-r--r--ext/informix/Makefile.in2
-rw-r--r--ext/interbase/Makefile.in2
-rw-r--r--ext/java/Makefile.in2
-rw-r--r--ext/ldap/Makefile.in2
-rw-r--r--ext/mcal/Makefile.in2
-rw-r--r--ext/mcrypt/Makefile.in2
-rw-r--r--ext/mhash/Makefile.in2
-rw-r--r--ext/msql/Makefile.in2
-rw-r--r--ext/mysql/Makefile.in4
-rw-r--r--ext/mysql/config.m418
-rw-r--r--ext/mysql/libmysql/Makefile.in2
-rw-r--r--ext/oci8/Makefile.in2
-rw-r--r--ext/odbc/Makefile.in2
-rw-r--r--ext/oracle/Makefile.in2
-rw-r--r--ext/pcre/Makefile.in4
-rw-r--r--ext/pcre/config.m4110
-rw-r--r--ext/pcre/config0.m4110
-rw-r--r--ext/pcre/pcrelib/Makefile.in2
-rw-r--r--ext/pcre/php_pcre.c4
-rw-r--r--ext/pdf/Makefile.in2
-rw-r--r--ext/pgsql/Makefile.in2
-rw-r--r--ext/posix/Makefile.in2
-rw-r--r--ext/readline/Makefile.in2
-rw-r--r--ext/recode/Makefile.in2
-rw-r--r--ext/rpc/Makefile.in2
-rw-r--r--ext/rpc/java/Makefile.in2
-rw-r--r--ext/session/Makefile.in4
-rw-r--r--ext/session/config.m419
-rw-r--r--ext/session/session.c4
-rw-r--r--ext/snmp/Makefile.in2
-rw-r--r--ext/standard/Makefile.in2
-rw-r--r--ext/swf/Makefile.in4
-rw-r--r--ext/swf/config.m414
-rw-r--r--ext/swf/php_swf.h2
-rw-r--r--ext/swf/swf.c6
-rw-r--r--ext/sybase/Makefile.in2
-rw-r--r--ext/sybase_ct/Makefile.in2
-rw-r--r--ext/sysvsem/Makefile.in2
-rw-r--r--ext/sysvshm/Makefile.in2
-rw-r--r--ext/wddx/Makefile.in2
-rw-r--r--ext/xml/Makefile.in2
-rw-r--r--ext/xml/config.m426
-rw-r--r--ext/xml/expat/Makefile.in2
-rw-r--r--ext/xml/expat/xmlparse/Makefile.in2
-rw-r--r--ext/xml/expat/xmltok/Makefile.in2
-rw-r--r--ext/yp/Makefile.in2
-rw-r--r--ext/zlib/Makefile.in2
73 files changed, 387 insertions, 283 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index bd95759a40..8abbc2f629 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2,6 +2,8 @@ dnl $Id$
dnl
dnl This file contains local autoconf functions.
+sinclude(dynlib.m4)
+
dnl
dnl PHP_LIBGCC_LIBPATH(gcc)
dnl Stores the location of libgcc in libgcc_libpath
@@ -11,15 +13,44 @@ AC_DEFUN(PHP_LIBGCC_LIBPATH,[
libgcc_libpath="`dirname $ac_data`"
])
+AC_DEFUN(PHP_ARG_ANALYZE,[
+case "[$]$1" in
+shared,*)
+ ext_output="yes, shared"
+ ext_shared=yes
+ $1=`echo $ac_n "[$]$1$ac_c"|sed s/^shared,//`
+ ;;
+shared)
+ ext_output="yes, shared"
+ ext_shared=yes
+ $1=yes
+ ;;
+no)
+ ext_output="no"
+ ext_shared=no
+ ;;
+*)
+ ext_output="yes"
+ ext_shared=no
+ ;;
+esac
+
+AC_MSG_RESULT($ext_output)
+])
+
dnl
dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val])
dnl Sets PHP_ARG_NAME either to the user value or to the default value.
dnl default-val defaults to no.
dnl
AC_DEFUN(PHP_ARG_WITH,[
+PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
+])
+
+AC_DEFUN(PHP_REAL_ARG_WITH,[
AC_MSG_CHECKING($2)
-AC_ARG_WITH($1,[$3],PHP_[]translit($1,a-z-,A-Z_)=[$]withval,PHP_[]translit($1,a-z-,A-Z_)=ifelse($4,,no,$4))
-AC_MSG_RESULT([$]PHP_[]translit($1,a-z-,A-Z_))
+AC_ARG_WITH($1,[$3],$5=[$]withval,$5=ifelse($4,,no,$4))
+PHP_ARG_ANALYZE($5)
])
dnl
@@ -28,9 +59,13 @@ dnl Sets PHP_ARG_NAME either to the user value or to the default value.
dnl default-val defaults to no.
dnl
AC_DEFUN(PHP_ARG_ENABLE,[
+PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_))
+])
+
+AC_DEFUN(PHP_REAL_ARG_ENABLE,[
AC_MSG_CHECKING($2)
-AC_ARG_ENABLE($1,[$3],PHP_[]translit($1,a-z-,A-Z_)=[$]enableval,PHP_[]translit($1,a-z-,A-Z_)=ifelse($4,,no,$4))
-AC_MSG_RESULT([$]PHP_[]translit($1,a-z-,A-Z_))
+AC_ARG_ENABLE($1,[$3],$5=[$]enableval,$5=ifelse($4,,no,$4))
+PHP_ARG_ANALYZE($5)
])
AC_DEFUN(PHP_MODULE_PTR,[
@@ -450,21 +485,30 @@ dnl "shared" can be set to "shared" or "yes" to build the extension as
dnl a dynamically loadable library.
dnl
AC_DEFUN(PHP_EXTENSION,[
- if test -d "$abs_srcdir/ext/$1" ; then
- ext_src_base="$abs_srcdir/ext/$1/"
- ext_base="ext/$1/"
- EXT_SUBDIRS="$EXT_SUBDIRS $1"
- if test "$2" != "shared" && test "$2" != "yes" && test -z "$php_always_shared"; then
- _extlib="lib$1.a"
- EXT_LTLIBS="$EXT_LTLIBS ext/$1/lib$1.la"
- EXT_LIBS="$EXT_LIBS $1/$_extlib"
- EXT_STATIC="$EXT_STATIC $1"
- else
- AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
- EXT_SHARED="$EXT_SHARED $1"
- fi
- PHP_FAST_OUTPUT(ext/$1/Makefile)
+ EXT_SUBDIRS="$EXT_SUBDIRS $1"
+
+ if test -d "$abs_srcdir/ext/$1"; then
+dnl ---------------------------------------------- Internal Module
+ ext_builddir="ext/$1"
+ ext_srcdir="$abs_srcdir/ext/$1"
+ else
+dnl ---------------------------------------------- External Module
+ ext_builddir="."
+ ext_srcdir="$abs_srcdir"
fi
+
+ if test "$2" != "shared" && test "$2" != "yes"; then
+dnl ---------------------------------------------- Static module
+ LIB_BUILD($ext_builddir)
+ EXT_LTLIBS="$EXT_LTLIBS $ext_builddir/lib$1.la"
+ EXT_STATIC="$EXT_STATIC $1"
+ else
+dnl ---------------------------------------------- Shared module
+ LIB_BUILD($ext_builddir,yes)
+ AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z-,A-Z_), 1, Whether to build $1 as dynamic module)
+ fi
+
+ PHP_FAST_OUTPUT($ext_builddir/Makefile)
])
PHP_SUBST(EXT_SUBDIRS)
diff --git a/build/build2.mk b/build/build2.mk
index d74834355b..b51f86ace4 100644
--- a/build/build2.mk
+++ b/build/build2.mk
@@ -39,14 +39,7 @@ acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
targets = $(TOUCH_FILES) $(makefile_in_files) configure $(config_h_in)
-all: .deps Zend/Makefile.am TSRM/Makefile.am $(targets)
-
-.deps:
- @echo creating empty dependencies
- for i in `find ext sapi regex -type d \! -name \*CVS`; do \
- list="$$list $$i/.deps"; \
- done; \
- touch $$list pear/.deps ext/mysql/libmysql/.deps $@
+all: Zend/Makefile.am TSRM/Makefile.am $(targets)
Zend/Makefile.am:
test -d Zend || (test -d ../Zend && ln -s ../Zend Zend)
@@ -71,7 +64,7 @@ $(makefile_in_files): $(makefile_am_files) aclocal.m4 configure.in $(config_m4_f
|| true >&2
@for i in $(LT_TARGETS); do mv $$i.bak $$i; done
-aclocal.m4: configure.in acinclude.m4
+aclocal.m4: configure.in acinclude.m4 dynlib.m4
aclocal
$(config_h_in): configure acconfig.h
diff --git a/build/dynlib.mk b/build/dynlib.mk
new file mode 100644
index 0000000000..d7e695cf18
--- /dev/null
+++ b/build/dynlib.mk
@@ -0,0 +1,5 @@
+all: all-recursive
+
+include $(builddir)/libs.mk
+
+include $(top_srcdir)/build/rules.mk
diff --git a/build/rules.mk b/build/rules.mk
index e034caaaf7..9e389efc21 100644
--- a/build/rules.mk
+++ b/build/rules.mk
@@ -33,13 +33,13 @@ LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -f -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
-
+SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< && touch $@
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I$(top_builddir)
moduledir = $(libdir)/php/modules
.SUFFIXES:
-.SUFFIXES: .S .c .lo .o .s .y .l
+.SUFFIXES: .slo .c .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
@@ -47,17 +47,14 @@ moduledir = $(libdir)/php/modules
.s.o:
$(COMPILE) -c $<
-.S.o:
- $(COMPILE) -c $<
-
.c.lo:
$(PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
-.S.lo:
- $(PHP_COMPILE)
+.c.slo:
+ $(SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
@@ -74,34 +71,30 @@ install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
- if test '$(NO_RECURSION)' != "$$otarget"; then \
- list='$(SUBDIRS)'; for i in $$list; do \
- target="$$otarget"; \
- echo "Making $$target in $$i"; \
- if test "$$i" = "."; then \
- ok=yes; \
- target="$$target-p"; \
- fi; \
- (cd $$i && $(MAKE) $$target) || exit 1; \
- done; \
- if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
- if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi; \
- fi; \
- if test -n '$(make_shared)'; then \
- $(MAKE) shared || exit 1; \
- fi;
+ list='$(SUBDIRS)'; for i in $$list; do \
+ target="$$otarget"; \
+ echo "Making $$target in $$i"; \
+ if test "$$i" = "."; then \
+ ok=yes; \
+ target="$$target-p"; \
+ fi; \
+ if test ! -f $$i/.deps; then touch $$i/.deps; fi; \
+ (cd $$i && $(MAKE) $$target) || exit 1; \
+ done; \
+ if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
+ if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
- test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
+ test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > $(builddir)/.deps
clean: clean-recursive clean-x
clean-x:
- rm -f $(targets) *.lo *.la *.o $(CLEANFILES)
+ rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
@@ -115,7 +108,7 @@ install-modules:
rm -f modules/*.la && \
cp modules/* $(moduledir) || true
-include $(srcdir)/.deps
+include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
diff --git a/configure.in b/configure.in
index 6f7cd86c39..bf4df29262 100644
--- a/configure.in
+++ b/configure.in
@@ -644,6 +644,7 @@ fi
phplibdir="`pwd`/modules"
+test -d $phplibdir || mkdir $phplibdir
phptempdir="`pwd`/libs"
AC_BUILD_RPATH
@@ -697,7 +698,7 @@ PHP_SUBST(PHP_SAPI)
PHP_SUBST(PHP_VERSION)
PHP_SUBST(PROG_SENDMAIL)
PHP_SUBST(SHELL)
-PHP_SUBST(SHLIBTOOL)
+PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(TSRM_DIR)
PHP_SUBST(TSRM_LIB)
PHP_SUBST(WARNING_LEVEL)
@@ -732,12 +733,12 @@ fi
PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
if test "$enable_shared" = "yes"; then
- SHLIBTOOL='$(LIBTOOL)'
+ SHARED_LIBTOOL='$(LIBTOOL)'
else
- if test -n "$EXT_SHARED"; then
+ if test "$lib_build_shared" = "yes"; then
PHP_CONFIGURE_PART(Configuring shared libtool)
$SHELL $srcdir/ltconfig --output=shlibtool --disable-static --srcdir=$srcdir --cache-file=./config.cache $srcdir/ltmain.sh
- SHLIBTOOL='$(SHELL) $(top_builddir)/shlibtool'
+ SHARED_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool'
else
PHP_COMPILE='$(COMPILE) -c $< && touch $@'
fi
@@ -763,6 +764,7 @@ test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
PHP_CONFIGURE_PART(Generating files)
PHP_FAST_GENERATE
+touch .deps
#libphp4.module
AC_OUTPUT([php4.spec Zend/Makefile
diff --git a/dynlib.m4 b/dynlib.m4
new file mode 100644
index 0000000000..fb3c70a701
--- /dev/null
+++ b/dynlib.m4
@@ -0,0 +1,64 @@
+
+
+
+AC_DEFUN(LIB_SHARED_CONVENIENCE,[
+ lib_target="\$(LTLIBRARY_NAME)"
+ cat >>$1<<EOF
+\$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
+ \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
+
+EOF
+])
+
+AC_DEFUN(LIB_SHARED_MODULE,[
+ lib_target="\$(LTLIBRARY_SHARED_NAME)"
+ cat >>$1<<EOF
+\$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
+ \$(SHARED_LIBTOOL) --mode=link \$(CCLD) \$(CFLAGS) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
+ \$(SHARED_LIBTOOL) --mode=install cp \[$]@ \$(phplibdir)
+
+EOF
+])
+
+AC_DEFUN(LIB_STATIC_CONVENIENCE,[
+ lib_target="\$(LTLIBRARY_NAME)"
+ cat >>$1<<EOF
+\$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
+ \$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
+
+EOF
+])
+
+dnl LIB_BUILD(path, shared, convenience)
+dnl sets up path to build a shared/static convenience/module
+AC_DEFUN(LIB_BUILD,[
+ lib_makefile="$1/libs.mk"
+ lib_target=""
+
+ test -d $1 || $php_shtool mkdir -p $1
+ cat >$lib_makefile<<EOF
+LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo)
+LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
+EOF
+
+ if test "$2" = "shared" || test "$2" = "yes"; then
+ lib_build_shared=yes
+ if test -n "$3"; then
+dnl ---------------------------------------- Shared Convenience
+ LIB_SHARED_CONVENIENCE($lib_makefile)
+ else
+dnl ---------------------------------------- Shared Module
+ LIB_SHARED_MODULE($lib_makefile)
+ fi
+ else
+dnl ---------------------------------------- Static Convenience = Static Module
+ LIB_STATIC_CONVENIENCE($lib_makefile)
+ fi
+
+dnl ---------------------------------------- Generate build targets
+ if test -n "$lib_target"; then
+ cat >>$lib_makefile<<EOF
+targets = $lib_target
+EOF
+ fi
+])
diff --git a/ext/Makefile.in b/ext/Makefile.in
index d490f0116f..77ff9c04b5 100644
--- a/ext/Makefile.in
+++ b/ext/Makefile.in
@@ -1,16 +1,4 @@
-SUBDIRS = $(EXT_STATIC) $(EXT_SHARED)
+SUBDIRS = $(EXT_SUBDIRS)
-all:
- @list='$(EXT_STATIC)'; for i in $$list; do \
- echo "Making all in $$i"; \
- (cd $$i && $(MAKE) all) || exit 1; \
- done
- @list='$(EXT_SHARED)'; for i in $$list; do \
- echo "Making shared in $$i"; \
- (cd $$i && $(MAKE) shared) || exit 1; \
- done
-
-NO_RECURSION = all
-
include $(top_srcdir)/build/rules.mk
diff --git a/ext/aspell/Makefile.in b/ext/aspell/Makefile.in
index 94ffb01cf5..c80a02c617 100644
--- a/ext/aspell/Makefile.in
+++ b/ext/aspell/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libaspell.la
LTLIBRARY_SOURCES = aspell.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/bcmath/Makefile.in b/ext/bcmath/Makefile.in
index e8517a459c..0cd414d53a 100644
--- a/ext/bcmath/Makefile.in
+++ b/ext/bcmath/Makefile.in
@@ -2,5 +2,5 @@
LTLIBRARY_NAME = libbcmath.la
LTLIBRARY_SOURCES = bcmath.c number.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/calendar/Makefile.in b/ext/calendar/Makefile.in
index 1b49f58b8f..d5c8514869 100644
--- a/ext/calendar/Makefile.in
+++ b/ext/calendar/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libcalendar.la
LTLIBRARY_SOURCES = calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/cpdf/Makefile.in b/ext/cpdf/Makefile.in
index ee8e1cd1cb..7a74ccdba5 100644
--- a/ext/cpdf/Makefile.in
+++ b/ext/cpdf/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libcpdf.la
LTLIBRARY_SOURCES = cpdf.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/cybercash/Makefile.in b/ext/cybercash/Makefile.in
index 3d3c1d39e7..99ab73a904 100644
--- a/ext/cybercash/Makefile.in
+++ b/ext/cybercash/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libcybercash.la
LTLIBRARY_SOURCES = cybercash.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/dav/Makefile.in b/ext/dav/Makefile.in
index 5e3149ea23..166edc8ff2 100644
--- a/ext/dav/Makefile.in
+++ b/ext/dav/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libdav.la
LTLIBRARY_SOURCES = dav.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/db/Makefile.in b/ext/db/Makefile.in
index 1e877d5c88..f4531bed58 100644
--- a/ext/db/Makefile.in
+++ b/ext/db/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libdb.la
LTLIBRARY_SOURCES = db.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/dba/Makefile.in b/ext/dba/Makefile.in
index 3fb80ee802..75162fcebb 100644
--- a/ext/dba/Makefile.in
+++ b/ext/dba/Makefile.in
@@ -3,4 +3,4 @@ LTLIBRARY_NAME = libdba.la
LTLIBRARY_SOURCES = dba.c dba_cdb.c dba_db2.c dba_dbm.c dba_gdbm.c \
dba_ndbm.c dba_db3.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/dbase/Makefile.in b/ext/dbase/Makefile.in
index fd67bf065c..0fe66dbda4 100644
--- a/ext/dbase/Makefile.in
+++ b/ext/dbase/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libdbase.la
LTLIBRARY_SOURCES = dbf_head.c dbf_rec.c dbf_misc.c dbf_ndx.c dbase.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/domxml/Makefile.in b/ext/domxml/Makefile.in
index 5bb4f6ff41..f7b9d4c61f 100644
--- a/ext/domxml/Makefile.in
+++ b/ext/domxml/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libdomxml.la
LTLIBRARY_SOURCES = domxml.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/ext_skel b/ext/ext_skel
index 3db7ebae57..60b5a224f9 100755
--- a/ext/ext_skel
+++ b/ext/ext_skel
@@ -56,7 +56,7 @@ dnl Make sure that the comment is aligned:
if test "\$PHP_$EXTNAME" != "no"; then
dnl Action..
- PHP_EXTENSION($extname)
+ PHP_EXTENSION($extname, \$ext_shared)
fi
eof
@@ -64,10 +64,11 @@ $ECHO_N " Makefile.in$ECHO_C"
cat >Makefile.in <<eof
# \$Id\$
-LTLIBRARY_NAME = lib$extname.la
-LTLIBRARY_SOURCES = $extname.c
+LTLIBRARY_NAME = lib$extname.la
+LTLIBRARY_SOURCES = $extname.c
+LTLIBRARY_SHARED_NAME = $extname.la
-include \$(top_srcdir)/build/ltlib.mk
+include \$(top_srcdir)/build/dynlib.mk
eof
@@ -79,6 +80,7 @@ Makefile
*.lo
*.la
.libs
+libs.mk
eof
chmod 644 *
diff --git a/ext/fdf/Makefile.in b/ext/fdf/Makefile.in
index db4edddee5..8acb8fbf52 100644
--- a/ext/fdf/Makefile.in
+++ b/ext/fdf/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libfdf.la
LTLIBRARY_SOURCES = fdf.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/filepro/Makefile.in b/ext/filepro/Makefile.in
index 491dcccffd..efa4ac7a2b 100644
--- a/ext/filepro/Makefile.in
+++ b/ext/filepro/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libfilepro.la
LTLIBRARY_SOURCES = filepro.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/ftp/Makefile.in b/ext/ftp/Makefile.in
index 44bedc78f9..9f61048362 100644
--- a/ext/ftp/Makefile.in
+++ b/ext/ftp/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libftp.la
LTLIBRARY_SOURCES = php_ftp.c ftp.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/gd/Makefile.in b/ext/gd/Makefile.in
index 6cb0424b45..fb82a8b696 100644
--- a/ext/gd/Makefile.in
+++ b/ext/gd/Makefile.in
@@ -4,5 +4,5 @@ LTLIBRARY_SOURCES = gd.c gdcache.c gdttf.c gdt1.c
LTLIBRARY_SHARED_NAME = gd.la
LTLIBRARY_SHARED_LIBADD = $(GD_LFLAGS) $(GD_LIBS)
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/gettext/Makefile.in b/ext/gettext/Makefile.in
index bac3cf4090..88c84b687c 100644
--- a/ext/gettext/Makefile.in
+++ b/ext/gettext/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libgettext.la
LTLIBRARY_SOURCES = gettext.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/hyperwave/Makefile.in b/ext/hyperwave/Makefile.in
index 119da1d4fc..b66d82cfda 100644
--- a/ext/hyperwave/Makefile.in
+++ b/ext/hyperwave/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libhyperwave.la
LTLIBRARY_SOURCES = hw.c hg_comm.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/icap/Makefile.in b/ext/icap/Makefile.in
index 9bb6e34005..5965ec0272 100644
--- a/ext/icap/Makefile.in
+++ b/ext/icap/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libicap.la
LTLIBRARY_SOURCES = php_icap.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/imap/Makefile.in b/ext/imap/Makefile.in
index f5f7ed21a4..8eec341649 100644
--- a/ext/imap/Makefile.in
+++ b/ext/imap/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libimap.la
LTLIBRARY_SOURCES = php_imap.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/informix/Makefile.in b/ext/informix/Makefile.in
index 799f83d284..36989a3e1f 100644
--- a/ext/informix/Makefile.in
+++ b/ext/informix/Makefile.in
@@ -4,7 +4,7 @@ LTLIBRARY_SOURCES = ifx.c
LTLIBRARY_LIBADD = $(IFX_LIBS)
CLEANFILES = ifx.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
ifx.c: $(srcdir)/ifx.ec
(if test -d $(INFORMIXDIR); then \
diff --git a/ext/interbase/Makefile.in b/ext/interbase/Makefile.in
index 414012d95b..a2ccc12f11 100644
--- a/ext/interbase/Makefile.in
+++ b/ext/interbase/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libinterbase.la
LTLIBRARY_SOURCES = interbase.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/java/Makefile.in b/ext/java/Makefile.in
index 26fab50d02..7d8960a34f 100644
--- a/ext/java/Makefile.in
+++ b/ext/java/Makefile.in
@@ -11,7 +11,7 @@ EXTRA_INCLUDES = $(JAVA_INCLUDE)
make_shared = yes
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
php_java.jar : reflect.java
@test -d net || mkdir net
diff --git a/ext/ldap/Makefile.in b/ext/ldap/Makefile.in
index e01996fc07..dd196e1f26 100644
--- a/ext/ldap/Makefile.in
+++ b/ext/ldap/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libldap.la
LTLIBRARY_SOURCES = ldap.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/mcal/Makefile.in b/ext/mcal/Makefile.in
index 4abaaa3683..fa78917882 100644
--- a/ext/mcal/Makefile.in
+++ b/ext/mcal/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libmcal.la
LTLIBRARY_SOURCES = php_mcal.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/mcrypt/Makefile.in b/ext/mcrypt/Makefile.in
index ae5ba57ca7..8eaf83ae22 100644
--- a/ext/mcrypt/Makefile.in
+++ b/ext/mcrypt/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libmcrypt.la
LTLIBRARY_SOURCES = mcrypt.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/mhash/Makefile.in b/ext/mhash/Makefile.in
index 65962b0b34..e7735193ff 100644
--- a/ext/mhash/Makefile.in
+++ b/ext/mhash/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libmhash.la
LTLIBRARY_SOURCES = mhash.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/msql/Makefile.in b/ext/msql/Makefile.in
index a65b6d9858..19a1332240 100644
--- a/ext/msql/Makefile.in
+++ b/ext/msql/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libmsql.la
LTLIBRARY_SOURCES = php_msql.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/mysql/Makefile.in b/ext/mysql/Makefile.in
index 0ae2db88c4..110388f9f5 100644
--- a/ext/mysql/Makefile.in
+++ b/ext/mysql/Makefile.in
@@ -3,8 +3,8 @@ LTLIBRARY_NAME = libmysql.la
LTLIBRARY_SOURCES = php_mysql.c
LTLIBRARY_LIBADD = $(MYSQL_LIBADD)
LTLIBRARY_SHARED_NAME = mysql.la
-LTLIBRARY_SHARED_LIBADD = $(MYSQL_LFLAGS) -lmysqlclient
+LTLIBRARY_SHARED_LIBADD = $(MYSQL_SHARED_LIBADD)
SUBDIRS = $(MYSQL_SUBDIRS)
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/mysql/config.m4 b/ext/mysql/config.m4
index 77c242d9b0..8772e922f2 100644
--- a/ext/mysql/config.m4
+++ b/ext/mysql/config.m4
@@ -26,18 +26,19 @@ PHP_ARG_WITH(mysql, for MySQL support,
if test "$PHP_MYSQL" != "no"; then
AC_DEFINE(HAVE_MYSQL, 1, [Whether you have MySQL])
- PHP_EXTENSION(mysql)
+ PHP_EXTENSION(mysql,$ext_shared)
fi
if test "$PHP_MYSQL" = "yes"; then
PHP_MYSQL_SOCK
MYSQL_CHECKS
MYSQL_LIBADD=libmysql/libmysql_client.la
+ MYSQL_SHARED_LIBADD=libmysql/libmysql_client.la
MYSQL_SUBDIRS=libmysql
PHP_SUBST(MYSQL_LIBADD)
PHP_SUBST(MYSQL_SUBDIRS)
-
- AC_ADD_INCLUDE(${ext_src_base}libmysql)
+ LIB_BUILD($ext_builddir/libmysql,$ext_shared,yes)
+ AC_ADD_INCLUDE($ext_srcdir/libmysql)
elif test "$PHP_MYSQL" != "no"; then
for i in $PHP_MYSQL; do
if test -r $i/include/mysql/mysql.h; then
@@ -53,7 +54,14 @@ elif test "$PHP_MYSQL" != "no"; then
AC_MSG_ERROR(Cannot find header files under $PHP_MYSQL)
fi
- AC_ADD_LIBPATH($MYSQL_DIR/lib/mysql)
- AC_ADD_LIBRARY(mysqlclient)
+
+ if test "$ext_shared" = "yes"; then
+ MYSQL_SHARED_LIBADD="-R$MYSQL_DIR/lib/mysql -L$MYSQL_DIR/lib/mysql -lmysqlclient"
+ else
+ AC_ADD_LIBPATH($MYSQL_DIR/lib/mysql)
+ AC_ADD_LIBRARY(mysqlclient)
+ fi
+
AC_ADD_INCLUDE($MYSQL_INC_DIR)
fi
+PHP_SUBST(MYSQL_SHARED_LIBADD)
diff --git a/ext/mysql/libmysql/Makefile.in b/ext/mysql/libmysql/Makefile.in
index 43f25bd976..aaf98db2bc 100644
--- a/ext/mysql/libmysql/Makefile.in
+++ b/ext/mysql/libmysql/Makefile.in
@@ -13,4 +13,4 @@ LTLIBRARY_SOURCES = libmysql.c errmsg.c net.c violite.c password.c \
strcont.c strcend.c bchange.c bmove.c bmove_upp.c \
longlong2str.c strtoull.c strtoll.c ctype-latin1.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/oci8/Makefile.in b/ext/oci8/Makefile.in
index 1f4628c47f..7eba37e809 100644
--- a/ext/oci8/Makefile.in
+++ b/ext/oci8/Makefile.in
@@ -4,4 +4,4 @@ LTLIBRARY_SOURCES = oci8.c
LTLIBRARY_SHARED_NAME = oci8.la
LTLIBRARY_SHARED_LIBADD = $(OCI8_LFLAGS) $(OCI8_LIBS)
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/odbc/Makefile.in b/ext/odbc/Makefile.in
index cc99346b09..46f8b827e4 100644
--- a/ext/odbc/Makefile.in
+++ b/ext/odbc/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libodbc.la
LTLIBRARY_SOURCES = php_odbc.c velocis.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/oracle/Makefile.in b/ext/oracle/Makefile.in
index e1be724441..03fe31681c 100644
--- a/ext/oracle/Makefile.in
+++ b/ext/oracle/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = liboracle.la
LTLIBRARY_SOURCES = oracle.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/pcre/Makefile.in b/ext/pcre/Makefile.in
index aefe85016f..9316a48720 100644
--- a/ext/pcre/Makefile.in
+++ b/ext/pcre/Makefile.in
@@ -2,7 +2,9 @@
LTLIBRARY_NAME = libpcre.la
LTLIBRARY_SOURCES = php_pcre.c
LTLIBRARY_LIBADD = $(PCRE_LIBADD)
+LTLIBRARY_SHARED_NAME = pcre.la
+LTLIBRARY_SHARED_LIBADD = $(PCRE_SHARED_LIBADD)
SUBDIRS = $(PCRE_SUBDIRS)
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/pcre/config.m4 b/ext/pcre/config.m4
index 32eb634a8a..076dde0752 100644
--- a/ext/pcre/config.m4
+++ b/ext/pcre/config.m4
@@ -4,70 +4,62 @@ dnl config.m4 for extension pcre
dnl By default we'll compile and link against the bundled PCRE library
dnl if DIR is supplied, we'll use that for linking
-AC_MSG_CHECKING(whether to include PCRE support)
-AC_ARG_WITH(pcre-regex,
+PHP_ARG_WITH(pcre-regex,whether to include PCRE support,
[ --without-pcre-regex Do not include Perl Compatible Regular Expressions
support. Use --with-pcre-regex=DIR to specify DIR
where PCRE's include and library files are located,
- if not using bundled library.],
-[
- case "$withval" in
- no)
- AC_MSG_RESULT(no)
- ;;
- yes)
- EXTRA_LIBS="-L$abs_builddir/ext/pcre/pcrelib -lpcre $EXTRA_LIBS"
- PCRE_SUBDIR="pcrelib"
- AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(pcre)
- PHP_FAST_OUTPUT(ext/pcre/pcrelib/Makefile)
- ;;
- *)
- test -f $withval/pcre.h && PCRE_INCDIR="$withval"
- test -f $withval/include/pcre.h && PCRE_INCDIR="$withval/include"
+ if not using bundled library.],yes)
- if test -n "$PCRE_INCDIR" ; then
- changequote({,})
- pcre_major=`grep PCRE_MAJOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
- pcre_minor=`grep PCRE_MINOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
- changequote([,])
- pcre_minor_length=`echo "$pcre_minor" | wc -c | sed -e 's/[^0-9]//g'`
- if test "$pcre_minor_length" -eq 2 ; then
- pcre_minor="$pcre_minor"0
- fi
- pcre_version=$pcre_major$pcre_minor
- if test "$pcre_version" -ge 208; then
- AC_ADD_INCLUDE($PCRE_INCDIR)
- else
- AC_MSG_ERROR(PCRE extension requires PCRE library version >= 2.08)
- fi
- else
- AC_MSG_ERROR(Could not find pcre.h in $withval)
- fi
+if test "$PHP_PCRE_REGEX" != "no"; then
+ PHP_EXTENSION(pcre, $ext_shared)
+ if test "$PHP_PCRE_REGEX" = "yes"; then
+ PCRE_LIBADD=pcrelib/libpcre.la
+ PCRE_SHARED_LIBADD=pcrelib/libpcre.la
+ PCRE_SUBDIRS=pcrelib
+ PHP_SUBST(PCRE_LIBADD)
+ PHP_SUBST(PCRE_SUBDIRS)
+ AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+ PHP_FAST_OUTPUT($ext_builddir/pcrelib/Makefile)
+ LIB_BUILD($ext_builddir/pcrelib,$ext_shared,yes)
+ else
+ test -f $PHP_PCRE_REGEX/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX
+ test -f $PHP_PCRE_REGEX/include/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX/include
+
+ if test -z "$PCRE_INCDIR"; then
+ AC_MSG_RESULT(Could not find pcre.h in $PHP_PCRE_REGEX)
+ fi
- test -f $withval/libpcre.a && PCRE_LIBDIR="$withval"
- test -f $withval/lib/libpcre.a && PCRE_LIBDIR="$withval/lib"
- if test -n "$PCRE_LIBDIR" ; then
- AC_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
- else
- AC_MSG_ERROR(Could not find libpcre.a in $withval)
- fi
+ changequote({,})
+ pcre_major=`grep PCRE_MAJOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
+ pcre_minor=`grep PCRE_MINOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
+ changequote([,])
+ pcre_minor_length=`echo "$pcre_minor" | wc -c | sed -e 's/[^0-9]//g'`
+ if test "$pcre_minor_length" -eq 2 ; then
+ pcre_minor="$pcre_minor"0
+ fi
+ pcre_version=$pcre_major$pcre_minor
+ if test "$pcre_version" -lt 208; then
+ AC_MSG_ERROR(The PCRE extension requires PCRE library version >= 2.08)
+ fi
+
+ test -f $PHP_PCRE_REGEX/libpcre.a && PCRE_LIBDIR="$PHP_PCRE_REGEX"
+ test -f $PHP_PCRE_REGEX/lib/libpcre.a && PCRE_LIBDIR="$PHP_PCRE_REGEX/lib"
+
+ if test -z "$PCRE_LIBDIR" ; then
+ AC_MSG_ERROR(Could not find libpcre.a in $PHP_PCRE_REGEX)
+ fi
+
+ if test "$ext_shared" = "yes"; then
+ PCRE_SHARED_LIBADD="-R$PCRE_LIBDIR -L$PCRE_LIBDIR -lpcre"
+ else
+ AC_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
+ fi
+
+ AC_ADD_INCLUDE($PCRE_INCDIR)
+ AC_DEFINE(HAVE_PCRE, 1, [ ])
+ fi
+fi
+PHP_SUBST(PCRE_SHARED_LIBADD)
- AC_DEFINE(HAVE_PCRE, 1, [ ])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(pcre)
- ;;
- esac
-],[
- PCRE_LIBADD=pcrelib/libpcre.la
- PCRE_SUBDIRS=pcrelib
- AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(pcre)
- PHP_FAST_OUTPUT(ext/pcre/pcrelib/Makefile)
-])
-PHP_SUBST(PCRE_LIBADD)
-PHP_SUBST(PCRE_SUBDIRS)
AC_CHECK_FUNC(memmove, [], [AC_DEFINE(USE_BCOPY, 1, [ ])])
diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4
index 32eb634a8a..076dde0752 100644
--- a/ext/pcre/config0.m4
+++ b/ext/pcre/config0.m4
@@ -4,70 +4,62 @@ dnl config.m4 for extension pcre
dnl By default we'll compile and link against the bundled PCRE library
dnl if DIR is supplied, we'll use that for linking
-AC_MSG_CHECKING(whether to include PCRE support)
-AC_ARG_WITH(pcre-regex,
+PHP_ARG_WITH(pcre-regex,whether to include PCRE support,
[ --without-pcre-regex Do not include Perl Compatible Regular Expressions
support. Use --with-pcre-regex=DIR to specify DIR
where PCRE's include and library files are located,
- if not using bundled library.],
-[
- case "$withval" in
- no)
- AC_MSG_RESULT(no)
- ;;
- yes)
- EXTRA_LIBS="-L$abs_builddir/ext/pcre/pcrelib -lpcre $EXTRA_LIBS"
- PCRE_SUBDIR="pcrelib"
- AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(pcre)
- PHP_FAST_OUTPUT(ext/pcre/pcrelib/Makefile)
- ;;
- *)
- test -f $withval/pcre.h && PCRE_INCDIR="$withval"
- test -f $withval/include/pcre.h && PCRE_INCDIR="$withval/include"
+ if not using bundled library.],yes)
- if test -n "$PCRE_INCDIR" ; then
- changequote({,})
- pcre_major=`grep PCRE_MAJOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
- pcre_minor=`grep PCRE_MINOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
- changequote([,])
- pcre_minor_length=`echo "$pcre_minor" | wc -c | sed -e 's/[^0-9]//g'`
- if test "$pcre_minor_length" -eq 2 ; then
- pcre_minor="$pcre_minor"0
- fi
- pcre_version=$pcre_major$pcre_minor
- if test "$pcre_version" -ge 208; then
- AC_ADD_INCLUDE($PCRE_INCDIR)
- else
- AC_MSG_ERROR(PCRE extension requires PCRE library version >= 2.08)
- fi
- else
- AC_MSG_ERROR(Could not find pcre.h in $withval)
- fi
+if test "$PHP_PCRE_REGEX" != "no"; then
+ PHP_EXTENSION(pcre, $ext_shared)
+ if test "$PHP_PCRE_REGEX" = "yes"; then
+ PCRE_LIBADD=pcrelib/libpcre.la
+ PCRE_SHARED_LIBADD=pcrelib/libpcre.la
+ PCRE_SUBDIRS=pcrelib
+ PHP_SUBST(PCRE_LIBADD)
+ PHP_SUBST(PCRE_SUBDIRS)
+ AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
+ PHP_FAST_OUTPUT($ext_builddir/pcrelib/Makefile)
+ LIB_BUILD($ext_builddir/pcrelib,$ext_shared,yes)
+ else
+ test -f $PHP_PCRE_REGEX/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX
+ test -f $PHP_PCRE_REGEX/include/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX/include
+
+ if test -z "$PCRE_INCDIR"; then
+ AC_MSG_RESULT(Could not find pcre.h in $PHP_PCRE_REGEX)
+ fi
- test -f $withval/libpcre.a && PCRE_LIBDIR="$withval"
- test -f $withval/lib/libpcre.a && PCRE_LIBDIR="$withval/lib"
- if test -n "$PCRE_LIBDIR" ; then
- AC_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
- else
- AC_MSG_ERROR(Could not find libpcre.a in $withval)
- fi
+ changequote({,})
+ pcre_major=`grep PCRE_MAJOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
+ pcre_minor=`grep PCRE_MINOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'`
+ changequote([,])
+ pcre_minor_length=`echo "$pcre_minor" | wc -c | sed -e 's/[^0-9]//g'`
+ if test "$pcre_minor_length" -eq 2 ; then
+ pcre_minor="$pcre_minor"0
+ fi
+ pcre_version=$pcre_major$pcre_minor
+ if test "$pcre_version" -lt 208; then
+ AC_MSG_ERROR(The PCRE extension requires PCRE library version >= 2.08)
+ fi
+
+ test -f $PHP_PCRE_REGEX/libpcre.a && PCRE_LIBDIR="$PHP_PCRE_REGEX"
+ test -f $PHP_PCRE_REGEX/lib/libpcre.a && PCRE_LIBDIR="$PHP_PCRE_REGEX/lib"
+
+ if test -z "$PCRE_LIBDIR" ; then
+ AC_MSG_ERROR(Could not find libpcre.a in $PHP_PCRE_REGEX)
+ fi
+
+ if test "$ext_shared" = "yes"; then
+ PCRE_SHARED_LIBADD="-R$PCRE_LIBDIR -L$PCRE_LIBDIR -lpcre"
+ else
+ AC_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
+ fi
+
+ AC_ADD_INCLUDE($PCRE_INCDIR)
+ AC_DEFINE(HAVE_PCRE, 1, [ ])
+ fi
+fi
+PHP_SUBST(PCRE_SHARED_LIBADD)
- AC_DEFINE(HAVE_PCRE, 1, [ ])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(pcre)
- ;;
- esac
-],[
- PCRE_LIBADD=pcrelib/libpcre.la
- PCRE_SUBDIRS=pcrelib
- AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(pcre)
- PHP_FAST_OUTPUT(ext/pcre/pcrelib/Makefile)
-])
-PHP_SUBST(PCRE_LIBADD)
-PHP_SUBST(PCRE_SUBDIRS)
AC_CHECK_FUNC(memmove, [], [AC_DEFINE(USE_BCOPY, 1, [ ])])
diff --git a/ext/pcre/pcrelib/Makefile.in b/ext/pcre/pcrelib/Makefile.in
index 9f99bb5ba8..5adf8a3f10 100644
--- a/ext/pcre/pcrelib/Makefile.in
+++ b/ext/pcre/pcrelib/Makefile.in
@@ -2,5 +2,5 @@
LTLIBRARY_NAME = libpcre.la
LTLIBRARY_SOURCES = maketables.c get.c study.c pcre.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index f8a19fb99c..2c5bc262a5 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -1210,6 +1210,10 @@ zend_module_entry pcre_module_entry = {
STANDARD_MODULE_PROPERTIES
};
+#ifdef COMPILE_DL_PCRE
+ZEND_DLEXPORT zend_module_entry *get_module(void) { return &pcre_module_entry; }
+#endif
+
/* }}} */
diff --git a/ext/pdf/Makefile.in b/ext/pdf/Makefile.in
index e8fa3fd9fd..8577f1f2ff 100644
--- a/ext/pdf/Makefile.in
+++ b/ext/pdf/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libpdf.la
LTLIBRARY_SOURCES = pdf.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/pgsql/Makefile.in b/ext/pgsql/Makefile.in
index cf484da241..26b3f94f4a 100644
--- a/ext/pgsql/Makefile.in
+++ b/ext/pgsql/Makefile.in
@@ -6,4 +6,4 @@ LTLIBRARY_SHARED_LIBADD = $(PGSQL_LFLAGS) $(PGSQL_LIBS)
EXTRA_INCLUDES = $(PGSQL_INCLUDE)
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/posix/Makefile.in b/ext/posix/Makefile.in
index 61fdd01d20..82f169b2d0 100644
--- a/ext/posix/Makefile.in
+++ b/ext/posix/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libposix.la
LTLIBRARY_SOURCES = posix.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/readline/Makefile.in b/ext/readline/Makefile.in
index 84006b0784..da1c0c7179 100644
--- a/ext/readline/Makefile.in
+++ b/ext/readline/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libreadline.la
LTLIBRARY_SOURCES = readline.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/recode/Makefile.in b/ext/recode/Makefile.in
index 715ae0319c..1e02abb3d9 100644
--- a/ext/recode/Makefile.in
+++ b/ext/recode/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = librecode.la
LTLIBRARY_SOURCES = recode.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/rpc/Makefile.in b/ext/rpc/Makefile.in
index 26fab50d02..7d8960a34f 100644
--- a/ext/rpc/Makefile.in
+++ b/ext/rpc/Makefile.in
@@ -11,7 +11,7 @@ EXTRA_INCLUDES = $(JAVA_INCLUDE)
make_shared = yes
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
php_java.jar : reflect.java
@test -d net || mkdir net
diff --git a/ext/rpc/java/Makefile.in b/ext/rpc/java/Makefile.in
index 26fab50d02..7d8960a34f 100644
--- a/ext/rpc/java/Makefile.in
+++ b/ext/rpc/java/Makefile.in
@@ -11,7 +11,7 @@ EXTRA_INCLUDES = $(JAVA_INCLUDE)
make_shared = yes
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
php_java.jar : reflect.java
@test -d net || mkdir net
diff --git a/ext/session/Makefile.in b/ext/session/Makefile.in
index cda14be6da..4893b1be1f 100644
--- a/ext/session/Makefile.in
+++ b/ext/session/Makefile.in
@@ -1,5 +1,7 @@
LTLIBRARY_NAME = libsession.la
LTLIBRARY_SOURCES = session.c mod_files.c mod_mm.c mod_user.c
+LTLIBRARY_SHARED_NAME = session.la
+LTLIBRARY_SHARED_LIBADD = $(SESSION_LIBADD)
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/session/config.m4 b/ext/session/config.m4
index 89017871ae..8fdbcc4309 100644
--- a/ext/session/config.m4
+++ b/ext/session/config.m4
@@ -3,12 +3,12 @@ dnl $Id$
PHP_ARG_WITH(mm,for mm support,
[ --with-mm[=DIR] Include mm support for session storage])
-PHP_ARG_ENABLE(session, whether to enable session support,
-[ --disable-session Disable session support], yes)
-
PHP_ARG_ENABLE(trans-sid,whether to enable transparent session id propagation,
[ --enable-trans-sid Enable transparent session id propagation])
+PHP_ARG_ENABLE(session, whether to enable session support,
+[ --disable-session Disable session support], yes)
+
if test "$PHP_MM" != "no"; then
for i in /usr/local /usr $PHP_MM; do
if test -f "$i/include/mm.h"; then
@@ -19,8 +19,13 @@ if test "$PHP_MM" != "no"; then
if test -z "$MM_DIR" ; then
AC_MSG_ERROR(cannot find mm library)
fi
-
- AC_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/lib)
+
+ if test "$ext_shared" = "yes"; then
+ PHP_SUBST(SESSION_LIBADD)
+ SESSION_LIBADD="-R$MM_DIR/lib -L$MM_DIR/lib -lmm"
+ else
+ AC_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/lib)
+ fi
AC_ADD_INCLUDE($MM_DIR/include)
AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm])
PHP_MODULE_PTR(phpext_ps_mm_ptr)
@@ -30,6 +35,6 @@ if test "$PHP_TRANS_SID" = "yes"; then
AC_DEFINE(TRANS_SID, 1, [Whether you want transparent session id propagation])
fi
-if test "$PHP_SESSION" = "yes"; then
- PHP_EXTENSION(session)
+if test "$PHP_SESSION" != "no"; then
+ PHP_EXTENSION(session,$ext_shared)
fi
diff --git a/ext/session/session.c b/ext/session/session.c
index 726310e69c..2389584beb 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -120,6 +120,10 @@ zend_module_entry session_module_entry = {
STANDARD_MODULE_PROPERTIES
};
+#ifdef COMPILE_DL_SESSION
+ZEND_DLEXPORT zend_module_entry *get_module(void) { return &session_module_entry; }
+#endif
+
typedef struct {
char *name;
void (*func)(PSLS_D);
diff --git a/ext/snmp/Makefile.in b/ext/snmp/Makefile.in
index a732d25b8b..d71ed95789 100644
--- a/ext/snmp/Makefile.in
+++ b/ext/snmp/Makefile.in
@@ -5,4 +5,4 @@ LTLIBRARY_SHARED_LIBADD = $(SNMP_LIBDIR) -lsnmp $(KSTAT_LIBS)
EXTRA_INCLUDES = $(SNMP_INCLUDE)
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/standard/Makefile.in b/ext/standard/Makefile.in
index e18866c0b4..221922f52c 100644
--- a/ext/standard/Makefile.in
+++ b/ext/standard/Makefile.in
@@ -9,7 +9,7 @@ LTLIBRARY_SOURCES=\
syslog.c type.c uniqid.c url.c url_scanner.c var.c output.c assert.c \
strnatcmp.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
parsedate.c: $(srcdir)/parsedate.y
diff --git a/ext/swf/Makefile.in b/ext/swf/Makefile.in
index b15d1f6942..fbeaf882f4 100644
--- a/ext/swf/Makefile.in
+++ b/ext/swf/Makefile.in
@@ -1,5 +1,7 @@
LTLIBRARY_NAME = libswf.la
LTLIBRARY_SOURCES = swf.c
+LTLIBRARY_SHARED_NAME = swf.la
+LTLIBRARY_SHARED_LIBADD = $(SWF_SHARED_LIBADD)
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/swf/config.m4 b/ext/swf/config.m4
index cd728e6b24..117fe7c568 100644
--- a/ext/swf/config.m4
+++ b/ext/swf/config.m4
@@ -5,11 +5,11 @@ dnl This file is a modified version of config.m4
dnl in php4/ext/mcrypt
PHP_ARG_WITH(swf, for libswf support,
-[ --with-swf[=DIR] Include swf support])
+[ --with-swf[=DIR] Include swf support])
if test "$PHP_SWF" != "no"; then
for i in /usr/local /usr $PHP_SWF; do
- if test -f $i/libswf.a; then
+ if test -r $i/libswf.a; then
SWF_DIR=$i
fi
done
@@ -17,10 +17,16 @@ if test "$PHP_SWF" != "no"; then
if test -z "$SWF_DIR"; then
AC_MSG_ERROR(Please reinstall libswf.a - I cannot find libswf.a)
fi
+
AC_ADD_INCLUDE($SWF_DIR)
- AC_ADD_LIBRARY_WITH_PATH(swf, $SWF_DIR)
+ if test "$ext_shared" = "yes"; then
+ SWF_SHARED_LIBADD="-R$SWF_DIR -L$SWF_DIR -lswf"
+ PHP_SUBST(SWF_SHARED_LIBADD)
+ else
+ AC_ADD_LIBRARY_WITH_PATH(swf, $SWF_DIR)
+ fi
AC_DEFINE(HAVE_SWF,1,[ ])
- PHP_EXTENSION(swf)
+ PHP_EXTENSION(swf, $ext_shared)
fi
diff --git a/ext/swf/php_swf.h b/ext/swf/php_swf.h
index f43dc8ef6e..96b9e2f8a2 100644
--- a/ext/swf/php_swf.h
+++ b/ext/swf/php_swf.h
@@ -21,7 +21,7 @@
#ifndef _PHP_SWF_H
#define _PHP_SWF_H
-#if COMPILE_DL
+#ifdef COMPILE_DL_SWF
#undef HAVE_SWF
#define HAVE_SWF 1
#endif
diff --git a/ext/swf/swf.c b/ext/swf/swf.c
index 28150048c2..560dd8442c 100644
--- a/ext/swf/swf.c
+++ b/ext/swf/swf.c
@@ -106,6 +106,10 @@ zend_module_entry swf_module_entry = {
STANDARD_MODULE_PROPERTIES
};
+#ifdef COMPILE_DL_SWF
+ZEND_DLEXPORT zend_module_entry *get_module(void) { return &swf_module_entry; }
+#endif
+
PHP_MINFO_FUNCTION(swf)
{
php_info_print_table_start();
@@ -1067,4 +1071,4 @@ PHP_FUNCTION(swf_posround)
}
/* }}} */
-#endif \ No newline at end of file
+#endif
diff --git a/ext/sybase/Makefile.in b/ext/sybase/Makefile.in
index 3b7437ab55..fd33146fe3 100644
--- a/ext/sybase/Makefile.in
+++ b/ext/sybase/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libsybase.la
LTLIBRARY_SOURCES = sybase.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/sybase_ct/Makefile.in b/ext/sybase_ct/Makefile.in
index 965741c79d..4b495e4a85 100644
--- a/ext/sybase_ct/Makefile.in
+++ b/ext/sybase_ct/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libsybase_ct.la
LTLIBRARY_SOURCES = php_sybase_ct.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/sysvsem/Makefile.in b/ext/sysvsem/Makefile.in
index 33a9bd5419..b92500b476 100644
--- a/ext/sysvsem/Makefile.in
+++ b/ext/sysvsem/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libsysvsem.la
LTLIBRARY_SOURCES = sysvsem.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/sysvshm/Makefile.in b/ext/sysvshm/Makefile.in
index 599a11b143..75e514c993 100644
--- a/ext/sysvshm/Makefile.in
+++ b/ext/sysvshm/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libsysvshm.la
LTLIBRARY_SOURCES = sysvshm.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/wddx/Makefile.in b/ext/wddx/Makefile.in
index 06865e6afa..a5ec87c5fb 100644
--- a/ext/wddx/Makefile.in
+++ b/ext/wddx/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libwddx.la
LTLIBRARY_SOURCES = wddx.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/xml/Makefile.in b/ext/xml/Makefile.in
index e6a97e7b24..4a986da0c8 100644
--- a/ext/xml/Makefile.in
+++ b/ext/xml/Makefile.in
@@ -7,4 +7,4 @@ LTLIBRARY_SHARED_LIBADD = $(XML_LIBS)
SUBDIRS = expat
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/xml/config.m4 b/ext/xml/config.m4
index eb1e723273..e48ec51592 100644
--- a/ext/xml/config.m4
+++ b/ext/xml/config.m4
@@ -12,25 +12,17 @@ else
order=12
fi
-AC_MSG_CHECKING(for XML support)
-AC_ARG_ENABLE(xml,
-[ --disable-xml Disable XML support using bundled expat lib],[
- PHP_XML=$enableval
-],[
- PHP_XML=yes
-])
-AC_MSG_RESULT($PHP_XML)
+PHP_ARG_ENABLE(xml,for XML support,
+[ --disable-xml Disable XML support using bundled expat lib], yes)
if test "$PHP_XML" != "no"; then
AC_DEFINE(HAVE_LIBEXPAT, 1, [ ])
CPPFLAGS="$CPPFLAGS -DXML_BYTE_ORDER=$order"
- if test "$PHP_XML" = "shared"; then
- shared=yes
- else
- shared=
- fi
- PHP_EXTENSION(xml, $shared)
- AC_ADD_INCLUDE(${ext_src_base}expat/xmltok)
- AC_ADD_INCLUDE(${ext_src_base}expat/xmlparse)
- PHP_FAST_OUTPUT(${ext_base}expat/Makefile ${ext_base}expat/xmlparse/Makefile ${ext_base}expat/xmltok/Makefile)
+ PHP_EXTENSION(xml, $ext_shared)
+ LIB_BUILD($ext_builddir/expat,$ext_shared,yes)
+ LIB_BUILD($ext_builddir/expat/xmlparse,$ext_shared,yes)
+ LIB_BUILD($ext_builddir/expat/xmltok,$ext_shared,yes)
+ AC_ADD_INCLUDE($ext_srcdir/expat/xmltok)
+ AC_ADD_INCLUDE($ext_srcdir/expat/xmlparse)
+ PHP_FAST_OUTPUT($ext_builddir/expat/Makefile $ext_builddir/expat/xmlparse/Makefile $ext_builddir/expat/xmltok/Makefile)
fi
diff --git a/ext/xml/expat/Makefile.in b/ext/xml/expat/Makefile.in
index ea7b112417..6a109f1f98 100644
--- a/ext/xml/expat/Makefile.in
+++ b/ext/xml/expat/Makefile.in
@@ -5,4 +5,4 @@ LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES)
SUBDIRS = xmltok xmlparse
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/xml/expat/xmlparse/Makefile.in b/ext/xml/expat/xmlparse/Makefile.in
index 5275652913..77df7598d0 100644
--- a/ext/xml/expat/xmlparse/Makefile.in
+++ b/ext/xml/expat/xmlparse/Makefile.in
@@ -4,4 +4,4 @@ LTLIBRARY_SOURCES = xmlparse.c hashtable.c
EXTRA_INCLUDES = -I$(srcdir)/../xmltok
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/xml/expat/xmltok/Makefile.in b/ext/xml/expat/xmltok/Makefile.in
index f9f02c863f..73d1cab428 100644
--- a/ext/xml/expat/xmltok/Makefile.in
+++ b/ext/xml/expat/xmltok/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libexpat_tok.la
LTLIBRARY_SOURCES = xmltok.c xmlrole.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/yp/Makefile.in b/ext/yp/Makefile.in
index 4fd1f482d3..e7db81ffb5 100644
--- a/ext/yp/Makefile.in
+++ b/ext/yp/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libyp.la
LTLIBRARY_SOURCES = yp.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/zlib/Makefile.in b/ext/zlib/Makefile.in
index 62e7370a1f..946ae5ce58 100644
--- a/ext/zlib/Makefile.in
+++ b/ext/zlib/Makefile.in
@@ -2,4 +2,4 @@
LTLIBRARY_NAME = libzlib.la
LTLIBRARY_SOURCES = zlib.c
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/dynlib.mk