aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2020-07-15 01:25:34 +0900
committerkinichiro <kinichiro.inoguchi@gmail.com>2020-07-21 22:13:39 +0900
commit7423582705d6c9d71e1caf8a1f892e8995bcd63e (patch)
tree399980fb1d1624c5970d14a29fbec9c086d9acc0 /configure.ac
parentfa26b5359b76570b471a1dc3b8ed5dfbd240520c (diff)
downloadportable-7423582705d6c9d71e1caf8a1f892e8995bcd63e.tar.gz
portable-7423582705d6c9d71e1caf8a1f892e8995bcd63e.tar.bz2
portable-7423582705d6c9d71e1caf8a1f892e8995bcd63e.zip
Get __STRICT_ALIGNMENT from machine/endian.h
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 0 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 888ca19..acfe307 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,18 +75,6 @@ AC_ARG_ENABLE([tests],
75 [enable_tests="yes"]) 75 [enable_tests="yes"])
76AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = xyes]) 76AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = xyes])
77 77
78# Add CPU-specific alignment flags
79old_cflags=$CFLAGS
80CFLAGS="$CFLAGS -I$srcdir/include"
81AC_MSG_CHECKING([if BSWAP4 builds without __STRICT_ALIGNMENT])
82AC_TRY_COMPILE([#include "$srcdir/crypto/modes/modes_lcl.h"],
83 [int a = 0; BSWAP4(a);],
84 AC_MSG_RESULT([yes])
85 BSWAP4=yes,
86 AC_MSG_RESULT([no])
87 BSWAP4=no)
88CFLAGS="$old_cflags"
89
90AS_CASE([$host_cpu], 78AS_CASE([$host_cpu],
91 [*sparc*], [CPPFLAGS="$CPPFLAGS -D__STRICT_ALIGNMENT"], 79 [*sparc*], [CPPFLAGS="$CPPFLAGS -D__STRICT_ALIGNMENT"],
92 [*arm*], [host_cpu=arm], 80 [*arm*], [host_cpu=arm],
@@ -94,7 +82,6 @@ AS_CASE([$host_cpu],
94 [i?86], [HOSTARCH=intel], 82 [i?86], [HOSTARCH=intel],
95 [x86_64], [HOSTARCH=intel] 83 [x86_64], [HOSTARCH=intel]
96) 84)
97AS_IF([test "x$BSWAP4" = "xyes" -a "$host_cpu" = "arm" ],,CPPFLAGS="$CPPFLAGS -D__STRICT_ALIGNMENT")
98AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"]) 85AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"])
99 86
100AC_MSG_CHECKING([if .gnu.warning accepts long strings]) 87AC_MSG_CHECKING([if .gnu.warning accepts long strings])