From 21bd2e490b0804a0223b7044e89d5d31bd9f6476 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 24 Oct 2008 05:42:10 -0600 Subject: [PATCH] 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. Signed-off-by: Eric Blake --- ChangeLog | 6 ++++++ lib/autoconf/functions.m4 | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8dca18e..0a835899 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-24 Eric Blake + + 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 Whitespace cleanup. diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 39991342..f478cccc 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -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 -- 2.47.2