diff options
author | Sascha Schumann <sas@php.net> | 2000-05-01 02:42:55 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-05-01 02:42:55 +0000 |
commit | a481fddfb363d13ed28036bf94974c968197ca2b (patch) | |
tree | a22e7dd88d624ee9c6cec95a3a3090cf37e098bc /ext/swf | |
parent | ce38236221274ba91b33f694e619ecf7c3f04ce5 (diff) | |
download | php-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.
Diffstat (limited to 'ext/swf')
-rw-r--r-- | ext/swf/Makefile.in | 4 | ||||
-rw-r--r-- | ext/swf/config.m4 | 14 | ||||
-rw-r--r-- | ext/swf/php_swf.h | 2 | ||||
-rw-r--r-- | ext/swf/swf.c | 6 |
4 files changed, 19 insertions, 7 deletions
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 |