[PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / d3 / aa05382fe5777c0c97b064d922ab28d0721eb0
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 67CB16DE02B0\r
6  for <notmuch@notmuchmail.org>; Tue, 22 Mar 2016 03:55:24 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.029\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.029 tagged_above=-999 required=5\r
12  tests=[AWL=-0.018, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]\r
13  autolearn=disabled\r
14 Received: from arlo.cworth.org ([127.0.0.1])\r
15  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
16  with ESMTP id 2aft2MenZusK for <notmuch@notmuchmail.org>;\r
17  Tue, 22 Mar 2016 03:55:16 -0700 (PDT)\r
18 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
19  by arlo.cworth.org (Postfix) with ESMTPS id 7CFC56DE0297\r
20  for <notmuch@notmuchmail.org>; Tue, 22 Mar 2016 03:55:16 -0700 (PDT)\r
21 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
22  (envelope-from <bremner@tethera.net>)\r
23  id 1aiJyZ-000147-78; Tue, 22 Mar 2016 06:55:51 -0400\r
24 Received: (nullmailer pid 14069 invoked by uid 1000);\r
25  Tue, 22 Mar 2016 10:55:11 -0000\r
26 From: David Bremner <david@tethera.net>\r
27 To: notmuch@notmuchmail.org\r
28 Subject: [PATCH 02/13] configure: detect Xapian:FieldProcessor\r
29 Date: Tue, 22 Mar 2016 07:54:43 -0300\r
30 Message-Id: <1458644094-13951-3-git-send-email-david@tethera.net>\r
31 X-Mailer: git-send-email 2.7.0\r
32 In-Reply-To: <1458644094-13951-1-git-send-email-david@tethera.net>\r
33 References: <1458644094-13951-1-git-send-email-david@tethera.net>\r
34 X-BeenThere: notmuch@notmuchmail.org\r
35 X-Mailman-Version: 2.1.20\r
36 Precedence: list\r
37 List-Id: "Use and development of the notmuch mail system."\r
38  <notmuch.notmuchmail.org>\r
39 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
40  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
42 List-Post: <mailto:notmuch@notmuchmail.org>\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
44 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
45  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
46 X-List-Received-Date: Tue, 22 Mar 2016 10:55:24 -0000\r
47 \r
48 Rather than check versions, it seems more robust to do a test compile.\r
49 ---\r
50  configure | 26 +++++++++++++++++++++++++-\r
51  1 file changed, 25 insertions(+), 1 deletion(-)\r
52 \r
53 diff --git a/configure b/configure\r
54 index eb6dbac..c48f7ce 100755\r
55 --- a/configure\r
56 +++ b/configure\r
57 @@ -356,9 +356,10 @@ if [ ${have_xapian} = "0" ]; then\r
58      errors=$((errors + 1))\r
59  fi\r
60  \r
61 -# Compaction is only supported on Xapian > 1.2.6\r
62  have_xapian_compact=0\r
63 +have_xapian_field_processor=0\r
64  if [ ${have_xapian} = "1" ]; then\r
65 +    # Compaction is only supported on Xapian > 1.2.6\r
66      printf "Checking for Xapian compaction support... "\r
67      case "${xapian_version}" in\r
68         0.*|1.[01].*|1.2.[0-5])\r
69 @@ -369,6 +370,21 @@ if [ ${have_xapian} = "1" ]; then\r
70         *)\r
71             printf "Unknown version.\n" ;;\r
72      esac\r
73 +\r
74 +    printf "Checking for Xapian FieldProcessor API... "\r
75 +    cat>_field_processor.cc<<EOF\r
76 +#include <xapian.h>\r
77 +class TitleFieldProcessor : public Xapian::FieldProcessor { };\r
78 +EOF\r
79 +    if ${CXX} ${CXXLAGS} ${xapian_cxxflags} -c _field_processor.cc -o _field_processor.o > /dev/null 2>&1\r
80 +    then\r
81 +       have_xapian_field_processor=1\r
82 +       printf "Yes.\n"\r
83 +    else\r
84 +       printf "No. (optional)\n"\r
85 +    fi\r
86 +\r
87 +    rm -f _field_processor.o _field_processor.cc\r
88  fi\r
89  \r
90  \r
91 @@ -979,6 +995,9 @@ HAVE_D_TYPE = ${have_d_type}\r
92  # Whether the Xapian version in use supports compaction\r
93  HAVE_XAPIAN_COMPACT = ${have_xapian_compact}\r
94  \r
95 +# Whether the Xapian version in use supports field processors\r
96 +HAVE_XAPIAN_FIELD_PROCESSOR = ${have_xapian_field_processor}\r
97 +\r
98  # Whether the getpwuid_r function is standards-compliant\r
99  # (if not, then notmuch will #define _POSIX_PTHREAD_SEMANTICS\r
100  # to enable the standards-compliant version -- needed for Solaris)\r
101 @@ -1050,6 +1069,7 @@ CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)      \\\r
102                    -DSTD_GETPWUID=\$(STD_GETPWUID)                       \\\r
103                    -DSTD_ASCTIME=\$(STD_ASCTIME)                         \\\r
104                    -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT)         \\\r
105 +                  -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_PROCESSOR) \\\r
106                    -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)\r
107  \r
108  CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)    \\\r
109 @@ -1064,6 +1084,7 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)    \\\r
110                      -DSTD_GETPWUID=\$(STD_GETPWUID)                     \\\r
111                      -DSTD_ASCTIME=\$(STD_ASCTIME)                       \\\r
112                      -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT)       \\\r
113 +                    -DHAVE_XAPIAN_FIELD_PROCESSOR=\$(HAVE_XAPIAN_FIELD_PROCESSOR) \\\r
114                      -DUTIL_BYTE_ORDER=\$(UTIL_BYTE_ORDER)\r
115  \r
116  CONFIGURE_LDFLAGS =  \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS)\r
117 @@ -1077,6 +1098,9 @@ cat > sh.config <<EOF\r
118  # Whether the Xapian version in use supports compaction\r
119  NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact}\r
120  \r
121 +# Whether the Xapian version in use supports field processors\r
122 +NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR=${have_xapian_field_processor}\r
123 +\r
124  # do we have man pages?\r
125  NOTMUCH_HAVE_MAN=$((have_sphinx))\r
126  \r
127 -- \r
128 2.7.0\r
129 \r