Imported Upstream version 1.3.14
[debian/gzip] / m4 / time_h.m4
index e90ed7ac374315f6811d4c4901e746188037d16b..16fefa19749450385b5b3066bb9a49160721518e 100644 (file)
@@ -1,7 +1,6 @@
 # Configure a more-standard replacement for <time.h>.
 
-# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,9 +19,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
 [
   AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
-  gl_ABSOLUTE_HEADER([time.h])
-  ABSOLUTE_TIME_H=\"$gl_cv_absolute_time_h\"
-  AC_SUBST([ABSOLUTE_TIME_H])
+  gl_CHECK_NEXT_HEADERS([time.h])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 ])
 
@@ -32,6 +29,7 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
   dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
   dnl this lets maintainers check for portability.
   REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;  AC_SUBST([REPLACE_LOCALTIME_R])
+  REPLACE_MKTIME=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_MKTIME])
   REPLACE_NANOSLEEP=GNULIB_PORTCHECK;    AC_SUBST([REPLACE_NANOSLEEP])
   REPLACE_STRPTIME=GNULIB_PORTCHECK;     AC_SUBST([REPLACE_STRPTIME])
   REPLACE_TIMEGM=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_TIMEGM])
@@ -67,7 +65,7 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
            [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
         [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
         [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
-    if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
       SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
     fi
   fi