summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKarl Wette <karl.wette@ligo.org>2014-04-25 00:12:06 +0200
committerKarl Wette <karl.wette@ligo.org>2014-05-02 21:44:52 +0200
commit66555ad2a7f8a0cfad9fff16fcace79346af8033 (patch)
treeebd5cecb217ceb58e816581a89f2f45e59bcb83f /configure.ac
parentb6c1889c0891bebcbfd0256d445792a85de8cc91 (diff)
downloadswig-66555ad2a7f8a0cfad9fff16fcace79346af8033.tar.gz
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)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 091749f53..d83e0d31b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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