output -Wl,--subsystem,console for Mingw if any GUI library is used

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-08-16 16:12:31 +00:00
parent ac9a3c615a
commit ffef10f672
3 changed files with 37 additions and 4 deletions

11
configure vendored

File diff suppressed because one or more lines are too long

View File

@@ -2225,6 +2225,14 @@ if test "$wxUSE_GUI" = "yes"; then
if test "$wxUSE_MSW" = 1 ; then
TOOLKIT=MSW
GUIDIST=MSW_DIST
dnl -mwindows causes a heap of other default gui libs to be linked in.
dnl FIXME: If cygwin needs this, please push it above, if not, please
dnl remove this comment :-)
case "${host}" in
*-*-mingw32* )
WXCONFIG_LDFLAGS_GUI="$LDFLAGS -Wl,--subsystem,windows -mwindows"
esac
fi
if test "$wxUSE_GTK" = 1; then
@@ -5755,6 +5763,7 @@ AC_SUBST(WXCONFIG_LIBS_STATIC)
AC_SUBST(WXCONFIG_LIBS_STATIC_GL)
AC_SUBST(WXCONFIG_INCLUDE)
AC_SUBST(WXCONFIG_RPATH)
AC_SUBST(WXCONFIG_LDFLAGS_GUI)
AC_SUBST(WX_LARGEFILE_FLAGS)
AC_SUBST(CODE_GEN_FLAGS)
AC_SUBST(CODE_GEN_FLAGS_CXX)

View File

@@ -53,6 +53,7 @@ LDFLAGS_EXE="@LDFLAGS_EXE@"
MACRESWXCONFIG="@MACRESWXCONFIG@"
EXTRALIBS_GUI="@EXTRALIBS_GUI@"
LIBS="@LIBS@"
WXCONFIG_LDFLAGS_GUI="@WXCONFIG_LDFLAGS_GUI@"
# Linker flags for sublibraries:
@@ -126,6 +127,19 @@ output_libs()
echo $all_ldflags $wxlibs $all_libs
}
# output $(WXCONFIG_LDFLAGS_GUI) if any of libs passed as arguments is GUI
# library, nothing otherwise:
get_ldflags_gui()
{
flags_to_ret=""
for lib in $* ; do
if isinlist $lib $CORE_GUI_LIBS ; then
flags_to_ret="$WXCONFIG_LDFLAGS_GUI"
fi
done
echo $flags_to_ret
}
# return the absolute path prepending builddir to it if needed
makeabs()
{
@@ -317,14 +331,15 @@ while test $# -gt 0; do
# output link flags:
contrib_libs=`output_libs $libs_list`
if test $static_flag = yes ; then
echo "$libs ${LDFLAGS} ${WXCONFIG_RPATH} $contrib_libs ${libdir}/${WXCONFIG_LIBS_STATIC} ${EXTRALIBS_GUI} ${LIBS} ${DMALLOC_LIBS}"
echo "$libs ${LDFLAGS} ${WXCONFIG_LDFLAGS_GUI} ${WXCONFIG_RPATH} $contrib_libs ${libdir}/${WXCONFIG_LIBS_STATIC} ${EXTRALIBS_GUI} ${LIBS} ${DMALLOC_LIBS}"
else
echo $libs ${LDFLAGS} ${WXCONFIG_RPATH} $contrib_libs ${WXCONFIG_LIBS} ${DMALLOC_LIBS}
echo $libs ${LDFLAGS} ${WXCONFIG_LDFLAGS_GUI} ${WXCONFIG_RPATH} $contrib_libs ${WXCONFIG_LIBS} ${DMALLOC_LIBS}
fi
else
# in multilib mode, link against all sublibraries:
wxlibs=`output_libs $libs_list`
echo $libs ${LDFLAGS} ${WXCONFIG_RPATH} $wxlibs ${DMALLOC_LIBS}
guildflags=`get_ldflags_gui $libs_list`
echo $libs ${LDFLAGS} ${guildflags} ${WXCONFIG_RPATH} $wxlibs ${DMALLOC_LIBS}
fi
;;