--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id A5A5C431FBC\r
+ for <notmuch@notmuchmail.org>; Fri, 9 May 2014 13:02:00 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id OTGAz5DUH45E for <notmuch@notmuchmail.org>;\r
+ Fri, 9 May 2014 13:01:52 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 89A81431FC0\r
+ for <notmuch@notmuchmail.org>; Fri, 9 May 2014 13:01:52 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 23B981000E5;\r
+ Fri, 9 May 2014 23:01:45 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, =?utf-8?B?WMSrY8Oy?=\r
+ <xico@atelo.org>, notmuch@notmuchmail.org\r
+Subject: Re: pkg-config zlib check in 3c13bc\r
+In-Reply-To: <87lhucv5b8.fsf@maritornes.cs.unb.ca>\r
+References: <20140506194025.GA17097@coyotlan.Tlalpan>\r
+ <m2mweuhcna.fsf@guru.guru-group.fi>\r
+ <87lhucv5b8.fsf@maritornes.cs.unb.ca>\r
+User-Agent: Notmuch/0.18+11~gbc95cc5 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Fri, 09 May 2014 23:01:44 +0300\r
+Message-ID: <m2r442oh5j.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 09 May 2014 20:02:00 -0000\r
+\r
+On Thu, May 08 2014, David Bremner <david@tethera.net> wrote:\r
+\r
+> Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+>\r
+>>\r
+>> But, I'd like suggest alternate option to create a test c program\r
+>> and test whether it compiles (analogous to what there is already\r
+>> done with many other checks) -- this same would apply to fdatasync()\r
+>> case too.\r
+>>\r
+>\r
+> I agree in principle, but I'm not sure it's detectable at compile time,\r
+> since the option we need is passed as a string (boo!). \r
+>\r
+> I guess the ZLIB_VERNUM hack would be preferable to adding platform\r
+> specific checks to configure. But note you'd need somehow to find\r
+> zlib.h.\r
+\r
+Actually my suggestion would be that if that pkg-config line for \r
+zlib does not work (btw why does it not work) try an option\r
+where zlib_cflags is expected to be empty and and zlib_ldflags -lz\r
+-- and try compile and run test program with those options\r
+then the test program is something like\r
+\r
+int main(void)\r
+{\r
+ return(ZLIB_VERNUM >= 0x1252);\r
+}\r
+\r
+(perhaps we could manage the same value in slightly different \r
+formats in 2 tests and remember to update those in sync ..\r
+or we could try:\r
+\r
+zv1=1 zv2=2 zv3=5 zv4=\r
+\r
+ if pkg-config --atleast-version=$zv1.$zv2.$zv3.$zv4 zlib; then\r
+\r
+and\r
+\r
+ return(ZLIB_VERNUM >= 0x$zv1$zv2$zv3$zv4);\r
+\r
+>\r
+> d\r
+\r
+\r
+Tomi\r