mirror of https://github.com/xemu-project/xemu.git
use pkg-config for sdl whenever available
Together with the first patch this enables using the prefixed pkg-config, thus picking up the correct flags for SDL. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
67c274d3c7
commit
9316f80399
|
@ -990,18 +990,24 @@ fi
|
||||||
##########################################
|
##########################################
|
||||||
# SDL probe
|
# SDL probe
|
||||||
|
|
||||||
sdl_too_old=no
|
if $pkgconfig sdl --modversion >/dev/null 2>&1; then
|
||||||
|
sdlconfig="$pkgconfig sdl"
|
||||||
|
_sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'`
|
||||||
|
else
|
||||||
|
sdlconfig='sdl-config'
|
||||||
|
_sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
sdl_too_old=no
|
||||||
if test "$sdl" != "no" ; then
|
if test "$sdl" != "no" ; then
|
||||||
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_cflags=`sdl-config --cflags 2> /dev/null`
|
sdl_cflags=`$sdlconfig --cflags 2> /dev/null`
|
||||||
sdl_libs=`sdl-config --libs 2> /dev/null`
|
sdl_libs=`$sdlconfig --libs 2> /dev/null`
|
||||||
if compile_prog "$sdl_cflags" "$sdl_libs" ; then
|
if compile_prog "$sdl_cflags" "$sdl_libs" ; then
|
||||||
_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
|
||||||
|
|
Loading…
Reference in New Issue