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)
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')
28 bld.SAMBA_SUBSYSTEM('LIBTLS',
29 source='tls.c tlscert.c',
30 public_deps='talloc gnutls gcrypt LIBSAMBA-HOSTCONFIG samba_socket'