1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00

Make yaz compilable as shared module.

This commit is contained in:
Sascha Schumann
2000-06-10 03:35:57 +00:00
parent cdb98a04a5
commit 01740bfb0d
3 changed files with 47 additions and 50 deletions
+2
View File
@@ -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
+43 -48
View File
@@ -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
+2 -2
View File
@@ -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