Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 5845c82d1016a3e3f2696180d5ac91b46950540a Mon Sep 17 00:00:00 2001 |
| 2 | From: Chen Qi <Qi.Chen@windriver.com> |
| 3 | Date: Tue, 27 Feb 2018 12:56:21 +0800 |
| 4 | Subject: [PATCH 29/31] nss-mymachines: Build conditionally when |
| 5 | ENABLE_MYHOSTNAME is set |
| 6 | |
| 7 | Fixes build failures when building with --disable-myhostname |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 13 | --- |
| 14 | meson.build | 11 +++++++---- |
| 15 | 1 file changed, 7 insertions(+), 4 deletions(-) |
| 16 | |
| 17 | diff --git a/meson.build b/meson.build |
| 18 | index 1b947adac..1ed4dde72 100644 |
| 19 | --- a/meson.build |
| 20 | +++ b/meson.build |
| 21 | @@ -1351,12 +1351,15 @@ test_dlopen = executable( |
| 22 | link_with : [libbasic], |
| 23 | dependencies : [libdl]) |
| 24 | |
| 25 | -foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME'], |
| 26 | - ['systemd', 'ENABLE_NSS_SYSTEMD'], |
| 27 | - ['mymachines', 'ENABLE_MACHINED'], |
| 28 | - ['resolve', 'ENABLE_RESOLVE']] |
| 29 | +foreach tuple : [['myhostname', 'ENABLE_MYHOSTNAME', ''], |
| 30 | + ['systemd', 'ENABLE_NSS_SYSTEMD', ''], |
| 31 | + ['mymachines', 'ENABLE_MACHINED', 'ENABLE_MYHOSTNAME'], |
| 32 | + ['resolve', 'ENABLE_RESOLVE', '']] |
| 33 | |
| 34 | condition = tuple[1] == '' or conf.get(tuple[1]) == 1 |
| 35 | + if tuple[2] != '' and condition |
| 36 | + condition = conf.get(tuple[2]) == 1 |
| 37 | + endif |
| 38 | if condition |
| 39 | module = tuple[0] |
| 40 | |
| 41 | -- |
| 42 | 2.13.0 |
| 43 | |