[Top][All Lists]
[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: |
Fri, 19 Aug 2005 15:12:47 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Thu, Aug 18, 2005 at 01:22:10PM -0700, Paul Eggert wrote:
> > +[case $ac_cv_$1 in
> > + [[!-]]*-*-*) ;;
> > + *) AC_MSG_ERROR([non-canonical value of ac_cv_$1: $ac_cv_$1]);;
> > +esac
>
> Sorry, I don't understand what that pattern is trying to do. Does it
> really catch all non-canonical values?
The pattern catches values which start with "-" or which contain less
than two "-".
This ensures that the code below:
IFS=-; set $ac_cv_$1; shift; shift
won't fail.
> Or even common problems? If not, then I wouldn't bother.
The main goal is not to catch non-canonical values. The goal is to
catch evil values which would break the code below.
> Also, the [!-] doesn't look portable to me.
I thought that it was a portable way to match any character other than "-".
If I were wrong, we can use:
ac_good=:
case $ac_cv_$1 in
-*) ac_good=false;;
*-?*-?*) ;;
*) ac_good=false;;
esac
ac_good || AC_MSG_ERROR([non-canonical value of ac_cv_$1: $ac_cv_$1])
Have a nice day,
Stepan Kasal
- A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/16
- Re: A simplification of _AC_CANONICAL_SPLIT, Noah Misch, 2005/08/16
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/17
- Re: A simplification of _AC_CANONICAL_SPLIT, Noah Misch, 2005/08/17
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/18
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/18
- Re: A simplification of _AC_CANONICAL_SPLIT,
Stepan Kasal <=
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/19
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/22
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/22
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/23
- Re: A simplification of _AC_CANONICAL_SPLIT, Paul Eggert, 2005/08/23
- Re: A simplification of _AC_CANONICAL_SPLIT, Stepan Kasal, 2005/08/24
- AS_SET_UNEXPANDED_ARGS proposal, Paul Eggert, 2005/08/24
- Re: AS_SET_UNEXPANDED_ARGS proposal, Stepan Kasal, 2005/08/25
- Re: AS_SET_UNEXPANDED_ARGS proposal, Paul Eggert, 2005/08/25