* build-aux/config.guess: Update from config.
[gnulib.git] / m4 / mktime.m4
index a65a369..5faf393 100644 (file)
@@ -1,5 +1,5 @@
-#serial 9
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+#serial 13
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2007 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.
@@ -13,25 +13,14 @@ dnl From Jim Meyering.
 # AC_FUNC_MKTIME
 # --------------
 AC_DEFUN([AC_FUNC_MKTIME],
-[AC_REQUIRE([AC_HEADER_TIME])dnl
-AC_CHECK_HEADERS_ONCE(sys/time.h unistd.h)
+[AC_CHECK_HEADERS_ONCE(unistd.h)
 AC_CHECK_FUNCS_ONCE(alarm)
 AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime,
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
 [[/* Test program from Paul Eggert and Tony Leneis.  */
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
 #include <limits.h>
 #include <stdlib.h>
+#include <time.h>
 
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
@@ -222,7 +211,8 @@ fi
 
 AC_DEFUN([gl_FUNC_MKTIME],
 [
-  AC_REQUIRE([AC_FUNC_MKTIME])
+  AC_FUNC_MKTIME
+  dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ(mktime).
   if test $ac_cv_func_working_mktime = no; then
     AC_DEFINE(mktime, rpl_mktime,
       [Define to rpl_mktime if the replacement function should be used.])
@@ -231,4 +221,7 @@ AC_DEFUN([gl_FUNC_MKTIME],
 ])
 
 # Prerequisites of lib/mktime.c.
-AC_DEFUN([gl_PREREQ_MKTIME], [:])
+AC_DEFUN([gl_PREREQ_MKTIME],
+[
+  AC_REQUIRE([AC_C_INLINE])
+])