autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zlib


From: Philip Herron
Subject: Re: zlib
Date: Tue, 05 Jan 2010 19:26:20 +0000

On Tue, 2010-01-05 at 19:59 +0100, Ralf Wildenhues wrote:
> Hello Philip,
> 
> * Philip Herron wrote on Tue, Jan 05, 2010 at 01:27:32AM CET:
> > I am having trouble finding some macro or something for my
> > configure.ac to for zlib support. I found this so far:
> > http://ac-archive.sourceforge.net/ac-archive/check_zlib.html
> > But this simply adds the option AC_ARG_WITH so zlib is optional but my
> > work needs zlib now so its a little annoying to always have to
> > ./configure --with-zlib...
> > 
> > Not sure if there is a cool trick to simply always turn it on but i am
> > sure there is a better setup for this out there since zlib is so
> > widely used!
> 
> I'm not sure I understand why you are looking for something
> zlib-specific at all.  If you need to check for a library, you can use
> AC_CHECK_LIB or one of its sister macros, and you can use
> AC_CHECK_HEADERS for header files.  Your users can pass CPPFLAGS=-I...
> and LDFLAGS=-L... to configure if the files are to be found in
> nonstandard locations.  gnulib also has the module havelib to make this
> a bit more generic and help with run paths.
> 
> Hope that helps.  Otherwise, please be more specific in what doesn't
> work for you (show code, specify needed semantics, etc).
> 
> Cheers,
> Ralf

Yeah good point, feel silly now i think i was up far too late... 06:10!
I think i was mainly confused since i could seem to find the linking
strings for zlib, though i realised it is everywhere '-lz' anyways i
simply use:

AC_CHECK_LIB([z], [gzread], ,
    [AC_MSG_ERROR([zlib not found, see http://www.zlib.net])])

Thanks guys

--Phil

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]