mostang.com!davidm | 4ea5c42 | 2002-12-03 08:19:58 +0000 | [diff] [blame] | 1 | AC_DEFUN([LIBUNWIND___THREAD], |
| 2 | [dnl Check whether the compiler supports the __thread keyword. |
| 3 | if test "x$use__thread" != xno; then |
| 4 | AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread, |
| 5 | [cat > conftest.c <<\EOF |
| 6 | __thread int a = 42; |
| 7 | EOF |
| 8 | if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then |
| 9 | libc_cv_gcc___thread=yes |
| 10 | else |
| 11 | libc_cv_gcc___thread=no |
| 12 | fi |
| 13 | rm -f conftest*]) |
| 14 | if test "$libc_cv_gcc___thread" = yes; then |
| 15 | AC_DEFINE(HAVE___THREAD, 1, |
| 16 | [Define to 1 if __thread keyword is supported by the C compiler.]) |
| 17 | fi |
| 18 | else |
| 19 | libc_cv_gcc___thread=no |
| 20 | fi]) |