From 60b3f4eb672a85de28ecaad47ed426f8c8fe6c32 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 20 Oct 2012 23:15:26 -0700 Subject: [PATCH] zgrep: do not assume standard 'grep' has -e On Solaris 11, /usr/bin/grep -e does not work. Problem reported by Petr Sumbera in . * Makefile.am (.in): Substitute @GREP@. * configure.ac (AC_PROG_GREP): Invoke. * zgrep.in (grep): Use @GREP@. --- Makefile.am | 1 + configure.ac | 1 + zgrep.in | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 86a0297..90fff2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -84,6 +84,7 @@ SUFFIXES = .in $(AM_V_GEN)sed \ -e 's|/bin/sh|$(SHELL)|g' \ -e 's|[@]bindir@|'\''$(bindir)'\''|g' \ + -e 's|[@]GREP@|$(GREP)|g' \ -e 's|[@]VERSION@|$(VERSION)|g' \ $(srcdir)/$@.in >$@-t \ && chmod a+x $@-t \ diff --git a/configure.ac b/configure.ac index 4705ce4..ecb362b 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. AC_PROG_CC_STDC AM_PROG_CC_C_O AC_PROG_CPP +AC_PROG_GREP AC_CHECK_TOOL([NM], [nm], [nm]) AC_PROG_LN_S AC_PROG_RANLIB diff --git a/zgrep.in b/zgrep.in index f878acf..aec4a67 100644 --- a/zgrep.in +++ b/zgrep.in @@ -28,7 +28,7 @@ case $1 in esac PATH=$bindir:$PATH -grep='${GREP-grep}' +grep='${GREP-'\''@GREP@'\''}' version='zgrep (gzip) @VERSION@ Copyright (C) 2010-2012 Free Software Foundation, Inc. -- 2.47.2