File: acinclude.m4

package info (click to toggle)
xlog 2.0.14-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 16,416 kB
  • ctags: 1,251
  • sloc: ansic: 23,190; sh: 4,455; makefile: 765; sed: 16; xml: 8
file content (32 lines) | stat: -rw-r--r-- 790 bytes parent folder | download | duplicates (6)
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
dnl
dnl This macro checks that the function strptime exists and that
dnl it is declared in the time.h header.
dnl
dnl Here is an example of its use:
dnl
dnl strptime.c replacement:
dnl
dnl #ifndef HAVE_STRPTIME
dnl ....
dnl #endif /* HAVE_STRPTIME */
dnl
dnl In sources using strptime
dnl
dnl #ifndef HAVE_STRPTIME_DECL
dnl extern char *strptime(const char *__s, const char *__fmt, struct tm *__tp);
dnl #endif /* HAVE_STRPTIME_DECL */
dnl
dnl @author Loic Dachary <loic@senga.org>
dnl @version 1.0
dnl

AC_DEFUN([AC_FUNC_STRPTIME], [
AC_CHECK_FUNCS(strptime)
AC_MSG_CHECKING(for strptime declaration in time.h)
AC_EGREP_HEADER(strptime, time.h, [
 AC_DEFINE([HAVE_STRPTIME_DECL],,[Define if the function strptime is declared in <time.h>])
 AC_MSG_RESULT(yes)
], [
 AC_MSG_RESULT(no)
])
])