Use goroot to find go and gofmt

Fix #752
pull/764/merge
John Shahid 2014-07-18 11:33:35 -04:00
parent b4d524a6b0
commit 492fe309c8
2 changed files with 6 additions and 6 deletions

6
configure vendored
View File

@ -1846,7 +1846,7 @@ fi
# Check whether --with-goroot was given.
if test "${with_goroot+set}" = set; then :
withval=$with_goroot; GO=$withval/bin/go; GOROOT=$withval
withval=$with_goroot; GOROOT=$withval
fi
# Extract the first word of "go", so it can be a program name with args.
@ -1862,7 +1862,7 @@ else
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
for as_dir in $PATH$PATH_SEPARATOR$withval/bin$PATH_SEPARATOR
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
@ -1906,7 +1906,7 @@ else
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
for as_dir in $PATH$PATH_SEPARATOR$withval/bin$PATH_SEPARATOR
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.

View File

@ -14,13 +14,13 @@ fi
AC_ARG_WITH([goroot],
[AS_HELP_STRING([--with-goroot],
[Set goroot to use])],
[GO=$withval/bin/go; GOROOT=$withval],
[GOROOT=$withval],
[])
AC_PATH_PROG(GO, go, "notfound")
AC_PATH_PROG(GO, go, "notfound", [$PATH$PATH_SEPARATOR$withval/bin$PATH_SEPARATOR])
if test x"${GO}" == x"notfound"; then
AC_MSG_ERROR([Please install GO (or make sure it's on your path) before trying to build Influxdb])
fi
AC_PATH_PROG(GOFMT, gofmt, "notfound")
AC_PATH_PROG(GOFMT, gofmt, "notfound", [$PATH$PATH_SEPARATOR$withval/bin$PATH_SEPARATOR])
if test x"${GOFMT}" == x"notfound"; then
AC_MSG_ERROR([Please install GO (or make sure it's on your path) before trying to build Influxdb])
fi