]> git.sesse.net Git - ffmpeg/commitdiff
configure: force -mconsole when linking SDL under MinGW
authorStephen Hutchinson <qyot27@gmail.com>
Tue, 18 Aug 2015 16:00:06 +0000 (12:00 -0400)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 18 Aug 2015 19:20:50 +0000 (21:20 +0200)
When building SDL with MinGW, it sets -mwindows with the
assumption that the application is a GUI application. If this
is linked without passing -mconsole to configure via
--extra-ldflags, stdout will be silenced from cmd.exe while
running FFmpeg.

The -mwindows flag that causes this behavior is included in the
sdl_libs variable, so append -mconsole there rather than create
an sdl_ldflags case just to insert it (especially if -mconsole
must come *after* -mwindows in order to be effective).

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
configure

index 49d4ff313be5fa6c2eed85f3b06c607a58356dfb..bc2160df7ccff58dbae258e8fa0d6d64b8c6ce90 100755 (executable)
--- a/configure
+++ b/configure
@@ -5376,6 +5376,9 @@ if ! disabled sdl; then
             disable sdl
         fi
     fi
+    if test $target_os = "mingw32"; then
+        sdl_libs="$sdl_libs -mconsole"
+    fi
 fi
 enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs