Commit db7287ed1714e0b2792b3974921ef9c81618e160

Authored by pbrook
1 parent 45e4522e

Use ARCH_CFLAGS in configure tests.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3958 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 6 deletions
configure
@@ -442,7 +442,7 @@ cat > $TMPC <<EOF @@ -442,7 +442,7 @@ cat > $TMPC <<EOF
442 int main(void) {} 442 int main(void) {}
443 EOF 443 EOF
444 444
445 -if $cc -c -o $TMPO $TMPC 2> /dev/null ; then 445 +if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC 2> /dev/null ; then
446 : C compiler works ok 446 : C compiler works ok
447 else 447 else
448 echo "ERROR: \"$cc\" either does not exist or does not work" 448 echo "ERROR: \"$cc\" either does not exist or does not work"
@@ -463,7 +463,7 @@ if test "$check_gcc" = "yes" ; then @@ -463,7 +463,7 @@ if test "$check_gcc" = "yes" ; then
463 #endif 463 #endif
464 int main(){return 0;} 464 int main(){return 0;}
465 EOF 465 EOF
466 - if "$cc" -o $TMPE $TMPC 2> /dev/null ; then 466 + if "$cc" $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
467 echo "WARNING: \"$cc\" looks like gcc 4.x" 467 echo "WARNING: \"$cc\" looks like gcc 4.x"
468 found_compat_cc="no" 468 found_compat_cc="no"
469 if test "$gcc3_search" = "yes" ; then 469 if test "$gcc3_search" = "yes" ; then
@@ -563,7 +563,7 @@ int main(int argc, char ** argv){ @@ -563,7 +563,7 @@ int main(int argc, char ** argv){
563 } 563 }
564 EOF 564 EOF
565 565
566 -if $cc -o $TMPE $TMPC 2> /dev/null ; then 566 +if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
567 $TMPE && bigendian="yes" 567 $TMPE && bigendian="yes"
568 else 568 else
569 echo big/little test failed 569 echo big/little test failed
@@ -611,7 +611,7 @@ cat > $TMPC << EOF @@ -611,7 +611,7 @@ cat > $TMPC << EOF
611 #undef main /* We don't want SDL to override our main() */ 611 #undef main /* We don't want SDL to override our main() */
612 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } 612 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
613 EOF 613 EOF
614 - if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /tmp/qemu-$$-sdl-config.log ; then 614 + if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /tmp/qemu-$$-sdl-config.log ; then
615 _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` 615 _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
616 if test "$_sdlversion" -lt 121 ; then 616 if test "$_sdlversion" -lt 121 ; then
617 sdl_too_old=yes 617 sdl_too_old=yes
@@ -662,7 +662,7 @@ if test "$alsa" = "yes" ; then @@ -662,7 +662,7 @@ if test "$alsa" = "yes" ; then
662 #include <alsa/asoundlib.h> 662 #include <alsa/asoundlib.h>
663 int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); } 663 int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); }
664 EOF 664 EOF
665 - if $cc -o $TMPE $TMPC -lasound 2> /dev/null ; then 665 + if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lasound 2> /dev/null ; then
666 : 666 :
667 else 667 else
668 echo 668 echo
@@ -707,6 +707,7 @@ fi @@ -707,6 +707,7 @@ fi
707 echo "Source path $source_path" 707 echo "Source path $source_path"
708 echo "C compiler $cc" 708 echo "C compiler $cc"
709 echo "Host C compiler $host_cc" 709 echo "Host C compiler $host_cc"
  710 +echo "ARCH_CFLAGS $ARCH_CFLAGS"
710 echo "make $make" 711 echo "make $make"
711 echo "install $install" 712 echo "install $install"
712 echo "host CPU $cpu" 713 echo "host CPU $cpu"
@@ -862,7 +863,7 @@ else @@ -862,7 +863,7 @@ else
862 #include <byteswap.h> 863 #include <byteswap.h>
863 int main(void) { return bswap_32(0); } 864 int main(void) { return bswap_32(0); }
864 EOF 865 EOF
865 - if $cc -o $TMPE $TMPC 2> /dev/null ; then 866 + if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
866 echo "#define HAVE_BYTESWAP_H 1" >> $config_h 867 echo "#define HAVE_BYTESWAP_H 1" >> $config_h
867 fi 868 fi
868 fi 869 fi