mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
buildtools/wafsamba: undefine a define for a failed test unless asked to keep it
If conf.CHECK_CODE() is called without `always=True` and the test has failed, undefine the define already set to '0' by conf.check_code(). This restores expectations that undefined symbols are not considered to be set by CONFIG_SET() method. Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
93b2357035
commit
230796d7ee
@ -447,6 +447,8 @@ def CHECK_CODE(conf, code, define,
|
||||
except Exception:
|
||||
if always:
|
||||
conf.DEFINE(define, 0)
|
||||
else:
|
||||
conf.undefine(define)
|
||||
conf.COMPOUND_END(False)
|
||||
if mandatory:
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user