Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 61 / 1ab33b7cdcf7de3fc6c178a106a7846fb6d674
1 Return-Path: <xico@atelo.org>\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 212AC431FC0\r
6         for <notmuch@notmuchmail.org>; Sat, 10 May 2014 13:27:53 -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.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[UNPARSEABLE_RELAY=0.001] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id NKmgEIamgFJc for <notmuch@notmuchmail.org>;\r
16         Sat, 10 May 2014 13:27:45 -0700 (PDT)\r
17 Received: from mail.atelo.org (atelo.org [192.95.27.91])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 87843431FBF\r
21         for <notmuch@notmuchmail.org>; Sat, 10 May 2014 13:27:45 -0700 (PDT)\r
22 Received: from coyotlan.atelo.org (ovo.atelo.org [192.168.1.7]);\r
23         by mail.atelo.org (OpenSMTPD) with ESMTP id ba5eae50;\r
24         Sat, 10 May 2014 20:27:13 +0000 (UTC)\r
25 Received: from localhost (1001@localhost [local]);\r
26         by localhost (OpenSMTPD) with ESMTPA id e9eaaa2f;\r
27         Sat, 10 May 2014 13:27:41 -0700 (PDT)\r
28 User-Agent: OpenSMTPD enqueuer (Demoostik)\r
29 From: =?UTF-8?q?X=C4=ABc=C3=B2?= <xico@atelo.org>\r
30 To: notmuch@notmuchmail.org\r
31 Subject: [PATCH 1/2] configure: add a fallback check for zlib\r
32 Date: Sat, 10 May 2014 13:27:25 -0700\r
33 Message-Id: <1399753646-3026-1-git-send-email-xico@atelo.org>\r
34 X-Mailer: git-send-email 1.9.2\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Sat, 10 May 2014 20:27:53 -0000\r
48 \r
49 Since zlib is part of the base system, FreeBSD chose not to register it\r
50 in pkg-config through zlib.pc. As a fallback test, configure will build\r
51 and run a zlib version check and make sure the header and library\r
52 versions are compatible.\r
53 ---\r
54  compat/have_zlib.c |  6 ++++++\r
55  configure          | 21 ++++++++++++++++-----\r
56  2 files changed, 22 insertions(+), 5 deletions(-)\r
57  create mode 100644 compat/have_zlib.c\r
58 \r
59 diff --git a/compat/have_zlib.c b/compat/have_zlib.c\r
60 new file mode 100644\r
61 index 0000000..abaeedd\r
62 --- /dev/null\r
63 +++ b/compat/have_zlib.c\r
64 @@ -0,0 +1,6 @@\r
65 +#include <zlib.h>\r
66 +\r
67 +int main(void)\r
68 +{\r
69 +    return (ZLIB_VERNUM) < (MINVER) || zlibVersion()[0] != (ZLIB_VERSION)[0];\r
70 +}\r
71 diff --git a/configure b/configure\r
72 index 9bde2eb..7a11ded 100755\r
73 --- a/configure\r
74 +++ b/configure\r
75 @@ -340,16 +340,27 @@ else\r
76      errors=$((errors + 1))\r
77  fi\r
78  \r
79 -printf "Checking for zlib (>= 1.2.5.2)... "\r
80 +zv1=1 zv2=2 zv3=5 zv4=1\r
81 +printf "Checking for zlib (>= $zv1.$zv2.$zv3.$zv4)... "\r
82  have_zlib=0\r
83 -if pkg-config --atleast-version=1.2.5.2 zlib; then\r
84 +if pkg-config --atleast-version=$zv1.$zv2.$zv3.$zv4 zlib; then\r
85      printf "Yes.\n"\r
86      have_zlib=1\r
87      zlib_cflags=$(pkg-config --cflags zlib)\r
88      zlib_ldflags=$(pkg-config --libs zlib)\r
89  else\r
90 -    printf "No.\n"\r
91 -    errors=$((errors + 1))\r
92 +    # Try finding zlib directly (e.g. on FreeBSD)\r
93 +    zlib_cflags=\r
94 +    zlib_ldflags=-lz\r
95 +    if ${CC} ${zlib_cflags} -DMINVER=0x$zv1$zv2$zv3$zv4 -o compat/have_zlib "$srcdir"/compat/have_zlib.c ${zlib_ldflags} > /dev/null 2>&1 && ./compat/have_zlib\r
96 +    then\r
97 +        printf "Yes.\n"\r
98 +        have_zlib=1\r
99 +    else\r
100 +        printf "No.\n"\r
101 +        errors=$((errors + 1))\r
102 +    fi\r
103 +    rm -f compat/have_zlib\r
104  fi\r
105  \r
106  printf "Checking for talloc development files... "\r
107 @@ -509,7 +520,7 @@ EOF\r
108         echo "  http://xapian.org/"\r
109      fi\r
110      if [ $have_zlib -eq 0 ]; then\r
111 -       echo "  zlib library (>= version 1.2.5.2, including development files such as headers)"\r
112 +       echo "  zlib library (>= version $zv1.$zv2.$zv3.$zv4, including development files such as headers)"\r
113         echo "  http://zlib.net/"\r
114         echo\r
115      fi\r
116 -- \r
117 1.9.2\r
118 \r