Use tevent_req_oom
[samba.git] / lib / zlib / wscript
1 #!/usr/bin/env python
2
3 def configure(conf):
4     conf.CHECK_HEADERS('zlib.h')
5     conf.CHECK_FUNCS_IN('zlibVersion', 'z')
6
7     conf.CHECK_CODE('''
8                     #if (ZLIB_VERNUM >= 0x1230)
9                     #else
10                     #error "ZLIB_VERNUM < 0x1230"
11                     #endif
12                     ''',
13                     headers='zlib.h',
14                     local_include=False,
15                     msg='Checking for ZLIB_VERNUM >= 0x1230',
16                     define='HAVE_ZLIB')
17
18     # If we don't do this then we will receive an error that lib 'z'
19     # is already declared as a system lib (for the cases where zlibVersion
20     # is defined
21     if not conf.env['HAVE_ZLIB']:
22                 conf.LOCAL_CACHE_SET('TARGET_TYPE', 'z', 'EMPTY')
23
24 def build(bld):
25     if not bld.CONFIG_SET('HAVE_ZLIB'):
26         bld.SAMBA_LIBRARY('z',
27                           private_library=True,
28                           deps='replace',
29                           source='''adler32.c compress.c crc32.c gzio.c
30                                     uncompr.c deflate.c trees.c zutil.c
31                                     inflate.c infback.c inftrees.c inffast.c''')