From b14a87691f42be83691861b97a2f410c25c9c4bb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 30 Sep 2011 13:58:29 -0400 Subject: Add a getrusage() implementation of dmnsn_get_times(). --- configure.ac | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 06e9b0a..d763041 100644 --- a/configure.ac +++ b/configure.ac @@ -145,6 +145,27 @@ AC_COMPILE_IFELSE([ AC_MSG_RESULT([no])] ) +AC_MSG_CHECKING([for getrusage()]) +AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [ + #include + #include + #include + ], + [ + struct timeval real; + gettimeofday(&real, NULL); + struct rusage usage; + getrusage(RUSAGE_SELF, &usage); + ] + )], + [AC_DEFINE([DMNSN_GETRUSAGE], [1]) + AC_MSG_RESULT([yes])], + [AC_DEFINE([DMNSN_GETRUSAGE], [0]) + AC_MSG_RESULT([no])] +) + AC_MSG_CHECKING([for times()]) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( -- cgit v1.2.3