From: Remi Gacogne Date: Mon, 24 Mar 2025 10:33:32 +0000 (+0100) Subject: meson: Delint the DoT, DoH, DoQ and DoH3 code, as suggested by Otto X-Git-Tag: dnsdist-2.0.0-alpha2~114^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15331%2Fhead;p=thirdparty%2Fpdns.git meson: Delint the DoT, DoH, DoQ and DoH3 code, as suggested by Otto --- diff --git a/meson/dot/meson.build b/meson/dot/meson.build index 91f95515b1..8ad2ba6e6d 100644 --- a/meson/dot/meson.build +++ b/meson/dot/meson.build @@ -4,9 +4,5 @@ if opt_dot.enabled() and not dep_libssl.found() and not dep_gnutls.found() error('DNS over TLS support was requested but neither OpenSSL libssl nor GnuTLS support is enabled') endif -if opt_dot.allowed() and (dep_libssl.found() or dep_gnutls.found()) - conf.set('HAVE_DNS_OVER_TLS', true, description: 'DNS over TLS (DoT)') - summary('DNS over TLS', true, bool_yn: true, section: 'Configuration') -else - summary('DNS over TLS', false, bool_yn: true, section: 'Configuration') -endif +conf.set('HAVE_DNS_OVER_TLS', opt_dot.allowed() and (dep_libssl.found() or dep_gnutls.found()), description: 'DNS over TLS (DoT)') +summary('DNS over TLS', opt_dot.allowed() and (dep_libssl.found() or dep_gnutls.found()), bool_yn: true, section: 'Configuration') diff --git a/pdns/dnsdistdist/meson/doh2/meson.build b/pdns/dnsdistdist/meson/doh2/meson.build index c09d0e42b3..8c8aec50f1 100644 --- a/pdns/dnsdistdist/meson/doh2/meson.build +++ b/pdns/dnsdistdist/meson/doh2/meson.build @@ -9,9 +9,5 @@ if opt_doh2.enabled() endif endif -if opt_doh2.allowed() and (dep_libssl.found() or dep_gnutls.found()) and (dep_libnghttp2.found() or dep_libh2o_evloop.found()) - conf.set('HAVE_DNS_OVER_HTTPS', true, description: 'DNS over HTTP/2 (DoH)') - summary('DNS over HTTP/2', true, bool_yn: true, section: 'Configuration') -else - summary('DNS over HTTP/2', false, bool_yn: true, section: 'Configuration') -endif +conf.set('HAVE_DNS_OVER_HTTPS', opt_doh2.allowed() and (dep_libssl.found() or dep_gnutls.found()) and (dep_libnghttp2.found() or dep_libh2o_evloop.found()), description: 'DNS over HTTP/2 (DoH)') +summary('DNS over HTTP/2', opt_doh2.allowed() and (dep_libssl.found() or dep_gnutls.found()) and (dep_libnghttp2.found() or dep_libh2o_evloop.found()), bool_yn: true, section: 'Configuration') diff --git a/pdns/dnsdistdist/meson/doh3/meson.build b/pdns/dnsdistdist/meson/doh3/meson.build index 052dd138d4..d97e572870 100644 --- a/pdns/dnsdistdist/meson/doh3/meson.build +++ b/pdns/dnsdistdist/meson/doh3/meson.build @@ -6,9 +6,5 @@ if opt_doh3.enabled() endif endif -if opt_doh3.allowed() and dep_libquiche.found() - conf.set('HAVE_DNS_OVER_HTTP3', true, description: 'DNS over HTTP/3 (DoH3)') - summary('DNS over HTTP/3', true, bool_yn: true, section: 'Configuration') -else - summary('DNS over HTTP/3', false, bool_yn: true, section: 'Configuration') -endif +conf.set('HAVE_DNS_OVER_HTTP3', opt_doh3.allowed() and dep_libquiche.found(), description: 'DNS over HTTP/3 (DoH3)') +summary('DNS over HTTP/3', opt_doh3.allowed() and dep_libquiche.found(), bool_yn: true, section: 'Configuration') diff --git a/pdns/dnsdistdist/meson/doq/meson.build b/pdns/dnsdistdist/meson/doq/meson.build index 06fc522ad4..d23830013c 100644 --- a/pdns/dnsdistdist/meson/doq/meson.build +++ b/pdns/dnsdistdist/meson/doq/meson.build @@ -6,9 +6,5 @@ if opt_doq.enabled() endif endif -if opt_doq.allowed() and dep_libquiche.found() - conf.set('HAVE_DNS_OVER_QUIC', true, description: 'DNS over QUIC (DoQ)') - summary('DNS over QUIC', true, bool_yn: true, section: 'Configuration') -else - summary('DNS over QUIC', false, bool_yn: true, section: 'Configuration') -endif +conf.set('HAVE_DNS_OVER_QUIC', opt_doq.allowed() and dep_libquiche.found(), description: 'DNS over QUIC (DoQ)') +summary('DNS over QUIC', opt_doq.allowed() and dep_libquiche.found(), bool_yn: true, section: 'Configuration')