c4b3d0074 removed the check that nettle or gcrypt were explicitly
requested as the crypto library to use, breaking the --enable-nettle and
--enable-gcrypt options. Re-add the check.

Fixes: c4b3d0074 (crypto: bump min gnutls to 3.7.5)
Signed-off-by: Luc Michel <[email protected]>
---
 meson.build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meson.build b/meson.build
index 164328ded83..475c5922030 100644
--- a/meson.build
+++ b/meson.build
@@ -1809,10 +1809,15 @@ crypto_sm3 = not_found
 
 if get_option('nettle').enabled() and get_option('gcrypt').enabled()
   error('Only one of gcrypt & nettle can be enabled')
 endif
 
+# Explicit nettle/gcrypt request, so ignore gnutls for crypto
+if get_option('nettle').enabled() or get_option('gcrypt').enabled()
+  gnutls = not_found
+endif
+
 if not gnutls.found()
   if (not get_option('gcrypt').auto() or have_system) and not 
get_option('nettle').enabled()
     gcrypt = dependency('libgcrypt', version: '>=1.9.4',
                         required: get_option('gcrypt'))
     # Debian has removed -lgpg-error from libgcrypt-config
-- 
2.53.0


Reply via email to