diff options
author | Andreas Schneider <asn@samba.org> | 2021-08-02 16:28:53 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2022-07-28 11:51:28 +0000 |
commit | a519d57cef82ec4f43d0579bcff4b54333ce6cef (patch) | |
tree | d9d94c928c40705024116ab45594dbcc956a5427 /lib/crypto | |
parent | b24c8f540f10406ac8b348a26912d19f6427ccb5 (diff) | |
download | samba-a519d57cef82ec4f43d0579bcff4b54333ce6cef.tar.gz |
lib:crypto: Merge wscript_configure into wscript
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/crypto')
-rw-r--r-- | lib/crypto/wscript | 20 | ||||
-rw-r--r-- | lib/crypto/wscript_configure | 15 |
2 files changed, 20 insertions, 15 deletions
diff --git a/lib/crypto/wscript b/lib/crypto/wscript index 34f865346d4..040718d42df 100644 --- a/lib/crypto/wscript +++ b/lib/crypto/wscript @@ -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 index 328ad1d2a56..00000000000 --- a/lib/crypto/wscript_configure +++ /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) |