~ubuntu-branches/ubuntu/maverick/texinfo/maverick

« back to all changes in this revision

Viewing changes to m4/check-decl.m4

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2005-10-28 15:10:30 UTC
  • mto: (2.1.1 dapper) (3.1.4 hardy)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051028151030-9nsf2s2k2z3fktjt
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#serial 20
 
2
 
 
3
dnl This is just a wrapper function to encapsulate this kludge.
 
4
dnl Putting it in a separate file like this helps share it between
 
5
dnl different packages.
 
6
AC_DEFUN([gl_CHECK_DECLS],
 
7
[
 
8
  AC_REQUIRE([_gl_DECL_HEADERS])
 
9
  AC_REQUIRE([AC_HEADER_TIME])
 
10
  headers='
 
11
#include <stdio.h>
 
12
#include <string.h>
 
13
#include <stdlib.h>
 
14
 
 
15
#if HAVE_UNISTD_H
 
16
# include <unistd.h>
 
17
#endif
 
18
 
 
19
#include <sys/types.h>
 
20
#if TIME_WITH_SYS_TIME
 
21
# include <sys/time.h>
 
22
# include <time.h>
 
23
#else
 
24
# if HAVE_SYS_TIME_H
 
25
#  include <sys/time.h>
 
26
# else
 
27
#  include <time.h>
 
28
# endif
 
29
#endif
 
30
 
 
31
#if HAVE_UTMP_H
 
32
# include <utmp.h>
 
33
#endif
 
34
 
 
35
#if HAVE_GRP_H
 
36
# include <grp.h>
 
37
#endif
 
38
 
 
39
#if HAVE_PWD_H
 
40
# include <pwd.h>
 
41
#endif
 
42
'
 
43
 
 
44
  AC_CHECK_DECLS([
 
45
    free,
 
46
    getenv,
 
47
    geteuid,
 
48
    getgrgid,
 
49
    getlogin,
 
50
    getpwuid,
 
51
    getuid,
 
52
    getutent,
 
53
    lseek,
 
54
    malloc,
 
55
    memchr,
 
56
    memrchr,
 
57
    nanosleep,
 
58
    realloc,
 
59
    stpcpy,
 
60
    strndup,
 
61
    strnlen,
 
62
    strstr,
 
63
    strtoul,
 
64
    strtoull,
 
65
    ttyname], , , $headers)
 
66
])
 
67
 
 
68
dnl FIXME: when autoconf has support for it.
 
69
dnl This is a little helper so we can require these header checks.
 
70
AC_DEFUN([_gl_DECL_HEADERS],
 
71
[
 
72
  AC_REQUIRE([AC_HEADER_STDC])
 
73
  AC_CHECK_HEADERS(grp.h memory.h pwd.h string.h strings.h stdlib.h \
 
74
                   unistd.h sys/time.h utmp.h utmpx.h)
 
75
])