File: check_thread_local.m4

package info (click to toggle)
filezilla 3.69.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,768 kB
  • sloc: cpp: 97,621; ansic: 54,984; sh: 5,225; makefile: 2,080; xml: 375
file content (24 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (5)
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_MSG_RESULT([no])
    AC_MSG_ERROR([Compiler support for the thread_local keyword is required.])
  ])

  AC_LANG_POP(C++)
])