diff options
author | Austin Seipp <austin@well-typed.com> | 2014-01-28 05:44:44 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-01-28 05:44:44 -0600 |
commit | f9652e22da592ec0689b4919c003c67dacf28d31 (patch) | |
tree | 54e1db6ef3ce250dc11718adffc5cea47fc186d2 /configure.ac | |
parent | db9baf08d0ddf110037a155c8dcf78f392cfa0f5 (diff) | |
download | haskell-f9652e22da592ec0689b4919c003c67dacf28d31.tar.gz |
Check for __thread in ./configure.ac
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 744cebdf3c..cb411f3f19 100644 --- a/configure.ac +++ b/configure.ac @@ -861,7 +861,21 @@ dnl ** check for eventfd which is needed by the I/O manager AC_CHECK_HEADERS([sys/eventfd.h]) AC_CHECK_FUNCS([eventfd]) -# checking for PAPI +dnl ** Check for __thread support in the compiler +AC_MSG_CHECKING(for __thread support) +AC_COMPILE_IFELSE( + [ AC_LANG_SOURCE([[__thread int tester = 0;]]) ], + [ + AC_MSG_RESULT(yes) + AC_DEFINE([CC_SUPPORTS_TLS],[0],[Define to 1 if __thread is supported]) + ], + [ + AC_MSG_RESULT(no) + AC_DEFINE([CC_SUPPORTS_TLS],[1],[Define to 1 if __thread is supported]) + ]) + + +dnl ** checking for PAPI AC_CHECK_LIB(papi, PAPI_library_init, HavePapiLib=YES, HavePapiLib=NO) AC_CHECK_HEADER([papi.h], [HavePapiHeader=YES], [HavePapiHeader=NO]) AC_SUBST(HavePapiLib) |