simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Simulavr-devel] [bug #30584] failed to configure with swig 2.0.0


From: mela
Subject: [Simulavr-devel] [bug #30584] failed to configure with swig 2.0.0
Date: Sat, 11 Dec 2010 01:05:59 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Firefox/3.6.12

Follow-up Comment #2, bug #30584 (project simulavr):

This is also a problem for me (Arch linux has swig 2.x)

Is this a more acceptable approach?

diff --git a/m4/ac_pkg_swig.m4 b/m4/ac_pkg_swig.m4
index cf55025..bab036a 100644
--- a/m4/ac_pkg_swig.m4
+++ b/m4/ac_pkg_swig.m4
@@ -75,7 +75,7 @@ AC_DEFUN([AC_PROG_SWIG],[
                 SWIG='echo "Error: SWIG is not installed. You should look at
http://www.swig.org"; ; false'
         elif test -n "$1" ; then
                 AC_MSG_CHECKING([for SWIG version])
-                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' |
sed 's/.*([0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*).*/1/g'`]
+                [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' |
sed 's/^[^0-9]*([0-9.]*).*$/1/'` ]
                 AC_MSG_RESULT([$swig_version])
                 if test -n "$swig_version" ; then
                         # Calculate the required version number components
@@ -110,14 +110,21 @@ 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
+
+                        # Determine suitability.
+                        unset SWIG_LIB
+                        if test $available_major -gt $required_major; then
+                                SWIG_LIB=`$SWIG -swiglib`
+                        elif test $available_minor -gt $required_minor;
then
+                                SWIG_LIB=`$SWIG -swiglib`
+                        elif test $available_patch -gt $required_patch;
then
+                                SWIG_LIB=`$SWIG -swiglib`
+                        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'
-                        else
                                 AC_MSG_NOTICE([SWIG executable is '$SWIG'])
-                                SWIG_LIB=`$SWIG -swiglib`
+                        fi
+                        if test -n $SWIG_LIB  ; then
                                 AC_MSG_NOTICE([SWIG library directory is
'$SWIG_LIB'])
                         fi
                 else


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?30584>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]