Mercurial > mplayer.hg
comparison configure @ 5201:40c6df15c3df
a bit modified runtime fix patch by Fredrik Kuivinen <freku045@student.liu.se>
author | arpi |
---|---|
date | Tue, 19 Mar 2002 18:42:27 +0000 |
parents | 59df6b778d78 |
children | 202fc9c7a372 |
comparison
equal
deleted
inserted
replaced
5200:022c957633a3 | 5201:40c6df15c3df |
---|---|
222 # 1st pass checking for vital options | 222 # 1st pass checking for vital options |
223 _cc=gcc | 223 _cc=gcc |
224 test "$CC" && _cc="$CC" | 224 test "$CC" && _cc="$CC" |
225 _as=auto | 225 _as=auto |
226 _enable_xp=no | 226 _enable_xp=no |
227 _runtime_cpudetection=yes | |
227 for ac_option do | 228 for ac_option do |
228 case "$ac_option" in | 229 case "$ac_option" in |
229 --target=*) | 230 --target=*) |
230 _target=`echo $ac_option | cut -d '=' -f 2` | 231 _target=`echo $ac_option | cut -d '=' -f 2` |
231 ;; | 232 ;; |
259 --with-extraincdir=*) | 260 --with-extraincdir=*) |
260 _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'` | 261 _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'` |
261 ;; | 262 ;; |
262 --with-extralibdir=*) | 263 --with-extralibdir=*) |
263 _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` | 264 _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` |
265 ;; | |
266 --enable-runtime-cpudetection) | |
267 _runtime_cpudetection=yes | |
268 ;; | |
269 --disable-runtime-cpudetection) | |
270 _runtime_cpudetection=no | |
264 ;; | 271 ;; |
265 esac | 272 esac |
266 done | 273 done |
267 | 274 |
268 # Determine our OS name and CPU architecture | 275 # Determine our OS name and CPU architecture |
493 echores "$pvendor ($pfamily:$pmodel:$pstepping)" | 500 echores "$pvendor ($pfamily:$pmodel:$pstepping)" |
494 | 501 |
495 echocheck "CPU type" | 502 echocheck "CPU type" |
496 echores "$pname" | 503 echores "$pname" |
497 | 504 |
505 if test "$_runtime_cpudetection" = yes ; then | |
506 _mmx=yes | |
507 _3dnow=yes | |
508 _3dnowex=yes | |
509 _mmx2=yes | |
510 _sse=yes | |
511 _sse2=yes | |
512 _mtrr=yes | |
513 fi | |
514 | |
498 fi | 515 fi |
499 | 516 |
500 | 517 |
501 if [ "$host_arch" = alpha ]; then | 518 if [ "$host_arch" = alpha ]; then |
502 echocheck "CPU type" | 519 echocheck "CPU type" |
568 | 585 |
569 echocheck "GCC & CPU optimization abilities" | 586 echocheck "GCC & CPU optimization abilities" |
570 cat > $TMPC << EOF | 587 cat > $TMPC << EOF |
571 int main(void) { return 0; } | 588 int main(void) { return 0; } |
572 EOF | 589 EOF |
573 | 590 if test "_$runtime_cpudetection" = "no" ; then |
574 if test "$proc" = "k7" ; then | 591 if test "$proc" = "k7" ; then |
575 cc_check -march=$proc -mcpu=$proc || proc=athlon | 592 cc_check -march=$proc -mcpu=$proc || proc=athlon |
576 fi | 593 fi |
577 if test "$proc" = "athlon" ; then | 594 if test "$proc" = "athlon" ; then |
578 cc_check -march=$proc -mcpu=$proc || proc=pentiumpro | 595 cc_check -march=$proc -mcpu=$proc || proc=pentiumpro |
597 fi | 614 fi |
598 if test "$proc" = "i386" ; then | 615 if test "$proc" = "i386" ; then |
599 cc_check -march=$proc -mcpu=$proc || proc=error | 616 cc_check -march=$proc -mcpu=$proc || proc=error |
600 fi | 617 fi |
601 if test "$proc" = "error" ; then | 618 if test "$proc" = "error" ; then |
602 die "Your $_cc does not support even \"i386\" for '-march' and '-mcpu'." | 619 echores "Your $_cc does not support even \"i386\" for '-march' and '-mcpu'." |
620 _mcpu="" | |
621 _march="" | |
622 else | |
623 _march="-march=$proc" | |
624 _mcpu="-mcpu=$proc" | |
603 fi | 625 fi |
604 | 626 else |
605 _march="-march=$proc" | 627 # i686 is probably the most common cpu - optimize to it |
606 _mcpu="-mcpu=$proc" | 628 _mcpu="-mcpu=i686" |
629 # at least i486 required, for bswap instruction | |
630 _march="-march=i486" | |
631 cc_check $_mcpu || _mcpu="" | |
632 cc_check $_march $_mcpu || _march="" | |
633 fi | |
607 | 634 |
608 ## Gabucino : --target takes effect here (hopefully...) by overwriting | 635 ## Gabucino : --target takes effect here (hopefully...) by overwriting |
609 ## autodetected mcpu/march parameters | 636 ## autodetected mcpu/march parameters |
610 if test "$_target" ; then | 637 if test "$_target" ; then |
611 _march="-march=$host_arch" | 638 _march="-march=$host_arch" |
692 echocheck "binutils" | 719 echocheck "binutils" |
693 _binutils=no | 720 _binutils=no |
694 $_as libac3/downmix/downmix_i386.S -o $TMPO > /dev/null 2>&1 && _binutils=yes | 721 $_as libac3/downmix/downmix_i386.S -o $TMPO > /dev/null 2>&1 && _binutils=yes |
695 echores "$_binutils" | 722 echores "$_binutils" |
696 | 723 |
697 if x86 ; then | 724 if x86 && test "$_runtime_cpudetection" = no ; then |
698 extcheck() { | 725 extcheck() { |
699 if test "$1" = yes ; then | 726 if test "$1" = yes ; then |
700 echocheck "kernel support of $2" | 727 echocheck "kernel support of $2" |
701 cat > $TMPC <<EOF | 728 cat > $TMPC <<EOF |
702 int main(void){__asm__ __volatile__ ("$3":::"memory");return(0);} | 729 int main(void){__asm__ __volatile__ ("$3":::"memory");return(0);} |
795 _vo2=no | 822 _vo2=no |
796 _language=en | 823 _language=en |
797 _shm=auto | 824 _shm=auto |
798 _linux_devfs=no | 825 _linux_devfs=no |
799 _i18n=no | 826 _i18n=no |
800 _runtime_cpudetection=yes | |
801 | 827 |
802 for ac_option do | 828 for ac_option do |
803 case "$ac_option" in | 829 case "$ac_option" in |
804 # Skip 1st pass | 830 # Skip 1st pass |
805 --target=*) ;; | 831 --target=*) ;; |
809 --disable-gcc-checking) ;; | 835 --disable-gcc-checking) ;; |
810 --enable-static*) ;; | 836 --enable-static*) ;; |
811 --disable-static*) ;; | 837 --disable-static*) ;; |
812 --with-extraincdir=*) ;; | 838 --with-extraincdir=*) ;; |
813 --with-extralibdir=*) ;; | 839 --with-extralibdir=*) ;; |
814 | 840 --enable-runtime-cpudetection) ;; |
841 --disable-runtime-cpudetection) ;; | |
815 | 842 |
816 # Real 2nd pass | 843 # Real 2nd pass |
817 --enable-mencoder) _mencoder=yes ;; | 844 --enable-mencoder) _mencoder=yes ;; |
818 --disable-mencoder) _mencoder=no ;; | 845 --disable-mencoder) _mencoder=no ;; |
819 --enable-i18n) _i18n=yes ;; | 846 --enable-i18n) _i18n=yes ;; |
820 --disable-i18n) _i18n=no ;; | 847 --disable-i18n) _i18n=no ;; |
821 --enable-runtime-cpudetection) _runtime_cpudetection=yes ;; | |
822 --disable-runtime-cpudetection) _runtime_cpudetection=no ;; | |
823 --enable-x11) _x11=yes ;; | 848 --enable-x11) _x11=yes ;; |
824 --disable-x11) _x11=no ;; | 849 --disable-x11) _x11=no ;; |
825 --enable-xv) _xv=yes ;; | 850 --enable-xv) _xv=yes ;; |
826 --disable-xv) _xv=no ;; | 851 --disable-xv) _xv=no ;; |
827 --enable-sdl) _sdl=yes ;; | 852 --enable-sdl) _sdl=yes ;; |