1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- ifdef([m4_ifblank], [], [
- m4_define([m4_ifblank],
- [m4_if(m4_translit([[$1]], [ ][ ][
- ]), [], [$2], [$3])])
- ])
- ifdef([m4_ifnblank], [], [
- m4_define([m4_ifnblank],
- [m4_if(m4_translit([[$1]], [ ][ ][
- ]), [], [$3], [$2])])
- ])
- AC_DEFUN([AX_TLS], [
- AC_MSG_CHECKING([for thread local storage (TLS) class])
- AC_CACHE_VAL([ac_cv_tls],
- [for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do
- AS_CASE([$ax_tls_keyword],
- [none], [ac_cv_tls=none ; break],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [#include <stdlib.h>],
- [static $ax_tls_keyword int bar;]
- )],
- [ac_cv_tls=$ax_tls_keyword ; break],
- [ac_cv_tls=none]
- )]
- )
- done ]
- )
- AC_MSG_RESULT([$ac_cv_tls])
- AS_IF([test "$ac_cv_tls" != "none"],
- [AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class, define it to that here])
- m4_ifnblank([$1],[$1],[[:]])],
- [m4_ifnblank([$2],[$2],[[:]])])
- ])
|