X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=yazpp.m4;h=cf121a0dbd7254a491a1d2ee1d9fc568533705b6;hp=a5289361f49d37608879016ded1d203044e9dcb4;hb=9c4af9d938abac93a949d756353c1bd89b769012;hpb=8b62f21d4317c0d9f48630a9782b1edb944bb11a diff --git a/yazpp.m4 b/yazpp.m4 index a528936..cf121a0 100644 --- a/yazpp.m4 +++ b/yazpp.m4 @@ -6,24 +6,24 @@ AC_DEFUN([YAZPP_INIT], AC_SUBST(YAZPPVERSION) yazppconfig=NONE yazpppath=NONE - AC_ARG_WITH(yazpp, [ --with-yazpp=DIR yaz++-config in DIR (example /home/yaz++-0.8)], [yazpppath=$withval]) + AC_ARG_WITH(yazpp, [ --with-yazpp=DIR yazpp-config in DIR (example /home/yazpp-1.0.0)], [yazpppath=$withval]) if test "x$yazpppath" != "xNONE"; then - yazppconfig=$yazpppath/yaz++-config + yazppconfig=$yazpppath/yazpp-config else if test "x$srcdir" = "x"; then yazppsrcdir=. else yazppsrcdir=$srcdir fi - for i in ${yazppsrcdir}/../../yaz++ ${yazppsrcdir}/../yaz++-* ${yazppsrcdir}/../yaz++; do + for i in ${yazppsrcdir}/../../yazpp ${yazppsrcdir}/../yazpp-* ${yazppsrcdir}/../yazpp; do if test -d $i; then - if test -r $i/yaz++-config; then - yazppconfig=$i/yaz++-config + if test -r $i/yazpp-config; then + yazppconfig=$i/yazpp-config fi fi done if test "x$yazppconfig" = "xNONE"; then - AC_PATH_PROG(yazppconfig, yaz++-config, NONE) + AC_PATH_PROG(yazppconfig, yazpp-config, NONE) fi fi AC_MSG_CHECKING(for YAZ++) @@ -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 ])