diff options
author | Colin Guthrie <pulse@colin.guthr.ie> | 2008-08-22 10:56:45 +0100 |
---|---|---|
committer | Colin Guthrie <pulse@colin.guthr.ie> | 2008-08-22 10:56:45 +0100 |
commit | 4282b726ee57ebae846ce400fd1cae43c4dfb2ae (patch) | |
tree | 2cb32c3bc52a9b9eab50a6195f3ccb190332f7d8 /m4/tls.m4 | |
parent | bf17dbb101d509e885bf689f4f13f75e4b3ab58d (diff) | |
parent | dc9b8dce309728b47059b9b44fd3bbd3798667ae (diff) |
Merge branch 'master' of git://git.0pointer.de/pulseaudio
Diffstat (limited to 'm4/tls.m4')
-rw-r--r-- | m4/tls.m4 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/m4/tls.m4 b/m4/tls.m4 new file mode 100644 index 00000000..3808f06e --- /dev/null +++ b/m4/tls.m4 @@ -0,0 +1,17 @@ +AC_DEFUN([CC_CHECK_TLS], [ + AC_CACHE_CHECK([whether $CC knows __thread for Thread-Local Storage], + cc_cv_tls___thread, + [AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + [[static __thread int a = 6;]], + [[a = 5;]]), + [cc_cv_tls___thread=yes], + [cc_cv_tls___thread=no]) + ]) + + AS_IF([test "x$cc_cv_tls___thread" = "xyes"], + [AC_DEFINE([SUPPORT_TLS___THREAD], 1, + [Define this if the compiler supports __thread for Thread-Local Storage]) + $1], + [$2]) +]) |