diff options
author | Julien Lavergne | 2011-07-06 01:14:50 +0200 |
---|---|---|
committer | Martin Szulecki | 2012-03-22 18:54:42 +0100 |
commit | c47223c3bfedad17e4b0c99c0118c2c7b2b6b65a (patch) | |
tree | beb47740613321f6943d161c587e79806ca1085c /m4 | |
parent | 5b5eaffa21105de2cd203f9271945669e0767e4b (diff) | |
download | libimobiledevice-c47223c3bfedad17e4b0c99c0118c2c7b2b6b65a.tar.gz libimobiledevice-c47223c3bfedad17e4b0c99c0118c2c7b2b6b65a.tar.bz2 |
Fix detection of swig version
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ac_pkg_swig.m4 | 16 |
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]) |