1 Return-Path: <tomi.ollila@iki.fi>
\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 24F39431FAF
\r
6 for <notmuch@notmuchmail.org>; Tue, 6 May 2014 13:32:06 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 s9jBMqTcM1Mc for <notmuch@notmuchmail.org>;
\r
16 Tue, 6 May 2014 13:31:58 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 3B185431FC2
\r
19 for <notmuch@notmuchmail.org>; Tue, 6 May 2014 13:31:58 -0700 (PDT)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 9DA691000E5;
\r
22 Tue, 6 May 2014 23:31:53 +0300 (EEST)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: =?utf-8?B?WMSrY8Oy?= <xico@atelo.org>, notmuch@notmuchmail.org
\r
25 Subject: Re: pkg-config zlib check in 3c13bc
\r
26 In-Reply-To: <20140506194025.GA17097@coyotlan.Tlalpan>
\r
27 References: <20140506194025.GA17097@coyotlan.Tlalpan>
\r
28 User-Agent: Notmuch/0.18+12~gbfbd199 (http://notmuchmail.org) Emacs/24.3.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Tue, 06 May 2014 23:31:53 +0300
\r
34 Message-ID: <m2mweuhcna.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain; charset=utf-8
\r
37 Content-Transfer-Encoding: quoted-printable
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Tue, 06 May 2014 20:32:06 -0000
\r
52 On Tue, May 06 2014, X=C4=ABc=C3=B2 <xico@atelo.org> wrote:
\r
56 > Although notmuch was configuring fine on FreeBSD before 3c13bc, the pkg-c=
\r
58 > check introduced for zlib does not work. Indeed, zlib is part of the
\r
59 > base system, and always assumed to be present.
\r
61 > Proposed patch puts platform test before pkg-config checks, and add a
\r
62 > special case for zlib on FreeBSD. uname -U is used to get (numeric) OS ve=
\r
64 > and compared to lowest release where at least zlib 1.2.5.2 was available
\r
65 > (that=E2=80=99s FreeBSD 9.1, with zlib 1.2.7).
\r
70 if [ $platform =3D FREEBSD -a `uname -U` -ge 901000 ] ; then
\r
72 fails on systems where uname does not have -U option
\r
73 as `uname -U` is executed always...
\r
75 if [ $platform =3D FREEBSD ] && [ "`uname -U`" -ge 901000 ] ; then
\r
77 would work better there...
\r
79 But, I'd like suggest alternate option to create a test c program
\r
80 and test whether it compiles (analogous to what there is already
\r
81 done with many other checks) -- this same would apply to fdatasync()
\r
84 If we cared about cross-compilability one could also do
\r
86 zlib_vernum=3D$(printf '#include <zlib.h>\nZLIB_VERNUM' | gcc -E - | sed -n=
\r
89 if [ $((${zlib_vernum:-0})) -ge 4690 ]; then # 4690 =3D=3D 0x1252
\r
93 But that would be sooooo inconsistent what we have now
\r
94 (and possibly fragile?)
\r
103 >>From ca0b168ac01391b4137de504bea2845d39d0fff9 Mon Sep 17 00:00:00 2001
\r
104 > From: =3D?UTF-8?q?X=3DC4=3DABc=3DC3=3DB2?=3D <xico@atelo.org>
\r
105 > Date: Tue, 6 May 2014 12:37:32 -0700
\r
106 > Subject: [PATCH 1/1] FreeBSD check for zlib version.
\r
109 > configure | 130 +++++++++++++++++++++++++++++++++-----------------------=
\r
111 > 1 file changed, 69 insertions(+), 61 deletions(-)
\r
113 > diff --git a/configure b/configure
\r
114 > index 9bde2eb..7204812 100755
\r
117 > @@ -270,6 +270,62 @@ EOF
\r
121 > +libdir_in_ldconfig=3D0
\r
123 > +printf "Checking which platform we are on... "
\r
125 > +if [ $uname =3D "Darwin" ] ; then
\r
126 > + printf "Mac OS X.\n"
\r
127 > + platform=3DMACOSX
\r
128 > + linker_resolves_library_dependencies=3D0
\r
129 > +elif [ $uname =3D "SunOS" ] ; then
\r
130 > + printf "Solaris.\n"
\r
131 > + platform=3DSOLARIS
\r
132 > + linker_resolves_library_dependencies=3D0
\r
133 > +elif [ $uname =3D "FreeBSD" ] ; then
\r
134 > + printf "FreeBSD.\n"
\r
135 > + platform=3DFREEBSD
\r
136 > + linker_resolves_library_dependencies=3D0
\r
137 > +elif [ $uname =3D "OpenBSD" ] ; then
\r
138 > + printf "OpenBSD.\n"
\r
139 > + platform=3DOPENBSD
\r
140 > + linker_resolves_library_dependencies=3D0
\r
141 > +elif [ $uname =3D "Linux" ] || [ $uname =3D "GNU" ] ; then
\r
142 > + printf "$uname\n"
\r
143 > + platform=3D"$uname"
\r
144 > + linker_resolves_library_dependencies=3D1
\r
146 > + printf "Checking for $libdir_expanded in ldconfig... "
\r
147 > + ldconfig_paths=3D$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e '=
\r
148 s,^\(/.*\):\( (.*)\)\?$,\1,p')
\r
149 > + # Separate ldconfig_paths only on newline (not on any potential
\r
150 > + # embedded space characters in any filenames). Note, we use a
\r
151 > + # literal newline in the source here rather than something like:
\r
153 > + # IFS=3D$(printf '\n')
\r
155 > + # because the shell's command substitution deletes any trailing newl=
\r
159 > + for path in $ldconfig_paths; do
\r
160 > + if [ "$path" =3D "$libdir_expanded" ]; then
\r
161 > + libdir_in_ldconfig=3D1
\r
164 > + IFS=3D$DEFAULT_IFS
\r
165 > + if [ "$libdir_in_ldconfig" =3D '0' ]; then
\r
166 > + printf "No (will set RPATH)\n"
\r
171 > + printf "Unknown.\n"
\r
174 > +*** Warning: Unknown platform. Notmuch might or might not build correctl=
\r
180 > if pkg-config --version > /dev/null 2>&1; then
\r
181 > have_pkg_config=3D1
\r
183 > @@ -342,14 +398,22 @@ fi
\r
185 > printf "Checking for zlib (>=3D 1.2.5.2)... "
\r
187 > -if pkg-config --atleast-version=3D1.2.5.2 zlib; then
\r
188 > +# zlib is part of base in FreeBSD. version 9.1 included 1.2.7
\r
189 > +if [ $platform =3D FREEBSD -a `uname -U` -ge 901000 ] ; then
\r
192 > - zlib_cflags=3D$(pkg-config --cflags zlib)
\r
193 > - zlib_ldflags=3D$(pkg-config --libs zlib)
\r
195 > + zlib_ldflags=3D-lz
\r
198 > - errors=3D$((errors + 1))
\r
199 > + if pkg-config --atleast-version=3D1.2.5.2 zlib; then
\r
200 > + printf "Yes.\n"
\r
202 > + zlib_cflags=3D$(pkg-config --cflags zlib)
\r
203 > + zlib_ldflags=3D$(pkg-config --libs zlib)
\r
206 > + errors=3D$((errors + 1))
\r
210 > printf "Checking for talloc development files... "
\r
211 > @@ -427,62 +491,6 @@ else
\r
215 > -libdir_in_ldconfig=3D0
\r
217 > -printf "Checking which platform we are on... "
\r
219 > -if [ $uname =3D "Darwin" ] ; then
\r
220 > - printf "Mac OS X.\n"
\r
221 > - platform=3DMACOSX
\r
222 > - linker_resolves_library_dependencies=3D0
\r
223 > -elif [ $uname =3D "SunOS" ] ; then
\r
224 > - printf "Solaris.\n"
\r
225 > - platform=3DSOLARIS
\r
226 > - linker_resolves_library_dependencies=3D0
\r
227 > -elif [ $uname =3D "FreeBSD" ] ; then
\r
228 > - printf "FreeBSD.\n"
\r
229 > - platform=3DFREEBSD
\r
230 > - linker_resolves_library_dependencies=3D0
\r
231 > -elif [ $uname =3D "OpenBSD" ] ; then
\r
232 > - printf "OpenBSD.\n"
\r
233 > - platform=3DOPENBSD
\r
234 > - linker_resolves_library_dependencies=3D0
\r
235 > -elif [ $uname =3D "Linux" ] || [ $uname =3D "GNU" ] ; then
\r
236 > - printf "$uname\n"
\r
237 > - platform=3D"$uname"
\r
238 > - linker_resolves_library_dependencies=3D1
\r
240 > - printf "Checking for $libdir_expanded in ldconfig... "
\r
241 > - ldconfig_paths=3D$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e '=
\r
242 s,^\(/.*\):\( (.*)\)\?$,\1,p')
\r
243 > - # Separate ldconfig_paths only on newline (not on any potential
\r
244 > - # embedded space characters in any filenames). Note, we use a
\r
245 > - # literal newline in the source here rather than something like:
\r
247 > - # IFS=3D$(printf '\n')
\r
249 > - # because the shell's command substitution deletes any trailing newl=
\r
253 > - for path in $ldconfig_paths; do
\r
254 > - if [ "$path" =3D "$libdir_expanded" ]; then
\r
255 > - libdir_in_ldconfig=3D1
\r
258 > - IFS=3D$DEFAULT_IFS
\r
259 > - if [ "$libdir_in_ldconfig" =3D '0' ]; then
\r
260 > - printf "No (will set RPATH)\n"
\r
265 > - printf "Unknown.\n"
\r
268 > -*** Warning: Unknown platform. Notmuch might or might not build correctl=
\r
274 > printf "Checking byte order... "
\r
275 > cat> _byteorder.c <<EOF
\r
276 > #include <stdio.h>
\r
280 > _______________________________________________
\r
281 > notmuch mailing list
\r
282 > notmuch@notmuchmail.org
\r
283 > http://notmuchmail.org/mailman/listinfo/notmuch
\r