summaryrefslogtreecommitdiffstats
path: root/third_party/zlib/wscript
diff options
context:
space:
mode:
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 0000000000..9965fe2760
--- /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''')