Wed 14 Sep 2011 08:14:34 PM UTC, comment #6:
Although this was marked as wontfix by Thomas K. <tomk> in comment #1 I think "Postponed" status would be more appropriate.
Also Ubuntu 11.10 will finally ship with SWIG 2.0. [1]
Unless the patch does allow older versions of SWIG.
Does it allow older versions of SWIG?
(I cannot read autoconf/m4 macros.)
[1] http://packages.ubuntu.com/search?keywords=swig
|
Tue 08 Feb 2011 10:40:48 PM UTC, comment #5:
Er, that was a horribly incomplete version of what's needed. My apologies.
Basically, all of the swig and python macros should be updated: http://www.gnu.org/software/autoconf-archive/The-Macros.html#The-Macros
The rest are probably a bit outdated at this point as well, and could likely use a refresh. (Although that will probably generate a significant amount of new work.) Once that's done, this is what the patch to configure.ac and src/Makefile.am ends up looking like:
This gets me through a "make dist". "make distcheck" is failing for an unrelated reason, but
|
Tue 08 Feb 2011 09:51:37 PM UTC, comment #4:
Just FYI: the latest version of latest version of ax_pkg_swig.m4 fixes this.
configure.ac needs the following patch, once ac_pkg_swig.m4 is removed and ax_pkg_swig.m4 added:
|
Sat 11 Dec 2010 01:09:05 AM UTC, comment #3:
sorry, pasting that diff was a terrible idea. very hard to read so i attached it.
(file #22177)
|
Sat 11 Dec 2010 01:05:59 AM UTC, comment #2:
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
|
Sun 01 Aug 2010 06:51:25 AM UTC, comment #1:
Hi Jiri,
thanks for your patch. But in the moment it wouldn't a good idea to implement your patch. It would block building simulavr for the most people! Because SWIG 2.x is to fresh to occour in the most distributions. Even my Ubuntu 10.04 has a version of 1.3.x and if I'd implement your path, I couldn't build it anymore.
So, the best variant for the moment is to hols this patch in your git stash or change it, if necessary. configure.ac isn't often changed, so its not a big work ... :-)
Maybe in future, if distributions support SWIG 2.x and we get more requests, it's necessary to change. But then, I think, it's more usefull to change the m4 macro to support 1.3.x AND 2.x in simulavr or to switch it with a option in configure.
|
Thu 29 Jul 2010 03:43:04 AM UTC, original submission:
Failed to configure with swig 2.0, but when changed by below included patch it works fine.
configl.log:
WARNING: SWIG version >= 1.3.18 is required. You have 2.0.0. You should look at http://www.swig.org
make:
make[3]: Entering directory `/home/work/work/simulavr/src'
echo "Error: SWIG version >= 1.3.18 is required. You have 2.0.0. You should look at http://www.swig.org" ; false -c++ -o simulavr_wrap.cxx ./simulavr.i
Error: SWIG version >= 1.3.18 is required. You have 2.0.0. You should look at http://www.swig.org
make[3]: *** [simulavr_wrap.cxx] Error 1
diff --git a/configure.ac b/configure.ac
index c785e5f..98f5448 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@ fi
LT_INIT
LT_PREREQ([2.2])
AC_PROG_CXX
-AC_PROG_SWIG(1.3.18)
+AC_PROG_SWIG(2.0.0)
SWIG_ENABLE_CXX
SWIG_MULTI_MODULE_SUPPORT
AM_CONDITIONAL([USE_SWIG],[test "x$SWIG" != 'x'])
|