autoconf-patches
[Top][All Lists]
Advanced

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

Re: A simplification of _AC_CANONICAL_SPLIT


From: Stepan Kasal
Subject: Re: A simplification of _AC_CANONICAL_SPLIT
Date: Mon, 22 Aug 2005 18:00:15 +0200
User-agent: Mutt/1.4.1i

Hello,

On Fri, Aug 19, 2005 at 02:01:05PM -0700, Paul Eggert wrote:
> Stepan Kasal <address@hidden> writes:
> 
> > The main goal is not to catch non-canonical values.  The goal is to
> > catch evil values which would break the code below.
> 
> OK, but in that case let's use a different diagnostic, e.g.,
> "invalid value of canonical host".  (That's a better diagnostic
> anyway, since mentioning ac_cv_$1 is a bit obscure.)

I was aware about the fact that the message about "ac_cv_$1" is obscure.
But I thought that it would be triggered only if config.site contained
        ac_cv_build=-evil
so that the user had to modify this manually.  Well, forget it.

I agree that the diagnostic you proposed is much better.

> Also, why are the ?* patterns needed?  They don't reject all instances
> of empty vendors or os, since (for example) *-?*-?* matches the value
> abc---def-ghi.

Well, the set of rejected values has to contain all values which would
break the following code, and it has to contain no valid canonical value.

I just draw a line randomly between these two.
But again, you were right, that was ugly.

> case $ac_cv_$1 in
>   -*) false;;
>   *-?*-?*) : ;;
>   *) false;;
> esac || AC_MSG_ERROR([non-canonical value of ac_cv_$1: $ac_cv_$1])

Elegant.

Attached please find an updated patch.
Can I commit it?

BTW:
> The Autoconf manual warns against [!-] (look for "negated character
> classes").

I wasn't aware about that, thanks.

Is it probable that some of the systems which are still in use has a
shell which doesn't understand it?  (Computer museums don't count. ;-)

If not, than this limitation should be commented out from autoconf.texi.
(We can suppose that future platforms will at least try to conform to
POSIX.)

The primary purpose of the manual is to tell people which constructs
work on all platforms belonging to the target set.  Documenting
limitations of dead platforms only lowers the usability of the whole
Autoconf.

Have a nice day,
        Stepan

Attachment: autoconf-20050822-canonical-split.patch
Description: Text document


reply via email to

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