|
|
|
@ -659,6 +659,28 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
@@ -659,6 +659,28 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
|
|
|
|
|
] |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
TEMP_LDFLAGS="$LDFLAGS" |
|
|
|
|
LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS" |
|
|
|
|
AC_MSG_CHECKING([for thread_local support]) |
|
|
|
|
AC_LINK_IFELSE([AC_LANG_SOURCE([ |
|
|
|
|
#include <thread> |
|
|
|
|
static thread_local int foo = 0; |
|
|
|
|
static void run_thread() { foo++;} |
|
|
|
|
int main(){ |
|
|
|
|
for(int i = 0; i < 10; i++) { std::thread(run_thread).detach();} |
|
|
|
|
return foo; |
|
|
|
|
} |
|
|
|
|
])], |
|
|
|
|
[ |
|
|
|
|
AC_DEFINE(HAVE_THREAD_LOCAL,1,[Define if thread_local is supported.]) |
|
|
|
|
AC_MSG_RESULT(yes) |
|
|
|
|
], |
|
|
|
|
[ |
|
|
|
|
AC_MSG_RESULT(no) |
|
|
|
|
] |
|
|
|
|
) |
|
|
|
|
LDFLAGS="$TEMP_LDFLAGS" |
|
|
|
|
|
|
|
|
|
# Check for different ways of gathering OS randomness |
|
|
|
|
AC_MSG_CHECKING(for Linux getrandom syscall) |
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> |
|
|
|
|