bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

autoconf and non-alphanumeric characters in $PATH


From: Peter Moulder
Subject: autoconf and non-alphanumeric characters in $PATH
Date: Sat, 30 Sep 2000 13:02:57 +1100
User-agent: Mutt/1.2.5i

AC_PROG_MAKE_SET will fail if make is found in a directory containing
any of most characters not allowed in shell variables.  This happens
particularly frequently on Cygwin, where the standard bin directory is
often a subdirectory of progra~1 (a VFAT shorthand for `Program Files',
which would cause even more problems).

The problem is a  sed y%./+-%__p_%  in the macro expansion.  Ideally we'd
replace that with something involving `tr -c', but I don't know how to do
that portably in such a way that `[' and `]' would also be replaced with
`_'.  Maybe:  tr -c '[+a-zA-Z0-9]' '[_*]' | sed 'y/+][/p__/'  .  Are there
any other portability problems with `tr -c'?

If tr is too problematical, or if you disagree with replacing all non-
alphanumerics (other than +) with `_', then please at least add `~' to the
list of replaced characters in the existing sed command, since this is the
single most common character that wouldn't cause problems elsewhere.
[I mean, one might expect space and apostrophe to be fairly common too,
 but they would cause more-or-less inescapable problems elsewhere anyway,
 due to a lacking in the [portable subset of the] makefile language.]


Note that if you do a search for `__p_' in autoconf files, then you'll
find a number of occurrences, and presumably similar changes should be
made to those places too.


Thx,

pjm.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]