1 ## $Id: yaz.m4,v 1.1 2001-02-21 11:00:05 adam Exp $
3 # Use this m4 funciton for autoconf if you use YAZ in your own
15 AC_ARG_WITH(yazconfig, [ --with-yazconfig=DIR yaz-config in DIR (example /home/yaz-1.7)], [yazpath=$withval])
16 if test "x$yazpath" != "xNONE"; then
17 yazconfig=$yazpath/yaz-config
19 for i in ../yaz* ../yaz; do
21 if test -r $i/yaz-config; then
22 yazconfig=$i/yaz-config
26 if test "x$yazconfig" = "xNONE"; then
27 AC_PATH_PROG(yazconfig, yaz-config, NONE)
30 AC_MSG_CHECKING(for YAZ)
31 if $yazconfig --version >/dev/null 2>&1; then
32 YAZLIB=`$yazconfig --libs $1`
33 # if this is empty, it's a simple version YAZ 1.6 script
34 # so we have to source it instead...
35 if test "X$YAZLIB" = "X"; then
38 YAZLALIB=`$yazconfig --lalibs $1`
39 YAZINC=`$yazconfig --cflags $1`
40 YAZVERSION=`$yazconfig --version`
42 AC_MSG_RESULT($yazconfig)
44 AC_MSG_RESULT(Not found)