Commit 7494e42d authored by Eddie Kohler's avatar Eddie Kohler

Add configuration check for __thread storage class.

parent f61f9d71
......@@ -2,6 +2,9 @@
#ifndef CLICK_CONFIG_USERLEVEL_H
#define CLICK_CONFIG_USERLEVEL_H
/* Define if you have the __thread storage class specifier. */
#undef HAVE___THREAD_STORAGE_CLASS
/* Define if accept() uses socklen_t. */
#undef HAVE_ACCEPT_SOCKLEN_T
......
......@@ -7565,6 +7565,37 @@ $as_echo "#define HAVE___HAS_TRIVIAL_COPY 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread storage class support" >&5
$as_echo_n "checking for __thread storage class support... " >&6; }
if ${ac_cv_have___thread+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__thread long x;
int
main ()
{
x == 1;
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_have___thread=yes
else
ac_cv_have___thread=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___thread" >&5
$as_echo "$ac_cv_have___thread" >&6; }
if test $ac_cv_have___thread = yes; then
$as_echo "#define HAVE___THREAD_STORAGE_CLASS 1" >>confdefs.h
fi
for ac_header in strings.h
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
......
......@@ -733,6 +733,12 @@ AC_DEFUN([CLICK_CHECK_COMPILER_INTRINSICS], [
AC_DEFINE([HAVE___HAS_TRIVIAL_COPY], [1], [Define if you have the __has_trivial_copy compiler intrinsic.])
fi
AC_CACHE_CHECK([for __thread storage class support], [ac_cv_have___thread],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[__thread long x;]], [[x == 1;]])], [ac_cv_have___thread=yes], [ac_cv_have___thread=no])])
if test $ac_cv_have___thread = yes; then
AC_DEFINE([HAVE___THREAD_STORAGE_CLASS], [1], [Define if you have the __thread storage class specifier.])
fi
AC_CHECK_HEADERS(strings.h)
AC_CHECK_FUNCS(ffs ffsl ffsll)
])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment