xref: /freebsd/sys/contrib/openzfs/config/user-clock_gettime.m4 (revision 2a63c3be158216222d89a073dcbd6a72ee4aab5a)
1dnl #
2dnl # Check if librt is required for clock_gettime.
3dnl # clock_gettime is generally available in libc on modern systems.
4dnl #
5AC_DEFUN([ZFS_AC_CONFIG_USER_CLOCK_GETTIME], [
6	AC_CHECK_FUNC([clock_gettime], [], [
7	    AC_CHECK_LIB([rt], [clock_gettime], [
8		AC_SUBST([LIBCLOCK_GETTIME], [-lrt])], [
9		AC_MSG_FAILURE([*** clock_gettime is missing in libc and librt])
10	    ])
11	])
12])
13