diff options
author | Marcus Brinkmann <[email protected]> | 2011-10-13 15:43:12 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2011-10-13 15:43:12 +0000 |
commit | 3a0f06e3e801fe6f6f0cf7a78fe92118e6f4e743 (patch) | |
tree | fd622e29fe330b1c3748069737859ae14b6c0757 | |
parent | Merge branch 'master' into npth (diff) | |
download | gnupg-3a0f06e3e801fe6f6f0cf7a78fe92118e6f4e743.tar.gz gnupg-3a0f06e3e801fe6f6f0cf7a78fe92118e6f4e743.zip |
Fix npth version check.
-rw-r--r-- | m4/npth.m4 | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/m4/npth.m4 b/m4/npth.m4 index 7797f07ac..5b60e2cec 100644 --- a/m4/npth.m4 +++ b/m4/npth.m4 @@ -23,11 +23,9 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG], npth_version=`$NPTH_CONFIG --version` fi npth_version_major=`echo $npth_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` npth_version_minor=`echo $npth_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` - npth_version_micro=`echo $npth_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` ]) dnl AM_PATH_NPTH([MINIMUM-VERSION, @@ -36,7 +34,7 @@ dnl Test for libnpth and define NPTH_CFLAGS and NPTH_LIBS. dnl AC_DEFUN([AM_PATH_NPTH], [ AC_REQUIRE([_AM_PATH_NPTH_CONFIG])dnl - tmp=ifelse([$1], ,1:0.0.1,$1) + tmp=ifelse([$1], ,1:0.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_npth_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_npth_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` @@ -49,23 +47,16 @@ AC_DEFUN([AM_PATH_NPTH], ok=no if test "$NPTH_CONFIG" != "no" ; then req_major=`echo $min_npth_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` req_minor=`echo $min_npth_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - req_micro=`echo $min_npth_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` + if test "$npth_version_major" -gt "$req_major"; then ok=yes else if test "$npth_version_major" -eq "$req_major"; then - if test "$npth_version_minor" -gt "$req_minor"; then + if test "$npth_version_minor" -ge "$req_minor"; then ok=yes - else - if test "$npth_version_minor" -eq "$req_minor"; then - if test "$npth_version_micro" -ge "$req_micro"; then - ok=yes - fi - fi fi fi fi |