Commit 7387b0dd authored by Tomas Krizek's avatar Tomas Krizek

meson: modules/dnstap - build as a separate component

parent 4fe44cd6
...@@ -231,11 +231,11 @@ run_target( ...@@ -231,11 +231,11 @@ run_target(
s_managed_ta = managed_ta ? 'enabled' : 'disabled' s_managed_ta = managed_ta ? 'enabled' : 'disabled'
s_systemd_socket = libsystemd.found() ? 'enabled' : 'disabled' s_systemd_socket = libsystemd.found() ? 'enabled' : 'disabled'
s_build_client = build_client ? '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_unit_tests = build_unit_tests ? 'enabled' : 'disabled'
s_build_config_tests = build_config_tests ? 'enabled' : 'disabled' s_build_config_tests = build_config_tests ? 'enabled' : 'disabled'
s_build_extra_tests = build_extra_tests ? 'enabled' : 'disabled' s_build_extra_tests = build_extra_tests ? 'enabled' : 'disabled'
s_install_kresd_conf = install_kresd_conf ? 'enabled' : 'disabled' s_install_kresd_conf = install_kresd_conf ? 'enabled' : 'disabled'
# TODO mention dnstap installation?
message(''' message('''
======================= SUMMARY ======================= ======================= SUMMARY =======================
...@@ -258,6 +258,7 @@ message(''' ...@@ -258,6 +258,7 @@ message('''
optional components optional components
client: @0@'''.format(s_build_client) + ''' client: @0@'''.format(s_build_client) + '''
dnstap: @0@'''.format(s_build_dnstap) + '''
unit_tests: @0@'''.format(s_build_unit_tests) + ''' unit_tests: @0@'''.format(s_build_unit_tests) + '''
config_tests: @0@'''.format(s_build_config_tests) + ''' config_tests: @0@'''.format(s_build_config_tests) + '''
extra_tests: @0@'''.format(s_build_extra_tests) + ''' extra_tests: @0@'''.format(s_build_extra_tests) + '''
......
...@@ -102,6 +102,18 @@ option( ...@@ -102,6 +102,18 @@ option(
description: 'build kresc client binary', description: 'build kresc client binary',
) )
option(
'dnstap',
type: 'combo',
choices: [
'auto',
'enabled',
'disabled',
],
value: 'auto',
description: 'build dnstap module',
)
option( option(
'doc', 'doc',
type: 'combo', type: 'combo',
......
...@@ -5,15 +5,21 @@ dnstap_src = files([ ...@@ -5,15 +5,21 @@ dnstap_src = files([
]) ])
## dnstap dependencies ## dnstap dependencies
message('--- dnstap module dependencies ---') build_dnstap = false
libprotobuf_c = dependency('libprotobuf-c', version: '>=1', required: false) if get_option('dnstap') != 'disabled'
libfstrm = dependency('libfstrm', version: '>=0.2', required: false) dnstap_required = get_option('dnstap') == 'enabled'
protoc_c = find_program('protoc-c', required: false) message('--- dnstap module dependencies ---')
message('----------------------------------') 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 build_dnstap
if libprotobuf_c.found() and libfstrm.found() and protoc_c.found()
c_src_lint += dnstap_src c_src_lint += dnstap_src
# generate protobuf-c sources using protoc-c # 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