From: Petr Špaček Date: Wed, 23 Oct 2019 11:34:08 +0000 (+0200) Subject: doh debug: do not build debug_opensslkeylog if openssl is missing X-Git-Tag: v4.3.0~8^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d0af9d270eae31f1ebc381c9a790c06880efcd0;p=thirdparty%2Fknot-resolver.git doh debug: do not build debug_opensslkeylog if openssl is missing --- diff --git a/meson.build b/meson.build index 0f6e2dfe8..897b2c643 100644 --- a/meson.build +++ b/meson.build @@ -30,6 +30,7 @@ luajit = dependency('luajit') # NOTE avoid using link_args for luajit due to a macOS issue # https://github.com/Homebrew/homebrew-core/issues/37169 luajit_inc = luajit.partial_dependency(compile_args: true, includes: true) +openssl = dependency('openssl', required: false) message('------------------------------') @@ -261,6 +262,7 @@ 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' s_sendmmsg = sendmmsg ? 'enabled': 'disabled' +s_openssl = openssl.found() ? 'present': 'missing' message(''' ======================= SUMMARY ======================= @@ -295,6 +297,7 @@ message(''' group: @0@'''.format(group) + ''' install_kresd_conf: @0@'''.format(s_install_kresd_conf) + ''' sendmmsg: @0@'''.format(s_sendmmsg) + ''' + openssl debug: @0@'''.format(s_openssl) + ''' ======================================================= diff --git a/modules/http/debug_opensslkeylog.c b/modules/http/debug_opensslkeylog.c index 4a8d13e9e..7d2bf3a49 100644 --- a/modules/http/debug_opensslkeylog.c +++ b/modules/http/debug_opensslkeylog.c @@ -1,4 +1,7 @@ /* + +:q + * Dumps master keys for OpenSSL clients to file. The format is documented at * https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format * Supports TLS 1.3 when used with OpenSSL 1.1.1. diff --git a/modules/http/meson.build b/modules/http/meson.build index 394f85844..7f2bd771b 100644 --- a/modules/http/meson.build +++ b/modules/http/meson.build @@ -30,17 +30,18 @@ install_subdir( install_dir: join_paths(modules_dir, 'http'), ) -openssl = dependency('openssl') # auxiliary debug library for HTTP module -debug_opensslkeylog_mod = shared_module( - 'debug_opensslkeylog', - ['debug_opensslkeylog.c'], - # visibility=default == public is required for LD_PRELOAD trick - c_args: '-fvisibility=default', - name_prefix: '', - install: true, - install_dir: lib_dir, - dependencies: [ - openssl, - ], -) +if openssl.found() + debug_opensslkeylog_mod = shared_module( + 'debug_opensslkeylog', + ['debug_opensslkeylog.c'], + # visibility=default == public is required for LD_PRELOAD trick + c_args: '-fvisibility=default', + name_prefix: '', + install: true, + install_dir: lib_dir, + dependencies: [ + openssl, + ], + ) +endif