]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/programs.m4 (_AC_PROG_GREP): Take an additional
authorGary V. Vaughan <gary@gnu.org>
Tue, 20 Apr 2004 19:09:22 +0000 (19:09 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 20 Apr 2004 19:09:22 +0000 (19:09 +0000)
match expression argument, as different greps have different
regular expression flavours.
(AC_PROG_FGREP): Pass 'FGREP'. fgrep treats all match chars as
literals.
(AC_PROG_EGREP): Pass 'EGREP$'.
(AC_PROG_GREP): Pass 'GREP$'.

ChangeLog
lib/autoconf/programs.m4

index 33e8f84159de3b771cfc55f37ea8e0695291931b..2c8106760bde17190b1a466ce4b90f2c99c7869e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-04-20  Gary V. Vaughan  <gary@gnu.org>
+
+       * lib/autoconf/programs.m4 (_AC_PROG_GREP): Take an additional
+       match expression argument, as different greps have different
+       regular expression flavours.
+       (AC_PROG_FGREP): Pass 'FGREP'. fgrep treats all match chars as
+       literals.
+       (AC_PROG_EGREP): Pass 'EGREP$'.
+       (AC_PROG_GREP): Pass 'GREP$'.
+
 2004-04-20  Albert Chin-A-Young  <china@thewrittenword.com>
 
        * lib/autoconf/programs.m4 (AC_PROG_GREP): Cache variable
index 2bdec224752211fb213d7935982e3c22b66e18d7..3375830afa0a65d6c27ef42f1ceee9107795e82d 100644 (file)
@@ -366,7 +366,7 @@ AC_CACHE_CHECK([for egrep], ac_cv_path_EGREP,
    [if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1
    then ac_cv_path_EGREP="$GREP -E"
    else
-     _AC_PROG_GREP(EGREP, egrep)
+     _AC_PROG_GREP(EGREP, egrep, [EGREP$])
    fi])
  EGREP="$ac_cv_path_EGREP"
  AC_SUBST([EGREP])
@@ -381,7 +381,7 @@ AC_CACHE_CHECK([for fgrep], ac_cv_path_FGREP,
    [if echo 'ab*c' | ($GREP -F 'ab*c') >/dev/null 2>&1
    then ac_cv_path_FGREP="$GREP -F"
    else
-     _AC_PROG_GREP(FGREP, fgrep)
+     _AC_PROG_GREP(FGREP, fgrep, FGREP)
    fi])
  FGREP="$ac_cv_path_FGREP"
  AC_SUBST([FGREP])
@@ -394,14 +394,15 @@ AC_CACHE_CHECK([for fgrep], ac_cv_path_FGREP,
 # the longest lines possible.  Prefer GNU grep if found.
 AC_DEFUN([AC_PROG_GREP],
 [AC_CACHE_CHECK([for grep that handles long lines], ac_cv_path_GREP,
-   [_$0(GREP, [grep ggrep])])
+   [_$0(GREP, [grep ggrep], [GREP$])])
  GREP="$ac_cv_path_GREP"
  AC_SUBST([GREP])
 ])
+# _AC_PROG_GREP(VARIABLE, PROGNAME-LIST, MATCH-EXPRESSION)
 m4_define([_AC_PROG_GREP],
 [_AC_PATH_PROG_FEATURE_CHECK([$1], [$2],
        [_AC_FEATURE_CHECK_LENGTH([ac_path_$1], [ac_cv_path_$1],
-               ["$ac_path_$1" '$1$'], [$1])])
+               ["$ac_path_$1" '$3'], [$1])])
 ])