2001-11-30 19:00:13 +00:00
|
|
|
dnl
|
2000-05-25 21:54:35 +00:00
|
|
|
dnl $Id$
|
2001-11-30 19:00:13 +00:00
|
|
|
dnl
|
2000-05-25 21:54:35 +00:00
|
|
|
|
2000-06-10 03:35:57 +00:00
|
|
|
PHP_ARG_WITH(yaz,for YAZ support,
|
2001-11-30 19:00:13 +00:00
|
|
|
[ --with-yaz[=DIR] Include YAZ support (ANSI/NISO Z39.50).
|
|
|
|
DIR is the YAZ bin install directory.])
|
2000-06-10 03:35:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
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
|
2002-09-20 02:46:38 +00:00
|
|
|
|
|
|
|
dnl Check version (1.9 or greater required)
|
|
|
|
AC_MSG_CHECKING([for YAZ version])
|
|
|
|
yaz_version=`echo $YAZVERSION | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
|
|
|
|
if test "$yaz_version" -ge 1009000; then
|
|
|
|
AC_MSG_RESULT([$YAZVERSION])
|
|
|
|
else
|
2002-09-20 15:42:23 +00:00
|
|
|
AC_MSG_ERROR([YAZ version 1.9 or later required.])
|
2002-09-20 02:46:38 +00:00
|
|
|
fi
|
|
|
|
|
2001-11-08 21:37:49 +00:00
|
|
|
for c in $YAZLIB; do
|
|
|
|
case $c in
|
|
|
|
-L*)
|
|
|
|
dir=`echo $c|cut -c 3-|sed 's%/\.libs%%g'`
|
2003-01-15 07:57:52 +00:00
|
|
|
PHP_ADD_LIBPATH($dir,YAZ_SHARED_LIBADD)
|
2001-11-08 21:37:49 +00:00
|
|
|
;;
|
2003-01-15 07:57:52 +00:00
|
|
|
-l*)
|
|
|
|
lib=`echo $c|cut -c 3-`
|
|
|
|
PHP_ADD_LIBRARY($lib,YAZ_SHARED_LIBADD)
|
2002-07-11 13:02:52 +00:00
|
|
|
;;
|
2001-11-08 21:37:49 +00:00
|
|
|
esac
|
|
|
|
done
|
2000-06-17 10:51:26 +00:00
|
|
|
PHP_EVAL_INCLINE($YAZINC)
|
2002-03-12 16:44:00 +00:00
|
|
|
PHP_NEW_EXTENSION(yaz, php_yaz.c, $ext_shared)
|
2002-06-02 21:58:35 +00:00
|
|
|
else
|
|
|
|
AC_MSG_ERROR([YAZ not found (missing $yazconfig)])
|
2000-06-10 03:35:57 +00:00
|
|
|
fi
|
|
|
|
fi
|