Paolo Bonzini wrote:
> +# Override grep during configure.
> +fn_grep () {I would suggest more comments. - What is the purpose of this override? - What are its limitations? 10 years from now, no one will remember. Suggestion: # Set the GREP and EGREP variables to a dummy replacement for the 'grep' # command, so that AC_PROG_GREP and AC_PROG_EGREP don't fail when no good # 'grep' program is found. This makes it possible to build GNU grep on a # Solaris machine that has only /usr/bin/grep and no /usr/xpg4/bin/grep. # This function supports only restricted arguments: # - No file names as arguments, process only standard input. # - Only literal strings, no regular expressions. # - The only options are -e and -Ee. # This function also does not support long lines, and backslash-processes # the input. > + while read line; do Note that this backslash-processes the input. This is probably not a big problem, because preprocessed C code contains backslashes only in string literals and in #include directives. The alternative 'read -r' is not usable, because Solaris /bin/sh does not support it (see the Autoconf manual). Bruno
