1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/lib/crypto/wscript_configure
Andreas Schneider 826e37218d lib:crypto: Remove unused SHA256 and HMAC SHA256
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-04-30 23:18:28 +00:00

27 lines
1.1 KiB
Python

#!/usr/bin/env python
from waflib import Options
from waflib import Errors, Logs
if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
checklibc=True):
conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
checklibc=True)
conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
checklibc=True)
conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
checklibc=True)
if conf.CHECK_FUNCS('SHA1_Update'):
conf.DEFINE('SHA1_RENAME_NEEDED', 1)
if conf.CHECK_FUNCS('SHA512_Update'):
conf.DEFINE('SHA512_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)