From d5e47e300a42ed64c17e4b391b77234e22c9f915 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Fri, 3 Mar 2023 00:26:05 +0100 Subject: mk: detect if notmuch headers & libs are available Detect if notmuch is available by trying to compile a minimal go program that uses the notmuch.h header and links to libnotmuch.so. If that succeeds, set the default GOFLAGS value to -tags=notmuch. Signed-off-by: Robin Jarry Tested-by: Inwit --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 965d6596..781c63b1 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,8 @@ SHAREDIR?=$(PREFIX)/share/aerc LIBEXECDIR?=$(PREFIX)/libexec/aerc MANDIR?=$(PREFIX)/share/man GO?=go -GOFLAGS?= +default_goflags!=GO=$(GO) contrib/check-notmuch.sh 2>/dev/null && echo -tags=notmuch +GOFLAGS?=$(default_goflags) BUILD_OPTS?=-trimpath flags!=echo -- $(GOFLAGS) | base64 | tr -d '\n' # ignore environment variable -- cgit