File: samba_third_party.py

package info (click to toggle)
talloc 2.1.2-0%2Bdeb8u1
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 2,300 kB
  • ctags: 3,111
  • sloc: python: 20,542; ansic: 11,556; xml: 812; sh: 193; makefile: 122
file content (35 lines) | stat: -rw-r--r-- 1,027 bytes parent folder | download | duplicates (6)
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(os.path.join(Utils.g_module.srcdir, 'third_party'))

Build.BuildContext.CHECK_FOR_THIRD_PARTY = CHECK_FOR_THIRD_PARTY

@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

@conf
def CHECK_POPT(conf):
    return conf.CHECK_BUNDLED_SYSTEM('popt', checkfunctions='poptGetContext', headers='popt.h')

Build.BuildContext.CHECK_POPT = CHECK_POPT