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