From ca1192e204f01ae8ae32ff82a797ed8980da3ed9 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 14 May 2016 07:38:06 +2100 Subject: [PATCH] [Patch v5 04/11] configure: check directly for xapian compaction API --- 8d/71500df5f9bdac5f86f4c069f36d469cb26251 | 89 +++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 8d/71500df5f9bdac5f86f4c069f36d469cb26251 diff --git a/8d/71500df5f9bdac5f86f4c069f36d469cb26251 b/8d/71500df5f9bdac5f86f4c069f36d469cb26251 new file mode 100644 index 000000000..6ee3219fa --- /dev/null +++ b/8d/71500df5f9bdac5f86f4c069f36d469cb26251 @@ -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 2DE5D6DE0949 + for ; Fri, 13 May 2016 03:39:02 -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 ylt0d1hpRPkI for ; + Fri, 13 May 2016 03:38:54 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 8BBBC6DE0318 + for ; Fri, 13 May 2016 03:38:28 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1b1AU9-0003PN-ID; Fri, 13 May 2016 06:38:21 -0400 +Received: (nullmailer pid 7550 invoked by uid 1000); + Fri, 13 May 2016 10:38:16 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v5 04/11] configure: check directly for xapian compaction API +Date: Fri, 13 May 2016 07:38:06 -0300 +Message-Id: <1463135893-7471-5-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.8.1 +In-Reply-To: <1463135893-7471-1-git-send-email-david@tethera.net> +References: <1463135893-7471-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: Fri, 13 May 2016 10:39:02 -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 ba12c5a..eb143b2 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<