1 # Determine whether this system has infrastructure for obtaining the boot time.
3 # GNULIB_BOOT_TIME([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
4 * ----------------------------------------------------------
5 AC_DEFUN([GNULIB_BOOT_TIME],
8 AC_CHECK_HEADERS(sys/sysctl.h)
10 [whether we can get the system boot time],
11 [gnulib_cv_have_boot_time],
16 #if HAVE_SYSCTL && HAVE_SYS_SYSCTL_H
17 # include <sys/param.h> /* needed for OpenBSD 3.0 */
18 # include <sys/sysctl.h>
27 #if defined BOOT_TIME || (defined CTL_KERN && defined KERN_BOOTTIME)
28 /* your system *does* have the infrastructure to determine boot time */
30 please_tell_us_how_to_determine_boot_time_on_your_system
33 gnulib_cv_have_boot_time=yes,
34 gnulib_cv_have_boot_time=no)
36 AS_IF([test $gnulib_cv_have_boot_time = yes], [$1], [$2])