summaryrefslogtreecommitdiff
path: root/third_party/zlib/wscript
diff options
context:
space:
mode:
authorIra Cooper <ira@samba.org>2014-07-22 21:26:40 -0700
committerIra Cooper <ira@samba.org>2014-08-09 18:26:16 +0200
commite8e85689756eaf74e82f55b8ae6f706b430b01cd (patch)
treed4d39094f46bb834683649d0aad3d9a0e785e55c /third_party/zlib/wscript
parentea3d62eea980348e73d6eeb870f36d0908ab42c3 (diff)
downloadsamba-e8e85689756eaf74e82f55b8ae6f706b430b01cd.tar.gz
third_party/zlib: Initial copy of zlib.
Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'third_party/zlib/wscript')
-rw-r--r--third_party/zlib/wscript30
1 files changed, 30 insertions, 0 deletions
diff --git a/third_party/zlib/wscript b/third_party/zlib/wscript
new file mode 100644
index 00000000000..9965fe27601
--- /dev/null
+++ b/third_party/zlib/wscript
@@ -0,0 +1,30 @@
+#!/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'):
+ conf.define('USING_SYSTEM_ZLIB', 1)
+
+def build(bld):
+ if bld.CONFIG_SET('USING_SYSTEM_ZLIB'):
+ return
+
+ bld.SAMBA_LIBRARY('z',
+ private_library=True,
+ deps='replace',
+ allow_warnings=True,
+ source='''adler32.c compress.c crc32.c gzio.c
+ uncompr.c deflate.c trees.c zutil.c
+ inflate.c infback.c inftrees.c inffast.c''')