]> granicus.if.org Git - php/commitdiff
Added check for yaz version into configure.
authorfoobar <sniper@php.net>
Fri, 20 Sep 2002 02:46:38 +0000 (02:46 +0000)
committerfoobar <sniper@php.net>
Fri, 20 Sep 2002 02:46:38 +0000 (02:46 +0000)
ext/yaz/config.m4

index 20f5384a179cea129f532b70b0c244424296401b..96356cae8a8644e26e86266815ec6653a0dca4fc 100644 (file)
@@ -22,6 +22,16 @@ if test "$PHP_YAZ" != "no"; then
   if test -f $yazconfig; then
     AC_DEFINE(HAVE_YAZ,1,[Whether you have YAZ])
     . $yazconfig
+
+    dnl Check version (1.9 or greater required)
+    AC_MSG_CHECKING([for YAZ version])
+    yaz_version=`echo $YAZVERSION | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
+    if test "$yaz_version" -ge 1009000; then
+      AC_MSG_RESULT([$YAZVERSION])
+    else
+      AC_MSG_ERROR(YAZ version 1.9 or later required.])
+    fi
+
     dir=""
     for c in $YAZLIB; do
       case $c in