]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:crypto: Merge wscript_configure into wscript
authorAndreas Schneider <asn@samba.org>
Mon, 2 Aug 2021 14:28:53 +0000 (16:28 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 28 Jul 2022 11:51:28 +0000 (11:51 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/crypto/wscript
lib/crypto/wscript_configure [deleted file]

index 34f865346d470c82a89dd7f6ac69c1fa44468cda..040718d42df13e925e5b839fceedcfec8109d765 100644 (file)
@@ -1,4 +1,7 @@
 #!/usr/bin/env python
+from waflib import Options
+from waflib import Errors, Logs
+
 
 def options(opt):
     opt.add_option('--accel-aes',
@@ -7,3 +10,20 @@ def options(opt):
                    action="store",
                    dest='accel_aes',
                    default="none")
+
+
+def configure(conf):
+    if conf.CHECK_FUNCS('SHA1_Update'):
+        conf.DEFINE('SHA1_RENAME_NEEDED', 1)
+
+    #
+    # --aes-accel=XXX selects accelerated AES crypto library to use, if any.
+    # Default is none.
+    #
+    if Options.options.accel_aes.lower() == "intelaesni":
+        Logs.info("Attempting to compile with runtime-switchable x86_64 "
+                  "Intel AES instructions. WARNING - this is temporary.")
+    elif Options.options.accel_aes.lower() != "none":
+        raise Errors.WafError("--aes-accel=%s is not a valid option. Valid "
+                              "options are [none|intelaesni]" %
+                              Options.options.accel_aes)
diff --git a/lib/crypto/wscript_configure b/lib/crypto/wscript_configure
deleted file mode 100644 (file)
index 328ad1d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-from waflib import Options
-from waflib import Errors, Logs
-
-if conf.CHECK_FUNCS('SHA1_Update'):
-       conf.DEFINE('SHA1_RENAME_NEEDED', 1)
-
-#
-# --aes-accel=XXX selects accelerated AES crypto library to use, if any.
-# Default is none.
-#
-if Options.options.accel_aes.lower() == "intelaesni":
-        Logs.info("Attempting to compile with runtime-switchable x86_64 Intel AES instructions. WARNING - this is temporary.")
-elif Options.options.accel_aes.lower() != "none":
-        raise Errors.WafError('--aes-accel=%s is not a valid option. Valid options are [none|intelaesni]' % Options.options.accel_aes)