Hi,
Starting with version 2.4 GNU grep supports specification of default
option values via GREP_OPTIONS environment variable. Many if not all of
the configure files generated by the autoconf use grep. For example,
configure file for libtool uses grep.
If GREP_OPTIONS is set it may contain flags that will break configure as
grep will behave in an unexpected fashion. Doing
unset GREP_OPTIONS
at the start of the configure file will fix the issue.
It is true that configure files are not the only scripts that will break
if the GREP_OPTIONS is defined. But configure files are quite
widespread and if they break in the presence of the GREP_OPTIONS it
makes this environment variable effectively unusable.
Please CC me as I am not subscribed to any of autoconf mailing lists.
Ilya Bobir