summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2016-03-28 21:51:57 +0200
committerMurray Cumming <murrayc@murrayc.com>2016-03-28 21:51:57 +0200
commitcdfdb3d916ee9b03465b2fe2f85b9953d14d944d (patch)
treec5d9a5d6593b299e849190a0a1f33685a3e1023c /build
parent63c9c986ceb1e66c418f5863d74f078f0ec567ed (diff)
downloadglibmm-cdfdb3d916ee9b03465b2fe2f85b9953d14d944d.tar.gz
Move thread_local check into a GLIBMM_CXX_* macro, like other checks.
Bug #759791
Diffstat (limited to 'build')
-rw-r--r--build/cxx.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/build/cxx.m4 b/build/cxx.m4
index 22d24356..58e4f85e 100644
--- a/build/cxx.m4
+++ b/build/cxx.m4
@@ -236,3 +236,24 @@ AS_VAR_IF([glibmm_cv_cxx_can_use_namespaces_inside_externc], ['yes'],
[AC_DEFINE([GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC], [1],
[Define if the compiler honors namespaces inside extern "C" blocks.])])[]dnl
])
+
+## GLIBMM_CXX_CAN_USE_THREAD_LOCAL
+##
+## Check for thread_local support
+##
+AC_DEFUN([GLIBMM_CXX_CAN_USE_THREAD_LOCAL],
+[dnl
+AC_CACHE_CHECK(
+ [whether the thread_local keyword is supported],
+ [glibmm_cv_cxx_can_use_thread_local],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[
+thread_local int i=0;
+]], [])],
+ [glibmm_cv_cxx_can_use_thread_local=yes],
+ [glibmm_cv_cxx_can_use_thread_local=no])])
+
+AS_VAR_IF([glibmm_cv_cxx_can_use_thread_local], ['yes'],
+ [AC_DEFINE([GLIBMM_CAN_USE_THREAD_LOCAL], [1],
+ [Define if the thread_local keyword is supported.])])[]dnl
+])