diff --git a/services/meson.build b/services/meson.build index 0be40f1..5eadcac 100644 --- a/services/meson.build +++ b/services/meson.build @@ -1,4 +1,4 @@ -systemd = dependency('systemd', required: get_option('systemd')) -if systemd.found() +systemd = dependency('systemd') +if (systemd.found() and get_option('systemd').allowed()) or get_option('systemd').enabled() subdir('systemd') endif diff --git a/services/systemd/meson.build b/services/systemd/meson.build index eccbde7..1a15303 100644 --- a/services/systemd/meson.build +++ b/services/systemd/meson.build @@ -1,4 +1,8 @@ -unitdir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir') +if systemd.found() + unitdir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir') +else + unitdir = join_paths(prefixdir, get_option('libdir'), 'systemd', 'system') +endif prefixdir = get_option('prefix') bindir = join_paths(prefixdir, get_option('bindir'))