bug-autoconf
[Top][All Lists]
Advanced

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

Re: CONFIG_SITE format change


From: Stepan Kasal
Subject: Re: CONFIG_SITE format change
Date: Tue, 20 Mar 2007 13:59:38 +0100
User-agent: Mutt/1.4.2.1i

Hello,
  I do not think I am able to decide the issue you reported, yet I
hope the following comments will help.

On Thu, Mar 15, 2007 at 06:24:40PM +0300, Ilya N. Golubev wrote:
> `CONFIG_SITE' value format changed incompatibly.  Previously it was a
> list of file names.  [...]
> Worse, this user visible incompatible change is not even described in
> `NEWS'.  Let alone any reasons are stated to impair user capabilities
> this way.

Actually, it is the other way round.  According to the documentation,
CONFIG_SITE, if set, had to be a sigle file name.  Quoting:

:    If the environment variable `CONFIG_SITE' is set, `configure' uses
: its value as the name of a shell script to read.  Otherwise, it reads
: the shell script `PREFIX/share/config.site' if it exists, then
: `PREFIX/etc/config.site' if it exists.  [...]

This statement is part of the manual at least since version 2.13.

But there was a long-standing bug: Autoconf were not able to handle
file names containing white space.  In many cases, this led to an
obvious crash.  In the special case you mention, it led to a
reasonable behavior, though differring from the documented one.

When the bug was (partially?) fixed, it was mentioned in ChangeLog.
But because we were not aware of the use case you describe, it was
not mentioned in the NEWS file.

So the question is whether we should keep the documented behavior,
or whether we should change the specification and break compatibility
with the recent releases.

> Certainly can work around this by writing single file trying to load
> other ones.  And it is tedious and error prone at best, [...]

Well, the code can be easily pasted from autoconf:

if test "x$prefix" != xNONE; then
  set x "$prefix/share/config.site" "$prefix/etc/config.site"
else
  set x "$ac_default_prefix/share/config.site" \
        "$ac_default_prefix/etc/config.site"
fi
shift
for site_file
do
  if test -r "$site_file"; then
    . "$site_file"
  fi
done

But you are right, this is error prone, because it relies on
undocumented variable $ac_default_prefix, and on value NONE of
$prefix.

Let's wait for more comments from other members of the list.

Have a nice day,

Stepan Kasal




reply via email to

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