diff options
Diffstat (limited to 'contrib/goflags.sh')
-rwxr-xr-x | contrib/goflags.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/goflags.sh b/contrib/goflags.sh new file mode 100755 index 00000000..90e4d9ee --- /dev/null +++ b/contrib/goflags.sh @@ -0,0 +1,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 |