1 # from http://autoconf-archive.cryp.to/ax_tls.html
3 # This was licensed under the GPL with the following exception:
5 # As a special exception, the respective Autoconf Macro's copyright
6 # owner gives unlimited permission to copy, distribute and modify the
7 # configure scripts that are the output of Autoconf when processing
8 # the Macro. You need not follow the terms of the GNU General Public
9 # License when using or distributing such scripts, even though
10 # portions of the text of the Macro appear in them. The GNU General
11 # Public License (GPL) does govern all other use of the material that
12 # constitutes the Autoconf Macro.
14 # This special exception to the GPL applies to versions of the
15 # Autoconf Macro released by the Autoconf Macro Archive. When you make
16 # and distribute a modified version of the Autoconf Macro, you may
17 # extend this special exception to the GPL to apply to your modified
21 AC_MSG_CHECKING(for thread local storage (TLS) class)
22 AC_CACHE_VAL(ac_cv_tls, [
23 ax_tls_keywords="__thread __declspec(thread) none"
24 for ax_tls_keyword in $ax_tls_keywords; do
25 case $ax_tls_keyword in
26 none) ac_cv_tls=none ; break ;;
32 static ] $ax_tls_keyword [ int bar;
36 [ac_cv_tls=$ax_tls_keyword ; break],
43 if test "$ac_cv_tls" != "none"; then
44 dnl AC_DEFINE([TLS], [], [If the compiler supports a TLS storage class define it to that here])
45 AC_DEFINE_UNQUOTED([TLS], $ac_cv_tls, [If the compiler supports a TLS storage class define it to that here])
47 AC_MSG_RESULT($ac_cv_tls)