diff configure.in @ 112352:19348bd13f81

Improve performance on non-GCC hosts with __aligned__.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 17 Jan 2011 20:54:23 -0800
parents 56d3e9c28eb0
children c81ff7082a9a
line wrap: on
line diff
--- a/configure.in	Mon Jan 17 20:41:41 2011 -0800
+++ b/configure.in	Mon Jan 17 20:54:23 2011 -0800
@@ -1323,6 +1323,19 @@
 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 @@
 fi
 
 ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
-