summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/zlib/wscript11
-rw-r--r--source4/wscript_build2
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/zlib/wscript b/lib/zlib/wscript
index 705fe90d9c..51e4690869 100644
--- a/lib/zlib/wscript
+++ b/lib/zlib/wscript
@@ -9,3 +9,14 @@ def configure(conf):
#endif
''',
define='HAVE_ZLIB')
+
+def build(bld):
+ if bld.CONFIG_SET('HAVE_ZLIB'):
+ bld.TARGET_ALIAS('z', 'ZLIB')
+ else:
+ bld.SAMBA_LIBRARY('ZLIB',
+ 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''')
+
+
diff --git a/source4/wscript_build b/source4/wscript_build
index 79e07deb06..5d46ca48b8 100644
--- a/source4/wscript_build
+++ b/source4/wscript_build
@@ -15,7 +15,6 @@ bld.SAMBA_MKVERSION('version.h')
# this sets up some aliases
bld.TARGET_ALIAS('attr', 'XATTR')
bld.TARGET_ALIAS('tevent', 'LIBTEVENT_EXT')
-bld.TARGET_ALIAS('z', 'ZLIB')
bld.TARGET_ALIAS('sasl2', 'SASL')
bld.TARGET_ALIAS('RPC_NDR_SRVSVC', 'NDR_SRVSVC')
bld.TARGET_ALIAS('RPC_NDR_MGMT', 'dcerpc_mgmt')
@@ -78,6 +77,7 @@ bld.BUILD_SUBDIR('../lib/tdr')
bld.BUILD_SUBDIR('../lib/tsocket')
bld.BUILD_SUBDIR('../lib/crypto')
bld.BUILD_SUBDIR('../lib/torture')
+bld.BUILD_SUBDIR('../lib/zlib')
bld.BUILD_SUBDIR('lib')
bld.BUILD_SUBDIR('lib/com')
bld.BUILD_SUBDIR('smb_server')