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