aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2015-03-01 16:30:23 -0600
committerBrent Cook <busterb@gmail.com>2015-03-01 16:30:23 -0600
commit933820a0f525c5b36ef4f41459cff2084671c853 (patch)
tree39435e9343f630113c264baca6cb617b6f01a852
parent8695b506884a06f1262986118e7067127278b3ae (diff)
downloadportable-933820a0f525c5b36ef4f41459cff2084671c853.tar.gz
portable-933820a0f525c5b36ef4f41459cff2084671c853.tar.bz2
portable-933820a0f525c5b36ef4f41459cff2084671c853.zip
separate the BSWAP check from the action
checks need to be unconditional with autoconf
-rw-r--r--configure.ac31
1 files changed, 17 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 8f174ad..24eb24f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,20 +53,6 @@ case $host_os in
53 *) ;; 53 *) ;;
54esac 54esac
55 55
56case $host_cpu in
57 *sparc*)
58 CFLAGS="$CFLAGS -D__STRICT_ALIGNMENT"
59 ;;
60 *arm*)
61 old_cflags=$CFLAGS
62 CFLAGS="$old_cflags -I$srcdir/include"
63 AC_TRY_COMPILE([#include "$srcdir/crypto/modes/modes_lcl.h"],
64 [int a = 0; BSWAP4(a);],
65 CFLAGS="$old_cflags",
66 CFLAGS="$old_cflags -D__STRICT_ALIGNMENT")
67 ;;
68esac
69
70AM_CONDITIONAL([HOST_DARWIN], [test x$HOST_OS = xdarwin]) 56AM_CONDITIONAL([HOST_DARWIN], [test x$HOST_OS = xdarwin])
71AM_CONDITIONAL([HOST_FREEBSD], [test x$HOST_OS = xfreebsd]) 57AM_CONDITIONAL([HOST_FREEBSD], [test x$HOST_OS = xfreebsd])
72AM_CONDITIONAL([HOST_HPUX], [test x$HOST_OS = xhpux]) 58AM_CONDITIONAL([HOST_HPUX], [test x$HOST_OS = xhpux])
@@ -297,6 +283,23 @@ AC_ARG_ENABLE([asm],
297 AS_HELP_STRING([--disable-asm], [Disable assembly])) 283 AS_HELP_STRING([--disable-asm], [Disable assembly]))
298AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) 284AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"])
299 285
286old_cflags=$CFLAGS
287CFLAGS="$old_cflags -I$srcdir/include"
288AC_TRY_COMPILE([#include "$srcdir/crypto/modes/modes_lcl.h"],
289 [int a = 0; BSWAP4(a);],
290 BSWAP4=yes, BSWAP4=no)
291CFLAGS="$old_cflags"
292
293case $host_cpu in
294 *sparc*)
295 CFLAGS="$CFLAGS -D__STRICT_ALIGNMENT"
296 ;;
297 *arm*)
298 AS_IF([test "x$BSWAP4" = "xyes"],,
299 CFLAGS="$old_cflags -D__STRICT_ALIGNMENT")
300 ;;
301esac
302
300AM_CONDITIONAL([HOST_ASM_ELF_X86_64], 303AM_CONDITIONAL([HOST_ASM_ELF_X86_64],
301 [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"]) 304 [test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
302AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64], 305AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64],