fixed SDL probing for cross compilation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@698 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
702c651c4a
commit
a6e022ad13
25
configure
vendored
25
configure
vendored
@ -187,15 +187,23 @@ sdl_too_old=no
|
|||||||
|
|
||||||
if test -z "$sdl" ; then
|
if test -z "$sdl" ; then
|
||||||
|
|
||||||
|
sdl_config="sdl-config"
|
||||||
|
sdl=no
|
||||||
|
|
||||||
|
if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
|
||||||
|
# win32 cross compilation case
|
||||||
|
sdl_config="i386-mingw32msvc-sdl-config"
|
||||||
|
sdl=yes
|
||||||
|
else
|
||||||
|
# normal SDL probe
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#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
|
||||||
|
|
||||||
sdl=no
|
if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then
|
||||||
if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; 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
|
||||||
else
|
else
|
||||||
@ -203,7 +211,8 @@ sdl=yes
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi # cross compilation
|
||||||
|
fi # -z $sdl
|
||||||
|
|
||||||
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
|
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@ -355,15 +364,15 @@ fi
|
|||||||
if test "$sdl" = "yes" ; then
|
if test "$sdl" = "yes" ; then
|
||||||
echo "CONFIG_SDL=yes" >> $config_mak
|
echo "CONFIG_SDL=yes" >> $config_mak
|
||||||
echo "#define CONFIG_SDL 1" >> $config_h
|
echo "#define CONFIG_SDL 1" >> $config_h
|
||||||
echo "SDL_LIBS=`sdl-config --libs`" >> $config_mak
|
echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
|
||||||
aa="no"
|
aa="no"
|
||||||
`sdl-config --static-libs | grep \\\-laa > /dev/null` && aa="yes"
|
`$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes"
|
||||||
echo -n "SDL_STATIC_LIBS=`sdl-config --static-libs`" >> $config_mak
|
echo -n "SDL_STATIC_LIBS=`$sdl_config --static-libs`" >> $config_mak
|
||||||
if [ "${aa}" = "yes" ] ; then
|
if [ "${aa}" = "yes" ] ; then
|
||||||
echo -n " `aalib-config --libs`" >> $config_mak ;
|
echo -n " `aalib-config --libs`" >> $config_mak ;
|
||||||
fi
|
fi
|
||||||
echo "" >> $config_mak
|
echo "" >> $config_mak
|
||||||
echo -n "SDL_CFLAGS=`sdl-config --cflags`" >> $config_mak
|
echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
|
||||||
if [ "${aa}" = "yes" ] ; then
|
if [ "${aa}" = "yes" ] ; then
|
||||||
echo -n " `aalib-config --cflags`" >> $config_mak ;
|
echo -n " `aalib-config --cflags`" >> $config_mak ;
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user