immutable: Add tests.
[gnulib.git] / m4 / timespec_get.m4
bloba4a3b78b81d10c6a2af89df5f1b43858f2f4a7f3
1 # timespec_get.m4 serial 1
2 dnl Copyright (C) 2021 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_FUNC_TIMESPEC_GET],
9   AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
11   dnl Persuade OpenBSD <time.h> to declare timespec_get().
12   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
14   AC_CHECK_FUNCS_ONCE([timespec_get])
15   if test $ac_cv_func_timespec_get != yes; then
16     HAVE_TIMESPEC_GET=0
17   fi