diff options
| author | Stig Bakken <ssb@php.net> | 1999-07-21 21:56:25 +0000 |
|---|---|---|
| committer | Stig Bakken <ssb@php.net> | 1999-07-21 21:56:25 +0000 |
| commit | d9f52fe0a7c48f4536268a6b4374d5debdd73a3d (patch) | |
| tree | 776b6913b37e488a1b6a5f5e3430862d25c40abd /ext/xml/config.m4 | |
| parent | 57323801f87f0481a0eba72c36f6cc182d411168 (diff) | |
| download | php-git-d9f52fe0a7c48f4536268a6b4374d5debdd73a3d.tar.gz | |
First cut at standard way of making dynamically loadable extensions on UNIX.
Examples on how to test:
./configure --with-xml static
./configure --with-xml=/opt static
./configure --with-xml=shared shared
./configure --with-xml=shared,/opt shared
The difference between these two is that when the extension is shared, it
is not merged into libphpext.a. The shared extension is currently always
built. I can't find a way to do just one or the other with automake/libtool,
if someone has a clever idea, please come forward. :-)
"make install" installs the .so (as well as a lot of other cruft) in
$prefix/lib/php.
Diffstat (limited to 'ext/xml/config.m4')
| -rw-r--r-- | ext/xml/config.m4 | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/ext/xml/config.m4 b/ext/xml/config.m4 index b70082a547..787ee3465d 100644 --- a/ext/xml/config.m4 +++ b/ext/xml/config.m4 @@ -4,7 +4,25 @@ AC_MSG_CHECKING(for XML support) AC_ARG_WITH(xml, [ --with-xml Include XML support],[ + case $withval in + shared) + shared=yes + withval=yes + ;; + shared,*) + shared=yes + withval=`echo $withval | sed -e 's/^shared,//'` + ;; + *) + shared=no + ;; + esac if test "$withval" != "no"; then + if test "$shared" = "yes"; then + AC_MSG_RESULT([yes (shared)]) + else + AC_MSG_RESULT([yes (static)]) + fi if test "$withval" = "yes"; then test -d /usr/include/xmltok && XML_INCLUDE="-I/usr/include/xmltok" test -d /usr/include/xml && XML_INCLUDE="-I/usr/include/xml" @@ -19,13 +37,15 @@ AC_ARG_WITH(xml, fi fi AC_DEFINE(HAVE_LIBEXPAT, 1) - AC_MSG_RESULT(yes) - PHP_EXTENSION(xml) - EXTRA_LIBS="$EXTRA_LIBS $XML_LIBS" - INCLUDES="$INCLUDES $XML_INCLUDE" + PHP_EXTENSION(xml, $shared) + if test "$shared" != "yes"; then + EXTRA_LIBS="$EXTRA_LIBS $XML_LIBS" + fi else AC_MSG_RESULT(no) fi ],[ AC_MSG_RESULT(no) ]) +AC_SUBST(XML_LIBS) +AC_SUBST(XML_INCLUDE) |
