chiark / gitweb /
meson: make DNS-over-TLS support optional
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 Jun 2018 16:29:49 +0000 (01:29 +0900)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
This adds dns-over-tls option to meson. If set to 'false',
systemd-resolved is not linked with libgnutls.

meson.build
meson_options.txt

index a9cf647edcf46c0b25eb89280bf39bee11cc7ebe..b176232ebb5eb761ca7d31ad7ee6e4042d760768 100644 (file)
@@ -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)
@@ -1946,6 +1953,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',
 executable('elogind-user-runtime-dir',
            user_runtime_dir_sources,
            include_directories : includes,
@@ -3312,6 +3320,7 @@ foreach tuple : [
 #         ['localed'],
 #         ['networkd'],
 #         ['resolve'],
+#         ['DNS-over-TLS'],
 #         ['coredump'],
 #endif // 0
         ['polkit'],
index 3ff9e5d2889cbe10deefe6361c7dc8b8d1d76545..487c43c555e134856cf6b458dd2e4110157a9aa6 100644 (file)
@@ -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')