From: David Bremner Date: Tue, 22 Mar 2016 10:54:46 +0000 (+2100) Subject: [PATCH 05/13] configure: check directly for xapian compaction API X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bfeddb136e07324574421446e9a2e076e4599ae1;p=notmuch-archives.git [PATCH 05/13] configure: check directly for xapian compaction API --- diff --git a/21/0a60567444b9ace22ec74d2b0e541615d34d3f b/21/0a60567444b9ace22ec74d2b0e541615d34d3f new file mode 100644 index 000000000..bc17a5b5c --- /dev/null +++ b/21/0a60567444b9ace22ec74d2b0e541615d34d3f @@ -0,0 +1,89 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 9393E6DE0319 + for ; Tue, 22 Mar 2016 03:55:43 -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 T1RVPHOsjcHt for ; + Tue, 22 Mar 2016 03:55:36 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 45E986DE02A9 + for ; Tue, 22 Mar 2016 03:55:20 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1aiJyd-00014r-N3; Tue, 22 Mar 2016 06:55:55 -0400 +Received: (nullmailer pid 14077 invoked by uid 1000); + Tue, 22 Mar 2016 10:55:11 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 05/13] configure: check directly for xapian compaction API +Date: Tue, 22 Mar 2016 07:54:46 -0300 +Message-Id: <1458644094-13951-6-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.7.0 +In-Reply-To: <1458644094-13951-1-git-send-email-david@tethera.net> +References: <1458644094-13951-1-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: Tue, 22 Mar 2016 10:55:43 -0000 + +This is consistent with the check for FieldProcessor, and probably a bit +more robust. +--- + 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<