9 AC_ARG_WITH(yazpp, [ --with-yazpp=DIR yaz++-config in DIR (example /home/yaz++-0.8)], [yazpppath=$withval])
10 if test "x$yazpppath" != "xNONE"; then
11 yazppconfig=$yazpppath/yaz++-config
13 if test "x$srcdir" = "x"; then
18 for i in ${yazppsrcdir}/../../yaz++ ${yazppsrcdir}/../yaz++-* ${yazppsrcdir}/../yaz++; do
20 if test -r $i/yaz++-config; then
21 yazppconfig=$i/yaz++-config
25 if test "x$yazppconfig" = "xNONE"; then
26 AC_PATH_PROG(yazppconfig, yaz++-config, NONE)
29 AC_MSG_CHECKING(for YAZ++)
30 if $yazppconfig --version >/dev/null 2>&1; then
31 YAZPPLIB=`$yazppconfig --libs $1`
32 YAZPPLALIB=`$yazppconfig --lalibs $1`
33 YAZPPINC=`$yazppconfig --cflags $1`
34 YAZPPVERSION=`$yazppconfig --version`
35 AC_MSG_RESULT($yazppconfig)
37 AC_MSG_RESULT(Not found)
40 if test "X$YAZPPVERSION" != "XNONE"; then
41 AC_MSG_CHECKING([for YAZ++ version])
42 AC_MSG_RESULT([$YAZPPVERSION])
44 have_yaz_version=`echo "$YAZPPVERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`
45 req_yaz_version=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`
46 if test "$have_yaz_version" -lt "$req_yaz_version"; then
47 AC_MSG_ERROR([$YAZPPVERSION. Requires $2 or later])