Re: ./configure script prototype
On Mon, 14 Nov 2005, Joel Becker wrote:
Show 7 quoted lines
> On Mon, Nov 14, 2005 at 02:29:56PM +0100, Petr Baudis wrote:
> > Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
> > where Andreas Ericsson <ae@op5.se> said that...
> > > --prefix=*)
> > > prefix=${1##*=}
>
> ${i# and ${i% are POSIX, iirc.They may be in POSIX, but they sure as h*ll aren't portable.
There's a _lot_ of machines out there that don't do POSIX, just because those "newfangled" things are so complicated.
Also, even in POSIX, there's tons of different substandards, and you might follow one but not the other.
Finally, even if somebody is certified, they can very well be certified with "exceptions", so if they claim POSIX it doesn't necessarily mean that they follow all of it.
If you want to do a "configure" script (and I'm not sure it's worth it), you should cater to the lowest common denominator for it to be meaningful. What the hell that would be, I have no idea, since if you ever want to run on native Windows, it won't even be traditional shell. But traditional shell is at least a lot closer to that lowest common denominator than POSIX shell is.
That said, most of those ${var...} sequences definitely _are_ very traditional, and for all I know, ## may be too.
Linus