From 69891eb99083f89897761e7bfe5fea393fbd2c01 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 24 Dec 2006 00:08:57 +0000 Subject: Rename x86 test to x86_32 and provide an x86 test for both x86_32 and x86_64. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21753 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 95fc0d5e3f..059b781306 100755 --- a/configure +++ b/configure @@ -120,7 +120,7 @@ beos() { issystem "BEOS" ; return "$?" ; } # arch test boolean functions # x86/x86pc is used by QNX -x86() { +x86_32() { case "$host_arch" in i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) return 0 ;; *) return 1 ;; @@ -134,6 +134,10 @@ x86_64() { esac } +x86() { + x86_32 || x86_64 +} + ppc() { case "$host_arch" in ppc) return 0;; @@ -822,24 +826,24 @@ _cpuinfo="echo" if test -r /proc/cpuinfo && not cygwin; then # Linux with /proc mounted, extract CPU information from it _cpuinfo="cat /proc/cpuinfo" -elif test -r /compat/linux/proc/cpuinfo && not x86 ; then +elif test -r /compat/linux/proc/cpuinfo && not x86_32 ; then # FreeBSD with Linux emulation /proc mounted, # extract CPU information from it _cpuinfo="cat /compat/linux/proc/cpuinfo" -elif darwin && not x86 ; then +elif darwin && not x86_32 ; then # use hostinfo on Darwin _cpuinfo="hostinfo" elif aix; then # use 'lsattr' on AIX _cpuinfo="lsattr -E -l proc0 -a type" -elif x86 || x86_64; then +elif x86; then # all other OSes try to extract CPU information from a small helper # program TOOLS/cpuinfo instead $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c _cpuinfo="TOOLS/cpuinfo" fi -if x86 || x86_64 ; then +if x86 ; then # gather more CPU information pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1` pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` @@ -1462,9 +1466,9 @@ EOF esac # case "$host_arch" in if test "$_runtime_cpudetection" = yes ; then - if x86 || x86_64 ; then + if x86 ; then _cmov=yes - x86 && _cmov=no + x86_32 && _cmov=no _mmx=yes _3dnow=yes _3dnowext=yes @@ -1478,7 +1482,7 @@ if test "$_runtime_cpudetection" = yes ; then fi fi -if x86 && test "$_runtime_cpudetection" = no ; then +if x86_32 && test "$_runtime_cpudetection" = no ; then extcheck() { if test "$1" = yes ; then echocheck "kernel support of $2" @@ -2232,7 +2236,7 @@ win32 && _exesuf=".exe" win32 && _ld_extra="$_ld_extra -lwinmm" -if x86 ; then +if x86_32 ; then # Checking assembler (_as) compatibility... # Added workaround for older as that reads from stdin by default - atmos as_version=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'` @@ -2277,7 +2281,7 @@ if x86 ; then die "obsolete binutils version" fi -fi #if x86 +fi #if x86_32 echocheck ".align is a power of two" if test "$_asmalign_pot" = auto ; then @@ -2435,7 +2439,7 @@ _def_iwmmxt='#undef HAVE_IWMMXT' test "$_iwmmxt" = yes && _def_iwmmxt='#define HAVE_IWMMXT 1' # Checking kernel version... -if x86 && linux ; then +if x86_32 && linux ; then _k_verc_problem=no kernel_version=`uname -r 2>&1` echocheck "$system_name kernel version" @@ -2464,7 +2468,6 @@ if test "$_vidix_internal" = auto ; then _vidix_internal=no # should check for x86 systems supporting VIDIX (does QNX have VIDIX?) x86 && _vidix_internal=yes - x86_64 && _vidix_internal=yes ppc && linux && _vidix_internal=yes alpha && linux && _vidix_internal=yes qnx && _vidix_internal=no @@ -5874,7 +5877,7 @@ echores "$_faac (in libavcodec: $_lavc_faac)" echocheck "FAAD2 (AAC) support" if test "$_faad_internal" = auto ; then - if x86 && test cc_vendor=gnu; then + if x86_32 && test cc_vendor=gnu; then case $cc_version in 3.1*|3.2) # ICE/insn with these versions _faad_internal=no @@ -5965,7 +5968,7 @@ fi echocheck "Win32 codecs" if test "$_win32" = auto ; then _win32=no - if x86 && not qnx; then + if x86_32 && not qnx; then _win32=yes fi fi @@ -5973,7 +5976,7 @@ if test "$_win32" = yes ; then _def_win32='#define USE_WIN32DLL 1' test -z "$_win32codecsdir" && _win32codecsdir=$_codecsdir _res_comment="using $_win32codecsdir" - openbsd && x86 && _ld_extra="$_ld_extra -li386" + openbsd && x86_32 && _ld_extra="$_ld_extra -li386" if not win32 ; then _def_win32_loader='#define WIN32_LOADER 1' else @@ -7227,7 +7230,7 @@ fi _ld_extra="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic" bsdos && _ld_extra="$_ld_extra -ldvd" -netbsd && x86 && _ld_extra="$_ld_extra -li386" +netbsd && x86_32 && _ld_extra="$_ld_extra -li386" _def_debug='#undef MP_DEBUG' test "$_debug" != "" && _def_debug='#define MP_DEBUG 1' @@ -8335,7 +8338,7 @@ if test "$_mtrr" = yes ; then echo fi -if not x86; then +if not x86_32; then cat <