From 7cae64b4eed192a49ea258089639ec44da6095e2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 17 Jan 2011 20:54:23 -0800 Subject: Improve performance on non-GCC hosts with __aligned__. --- configure.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 2cac4f3e7d0..c338ff37a60 100644 --- a/configure.in +++ b/configure.in @@ -1323,6 +1323,19 @@ AH_TEMPLATE(POINTER_TYPE, dnl Check for endianess AC_C_BIGENDIAN +AC_CACHE_CHECK([for __attribute__ ((__aligned__ (expr)))], + [emacs_cv_attribute_aligned], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[char __attribute__ ((__aligned__ (1 << 3))) c;]], + [[]])], + [emacs_cv_attribute_aligned=yes], + [emacs_cv_attribute_aligned=no])]) +if test $emacs_cv_attribute_aligned = yes; then + AC_DEFINE([HAVE_ATTRIBUTE_ALIGNED], 1, + [Define to 1 if GCC-style __attribute__ ((__aligned__ (expr))) works.]) +fi + dnl check for Make feature AC_PROG_MAKE_SET @@ -3734,4 +3747,3 @@ if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then fi ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"]) - -- cgit v1.2.1