[Go] In configure script, require Go 1.1 or later.

This commit is contained in:
Ian Lance Taylor 2014-09-30 12:42:21 -07:00
commit 0d6cebc7c4
2 changed files with 28 additions and 15 deletions

View file

@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.3 (in progress) Version 3.0.3 (in progress)
=========================== ===========================
2014-09-30: ianlancetaylor
[Go] In configure script, require Go 1.1 or later.
2014-09-30: wsfulton 2014-09-30: wsfulton
[Python] Patch #207 - Fix No module error with -relativeimport when using single [Python] Patch #207 - Fix No module error with -relativeimport when using single
header file import. header file import.

View file

@ -2291,14 +2291,21 @@ else
GOVERSIONOPTION=version GOVERSIONOPTION=version
GOC=$(sh -c "$(go env) && echo \$GOCHAR")c GOC=$(sh -c "$(go env) && echo \$GOCHAR")c
go_version=$($GO $GOVERSIONOPTION | sed -e 's/go version //') go_version=$($GO $GOVERSIONOPTION | sed -e 's/go version //')
AC_MSG_CHECKING([whether go version is too old])
case $go_version in case $go_version in
go1.0*) GOOPT="-intgosize 32" ;; go1.0*)
*) if test "$GOC" = "6c"; then AC_MSG_RESULT([yes - minimum version is 1.1])
GOOPT="-intgosize 64" GO=
else GOOPT="-intgosize 32"
GOOPT="-intgosize 32" ;;
fi *)
;; AC_MSG_RESULT([no])
if test "$GOC" = "6c"; then
GOOPT="-intgosize 64"
else
GOOPT="-intgosize 32"
fi
;;
esac esac
case $go_version in case $go_version in
go1.0* | go1.1*) go1.0* | go1.1*)
@ -2315,14 +2322,17 @@ else
GOC=`echo $GO | sed -e 's/g/c/'` GOC=`echo $GO | sed -e 's/g/c/'`
GOVERSIONOPTION=-V GOVERSIONOPTION=-V
AC_MSG_CHECKING([whether Go ($GO) version is too old]) AC_MSG_CHECKING([whether Go ($GO) version is too old])
go_version=`$GO $GOVERSIONOPTION 2>/dev/null | sed -e 's/.*version.* \([[0-9]]*\).*/\1/'` AC_MSG_RESULT([yes - minimum version is 1.1])
go_min_version=7077 GO=
if test "$go_version" != "" -a "$go_version" -lt $go_min_version; then dnl Old code retained for now in case we implement an option for it.
AC_MSG_RESULT([yes - minimum version is $go_min_version]) dnl go_version=`$GO $GOVERSIONOPTION 2>/dev/null | sed -e 's/.*version.* \([[0-9]]*\).*/\1/'`
GO= dnl go_min_version=7077
else dnl if test "$go_version" != "" -a "$go_version" -lt $go_min_version; then
AC_MSG_RESULT([no]) dnl AC_MSG_RESULT([yes - minimum version is $go_min_version])
fi dnl GO=
dnl else
dnl AC_MSG_RESULT([no])
dnl fi
GOOPT="-intgosize 32" GOOPT="-intgosize 32"
GO12=false GO12=false
GO13=false GO13=false