diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-24 16:21:28 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:27:04 +1000 |
commit | 9df6c861233c422b4d24fd017773745781e8815a (patch) | |
tree | bb457917077f30c0344179b1b0d5037de1df9446 /source4 | |
parent | 6ef817dd7c90c20a0fb2e0e9a69e20dcd03ae459 (diff) | |
download | samba-9df6c861233c422b4d24fd017773745781e8815a.tar.gz samba-9df6c861233c422b4d24fd017773745781e8815a.tar.bz2 samba-9df6c861233c422b4d24fd017773745781e8815a.zip |
build: honor both --enable-gnutls and --disable-gnutls
This shows how we can do the dual-boolean rules we use so much with
autoconf
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/tls/wscript | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source4/lib/tls/wscript b/source4/lib/tls/wscript index 4fbbd0deaa..6f517de48d 100644 --- a/source4/lib/tls/wscript +++ b/source4/lib/tls/wscript @@ -1,13 +1,19 @@ import Options +from optparse import SUPPRESS_HELP def set_options(opt): # allow users to disable gnutls - opt.add_option('--disable-gnutls', - help=("Disable use of gnutls"), - action="store_true", dest='disable_gnutls', default=False) + 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): - # check for gnutls + conf.env.enable_gnutls = Options.options.enable_gnutls + if not conf.env.enable_gnutls: + return + conf.check_cfg(package='gnutls', args='"gnutls >= 1.4.0" --cflags --libs', msg='Checking for gnutls >= 1.4.0', mandatory=False) @@ -38,5 +44,6 @@ def configure(conf): def build(bld): bld.SAMBA_SUBSYSTEM('LIBTLS', source='tls.c tlscert.c', - public_deps='talloc gnutls gcrypt LIBSAMBA-HOSTCONFIG samba_socket' + public_deps='talloc gnutls gcrypt LIBSAMBA-HOSTCONFIG samba_socket', + enabled = bld.env.enable_gnutls ) |