[giggle] The AC_FUNC_MKTIME macro is obsolescent.



commit f9a5a6ae403d9ffc75b5d741c03fa5dbc3acf707
Author: Javier Jardón <jjardon gnome org>
Date:   Mon Jul 29 14:14:34 2013 +0100

    The AC_FUNC_MKTIME macro is obsolescent.
    
    New programs should use Gnulib's mktime module.

 configure.ac       |    1 -
 m4/.gitignore      |    9 +++++++++
 m4/gnulib-cache.m4 |    3 ++-
 m4/gnulib-comp.m4  |   43 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 54 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 249c6bf..996c3d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,7 +38,6 @@ AC_CHECK_HEADERS([fcntl.h locale.h stdlib.h string.h unistd.h])
 AC_C_INLINE
 
 # Checks for library functions.
-AC_FUNC_MKTIME
 AC_CHECK_FUNCS([strptime])
 
 
diff --git a/m4/.gitignore b/m4/.gitignore
index bcbbf98..2aff629 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -5,3 +5,12 @@ ltsugar.m4
 ltversion.m4
 lt~obsolete.m4
 /gnulib-comp.m4
+/extensions.m4
+/include_next.m4
+/mktime.m4
+/multiarch.m4
+/stddef_h.m4
+/time_h.m4
+/time_r.m4
+/warn-on-use.m4
+/wchar_t.m4
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index be9a10a..46f9e87 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -27,12 +27,13 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc 
--tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl 
manywarnings
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc 
--tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl 
manywarnings mktime
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
 gl_MODULES([
   manywarnings
+  mktime
 ])
 gl_AVOID([])
 gl_SOURCE_BASE([lib])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 9a09184..b160368 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -38,7 +38,18 @@ AC_DEFUN([gl_EARLY],
   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
   AC_REQUIRE([gl_PROG_AR_RANLIB])
+  # Code from module extensions:
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  # Code from module include_next:
   # Code from module manywarnings:
+  # Code from module mktime:
+  # Code from module multiarch:
+  # Code from module snippet/arg-nonnull:
+  # Code from module snippet/c++defs:
+  # Code from module snippet/warn-on-use:
+  # Code from module stddef:
+  # Code from module time:
+  # Code from module time_r:
   # Code from module warnings:
 ])
 
@@ -58,6 +69,21 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([gl_LIBSOURCES_DIR], [])
   gl_COMMON
   gl_source_base='lib'
+  gl_FUNC_MKTIME
+  if test $REPLACE_MKTIME = 1; then
+    AC_LIBOBJ([mktime])
+    gl_PREREQ_MKTIME
+  fi
+  gl_TIME_MODULE_INDICATOR([mktime])
+  gl_MULTIARCH
+  gl_STDDEF_H
+  gl_HEADER_TIME_H
+  gl_TIME_R
+  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
+    AC_LIBOBJ([time_r])
+    gl_PREREQ_TIME_R
+  fi
+  gl_TIME_MODULE_INDICATOR([time_r])
   # End of code from modules
   m4_ifval(gl_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -198,9 +224,26 @@ AC_DEFUN([gltests_LIBSOURCES], [
 # This macro records the list of files which have been installed by
 # gnulib-tool and may be removed by future gnulib-tool invocations.
 AC_DEFUN([gl_FILE_LIST], [
+  build-aux/snippet/arg-nonnull.h
+  build-aux/snippet/c++defs.h
+  build-aux/snippet/warn-on-use.h
   lib/dummy.c
+  lib/mktime-internal.h
+  lib/mktime.c
+  lib/stddef.in.h
+  lib/time.in.h
+  lib/time_r.c
   m4/00gnulib.m4
+  m4/extensions.m4
   m4/gnulib-common.m4
+  m4/include_next.m4
   m4/manywarnings.m4
+  m4/mktime.m4
+  m4/multiarch.m4
+  m4/stddef_h.m4
+  m4/time_h.m4
+  m4/time_r.m4
+  m4/warn-on-use.m4
   m4/warnings.m4
+  m4/wchar_t.m4
 ])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]