[Top][All Lists]

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

Re: [Autogen-users] autogen 5.8.7 / Mac OS X.4.8 build problem

From: Bruce Korb
Subject: Re: [Autogen-users] autogen 5.8.7 / Mac OS X.4.8 build problem
Date: Mon, 27 Nov 2006 08:26:20 -0800

On 11/27/06, Stepan Kasal <address@hidden> wrote:
Hi Stepan,

actually, things might be clearer if we refrain from optimization:

# First, check for runetype.h (and define HAVE_RUNETYPE_H iff it is
# found):

# Then check for wchar.h.  Amend the standard prologue to include
# runetype.h (if it has been found) before wchar.h.  (This is needed
# on OS X.)
AC_CHECK_HEADERS([wchar.h], [], [], [..............

Not only is it actually clearer, it is really the right way.
The combined form presumes a particular implementation of
before the check is run on wchar.h.  It may be the case that you
are already hard wired into such a design decision, but as a general
rule, it is better to not encourage usage that depends upon
implementation details.  Therefore, this latter way is both clearer
and, really, more correct.  :)

Then the manual could say that an optimization is possible,
which merges the two huge code chunks which are expanded from

Naw.  Leave it out!

> BTW, is there an abbreviated way of saying, ``add all the headers we've
> checked on to the list of "AC_INCLUDES_DEFAULT"?''

Various header files can conflict, when included together.
So I believe this practice would lead to serious problems.

AC_CHECK_AND_ADD_HEADERS() should be documented
with such a caveat and still be provided, I think anyway.
In our current example, "runetype.h" and "wchar.h" had better
not conflict with any other headers one might be playing with.
If it does, there be some real problems there.....

It is better to identify the cases when a header requires another but
does not include it, and handle them.

In this case, truth is, I don't think "wchar.h" requires "runetype.h",
but rather wint_t type *normally* requires "wchar.h" but, for OS/X,
it instead requires "runetype.h".  That's why it deserves its own
"special" macro.

Cheers - Bruce

reply via email to

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