*) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
esac
else
- want_threading=yes
+ want_threading=auto
fi
# Check for std::thread. This does not work on some platforms, like
- # mingw and DJGPP.
+ # mingw using the win32 threads model with gcc older than 13, and
+ # DJGPP.
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
LIBS="$save_LIBS"
CXXFLAGS="$save_CXXFLAGS"
- if test "$want_threading" = "yes"; then
+ if test "$want_threading" != "no"; then
if test "$gdb_cv_cxx_std_thread" = "yes"; then
$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
+ else
+ if test "$want_threading" = "yes"; then
+ as_fn_error $? "std::thread does not work; disable threading" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: std::thread does not work; disabling threading" >&5
+$as_echo "$as_me: WARNING: std::thread does not work; disabling threading" >&2;}
+ fi
fi
fi
ac_ext=c
*) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
esac
else
- want_threading=yes
+ want_threading=auto
fi
# Check for std::thread. This does not work on some platforms, like
- # mingw and DJGPP.
+ # mingw using the win32 threads model with gcc older than 13, and
+ # DJGPP.
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
LIBS="$save_LIBS"
CXXFLAGS="$save_CXXFLAGS"
- if test "$want_threading" = "yes"; then
+ if test "$want_threading" != "no"; then
if test "$gdb_cv_cxx_std_thread" = "yes"; then
$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
+ else
+ if test "$want_threading" = "yes"; then
+ as_fn_error $? "std::thread does not work; disable threading" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: std::thread does not work; disabling threading" >&5
+$as_echo "$as_me: WARNING: std::thread does not work; disabling threading" >&2;}
+ fi
fi
fi
ac_ext=c
no) want_threading=no ;;
*) AC_MSG_ERROR([bad value $enableval for threading]) ;;
esac],
- [want_threading=yes])
+ [want_threading=auto])
# Check for std::thread. This does not work on some platforms, like
- # mingw and DJGPP.
+ # mingw using the win32 threads model with gcc older than 13, and
+ # DJGPP.
AC_LANG_PUSH([C++])
AX_PTHREAD([threads=yes], [threads=no])
save_LIBS="$LIBS"
LIBS="$save_LIBS"
CXXFLAGS="$save_CXXFLAGS"
- if test "$want_threading" = "yes"; then
+ if test "$want_threading" != "no"; then
if test "$gdb_cv_cxx_std_thread" = "yes"; then
AC_DEFINE(CXX_STD_THREAD, 1,
[Define to 1 if std::thread works.])
+ else
+ if test "$want_threading" = "yes"; then
+ AC_MSG_ERROR([std::thread does not work; disable threading])
+ else
+ AC_MSG_WARN([std::thread does not work; disabling threading])
+ fi
fi
fi
AC_LANG_POP
*) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
esac
else
- want_threading=yes
+ want_threading=auto
fi
# Check for std::thread. This does not work on some platforms, like
- # mingw and DJGPP.
+ # mingw using the win32 threads model with gcc older than 13, and
+ # DJGPP.
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
LIBS="$save_LIBS"
CXXFLAGS="$save_CXXFLAGS"
- if test "$want_threading" = "yes"; then
+ if test "$want_threading" != "no"; then
if test "$gdb_cv_cxx_std_thread" = "yes"; then
$as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
+ else
+ if test "$want_threading" = "yes"; then
+ as_fn_error $? "std::thread does not work; disable threading" "$LINENO" 5
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: std::thread does not work; disabling threading" >&5
+$as_echo "$as_me: WARNING: std::thread does not work; disabling threading" >&2;}
+ fi
fi
fi
ac_ext=c