meson: modules/dnstap - build as a separate component

parent 4fe44cd6
......@@ -231,11 +231,11 @@ run_target(
s_managed_ta = managed_ta ? 'enabled' : 'disabled'
s_systemd_socket = libsystemd.found() ? 'enabled' : 'disabled'
s_build_client = build_client ? 'enabled' : 'disabled'
s_build_dnstap = build_dnstap ? 'enabled' : 'disabled'
s_build_unit_tests = build_unit_tests ? 'enabled' : 'disabled'
s_build_config_tests = build_config_tests ? 'enabled' : 'disabled'
s_build_extra_tests = build_extra_tests ? 'enabled' : 'disabled'
s_install_kresd_conf = install_kresd_conf ? 'enabled' : 'disabled'
# TODO mention dnstap installation?
message('''
======================= SUMMARY =======================
......@@ -258,6 +258,7 @@ message('''
optional components
client: @0@'''.format(s_build_client) + '''
dnstap: @0@'''.format(s_build_dnstap) + '''
unit_tests: @0@'''.format(s_build_unit_tests) + '''
config_tests: @0@'''.format(s_build_config_tests) + '''
extra_tests: @0@'''.format(s_build_extra_tests) + '''
......
......@@ -102,6 +102,18 @@ option(
description: 'build kresc client binary',
)
option(
'dnstap',
type: 'combo',
choices: [
'auto',
'enabled',
'disabled',
],
value: 'auto',
description: 'build dnstap module',
)
option(
'doc',
type: 'combo',
......
......@@ -5,15 +5,21 @@ dnstap_src = files([
])
## dnstap dependencies
message('--- dnstap module dependencies ---')
libprotobuf_c = dependency('libprotobuf-c', version: '>=1', required: false)
libfstrm = dependency('libfstrm', version: '>=0.2', required: false)
protoc_c = find_program('protoc-c', required: false)
message('----------------------------------')
build_dnstap = false
if get_option('dnstap') != 'disabled'
dnstap_required = get_option('dnstap') == 'enabled'
message('--- dnstap module dependencies ---')
libprotobuf_c = dependency('libprotobuf-c', version: '>=1', required: dnstap_required)
libfstrm = dependency('libfstrm', version: '>=0.2', required: dnstap_required)
protoc_c = find_program('protoc-c', required: dnstap_required)
message('----------------------------------')
if libprotobuf_c.found() and libfstrm.found() and protoc_c.found()
build_dnstap = true
endif
endif
# build dnstap if deps are found
if libprotobuf_c.found() and libfstrm.found() and protoc_c.found()
if build_dnstap
c_src_lint += dnstap_src
# generate protobuf-c sources using protoc-c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment