[FFmpeg-devel] configure - "Check 'sdl2-config' first, then 'sdl2.pc'."

Reino Wijnsma rwijnsma at xs4all.nl
Wed May 10 02:04:35 EEST 2017


See https://trac.ffmpeg.org/ticket/6377.
-------------- next part --------------
From 3f9c065f96815ffefaa39cda7bacd8132bfdf66c Mon Sep 17 00:00:00 2001
From: Reino Wijnsma <rwijnsma at xs4all.nl>
Date: Wed, 10 May 2017 00:50:30 +0200
Subject: [PATCH] Check 'sdl2-config' first, then 'sdl2.pc'.

---
 configure | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 5ae5227..275a1c1 100755
--- a/configure
+++ b/configure
@@ -5947,14 +5947,14 @@ fi
 disabled sdl && disable sdl2
 if ! disabled sdl2; then
     SDL2_CONFIG="${cross_prefix}sdl2-config"
-    if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then
+    if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
+        sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
+        sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
         check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
         check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags &&
         check_func SDL_Init $sdl2_extralibs $sdl2_cflags && enable sdl2
     else
-      if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
-        sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
-        sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
+      if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then
         check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
         check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags &&
         check_func SDL_Init $sdl2_extralibs $sdl2_cflags && enable sdl2
-- 
2.8.3



More information about the ffmpeg-devel mailing list