Debian Codegraph @

contrib/goflags.sh

raw
1 #!/bin/sh
2
3 set -e
4
5 tags=
6
7 if ${CC:-cc} -x c - -o/dev/null -lnotmuch 2>/dev/null; then
8 tags="$tags,notmuch"
9 fi <<EOF
10 #include <notmuch.h>
11
12 #if !LIBNOTMUCH_CHECK_VERSION(5, 6, 0)
13 #error "aerc requires libnotmuch.so.5.6 or later"
14 #endif
15
16 void main(void) {
17 notmuch_status_to_string(NOTMUCH_STATUS_SUCCESS);
18 }
19 EOF
20
21 if [ -n "$tags" ]; then
22 printf -- '-tags=%s\n' "${tags#,}"
23 fi