don't use -mthreads switch if the compiler doesn't support it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
26
configure.in
26
configure.in
@@ -3485,10 +3485,28 @@ else
|
||||
if test "$wxUSE_THREADS" = "yes" ; then
|
||||
case "${host}" in
|
||||
*-*-mingw32* )
|
||||
CFLAGS="$CFLAGS -mthreads"
|
||||
CXXFLAGS="$CXXFLAGS -mthreads"
|
||||
TOOLCHAIN_DEFS="$TOOLCHAIN_DEFS -mthreads"
|
||||
LDFLAGS="$LDFLAGS -mthreads"
|
||||
dnl check if the compiler accepts -mthreads
|
||||
AC_CACHE_CHECK([if compiler supports -mthreads],
|
||||
wx_cv_cflags_mthread,
|
||||
[
|
||||
CFLAGS_OLD="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -mthreads"
|
||||
AC_TRY_COMPILE([], [],
|
||||
wx_cv_cflags_mthread=yes,
|
||||
wx_cv_cflags_mthread=no
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
if test "$wx_cv_cflags_mthread" = "yes"; then
|
||||
dnl it does, use it
|
||||
CXXFLAGS="$CXXFLAGS -mthreads"
|
||||
TOOLCHAIN_DEFS="$TOOLCHAIN_DEFS -mthreads"
|
||||
LDFLAGS="$LDFLAGS -mthreads"
|
||||
else
|
||||
dnl it doesn't
|
||||
CFLAGS="$CFLAGS_OLD"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
Reference in New Issue
Block a user