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: Ralf Corsepius
Subject: Re: AM_INIT_AUTOMAKE([no-define]) vs. AC_PACKAGE_*
Date: 07 Feb 2002 14:19:05 +0100

Am Mon, 2002-02-04 um 22.58 schrieb Tom Tromey: 
> >>>>> "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.
Right. 

My point is, users are miss-using config-headers for this purpose
because autoconf/automake does't provide appropriate/efficient means to
assist users in implementing such external config-headers and because
using config-headers seems to be compelling to them. 

> 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.
Fully agreed, but in most (probably all) cases, the values users
actually want to export are either user-supplied (WITH_SOMETHING,
ENABLE_SOMETHING) or the result of processing of user-processing options
They actually want to store a package's configuration, not to detected
features. It's the autotools which unwantedly pull-in HAVE_* and other
AC_DEFINES as side-effect. 

> Of course, some people don't do this.  For instance in the past I
> think libjpeg used to export a bogus header.
Yep. 

> Unfortunately it isn't always possible to enforce good manners.
Then let me emphasize it: This is what currently is happening -
autoconf's AC_DEFINE-ing PACKAGE_* enforce users not to export
config-headers.

Ralf 





reply via email to

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