2002-12-03 09:19:58 +01:00
|
|
|
AC_DEFUN([LIBUNWIND___THREAD],
|
|
|
|
[dnl Check whether the compiler supports the __thread keyword.
|
2003-09-24 23:51:53 +02:00
|
|
|
if test "x$enable___thread" != xno; then
|
2002-12-03 09:19:58 +01:00
|
|
|
AC_CACHE_CHECK([for __thread], libc_cv_gcc___thread,
|
|
|
|
[cat > conftest.c <<\EOF
|
|
|
|
__thread int a = 42;
|
|
|
|
EOF
|
|
|
|
if AC_TRY_COMMAND([${CC-cc} $CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
|
|
|
|
libc_cv_gcc___thread=yes
|
|
|
|
else
|
|
|
|
libc_cv_gcc___thread=no
|
|
|
|
fi
|
|
|
|
rm -f conftest*])
|
|
|
|
if test "$libc_cv_gcc___thread" = yes; then
|
|
|
|
AC_DEFINE(HAVE___THREAD, 1,
|
|
|
|
[Define to 1 if __thread keyword is supported by the C compiler.])
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
libc_cv_gcc___thread=no
|
|
|
|
fi])
|
2003-11-24 22:37:22 +01:00
|
|
|
|
|
|
|
AC_DEFUN([CHECK_ATOMIC_OPS],
|
|
|
|
[dnl Check whether the system has the atomic_ops package installed.
|
|
|
|
AC_CHECK_HEADERS(atomic_ops.h)
|
|
|
|
AC_CHECK_LIB(atomic_ops, main)
|
|
|
|
])
|