comparison configure @ 26685:5b9a13fb7357

Simplify AltiVec CFLAG test.
author diego
date Sat, 10 May 2008 13:41:10 +0000
parents 45d4ce126ce7
children 04a4bd6d7a5f
comparison
equal deleted inserted replaced
26684:45d4ce126ce7 26685:5b9a13fb7357
2414 if test "$_altivec" = yes || test "$_runtime_cpudetection" = yes ; then 2414 if test "$_altivec" = yes || test "$_runtime_cpudetection" = yes ; then
2415 2415
2416 # check if AltiVec is supported by the compiler, and how to enable it 2416 # check if AltiVec is supported by the compiler, and how to enable it
2417 echocheck "GCC altivec support" 2417 echocheck "GCC altivec support"
2418 _altivec_gcc_flags='' 2418 _altivec_gcc_flags=''
2419 p='' 2419 p='none'
2420 cat > $TMPC << EOF 2420 cat > $TMPC << EOF
2421 int main(void) { return 0; } 2421 int main(void) { return 0; }
2422 EOF 2422 EOF
2423 FSF_flags='-maltivec -mabi=altivec' 2423 FSF_flags='-maltivec -mabi=altivec'
2424 Darwin_flags='-faltivec' 2424 Darwin_flags='-faltivec'
2425 2425
2426 # check for Darwin-style flags first, since gcc-3.3 (August Update 2426 # check for Darwin-style flags first, since gcc-3.3 (August Update
2427 # from Apple) on MacOS 10.2.8 accepts but ignores FSF-style flags... 2427 # from Apple) on MacOS 10.2.8 accepts but ignores FSF-style flags...
2428 if test -z "$p"; then 2428 cc_check $Darwin_flags && p='Darwin' \
2429 cc_check $Darwin_flags && p='Darwin' 2429 || cc_check $FSF_flags && p='FSF'
2430 fi
2431 if test -z "$p"; then
2432 cc_check $FSF_flags && p='FSF'
2433 fi
2434 case $p in 2430 case $p in
2435 FSF) _altivec_gcc_flags="$FSF_flags" _altivec=yes ;; 2431 FSF) _altivec_gcc_flags="$FSF_flags" _altivec=yes ;;
2436 Darwin) _altivec_gcc_flags="$Darwin_flags" _altivec=yes ;; 2432 Darwin) _altivec_gcc_flags="$Darwin_flags" _altivec=yes ;;
2437 *) _altivec=no ;; 2433 *) _altivec=no ;;
2438 esac 2434 esac
2439 if test -z "$p"; then 2435 echores "$p-style ($_altivec_gcc_flags)"
2440 p=none
2441 else
2442 p="$p-style ($_altivec_gcc_flags)"
2443 fi
2444 echores "$p"
2445 2436
2446 # check if <altivec.h> should be included 2437 # check if <altivec.h> should be included
2447 echocheck "altivec.h" 2438 echocheck "altivec.h"
2448 _def_altivec_h='#undef HAVE_ALTIVEC_H' 2439 _def_altivec_h='#undef HAVE_ALTIVEC_H'
2449 _have_altivec_h=no 2440 _have_altivec_h=no