blob: e7c346e11f9d2b5f4a7b099796313b59d41b2abb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# Copyright (C) Max Romanov
# Copyright (C) NGINX, Inc.
$echo -n "checking for Go ..."
$echo "checking for Go ..." >> $NXT_AUTOCONF_ERR
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 "$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: no Go found.
$echo
exit 1;
fi
NXT_GO_MODULE_SRCS=" \
src/nxt_go.c \
"
NXT_MODULES_INIT="$NXT_MODULES_INIT nxt_go_module_init"
NXT_MODULES_SRCS="$NXT_MODULES_SRCS $NXT_GO_MODULE_SRCS"
|