summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-06-21 01:29:49 +0900
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commitff8b209595fb77a89a43a741e65a0b2c490d4143 (patch)
treea044fef7578156c0f921d36e3164aa58c2b9a158
parent45e22824599407db1bd777fe012dfd2bccccf9ad (diff)
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.
-rw-r--r--meson.build23
-rw-r--r--meson_options.txt2
2 files changed, 18 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index a9cf647ed..b176232eb 100644
--- a/meson.build
+++ b/meson.build
@@ -1298,12 +1298,23 @@ conf.set10('HAVE_DBUS', have)
# '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',
@@ -1805,11 +1816,7 @@ test_dlopen = executable(
# 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)
@@ -1947,6 +1954,7 @@ executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
+executable('elogind-user-runtime-dir',
user_runtime_dir_sources,
include_directories : includes,
link_with : [libshared, liblogind_core],
@@ -3312,6 +3320,7 @@ foreach tuple : [
# ['localed'],
# ['networkd'],
# ['resolve'],
+# ['DNS-over-TLS'],
# ['coredump'],
#endif // 0
['polkit'],
diff --git a/meson_options.txt b/meson_options.txt
index 3ff9e5d28..487c43c55 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -249,6 +249,8 @@ option('gshadow', type : 'boolean',
# description : 'default DNS-over-TLS mode',
# choices : ['opportunistic', 'no'],
# value : 'no')
+# option('dns-over-tls', type : 'combo', choices : ['auto', 'true', 'false'],
+# description : 'DNS-over-TLS support')
# option('dns-servers', type : 'string',
# description : 'space-separated list of default DNS servers',
# value : '8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844')