AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007-08-05

(C) 2007 guidod
Download the M4 Source.

ax_check_tls_support

Back to the Main Page.

Synopsis
AX_CHECK_TLS_SUPPORT
, 
Version

2005

Author

Guido U. Draheim

Category

guidod's C Support (released)

Documentation

Check whether operating system is assumed to support tls registers. The compiler will allow for the __thread keyword to assemble global variables into a per-thread stack block. That data block must be declared specifically in a binary / shared library export table to be copied on thread creation. - Defiens HAVE_TLS_SUPPORT if yes.

Implementation note: we do currently just check the compiler version of a compiler/platform combination that is known to be good. There is no generic check at the moment. Someone?

M4 Source Code
AC_DEFUN([AX_CHECK_TLS_SUPPORT],[
AC_MSG_CHECKING(tls support)
AC_CACHE_VAL([ac_cv_have_tls_support],[
case "$GCC_VERSION,$host" in
    2.*,*) ac_cv_have_tls_support="no" ;;
    3.0,*) ac_cv_have_tls_support="no" ;;
    3.*,*linux*) ac_cv_have_tls_suport="yes" ;;
    *)  ac_cv_have_tls_support="unkown (no)" ;;
esac])
AC_MSG_RESULT([$ac_cv_tls_support])
if test ".$ac_cv_have_tls_support" = ".yes" ; then
AC_DEFINE([HAVE_TLS_SUPPORT], [1], 
      [whether operating system is assumed to support tls registers])
fi
])