Add debug print function.
Debug print where things are selected (by user).
Avoid literal <CR> in sed regular expression.
Instead, use printf(1) to save the regexp in a shell variable,
taking advantage of the fact that printf understands "\r".

This should fix a complaint from subversion, reported in PR 49249.
The word "configuration" is too ambiguous; use "selection" meaning that
user selects some of provided "definitions".
Provide a CFGDBG version for the tools build.