diff options
author | Thomas Nagy <tnagy@waf.io> | 2016-03-26 14:35:52 +0100 |
---|---|---|
committer | Uri Simchoni <uri@samba.org> | 2017-02-21 13:47:07 +0100 |
commit | e36e1f7b12291ac818206cadc2b3081a02f62f84 (patch) | |
tree | 2857090e9064794584d341ee12ce78e8c0a67ca9 /source4/lib | |
parent | f73c6bd2698ccd6e52b0782407c1c6c6fe78d60d (diff) | |
download | samba-e36e1f7b12291ac818206cadc2b3081a02f62f84.tar.gz |
build:wafsamba: Remove ambiguous 'if x in conf.env' constructs
Configuration values such as HAVE_STDDEF_H can be set to 0
to indicate a test failure. Waf 1.5 has a few bugs that
prevent configuration tests from setting such values
consistently on failures.
Consequently, conditions such as 'if conf.env.VARNAME' must be
used to indicate that config test successes are expected.
Note that conf.env.VARNAME always returns an empty list (False value)
when no variable is defined so there are no risk of raising
AttributeError/KeyError exceptions.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Tue Feb 21 13:47:07 CET 2017 on sn-devel-144
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/tls/wscript | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/tls/wscript b/source4/lib/tls/wscript index ecde3602880..35c8cd265e3 100644 --- a/source4/lib/tls/wscript +++ b/source4/lib/tls/wscript @@ -44,7 +44,7 @@ def configure(conf): 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 'HAVE_GNUTLS' in conf.env: + if conf.env.HAVE_GNUTLS: conf.DEFINE('ENABLE_GNUTLS', 1) else: if 'AD_DC_BUILD_IS_ENABLED' in conf.env: @@ -72,7 +72,7 @@ def configure(conf): headers='gnutls/gnutls.h', lib='gnutls') # GnuTLS3 moved to libnettle, so only do this in the < 3.0 case - if not 'HAVE_GNUTLS3' in conf.env: + 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: |