summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-10 17:15:29 +0200
committerwm4 <wm4@nowhere>2013-04-10 17:15:29 +0200
commit593aa1834b7ca31306e7a81c08f9c7d0158d9454 (patch)
treeb73c24afb2237d620e9ed3e47df1ccfc1548aedc /configure
parent10d9d2a1fa4eb1579f0dd3943d6fc09bbea06302 (diff)
downloadmpv-593aa1834b7ca31306e7a81c08f9c7d0158d9454.tar.bz2
mpv-593aa1834b7ca31306e7a81c08f9c7d0158d9454.tar.xz
configure: add -mconsole on MinGW
At least libsdl adds -mwindows to the cflags, which marks the .exe binary as GUI application. This means the program detaches from the console when started in cmd.exe, instead of showing the playback status, receiving console input, and so on. Append -mconsole to the linker command line to disable -mwindows.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure b/configure
index 2f0a182fea..57542fc804 100755
--- a/configure
+++ b/configure
@@ -2942,6 +2942,11 @@ echores "$_lircc"
#############################################################################
+if mingw32 ; then
+ # add this last, so that --libs from pkg-config can't override it
+ end_ldflags="$end_ldflags -mconsole"
+fi
+
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
@@ -2984,7 +2989,7 @@ CFLAGS = $WARNFLAGS $ERRORFLAGS $WARN_CFLAGS $CFLAGS $extra_cflags
CXXFLAGS = $WARNFLAGS $ERRORFLAGS $CXXFLAGS $extra_cflags $extra_cxxflags
DEPFLAGS = $DEPFLAGS
-EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs $libs_mplayer
+EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs $libs_mplayer $end_ldflags
GETCH = $_getch
TIMER = $_timer