Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 91 / 86d51c21b1ca0bd9b4e2b3f229c98d2ec8316b
1 Return-Path: <felipe.contreras@gmail.com>\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 olra.theworths.org (Postfix) with ESMTP id 4938D431FC0\r
6         for <notmuch@notmuchmail.org>; Sun, 11 May 2014 20:09:47 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id ezTh+mmvqdcx for <notmuch@notmuchmail.org>;\r
17         Sun, 11 May 2014 20:09:41 -0700 (PDT)\r
18 Received: from mail-oa0-f45.google.com (mail-oa0-f45.google.com\r
19         [209.85.219.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id B42C3431FBF\r
22         for <notmuch@notmuchmail.org>; Sun, 11 May 2014 20:09:41 -0700 (PDT)\r
23 Received: by mail-oa0-f45.google.com with SMTP id l6so7566101oag.18\r
24         for <notmuch@notmuchmail.org>; Sun, 11 May 2014 20:09:41 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:cc:subject:date:message-id;\r
27         bh=rxFr8Q5FbRLoaviN2g6jUJV51YQNFSrkqdWpTmPkBdA=;\r
28         b=K+rLYKLp928jsAvoZ8kEXGvl0qTeq5hKG+4oydrQXVtZcNijCGkf6BS6q7TRJTeeII\r
29         7B+dYVbbAyeTBzfyUB3CI4Gv62YKNmmobaP5ll8eelvre//Zec8c9PRsSoOZxqRO5oGM\r
30         rZSgaeCQf+YJCbOKdGO24kUM9jCqhSgTq7E7QA8Dd3aSeyN8Tr8HXuv+4aPTnrC6/HLa\r
31         G0RsFzjAv6Q/tVUco/5OmkCiYSlJ9oCHv6WKMehb8is2u+KRnRl2eyRALdKsHD+2io6X\r
32         85an6pxbyW96hQswOjHEn9LiD/hJY71m+fbAvuLngYcPImpZkpMnD44ohIgw/iKL65n/\r
33         aWnA==\r
34 X-Received: by 10.60.39.131 with SMTP id p3mr30620150oek.44.1399864181125;\r
35         Sun, 11 May 2014 20:09:41 -0700 (PDT)\r
36 Received: from localhost (189-211-224-40.static.axtel.net. [189.211.224.40])\r
37         by mx.google.com with ESMTPSA id w8sm35645633oel.14.2014.05.11.20.09.38\r
38         for <multiple recipients>\r
39         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
40         Sun, 11 May 2014 20:09:39 -0700 (PDT)\r
41 From: Felipe Contreras <felipe.contreras@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] configure: add workaround for systems without zlib.pc\r
44 Date: Sun, 11 May 2014 22:09:32 -0500\r
45 Message-Id: <1399864172-28227-1-git-send-email-felipe.contreras@gmail.com>\r
46 X-Mailer: git-send-email 1.9.2+fc1~45~g3953d93\r
47 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Mon, 12 May 2014 03:09:47 -0000\r
61 \r
62 Some systems (e.g. FreeBSD) might not have installed the appropriate\r
63 pkg-config file as they should. We can workaround the issue by creating\r
64 the .pc file they should have distributed.\r
65 \r
66 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\r
67 ---\r
68  compat/.gitignore    |  1 +\r
69  compat/gen_zlib_pc.c | 18 ++++++++++++++++++\r
70  configure            |  9 +++++++++\r
71  3 files changed, 28 insertions(+)\r
72  create mode 100644 compat/.gitignore\r
73  create mode 100644 compat/gen_zlib_pc.c\r
74 \r
75 diff --git a/compat/.gitignore b/compat/.gitignore\r
76 new file mode 100644\r
77 index 0000000..107ba17\r
78 --- /dev/null\r
79 +++ b/compat/.gitignore\r
80 @@ -0,0 +1 @@\r
81 +zlib.pc\r
82 diff --git a/compat/gen_zlib_pc.c b/compat/gen_zlib_pc.c\r
83 new file mode 100644\r
84 index 0000000..198a727\r
85 --- /dev/null\r
86 +++ b/compat/gen_zlib_pc.c\r
87 @@ -0,0 +1,18 @@\r
88 +#include <stdio.h>\r
89 +#include <zlib.h>\r
90 +\r
91 +static const char *template =\r
92 +       "prefix=/usr\n"\r
93 +       "exec_prefix=${prefix}\n"\r
94 +       "libdir=${exec_prefix}/lib\n"\r
95 +       "\n"\r
96 +       "Name: zlib\n"\r
97 +       "Description: zlib compression library\n"\r
98 +       "Version: %s\n"\r
99 +       "Libs: -lz\n";\r
100 +\r
101 +int main(void)\r
102 +{\r
103 +       printf(template, ZLIB_VERSION);\r
104 +       return 0;\r
105 +}\r
106 diff --git a/configure b/configure\r
107 index 9bde2eb..35dd21f 100755\r
108 --- a/configure\r
109 +++ b/configure\r
110 @@ -340,6 +340,15 @@ else\r
111      errors=$((errors + 1))\r
112  fi\r
113  \r
114 +if ! pkg-config --exists zlib; then\r
115 +  ${CC} ${zlib_cflags} -o compat/gen_zlib_pc \\r
116 +         "$srcdir"/compat/gen_zlib_pc.c ${zlib_ldflags} > /dev/null 2>&1 &&\r
117 +  compat/gen_zlib_pc > compat/zlib.pc &&\r
118 +  PKG_CONFIG_PATH="$PKG_CONFIG_PATH":compat &&\r
119 +  export PKG_CONFIG_PATH\r
120 +  rm -f compat/gen_zlib_pc\r
121 +fi\r
122 +\r
123  printf "Checking for zlib (>= 1.2.5.2)... "\r
124  have_zlib=0\r
125  if pkg-config --atleast-version=1.2.5.2 zlib; then\r
126 -- \r
127 1.9.2+fc1~45~g3953d93\r
128 \r