times: Update after sys_times changed.
authorBruno Haible <bruno@clisp.org>
Thu, 31 Dec 2009 20:31:35 +0000 (21:31 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 31 Dec 2009 20:31:35 +0000 (21:31 +0100)
ChangeLog
m4/times.m4 [new file with mode: 0644]
modules/times

index 78d2a5ce5f90747d960aeedae07813e83f3632fd..348b309f044794ddb498cd38cff95e9010deba20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-31  Bruno Haible  <bruno@clisp.org>
+
+       times: Update after sys_times changed.
+       * m4/times.m4: New file, extracted from modules/times. Set HAVE_TIMES.
+       * modules/times (Files): Add it.
+       (configure.ac): Invoke gl_FUNC_TIMES.
+
 2009-12-31  Bruno Haible  <bruno@clisp.org>
 
        Use AC_C_INLINE where necessary.
diff --git a/m4/times.m4 b/m4/times.m4
new file mode 100644 (file)
index 0000000..a3d1b95
--- /dev/null
@@ -0,0 +1,15 @@
+# times.m4 serial 1
+dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_TIMES],
+[
+  AC_REQUIRE([gl_SYS_TIMES_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([times])
+  if test $ac_cv_func_times = no; then
+    HAVE_TIMES=0
+    AC_LIBOBJ([times])
+  fi
+])
index b34bf396be97e9f97adf5e65f8a6e81d17942134..dad7eb9b7ba7e408da475c5bafff9963a0fdbde6 100644 (file)
@@ -3,15 +3,13 @@ times() function: get process times
 
 Files:
 lib/times.c
+m4/times.m4
 
 Depends-on:
 sys_times
 
 configure.ac:
-AC_CHECK_FUNCS_ONCE([times])
-if test $ac_cv_func_times = no; then
-  AC_LIBOBJ([times])
-fi
+gl_FUNC_TIMES
 gl_SYS_TIMES_MODULE_INDICATOR([times])
 
 Makefile.am: