[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Patch] Some more DOS compatibility
From: |
Tim Van Holder |
Subject: |
RE: [Patch] Some more DOS compatibility |
Date: |
Tue, 13 Mar 2001 19:27:52 +0100 |
> | # Name of the executable.
> | -as_me=`echo "$[0]" | sed 's,.*/,,'`
> | +as_me=`echo "$[0]" | sed 's,.*[[\\/]],,'`
>
> OK. Actually, implementing AS_BASENAME would be good.
OK.
> | # Try the directory containing this script, then its parent.
> | ac_prog=$[0]
> | - ac_confdir=`echo "$ac_prog" | sed 's%/[[^/][^/]]*$%%'`
> | + ac_confdir=`echo "$ac_prog" | sed 's%[[\\/][^\\/][^\\/]]*$%%'`
>
> Huh? Why three chars now?
Think you missed the literal '/' in the original pattern.
Both that and the negated slash need to accept a backslash to handle
standard DOS paths.
> I see no point in this change.
Neither do I (now). Think I had a bug at some point that I thought
was caused by a missing '\' to escape the newline, so I added several.
Guess some of them are still lingering in my local files.
> | -srcdir=$srcdir
> | +
> | +dnl Add the quotes to protect paths with spaces/backslashes/etc
> | +srcdir='$srcdir'
>
> Good. While you're at it, I think the other guy around should have
> single quotes too, not double (referring to INSTALL for instance).
Will look into it.
BTW, Akim, did you think about that question I asked a short while
ago? Can we or can't we assume option names don't contain shell
metachars. I'd still like configure to build an argument list like
--foo --bar='foo\\bar'
instead of
--foo '--bar=foo\\bar'
Mainly this would help the sub-configure system recognize quoted
versions of --srcdir and --cache-file (probably the two options most
likely to have metachars ('\' on DOS, for example)).
But to reliably quote only the option argument, I need to be sure the
option name cannot itself contain metachars.