1 ## $Id: yaz.m4,v 1.4 2002-11-27 00:53:02 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 if test "x$srcdir" = "x"; then
24 for i in ${yazsrcdir}/../yaz* ${yazsrcdir}/../yaz ../yaz* ../yaz; do
26 if test -r $i/yaz-config; then
27 yazconfig=$i/yaz-config
31 if test "x$yazconfig" = "xNONE"; then
32 AC_PATH_PROG(yazconfig, yaz-config, NONE)
35 AC_MSG_CHECKING(for YAZ)
36 if $yazconfig --version >/dev/null 2>&1; then
37 YAZLIB=`$yazconfig --libs $1`
38 # if this is empty, it's a simple version YAZ 1.6 script
39 # so we have to source it instead...
40 if test "X$YAZLIB" = "X"; then
43 YAZLALIB=`$yazconfig --lalibs $1`
44 YAZINC=`$yazconfig --cflags $1`
45 YAZVERSION=`$yazconfig --version`
47 AC_MSG_RESULT($yazconfig)
49 AC_MSG_RESULT(Not found)