1#serial 27
2# Check declarations for this package.
3
4dnl Copyright (C) 1997-2023 Free Software Foundation, Inc.
5
6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved.
9
10
11dnl This is just a wrapper function to encapsulate this kludge.
12dnl Putting it in a separate file like this helps share it between
13dnl different packages.
14AC_DEFUN([gl_CHECK_DECLS],
15[
16  AC_CHECK_HEADERS_ONCE([grp.h pwd.h])
17  headers='
18#include <sys/types.h>
19
20#include <unistd.h>
21
22#if HAVE_GRP_H
23# include <grp.h>
24#endif
25
26#if HAVE_PWD_H
27# include <pwd.h>
28#endif
29'
30  AC_CHECK_DECLS([
31    getgrgid,
32    getpwuid,
33    ttyname], , , $headers)
34
35  AC_CHECK_DECLS_ONCE([geteuid])
36  AC_CHECK_DECLS_ONCE([getlogin])
37  AC_CHECK_DECLS_ONCE([getuid])
38])
39