There are several macros in Autoconf that are checking whether a
function exists and works and set HAVE_FUN accordingly.  This is the
strategy I adopted when I stole AC_FUNC_GETGROUPS from Jim, although
his original macro was defining HAVE_WORKING_GETGROUPS.

I think Autoconf should advocate a single approach.  

Not defining HAVE_GETGROUPS when it appears to be broken makes some
sense, but also introduces problems if you expect to have a layer on
the top of the existing but broken function.

Defining HAVE_GETGROUPS and HAVE_WORKING_GETGROUPS seems fine, but
FNAMTCH and ALLOCA (and probably a few others) have been propagating
for years the idea that `HAVE_FOO' == `HAVE_WORKING_FOO', so it's a
bit misleading.

I'm fine with moving to HAVE_WORKING_FOO, but then, I would like to
adjust the case of FNMATCH and ALLOCA etc. (which means, leaving
HAVE_ALLOCA defined as usually, but having its description promote the
use of HAVE_WORKING_ALLOCA).


Also, is `HAVE_WORKING_FOO' the right naming scheme?  Is it powerful
enough to allow us the specify the various brokenness that this or
that function may have?  Should HAVE_WORKING_FOO always be the `or' of
HAVE_FOO_BLAHBLAH_BUG, HAVE_FOO_SOMEOTHER_BUG etc.?  ISTR that some
people would like the mmap test to be finer, so it'd be a good thing
to have a naming scheme we could promote.

        Akim

Reply via email to