X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=yazpp.m4;h=63be11e5131c745dff480dd2d4c5fc511160b555;hp=65bb934f17a3693fdf3c4e37c0d5fb1452511a28;hb=c6ca4f0f79d5ea0ca391d420bcb6dd6b4d7935d2;hpb=fc1109697ba85291047348453030e22a7b969a82 diff --git a/yazpp.m4 b/yazpp.m4 index 65bb934..63be11e 100644 --- a/yazpp.m4 +++ b/yazpp.m4 @@ -1,4 +1,3 @@ -## $Id: yazpp.m4,v 1.3 2004-04-22 07:52:51 adam Exp $ AC_DEFUN([YAZPP_INIT], [ AC_SUBST(YAZPPLIB) @@ -16,7 +15,7 @@ AC_DEFUN([YAZPP_INIT], else yazppsrcdir=$srcdir fi - for i in ${yazppsrcdir}/../yaz++-* ${yazppsrcdir}/../yaz++; do + for i in ${yazppsrcdir}/../../yaz++ ${yazppsrcdir}/../yaz++-* ${yazppsrcdir}/../yaz++; do if test -d $i; then if test -r $i/yaz++-config; then yazppconfig=$i/yaz++-config @@ -38,5 +37,16 @@ AC_DEFUN([YAZPP_INIT], AC_MSG_RESULT(Not found) YAZVERSION=NONE fi + if test "X$YAZPPVERSION" != "XNONE"; then + AC_MSG_CHECKING([for YAZ++ version]) + AC_MSG_RESULT([$YAZPPVERSION]) + if test "$2"; then + have_yaz_version=`echo "$YAZPPVERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` + req_yaz_version=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` + if test "$have_yaz_version" -lt "$req_yaz_version"; then + AC_MSG_ERROR([$YAZPPVERSION. Requires $2 or later]) + fi + fi + fi ])