unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: "David Bremner" <david@tethera.net>, Xīcò <xico@atelo.org>,
	notmuch@notmuchmail.org
Subject: Re: pkg-config zlib check in 3c13bc
Date: Fri, 09 May 2014 23:01:44 +0300	[thread overview]
Message-ID: <m2r442oh5j.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87lhucv5b8.fsf@maritornes.cs.unb.ca>

On Thu, May 08 2014, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> 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

  reply	other threads:[~2014-05-09 20:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 19:40 pkg-config zlib check in 3c13bc Xīcò
2014-05-06 20:31 ` Tomi Ollila
2014-05-08 12:11   ` David Bremner
2014-05-09 20:01     ` Tomi Ollila [this message]
2014-05-10  0:46       ` David Bremner
2014-05-10  1:53         ` Xīcò
2014-05-10  2:11           ` David Bremner
2014-05-10  4:01             ` Felipe Contreras
2014-05-10  5:33             ` [PATCH] Fallback check for zlib Xīcò
2014-05-10  5:33               ` Xīcò
2014-05-10  7:58                 ` Tomi Ollila
2014-05-10  9:37                 ` David Bremner
2014-05-10 10:41                   ` Tomi Ollila
2014-05-10 18:44                     ` [PATCH] configure: add a fallback " Xīcò

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r442oh5j.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=xico@atelo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).