Use AM_FUNC_MKTIME, now that it's up to date.
[gnulib.git] / m4 / jm-mktime.m4
1 #serial 3
2
3 dnl From Jim Meyering.
4 dnl If you use this macro in a package, you should
5 dnl add the following two lines to acconfig.h:
6 dnl   /* Define to rpl_mktime if the replacement function should be used.  */
7 dnl   #undef mktime
8 dnl
9 AC_DEFUN(jm_FUNC_MKTIME,
10 [AC_REQUIRE([AM_FUNC_MKTIME])dnl
11
12  dnl mktime.c uses localtime_r if it exists.  Check for it.
13  AC_CHECK_FUNCS(localtime_r)
14
15  if test $jm_am_cv_func_working_mktime = no; then
16    AC_DEFINE_UNQUOTED(mktime, rpl_mktime)
17  fi
18 ])