configure: also detect plain grep
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jan 17 00:37:59 2012 +0100 (2012-01-17)
changeset 28398e8313e40f8a
parent 2838 822af73497bf
child 2840 188d58cfe7cf
configure: also detect plain grep

We need just 'grep', and we need to be able to call it with 'grep -E'.
Check for 'grep', and bailout if egrep != grep -E

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Makefile.in
configure.ac
     1.1 --- a/Makefile.in	Mon Jan 16 23:36:42 2012 +0100
     1.2 +++ b/Makefile.in	Tue Jan 17 00:37:59 2012 +0100
     1.3 @@ -53,7 +53,7 @@
     1.4  export datarootdir     := @datarootdir@
     1.5  export install         := @INSTALL@
     1.6  export bash            := @_BASH@
     1.7 -export grep            := @EGREP@
     1.8 +export grep            := @GREP@
     1.9  export make            := @MAKE@
    1.10  export sed             := @SED@
    1.11  export libtool         := @LIBTOOL@
     2.1 --- a/configure.ac	Mon Jan 16 23:36:42 2012 +0100
     2.2 +++ b/configure.ac	Tue Jan 17 00:37:59 2012 +0100
     2.3 @@ -91,7 +91,11 @@
     2.4  # just what I seem to experience...)
     2.5  #---------------------------------------------------------------------
     2.6  AC_PROG_INSTALL
     2.7 +AC_PROG_GREP
     2.8  AC_PROG_EGREP
     2.9 +AS_IF(
    2.10 +    [test ! "$EGREP" = "$GREP -E"],
    2.11 +    [AC_MSG_ERROR([egrep is not $GREP -E])])
    2.12  AC_CACHE_VAL([ac_cv_path_SED],
    2.13      [AC_ARG_WITH([sed],
    2.14          AS_HELP_STRING([--with-sed=PATH],