summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Ramacher <sebastian+dev@ramacher.at>2013-04-27 22:03:15 +0200
committerSebastian Ramacher <sebastian+dev@ramacher.at>2013-04-27 22:03:15 +0200
commit8b8f1eb94d4f4cb36654e8b634bad4fdc60ac567 (patch)
treebb92560e2fd21004b06569600b662146321519a2
parentb58ac57d42e62ed0137784b5ba8bcf69a475b972 (diff)
downloadpycrypto-8b8f1eb94d4f4cb36654e8b634bad4fdc60ac567.tar.gz
Use AX_CHECK_COMPILE_FLAG to detect -maes
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
-rw-r--r--configure.ac16
1 files changed, 4 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 16078ac..b62db5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,18 +48,10 @@ AX_CHECK_COMPILE_FLAG([-Wall], [AX_APPEND_FLAG([-Wall])])
AX_CHECK_COMPILE_FLAG([-Wextra], [AX_APPEND_FLAG([-Wextra])])
AX_CHECK_COMPILE_FLAG([-Wno-missing-field-initializers], [AX_APPEND_FLAG([-Wno-missing-field-initializers])])
AX_CHECK_COMPILE_FLAG([-Wno-unused-parameter], [AX_APPEND_FLAG([-Wno-unused-parameter])])
-
-# Checks for compiler flags.
-old_CFLAGS="$CFLAGS"
-CFLAGS=-maes
-AC_MSG_CHECKING([whether CC supports -maes])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_MAES, [1], [Define if CC supports -maes])
- have_maes=yes
- ], [AC_MSG_RESULT([no])]
-)
-CFLAGS="$old_cflags"
+AX_CHECK_COMPILE_FLAG([-maes], [
+ have_maes=yes
+ AC_DEFINE(HAVE_MAES, [1], [Define if CC supports -maes])
+])
# Checks for libraries.
AC_ARG_WITH([gmp], AS_HELP_STRING([--without-gmp], [Build without gmp library (default: test)]))