dca7f9e8069a330bf1f2cd1d4d51bdbc85b033ae
[gnulib.git] / m4 / group-member.m4
1 #serial 7
2
3 # Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 dnl Written by Jim Meyering
9
10 AC_DEFUN([gl_FUNC_GROUP_MEMBER],
11 [
12   dnl Persuade glibc <unistd.h> to declare group_member().
13   AC_REQUIRE([AC_GNU_SOURCE])
14
15   dnl Do this replacement check manually because I want the hyphen
16   dnl (not the underscore) in the filename.
17   AC_CHECK_FUNC(group_member, , [
18     AC_LIBOBJ(group-member)
19     gl_PREREQ_GROUP_MEMBER
20   ])
21 ])
22
23 # Prerequisites of lib/group-member.c.
24 AC_DEFUN([gl_PREREQ_GROUP_MEMBER],
25 [
26   AC_CHECK_HEADERS_ONCE(unistd.h)
27   AC_REQUIRE([AC_FUNC_GETGROUPS])
28 ])