2 # Checks required to run `timevar', a time tracker.
4 # Copyright (C) 2002-2003, 2009-2015, 2018 Free Software Foundation,
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 AC_DEFUN([gl_TIMEVAR],
23 [AC_CHECK_HEADERS([sys/time.h sys/times.h])
24 AC_CHECK_HEADERS([sys/resource.h],,,
27 # include <sys/time.h>
29 #ifdef HAVE_SYS_TIMES_H
30 # include <sys/times.h>
33 AC_CHECK_FUNCS([times])
35 AC_CHECK_DECLS([getrusage, times, clock, sysconf], [], [],
38 # include <sys/time.h>
41 # include <sys/times.h>
43 #if HAVE_SYS_RESOURCE_H
44 # include <sys/resource.h>
48 AC_CHECK_TYPES([clock_t, struct tms], [], [],
51 # include <sys/time.h>
54 # include <sys/times.h>
56 #if HAVE_SYS_RESOURCE_H
57 # include <sys/resource.h>