diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-06-20 18:29:49 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-20 22:28:01 +0200 |
commit | 56ddbf1009a16e2c2b063f3c3d41e1416b0fc17a (patch) | |
tree | 161737747d144bd5796a2552f1faaefa46d04bff /meson.build | |
parent | Merge pull request #9350 from poettering/bls-fixes (diff) | |
download | systemd-56ddbf1009a16e2c2b063f3c3d41e1416b0fc17a.tar.xz systemd-56ddbf1009a16e2c2b063f3c3d41e1416b0fc17a.zip |
meson: make DNS-over-TLS support optional
This adds dns-over-tls option to meson. If set to 'false',
systemd-resolved is not linked with libgnutls.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/meson.build b/meson.build index a97168961d..e1d5b73566 100644 --- a/meson.build +++ b/meson.build @@ -1135,12 +1135,23 @@ conf.set('DEFAULT_DNSSEC_MODE', 'DNSSEC_' + default_dnssec.underscorify().to_upper()) substs.set('DEFAULT_DNSSEC_MODE', default_dnssec) +dns_over_tls = get_option('dns-over-tls') +if dns_over_tls != 'false' + have = conf.get('HAVE_GNUTLS') == 1 + if dns_over_tls == 'true' and not have + error('DNS-over-TLS support was requested, but dependencies are not available') + endif +else + have = false +endif +conf.set10('ENABLE_DNS_OVER_TLS', have) + default_dns_over_tls = get_option('default-dns-over-tls') if fuzzer_build default_dns_over_tls = 'no' endif -if default_dns_over_tls != 'no' and conf.get('HAVE_GNUTLS') == 0 - message('default-dns-over-tls cannot be set to strict or opportunistic when gnutls is disabled. Setting default-dns-over-tls to no.') +if default_dns_over_tls != 'no' and conf.get('ENABLE_DNS_OVER_TLS') == 0 + message('default-dns-over-tls cannot be set to opportunistic when DNS-over-TLS support is disabled. Setting default-dns-over-tls to no.') default_dns_over_tls = 'no' endif conf.set('DEFAULT_DNS_OVER_TLS_MODE', @@ -1594,11 +1605,7 @@ if conf.get('ENABLE_RESOLVE') == 1 link_with : [libshared, libbasic_gcrypt, libsystemd_resolve_core], - dependencies : [threads, - libgnutls, - libgpg_error, - libm, - libidn], + dependencies : systemd_resolved_dependencies, install_rpath : rootlibexecdir, install : true, install_dir : rootlibexecdir) @@ -2950,6 +2957,7 @@ foreach tuple : [ ['localed'], ['networkd'], ['resolve'], + ['DNS-over-TLS'], ['coredump'], ['polkit'], ['legacy pkla', install_polkit_pkla], |