e28224d68defb44463de79ce02089e16afe91e8f
[gnulib.git] / m4 / strftime.m4
1 #serial 23
2
3 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004
4 # Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 # Written by Jim Meyering and Paul Eggert.
21
22 AC_DEFUN([gl_FUNC_GNU_STRFTIME],
23 [AC_REQUIRE([gl_FUNC_STRFTIME])dnl
24  AC_REQUIRE([AC_C_CONST])dnl
25 ])
26
27 # These are the prerequisite macros for GNU's strftime.c replacement.
28 AC_DEFUN([gl_FUNC_STRFTIME],
29 [
30  # strftime.c uses the underyling system strftime if it exists.
31  AC_REQUIRE([AC_FUNC_STRFTIME])
32
33  # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
34  AC_REQUIRE([AC_STRUCT_TIMEZONE])
35
36  AC_REQUIRE([AC_HEADER_TIME])
37  AC_REQUIRE([AC_TYPE_MBSTATE_T])
38  AC_REQUIRE([gl_TM_GMTOFF])
39  AC_REQUIRE([gl_FUNC_TZSET_CLOBBER])
40
41  AC_CHECK_FUNCS_ONCE(mblen mbrlen mempcpy tzset)
42  AC_CHECK_HEADERS_ONCE(sys/time.h wchar.h)
43
44  AC_DEFINE([my_strftime], [nstrftime],
45    [Define to the name of the strftime replacement function.])
46 ])