diff m4/timegm.m4 @ 4616:40e97ca1f46c

New module 'timegm'.
author Bruno Haible <bruno@clisp.org>
date Mon, 01 Sep 2003 17:47:35 +0000
parents
children 3d28ad4e18e2
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/m4/timegm.m4
@@ -0,0 +1,25 @@
+# timegm.m4 serial 1
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+AC_DEFUN([gl_FUNC_TIMEGM],
+[
+  AC_REPLACE_FUNCS(timegm)
+  if test $ac_cv_func_timegm = no; then
+    gl_PREREQ_TIMEGM
+  fi
+])
+
+# Prerequisites of lib/timegm.c.
+AC_DEFUN([gl_PREREQ_TIMEGM], [
+  AC_CHECK_DECLS(gmtime_r,,,[
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+])
+  AC_CHECK_FUNCS(gmtime_r)
+])