diff options
author | Brent Cook <busterb@gmail.com> | 2015-03-01 16:30:23 -0600 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2015-03-01 16:30:23 -0600 |
commit | 933820a0f525c5b36ef4f41459cff2084671c853 (patch) | |
tree | 39435e9343f630113c264baca6cb617b6f01a852 | |
parent | 8695b506884a06f1262986118e7067127278b3ae (diff) | |
download | portable-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.ac | 31 |
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 | *) ;; |
54 | esac | 54 | esac |
55 | 55 | ||
56 | case $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 | ;; | ||
68 | esac | ||
69 | |||
70 | AM_CONDITIONAL([HOST_DARWIN], [test x$HOST_OS = xdarwin]) | 56 | AM_CONDITIONAL([HOST_DARWIN], [test x$HOST_OS = xdarwin]) |
71 | AM_CONDITIONAL([HOST_FREEBSD], [test x$HOST_OS = xfreebsd]) | 57 | AM_CONDITIONAL([HOST_FREEBSD], [test x$HOST_OS = xfreebsd]) |
72 | AM_CONDITIONAL([HOST_HPUX], [test x$HOST_OS = xhpux]) | 58 | AM_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])) |
298 | AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) | 284 | AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"]) |
299 | 285 | ||
286 | old_cflags=$CFLAGS | ||
287 | CFLAGS="$old_cflags -I$srcdir/include" | ||
288 | AC_TRY_COMPILE([#include "$srcdir/crypto/modes/modes_lcl.h"], | ||
289 | [int a = 0; BSWAP4(a);], | ||
290 | BSWAP4=yes, BSWAP4=no) | ||
291 | CFLAGS="$old_cflags" | ||
292 | |||
293 | case $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 | ;; | ||
301 | esac | ||
302 | |||
300 | AM_CONDITIONAL([HOST_ASM_ELF_X86_64], | 303 | AM_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"]) |
302 | AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64], | 305 | AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64], |