On 23 May 2000, Akim Demaille wrote:
>
> On 23 May 2000, Akim Demaille wrote:
> > How would you write this:
> >
> > case $ac_package in
> > [*[^-a-zA-Z0-9_]*]) AC_MSG_ERROR([invalid package: $ac_package]);;
> > esac
> | Your example could be rewritten to use a dummy case which is the
> | complement, and changing the case you're looking for to the default
> | of the case statement.
> |
> | The existing autoconf scripts use this in several places.
>
> No, I don't think you can: there is no Kleene star nor anchor which
> would make it possible. In one word, I know how to say `there exist'
> in fnmatch, I don't know how to say `for all'.
all your script is saying is that if it finds a package with
non-alphanumeric (or _) characters, to print an error. If you
make it something like this (an if-statement this time ;-):
changequote(,)
if test -n "`echo .$ac_package |sed -e 's/[a-zA-Z0-9_]//g'`"
changequote([,])
then
AC_MSG_ERROR([invalid package: $ac_package]);;
fi
that has the desired effect. (may need a temporary variable to appease
very old sh's)
> Akim
>
--
T.E.Dickey <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com