1 |
# mktime.m4 serial 5 |
#serial 7 |
2 |
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. |
3 |
dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
4 |
dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
5 |
dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
14 |
# -------------- |
# -------------- |
15 |
AC_DEFUN([AC_FUNC_MKTIME], |
AC_DEFUN([AC_FUNC_MKTIME], |
16 |
[AC_REQUIRE([AC_HEADER_TIME])dnl |
[AC_REQUIRE([AC_HEADER_TIME])dnl |
17 |
AC_CHECK_HEADERS(stdlib.h sys/time.h unistd.h) |
AC_CHECK_HEADERS_ONCE(sys/time.h) |
18 |
AC_CHECK_FUNCS(alarm) |
AC_CHECK_FUNCS_ONCE(alarm) |
19 |
AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, |
AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, |
20 |
[AC_RUN_IFELSE([AC_LANG_SOURCE( |
[AC_RUN_IFELSE([AC_LANG_SOURCE( |
21 |
[[/* Test program from Paul Eggert and Tony Leneis. */ |
[[/* Test program from Paul Eggert and Tony Leneis. */ |
30 |
# endif |
# endif |
31 |
#endif |
#endif |
32 |
|
|
33 |
#if HAVE_STDLIB_H |
#include <stdlib.h> |
34 |
# include <stdlib.h> |
#include <unistd.h> |
|
#endif |
|
|
|
|
|
#if HAVE_UNISTD_H |
|
|
# include <unistd.h> |
|
|
#endif |
|
35 |
|
|
36 |
#if !HAVE_ALARM |
#if !HAVE_ALARM |
37 |
# define alarm(X) /* empty */ |
# define alarm(X) /* empty */ |