3441ab
From 41d3efebcf6abab9119f9b0f97c86c1c48739fee Mon Sep 17 00:00:00 2001
3441ab
From: Andreas Schneider <asn@samba.org>
3441ab
Date: Mon, 4 Apr 2022 11:24:04 +0200
3441ab
Subject: [PATCH 1/2] waf: Check for GnuTLS earlier
3441ab
3441ab
As GnuTLS is an essential part we need to check for it early so we can react on
3441ab
GnuTLS features in other wscripts.
3441ab
3441ab
Signed-off-by: Andreas Schneider <asn@samba.org>
3441ab
---
3441ab
 wscript | 4 ++--
3441ab
 1 file changed, 2 insertions(+), 2 deletions(-)
3441ab
3441ab
diff --git a/wscript b/wscript
3441ab
index d8220b35095..5b85d9a1682 100644
3441ab
--- a/wscript
3441ab
+++ b/wscript
3441ab
@@ -189,6 +189,8 @@ def configure(conf):
3441ab
     conf.RECURSE('dynconfig')
3441ab
     conf.RECURSE('selftest')
3441ab
 
3441ab
+    conf.PROCESS_SEPARATE_RULE('system_gnutls')
3441ab
+
3441ab
     conf.CHECK_CFG(package='zlib', minversion='1.2.3',
3441ab
                    args='--cflags --libs',
3441ab
                    mandatory=True)
3441ab
@@ -297,8 +299,6 @@ def configure(conf):
3441ab
     if not conf.CONFIG_GET('KRB5_VENDOR'):
3441ab
         conf.PROCESS_SEPARATE_RULE('embedded_heimdal')
3441ab
 
3441ab
-    conf.PROCESS_SEPARATE_RULE('system_gnutls')
3441ab
-
3441ab
     conf.RECURSE('source4/dsdb/samdb/ldb_modules')
3441ab
     conf.RECURSE('source4/ntvfs/sysdep')
3441ab
     conf.RECURSE('lib/util')
3441ab
-- 
3441ab
2.35.1
3441ab
3441ab
3441ab
From 63701a28116afc1550c23cb5f7b9d6e366fd1270 Mon Sep 17 00:00:00 2001
3441ab
From: Andreas Schneider <asn@samba.org>
3441ab
Date: Mon, 4 Apr 2022 11:25:31 +0200
3441ab
Subject: [PATCH 2/2] third_party:waf: Do not recurse in aesni-intel if GnuTLS
3441ab
 provides the cipher
3441ab
3441ab
Signed-off-by: Andreas Schneider <asn@samba.org>
3441ab
---
3441ab
 third_party/wscript | 6 ++++--
3441ab
 1 file changed, 4 insertions(+), 2 deletions(-)
3441ab
3441ab
diff --git a/third_party/wscript b/third_party/wscript
3441ab
index 1f4bc1ce1d7..a17c15bcaa7 100644
3441ab
--- a/third_party/wscript
3441ab
+++ b/third_party/wscript
3441ab
@@ -5,7 +5,8 @@ from waflib import Options
3441ab
 def configure(conf):
3441ab
     conf.RECURSE('cmocka')
3441ab
     conf.RECURSE('popt')
3441ab
-    conf.RECURSE('aesni-intel')
3441ab
+    if not conf.CONFIG_SET('HAVE_GNUTLS_AES_CMAC'):
3441ab
+        conf.RECURSE('aesni-intel')
3441ab
     if conf.CONFIG_GET('ENABLE_SELFTEST'):
3441ab
         conf.RECURSE('socket_wrapper')
3441ab
         conf.RECURSE('nss_wrapper')
3441ab
@@ -18,7 +19,8 @@ def configure(conf):
3441ab
 def build(bld):
3441ab
     bld.RECURSE('cmocka')
3441ab
     bld.RECURSE('popt')
3441ab
-    bld.RECURSE('aesni-intel')
3441ab
+    if not bld.CONFIG_SET('HAVE_GNUTLS_AES_CMAC'):
3441ab
+        bld.RECURSE('aesni-intel')
3441ab
     if bld.CONFIG_GET('SOCKET_WRAPPER'):
3441ab
         bld.RECURSE('socket_wrapper')
3441ab
     if bld.CONFIG_GET('NSS_WRAPPER'):
3441ab
-- 
3441ab
2.35.1
3441ab