automake
[Top][All Lists]
Advanced

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

Re: AM_INIT_AUTOMAKE([no-define]) vs. AC_PACKAGE_*


From: Tom Tromey
Subject: Re: AM_INIT_AUTOMAKE([no-define]) vs. AC_PACKAGE_*
Date: 04 Feb 2002 14:58:56 -0700

>>>>> "Ralf" == Ralf Corsepius <address@hidden> writes:

Ralf> But I think, the actual cause for this issue is something different:

Ralf> 3) AM_INIT_AUTOMAKE([no-define]) allows config-headers to be
Ralf> exported, ie. to export and thereby globally store configuration
Ralf> information.

Ralf> IMO, users, using AM_INIT_AUTOMAKE([no-define]), normally are
Ralf> not interested in 1), however actually want to have a means to
Ralf> export very few essential package configuration details to
Ralf> user-space.

While that's true, it is also the case that if you are doing this you
are expected to be responsible for the namespace.  My reasoning here
is that generally it is library authors who export config headers, and
library authors are supposed to understand and respect namespace
conventions.

In libgcj we have an internal config header and a much smaller exteral
config header.  In the latter we were careful about how we named all
the symbols we use.

Defining HAVE_SOMETHING in an exported header is always wrong.  What
if someone else wants to use your package and they have a conflicting
symbol?  You've just violated their namespace expectations.

Of course, some people don't do this.  For instance in the past I
think libjpeg used to export a bogus header.  Unfortunately it isn't
always possible to enforce good manners.

Documenting this would be worthwhile.

Tom



reply via email to

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