From 14ba9f9153f69c22e2174654cbf17c0e4fe5ddd5 Mon Sep 17 00:00:00 2001
From: Nick Mathewson <nickm@torproject.org>
Date: Mon, 17 May 2004 20:53:04 +0000
Subject: [PATCH] Override unaligned-access-ok check when $host_cpu is ia64. 
 Apparently, ia64-linux reacts to unaligned access by making the kernel gripe.
 Re-run autogen.sh if you need config.guess/sub.

svn:r1882
---
 configure.in | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/configure.in b/configure.in
index d4ad6b57f5..d9395fe7e5 100644
--- a/configure.in
+++ b/configure.in
@@ -3,6 +3,8 @@ AC_INIT
 AM_INIT_AUTOMAKE(tor, 0.0.7pre1-cvs-2)
 AM_CONFIG_HEADER(orconfig.h)
 
+AC_CANONICAL_HOST
+
 CFLAGS="$CFLAGS -Wall -g -O2 -I/usr/kerberos/include"
 
 AC_ARG_ENABLE(debug,
@@ -166,7 +168,13 @@ AC_CHECK_SIZEOF(long long)
 AC_CHECK_SIZEOF(__int64)
 AC_CHECK_SIZEOF(void *)
 
-# Now, let's see about alignment requirements
+# Now, let's see about alignment requirements.  On some platforms, we override
+# the default.
+case $host in
+ ia64-*-* | arm-*-* )
+    tor_cv_unaligned_ok=no
+    ;;
+ *)
 AC_CACHE_CHECK([whether unaligned int access is allowed], tor_cv_unaligned_ok,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [[int main () { char s[] = "A\x00\x00\x00\x00\x00\x00\x00";
@@ -174,6 +182,8 @@ return *(int*)(&s[1]); }]])],
        [tor_cv_unaligned_ok=yes],
        [tor_cv_unaligned_ok=no],
        [tor_cv_unaligned_ok=cross])])
+esac
+
 if test $tor_cv_unaligned_ok = yes; then
   AC_DEFINE([UNALIGNED_INT_ACCESS_OK], 1,
             [Define to 1 iff unaligned int access is allowed])
-- 
GitLab