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
This commit is contained in:
Lennart Poettering 2007-09-10 23:57:10 +00:00
parent 3d122d0fee
commit 9b0ab39b1c
7 changed files with 59 additions and 32 deletions

View file

@ -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