lib: add built_with handling for XAPIAN_DB_RETRY_LOCK
authorDavid Bremner <david@tethera.net>
Sun, 26 Jun 2016 15:29:45 +0000 (17:29 +0200)
committerDavid Bremner <david@tethera.net>
Wed, 29 Jun 2016 07:05:49 +0000 (09:05 +0200)
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.

lib/built-with.c
notmuch-config.c
test/T030-config.sh
test/T040-setup.sh

index 635ed3b39f52557f9110a78a9f101faa21868e41..2f1f0b5c1bf33237ec6aca7a44d83f84f515e223 100644 (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;
     }
index de9a8a41bc3a625e32d14ade4b02418055086db3..e5d42a0cbfd505ed9f1ba5b6984251a7324a3061 100644 (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
index b8d5a86f1035366edbd48758e2472a8bd50c23f3..0915abdba3a03838e552cf91deb6d32d9ede1c65 100755 (executable)
@@ -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
 
index be2f0dbd967f6dc091db34a56c50cbf8435fd953..021f2d0bea7c10de782ffcdd2a5724ba172fc202 100755 (executable)
@@ -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