You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2015/03/19 03:09:05 UTC

thrift git commit: THRIFT-2598 Add check for minimum Go version to configure.ac Client: Go Patch: Jens Geyer

Repository: thrift
Updated Branches:
  refs/heads/master d565e2f49 -> 0cfdf7cb9


THRIFT-2598 Add check for minimum Go version to configure.ac
Client: Go
Patch: Jens Geyer

This closes #399


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/0cfdf7cb
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/0cfdf7cb
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/0cfdf7cb

Branch: refs/heads/master
Commit: 0cfdf7cb9de0657f01882e356f447651914e4a21
Parents: d565e2f
Author: Jens Geyer <je...@apache.org>
Authored: Wed Mar 18 23:38:43 2015 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Thu Mar 19 04:08:18 2015 +0200

----------------------------------------------------------------------
 configure.ac | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/0cfdf7cb/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 333a4e5..6b26de5 100755
--- a/configure.ac
+++ b/configure.ac
@@ -340,7 +340,24 @@ AX_THRIFT_LIB(go, [Go], yes)
 if test "$with_go" = "yes";  then
   AC_PATH_PROG([GO], [go])
   if [[ -x "$GO" ]] ; then
-    have_go="yes"
+    AS_IF([test -n "$GO"],[
+      ax_go_version="1.4"
+
+      AC_MSG_CHECKING([for Go version])
+      golang_version=`$GO version 2>&1 | $SED -e 's/\(go \)\(version \)\(go\)\(@<:@0-9@:>@.@<:@0-9@:>@.@<:@0-9@:>@\)\(@<:@\*@:>@*\).*/\4/'`
+      AC_MSG_RESULT($golang_version)
+      AC_SUBST([golang_version],[$golang_version])
+      AX_COMPARE_VERSION([$ax_go_version],[le],[$golang_version],[
+      :
+        have_go="yes"
+      ],[
+      :
+        have_go="no"
+      ])
+    ],[
+      AC_MSG_WARN([could not find Go ])
+      have_go="no"
+    ])
   fi
 fi
 AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"])