aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-14 15:15:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-14 15:15:23 +0200
commit09b5514511807701b2dd253f7f243117d6f0c139 (patch)
treeff067301972179c5245f51314215c99c5fc4cab1
parentdcb2cdd452e141806800edfa5c79057396bbcf57 (diff)
Update test
-rw-r--r--m4/threads.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/threads.m4 b/m4/threads.m4
index 7c32abe..ea547c0 100644
--- a/m4/threads.m4
+++ b/m4/threads.m4
@@ -5,6 +5,8 @@ dnl license : GNU GPL v2; see accompanying LICENSE file
dnl
AC_DEFUN([THREADS],[
+threads_thread_keyword=no
+
AC_ARG_ENABLE(
[threads],
AS_HELP_STRING([--disable-threads], [disable threads (enabled by default)]),
@@ -30,6 +32,24 @@ if test x$threads = xcheck; then
threads=posix
LIBS="$LIBS $PTHREAD_LIBS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS"
+
+ # Check if we can use the __thread keyword.
+ #
+ AC_MSG_CHECKING([for __thread keyword])
+
+ CXX_LIBTOOL_LINK_IFELSE(
+ AC_LANG_SOURCE([[
+ __thread int tls_var;
+
+ int
+ main ()
+ {
+ tls_var = 0;
+ }
+ ]]),
+ [threads_thread_keyword=yes])
+
+ AC_MSG_RESULT([$threads_thread_keyword])
fi
;;
esac