lib:crypto: Remove unused SHA512
[samba.git] / lib / crypto / wscript_configure
1 #!/usr/bin/env python
2 from waflib import Options
3 from waflib import Errors, Logs
4
5 if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
6     checklibc=True):
7     conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
8                         checklibc=True)
9     conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
10                         checklibc=True)
11 conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
12     checklibc=True)
13
14 if conf.CHECK_FUNCS('SHA1_Update'):
15         conf.DEFINE('SHA1_RENAME_NEEDED', 1)
16
17 #
18 # --aes-accel=XXX selects accelerated AES crypto library to use, if any.
19 # Default is none.
20 #
21 if Options.options.accel_aes.lower() == "intelaesni":
22         Logs.info("Attempting to compile with runtime-switchable x86_64 Intel AES instructions. WARNING - this is temporary.")
23 elif Options.options.accel_aes.lower() != "none":
24         raise Errors.WafError('--aes-accel=%s is not a valid option. Valid options are [none|intelaesni]' % Options.options.accel_aes)