meson: use booleans for conf.set and drop unecessary conditionals

Using conf.set() with a boolean argument does the right thing:
either #ifdef or #undef. This means that conf.set can be used unconditionally.

Previously I used '1' as the placeholder value, and that needs to be changed to
'true' for consistency (under meson 1 cannot be used in boolean context). All
checks need to be adjusted.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-04-27 21:13:08 -04:00
parent 829257d135
commit 2c201c2140
29 changed files with 140 additions and 170 deletions

View File

@@ -1,6 +1,6 @@
in_files = ['basic.conf']
enable_sysusers = conf.get('ENABLE_SYSUSERS', 0) == 1
enable_sysusers = conf.get('ENABLE_SYSUSERS', false)
foreach file : in_files
gen = configure_file(
@@ -15,7 +15,7 @@ endforeach
m4_files = ['systemd.conf']
if conf.get('ENABLE_REMOTE', 0) == 1 and conf.get('HAVE_MICROHTTPD', 0) == 1
if conf.get('ENABLE_REMOTE', false) and conf.get('HAVE_MICROHTTPD', false)
m4_files += ['systemd-remote.conf']
endif