From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id F41526DE00D1 for ; Sun, 20 Mar 2016 18:55:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.029 X-Spam-Level: X-Spam-Status: No, score=-0.029 tagged_above=-999 required=5 tests=[AWL=-0.018, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WYMM6Yvn0gPG for ; Sun, 20 Mar 2016 18:55:33 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 9063A6DE00CE for ; Sun, 20 Mar 2016 18:55:33 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84) (envelope-from ) id 1ahp4g-0002SN-PT; Sun, 20 Mar 2016 21:56:06 -0400 Received: (nullmailer pid 31349 invoked by uid 1000); Mon, 21 Mar 2016 01:55:28 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] configure: check directly for xapian compaction API Date: Sun, 20 Mar 2016 22:55:14 -0300 Message-Id: <1458525314-31295-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1458437904-17677-3-git-send-email-david@tethera.net> References: <1458437904-17677-3-git-send-email-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2016 01:55:42 -0000 This is consistent with the check for FieldProcessor, and probably a bit more robust. --- This is really an independent cleanup, but it will probably not apply cleanly without the rest of the series because of code movement. configure | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/configure b/configure index c48f7ce..03f28d5 100755 --- a/configure +++ b/configure @@ -359,17 +359,18 @@ 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} ${CXXLAGS} ${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 printf "Checking for Xapian FieldProcessor API... " cat>_field_processor.cc<