Hi everybody. While skimming through the gnulib-tool source code, I spotted what seems to be a minor bug in the code that looks for a "working" `echo' command (i.e. an `echo' that doesn't interpret backslashes). This is around line 700-710 in my copy of gnulib-tool, which should be up-to-date w.r.t. the latest git version.
The bug is in this command: $CONFIG_SHELL -c 'echo '\t' | grep t > /dev/null' which should check if $CONFIG_SHELL (when set) has a usable `echo' command. But the way it's written, that test *always* succeds, even if $CONFIG_SHELL has a broken `echo' builtin. This is caused by the fact that the `\t' in there is *not* quoted (even if at a first glace it might seem to be), and thus the backslash is removed by the shell *before* running $CONFIG_SHELL, which then run a test like: echo t | grep t > /dev/null which of course succeds. To properly check the `echo' builtin of $CONFIG_SHELL, the command should be rewritten as e.g.: $CONFIG_SHELL -c "echo '\\t' | grep t > /dev/null" or: $CONFIG_SHELL -c 'echo '\''\t'\'' | grep t > /dev/null' Regards, Stefano