summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2014-02-22 13:32:25 -0800
committerDwayne Litzenberger <dlitz@dlitz.net>2014-02-22 13:32:25 -0800
commit0e8471c22c5ede986be4c1d226d1e16b157cb0b5 (patch)
tree7bff3671b8c4897fc4c0679eb632fa643588809a /setup.py
parent87280f4419c8befffcdd153468aba4582493dcc4 (diff)
parent6a3bd8bef9522f0df7cb259cccc0fdec917e2da8 (diff)
downloadpycrypto-0e8471c22c5ede986be4c1d226d1e16b157cb0b5.tar.gz
Merge pull request #62 (Fixes AESNI alignment bug)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 998122e..5269e9d 100644
--- a/setup.py
+++ b/setup.py
@@ -166,6 +166,10 @@ class PCTBuildExt (build_ext):
if not ac.get("HAVE_WMMINTRIN_H"):
# AES-NI instrincs not available
self.__remove_extensions(["Crypto.Cipher._AESNI"])
+ elif not (ac.get("HAVE_POSIX_MEMALIGN") or ac.get("HAVE_ALIGNED_ALLOC")
+ or ac.get("HAVE__ALIGNED_MALLOC")):
+ # no function to allocate aligned memory is available
+ self.__remove_extensions(["Crypto.Cipher._AESNI"])
elif ac.get("HAVE_MAES"):
# -maes has to be passed to the compiler to use the AES-NI instrincs
self.__add_extension_compile_option(["Crypto.Cipher._AESNI"],