unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
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	[thread overview]
Message-ID: <1462665889-17121-5-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1462665889-17121-1-git-send-email-david@tethera.net>

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<<EOF
+#include <xapian.h>
+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<<EOF
-- 
2.8.1

  parent reply	other threads:[~2016-05-08  0:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08  0:04 v4 of libconfig / single argument date / named query patches David Bremner
2016-05-08  0:04 ` [Patch v4 01/12] configure: detect Xapian:FieldProcessor David Bremner
2016-05-08  0:04 ` [Patch v4 02/12] lib: optionally support single argument date: queries David Bremner
2016-05-08  0:04 ` [Patch v4 03/12] lib/cli: add library API / CLI for compile time options David Bremner
2016-05-08  0:04 ` David Bremner [this message]
2016-05-08  0:04 ` [Patch v4 05/12] lib: provide config API David Bremner
2016-05-08  0:04 ` [Patch v4 06/12] lib: config list iterators David Bremner
2016-05-08  0:04 ` [Patch v4 07/12] CLI: add optional config data to dump output David Bremner
2016-05-08  0:04 ` [Patch v4 08/12] CLI: optionally restore config data David Bremner
2016-05-08  0:04 ` [Patch v4 09/12] CLI: add notmuch-config support for named queries David Bremner
2016-05-08  0:04 ` [Patch v4 10/12] lib: make a global constant for query parser flags David Bremner
2016-05-08  0:04 ` [Patch v4 11/12] lib: add support for named queries David Bremner
2016-05-08  0:04 ` [Patch v4 12/12] fixup! lib/cli: add library API / CLI for compile time options David Bremner
2016-05-08  8:25 ` v4 of libconfig / single argument date / named query patches Tomi Ollila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462665889-17121-5-git-send-email-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).