configure: Handle SDL version check through pkg-config
authorDiego Biurrun <diego@biurrun.de>
Sat, 11 Feb 2017 15:51:25 +0000 (16:51 +0100)
committerDiego Biurrun <diego@biurrun.de>
Thu, 16 Feb 2017 08:28:33 +0000 (09:28 +0100)
configure

index b8cbe17..4635b73 100755 (executable)
--- a/configure
+++ b/configure
@@ -4748,9 +4748,7 @@ if enabled nvenc; then
     require_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6"
 fi
 
-if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
-    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+if check_pkg_config "sdl >= 1.2.1 sdl < 1.3.0" SDL_events.h SDL_PollEvent; then
     enable sdl
 fi