From: Adam Dickmeiss Date: Mon, 7 Feb 2005 09:07:51 +0000 (+0000) Subject: Added version check X-Git-Tag: YAZPROXY.0.9~7 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=59bb175d89a8b050166b99b8f223ad5163835e55;p=yazproxy-moved-to-github.git Added version check --- diff --git a/yazpp.m4 b/yazpp.m4 index a528936..63be11e 100644 --- a/yazpp.m4 +++ b/yazpp.m4 @@ -37,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 ])