3 # Copyright (C) 1996, 1999-2001, 2004, 2009-2017 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
10 AC_DEFUN([gl_SYS_PROC_UPTIME],
11 [ dnl Require AC_PROG_CC to see if we're cross compiling.
12 AC_REQUIRE([AC_PROG_CC])
13 AC_CACHE_CHECK([for /proc/uptime], [gl_cv_have_proc_uptime],
14 [gl_cv_have_proc_uptime=no
15 test -f /proc/uptime \
16 && test "$cross_compiling" = no \
17 && cat < /proc/uptime >/dev/null 2>/dev/null \
18 && gl_cv_have_proc_uptime=yes])
19 if test $gl_cv_have_proc_uptime = yes; then
20 AC_DEFINE([HAVE_PROC_UPTIME], [1],
21 [ Define if your system has the /proc/uptime special file.])