tools: build golang tools if go compiler is present

By default, if the go compiler is found by the configure script, build
the golang tools. If the compiler is not found, and --enable-golang was
not explicitly set, do not build to the golang tools.

The corresponding make variable is CONFIG_GOLANG. Remove CONFIG_GOLANG
from tools/Rules.mk since the variable is now set by configure in
config/Tools.mk.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Acked-by: Wei Liu <wl@xen.org>
Acked-by: George Dunlap <george.dunlap@citrix.com>
This commit is contained in:
Nick Rosbrook authored and Wei Liu committed 2020-04-27 14:24:59 +01:00
1 parent 8d4c17a90b
commit 1e13ea98bb
5 files changed
+155 -2

No files matched your search

+12
View File
@@ -73,6 +73,7 @@ m4_include([../m4/fetcher.m4])
m4_include([../m4/ax_compare_version.m4])
m4_include([../m4/paths.m4])
m4_include([../m4/systemd.m4])
m4_include([../m4/golang.m4])
AX_XEN_EXPAND_CONFIG()
@@ -84,6 +85,7 @@ AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
AX_ARG_DEFAULT_ENABLE([golang], [Disable Go tools])
AC_ARG_WITH([linux-backend-modules],
AS_HELP_STRING([--with-linux-backend-modules="mod1 mod2"],
@@ -320,6 +322,16 @@ AS_IF([test "x$ocamltools" = "xy"], [
])
])
AS_IF([test "x$golang" = "xy"], [
AC_PROG_GO
AS_IF([test "x$GO" = "xno"], [
AS_IF([test "x$enable_golang" = "xyes"], [
AC_MSG_ERROR([Go tools enabled, but missing go compiler])
])
golang="n"
])
])
m4_include([../m4/xenstored.m4])
AX_XENSTORE_OPTIONS
AX_XENSTORE_SET
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.