Mercurial > mplayer.hg
changeset 31550:0b34520a1c84
Replace some more manual compiler flag checks with cflag_check function.
author | diego |
---|---|
date | Thu, 01 Jul 2010 23:52:01 +0000 |
parents | 77723c0716bb |
children | 61494fd9176c |
files | configure |
diffstat | 1 files changed, 18 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Thu Jul 01 23:24:46 2010 +0000 +++ b/configure Thu Jul 01 23:52:01 2010 +0000 @@ -1799,10 +1799,7 @@ # if we had to disable sse/sse2 because the active kernel does not # support this instruction set extension, we also have to tell # gcc3 to not generate sse/sse2 instructions for normal C code - cat > $TMPC << EOF -int main(void) { return 0; } -EOF - cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext" + cflag_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext" fi fi @@ -1955,28 +1952,25 @@ fi echocheck "GCC & CPU optimization abilities" -cat > $TMPC << EOF -int main(void) { return 0; } -EOF if test "$_runtime_cpudetection" = no ; then if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then - cc_check -march=native && proc=native + cflag_check -march=native && proc=native fi if test "$proc" = "amdfam10"; then - cc_check -march=$proc $cpuopt=$proc || proc=k8 + cflag_check -march=$proc $cpuopt=$proc || proc=k8 fi if test "$proc" = "k8"; then - cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp + cflag_check -march=$proc $cpuopt=$proc || proc=athlon-xp fi if test "$proc" = "athlon-xp"; then - cc_check -march=$proc $cpuopt=$proc || proc=athlon + cflag_check -march=$proc $cpuopt=$proc || proc=athlon fi if test "$proc" = "k6-3" || test "$proc" = "k6-2"; then - cc_check -march=$proc $cpuopt=$proc || proc=k6 + cflag_check -march=$proc $cpuopt=$proc || proc=k6 fi if test "$proc" = "k6" || test "$proc" = "c3"; then - if ! cc_check -march=$proc $cpuopt=$proc; then - if cc_check -march=i586 $cpuopt=i686; then + if ! cflag_check -march=$proc $cpuopt=$proc; then + if cflag_check -march=i586 $cpuopt=i686; then proc=i586-i686 else proc=i586 @@ -1984,25 +1978,25 @@ fi fi if test "$proc" = "prescott" ; then - cc_check -march=$proc $cpuopt=$proc || proc=pentium4 + cflag_check -march=$proc $cpuopt=$proc || proc=pentium4 fi if test "$proc" = "core2" ; then - cc_check -march=$proc $cpuopt=$proc || proc=pentium-m + cflag_check -march=$proc $cpuopt=$proc || proc=pentium-m fi if test "$proc" = "pentium4" || test "$proc" = "pentium-m" || test "$proc" = "pentium3" || test "$proc" = "pentium2" || test "$proc" = "athlon" || test "$proc" = "c3-2" || test "$proc" = "geode"; then - cc_check -march=$proc $cpuopt=$proc || proc=i686 + cflag_check -march=$proc $cpuopt=$proc || proc=i686 fi if test "$proc" = "i686" || test "$proc" = "pentium-mmx" || test "$proc" = "winchip-c6" || test "$proc" = "winchip2"; then - cc_check -march=$proc $cpuopt=$proc || proc=i586 + cflag_check -march=$proc $cpuopt=$proc || proc=i586 fi if test "$proc" = "i586"; then - cc_check -march=$proc $cpuopt=$proc || proc=i486 + cflag_check -march=$proc $cpuopt=$proc || proc=i486 fi if test "$proc" = "i486" ; then - cc_check -march=$proc $cpuopt=$proc || proc=i386 + cflag_check -march=$proc $cpuopt=$proc || proc=i386 fi if test "$proc" = "i386" ; then - cc_check -march=$proc $cpuopt=$proc || proc=error + cflag_check -march=$proc $cpuopt=$proc || proc=error fi if test "$proc" = "error" ; then echores "CPU optimization disabled. CPU not recognized or your compiler is too old." @@ -2022,9 +2016,9 @@ _mcpu="$cpuopt=generic" # at least i486 required, for bswap instruction _march="-march=i486" - cc_check $_mcpu || _mcpu="$cpuopt=i686" - cc_check $_mcpu || _mcpu="" - cc_check $_march $_mcpu || _march="" + cflag_check $_mcpu || _mcpu="$cpuopt=i686" + cflag_check $_mcpu || _mcpu="" + cflag_check $_march $_mcpu || _march="" fi ## Gabucino : --target takes effect here (hopefully...) by overwriting