]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_FUNC_GETGROUPS: Revert regression.
authorEric Blake <ebb9@byu.net>
Fri, 24 Oct 2008 11:42:10 +0000 (05:42 -0600)
committerEric Blake <ebb9@byu.net>
Fri, 24 Oct 2008 11:42:10 +0000 (05:42 -0600)
* lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Only set
ac_cv_func_getgroups_works=no when it is not available.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/autoconf/functions.m4

index c8dca18e06dfbb549812b253bc9f75875012939b..0a835899d4e6edff7c8c68734e77a9f88ccb8074 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-24  Eric Blake  <ebb9@byu.net>
+
+       AC_FUNC_GETGROUPS: Revert regression.
+       * lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Only set
+       ac_cv_func_getgroups_works=no when it is not available.
+
 2008-10-23  Eric Blake  <ebb9@byu.net>
 
        Whitespace cleanup.
index 399913420a9fd7a9092fd714bb9c714e2adad7cd..f478cccc0a0dcfd6575b6cc9c898d9c4d188ad59 100644 (file)
@@ -619,7 +619,6 @@ if test $ac_cv_func_getgroups = no; then
   AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd])
 fi
 
-ac_cv_func_getgroups_works=no
 # Run the program to test the functionality of the system-supplied
 # getgroups function only if there is such a function.
 if test $ac_cv_func_getgroups = yes; then
@@ -627,12 +626,16 @@ if test $ac_cv_func_getgroups = yes; then
    [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
       [[/* On Ultrix 4.3, getgroups (0, 0) always fails.  */
        return getgroups (0, 0) == -1;]])],
-                 [ac_cv_func_getgroups_works=yes])
+                 [ac_cv_func_getgroups_works=yes],
+                 [ac_cv_func_getgroups_works=no],
+                 [ac_cv_func_getgroups_works=no])
    ])
-  if test $ac_cv_func_getgroups_works = yes; then
-    AC_DEFINE(HAVE_GETGROUPS, 1,
-             [Define to 1 if your system has a working `getgroups' function.])
-  fi
+else
+  ac_cv_func_getgroups_works=no
+fi
+if test $ac_cv_func_getgroups_works = yes; then
+  AC_DEFINE(HAVE_GETGROUPS, 1,
+           [Define to 1 if your system has a working `getgroups' function.])
 fi
 LIBS=$ac_save_LIBS
 ])# AC_FUNC_GETGROUPS