Improved Go configure test.

This commit is contained in:
Igor Sysoev
2017-07-26 12:17:27 +03:00
parent d218c5f7b4
commit 740382e36e

View File

@@ -4,22 +4,25 @@
$echo -n "checking for Go ..." $echo -n "checking for Go ..."
$echo -n "checking for Go ..." >> $NXT_AUTOCONF_ERR $echo "checking for Go ..." >> $NXT_AUTOCONF_ERR
NXT_GO_VERSION="`${NXT_GO} version`" nxt_go_test="GOPATH=`pwd` CGO_CPPFLAGS=-DNXT_CONFIGURE \
\"${NXT_GO}\" build -o build/nxt_go_gen.a --buildmode=c-archive nginext"
if /bin/sh -c "GOPATH=`pwd` CGO_CPPFLAGS=-DNXT_CONFIGURE \
\"${NXT_GO}\" build -o build/nxt_go_gen.a --buildmode=c-archive nginext" \
>> $NXT_AUTOCONF_ERR 2>&1;
then if /bin/sh -c "$nxt_go_test" >> $NXT_AUTOCONF_ERR 2>&1; then
$echo " found" $echo " found"
NXT_GO_VERSION="`${NXT_GO} version`"
$echo " + Go version: ${NXT_GO_VERSION}" $echo " + Go version: ${NXT_GO_VERSION}"
else else
$echo "----------" >> $NXT_AUTOCONF_ERR
$echo $nxt_go_test >> $NXT_AUTOCONF_ERR
$echo "----------" >> $NXT_AUTOCONF_ERR
$echo $echo
$echo $echo
$echo $0: error: Go not found. $echo $0: error: no Go found.
$echo $echo
exit 1; exit 1;
fi fi