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 /buildtools | |
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 'buildtools')
-rw-r--r-- | buildtools/wafsamba/wscript | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 8802e5a39d4..fcaaf1b792e 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -490,12 +490,12 @@ struct foo bar = { .y = 'X', .x = 1 }; if not conf.CHECK_LARGEFILE(): raise Utils.WafError('Samba requires large file support support, but not available on this platform: sizeof(off_t) < 8') - if 'HAVE_STDDEF_H' in conf.env and 'HAVE_STDLIB_H' in conf.env: + if conf.env.HAVE_STDDEF_H and conf.env.HAVE_STDLIB_H: conf.DEFINE('STDC_HEADERS', 1) conf.CHECK_HEADERS('sys/time.h time.h', together=True) - if 'HAVE_SYS_TIME_H' in conf.env and 'HAVE_TIME_H' in conf.env: + if conf.env.HAVE_SYS_TIME_H and conf.env.HAVE_TIME_H: conf.DEFINE('TIME_WITH_SYS_TIME', 1) # cope with different extensions for libraries |