autoconf-patches
[Top][All Lists]
Advanced

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

Re: AC_CHECK_HEADER


From: Ralf Wildenhues
Subject: Re: AC_CHECK_HEADER
Date: Tue, 11 Aug 2009 19:15:07 +0200
User-agent: Mutt/1.5.20 (2009-08-09)

Hello Paolo, Alex,

* Paolo Bonzini wrote on Wed, Aug 05, 2009 at 01:23:08AM CEST:
> 
> >Well, warnings are to show that something is wrong, and protecting
> >includes with #error is right, at least in FreeBSD realm. Perhaps it's
> >not a bad idea to use AC_INCLUDE_DEFAULTS or some other mechanism when
> >checking a header with preprocessor (at least on FreeBSD).
> 
> I think that if the presence check makes no sense for this header,
> the four-argument version with AC_INCLUDES_DEFAULT should be used
> always.

Yep, sounds like it.

> >OK, now to the patch:
> >
> >1. It changes word "preprocessor" for "compiler" in AC_CHECK_HEADER
> >comment.
> 
> Fine.
> 
> >2. places AC_PREPROC_IFELSE before AC_COMPILE_IFELSE in
> >_AC_CHECK_HEADER_MONGREL_BODY
> 
> I would like the maintainers of Autoconf to come back from holiday
> and comment on this one.

I'm (working through my) back(log).  I don't think just reversing the
order is improving the issue considerably.  The user will just think
that the configure script is just too dumb to act properly upon the
non-presence of the header and to forego testing usability.

Ideally, the right approach would seem to be to add the default includes
(or those specified by the fourth argument to AC_CHECK_HEADER(S)) to the
text passed to the preprocessor.  However, that seems like a nontrivial
change to me that could have some repercussions.  IIRC, Solaris /lib/cpp
fails to parse, or even find, some C or C++ headers.  I'm afraid that's
probably still a relevant problem.

Cheers,
Ralf




reply via email to

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