summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-07-26 12:17:27 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-07-26 12:17:27 +0300
commit740382e36ef6ed36207093a1a6787fe02b4da578 (patch)
tree4b358d267466bc2a292b5eb4c0e48ebb5c0a6e3c
parentd218c5f7b45dfcd73ed67dcf41139a3cc98e32fb (diff)
downloadunit-740382e36ef6ed36207093a1a6787fe02b4da578.tar.gz
unit-740382e36ef6ed36207093a1a6787fe02b4da578.tar.bz2
Improved Go configure test.
-rw-r--r--auto/modules/go/conf17
1 files changed, 10 insertions, 7 deletions
diff --git a/auto/modules/go/conf b/auto/modules/go/conf
index 79651d98..e7c346e1 100644
--- a/auto/modules/go/conf
+++ b/auto/modules/go/conf
@@ -4,22 +4,25 @@
$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"
+
+ NXT_GO_VERSION="`${NXT_GO} version`"
$echo " + Go version: ${NXT_GO_VERSION}"
else
+ $echo "----------" >> $NXT_AUTOCONF_ERR
+ $echo $nxt_go_test >> $NXT_AUTOCONF_ERR
+ $echo "----------" >> $NXT_AUTOCONF_ERR
$echo
$echo
- $echo $0: error: Go not found.
+ $echo $0: error: no Go found.
$echo
exit 1;
fi