diff options
author | Sascha Schumann <sas@php.net> | 2000-05-23 23:30:38 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-05-23 23:30:38 +0000 |
commit | 27ca66b4109e48da2bcc263a41f840eb74d0b8cb (patch) | |
tree | bd045d520fc3edf79c2dd0824510044296d9b31c /ext/recode | |
parent | 21f77edba0ddd4db28906fa3328c3f913c1290a1 (diff) | |
download | php-git-27ca66b4109e48da2bcc263a41f840eb74d0b8cb.tar.gz |
Make recode extension buildable as shared module.
Diffstat (limited to 'ext/recode')
-rw-r--r-- | ext/recode/Makefile.in | 2 | ||||
-rw-r--r-- | ext/recode/config.m4 | 27 | ||||
-rw-r--r-- | ext/recode/recode.c | 4 |
3 files changed, 18 insertions, 15 deletions
diff --git a/ext/recode/Makefile.in b/ext/recode/Makefile.in index 1e02abb3d9..fcf63e9e2a 100644 --- a/ext/recode/Makefile.in +++ b/ext/recode/Makefile.in @@ -1,5 +1,7 @@ LTLIBRARY_NAME = librecode.la LTLIBRARY_SOURCES = recode.c +LTLIBRARY_SHARED_NAME = recode.la +LTLIBRARY_SHARED_LIBADD = $(RECODE_SHARED_LIBADD) include $(top_srcdir)/build/dynlib.mk diff --git a/ext/recode/config.m4 b/ext/recode/config.m4 index 41741a426c..80ba17f868 100644 --- a/ext/recode/config.m4 +++ b/ext/recode/config.m4 @@ -3,13 +3,12 @@ dnl config.m4 for extension recode dnl don't forget to call PHP_EXTENSION(recode) -AC_MSG_CHECKING(for recode support) -AC_ARG_WITH(recode, +PHP_ARG_WITH(recode,for recode support, [ --with-recode[=DIR] Include recode support. DIR is the recode install - directory.], -[ - if test "$withval" != "no"; then - RECODE_LIST="$withval /usr /usr/local /opt" + directory.]) + + if test "$PHP_RECODE" != "no"; then + RECODE_LIST="$PHP_RECODE /usr /usr/local /opt" for i in $RECODE_LIST; do if test -f $i/include/recode.h; then @@ -51,15 +50,13 @@ recode_format_table(); fi AC_ADD_INCLUDE($RECODE_DIR/$RECODE_INC) - AC_ADD_LIBRARY_DEFER_WITH_PATH(recode, $RECODE_DIR/$RECODE_LIB) - - AC_MSG_RESULT(yes) + if test "$ext_shared" = "yes"; then + AC_ADD_LIBRARY_WITH_PATH(recode, $RECODE_DIR/$RECODE_LIB, RECODE_SHARED_LIBADD) + PHP_SUBST(RECODE_SHARED_LIBADD) + else + AC_ADD_LIBRARY_DEFER_WITH_PATH(recode, $RECODE_DIR/$RECODE_LIB) + fi AC_DEFINE(HAVE_LIBRECODE, 1, [Whether we have librecode 3.5 or higher]) - PHP_EXTENSION(recode) - else - AC_MSG_RESULT(no) + PHP_EXTENSION(recode,$ext_shared) fi -],[ - AC_MSG_RESULT(no) -]) diff --git a/ext/recode/recode.c b/ext/recode/recode.c index f835830671..b57b5395e6 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -64,6 +64,10 @@ zend_module_entry recode_module_entry = { extern void timeout(int sig); #endif +#ifdef COMPILE_DL_RECODE +ZEND_GET_MODULE(recode) +#endif + PHP_MINIT_FUNCTION(recode) { ReSLS_FETCH(); |