diff options
author | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2011-10-10 12:40:39 -0400 |
---|---|---|
committer | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2011-10-10 14:49:26 -0400 |
commit | 9cfb332b22e38b9d965bfb691eca67b6b8fa64e3 (patch) | |
tree | 6c01ceb39716bacbe3d2a0c756ad3a5adac119f1 /configure.ac | |
parent | 86c4cf4ea66e926267f53348d22698774a7939a5 (diff) | |
download | pycrypto-9cfb332b22e38b9d965bfb691eca67b6b8fa64e3.tar.gz |
autoconf: only use side-channel secured mpz_powm_sec if it's available (libgmp 5 or later)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..a03a72f --- /dev/null +++ b/configure.ac @@ -0,0 +1,36 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.67]) +AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) +AC_CONFIG_SRCDIR([src/pycrypto_compat.h]) +AC_CONFIG_HEADERS([src/config.h]) + +# Checks for programs. +AC_PROG_CC + +# Checks for libraries. +AC_CHECK_LIB +AC_CHECK_DECLS([mpz_powm], [], [], [[#include <gmp.h>]]) +AC_CHECK_DECLS([mpz_powm_sec], [], [], [[#include <gmp.h>]]) + +# Checks for header files. +AC_CHECK_HEADERS([inttypes.h limits.h stddef.h stdint.h stdlib.h string.h wchar.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_INT64_T +AC_TYPE_INT8_T +AC_TYPE_SIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T + +# Checks for library functions. +AC_FUNC_MALLOC +AC_CHECK_FUNCS([memmove memset]) + +AC_OUTPUT |