- irix_6_4_bug ();
- exit (0);
-}
- >>,
-changequote([, ])dnl
- jm_am_cv_func_working_mktime=yes, jm_am_cv_func_working_mktime=no,
- dnl When crosscompiling, assume mktime is missing or broken.
- jm_am_cv_func_working_mktime=no)
- ])
- if test $jm_am_cv_func_working_mktime = no; then
- LIBOBJS="$LIBOBJS mktime.o"
+ if (! irix_6_4_bug ())
+ result |= 16;
+ if (! spring_forward_gap ())
+ result |= 32;
+ if (! year_2050_test ())
+ result |= 64;
+ return result;
+}]])],
+ [ac_cv_func_working_mktime=yes],
+ [ac_cv_func_working_mktime=no],
+ [ac_cv_func_working_mktime=no])])
+if test $ac_cv_func_working_mktime = no; then
+ AC_LIBOBJ([mktime])
+fi
+])# AC_FUNC_MKTIME
+
+AC_DEFUN([gl_FUNC_MKTIME],
+[
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ AC_FUNC_MKTIME
+ dnl Note: AC_FUNC_MKTIME does AC_LIBOBJ([mktime]).
+ if test $ac_cv_func_working_mktime = no; then
+ REPLACE_MKTIME=1
+ gl_PREREQ_MKTIME
+ else
+ REPLACE_MKTIME=0
+ fi
+])
+
+AC_DEFUN([gl_FUNC_MKTIME_INTERNAL], [
+ AC_REQUIRE([gl_FUNC_MKTIME])
+ if test $REPLACE_MKTIME = 0; then
+ dnl BeOS has __mktime_internal in libc, but other platforms don't.
+ AC_CHECK_FUNC([__mktime_internal],
+ [AC_DEFINE([mktime_internal], [__mktime_internal],
+ [Define to the real name of the mktime_internal function.])
+ ],
+ [dnl mktime works but it doesn't export __mktime_internal,
+ dnl so we need to substitute our own mktime implementation.
+ REPLACE_MKTIME=1
+ AC_LIBOBJ([mktime])
+ gl_PREREQ_MKTIME
+ ])