Blame SOURCES/0058-meson-check-whether-gnutls-supports-TCP-fast-open.patch

a3e2b5
From b6943446f8ffde53ce059b5e869c22bed8926827 Mon Sep 17 00:00:00 2001
a3e2b5
From: Yu Watanabe <watanabe.yu+github@gmail.com>
a3e2b5
Date: Mon, 25 Jun 2018 22:40:40 +0900
a3e2b5
Subject: [PATCH] meson: check whether gnutls supports TCP fast open
a3e2b5
a3e2b5
Fixes #9403
a3e2b5
a3e2b5
Cherry-picked from: f02582f69fe1e7663a87ba80bd4f90d5d23ee75f
a3e2b5
---
a3e2b5
 README      | 1 +
a3e2b5
 meson.build | 2 +-
a3e2b5
 2 files changed, 2 insertions(+), 1 deletion(-)
a3e2b5
a3e2b5
diff --git a/README b/README
a3e2b5
index 2cde08c37e..7d06e04800 100644
a3e2b5
--- a/README
a3e2b5
+++ b/README
a3e2b5
@@ -154,6 +154,7 @@ REQUIREMENTS:
a3e2b5
         libmicrohttpd (optional)
a3e2b5
         libpython (optional)
a3e2b5
         libidn2 or libidn (optional)
a3e2b5
+        gnutls >= 3.1.4 (optional, >= 3.5.3 is necessary to support DNS-over-TLS)
a3e2b5
         elfutils >= 158 (optional)
a3e2b5
         polkit (optional)
a3e2b5
         pkg-config
a3e2b5
diff --git a/meson.build b/meson.build
a3e2b5
index ebc55872c9..d58926c981 100644
a3e2b5
--- a/meson.build
a3e2b5
+++ b/meson.build
a3e2b5
@@ -1148,7 +1148,7 @@ substs.set('DEFAULT_DNSSEC_MODE', default_dnssec)
a3e2b5
 
a3e2b5
 dns_over_tls = get_option('dns-over-tls')
a3e2b5
 if dns_over_tls != 'false'
a3e2b5
-        have = conf.get('HAVE_GNUTLS') == 1
a3e2b5
+        have = libgnutls != [] and libgnutls.version().version_compare('>=3.5.3')
a3e2b5
         if dns_over_tls == 'true' and not have
a3e2b5
                 error('DNS-over-TLS support was requested, but dependencies are not available')
a3e2b5
         endif