build: fixed headers for C prototype check
[Samba/gebeck_regimport.git] / source4 / lib / tls / wscript
bloba993848cf992d3cd303bd7e75ccfbe55ce6df3e8
1 import Options
3 def set_options(opt):
4     # allow users to disable gnutls
5     opt.add_option('--disable-gnutls',
6                    help=("Disable use of gnutls"),
7                    action="store_true", dest='disable_gnutls', default=False)
9 def configure(conf):
10     # check for gnutls
11     conf.check_cfg(package='gnutls',
12                    args='"gnutls >= 1.4.0" --cflags --libs',
13                    msg='Checking for gnutls >= 1.4.0', mandatory=False)
15     if 'HAVE_GNUTLS' in conf.env and not Options.options.disable_gnutls:
16         conf.DEFINE('ENABLE_GNUTLS', 1)
18     conf.CHECK_FUNCS_IN('gnutls_global_init', 'gnutls', headers='gnutls/gnutls.h')
20     # check for gnutls_datum types
21     conf.CHECK_TYPES('gnutls_datum gnutls_datum_t', headers='gnutls/gnutls.h')
23     conf.CHECK_FUNCS_IN('gcry_control', 'gcrypt', headers='gcrypt.h')
24     conf.CHECK_FUNCS_IN('gpg_err_code_from_errno', 'gpg-error')
27 def build(bld):
28     bld.SAMBA_SUBSYSTEM('LIBTLS',
29                         source='tls.c tlscert.c',
30                         public_deps='talloc gnutls gcrypt LIBSAMBA-HOSTCONFIG samba_socket'
31                         )