From: Fred Morcos Date: Tue, 9 Apr 2024 10:17:37 +0000 (+0200) Subject: Meson: Add system build flag X-Git-Tag: rec-5.1.0-alpha1~46^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a9b9dda5307421e7f721aae01b6216fe66779ff;p=thirdparty%2Fpdns.git Meson: Add system build flag --- diff --git a/meson/systemd/meson.build b/meson/systemd/meson.build index 74f515bfd4..13b097b7a9 100644 --- a/meson/systemd/meson.build +++ b/meson/systemd/meson.build @@ -1,13 +1,9 @@ -dep_systemd = dependency('libsystemd', required: false) +opt_systemd = get_option('systemd') + +dep_systemd = dependency('libsystemd', required: opt_systemd) conf.set('HAVE_SYSTEMD', dep_systemd.found(), description: 'systemd') summary('Systemd', dep_systemd.found(), bool_yn: true, section: 'Configuration') if dep_systemd.found() summary('Version', dep_systemd.version(), section: 'Systemd') - - systemd_service_user = get_option('systemd-service-user') - systemd_service_group = get_option('systemd-service-group') - - summary('Service User', systemd_service_user, section: 'Systemd') - summary('Service Group', systemd_service_group, section: 'Systemd') endif diff --git a/meson_options.txt b/meson_options.txt index 64d5dc8d2c..c33ae9b8db 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -36,6 +36,7 @@ option('module-lua2', type: 'combo', choices: ['disabled', 'static', 'dynamic'], option('tools', type: 'boolean', value: false, description: 'Build extra tools') option('tools-ixfrdist', type: 'boolean', value: false, description: 'Build ixfrdist') option('lua-records', type: 'boolean', value: true, description: 'Support Lua records') +option('systemd', type: 'feature', value: 'auto', description: 'Systemd notification (requires libsystemd)') option('systemd-service-user', type: 'string', value: 'pdns', description: 'Systemd service user (setuid and unit file; user is not created)') option('systemd-service-group', type: 'string', value: 'pdns', description: 'Systemd service group (setgid and unit file; group is not created)') option('auto-var-init', type: 'combo', value: 'disabled', choices: ['zero', 'pattern', 'disabled'], description: 'Enable initialization of automatic variables')