From 82ff47d80320a5ead469f7e84f70aa847b195adf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 29 May 2002 22:30:17 +0000 Subject: [PATCH] (AC_PROG_EGREP, AC_PROG_FGREP): New macros. --- lib/autoconf/programs.m4 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4 index eb03a204..4284ce60 100644 --- a/lib/autoconf/programs.m4 +++ b/lib/autoconf/programs.m4 @@ -259,6 +259,31 @@ AC_DEFUN([AC_PROG_AWK], [AC_CHECK_PROGS(AWK, gawk mawk nawk 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_PROG_EGREP + +# AC_PROG_FGREP +# ------------- +AC_DEFUN([AC_PROG_FGREP], +[AC_CACHE_CHECK([for fgrep], [ac_cv_prog_fgrep], + [if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1 + then ac_cv_prog_fgrep='grep -F' + else ac_cv_prog_fgrep='fgrep' + fi]) + FGREP=$ac_cv_prog_fgrep + AC_SUBST([FGREP]) +])# AC_PROG_FGREP + + # AC_PROG_INSTALL # --------------- AC_DEFUN([AC_PROG_INSTALL],