--- libtool.orig 2015-03-04 15:44:39.632703654 +0100 +++ libtool.fixed 2015-03-04 17:16:42.495983610 +0100 @@ -1607,7 +1607,15 @@ while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + if test set = "${BASH_VERSION+set}"; then + _G_unquoted_arg=${1//\\/\\\\} + _G_unquoted_arg=${_G_unquoted_arg//\"/\\\"} + _G_unquoted_arg=${_G_unquoted_arg//\$/\\\$} + _G_unquoted_arg=${_G_unquoted_arg//\`/\\\`} + else + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` + fi + ;; *) _G_unquoted_arg=$1 ;; esac @@ -5756,7 +5764,11 @@ if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + if test set = \"\${BASH_VERSION+set}\"; then + qECHO=$(_G=$($ECHO "$ECHO");_G=${_G//\\/\\\\};_G=${_G//\"/\\\"};_G=${_G//\$/\\\$};_G=${_G//\`/\\\`};printf '%s\n' "$_G") + else + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + fi $ECHO "\ # A function that is used when there is no print builtin or printf.