lib: add built_with handling for XAPIAN_DB_RETRY_LOCK

This support will be present only if the appropriate version of xapian
is available _and_ the user did not disable the feature when
building. So there really needs to be some way for the user to check.
This commit is contained in:
David Bremner 2016-06-26 17:29:45 +02:00
parent 6450813e8f
commit 3a45d29ed4
4 changed files with 8 additions and 1 deletions

View file

@ -28,6 +28,8 @@ notmuch_built_with (const char *name)
return HAVE_XAPIAN_COMPACT;
} else if (STRNCMP_LITERAL (name, "field_processor") == 0) {
return HAVE_XAPIAN_FIELD_PROCESSOR;
} else if (STRNCMP_LITERAL (name, "retry_lock") == 0) {
return HAVE_XAPIAN_DB_RETRY_LOCK;
} else {
return FALSE;
}

View file

@ -911,6 +911,9 @@ _notmuch_config_list_built_with ()
printf("%sfield_processor=%s\n",
BUILT_WITH_PREFIX,
notmuch_built_with ("field_processor") ? "true" : "false");
printf("%sretry_lock=%s\n",
BUILT_WITH_PREFIX,
notmuch_built_with ("retry_lock") ? "true" : "false");
}
static int

View file

@ -59,6 +59,7 @@ foo.string=this is another string value
foo.list=this;is another;list value;
built_with.compact=something
built_with.field_processor=something
built_with.retry_lock=something
EOF
test_expect_equal_file EXPECTED OUTPUT

View file

@ -31,6 +31,7 @@ search.exclude_tags=baz;
maildir.synchronize_flags=true
crypto.gpg_path=gpg
built_with.compact=something
built_with.field_processor=something"
built_with.field_processor=something
built_with.retry_lock=something"
test_done