subdir('meson/gss-tsig') # GSS-TSIG
subdir('meson/auth-tools') # Tools
subdir('meson/ixfrdist') # Ixfrdist
+subdir('meson/systemd') # Systemd and unit file handling
# Find or generate pdns/dnslabeltext.cc
if not ragel.found() and not fs.exists('pdns/dnslabeltext.cc')
--- /dev/null
+# Systemd and unit file handling
+# Inputs: conf
+# Outputs: dep_systemd
+
+dep_systemd = dependency('systemd', required: false)
+conf.set10('HAVE_SYSTEMD', dep_systemd.found(), description: 'Whether we have systemd')
+summary('Systemd', dep_systemd.found(), bool_yn: true, section: 'Configuration')
+
+if dep_systemd.found()
+ summary('Systemd Version', dep_systemd.version(), section: 'Configuration')
+
+ systemd_service_user = get_option('systemd-service-user')
+ systemd_service_group = get_option('systemd-service-group')
+
+ summary('Systemd User', systemd_service_user, section: 'Configuration')
+ summary('Systemd Group', systemd_service_group, section: 'Configuration')
+endif
option('tools', type: 'boolean', value: false, description: 'Build the extra tools')
option('ixfrdist', type: 'boolean', value: false, description: 'Build ixfrdist')
option('lua-records', type: 'boolean', value: true, description: 'Build support for Lua records')
+option('systemd-service-user', type: 'string', value: 'pdns', description: 'User to run the systemd pdns service as. Only the setuid setting and User field in the systemd unit file are affected, the user is not created')
+option('systemd-service-group', type: 'string', value: 'pdns', description: 'Group to run the systemd pdns service under. Only the setgid setting and Group field in the systemd unit file are affected, the group is not created')