autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4-gary-AC_PROG_GREP.patch [Was Re: Find best grep for AIX]


From: Paul Eggert
Subject: Re: 4-gary-AC_PROG_GREP.patch [Was Re: Find best grep for AIX]
Date: 23 Jan 2004 23:51:39 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Second thoughts on that patch:

"Gary V.Vaughan" <address@hidden> writes:

> --- lib/autoconf/programs.m4 23 Jan 2004 08:21:51 -0000 1.18
> +++ lib/autoconf/programs.m4 23 Jan 2004 22:38:54 -0000
> @@ -267,29 +267,104 @@ AC_DEFUN([AC_PROG_AWK],
>  # AC_PROG_EGREP
>  # -------------
>  AC_DEFUN([AC_PROG_EGREP],
> -[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
> -   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
> -    then ac_cv_prog_egrep='grep -E'
> -    else ac_cv_prog_egrep='egrep'
> -    fi])
> - EGREP=$ac_cv_prog_egrep
> - AC_SUBST([EGREP])
> +[AC_REQUIRE([AC_PROG_GREP])dnl
> +if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1
> +then ac_cv_prog_EGREP="$GREP -E"
> +else
> +  _AC_PROG_GREP(EGREP, [egrep gegrep])
> +fi
>  ])# AC_PROG_EGREP

Why change the externally visible behavior?  Wouldn't it be better to
see the "Checking for egrep...."  messages in all cases?  With the
above change, the code checks for $GREP -E without issuing the
"Checking for egrep..."  message.  I think the original behavior
was better.

Likewise for fgrep.

AC_PROG_GREP and AC_PROG_SED seem to be sharing a lot of code;
shouldn't it be factored out?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]