From: David Bremner Date: Mon, 9 Mar 2026 21:31:47 +0000 (+0900) Subject: configure: check for Xapian extended wildcard support X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=51307ef90157601ca9a1865a24503e1428bcefb3;p=notmuch configure: check for Xapian extended wildcard support Xapian 2.0 supports extended wildcard queries in the query parser. To quote the NEWS file: WILDCARD_PATTERN_MULTI (which supports `*` wildcards anywhere in the term, not just at the end as previously), WILDCARD_PATTERN_SINGLE (which supports `?` wildcards matching a single character), and WILDCARD_PATTERN_GLOB which enables both of these. This commit does not add any functionality, just detects if this support is there in Xapian. --- diff --git a/configure b/configure index b5634fba..7a483563 100755 --- a/configure +++ b/configure @@ -483,6 +483,17 @@ for xapian_config in ${XAPIAN_CONFIG} xapian-config; do have_xapian=1 xapian_cxxflags=$(${xapian_config} --cxxflags) xapian_ldflags=$(${xapian_config} --libs) + printf "Checking Xapian enhanced wildcards..." + printf '#include \nint main() { printf ("%%d\\n", Xapian::QueryParser::FLAG_WILDCARD_GLOB); }' > _xapian_wildcard.cc + if ${CXX} -o _xapian_wildcard _xapian_wildcard.cc > /dev/null 2>&1 + then + have_xapian_wildcard_glob=1 + printf " Yes.\n" + else + printf " No.\n" + have_xapian_wildcard_glob=1 + fi + ;; *) printf "Xapian $xapian_version not supported... " esac @@ -1285,7 +1296,8 @@ done printf "\n\t%s\n" "${WARN_CFLAGS}" rm -f minimal minimal.c _time_t.c _libversion.c _libversion _libversion.sh _check_session_keys.c _check_session_keys _check_gmime_cert.c _check_x509_validity _check_email \ - _verify_sig_with_session_key.c _verify_sig_with_session_key + _verify_sig_with_session_key.c _verify_sig_with_session_key \ + _xapian_wildcard.cc _xapian_wildcard # construct the Makefile.config cat > Makefile.config <