autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about documentation of AC_CHECK_HEADERS


From: Vincent Torri
Subject: Re: about documentation of AC_CHECK_HEADERS
Date: Sat, 14 Mar 2009 18:09:59 +0100 (CET)



On Sat, 14 Mar 2009, Ralf Wildenhues wrote:

Hello Vincent,

thanks for the report.

* Vincent Torri wrote on Sat, Mar 14, 2009 at 05:51:21PM CET:
more precisely, if foo.h exists and bar.h does not:

1) with:

AC_CHECK_HEADERS([foo.h bar.h], [have_headers="yes"], [have_headers="no"])

have_headers value is "no"

2) with:

have_headers="no"
AC_CHECK_HEADERS([foo.h bar.h], [have_headers="yes"])

have_headers value is "yes"

which is quite annoying, in my humble opinion

Yes.  Please consider the situation where one is looking for the header
of one particular API, but that API may be declared in one of several
_alternate_ headers, foo.h or bar.h.  In that case, the current
semantics are useful.

It seems that with the current implementation, the semantics you would
like are easily emulated, and AFAICS the current documentation matches
the current semantics, too.  Consequently, I don't think this needs a
change in Autoconf.

indeed, now I know what to do...

Aside, a change in behavior of this prominent macro would be a sure way
to destroy backward compatibility.  So if this were seen as broken, it
would need a new macro with better semantics, plus deprecation of this
one.

indeed, changing the macro behavior is not an option and I don't want that (that's the reason of the subject of my mail : the documentation). The problem is the documentation, I think. The 2 behaviors must be more detailed, I think. Something like:

"If action-if-not-found is given, it is executed when one of the header files is not found, even if action-if-found is given."

Then you can add the 2 examples above.

Otherwise, it's quite disturbing (well, it took me some time to understand why what i wrote was not working...)

Vincent Torri




reply via email to

[Prev in Thread] Current Thread [Next in Thread]