* config/general.m4sh: basename sed-subst is anchored and thus

does not need the `g' flag.
(func_quote_for_eval): Return both the possibly double-quoted
backslashified as well as only the backslashified argument.
* config/ltmain.m4sh (func_mode_link): Use both return values,
to save another sed_quote_subst application per cmdline arg.
This commit is contained in:
Ralf Wildenhues 2004-11-30 20:46:23 +00:00
parent 81b4ad79e3
commit b430e15d24
3 changed files with 20 additions and 7 deletions

View File

@ -1,3 +1,12 @@
2004-11-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* config/general.m4sh: basename sed-subst is anchored and thus
does not need the `g' flag.
(func_quote_for_eval): Return both the possibly double-quoted
backslashified as well as only the backslashified argument.
* config/ltmain.m4sh (func_mode_link): Use both return values,
to save another sed_quote_subst application per cmdline arg.
2004-11-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* config/ltmain.m4sh (func_lalib_p): Update function

View File

@ -52,7 +52,7 @@ exit_status=$EXIT_SUCCESS
"}
dirname="s,/[[^/]]*$,,"
basename="s,^.*/,,g"
basename="s,^.*/,,"
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
# is ksh but when the shell is invoked as "sh" and the current value of
@ -265,22 +265,26 @@ func_mktempdir ()
# func_quote_for_eval arg
# Aesthetically quote ARG to be evaled later.
# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
# is double-quoted, suitable for a subsequent eval, whereas
# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
# which are still active within double quotes backslashified.
func_quote_for_eval ()
{
my_arg=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"`
func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"`
case $my_arg in
case $func_quote_for_eval_unquoted_result in
# Double-quote args containing shell metacharacters to delay
# word splitting, command substitution and and variable
# expansion for a subsequent eval.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
*[[\@<:@\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]]*|*@:>@*|"")
my_arg="\"$my_arg\""
func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
;;
*)
func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
esac
func_quote_for_eval_result="$my_arg"
}

View File

@ -2226,8 +2226,8 @@ func_mode_link ()
while test "$#" -gt 0; do
arg="$1"
shift
qarg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"`
func_quote_for_eval "$arg"
qarg="$func_quote_for_eval_unquoted_result"
libtool_args="$libtool_args $func_quote_for_eval_result"
# If the previous option needs an argument, assign it.