Commit f54f432ec7197ffe7e077fcb5cc6557aa21c9ffd

Authored by ths
1 parent 6c591867

Avoid use of which to detect gcc, as it is broken on darwin. Patch by

Joachim Henke.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2796 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 6 deletions
configure
@@ -394,18 +394,13 @@ if test "$check_gcc" = "yes" ; then @@ -394,18 +394,13 @@ if test "$check_gcc" = "yes" ; then
394 #endif 394 #endif
395 int main(){return 0;} 395 int main(){return 0;}
396 EOF 396 EOF
397 - check_cc() {  
398 - which "$1" 2> /dev/null  
399 - return $?  
400 - }  
401 -  
402 if "$cc" -o $TMPE $TMPC 2> /dev/null ; then 397 if "$cc" -o $TMPE $TMPC 2> /dev/null ; then
403 echo "WARNING: \"$cc\" looks like gcc 4.x" 398 echo "WARNING: \"$cc\" looks like gcc 4.x"
404 found_compat_cc="no" 399 found_compat_cc="no"
405 if test "$gcc3_search" = "yes" ; then 400 if test "$gcc3_search" = "yes" ; then
406 echo "Looking for gcc 3.x" 401 echo "Looking for gcc 3.x"
407 for compat_cc in $gcc3_list ; do 402 for compat_cc in $gcc3_list ; do
408 - if check_cc "$cross_prefix$compat_cc" ; then 403 + if "$cross_prefix$compat_cc" --version > /dev/null 2>&1 ; then
409 echo "Found \"$compat_cc\"" 404 echo "Found \"$compat_cc\""
410 cc="$cross_prefix$compat_cc" 405 cc="$cross_prefix$compat_cc"
411 found_compat_cc="yes" 406 found_compat_cc="yes"