strftime.m4 revision 1.1.1.1
1#serial 17 2 3dnl This macro is intended to be used solely in this file. 4dnl These are the prerequisite macros for GNU's strftime.c replacement. 5AC_DEFUN([_jm_STRFTIME_PREREQS], 6[ 7 dnl strftime.c uses localtime_r and the underyling system strftime 8 dnl if they exist. 9 AC_CHECK_FUNCS(localtime_r strftime) 10 11 AC_CHECK_HEADERS(limits.h) 12 AC_CHECK_FUNCS(bcopy tzset mempcpy memcpy memset) 13 14 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. 15 AC_STRUCT_TIMEZONE 16 17 AC_CHECK_FUNCS(mblen mbrlen) 18 19 AC_CHECK_MEMBER([struct tm.tm_gmtoff], 20 [AC_DEFINE(HAVE_TM_GMTOFF, 1, 21 [Define if struct tm has the tm_gmtoff member.])], 22 , 23 [#include <time.h>]) 24]) 25 26dnl From Jim Meyering. 27dnl 28AC_DEFUN([jm_FUNC_GNU_STRFTIME], 29[AC_REQUIRE([AC_HEADER_TIME])dnl 30 31 _jm_STRFTIME_PREREQS 32 33 AC_REQUIRE([AC_C_CONST])dnl 34 AC_REQUIRE([AC_HEADER_STDC])dnl 35 AC_CHECK_HEADERS(sys/time.h) 36 AC_DEFINE([my_strftime], [nstrftime], 37 [Define to the name of the strftime replacement function.]) 38]) 39 40AC_DEFUN([jm_FUNC_STRFTIME], 41[ 42 _jm_STRFTIME_PREREQS 43]) 44