blob: d3b063f8eacc3396aad22bc23bf1f14c8754cbb1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
diff -ru a/acinclude.m4 b/acinclude.m4
--- a/acinclude.m4 2012-05-22 18:04:38.857619515 +0200
+++ b/acinclude.m4 2012-05-22 17:41:53.000000000 +0200
@@ -1008,15 +1008,28 @@
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='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false'
+ [swig_version_ok=0]
+ if test $available_major -gt $required_major; then
+ [swig_version_ok=1]
else
- AC_MSG_NOTICE([SWIG executable is '$SWIG'])
- SWIG_LIB=`$SWIG -swiglib`
- AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB'])
+ if test $available_major -eq $required_major; then
+ if test $available_minor -gt $required_minor; then
+ [swig_version_ok=1]
+ else
+ if test $available_minor -eq $required_minor \
+ -a $available_patch -ge $required_patch; then
+ [swig_version_ok=1]
+ fi
+ fi
+ fi
+ fi
+ if test $swig_version_ok; 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])
|