From 2ccdf35dd62fe639e35e81ab149aa98bdfba8d87 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 9 Dec 2010 07:39:19 +0000 Subject: [PATCH] more standard configure messages for checking Go version git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12341 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- configure.in | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/configure.in b/configure.in index 20558ec95..ff4fc0def 100644 --- a/configure.in +++ b/configure.in @@ -1995,29 +1995,33 @@ AC_ARG_WITH(go, AS_HELP_STRING([--without-go], [Disable Go]) AS_HELP_STRING([--with-go=path], [Set location of Go compiler]),[GOBIN="$withval"], [GOBIN=yes]) if test x"${GOBIN}" = xno -o x"${with_alllang}" = xno ; then -AC_MSG_NOTICE([Disabling Go]) -GO= -GOGCC=false + AC_MSG_NOTICE([Disabling Go]) + GO= + GOGCC=false else - if test "x$GOBIN" = xyes; then - AC_CHECK_PROGS(GO, 6g 8g gccgo) - else - GO="$GOBIN" - fi + if test "x$GOBIN" = xyes; then + AC_CHECK_PROGS(GO, 6g 8g gccgo) + else + GO="$GOBIN" + fi - if test -n "$GO" ; then - GOGCC=false - if $GO --help 2>/dev/null | grep gccgo >/dev/null 2>&1 ; then - GOGCC=true + if test -n "$GO" ; then + GOGCC=false + if $GO --help 2>/dev/null | grep gccgo >/dev/null 2>&1 ; then + GOGCC=true + else + AC_MSG_CHECKING([whether Go ($GO) version is too old]) + go_version=`$GO -V | sed -e 's/.*version \([[0-9]]*\).*/\1/'` + go_min_version=6707 + if test "$go_version" -lt $go_min_version; then + AC_MSG_RESULT([yes - minimum version is $go_min_version]) + GO= else - go_version=`$GO -V | sed -e 's/.*version \([[0-9]]*\).*/\1/'` - if test "$go_version" -lt 6707; then - AC_MSG_NOTICE([Installed Go too old; disabling Go]) - GO= - fi + AC_MSG_RESULT([no]) fi fi + fi fi AC_SUBST(GOGCC)