From 73329d4311006f7dfd9bf6e55f4bc58ef497b53b Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 8 Mar 2015 19:56:03 -0500 Subject: [PATCH] update __STRICT_ALIGNMENT check --- configure.ac | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 5f70a7c..30c7dd6 100644 --- a/configure.ac +++ b/configure.ac @@ -285,10 +285,14 @@ AC_ARG_ENABLE([asm], AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) old_cflags=$CFLAGS -CFLAGS="$old_cflags -I$srcdir/include" +CFLAGS="$USER_CFLAGS -I$srcdir/include" +AC_MSG_CHECKING([if BSWAP4 builds without __STRICT_ALIGNMENT]) AC_TRY_COMPILE([#include "$srcdir/crypto/modes/modes_lcl.h"], [int a = 0; BSWAP4(a);], - BSWAP4=yes, BSWAP4=no) + AC_MSG_RESULT([yes]) + BSWAP4=yes, + AC_MSG_RESULT([no]) + BSWAP4=no) CFLAGS="$old_cflags" case $host_cpu in @@ -297,7 +301,7 @@ case $host_cpu in ;; *arm*) AS_IF([test "x$BSWAP4" = "xyes"],, - CFLAGS="$old_cflags -D__STRICT_ALIGNMENT") + CFLAGS="$CFLAGS -D__STRICT_ALIGNMENT") ;; esac