[FFmpeg-devel] [PATCH] configure: fail if sdl2 was requested but not found

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Wed Nov 23 00:15:04 EET 2016


Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index 7d094df..0d85a54 100755
--- a/configure
+++ b/configure
@@ -5846,7 +5846,9 @@ if enabled gcrypt; then
 fi
 
 disabled sdl && disable sdl2
+enabled sdl2 && sdl_requested=yes
 if ! disabled sdl2; then
+    disable sdl2
     SDL2_CONFIG="${cross_prefix}sdl2-config"
     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 &&
@@ -5867,6 +5869,8 @@ if ! disabled sdl2; then
 fi
 enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs
 
+[ "x$sdl_requested" = "xyes" ] && ! enabled sdl2 && die "ERROR: libsdl2 requested but not found";
+
 disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
     check_lib2 "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
     enable securetransport; }
-- 
2.10.2


More information about the ffmpeg-devel mailing list