From: Paul Eggert Date: Thu, 30 May 2002 06:04:09 +0000 (+0000) Subject: Set FGREP and EGREP. X-Git-Tag: Release-1-6-1b~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbaf208d0c4f1cb4f3ef3ca6fd8973e5f58948d8;p=thirdparty%2Fautomake.git Set FGREP and EGREP. --- diff --git a/tests/defs b/tests/defs index ef4c1d122..4fb17c766 100644 --- a/tests/defs +++ b/tests/defs @@ -127,6 +127,23 @@ esac # generated for the tests do not use the installed tools. export AUTOMAKE ACLOCAL +# POSIX no longer requires 'egrep' and 'fgrep', +# but some hosts lack 'grep -E' and 'grep -F'. +if test -z "$EGREP"; then + if echo a | (grep -E '(a|b)') >/dev/null 2>&1; then + EGREP='grep -E' + else + EGREP='egrep' + fi +fi +if test -z "$FGREP"; then + if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1; then + FGREP='grep -F' + else + FGREP='fgrep' + fi +fi + # The tests call `make -e' but we do not want $srcdir from the evironment # to override the definition from the Makefile. testsrcdir=$srcdir