1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

27 lines
1003 B
Plaintext
Raw Normal View History

#!/usr/bin/env python
import Options
import Utils
def configure(conf):
if Options.options.accel_aes.lower() == "intelaesni":
if conf.CHECK_CFLAGS('-Wp,-E,-lang-asm', ''):
if conf.env['SYSTEM_UNAME_MACHINE'] == 'x86_64':
print("Compiling with Intel AES instructions")
conf.DEFINE('HAVE_AESNI_INTEL', 1)
else:
raise Utils.WafError('--accel-aes=intelaesni selected and non x86_64 CPU')
else:
raise Utils.WafError('--accel-aes=intelaesni selected and compiler rejects -Wp,-E,-lang-asm')
if not conf.CHECK_LDFLAGS('-Wl,-z,noexecstack'):
raise Utils.WafError('--accel-aes=intelaesni selected and linker rejects -z noexecstack')
def build(bld):
if not bld.CONFIG_SET('HAVE_AESNI_INTEL'):
return
bld.SAMBA_LIBRARY('aesni-intel',
source='aesni-intel_asm.c',
cflags='-Wp,-E,-lang-asm',
ldflags='-Wl,-z,noexecstack',
private_library=True)