From: David Bremner Date: Sun, 8 May 2016 00:04:41 +0000 (+2100) Subject: [Patch v4 04/12] configure: check directly for xapian compaction API X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f9160806c857a131dc52e631b7915041316d00c7;p=notmuch-archives.git [Patch v4 04/12] configure: check directly for xapian compaction API --- diff --git a/9b/bf339f9f361cd6a9db1df3f30247648dc69a17 b/9b/bf339f9f361cd6a9db1df3f30247648dc69a17 new file mode 100644 index 000000000..c3ff17d93 --- /dev/null +++ b/9b/bf339f9f361cd6a9db1df3f30247648dc69a17 @@ -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 80ADC6DE0350 + for ; Sat, 7 May 2016 17:05:45 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.013 +X-Spam-Level: +X-Spam-Status: No, score=-0.013 tagged_above=-999 required=5 + tests=[AWL=-0.002, 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 uYilJV7qNiXZ for ; + Sat, 7 May 2016 17:05:37 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 225236DE00EB + for ; Sat, 7 May 2016 17:05:06 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1azCDU-00015I-0Q; Sat, 07 May 2016 20:05:00 -0400 +Received: (nullmailer pid 17189 invoked by uid 1000); + Sun, 08 May 2016 00:04:53 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v4 04/12] configure: check directly for xapian compaction API +Date: Sat, 7 May 2016 21:04:41 -0300 +Message-Id: <1462665889-17121-5-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.8.1 +In-Reply-To: <1462665889-17121-1-git-send-email-david@tethera.net> +References: <1462665889-17121-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: Sun, 08 May 2016 00:05:45 -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 03e4318..f94f7c7 100755 +--- a/configure ++++ b/configure +@@ -361,17 +361,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} ${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 + + printf "Checking for Xapian FieldProcessor API... " + cat>_field_processor.cc<