Applied Fabian Wenzel's patches to add -mthreads for threads to work

in MinGW.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon 2002-08-28 20:11:12 +00:00
parent 09740c31b9
commit a0b9e27fd4
4 changed files with 9036 additions and 18556 deletions

27562
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -3191,11 +3191,12 @@ dnl flush the cache
AC_CACHE_SAVE
dnl ---------------------------------------------------------------------------
dnl thread support for Unix (always available under Win32)
dnl thread support for Unix (for Win32 see past the next matching "else")
dnl ---------------------------------------------------------------------------
dnl under MSW we always have thread support
dnl under MSW (except mingw32) we always have thread support
CPP_MT_FLAG=
COMMON_THREADCPPFLAGS=
if test "$TOOLKIT" != "MSW"; then
dnl the code below:
@ -3451,6 +3452,17 @@ if test "$TOOLKIT" != "MSW"; then
fi
dnl from if !MSW
else
if test "$wxUSE_THREADS" = "yes" ; then
case "${host}" in
*-*-mingw32* )
CFLAGS="$CFLAGS -mthreads"
CXXFLAGS="$CXXFLAGS -mthreads"
COMMON_THREADCPPFLAGS="-mthreads"
LDFLAGS="$LDFLAGS -mthreads"
;;
esac
fi
fi
if test "$wxUSE_THREADS" = "yes"; then
@ -4988,6 +5000,7 @@ AC_SUBST(GUIDIST)
AC_SUBST(PORT_FILES)
AC_SUBST(DISTDIR)
AC_SUBST(COMMON_THREADCPPFLAGS)
dnl additional subdirectories where we will build
AC_SUBST(SAMPLES_SUBDIRS)

View File

@ -116,6 +116,9 @@ DLLTOOL = dlltool
# add "-DHAVE_W32API_H" if you have w32api >= 0.5
OPTIONS = -DSTRICT # -D__MINGW32__
# Add "-mthreads" if you want to have threads under mingw32
COMMON_THREADFLAGS =
# Debugging information
ifeq ($(FINAL),0)
DEBUGFLAGS = -g -D__WXDEBUG__
@ -270,12 +273,12 @@ endif
# You shouldn't need to change these...
CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS) $(EXTRADLLFLAGS)
CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS) -DWIN32_LEAN_AND_MEAN
CPPFLAGS = $(XINCLUDE) $(INC) $(COMMON_THREADFLAGS) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS) $(EXTRADLLFLAGS)
CFLAGS = $(XINCLUDE) $(INC) $(COMMON_THREADFLAGS) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS) -DWIN32_LEAN_AND_MEAN
ifeq ($(wxUSE_GUI),1)
WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows
endif
LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib -L$(WXDIR)/contrib/lib $(EXTRALDFLAGS)
LDFLAGS = $(WINDOWSLDFLAGS) $(COMMON_THREADFLAGS) -L$(WXDIR)/lib -L$(WXDIR)/contrib/lib $(EXTRALDFLAGS)
.SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .cxx .c

View File

@ -42,9 +42,9 @@ cppflags()
includes="-I@libdir@/wx/include/@TOOLCHAIN_NAME@ $includes"
if test $static_flag = yes ; then
echo $includes @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @WXCONFIG_INCLUDE@
echo $includes @COMMON_THREADCPPFLAGS@ @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @WXCONFIG_INCLUDE@
else
echo $includes @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @TOOLCHAIN_DLL_DEFS@ @WXCONFIG_INCLUDE@
echo $includes @COMMON_THREADCPPFLAGS@ @WXDEBUG_DEFINE@ @TOOLCHAIN_DEFS@ @TOOLCHAIN_DLL_DEFS@ @WXCONFIG_INCLUDE@
fi
}