summaryrefslogtreecommitdiff
path: root/ext/yaz
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-06-10 03:35:57 +0000
committerSascha Schumann <sas@php.net>2000-06-10 03:35:57 +0000
commit01740bfb0d4648bbd4d85ea625150708e5544e64 (patch)
tree83f63c1a84187c139022f3f46fc9fcaa94cd4642 /ext/yaz
parentcdb98a04a5597e7abf2a5a778c61d6bc8b361788 (diff)
downloadphp-git-01740bfb0d4648bbd4d85ea625150708e5544e64.tar.gz
Make yaz compilable as shared module.
Diffstat (limited to 'ext/yaz')
-rw-r--r--ext/yaz/Makefile.in2
-rw-r--r--ext/yaz/config.m491
-rw-r--r--ext/yaz/php_yaz.c4
3 files changed, 47 insertions, 50 deletions
diff --git a/ext/yaz/Makefile.in b/ext/yaz/Makefile.in
index 6425dee5e8..0df612ffa2 100644
--- a/ext/yaz/Makefile.in
+++ b/ext/yaz/Makefile.in
@@ -1,5 +1,7 @@
LTLIBRARY_NAME = libyaz.la
LTLIBRARY_SOURCES = php_yaz.c
+LTLIBRARY_SHARED_NAME = yaz.la
+LTLIBRARY_SHARED_LIBADD = $(YAZ_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
diff --git a/ext/yaz/config.m4 b/ext/yaz/config.m4
index 7d006e0396..75c6ffa0dc 100644
--- a/ext/yaz/config.m4
+++ b/ext/yaz/config.m4
@@ -1,51 +1,46 @@
dnl $Id$
-AC_ARG_WITH(yaz,
+PHP_ARG_WITH(yaz,for YAZ support,
[ --with-yaz[=DIR] Include YAZ support (ANSI/NISO Z39.50). DIR is
- the YAZ bin install directory],
-[
- yazconfig=NONE
- if test "$withval" != "no"; then
- if test "$withval" = "yes"; then
- AC_PATH_PROG(yazconfig, yaz-config, NONE)
- else
- if test -r ${withval}/yaz-config; then
- yazconfig=${withval}/yaz-config
- else
- yazconfig=${withval}/bin/yaz-config
- fi
- fi
- fi
- AC_MSG_CHECKING(for YAZ support)
- if test -f $yazconfig; then
- AC_DEFINE(HAVE_YAZ,1,[Whether you have YAZ])
- . $yazconfig
- for i in $YAZLIB; do
- case $i in
- -l*)
- ii=`echo $i|cut -c 3-`
- AC_ADD_LIBRARY($ii)
- ;;
- -L*)
- ii=`echo $i|cut -c 3-`
- AC_ADD_LIBPATH($ii)
- ;;
- esac
- done
- for i in $YAZINC; do
- case $i in
- -I*)
- ii=`echo $i|cut -c 3-`
- AC_ADD_INCLUDE($ii)
- ;;
- esac
- done
- AC_MSG_RESULT(yes)
- PHP_EXTENSION(yaz)
- else
- AC_MSG_RESULT(no)
- fi
-],[
- AC_MSG_CHECKING(for YAZ support)
- AC_MSG_RESULT(no)
-])
+ the YAZ bin install directory])
+
+
+if test "$PHP_YAZ" != "no"; then
+ yazconfig=NONE
+ if test "$PHP_YAZ" = "yes"; then
+ AC_PATH_PROG(yazconfig, yaz-config, NONE)
+ else
+ if test -r ${PHP_YAZ}/yaz-config; then
+ yazconfig=${PHP_YAZ}/yaz-config
+ else
+ yazconfig=${PHP_YAZ}/bin/yaz-config
+ fi
+ fi
+
+ if test -f $yazconfig; then
+ AC_DEFINE(HAVE_YAZ,1,[Whether you have YAZ])
+ . $yazconfig
+ for i in $YAZLIB; do
+ case $i in
+ -l*)
+ ii=`echo $i|cut -c 3-`
+ AC_ADD_LIBRARY($ii, YAZ_SHARED_LIBADD)
+ ;;
+ -L*)
+ ii=`echo $i|cut -c 3-`
+ AC_ADD_LIBPATH($ii,, YAZ_SHARED_LIBADD)
+ ;;
+ esac
+ done
+ for i in $YAZINC; do
+ case $i in
+ -I*)
+ ii=`echo $i|cut -c 3-`
+ AC_ADD_INCLUDE($ii)
+ ;;
+ esac
+ done
+ PHP_SUBST(YAZ_SHARED_LIBADD)
+ PHP_EXTENSION(yaz, $ext_shared)
+ fi
+fi
diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c
index e56a6d8251..045dff67d1 100644
--- a/ext/yaz/php_yaz.c
+++ b/ext/yaz/php_yaz.c
@@ -1584,8 +1584,8 @@ zend_module_entry yaz_module_entry = {
STANDARD_MODULE_PROPERTIES
};
-#if COMPILE_DL
-DLEXPORT zend_module_entry *get_module(void) { return &yaz_module_entry; }
+#ifdef COMPILE_DL_YAZ
+ZEND_GET_MODULE(yaz)
#endif