summaryrefslogtreecommitdiff
path: root/lib/zlib/wscript
blob: c16dc4c0295820d84a90eb9a45ad257d823cec89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python

def configure(conf):
    conf.CHECK_HEADERS('zlib.h')
    conf.CHECK_FUNCS_IN('zlibVersion', 'z')

    conf.CHECK_CODE('''
                    #if (ZLIB_VERNUM >= 0x1230)
                    #else
                    #error "ZLIB_VERNUM < 0x1230"
                    #endif
                    ''',
                    headers='zlib.h',
                    local_include=False,
                    msg='Checking for ZLIB_VERNUM >= 0x1230',
                    define='HAVE_ZLIB')

def build(bld):
    if bld.CONFIG_SET('HAVE_ZLIB'):
        bld.TARGET_ALIAS('z', 'ZLIB')
    else:
        bld.SAMBA_LIBRARY('ZLIB',
                          private_library=True,
                          deps='replace',
                          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''')