]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure.ac: want_flatcurve - Change to want_flatcurve=auto, accept Xapian only...
authorMarco Bettini <marco.bettini@open-xchange.com>
Fri, 25 Feb 2022 11:14:48 +0000 (11:14 +0000)
committerMarco Bettini <marco.bettini@open-xchange.com>
Tue, 26 Apr 2022 07:50:30 +0000 (09:50 +0200)
configure.ac
m4/want_flatcurve.m4
src/plugins/fts-flatcurve/fts-backend-flatcurve-xapian.cc

index b4b30dc042b0ec27da6b5c482d003730e852b1f4..d96bf57f4ab451335b77fde99f24d7b5030e3552 100644 (file)
@@ -155,9 +155,9 @@ AS_HELP_STRING([--with-solr], [Build with Solr full text search support]),
   want_solr=no)
 
 AC_ARG_WITH(flatcurve,
-AS_HELP_STRING([--with-flatcurve], [Build with Flatcurve (Xapian) full text search support]),
+AS_HELP_STRING([--with-flatcurve], [Build with Flatcurve (Xapian) full text search support (auto)]),
   TEST_WITH(flatcurve, $withval),
-  want_flatcurve=no)
+  want_flatcurve=auto)
 
 AC_ARG_WITH(sodium,
 AS_HELP_STRING([--with-sodium], [Build with libsodium support (enables argon2, default: auto)]),
index aff59b0749431c61ebf21a189a38a8b004dee546..469438703bfb14df056e1b8cd27eafef86b64a21 100644 (file)
@@ -1,14 +1,11 @@
 AC_DEFUN([DOVECOT_WANT_FLATCURVE], [
   have_flatcurve=no
   AS_IF([test "$want_flatcurve" != "no"], [
-    PKG_CHECK_MODULES(XAPIAN, xapian-core >= 1.2, [
+    PKG_CHECK_MODULES(XAPIAN, xapian-core >= 1.4, [
       AC_DEFINE([HAVE_XAPIAN], 1, [Xapian is available])
       PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES xapian-core"
       have_flatcurve=yes
       fts="$fts flatcurve"
-      PKG_CHECK_MODULES(XAPIAN, xapian-core >= 1.4, [
-        AC_DEFINE([XAPIAN_HAS_COMPACT],1,[Xapian compaction support (1.4+)])
-      ])
     ],[
       AS_IF([test $want_flatcurve = yes], [
         AC_ERROR([Can't build with Flatcurve FTS: $XAPIAN_PKG_ERRORS])
index 319bc47a01cd542e14e61dc1634f83969d6c66d5..a16292c6c15e6cd3cb15bd028ecb8d43c5492fa6 100644 (file)
@@ -1735,7 +1735,6 @@ int fts_flatcurve_xapian_delete_index(struct flatcurve_fts_backend *backend,
        return ret;
 }
 
-#ifdef XAPIAN_HAS_COMPACT
 /* Returns: 0 on success, -1 on error */
 static int
 fts_flatcurve_xapian_optimize_rebuild(struct flatcurve_fts_backend *backend,
@@ -1895,13 +1894,11 @@ fts_flatcurve_xapian_optimize_box_do(struct flatcurve_fts_backend *backend,
 
        return 0;
 }
-#endif
 
 /* Returns: 0 on success, -1 on error */
 int fts_flatcurve_xapian_optimize_box(struct flatcurve_fts_backend *backend,
                                      const char **error_r)
 {
-#ifdef XAPIAN_HAS_COMPACT
        static const enum flatcurve_xapian_db_opts opts =
                (enum flatcurve_xapian_db_opts)
                        (FLATCURVE_XAPIAN_DB_NOCREATE_CURRENT |
@@ -1938,9 +1935,6 @@ int fts_flatcurve_xapian_optimize_box(struct flatcurve_fts_backend *backend,
        }
        fts_flatcurve_xapian_unlock(backend);
        return ret;
-#else
-       return 0;
-#endif
 }
 
 static void