Remove the dependency of the strftime module on the tzset module.
[gnulib.git] / m4 / strftime.m4
1 #serial 25
2
3 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4 # Free Software Foundation, Inc.
5 #
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # Written by Jim Meyering and Paul Eggert.
11
12 AC_DEFUN([gl_FUNC_GNU_STRFTIME],
13 [AC_REQUIRE([gl_FUNC_STRFTIME])dnl
14  AC_REQUIRE([AC_C_CONST])dnl
15 ])
16
17 # These are the prerequisite macros for GNU's strftime.c replacement.
18 AC_DEFUN([gl_FUNC_STRFTIME],
19 [
20  AC_LIBSOURCES([strftime.c, strftime.h])
21  AC_LIBOBJ([strftime])
22
23  # strftime.c uses the underyling system strftime if it exists.
24  AC_REQUIRE([AC_FUNC_STRFTIME])
25
26  # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
27  AC_REQUIRE([AC_STRUCT_TIMEZONE])
28
29  AC_REQUIRE([AC_HEADER_TIME])
30  AC_REQUIRE([AC_TYPE_MBSTATE_T])
31  AC_REQUIRE([gl_TM_GMTOFF])
32
33  AC_CHECK_FUNCS_ONCE(mblen mbrlen mempcpy tzset)
34  AC_CHECK_HEADERS_ONCE(sys/time.h wchar.h)
35
36  AC_DEFINE([my_strftime], [nstrftime],
37    [Define to the name of the strftime replacement function.])
38 ])