Commit 225e21ef authored by Måns Rullgård's avatar Måns Rullgård
Browse files

simplify SDL check

Originally committed as revision 7922 to svn://
parent 30f35ab0
...@@ -1666,21 +1666,17 @@ fi ...@@ -1666,21 +1666,17 @@ fi
sdl_too_old=no sdl_too_old=no
sdl=no sdl=no
SDL_CONFIG="${cross_prefix}sdl-config" SDL_CONFIG="${cross_prefix}sdl-config"
if ("${SDL_CONFIG}" --version) >/dev/null 2>&1 ; then if "${SDL_CONFIG}" --version >/dev/null 2>&1; then
temp_cflags `"${SDL_CONFIG}" --cflags` sdl_cflags=`"${SDL_CONFIG}" --cflags`
temp_cflags $sdl_cflags
temp_extralibs `"${SDL_CONFIG}" --libs` temp_extralibs `"${SDL_CONFIG}" --libs`
check_ld <<EOF if check_lib SDL.h SDL_Init; then
#include <SDL.h>
#undef main /* We don't want SDL to override our main() */
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
if test $? = 0; 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
sdl=yes sdl=yes
check_cc <<EOF && sdl_video_size=yes || sdl_video_size=no check_cc $sdl_cflags <<EOF && enable sdl_video_size
#include <SDL.h> #include <SDL.h>
int main(void){ int main(void){
const SDL_VideoInfo *vi = SDL_GetVideoInfo(); const SDL_VideoInfo *vi = SDL_GetVideoInfo();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment