Xapian 1.4 is over 3 years old now (1.4.0 released 2016-06-24),
and 1.2 has been deprecated in Notmuch version 0.27 (2018-06-13).
Xapian 1.4 supports compaction, field processors and retry locking;
conditionals checking compaction and field processors were removed
but user may want to disable retry locking at configure time so it
is kept.
---
This is v2 of id:2020022955.6795-1-tomi.oll...@iki.fi
Change to v1: restored known_broken indication of that one test which
*is* known broken when tried with xapian 1.4...
doc/man7/notmuch-search-terms.rst was not changed in this commit --
I did not fully understand what was it saying...
configure| 101 +++
lib/built-with.c | 4 +-
lib/database.cc | 10
lib/parse-time-vrp.cc| 2 -
lib/parse-time-vrp.h | 3 +-
lib/query-fp.cc | 3 --
lib/query-fp.h | 3 +-
lib/regexp-fields.cc | 2 -
lib/regexp-fields.h | 4 +-
lib/thread-fp.cc | 3 --
lib/thread-fp.h | 3 +-
test/T020-compact.sh | 12 -
test/T500-search-date.sh | 3 --
test/T585-thread-subquery.sh | 12 -
test/T600-named-queries.sh | 6 ---
test/T650-regexp-query.sh| 4 --
test/T670-duplicate-mid.sh | 6 +--
17 files changed, 28 insertions(+), 153 deletions(-)
diff --git a/configure b/configure
index 70031d14..0cfdaa6f 100755
--- a/configure
+++ b/configure
@@ -422,15 +422,22 @@ else
have_pkg_config=0
fi
-printf "Checking for Xapian development files... "
+
+
+printf "Checking for Xapian development files (>= 1.4.0)... "
have_xapian=0
-for xapian_config in ${XAPIAN_CONFIG} xapian-config xapian-config-1.3; do
+for xapian_config in ${XAPIAN_CONFIG} xapian-config; do
if ${xapian_config} --version > /dev/null 2>&1; then
xapian_version=$(${xapian_config} --version | sed -e 's/.* //')
- printf "Yes (%s).\n" ${xapian_version}
- have_xapian=1
- xapian_cxxflags=$(${xapian_config} --cxxflags)
- xapian_ldflags=$(${xapian_config} --libs)
+ case $xapian_version in
+ 1.[4-9]* | 1.[1-9][0-9]* | [2-9]* | [1-9][0-9]*)
+ printf "Yes (%s).\n" ${xapian_version}
+ have_xapian=1
+ xapian_cxxflags=$(${xapian_config} --cxxflags)
+ xapian_ldflags=$(${xapian_config} --libs)
+ ;;
+ *) printf "Xapian $xapian_version not supported... "
+ esac
break
fi
done
@@ -439,59 +446,8 @@ if [ ${have_xapian} = "0" ]; then
errors=$((errors + 1))
fi
-have_xapian_compact=0
-have_xapian_field_processor=0
if [ ${have_xapian} = "1" ]; then
-printf "Checking for Xapian compaction support... "
-cat>_compact.cc<
-class TestCompactor : public Xapian::Compactor { };
-EOF
-if ${CXX} ${CXXFLAGS_for_sh} ${xapian_cxxflags} -c _compact.cc -o
_compact.o > /dev/null 2>&1
-then
- have_xapian_compact=1
- printf "Yes.\n"
-else
- printf "No.\n"
- errors=$((errors + 1))
-fi
-
-rm -f _compact.o _compact.cc
-
-printf "Checking for Xapian FieldProcessor API... "
-cat>_field_processor.cc<
-class TitleFieldProcessor : public Xapian::FieldProcessor { };
-EOF
-if ${CXX} ${CXXFLAGS_for_sh} ${xapian_cxxflags} -c _field_processor.cc -o
_field_processor.o > /dev/null 2>&1
-then
- have_xapian_field_processor=1
- printf "Yes.\n"
-else
- printf "No. (optional)\n"
-fi
-
-rm -f _field_processor.o _field_processor.cc
-
default_xapian_backend=""
-# DB_RETRY_LOCK is only supported on Xapian > 1.3.2
-have_xapian_db_retry_lock=0
-if [ $WITH_RETRY_LOCK = "1" ]; then
- printf "Checking for Xapian lock retry support... "
- cat>_retry.cc<
-int flag = Xapian::DB_RETRY_LOCK;
-EOF
- if ${CXX} ${CXXFLAGS_for_sh} ${xapian_cxxflags} -c _retry.cc -o
_retry.o > /dev/null 2>&1
- then
- have_xapian_db_retry_lock=1
- printf "Yes.\n"
- else
- printf "No. (optional)\n"
- fi
- rm -f _retry.o _retry.cc
-fi
-
printf "Testing default Xapian backend... "
cat >_default_backend.cc <
@@ -879,8 +835,8 @@ EOF
if [ $have_python -eq 0 ]; then
echo " python interpreter"
fi
-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)"
+if [ $have_xapian -eq 0 ]; then
+ echo " Xapian library (>= version 1.4.0, including development files
such as headers)"
echo " https://xapian.org/;
fi
if [ $have_zlib -eq 0 ]; then
@@ -1278,14 +1234,8 @@ HAVE_TIMEGM = ${have_timegm}
# Whether struct dirent has d_type (if not, then notmuch will use stat)
HAVE_D_TYPE = ${have_d_type}
-# Whether the Xapian version in use supports compaction