Keep /etc/sysconfig as the fallback, but pick more suitable
values for various Linux distros.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
meson.build | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 8848e58995..f04703b810 100644
--- a/meson.build
+++ b/meson.build
@@ -83,7 +83,16 @@ endif
initconfdir = get_option('initconfdir')
if initconfdir == ''
- initconfdir = sysconfdir / 'sysconfig'
+ if (os_release.contains('alpine') or
+ os_release.contains('arch') or
+ os_release.contains('gentoo'))
+ initconfdir = sysconfdir / 'conf.d'
+ # Ubuntu has ID_LIKE=debian
+ elif os_release.contains('debian')
+ initconfdir = sysconfdir / 'default'
+ else
+ initconfdir = sysconfdir / 'sysconfig'
+ endif
endif
bindir = prefix / get_option('bindir')
--
2.40.1