.
[coreutils.git] / m4 / uptime.m4
blobc616eaa85d72084a51d2405426987f26948fdad0
1 #serial 5
3 AC_PREREQ(2.13)
5 AC_DEFUN([jm_SYS_PROC_UPTIME],
6 [ dnl Require AC_PROG_CC to see if we're cross compiling.
7   AC_REQUIRE([AC_PROG_CC])
8   AC_CACHE_CHECK([for /proc/uptime], jm_cv_have_proc_uptime,
9   [jm_cv_have_proc_uptime=no
10     test -f /proc/uptime \
11       && test "$cross_compiling" = no \
12       && cat < /proc/uptime >/dev/null 2>/dev/null \
13       && jm_cv_have_proc_uptime=yes])
14   if test $jm_cv_have_proc_uptime = yes; then
15     AC_DEFINE(HAVE_PROC_UPTIME, 1,
16               [  Define if your system has the /proc/uptime special file.])
17   fi