diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-28 21:35:55 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-28 21:35:55 +0000 |
commit | 9a046d3d606e02d1fa7582d546325dfe0634a1da (patch) | |
tree | 96cf22cc99bda62b96b1d4b1f0f87a2da9e7b78e | |
parent | 5d7f695de11310c246c291386664c77e249e5d77 (diff) | |
download | mpv-9a046d3d606e02d1fa7582d546325dfe0634a1da.tar.bz2 mpv-9a046d3d606e02d1fa7582d546325dfe0634a1da.tar.xz |
Added checking for x86 cpu extensions using test-programs.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1405 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-x | configure | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -152,6 +152,8 @@ params: --disable-sunaudio disable Sun sound support [autodetect] --disable-gcc-checking disable gcc version checking + --disable-kernel-extchk disables checking for CPU extension support in + your kernel (MMX, SSE, ...) --disable-select disable audio select() support ( for example required this option ALSA or Vortex2 driver ) @@ -439,6 +441,7 @@ _dshow=yes _fastmemcpy=yes _streaming=no _libavcodec=no +_kernelextcheck=yes _x=1 _y=1 @@ -1051,6 +1054,9 @@ for ac_option; do --disable-png) _png=no ;; + --disable-kernel-extchk) + _kernelextcheck=no + ;; --disable-sse) _sse=no ;; @@ -1251,6 +1257,35 @@ else fi fi +# Atmosfear: Checking kernel support for cpu extensions ... +extcheck() { +if test "$1" = "yes" ; then +echo $_echo_n "Checking $2 support in Kernel ... $_echo_c" +cat > $TMPC <<EOF +int main(void){__asm__ __volatile__ ("$3":::"memory");return(0);} +EOF + +if ($_cc $TMPC -o $TMPO && $TMPO) > /dev/null 2>&1 ; then + echo "ok" + return 1 +else + echo "failed" + echo "It seems that your kernel does not correctly support $2. To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!" + return 0 +fi +fi +return 1 +} +if [ "$_kernelextcheck" = "yes" ];then +if extcheck $_mmx "mmx" "emms" ; then _mmx=no ; fi +if extcheck $_3dnow "3dnow" "femms" ; then _3dnow=no ; fi +if extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" ; then _3dnowex=no ; fi +if extcheck $_mmx2 "mmx2" "movntq %%mm0, (%%eax)" ; then _mmx2=no ; fi +if extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" ; then _sse=no ; fi +#if extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" ; then _sse2=no ; fi +rm -f $TMPS $TMPO $TMPC +fi + # Checking kernel version... if [ "$system_name" = "Linux" ];then _k_verc_problem=no |