ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- if test "$threads" = "yes"; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
$as_echo_n "checking for std::thread... " >&6; }
if ${gdb_cv_cxx_std_thread+:} false; then :
$as_echo_n "(cached) " >&6
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <thread>
- void callback() { }
+ void callback() { }
int
main ()
{
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
$as_echo "$gdb_cv_cxx_std_thread" >&6; }
+ if test "$threads" = "yes"; then
# This check must be here, while LIBS includes any necessary
# threading library.
for ac_func in pthread_sigmask pthread_setname_np
fi
done
-
- LIBS="$save_LIBS"
- CXXFLAGS="$save_CXXFLAGS"
fi
+ LIBS="$save_LIBS"
+ CXXFLAGS="$save_CXXFLAGS"
if test "$want_threading" = "yes"; then
if test "$gdb_cv_cxx_std_thread" = "yes"; then
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- if test "$threads" = "yes"; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
$as_echo_n "checking for std::thread... " >&6; }
if ${gdb_cv_cxx_std_thread+:} false; then :
$as_echo_n "(cached) " >&6
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <thread>
- void callback() { }
+ void callback() { }
int
main ()
{
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
$as_echo "$gdb_cv_cxx_std_thread" >&6; }
+ if test "$threads" = "yes"; then
# This check must be here, while LIBS includes any necessary
# threading library.
for ac_func in pthread_sigmask pthread_setname_np
fi
done
-
- LIBS="$save_LIBS"
- CXXFLAGS="$save_CXXFLAGS"
fi
+ LIBS="$save_LIBS"
+ CXXFLAGS="$save_CXXFLAGS"
if test "$want_threading" = "yes"; then
if test "$gdb_cv_cxx_std_thread" = "yes"; then
# mingw and DJGPP.
AC_LANG_PUSH([C++])
AX_PTHREAD([threads=yes], [threads=no])
- if test "$threads" = "yes"; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
- AC_CACHE_CHECK([for std::thread],
- gdb_cv_cxx_std_thread,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[#include <thread>
- void callback() { }]],
- [[std::thread t(callback);]])],
- gdb_cv_cxx_std_thread=yes,
- gdb_cv_cxx_std_thread=no)])
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
+ AC_CACHE_CHECK([for std::thread],
+ gdb_cv_cxx_std_thread,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#include <thread>
+ void callback() { }]],
+ [[std::thread t(callback);]])],
+ gdb_cv_cxx_std_thread=yes,
+ gdb_cv_cxx_std_thread=no)])
+ if test "$threads" = "yes"; then
# This check must be here, while LIBS includes any necessary
# threading library.
AC_CHECK_FUNCS([pthread_sigmask pthread_setname_np])
-
- LIBS="$save_LIBS"
- CXXFLAGS="$save_CXXFLAGS"
fi
+ LIBS="$save_LIBS"
+ CXXFLAGS="$save_CXXFLAGS"
if test "$want_threading" = "yes"; then
if test "$gdb_cv_cxx_std_thread" = "yes"; then
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- if test "$threads" = "yes"; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
$as_echo_n "checking for std::thread... " >&6; }
if ${gdb_cv_cxx_std_thread+:} false; then :
$as_echo_n "(cached) " >&6
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <thread>
- void callback() { }
+ void callback() { }
int
main ()
{
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
$as_echo "$gdb_cv_cxx_std_thread" >&6; }
+ if test "$threads" = "yes"; then
# This check must be here, while LIBS includes any necessary
# threading library.
for ac_func in pthread_sigmask pthread_setname_np
fi
done
-
- LIBS="$save_LIBS"
- CXXFLAGS="$save_CXXFLAGS"
fi
+ LIBS="$save_LIBS"
+ CXXFLAGS="$save_CXXFLAGS"
if test "$want_threading" = "yes"; then
if test "$gdb_cv_cxx_std_thread" = "yes"; then