mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
A better way to check for __thread
This commit is contained in:
parent
05de98074a
commit
25f3b86230
21
configure.in
21
configure.in
@ -843,25 +843,10 @@ case "$PLATFORM" in
|
||||
esac
|
||||
|
||||
dnl Detect support for ISO syntax for thread-locals
|
||||
AC_CACHE_CHECK([for __thread], firebird_cv_gcc___thread,
|
||||
[cat > conftest.c <<\EOF
|
||||
__thread int a = 42;
|
||||
main() {
|
||||
a = a + 1;
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if AC_TRY_COMMAND([gcc -fPIC -o conftest conftest.c >&AS_MESSAGE_LOG_FD && ./conftest]); then
|
||||
firebird_cv_gcc___thread=yes
|
||||
else
|
||||
firebird_cv_gcc___thread=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[__thread int a = 42;]],[[a = a + 1;]])],
|
||||
AC_DEFINE(HAVE___THREAD, 1, [Define it if compiler supports ISO syntax for thread-local storage]),)
|
||||
|
||||
if test "$firebird_cv_gcc___thread" = yes; then
|
||||
AC_DEFINE(HAVE___THREAD, 1, [Define it if compiler supports ISO syntax for thread-local storage])
|
||||
fi
|
||||
|
||||
dnl ##################### DO NOT ADD ANY TESTS BELOW ###########################
|
||||
|
||||
AC_SUBST(SFIO_DIR)
|
||||
|
Loading…
Reference in New Issue
Block a user