From: Jim Meyering Date: Wed, 22 Oct 2008 15:25:46 +0000 (+0200) Subject: AC_FUNC_GETGROUPS: always define $ac_cv_func_getgroups_works X-Git-Tag: v2.63b~213 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b218c046a6c28a4bf5117e3202dbfec13a327fb2;p=thirdparty%2Fautoconf.git AC_FUNC_GETGROUPS: always define $ac_cv_func_getgroups_works * lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Always define the shell variable, $ac_cv_func_getgroups_works. Otherwise, if it is set to "yes" in the environment and configure is run on a system like mingw that lacks the getgroups function, it would mistakenly define HAVE_GETGROUPS. Reported by Simon Josefsson in . --- diff --git a/ChangeLog b/ChangeLog index bdc32445..e0f3f265 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-10-22 Jim Meyering + + AC_FUNC_GETGROUPS: always define $ac_cv_func_getgroups_works + * lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Always define + the shell variable, $ac_cv_func_getgroups_works. Otherwise, if + it is set to "yes" in the environment and configure is run on + a system like mingw that lacks the getgroups function, it would + mistakenly define HAVE_GETGROUPS. Reported by Simon Josefsson in + . + 2008-10-22 Paolo Bonzini and Eric Blake diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index 14fe3155..39991342 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -619,6 +619,7 @@ 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 @@ -626,9 +627,7 @@ 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=no], - [ac_cv_func_getgroups_works=no]) + [ac_cv_func_getgroups_works=yes]) ]) if test $ac_cv_func_getgroups_works = yes; then AC_DEFINE(HAVE_GETGROUPS, 1,