File: check_thread_local.m4

package info (click to toggle)
libfilezilla 0.54.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,504 kB
  • sloc: cpp: 31,105; sh: 4,241; makefile: 375; xml: 37
file content (24 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
dnl Checks for thread_local support

AC_DEFUN([CHECK_THREAD_LOCAL], [

  AC_LANG_PUSH(C++)

  AC_MSG_CHECKING([for thread_local])

  AC_COMPILE_IFELSE([
    AC_LANG_PROGRAM([[
    ]], [[
      thread_local static int foo = 0;
      (void)foo;
      return 0;
    ]])
  ], [
    AC_MSG_RESULT([yes])
  ], [
    AC_DEFINE([HAVE_NO_THREAD_LOCAL], [1], [Define if thread_local isn't supported])
    AC_MSG_RESULT([no])
  ])

  AC_LANG_POP(C++)
])