summaryrefslogtreecommitdiffstats
path: root/buildtools/wafsamba/samba_third_party.py
blob: b62bcc8ec51de6a86fd609f661ec0e33e7f2096c (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
28
29
30
31
32
33
34
35
# functions to support third party libraries

from Configure import conf
import sys, Logs, os
from samba_bundled import *

@conf
def CHECK_FOR_THIRD_PARTY(conf):
    return os.path.exists('third_party')

Build.BuildContext.CHECK_FOR_THIRD_PARTY = CHECK_FOR_THIRD_PARTY

@conf
def CHECK_INIPARSER(conf):
    return conf.CHECK_BUNDLED_SYSTEM('iniparser', checkfunctions='iniparser_load', headers='iniparser.h')

Build.BuildContext.CHECK_INIPARSER = CHECK_INIPARSER

@conf
def CHECK_ZLIB(conf):
    version_check='''
    #if (ZLIB_VERNUM >= 0x1230)
    #else
    #error "ZLIB_VERNUM < 0x1230"
    #endif
    z_stream *z;
    inflateInit2(z, -15);
    '''
    return conf.CHECK_BUNDLED_SYSTEM('z', minversion='1.2.3', pkg='zlib',
                                     checkfunctions='zlibVersion',
                                     headers='zlib.h',
                                     checkcode=version_check,
                                     implied_deps='replace')

Build.BuildContext.CHECK_ZLIB = CHECK_ZLIB