aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/goflags.sh
blob: 90e4d9eea93090a50161774dbc4412226919bc01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

set -e

tags=

if ${CC:-cc} -x c - -o/dev/null -lnotmuch; then
	tags="$tags,notmuch"
fi <<EOF
#include <notmuch.h>

void main(void) {
	notmuch_status_to_string(NOTMUCH_STATUS_SUCCESS);
}
EOF

if [ -n "$tags" ]; then
	printf -- '-tags=%s\n' "${tags#,}"
fi