configure: favor pkg_config over sdl_config
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 18 May 2011 14:36:08 +0000 (16:36 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 18 May 2011 15:17:56 +0000 (17:17 +0200)
This fixes linking issues on ubuntu.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
configure

index 0e7e94c..41a66d7 100755 (executable)
--- a/configure
+++ b/configure
@@ -2943,19 +2943,19 @@ if enabled libdc1394; then
 fi
 
 SDL_CONFIG="${cross_prefix}sdl-config"
-if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+if check_pkg_config sdl SDL_version.h SDL_Linked_Version; then
+    check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+    enable sdl &&
+    check_struct SDL.h SDL_VideoInfo current_w $sdl_cflags && enable sdl_video_size
+else
+  if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
     sdl_cflags=$("${SDL_CONFIG}" --cflags)
     sdl_libs=$("${SDL_CONFIG}" --libs)
     check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs &&
     check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
     enable sdl &&
     check_struct SDL.h SDL_VideoInfo current_w $sdl_cflags && enable sdl_video_size
-else
-    if check_pkg_config sdl SDL_version.h SDL_Linked_Version; then
-        check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
-        enable sdl &&
-        check_struct SDL.h SDL_VideoInfo current_w $sdl_cflags && enable sdl_video_size
-    fi
+  fi
 fi
 
 texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html