Work around another bug in Ultrix4.3a's /bin/sh.
[coreutils.git] / m4 / jm-mktime.m4
blob73d53b29c5155ed4774e0153b645d93d1a47795e
1 #serial 3
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
12  dnl mktime.c uses localtime_r if it exists.  Check for it.
13  AC_CHECK_FUNCS(localtime_r)
15  if test $am_cv_func_working_mktime = no; then
16    AC_DEFINE_UNQUOTED(mktime, rpl_mktime)
17  fi