Fix go configuration and SWIG_GCC_VERSION

- in configure.ac: modify sed expression to only look at first line of
  gccgo --version, extract the last numeric token, and remove periods;
  this parses e.g. "gccgo (Debian 4.7.2-5) 4.7.2"
- in goruntime.swg: fix typo in __GNUC_PATCHLEVEL__ (SF Bug #1298)
This commit is contained in:
Karl Wette 2014-04-25 00:12:06 +02:00
commit 66555ad2a7
3 changed files with 11 additions and 3 deletions

View file

@ -8,6 +8,10 @@ Version 3.0.1 (in progress)
2014-05-01: olly
[PHP] The generated __isset() method now returns true for read-only properties.
2014-04-24: kwwette
[Go] Fix go ./configure parsing of gccgo --version, and
goruntime.swg typo in __GNUC_PATCHLEVEL__ (SF Bug #1298)
2014-04-24: kwwette
Fix {python|perl5|ruby|tcl}/java examples

View file

@ -116,7 +116,7 @@ extern void _cgo_panic(const char *);
file is the same as the version of gccgo. */
#define SWIG_GCC_VERSION \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC__PATH_LEVEL__)
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#if SWIG_GCC_VERSION < 40700
#define SwigDoCgocall()

View file

@ -2266,9 +2266,13 @@ else
GOGCC=true
GOVERSIONOPTION=--version
AC_MSG_CHECKING([whether gccgo version is too old])
go_version=`$GO $GOVERSIONOPTION | sed -e 's/[^0-9]* \([0-9.]*\) .*$/\1/' -e 's/[.]//g'`
if test "$go_version" -lt 470; then
go_version=[`$GO $GOVERSIONOPTION | sed -n '1p' | sed -e 's/^.* \([0-9.]*\) *$/\1/' -e 's/[.]//g'`]
if test "x$go_version" = x; then
AC_MSG_RESULT([could not determine gccgo version - disabling Go])
GO=
elif test "$go_version" -lt 470; then
AC_MSG_RESULT([yes - minimum version is 4.7.0])
GO=
else
AC_MSG_RESULT([no])
if test "$go_version" -lt 480; then