changeset 19371:829b824a7d33

Port ASMALIGN preprocessor macro for .align handling from FFmpeg.
author diego
date Sat, 12 Aug 2006 23:58:26 +0000
parents cd9ece839751
children 6334c14b38eb
files configure
diffstat 1 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Aug 12 18:33:19 2006 +0000
+++ b/configure	Sat Aug 12 23:58:26 2006 +0000
@@ -1698,6 +1698,7 @@
 _pthreads=yes
 _ass=auto
 _rpath=no
+_asmalign_pot=auto
 for ac_option do
   case "$ac_option" in
   # Skip 1st pass
@@ -2217,7 +2218,24 @@
     echores "failed"
     die "obsolete binutils version"
   fi
-fi
+
+echocheck ".align is a power of two"
+if test "$_asmalign_pot" = auto ; then
+_asmalign_pot=no
+cat > $TMPC << EOF
+asm (".align 3");
+EOF
+cc_check && _asmalign_pot=yes
+fi
+if test "$_asmalign_pot" = "yes" ; then
+  _def_asmalign_pot='#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"'
+else
+  _def_asmalign_pot='#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"'
+fi
+echores $_asmalign_pot
+
+fi #if x86
+
 
 #FIXME: This should happen before the check for CFLAGS..
 if ppc ; then
@@ -7642,6 +7660,9 @@
 $_def_map_memalign
 $_def_memalign_hack
 
+/* assembler handling of .align */
+$_def_asmalign_pot
+
 /* Define this if your system has the "alloca.h" header file */
 $_def_alloca