app, configure: add a --enable-win32-debug-console build option.

Debugging stable versions under Windows is a pain because we don't have
access to the standard outputs. The debug console is indeed only built
on unstable builds. Let's make the debug console a separate build option
to allow building stable versions for debug (obviously the default
behavior when not configuring, is same as before, i.e. stable without
console and unstable with console).

(cherry picked from commit 1a28878943)
This commit is contained in:
Jehan 2018-08-10 19:46:16 +02:00
parent 0832bbd771
commit ddeff31476
2 changed files with 27 additions and 1 deletions

View file

@ -395,7 +395,7 @@ main (int argc,
} }
#endif #endif
#ifdef GIMP_UNSTABLE #ifdef ENABLE_WIN32_DEBUG_CONSOLE
gimp_open_console_window (); gimp_open_console_window ();
#endif #endif

View file

@ -877,6 +877,31 @@ PKG_CHECK_MODULES(HARFBUZZ, harfbuzz >= harfbuzz_required_version,,
PKG_CHECK_MODULES(GEXIV2, gexiv2 >= gexiv2_required_version,, PKG_CHECK_MODULES(GEXIV2, gexiv2 >= gexiv2_required_version,,
[add_deps_error([gexiv2 >= gexiv2_required_version])]) [add_deps_error([gexiv2 >= gexiv2_required_version])])
#################################
# Check for debug console (Win32)
#################################
AC_ARG_ENABLE(win32-debug-console,
[ --enable-win32-debug-console
open a console when starting the program
(default=auto)],,
enable_win32_debug_console=auto)
AC_MSG_CHECKING([if GIMP should open a debug console at start])
if test "x$platform_win32" != "xyes"; then
enable_win32_debug_console=no
elif test "x$enable_win32_debug_console" != xno &&
test "x$enable_win32_debug_console" != xyes; then
# By default, we enable the debug console only for unstable builds.
enable_win32_debug_console=gimp_unstable
fi
if test "x$enable_win32_debug_console" = "xyes"; then
AC_DEFINE(ENABLE_WIN32_DEBUG_CONSOLE, 1,
[Define to 1 if GIMP should open a debug console at start])
fi
AC_MSG_RESULT([$enable_win32_debug_console])
##################### #####################
# Check for Dr. Mingw # Check for Dr. Mingw
##################### #####################
@ -2844,6 +2869,7 @@ Optional Features:
Dr. Mingw (Win32): $enable_drmingw Dr. Mingw (Win32): $enable_drmingw
Relocatable bundle: $enable_relocatable_bundle Relocatable bundle: $enable_relocatable_bundle
Default ICC directory: $with_icc_directory Default ICC directory: $with_icc_directory
Debug console (Win32): $enable_win32_debug_console
Optional Plug-Ins: Optional Plug-Ins:
Ascii Art: $have_libaa Ascii Art: $have_libaa