xref: /freebsd/sys/contrib/openzfs/config/user-clock_gettime.m4 (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
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