File: check_clock_gettime.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 (25 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Checks whether clock_gettime is available.
# Defines HAVE_CLOCK_GETTIME if it is.	
#
# CHECK_CLOCK_GETTIME([ACTION-SUCCESS], [ACTION-FAILURE])

AC_DEFUN([CHECK_CLOCK_GETTIME],
[
    AC_MSG_CHECKING([for clock_gettime])
    AC_LINK_IFELSE([
      AC_LANG_PROGRAM([[
         #include <time.h>
       ]], [[
	 (void)clock_gettime;
         return 0;
      ]])
    ], [
      AC_MSG_RESULT([yes])
      AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [clock_gettime can be used])
      m4_default([$1], :)
    ], [
      AC_MSG_RESULT([no])
      m4_default([$2], :)
    ])
  ])
])