mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
third_party/zlib: Initial support for zlib
Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
e8e8568975
commit
ba8ee8c9e0
@ -13,3 +13,23 @@ Build.BuildContext.CHECK_FOR_THIRD_PARTY = CHECK_FOR_THIRD_PARTY
|
||||
@conf
|
||||
def CHECK_INIPARSER(conf):
|
||||
return conf.CHECK_BUNDLED_SYSTEM('iniparser', checkfunctions='iniparser_load', headers='iniparser.h')
|
||||
|
||||
Build.BuildContext.CHECK_INIPARSER = CHECK_INIPARSER
|
||||
|
||||
@conf
|
||||
def CHECK_ZLIB(conf):
|
||||
version_check='''
|
||||
#if (ZLIB_VERNUM >= 0x1230)
|
||||
#else
|
||||
#error "ZLIB_VERNUM < 0x1230"
|
||||
#endif
|
||||
z_stream *z;
|
||||
inflateInit2(z, -15);
|
||||
'''
|
||||
return conf.CHECK_BUNDLED_SYSTEM('z', minversion='1.2.3', pkg='zlib',
|
||||
checkfunctions='zlibVersion',
|
||||
headers='zlib.h',
|
||||
checkcode=version_check,
|
||||
implied_deps='replace')
|
||||
|
||||
Build.BuildContext.CHECK_ZLIB = CHECK_ZLIB
|
||||
|
15
third_party/zlib/wscript
vendored
15
third_party/zlib/wscript
vendored
@ -1,20 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
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'):
|
||||
if conf.CHECK_ZLIB():
|
||||
conf.define('USING_SYSTEM_ZLIB', 1)
|
||||
|
||||
def build(bld):
|
||||
|
7
wscript
7
wscript
@ -123,12 +123,18 @@ def configure(conf):
|
||||
|
||||
if conf.CHECK_FOR_THIRD_PARTY():
|
||||
conf.RECURSE('third_party/iniparser/src')
|
||||
conf.RECURSE('third_party/zlib')
|
||||
else:
|
||||
if not conf.CHECK_INIPARSER():
|
||||
raise Utils.WafError('iniparser development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
|
||||
else:
|
||||
conf.define('USING_SYSTEM_INIPARSER', 1)
|
||||
|
||||
if not conf.CHECK_ZLIB():
|
||||
raise Utils.WafError('zlib development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
|
||||
else:
|
||||
conf.define('USING_SYSTEM_ZLIB',1);
|
||||
|
||||
conf.RECURSE('lib/ldb')
|
||||
|
||||
if Options.options.with_system_mitkrb5:
|
||||
@ -147,7 +153,6 @@ def configure(conf):
|
||||
conf.RECURSE('lib/util')
|
||||
conf.RECURSE('lib/ccan')
|
||||
conf.RECURSE('lib/ntdb')
|
||||
conf.RECURSE('lib/zlib')
|
||||
conf.RECURSE('lib/util/charset')
|
||||
conf.RECURSE('source4/auth')
|
||||
conf.RECURSE('lib/nss_wrapper')
|
||||
|
@ -73,6 +73,7 @@ bld.RECURSE('lib/nss_wrapper')
|
||||
bld.RECURSE('lib/uid_wrapper')
|
||||
if bld.CHECK_FOR_THIRD_PARTY():
|
||||
bld.RECURSE('third_party/iniparser/src')
|
||||
bld.RECURSE('third_party/zlib')
|
||||
bld.RECURSE('lib/popt')
|
||||
bld.RECURSE('source4/lib/stream')
|
||||
bld.RECURSE('lib/afs')
|
||||
@ -82,7 +83,6 @@ bld.RECURSE('lib/tdr')
|
||||
bld.RECURSE('lib/tsocket')
|
||||
bld.RECURSE('lib/crypto')
|
||||
bld.RECURSE('lib/torture')
|
||||
bld.RECURSE('lib/zlib')
|
||||
bld.RECURSE('source4/lib/com')
|
||||
bld.RECURSE('source4/dns_server')
|
||||
bld.RECURSE('source4/echo_server')
|
||||
|
Loading…
Reference in New Issue
Block a user