]> git.notmuchmail.org Git - notmuch/commitdiff
require xapian >= 1.2.6
authorDavid Bremner <david@tethera.net>
Wed, 5 Oct 2016 00:35:23 +0000 (21:35 -0300)
committerDavid Bremner <david@tethera.net>
Fri, 7 Oct 2016 01:45:46 +0000 (22:45 -0300)
It seems that no-one tried to compile without Xapian compact support
since March of 2015, since that's when I introduced a syntax error in
that branch of the ifdef.

Given the choice of maintaining this underused branch of code, or
bumping the Xapian dependency to a version from 2011, it seems
reasonable to do the latter.

configure
lib/database.cc

index cc6746c10bae638701c582fdcba07386e517aae8..2a0ce9eb41568c017b95e3066e4c21ce2869d87d 100755 (executable)
--- a/configure
+++ b/configure
@@ -394,6 +394,7 @@ EOF
        printf "Yes.\n"
     else
        printf "No.\n"
        printf "Yes.\n"
     else
        printf "No.\n"
+       errors=$((errors + 1))
     fi
 
     rm -f _compact.o _compact.cc
     fi
 
     rm -f _compact.o _compact.cc
@@ -683,8 +684,8 @@ EOF
     if [ $have_python -eq 0 ]; then
        echo "  python interpreter"
     fi
     if [ $have_python -eq 0 ]; then
        echo "  python interpreter"
     fi
-    if [ $have_xapian -eq 0 ]; then
-       echo "  Xapian library (including development files such as headers)"
+    if [ $have_xapian -eq 0 -o $have_xapian_compact -eq 0 ]; then
+       echo "  Xapian library (>= version 1.2.6, including development files such as headers)"
        echo "  https://xapian.org/"
     fi
     if [ $have_zlib -eq 0 ]; then
        echo "  https://xapian.org/"
     fi
     if [ $have_zlib -eq 0 ]; then
index 4bfae0197cf9020089640294faad00b64885f468..f0bfe5667fba4736996583830047d7529cd390fc 100644 (file)
@@ -1143,7 +1143,6 @@ notmuch_database_close (notmuch_database_t *notmuch)
     return status;
 }
 
     return status;
 }
 
-#if HAVE_XAPIAN_COMPACT
 static int
 unlink_cb (const char *path,
           unused (const struct stat *sb),
 static int
 unlink_cb (const char *path,
           unused (const struct stat *sb),
@@ -1327,17 +1326,6 @@ notmuch_database_compact (const char *path,
 
     return ret;
 }
 
     return ret;
 }
-#else
-notmuch_status_t
-notmuch_database_compact (unused (const char *path),
-                         unused (const char *backup_path),
-                         unused (notmuch_compact_status_cb_t status_cb),
-                         unused (void *closure))
-{
-    _notmuch_database_log (notmuch, "notmuch was compiled against a xapian version lacking compaction support.\n");
-    return NOTMUCH_STATUS_UNSUPPORTED_OPERATION;
-}
-#endif
 
 notmuch_status_t
 notmuch_database_destroy (notmuch_database_t *notmuch)
 
 notmuch_status_t
 notmuch_database_destroy (notmuch_database_t *notmuch)