2 # Determine whether this system has infrastructure for obtaining the boot time.
4 # Copyright (C) 1996, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # GNULIB_BOOT_TIME([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
21 * ----------------------------------------------------------
22 AC_DEFUN([GNULIB_BOOT_TIME],
24 AC_CHECK_FUNCS(sysctl)
25 AC_CHECK_HEADERS_ONCE(sys/param.h)
26 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
29 #include <sys/param.h>
32 [whether we can get the system boot time],
33 [gnulib_cv_have_boot_time],
38 #if HAVE_SYSCTL && HAVE_SYS_SYSCTL_H
40 # include <sys/param.h> /* needed for OpenBSD 3.0 */
42 # include <sys/sysctl.h>
51 #if defined BOOT_TIME || (defined CTL_KERN && defined KERN_BOOTTIME)
52 /* your system *does* have the infrastructure to determine boot time */
54 please_tell_us_how_to_determine_boot_time_on_your_system
57 gnulib_cv_have_boot_time=yes,
58 gnulib_cv_have_boot_time=no)
60 AS_IF([test $gnulib_cv_have_boot_time = yes], [$1], [$2])