[vsipl++] [patch] Find & use native C MPI
Nathan Myers
ncm at codesourcery.com
Tue Dec 27 08:55:25 UTC 2005
On Mon, Dec 26, 2005 at 02:16:08PM -0800, Mark Mitchell wrote:
> Nathan (Jasper) Myers wrote:
> you should not use this option.]),
> > [case x"$enableval" in
> > - xyes) maintainer_mode=true ;;
> > - xno) maintainer_mode= ;;
> > - *) AC_MSG_ERROR([Invalid argument to --enable-maintainer-mode.])
> > + (xyes) maintainer_mode=true ;;
> > + (xno) maintainer_mode= ;;
> > + (*) AC_MSG_ERROR([Invalid argument to --enable-maintainer-mode.])
>
> I didn't know about the (...) syntax, although I see it's certainly
> documented in bash. Is is valid with all shells?
>
> I haven't see anyone use that in an autoconf script before; my concern
> is that this might make the configure script less portable.
I started using it when I got bizarre syntax errors from bash, on a
particular script, if I didn't use it. Pdksh (or was it Bell Labs ksh?)
also reported an ambiguity, and helpfully suggested the "()" notation
to resolve it. I haven't encountered any sh that doesn't support it,
going back to AT&T sh, and including zsh (ack! spit!) and ash. I added
the "(" in this instance while tracing a bracketing problem, testing a
configure script, that turned out to be a missing "fi".
Unfortunately the script that provoked the error messages is lost,
but it was less than four years ago. All I recall now is that the
pattern involved was only a little more complicated than a literal
string. The cases above are obviously canonical and so could not
trigger the failure, but it seems to me more defensive to promote
the "()" notation.
Nathan Myers
ncm
More information about the vsipl++
mailing list