Patch to remove zlib.
Ira Cooper
ira at samba.org
Wed Jul 9 10:03:26 MDT 2014
On Wed, Jul 9, 2014 at 11:26 AM, Jelmer Vernooij <jelmer at samba.org> wrote:
> On Wed, Jul 09, 2014 at 11:05:38AM -0400, Ira Cooper wrote:
> > On Wed, Jul 9, 2014 at 11:01 AM, Jelmer Vernooij <jelmer at samba.org>
> wrote:
> >
> > > On Mon, Jul 07, 2014 at 12:46:47PM -0400, Ira Cooper wrote:
> > > > Note: To apply it unxz it then use git am --ignore-whitespace ,
> > > otherwise
> > > > you may have issues. (xz was used to save the list a good bit of
> > > space...
> > > > it's over 500k gzipped.)
> > > >
> > > > As far as why: I listened to metze/vl. I disagree with them.
> > > >
> > > > I believe that third party (non Samba Team developed) libraries do
> not
> > > > belong in the tree. They are asking for trouble long term, IMHO.
> > > >
> > > > Consider this patch the first step down the path to cleaning up these
> > > > libraries.
> > > Thanks for working on this. It'd be great to always rely on the system
> > > zlib.
> > > It reduces some overhead on us to support two configurations in waf
> (one
> > > with
> > > the bundled zlib and one with the system zlib), and keeping the zlib
> copy
> > > up to
> > > date. This is not a huge burden, but all the little bits help. :-)
> > >
> > > You probably want to use something other than CHECK_BUNDLED_SYSTEM() to
> > > detect zlib, since zlib is no longer bundled. CHECK_BUNDLED_SYSTEM()
> also
> > > relies exclusively on pkg-config (at least so its docstring claims) to
> find
> > > zlib; are we ready to make pkg-config a mandatory dependency?
> > >
> >
> > As far as pkg-config goes, I debated that myself. I submitted this
> version
> > with the lockdown in it. If there is a waf check I can use instead I'm
> all
> > ears.
> Personally I think pkg-config is fine, but I thought it was worth pointing
> out that this adds a hard dependency on pkg-config.
>
> To detect zlib without the bundling stuff, see the existing configure step
> in lib/zlib/wscript.
>
(From the file mentioned)
def configure(conf):
version_check='''
#if (ZLIB_VERNUM >= 0x1230)
#else
#error "ZLIB_VERNUM < 0x1230"
#endif
z_stream *z;
inflateInit2(z, -15);
'''
if conf.CHECK_BUNDLED_SYSTEM('z', minversion='1.2.3', pkg='zlib',
checkfunctions='zlibVersion',
headers='zlib.h',
checkcode=version_check,
implied_deps='replace'):
conf.define('USING_SYSTEM_ZLIB', 1)
That looks like it should work in removing the pkg-config dependency, if my
quick read of the python code is right... I'll wait on any other feedback
and push a branch somewhere.
Thanks,
-Ira
More information about the samba-technical
mailing list