Mercurial > mplayer.hg
comparison configure @ 21737:42aae1adb3a4
Rename x86 test to x86_32 and provide an x86 test for both x86_32 and x86_64.
author | diego |
---|---|
date | Sun, 24 Dec 2006 00:08:57 +0000 |
parents | e0b3b53c6457 |
children | f0d5f349a2ea |
comparison
equal
deleted
inserted
replaced
21736:e0b3b53c6457 | 21737:42aae1adb3a4 |
---|---|
118 win32() { cygwin || mingw32 ; return "$?" ; } | 118 win32() { cygwin || mingw32 ; return "$?" ; } |
119 beos() { issystem "BEOS" ; return "$?" ; } | 119 beos() { issystem "BEOS" ; return "$?" ; } |
120 | 120 |
121 # arch test boolean functions | 121 # arch test boolean functions |
122 # x86/x86pc is used by QNX | 122 # x86/x86pc is used by QNX |
123 x86() { | 123 x86_32() { |
124 case "$host_arch" in | 124 case "$host_arch" in |
125 i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) return 0 ;; | 125 i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686) return 0 ;; |
126 *) return 1 ;; | 126 *) return 1 ;; |
127 esac | 127 esac |
128 } | 128 } |
130 x86_64() { | 130 x86_64() { |
131 case "$host_arch" in | 131 case "$host_arch" in |
132 x86_64|amd64) return 0 ;; | 132 x86_64|amd64) return 0 ;; |
133 *) return 1 ;; | 133 *) return 1 ;; |
134 esac | 134 esac |
135 } | |
136 | |
137 x86() { | |
138 x86_32 || x86_64 | |
135 } | 139 } |
136 | 140 |
137 ppc() { | 141 ppc() { |
138 case "$host_arch" in | 142 case "$host_arch" in |
139 ppc) return 0;; | 143 ppc) return 0;; |
820 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs | 824 # Cygwin has /proc/cpuinfo, but only supports Intel CPUs |
821 # FIXME: Remove the cygwin check once AMD CPUs are supported | 825 # FIXME: Remove the cygwin check once AMD CPUs are supported |
822 if test -r /proc/cpuinfo && not cygwin; then | 826 if test -r /proc/cpuinfo && not cygwin; then |
823 # Linux with /proc mounted, extract CPU information from it | 827 # Linux with /proc mounted, extract CPU information from it |
824 _cpuinfo="cat /proc/cpuinfo" | 828 _cpuinfo="cat /proc/cpuinfo" |
825 elif test -r /compat/linux/proc/cpuinfo && not x86 ; then | 829 elif test -r /compat/linux/proc/cpuinfo && not x86_32 ; then |
826 # FreeBSD with Linux emulation /proc mounted, | 830 # FreeBSD with Linux emulation /proc mounted, |
827 # extract CPU information from it | 831 # extract CPU information from it |
828 _cpuinfo="cat /compat/linux/proc/cpuinfo" | 832 _cpuinfo="cat /compat/linux/proc/cpuinfo" |
829 elif darwin && not x86 ; then | 833 elif darwin && not x86_32 ; then |
830 # use hostinfo on Darwin | 834 # use hostinfo on Darwin |
831 _cpuinfo="hostinfo" | 835 _cpuinfo="hostinfo" |
832 elif aix; then | 836 elif aix; then |
833 # use 'lsattr' on AIX | 837 # use 'lsattr' on AIX |
834 _cpuinfo="lsattr -E -l proc0 -a type" | 838 _cpuinfo="lsattr -E -l proc0 -a type" |
835 elif x86 || x86_64; then | 839 elif x86; then |
836 # all other OSes try to extract CPU information from a small helper | 840 # all other OSes try to extract CPU information from a small helper |
837 # program TOOLS/cpuinfo instead | 841 # program TOOLS/cpuinfo instead |
838 $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c | 842 $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c |
839 _cpuinfo="TOOLS/cpuinfo" | 843 _cpuinfo="TOOLS/cpuinfo" |
840 fi | 844 fi |
841 | 845 |
842 if x86 || x86_64 ; then | 846 if x86 ; then |
843 # gather more CPU information | 847 # gather more CPU information |
844 pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1` | 848 pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1` |
845 pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` | 849 pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` |
846 pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` | 850 pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` |
847 pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` | 851 pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1` |
1460 die "unsupported architecture $host_arch" | 1464 die "unsupported architecture $host_arch" |
1461 ;; | 1465 ;; |
1462 esac # case "$host_arch" in | 1466 esac # case "$host_arch" in |
1463 | 1467 |
1464 if test "$_runtime_cpudetection" = yes ; then | 1468 if test "$_runtime_cpudetection" = yes ; then |
1465 if x86 || x86_64 ; then | 1469 if x86 ; then |
1466 _cmov=yes | 1470 _cmov=yes |
1467 x86 && _cmov=no | 1471 x86_32 && _cmov=no |
1468 _mmx=yes | 1472 _mmx=yes |
1469 _3dnow=yes | 1473 _3dnow=yes |
1470 _3dnowext=yes | 1474 _3dnowext=yes |
1471 _mmxext=yes | 1475 _mmxext=yes |
1472 _sse=yes | 1476 _sse=yes |
1476 if ppc; then | 1480 if ppc; then |
1477 _altivec=yes | 1481 _altivec=yes |
1478 fi | 1482 fi |
1479 fi | 1483 fi |
1480 | 1484 |
1481 if x86 && test "$_runtime_cpudetection" = no ; then | 1485 if x86_32 && test "$_runtime_cpudetection" = no ; then |
1482 extcheck() { | 1486 extcheck() { |
1483 if test "$1" = yes ; then | 1487 if test "$1" = yes ; then |
1484 echocheck "kernel support of $2" | 1488 echocheck "kernel support of $2" |
1485 cat > $TMPC <<EOF | 1489 cat > $TMPC <<EOF |
1486 #include <signal.h> | 1490 #include <signal.h> |
2230 win32 && _exesuf=".exe" | 2234 win32 && _exesuf=".exe" |
2231 # -lwinmm is always needed for osdep/timer-win2.c | 2235 # -lwinmm is always needed for osdep/timer-win2.c |
2232 win32 && _ld_extra="$_ld_extra -lwinmm" | 2236 win32 && _ld_extra="$_ld_extra -lwinmm" |
2233 | 2237 |
2234 | 2238 |
2235 if x86 ; then | 2239 if x86_32 ; then |
2236 # Checking assembler (_as) compatibility... | 2240 # Checking assembler (_as) compatibility... |
2237 # Added workaround for older as that reads from stdin by default - atmos | 2241 # Added workaround for older as that reads from stdin by default - atmos |
2238 as_version=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'` | 2242 as_version=`echo '' | $_as -version 2>&1 | sed -n 's/^.*assembler \(version \)*\([0-9.]*\).*$/\2/p'` |
2239 echocheck "assembler ($_as $as_version)" | 2243 echocheck "assembler ($_as $as_version)" |
2240 | 2244 |
2275 _res_comment="Upgrade binutils to ${_pref_as_version} ..." | 2279 _res_comment="Upgrade binutils to ${_pref_as_version} ..." |
2276 echores "failed" | 2280 echores "failed" |
2277 die "obsolete binutils version" | 2281 die "obsolete binutils version" |
2278 fi | 2282 fi |
2279 | 2283 |
2280 fi #if x86 | 2284 fi #if x86_32 |
2281 | 2285 |
2282 echocheck ".align is a power of two" | 2286 echocheck ".align is a power of two" |
2283 if test "$_asmalign_pot" = auto ; then | 2287 if test "$_asmalign_pot" = auto ; then |
2284 _asmalign_pot=no | 2288 _asmalign_pot=no |
2285 cat > $TMPC << EOF | 2289 cat > $TMPC << EOF |
2433 test "$_armv5te" = yes && _def_armv5te='#define HAVE_ARMV5TE 1' | 2437 test "$_armv5te" = yes && _def_armv5te='#define HAVE_ARMV5TE 1' |
2434 _def_iwmmxt='#undef HAVE_IWMMXT' | 2438 _def_iwmmxt='#undef HAVE_IWMMXT' |
2435 test "$_iwmmxt" = yes && _def_iwmmxt='#define HAVE_IWMMXT 1' | 2439 test "$_iwmmxt" = yes && _def_iwmmxt='#define HAVE_IWMMXT 1' |
2436 | 2440 |
2437 # Checking kernel version... | 2441 # Checking kernel version... |
2438 if x86 && linux ; then | 2442 if x86_32 && linux ; then |
2439 _k_verc_problem=no | 2443 _k_verc_problem=no |
2440 kernel_version=`uname -r 2>&1` | 2444 kernel_version=`uname -r 2>&1` |
2441 echocheck "$system_name kernel version" | 2445 echocheck "$system_name kernel version" |
2442 case "$kernel_version" in | 2446 case "$kernel_version" in |
2443 '') kernel_version="?.??"; _k_verc_fail=yes;; | 2447 '') kernel_version="?.??"; _k_verc_fail=yes;; |
2462 | 2466 |
2463 if test "$_vidix_internal" = auto ; then | 2467 if test "$_vidix_internal" = auto ; then |
2464 _vidix_internal=no | 2468 _vidix_internal=no |
2465 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?) | 2469 # should check for x86 systems supporting VIDIX (does QNX have VIDIX?) |
2466 x86 && _vidix_internal=yes | 2470 x86 && _vidix_internal=yes |
2467 x86_64 && _vidix_internal=yes | |
2468 ppc && linux && _vidix_internal=yes | 2471 ppc && linux && _vidix_internal=yes |
2469 alpha && linux && _vidix_internal=yes | 2472 alpha && linux && _vidix_internal=yes |
2470 qnx && _vidix_internal=no | 2473 qnx && _vidix_internal=no |
2471 sunos && _vidix_internal=no | 2474 sunos && _vidix_internal=no |
2472 beos && _vidix_internal=no | 2475 beos && _vidix_internal=no |
5872 echores "$_faac (in libavcodec: $_lavc_faac)" | 5875 echores "$_faac (in libavcodec: $_lavc_faac)" |
5873 | 5876 |
5874 | 5877 |
5875 echocheck "FAAD2 (AAC) support" | 5878 echocheck "FAAD2 (AAC) support" |
5876 if test "$_faad_internal" = auto ; then | 5879 if test "$_faad_internal" = auto ; then |
5877 if x86 && test cc_vendor=gnu; then | 5880 if x86_32 && test cc_vendor=gnu; then |
5878 case $cc_version in | 5881 case $cc_version in |
5879 3.1*|3.2) # ICE/insn with these versions | 5882 3.1*|3.2) # ICE/insn with these versions |
5880 _faad_internal=no | 5883 _faad_internal=no |
5881 _res_comment="broken gcc" | 5884 _res_comment="broken gcc" |
5882 ;; | 5885 ;; |
5963 | 5966 |
5964 | 5967 |
5965 echocheck "Win32 codecs" | 5968 echocheck "Win32 codecs" |
5966 if test "$_win32" = auto ; then | 5969 if test "$_win32" = auto ; then |
5967 _win32=no | 5970 _win32=no |
5968 if x86 && not qnx; then | 5971 if x86_32 && not qnx; then |
5969 _win32=yes | 5972 _win32=yes |
5970 fi | 5973 fi |
5971 fi | 5974 fi |
5972 if test "$_win32" = yes ; then | 5975 if test "$_win32" = yes ; then |
5973 _def_win32='#define USE_WIN32DLL 1' | 5976 _def_win32='#define USE_WIN32DLL 1' |
5974 test -z "$_win32codecsdir" && _win32codecsdir=$_codecsdir | 5977 test -z "$_win32codecsdir" && _win32codecsdir=$_codecsdir |
5975 _res_comment="using $_win32codecsdir" | 5978 _res_comment="using $_win32codecsdir" |
5976 openbsd && x86 && _ld_extra="$_ld_extra -li386" | 5979 openbsd && x86_32 && _ld_extra="$_ld_extra -li386" |
5977 if not win32 ; then | 5980 if not win32 ; then |
5978 _def_win32_loader='#define WIN32_LOADER 1' | 5981 _def_win32_loader='#define WIN32_LOADER 1' |
5979 else | 5982 else |
5980 _ld_extra="$_ld_extra -ladvapi32 -lole32" | 5983 _ld_extra="$_ld_extra -ladvapi32 -lole32" |
5981 _res_comment="using native windows" | 5984 _res_comment="using native windows" |
7225 _ld_dl_dynamic='-rdynamic' | 7228 _ld_dl_dynamic='-rdynamic' |
7226 fi | 7229 fi |
7227 | 7230 |
7228 _ld_extra="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic" | 7231 _ld_extra="$_ld_extra $_ld_pthread $_ld_dl $_ld_dl_dynamic" |
7229 bsdos && _ld_extra="$_ld_extra -ldvd" | 7232 bsdos && _ld_extra="$_ld_extra -ldvd" |
7230 netbsd && x86 && _ld_extra="$_ld_extra -li386" | 7233 netbsd && x86_32 && _ld_extra="$_ld_extra -li386" |
7231 | 7234 |
7232 _def_debug='#undef MP_DEBUG' | 7235 _def_debug='#undef MP_DEBUG' |
7233 test "$_debug" != "" && _def_debug='#define MP_DEBUG 1' | 7236 test "$_debug" != "" && _def_debug='#define MP_DEBUG 1' |
7234 | 7237 |
7235 _def_linux='#undef TARGET_LINUX' | 7238 _def_linux='#undef TARGET_LINUX' |
8333 if test "$_mtrr" = yes ; then | 8336 if test "$_mtrr" = yes ; then |
8334 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)" | 8337 echo "Please check mtrr settings at /proc/mtrr (see DOCS/HTML/$_doc_lang/video.html#mtrr)" |
8335 echo | 8338 echo |
8336 fi | 8339 fi |
8337 | 8340 |
8338 if not x86; then | 8341 if not x86_32; then |
8339 cat <<EOF | 8342 cat <<EOF |
8340 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your | 8343 NOTE: Win32 codec DLLs are not supported on your CPU ($host_arch) or your |
8341 operating system ($system_name). You may encounter a few files that cannot | 8344 operating system ($system_name). You may encounter a few files that cannot |
8342 be played due to missing open source video/audio codec support. | 8345 be played due to missing open source video/audio codec support. |
8343 | 8346 |