wscript_zlib (1142B)
1 # -*- python -*- 2 3 def options(ctx): 4 ctx.system_opt('zlib') 5 6 def configure(ctx): 7 def system_zlib(ctx): 8 ctx.check_cfg(package='zlib', args='--cflags --libs', 9 define_name='', add_to_env=False) 10 11 ctx.with_chk('zlib', {'system': system_zlib, 'bundle': 'zlib'}) 12 13 def build(ctx): 14 if ctx.env.WITH_ZLIB != 'bundle': return 15 16 src = [ 17 'zlib/adler32.c', 18 # 'zlib/compress.c', 19 'zlib/crc32.c', 20 # 'zlib/deflate.c', 21 # 'zlib/gzclose.c', 22 # 'zlib/gzlib.c', 23 # 'zlib/gzread.c', 24 # 'zlib/gzwrite.c', 25 # 'zlib/infback.c', 26 'zlib/inffast.c', 27 'zlib/inflate.c', 28 'zlib/inftrees.c', 29 # 'zlib/trees.c', 30 # 'zlib/uncompr.c', 31 'zlib/zutil.c', 32 ] 33 34 ctx.stlib(idx = 10000, 35 source = src, 36 defines = ['HAVE_STDARG_H', 'HAVE_HIDDEN', 37 'NO_GZCOMPRESS', 'Z_SOLO' ], 38 includes = 'zlib', 39 export_includes = 'zlib', 40 target = 'zlib', 41 uselib = 'EXT')