From: David Bremner Date: Tue, 22 Mar 2016 10:54:46 +0000 (-0300) Subject: configure: check directly for xapian compaction API X-Git-Tag: 0.23_rc0~117 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=1aa6f90a10794951365626830e8ebf29cf3736c8;hp=792bea5aff135107fd970f51f3ef8c65f68194de configure: check directly for xapian compaction API This is consistent with the check for FieldProcessor, and probably a bit more robust. --- diff --git a/configure b/configure index ba12c5a5..ab42f947 100755 --- a/configure +++ b/configure @@ -361,17 +361,20 @@ fi have_xapian_compact=0 have_xapian_field_processor=0 if [ ${have_xapian} = "1" ]; then - # Compaction is only supported on Xapian > 1.2.6 printf "Checking for Xapian compaction support... " - case "${xapian_version}" in - 0.*|1.[01].*|1.2.[0-5]) - printf "No (only available with Xapian > 1.2.6).\n" ;; - [1-9]*.[0-9]*.[0-9]*) - have_xapian_compact=1 - printf "Yes.\n" ;; - *) - printf "Unknown version.\n" ;; - esac + 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" + fi + + rm -f _compact.o _compact.cc printf "Checking for Xapian FieldProcessor API... " cat>_field_processor.cc<