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 17:51:21 +0100 (CET)



On Sat, 14 Mar 2009, Vincent Torri wrote:


Hey,

in the manual, one can read in http://www.gnu.org/software/autoconf/manual/autoconf.html#Generic-Headers

"For each given system header file header-file in the blank-separated argument list that exists, define HAVE_header-file (in all capitals). If action-if-found is given, it is additional shell code to execute when one of the header files is found. You can give it a value of `break' to break out of the loop on the first match. If action-if-not-found is given, it is executed when one of the header files is not found."

if I do that:

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

So, 'action-if-found' and 'action-if-not-found' are given.

Now, suppose that foo.h exists, but bar.h does not.

According to the first part of the doc : "If action-if-found is given, it is additional shell code to execute when one of the header files is found.", as foo.h exists, have_headers="yes" is executed.

But according to the second part: "If action-if-not-found is given, it is
executed when one of the header files is not found", as bar.h does not exist, have_headers="no" is executed...

I don't know the real behavior of AC_CHECK_HEADERS, but clearly, there is a problem with the documentation.

Imho, the correct behavior woul be "if action-if-found is given, it is additional shell code to execute when all the header files are found. If action-if-not-found is given, it is executed when one of the header files is not found"

am I wrong ?

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

Vincent Torri


_______________________________________________
Autoconf mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/autoconf

--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
Message délivré par le serveur de messagerie de l'Université d'Evry.


reply via email to

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