meson: allow building resolved and machined without nss modules

This adds -Dnss-resolve= and -Dnss-mymachines= meson options.
By using this option, e.g., resolved can be built without nss-resolve.
When no nss modules are built, then test-nss is neither built.

Also, This changes the option name -Dmyhostname= to -Dnss-myhostname=
for consistency to other nss related options.

Closes #9596.
This commit is contained in:
Yu Watanabe
2018-07-23 14:03:05 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent a0cb8078b1
commit 08540a9591
8 changed files with 52 additions and 20 deletions
+1 -1
View File
@@ -645,7 +645,7 @@ tests += [
[['src/test/test-nss.c'],
[],
[libdl],
'', 'manual'],
'ENABLE_NSS', 'manual'],
[['src/test/test-umount.c',
'src/core/mount-setup.c',
+3 -3
View File
@@ -431,13 +431,13 @@ static int parse_argv(int argc, char **argv,
modules = strv_new(argv[1], NULL);
else
modules = strv_new(
#if ENABLE_MYHOSTNAME
#if ENABLE_NSS_MYHOSTNAME
"myhostname",
#endif
#if ENABLE_RESOLVE
#if ENABLE_NSS_RESOLVE
"resolve",
#endif
#if ENABLE_MACHINED
#if ENABLE_NSS_MYMACHINES
"mymachines",
#endif
"dns",