[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #110657] Autoconf configure script considers absence of usable grep
From: |
Alain Knaff |
Subject: |
[sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter |
Date: |
Mon, 6 Jun 2022 17:48:15 -0400 (EDT) |
Follow-up Comment #8, sr #110657 (project autoconf):
[comment #6 comment #6:]
> How about the attached patch instead?
Unfortunately, this patch doesn't work ... due to another peculiarity of
UnixPC's egrep which had escaped earlier: for some weird reason, if -e is
used, egrep doesn't support grepping in stdin, but only in files given on
command line.
i.e. egrep -e root </etc/passwd doesn't work.
However, egrep -e root /etc/passwd does work, and so does egrep root
</etc/passwd
There seems no easy fix for it, because the use case (grepping in cpp's
output) does indeed involve grepping from stdin. Catching cpp's output into a
file would be needlessly cumbersome, so we might need to ponder whether -e is
indeed needed for AC_EGREP_CPP. I think we do agree that multiple -e options
are not needed for AC_EGREP_CPP. So the only reason why -e is needed is to
search for strings that start with a dash. But there is another way than -e to
escape that dash: simply put a pair of parenthesis around the search string:
egrep '(-z)' </etc/profile
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?110657>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter, Alain Knaff, 2022/06/04
- [sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter, Paul Eggert, 2022/06/05
- [sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter, Paul Eggert, 2022/06/05
- [sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter,
Alain Knaff <=
- [sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter, Paul Eggert, 2022/06/08
- [sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter, Alain Knaff, 2022/06/08
- [sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter, Alain Knaff, 2022/06/08
- [sr #110657] Autoconf configure script considers absence of usable grep a fatal error, although it only uses egrep thereafter, Paul Eggert, 2022/06/08