[MPlayer-dev-eng] [PATCH] Fix --enable-runtime-cpudetection under MinGW

Vladimir Voroshilov voroshil at gmail.com
Fri Dec 29 09:18:46 CET 2006


Currently, under MinGW on Pentium4, running ./configure
--enable-runtime-cpudetection gives following error message:
=============cut=====================
Error: Runtime CPU detection only works for x86, x86-64 and PPC!

Check "" if you do not understand why it failed.
=============cut=====================

The reason is checking value of "$host_arch" BEFORE it's initialization.

Trivial patch attached.


-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 21783)
+++ configure	(working copy)
@@ -548,9 +548,6 @@
   esac
 done
 
-if test "$_runtime_cpudetection" = yes && not x86 && not ppc; then
-  die "Runtime CPU detection only works for x86, x86-64 and PPC!"
-fi
 
 # Determine our OS name and CPU architecture
 if test -z "$_target" ; then
@@ -634,6 +631,10 @@
   host_arch=`echo $_target | cut -d '-' -f 1 | tr '_' '-'`
 fi
 
+if test "$_runtime_cpudetection" = yes && not x86 && not ppc; then
+  die "Runtime CPU detection only works for x86, x86-64 and PPC!"
+fi
+
 echo "Detected operating system: $system_name"
 echo "Detected host architecture: $host_arch"
 


More information about the MPlayer-dev-eng mailing list