Allow YAZ 2 series only master
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 27 Feb 2014 13:21:31 +0000 (14:21 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 27 Feb 2014 13:21:31 +0000 (14:21 +0100)
yaz.m4

diff --git a/yaz.m4 b/yaz.m4
index 5b39828..d697125 100644 (file)
--- a/yaz.m4
+++ b/yaz.m4
@@ -123,15 +123,15 @@ AC_DEFUN([YAZ_INIT],
        if test "X$YAZVERSION" != "XNONE"; then
                AC_MSG_CHECKING([for YAZ version])
                AC_MSG_RESULT([$YAZVERSION])
        if test "X$YAZVERSION" != "XNONE"; then
                AC_MSG_CHECKING([for YAZ version])
                AC_MSG_RESULT([$YAZVERSION])
+               have_yaz_version=`echo "$YAZVERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`
                if test "$2"; then
                if test "$2"; then
-                       have_yaz_version=`echo "$YAZVERSION" | 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([$YAZVERSION. Requires $2 or later])
                        fi
                        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([$YAZVERSION. Requires $2 or later])
                        fi
-                       if test "$req_yaz_version" -gt "2000028"; then
-                               YAZINC="$YAZINC -DYAZ_USE_NEW_LOG=1"
-                       fi
+               fi
+               if test "$have_yaz_version" -ge "3000000"; then
+                       AC_MSG_ERROR([$YAZVERSION. Version 2 series only])
                fi
        fi
 ]) 
                fi
        fi
 ])