summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-09-10 23:57:10 +0000
committerLennart Poettering <lennart@poettering.net>2007-09-10 23:57:10 +0000
commit9b0ab39b1c443744bb7b09b03e62e51d78aab527 (patch)
tree8effaaa2c5359af33e64d0e764739904a46c358f /configure.ac
parent3d122d0fee2e3d853ea1a1de297b249f2c125f73 (diff)
unify static TLS support, make use of gcc __thread attribute if available
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1797 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c4f26c4e..7c8f3888 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,6 +118,18 @@ else
AC_MSG_RESULT([no])
fi
+AC_MSG_CHECKING([whether $CC knows __thread])
+AC_LANG_CONFTEST([static __thread int a = 6; int main() { a = 5; }])
+$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
+ret=$?
+rm -f conftest.o conftest
+if test $ret -eq 0 ; then
+ AC_DEFINE([HAVE_TLS_BUILTIN], 1, [Have __thread().])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
#### libtool stuff ####
AC_LTDL_ENABLE_INSTALL