diff options
-rw-r--r-- | source4/lib/tls/wscript | 87 | ||||
-rw-r--r-- | source4/lib/tls/wscript_build | 17 | ||||
-rw-r--r-- | wscript | 2 |
3 files changed, 17 insertions, 89 deletions
diff --git a/source4/lib/tls/wscript b/source4/lib/tls/wscript deleted file mode 100644 index a26340f56fc..00000000000 --- a/source4/lib/tls/wscript +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env python - -from waflib import Options -from optparse import SUPPRESS_HELP - -def options(opt): - # allow users to disable gnutls - opt.add_option('--enable-gnutls', - help=("Enable use of gnutls"), - action="store_true", dest='enable_gnutls', default=True) - opt.add_option('--disable-gnutls', help=SUPPRESS_HELP, action="store_false", dest='enable_gnutls') - - -def configure(conf): - conf.env.enable_gnutls = Options.options.enable_gnutls - if not conf.env.enable_gnutls: - conf.SET_TARGET_TYPE('gnutls', 'DISABLED') - conf.SET_TARGET_TYPE('gcrypt', 'DISABLED') - conf.SET_TARGET_TYPE('gpg-error', 'DISABLED') - if 'AD_DC_BUILD_IS_ENABLED' in conf.env: - conf.fatal("--disable-gnutls given: Building the AD DC requires GnuTLS (eg libgnutls-dev, gnutls-devel) for ldaps:// support and for the BackupKey protocol") - return - - if Options.options.with_system_mitkrb5 and conf.env.AD_DC_BUILD_IS_ENABLED: - conf.CHECK_CFG(package='gnutls', - args='"gnutls >= 3.4.7" --cflags --libs', - msg='Checking for gnutls >= 3.4.7', - mandatory=True) - conf.DEFINE('HAVE_GNUTLS_3_4_7', 1) - conf.DEFINE('HAVE_GNUTLS3', 1) - else: - if conf.CHECK_CFG(package='gnutls', - args='"gnutls >= 3.4.7" --cflags --libs', - msg='Checking for gnutls >= 3.4.7', - mandatory=False): - conf.DEFINE('HAVE_GNUTLS_3_4_7', 1) - conf.DEFINE('HAVE_GNUTLS3', 1) - elif conf.CHECK_CFG(package='gnutls', - args='"gnutls >= 3.0.0" --cflags --libs', - msg='Checking for gnutls >= 3.0.0s', mandatory=False): - conf.DEFINE('HAVE_GNUTLS3', 1) - else: - conf.CHECK_CFG(package='gnutls', - args='"gnutls >= 1.4.0 gnutls != 2.2.4 gnutls != 2.8.0 gnutls != 2.8.1" --cflags --libs', - msg='Checking for gnutls >= 1.4.0 and broken versions', mandatory=False) - - if conf.env.HAVE_GNUTLS: - conf.DEFINE('ENABLE_GNUTLS', 1) - else: - if 'AD_DC_BUILD_IS_ENABLED' in conf.env: - conf.fatal("Building the AD DC requires GnuTLS (eg libgnutls-dev, gnutls-devel) for ldaps:// support and for the BackupKey protocol") - - conf.CHECK_FUNCS_IN('gnutls_global_init', 'gnutls', - headers='gnutls/gnutls.h') - - conf.CHECK_FUNCS_IN('gnutls_certificate_verify_peers3', 'gnutls', - headers='gnutls/gnutls.h') - conf.CHECK_DECLS('GNUTLS_CERT_EXPIRED GNUTLS_CERT_NOT_ACTIVATED GNUTLS_CERT_UNEXPECTED_OWNER', - headers='gnutls/gnutls.h gnutls/x509.h') - - conf.CHECK_VARIABLE('gnutls_x509_crt_set_version', - headers='gnutls/gnutls.h gnutls/x509.h', - define='HAVE_GNUTLS_X509_CRT_SET_VERSION', - lib='gnutls') - conf.CHECK_VARIABLE('gnutls_x509_crt_set_subject_key_id', - headers='gnutls/gnutls.h gnutls/x509.h', - define='HAVE_GNUTLS_X509_CRT_SET_SUBJECT_KEY_ID', - lib='gnutls') - - # check for gnutls_datum types - conf.CHECK_TYPES('gnutls_datum gnutls_datum_t', - headers='gnutls/gnutls.h', lib='gnutls') - - # GnuTLS3 moved to libnettle, so only do this in the < 3.0 case - if conf.env.HAVE_GNUTLS3: - conf.CHECK_FUNCS_IN('gcry_control', 'gcrypt', headers='gcrypt.h') - conf.CHECK_FUNCS_IN('gpg_err_code_from_errno', 'gpg-error') - else: - conf.SET_TARGET_TYPE('gcrypt', 'DISABLED') - conf.SET_TARGET_TYPE('gpg-error', 'DISABLED') - - -def build(bld): - bld.SAMBA_SUBSYSTEM('LIBTLS', - source='tls.c tlscert.c tls_tstream.c', - public_deps='talloc gnutls gcrypt samba-hostconfig samba_socket LIBTSOCKET tevent tevent-util' - ) diff --git a/source4/lib/tls/wscript_build b/source4/lib/tls/wscript_build new file mode 100644 index 00000000000..40a9520e6e1 --- /dev/null +++ b/source4/lib/tls/wscript_build @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +bld.SAMBA_SUBSYSTEM('LIBTLS', + source=''' + tls.c + tlscert.c + tls_tstream.c + ''', + public_deps=''' + talloc + gnutls + samba-hostconfig + samba_socket + LIBTSOCKET + tevent + tevent-util + ''') @@ -40,7 +40,6 @@ def options(opt): opt.RECURSE('packaging') opt.RECURSE('lib/ldb') opt.RECURSE('selftest') - opt.RECURSE('source4/lib/tls') opt.RECURSE('source4/dsdb/samdb/ldb_modules') opt.RECURSE('pidl') opt.RECURSE('source3') @@ -253,7 +252,6 @@ def configure(conf): conf.PROCESS_SEPARATE_RULE('system_gnutls') - conf.RECURSE('source4/lib/tls') conf.RECURSE('source4/dsdb/samdb/ldb_modules') conf.RECURSE('source4/ntvfs/sysdep') conf.RECURSE('lib/util') |