| 1 |
# timegm.m4 |
| 2 |
# serial 16 |
| 3 |
dnl Copyright (C) 2003, 2007, 2009-2024 Free Software Foundation, Inc. |
| 4 |
dnl This file is free software; the Free Software Foundation |
| 5 |
dnl gives unlimited permission to copy and/or distribute it, |
| 6 |
dnl with or without modifications, as long as this notice is preserved. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
AC_DEFUN([gl_FUNC_TIMEGM], |
| 10 |
[ |
| 11 |
AC_REQUIRE([gl_TIME_H_DEFAULTS]) |
| 12 |
AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) |
| 13 |
gl_CHECK_FUNCS_ANDROID([timegm], [[#include <time.h>]]) |
| 14 |
if test $ac_cv_func_timegm = yes; then |
| 15 |
if test "$gl_cv_func_working_mktime" != yes; then |
| 16 |
# Assume that timegm is buggy if mktime is. |
| 17 |
REPLACE_TIMEGM=1 |
| 18 |
fi |
| 19 |
else |
| 20 |
HAVE_TIMEGM=0 |
| 21 |
case "$gl_cv_onwards_func_timegm" in |
| 22 |
future*) REPLACE_TIMEGM=1 ;; |
| 23 |
esac |
| 24 |
fi |
| 25 |
]) |
| 26 |
|
| 27 |
# Prerequisites of lib/timegm.c. |
| 28 |
AC_DEFUN([gl_PREREQ_TIMEGM], [ |
| 29 |
: |
| 30 |
]) |