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