diff options
author | Maria Matejka <mq@ucw.cz> | 2021-02-04 15:08:52 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-11-22 19:05:43 +0100 |
commit | b5061659d3cc011118024861c2f048e67affbd39 (patch) | |
tree | 6e31927baf828e11eec0876a990db6b4bda5ac5a /aclocal.m4 | |
parent | a845651bc50b75b2be41b4427e04857ce3c106a6 (diff) |
POSIX threads and thread-local storage is needed for concurrent execution
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1,5 +1,6 @@ dnl ** Additional Autoconf tests for BIRD configure script dnl ** (c) 1999 Martin Mares <mj@ucw.cz> +dnl ** (c) 2021 Maria Matejka <mq@jmq.cz> AC_DEFUN([BIRD_CHECK_THREAD_LOCAL], [ @@ -9,14 +10,23 @@ AC_DEFUN([BIRD_CHECK_THREAD_LOCAL], AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [ - _Thread_local static int x = 42; + static _Thread_local int x = 42; ], [] ) ], [bird_cv_thread_local=yes], + [AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [ + static __thread int x = 42; + ], + [] + ) + ], + [bird_cv_thread_local=__thread], [bird_cv_thread_local=no] - ) + )]) ) ]) |