subdir('meson/ixfrdist') # Ixfrdist
subdir('meson/systemd') # Systemd and unit file handling
subdir('meson/code-coverage') # Code coverage
+subdir('meson/auto-var-init') # Automatic Variable Initialization
# Find or generate pdns/dnslabeltext.cc
if not ragel.found() and not fs.exists('pdns/dnslabeltext.cc')
--- /dev/null
+# Automatic Variable Initialization
+
+auto_var_init = get_option('auto-var-init')
+
+if auto_var_init != 'disabled'
+ arg = '-ftrivial-auto-var-init=' + auto_var_init
+ if not cxx.has_argument(arg)
+ error('Compiler does not support ' + arg + ', which is needed for automatic variable initialization')
+ subdir_done()
+ endif
+
+ add_global_arguments(arg)
+endif
+
+summary('Auto Var Init', auto_var_init, section: 'Configuration')
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')
option('code-coverage', type: 'boolean', value: false, description: 'Enable code coverage')
+option('auto-var-init', type: 'combo', value: 'disabled', choices: ['zero', 'pattern', 'disabled'], description: 'Enable initialization of automatic variables')