aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-12-10 12:58:46 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-12-10 12:58:46 +0200
commit5b214e3d72f9e261a37cf31deb41e7f8a61a1811 (patch)
tree7cbd83619a7675ea83ff5a8360a065475655e425
parent5f6dce2f7dd35a154333bb42d134a018b981f812 (diff)
downloadacvmod-5b214e3d72f9e261a37cf31deb41e7f8a61a1811.tar.gz
acvmod-5b214e3d72f9e261a37cf31deb41e7f8a61a1811.tar.bz2
Fix version comparison in AM_VARNISHAPI. Improve diagnostics.
-rw-r--r--varnishapi.m416
1 files changed, 8 insertions, 8 deletions
diff --git a/varnishapi.m4 b/varnishapi.m4
index 8a00c8f..147230c 100644
--- a/varnishapi.m4
+++ b/varnishapi.m4
@@ -35,14 +35,11 @@ m4_define([VAPI_CHECK_VER],[
35 varnishapi_version_diff=older 35 varnishapi_version_diff=older
36 elif test $VARNISHAPI_MINOR -gt $2; then 36 ])elif test $VARNISHAPI_MINOR -gt m4_if([$2],,0,[$2]); then
37 varnishapi_version_diff=newer 37 varnishapi_version_diff=newer
38 ])m4_if([$3],,,[elif test $VARNISHAPI_PATCH -lt $3; then 38 m4_if([$3],,,[elif test $VARNISHAPI_PATCH -lt $3; then
39 varnishapi_version_diff=older 39 varnishapi_version_diff=older
40 elif test $VARNISHAPI_PATCH -gt $3; then 40 ])elif test $VARNISHAPI_PATCH -gt m4_if([$3],,0,[$3]); then
41 varnishapi_version_diff=newer 41 varnishapi_version_diff=newer
42 ])else 42 else
43 varnishapi_version_diff=same 43 varnishapi_version_diff=same
44 fi 44 fi
45 if test $varnishapi_version_diff = older; then
46 AC_MSG_ERROR([unsupported varnishapi version $VARNISHAPI_MAJOR.$VARNISHAPI_MINOR.$VARNISHAPI_PATCH])
47 fi
48])]) 45])])
@@ -107,2 +104,5 @@ AC_DEFUN([AM_VARNISHAPI],
107 VAPI_CHECK_VER(m4_unquote(m4_split(m4_if([ver],AC_PACKAGE_VERSION,[$1],[$1],,[ver],[$1]),\.))) 104 VAPI_CHECK_VER(m4_unquote(m4_split(m4_if([ver],AC_PACKAGE_VERSION,[$1],[$1],,[ver],[$1]),\.)))
105 if test $varnishapi_version_diff = older; then
106 AC_MSG_ERROR([varnishapi version too old: $VARNISHAPI_MAJOR.$VARNISHAPI_MINOR.$VARNISHAPI_PATCH; required at least $1])
107 fi
108 108
@@ -164,3 +164,3 @@ if test "$varnishapi_version_diff" = newer; then
164WARNING: This version is newer than the latest version for which 164WARNING: This version is newer than the latest version for which
165$PACKAGE_STRING was tested. If it doesn't compile, please send a mail to 165$PACKAGE_STRING was tested ($2). If it doesn't compile, please report it to
166<$PACKAGE_BUGREPORT>. 166<$PACKAGE_BUGREPORT>.

Return to:

Send suggestions and report system problems to the System administrator.