From 593aa1834b7ca31306e7a81c08f9c7d0158d9454 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 10 Apr 2013 17:15:29 +0200 Subject: 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. --- configure | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3