File: check_clock_gettime.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 (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], :)
    ])
  ])
])