--- a/meson.build +++ b/meson.build @@ -145,7 +145,7 @@ xdp = meson.get_compiler('c').has_header('libknot/xdp/xdp.h') ### Systemd systemd_files = get_option('systemd_files') systemd_legacy_units = get_option('systemd_legacy_units') -libsystemd = dependency('libsystemd', required: systemd_files == 'enabled') +libsystemd = dependency('libsystemd', required: get_option('systemd')) # Uh, lifted this trivial line from tests/meson.build due to dependency sorting: build_extra_tests = get_option('extra_tests') == 'enabled' --- a/meson_options.txt +++ b/meson_options.txt @@ -227,3 +227,10 @@ option( value: 'auto', description: 'add rpath to the knot resolver executables', ) + +option( + 'systemd', + type: 'feature', + value: 'auto', + description: 'systemd watchdog support', +)