From daf3e8b97d09d85d51eac34b9d5acf4545d03a2d Mon Sep 17 00:00:00 2001 From: Diego 'Flameeyes' Pettenò Date: Fri, 8 Aug 2008 14:03:54 +0200 Subject: Create a new macro for checking compiler support for TLS. Create a new macro that can be shared between projects to check for __thread support by the compiler. This macro might come useful for xine-lib too so I want to keep it separate for easier importing it over. Name the defined macro SUPPORT_TLS___THREAD to follow the same style as the checks from attributes.m4. --- configure.ac | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f56be997..7c9da77c 100644 --- a/configure.ac +++ b/configure.ac @@ -199,17 +199,7 @@ else esac 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 +CC_CHECK_TLS AC_MSG_CHECKING([whether $CC knows _Bool]) AC_LANG_CONFTEST([int main() { _Bool b; }]) -- cgit