.
[coreutils.git] / m4 / uptime.m4
blob5df098c7f1528e0a85f0410627d27a6bb2cae3c6
1 #serial 1
3 AC_DEFUN(jm_SYS_PROC_UPTIME,
4 [ dnl Require AC_PROG_CC to see if we're cross compiling.
5   AC_REQUIRE([AC_PROG_CC])
6   AC_CACHE_CHECK([for /proc/uptime], jm_cv_have_proc_uptime,
7   [jm_cv_have_proc_uptime=no
8     test -f /proc/uptime \
9       && test $ac_cv_prog_cc_cross = no \
10       && cat < /proc/uptime >/dev/null 2>/dev/null \
11       && jm_cv_have_proc_uptime=yes])
12   if test $jm_cv_have_proc_uptime = yes; then
13     AC_DEFINE(HAVE_PROC_UPTIME)
14   fi