[xiph-commits] r15321 - trunk/theora

giles at svn.xiph.org giles at svn.xiph.org
Fri Sep 19 12:20:07 PDT 2008


Author: giles
Date: 2008-09-19 12:20:06 -0700 (Fri, 19 Sep 2008)
New Revision: 15321

Modified:
   trunk/theora/configure.ac
Log:
Disable inline assembly on gcc versions prior to 3.1.

Earlier versions don't support named parameters in asm blocks, which we 
use in the x86 code.


Modified: trunk/theora/configure.ac
===================================================================
--- trunk/theora/configure.ac	2008-09-19 18:03:40 UTC (rev 15320)
+++ trunk/theora/configure.ac	2008-09-19 19:20:06 UTC (rev 15321)
@@ -168,6 +168,22 @@
     [  --disable-asm           disable assembly optimizations ],
     [ ac_enable_asm=$enableval ], [ ac_enable_asm=yes] )
 
+# early gcc doesn't support named parameters; disable asm in this case
+if ! test -z "$GCC"; then
+    AC_MSG_CHECKING([if the compiler version supports named asm params])
+    gcc_version=`${CC} -dumpversion`
+    gcc_version_major=`echo ${gcc_version} | cut -f 1 -d '.'`
+    gcc_version_minor=`echo ${gcc_version} | cut -f 2 -d '.'`
+    if test "${gcc_version_major}" -lt 3; then
+      ac_enable_asm=no
+      AC_MSG_RESULT([no (${gcc_version})])
+    elif test "${gcc_version_major}" -eq 3 -a "${gcc_version_minor}" -lt 1; then
+      ac_enable_asm=no
+      AC_MSG_RESULT([no (${gcc_version})])
+    else
+      AC_MSG_RESULT([ok (${gcc_version})])
+    fi
+fi
 if test "x${ac_enable_asm}" = xyes; then
   cpu_optimization="no optimization for your platform, please send a patch"
   case $target_cpu in



More information about the commits mailing list