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

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

 



Hello,

On Mon, Nov 27, 2006 at 07:49:14AM -0800, Bruce Korb wrote:
> On 11/26/06, Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> wrote:
> >* Bruce Korb wrote on Mon, Nov 27, 2006 at 02:40:07AM CET:
> >> # ----------------------------------------------------------------------
> >> # check for various programs used during the build.
> >> # On OS/X, "wchar.h" needs "runetype.h" to work properly.
> >> # ----------------------------------------------------------------------
...
> >AC_CHECK_HEADERS([runetype.h wchar.h], [], [],[
> >AC_INCLUDES_DEFAULT
> >#if HAVE_RUNETYPE_H
> ># include <runetype.h>
> >#endif
> >])

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

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

# 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], [], [], [
AC_INCLUDES_DEFAULT
#ifdef HAVE_RUNETYPE_H
# include <runetype.h>
#endif
])

[A side note: I changed #if -> #ifdef, this is the preferred variant
in recent versions of Autoconf.]

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

# First, check for runetype.h (and define HAVE_RUNETYPE_H iff it is
# found).
# In the second iteration, 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([runetype.h wchar.h], [], [], [
AC_INCLUDES_DEFAULT
#ifdef HAVE_RUNETYPE_H
# include <runetype.h>
#endif
])

> 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.
It is better to identify the cases when a header requires another but
does not include it, and handle them.

Have a nice day,
	Stepan Kasal


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

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux