summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorGravatar Julien Lavergne2011-07-06 01:14:50 +0200
committerGravatar Martin Szulecki2012-03-20 23:25:55 +0100
commit0b09c07095304ecea34ac785ace791530a42492c (patch)
treecac13c4cd5ba05fe959fdd37ce67c7ddd02df6c1 /m4
parent0befc61c75a5dd289e23a2935b50bbf6125bff4b (diff)
downloadlibimobiledevice-0b09c07095304ecea34ac785ace791530a42492c.tar.gz
libimobiledevice-0b09c07095304ecea34ac785ace791530a42492c.tar.bz2
Fix detection of swig version
Diffstat (limited to 'm4')
-rw-r--r--m4/ac_pkg_swig.m416
1 files changed, 10 insertions, 6 deletions
diff --git a/m4/ac_pkg_swig.m4 b/m4/ac_pkg_swig.m4
index 97244bc..a11eeb3 100644
--- a/m4/ac_pkg_swig.m4
+++ b/m4/ac_pkg_swig.m4
@@ -103,15 +103,19 @@ AC_DEFUN([AC_PROG_SWIG],[
if test -z "$available_patch" ; then
[available_patch=0]
fi
- if test $available_major -ne $required_major \
- -o $available_minor -ne $required_minor \
- -o $available_patch -lt $required_patch ; then
- AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
- SWIG=false
- else
+ if test $available_major -gt $required_major || \
+ ( test $available_major -eq $required_major && \
+ test $available_minor -gt $required_minor ) || \
+ ( test $available_major -eq $required_major && \
+ test $available_minor -eq $required_minor && \
+ test $available_patch -ge $required_patch ) ; then
+
AC_MSG_NOTICE([SWIG executable is '$SWIG'])
SWIG_LIB=`$SWIG -swiglib`
AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
+ else
+ AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org])
+ SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
fi
else
AC_MSG_WARN([cannot determine SWIG version])