configure: correct the wording when checking grep -E

The check first checks that grep -E works, and only as a fallback tries
to find and use egrep. egrep is deprecated.

This change only corrects the output wording, not the checks themselves.

Closes #9471
This commit is contained in:
Daniel Stenberg 2022-09-11 00:10:26 +02:00
parent b62d236f7d
commit ae4d1437f1
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -85,21 +85,22 @@ if test -z "$GREP"; then
fi fi
AC_SUBST([GREP]) AC_SUBST([GREP])
dnl EGREP is mandatory for configure process and libtool. dnl 'grep -E' is mandatory for configure process and libtool.
dnl Set it now, allowing it to be changed later. dnl Set it now, allowing it to be changed later.
if test -z "$EGREP"; then if test -z "$EGREP"; then
dnl allow it to be overridden dnl allow it to be overridden
AC_MSG_CHECKING([that grep -E works])
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
AC_MSG_CHECKING([for egrep])
EGREP="$GREP -E" EGREP="$GREP -E"
AC_MSG_RESULT([$EGREP]) AC_MSG_RESULT([yes])
else else
AC_MSG_RESULT([no])
AC_PATH_PROG([EGREP], [egrep], [not_found], AC_PATH_PROG([EGREP], [egrep], [not_found],
[$PATH:/usr/bin:/usr/local/bin]) [$PATH:/usr/bin:/usr/local/bin])
fi fi
fi fi
if test -z "$EGREP" || test "$EGREP" = "not_found"; then if test -z "$EGREP" || test "$EGREP" = "not_found"; then
AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.]) AC_MSG_ERROR([grep -E is not working and is egrep not found in PATH. Cannot continue.])
fi fi
AC_SUBST([EGREP]) AC_SUBST([EGREP])