Tizen 2.0 Release
[external/tizen-coreutils.git] / m4 / getgroups.m4
1 #serial 10
2
3 dnl From Jim Meyering.
4 dnl A wrapper around AC_FUNC_GETGROUPS.
5
6 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free
7 # Software Foundation, Inc.
8 #
9 # This file is free software; the Free Software Foundation
10 # gives unlimited permission to copy and/or distribute it,
11 # with or without modifications, as long as this notice is preserved.
12
13 AC_DEFUN([gl_FUNC_GETGROUPS],
14 [
15   AC_REQUIRE([AC_FUNC_GETGROUPS])
16   if test $ac_cv_func_getgroups_works = no; then
17     AC_LIBOBJ(getgroups)
18     AC_DEFINE(getgroups, rpl_getgroups,
19       [Define as rpl_getgroups if getgroups doesn't work right.])
20     gl_PREREQ_GETGROUPS
21   fi
22   test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
23 ])
24
25 # Prerequisites of lib/getgroups.c.
26 AC_DEFUN([gl_PREREQ_GETGROUPS],
27 [
28   AC_REQUIRE([AC_TYPE_GETGROUPS])
29 ])