c_src_lint += kresc_src
build_client = false
-if not get_option('client').disabled()
+if get_option('client') != 'disabled'
message('--- client dependencies ---')
libedit = dependency('libedit', required: false)
if libedit.found()
build_client = true
else # darwin workaround: missing pkgconfig
- libedit = meson.get_compiler('c').find_library('edit', required: get_option('client'))
+ libedit = meson.get_compiler('c').find_library(
+ 'edit', required: get_option('client') == 'enabled')
if libedit.found()
build_client = true
endif
# man page
man_config = configuration_data()
man_config.set('version', meson.project_version())
-man_config.set('date', run_command('../scripts/get-date.sh', check: true).stdout())
+man_config.set('date', run_command('../scripts/get-date.sh').stdout())
man_config.set('keyfile_default', keyfile_default)
man_config.set('man_seealso_systemd',
libsystemd.found() ? '\\fIkresd.systemd(7)\\fR, ' : '')
# html documentation
-if get_option('doc').enabled()
+if get_option('doc') == 'enabled'
message('--- doc dependencies ---')
doxygen = find_program('doxygen')
sphinx_build = find_program('sphinx-build-3', required: false)
# kresd.conf
-install_kresd_conf = get_option('install_kresd_conf').enabled()
-if get_option('install_kresd_conf').auto()
+install_kresd_conf = get_option('install_kresd_conf') == 'enabled'
+if get_option('install_kresd_conf') == 'auto'
if run_command(['test', '-r', join_paths(etc_dir, 'kresd.conf')]).returncode() == 1
install_kresd_conf = true
endif
license: 'GPLv3+',
version: '3.2.1',
default_options: ['c_std=gnu11', 'b_ndebug=if-release'],
- meson_version: '>=0.47.0',
+ meson_version: '>=0.46',
)
systemd_tmpfiles_dir = ''
## Trust anchors
-managed_ta = get_option('managed_ta').enabled()
+managed_ta = get_option('managed_ta') == 'enabled'
keyfile_default = join_paths(etc_dir, get_option('keyfile_default'))
if keyfile_default == join_paths(etc_dir, 'root.keys')
install_root_keys = true
- managed_ta = managed_ta or get_option('managed_ta').auto()
+ managed_ta = managed_ta or get_option('managed_ta') == 'auto'
else
install_root_keys = false
if managed_ta
endif
## Additional options
-opt_verbose_log = get_option('verbose_log')
-verbose_log = opt_verbose_log.enabled() or opt_verbose_log.auto()
+verbose_log = get_option('verbose_log') == 'enabled' or get_option('verbose_log') == 'auto'
user = get_option('user')
group = get_option('group')
subdir('client')
subdir('daemon')
subdir('modules')
-if get_option('bench').enabled()
+if get_option('bench') == 'enabled'
subdir('bench')
endif
option(
'managed_ta',
- type: 'feature',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
value: 'auto',
description: 'auto-manage DNSSEC trust anchors (RFC 5011)',
)
option(
'install_kresd_conf',
- type: 'feature',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
value: 'auto',
description: 'creates kresd.conf in config directory',
)
option(
'verbose_log',
- type: 'feature',
- value: 'enabled',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
+ value: 'auto',
description: 'support verbose logging',
)
# Component options
option(
'bench',
- type: 'feature',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
value: 'disabled',
description: 'build benchmarks',
)
option(
'client',
- type: 'feature',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
value: 'auto',
description: 'build kresc client binary',
)
option(
'doc',
- type: 'feature',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
value: 'disabled',
description: 'html documentation dependencies and installation',
)
option(
'postinstall_tests',
- type: 'feature',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
value: 'disabled',
description: 'postinstall tests with extra dependencies',
)
option(
'unit_tests',
- type: 'feature',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
value: 'auto',
description: 'cmocka unit tests',
)
## unit tests
build_unit_tests = false
-if not get_option('unit_tests').disabled()
+if get_option('unit_tests') != 'disabled'
message('--- unit_tests dependencies ---')
- cmocka = dependency('cmocka', required: get_option('unit_tests'))
+ cmocka = dependency('cmocka', required: get_option('unit_tests') == 'enabled')
if cmocka.found()
build_unit_tests = true
subdir('unit')
## postinstall tests
-build_postinstall_tests = get_option('postinstall_tests').enabled()
+build_postinstall_tests = get_option('postinstall_tests') == 'enabled'
if build_postinstall_tests
+ if meson.version().version_compare('<0.46')
+ error('meson 0.46+ is required for postinstall_tests')
+ endif
+
subdir('config')
message('--- postinstall_tests dependencies ---')