diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-02 21:55:47 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-02 21:55:47 +0000 |
commit | a6e022ad139c695e60d1bcb6c298a67aaf5c2916 (patch) | |
tree | 727b726a8060dda3d29ddf850cbe112dfee6c2f3 /configure | |
parent | 702c651c4ae90ac399264c07aded66df2c0efacf (diff) |
fixed SDL probing for cross compilation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@698 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -187,15 +187,23 @@ sdl_too_old=no 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 #include <SDL.h> #undef main /* We don't want SDL to override our main() */ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF -sdl=no -if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then -_sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` +if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then +_sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes else @@ -203,7 +211,8 @@ sdl=yes fi fi -fi +fi # cross compilation +fi # -z $sdl if test x"$1" = x"-h" -o x"$1" = x"--help" ; then cat << EOF @@ -355,15 +364,15 @@ fi if test "$sdl" = "yes" ; then echo "CONFIG_SDL=yes" >> $config_mak 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" - `sdl-config --static-libs | grep \\\-laa > /dev/null` && aa="yes" - echo -n "SDL_STATIC_LIBS=`sdl-config --static-libs`" >> $config_mak + `$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes" + echo -n "SDL_STATIC_LIBS=`$sdl_config --static-libs`" >> $config_mak if [ "${aa}" = "yes" ] ; then echo -n " `aalib-config --libs`" >> $config_mak ; fi 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 echo -n " `aalib-config --cflags`" >> $config_mak ; fi |