[Patch v5 04/11] configure: check directly for xapian compaction API
authorDavid Bremner <david@tethera.net>
Fri, 13 May 2016 10:38:06 +0000 (07:38 +2100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:21:49 +0000 (16:21 -0700)
8d/71500df5f9bdac5f86f4c069f36d469cb26251 [new file with mode: 0644]

diff --git a/8d/71500df5f9bdac5f86f4c069f36d469cb26251 b/8d/71500df5f9bdac5f86f4c069f36d469cb26251
new file mode 100644 (file)
index 0000000..6ee3219
--- /dev/null
@@ -0,0 +1,89 @@
+Return-Path: <bremner@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 2DE5D6DE0949\r
+ for <notmuch@notmuchmail.org>; Fri, 13 May 2016 03:39:02 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.013\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.013 tagged_above=-999 required=5\r
+ tests=[AWL=-0.002, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
+ autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id ylt0d1hpRPkI for <notmuch@notmuchmail.org>;\r
+ Fri, 13 May 2016 03:38:54 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 8BBBC6DE0318\r
+ for <notmuch@notmuchmail.org>; Fri, 13 May 2016 03:38:28 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1b1AU9-0003PN-ID; Fri, 13 May 2016 06:38:21 -0400\r
+Received: (nullmailer pid 7550 invoked by uid 1000);\r
+ Fri, 13 May 2016 10:38:16 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [Patch v5 04/11] configure: check directly for xapian compaction API\r
+Date: Fri, 13 May 2016 07:38:06 -0300\r
+Message-Id: <1463135893-7471-5-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.8.1\r
+In-Reply-To: <1463135893-7471-1-git-send-email-david@tethera.net>\r
+References: <1463135893-7471-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 13 May 2016 10:39:02 -0000\r
+\r
+This is consistent with the check for FieldProcessor, and probably a bit\r
+more robust.\r
+---\r
+ configure | 21 +++++++++++----------\r
+ 1 file changed, 11 insertions(+), 10 deletions(-)\r
+\r
+diff --git a/configure b/configure\r
+index ba12c5a..eb143b2 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -361,17 +361,18 @@ fi\r
+ have_xapian_compact=0\r
+ have_xapian_field_processor=0\r
+ if [ ${have_xapian} = "1" ]; then\r
+-    # Compaction is only supported on Xapian > 1.2.6\r
+     printf "Checking for Xapian compaction support... "\r
+-    case "${xapian_version}" in\r
+-      0.*|1.[01].*|1.2.[0-5])\r
+-          printf "No (only available with Xapian > 1.2.6).\n" ;;\r
+-      [1-9]*.[0-9]*.[0-9]*)\r
+-          have_xapian_compact=1\r
+-          printf "Yes.\n" ;;\r
+-      *)\r
+-          printf "Unknown version.\n" ;;\r
+-    esac\r
++    cat>_compact.cc<<EOF\r
++#include <xapian.h>\r
++class TestCompactor : public Xapian::Compactor { };\r
++EOF\r
++    if ${CXX} ${CXXFLAGS_for_sh} ${xapian_cxxflags} -c _compact.cc -o _compact.o > /dev/null 2>&1\r
++    then\r
++      have_xapian_compact=1\r
++      printf "Yes.\n"\r
++    else\r
++      printf "No.\n"\r
++    fi\r
\r
+     printf "Checking for Xapian FieldProcessor API... "\r
+     cat>_field_processor.cc<<EOF\r
+-- \r
+2.8.1\r
+\r