[Top][All Lists]

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

Re: problem with AC_CONFIG_HEADERS and automake

From: Dale E Martin
Subject: Re: problem with AC_CONFIG_HEADERS and automake
Date: Sat, 3 May 2003 11:23:56 -0400
User-agent: Mutt/1.3.28i

> Installing config.h (with its non-prefixed defines) can lead to problems
> later on, of course.

Right, this is exactly the problem I was facing and so I'm no longer doing

> Putting in guards does sometimes not do the right thing either, as
> prepackaged software might be build on different hosts with different
> configurations leading to different configure`d defines.

I've only defined things in my custom files that should be OK.  My
application is implemented C++, and I've got members whose type can depend
on the results of configure tests.  For instance, if I need a 64 bit type,
I need to figure out on the platform I'm how to define that.  (Is it long,
long long, or uint64, or something else?)  So I don't think I have a choice
but to define a header with this info in there.

> That is in one installed config.h the define is ON will in the other it
> is OFF, the guard define will make that unconditionally ON.

I'm NOT installing config.h, that was the point of using AC_CONFIG_HEADERS
with my own input files.  I'm ONLY guarding multiple inclusion of the
files, too, so multiply defined symbols would actually get flagged as a

> Better put a prefix in there, so that symbols are easily classified to be
> the configuration of your lib and not from anyone's else library header.
> The macro AX_PREFIX_CONFIG_H might help you here, and it does not even
> require you to write your own, plus all defines are guarded
> as an extra benefit for you. The only problem might be that your
> installed header files (and only these) need to be corrected to be
> dependent in its ifdef#d on the prefixed symbols. That's been discussed
> multiple times on the automake and autoconf mailinglists.
Interestingly, last time I asked about this (a few weeks back) noone
mentioned AX_PREFIX_CONFIG_H.  I'll look into that.

Dale E. Martin, Clifton Labs, Inc.
Senior Computer Engineer
pgp key available

reply via email to

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