blob: 3f03b1e0c4a72ce6d366c320f5ef136bd0c2360c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
dnl From Jim Meyering.
dnl FIXME: this should migrate into libit.
AC_DEFUN(AM_FUNC_MKTIME,
[AC_REQUIRE([AC_HEADER_TIME])dnl
AC_CHECK_HEADERS(sys/time.h)
AC_CACHE_CHECK([for working mktime], am_cv_func_working_mktime,
[AC_TRY_RUN([/* Test program from Tony Leneis (tony@plaza.ds.adp.com). */
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
int
main ()
{
time_t today = time (0);
struct tm *local = localtime (&today);
exit (mktime (local) != today);
}
],
am_cv_func_working_mktime=yes, am_cv_func_working_mktime=no,
dnl When crosscompiling, assume mktime is missing or broken.
am_cv_func_working_mktime=no)
])
if test $am_cv_func_working_mktime = no; then
LIBOBJS="$LIBOBJS mktime.o"
fi
])
|