Use ARCH_CFLAGS in configure tests.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3958 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
pbrook 2008-02-03 16:27:13 +00:00
parent 45e4522e2e
commit db7287ed17

13
configure vendored
View File

@ -442,7 +442,7 @@ cat > $TMPC <<EOF
int main(void) {} int main(void) {}
EOF EOF
if $cc -c -o $TMPO $TMPC 2> /dev/null ; then if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC 2> /dev/null ; then
: C compiler works ok : C compiler works ok
else else
echo "ERROR: \"$cc\" either does not exist or does not work" echo "ERROR: \"$cc\" either does not exist or does not work"
@ -463,7 +463,7 @@ if test "$check_gcc" = "yes" ; then
#endif #endif
int main(){return 0;} int main(){return 0;}
EOF EOF
if "$cc" -o $TMPE $TMPC 2> /dev/null ; then if "$cc" $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
echo "WARNING: \"$cc\" looks like gcc 4.x" echo "WARNING: \"$cc\" looks like gcc 4.x"
found_compat_cc="no" found_compat_cc="no"
if test "$gcc3_search" = "yes" ; then if test "$gcc3_search" = "yes" ; then
@ -563,7 +563,7 @@ int main(int argc, char ** argv){
} }
EOF EOF
if $cc -o $TMPE $TMPC 2> /dev/null ; then if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
$TMPE && bigendian="yes" $TMPE && bigendian="yes"
else else
echo big/little test failed echo big/little test failed
@ -611,7 +611,7 @@ cat > $TMPC << EOF
#undef main /* We don't want SDL to override our main() */ #undef main /* We don't want SDL to override our main() */
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
EOF EOF
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 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
_sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
if test "$_sdlversion" -lt 121 ; then if test "$_sdlversion" -lt 121 ; then
sdl_too_old=yes sdl_too_old=yes
@ -662,7 +662,7 @@ if test "$alsa" = "yes" ; then
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); } int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); }
EOF EOF
if $cc -o $TMPE $TMPC -lasound 2> /dev/null ; then if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lasound 2> /dev/null ; then
: :
else else
echo echo
@ -707,6 +707,7 @@ fi
echo "Source path $source_path" echo "Source path $source_path"
echo "C compiler $cc" echo "C compiler $cc"
echo "Host C compiler $host_cc" echo "Host C compiler $host_cc"
echo "ARCH_CFLAGS $ARCH_CFLAGS"
echo "make $make" echo "make $make"
echo "install $install" echo "install $install"
echo "host CPU $cpu" echo "host CPU $cpu"
@ -862,7 +863,7 @@ else
#include <byteswap.h> #include <byteswap.h>
int main(void) { return bswap_32(0); } int main(void) { return bswap_32(0); }
EOF EOF
if $cc -o $TMPE $TMPC 2> /dev/null ; then if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
echo "#define HAVE_BYTESWAP_H 1" >> $config_h echo "#define HAVE_BYTESWAP_H 1" >> $config_h
fi fi
fi fi