|
@@ -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])
|