Changeset View
Changeset View
Standalone View
Standalone View
configure.ac
Show First 20 Lines • Show All 702 Lines • ▼ Show 20 Lines | AC_LINK_IFELSE([AC_LANG_SOURCE([ | ||||
[ | [ | ||||
AC_MSG_RESULT(no) | AC_MSG_RESULT(no) | ||||
if test x$use_reduce_exports = xyes; then | if test x$use_reduce_exports = xyes; then | ||||
AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduce-exports.]) | AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduce-exports.]) | ||||
fi | fi | ||||
] | ] | ||||
) | ) | ||||
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 | # Check for different ways of gathering OS randomness | ||||
AC_MSG_CHECKING(for Linux getrandom syscall) | AC_MSG_CHECKING(for Linux getrandom syscall) | ||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h> | ||||
#include <sys/syscall.h> | #include <sys/syscall.h> | ||||
#include <linux/random.h>]], | #include <linux/random.h>]], | ||||
[[ syscall(SYS_getrandom, nullptr, 32, 0); ]])], | [[ syscall(SYS_getrandom, nullptr, 32, 0); ]])], | ||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_GETRANDOM, 1,[Define this symbol if the Linux getrandom system call is available]) ], | [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYS_GETRANDOM, 1,[Define this symbol if the Linux getrandom system call is available]) ], | ||||
[ AC_MSG_RESULT(no)] | [ AC_MSG_RESULT(no)] | ||||
▲ Show 20 Lines • Show All 659 Lines • Show Last 20 Lines |