diff options
author | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1998-11-08 22:54:40 +0000 |
---|---|---|
committer | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1998-11-08 22:54:40 +0000 |
commit | ab54d900e8884a90129c629a592dbd9f0cdad36b (patch) | |
tree | d3ada05f637dc4125e5607d651ddc92e77a33bd3 /m4/missing.m4 | |
parent | 8e9318ef30f626a592428c4de92d7f6b96dd6d30 (diff) | |
download | grep-ab54d900e8884a90129c629a592dbd9f0cdad36b.tar.gz |
update
use our own instead of default.
now don't rely on matcher = argv[0] set explicitly at compilation.
* src/grep.c: The Matcher is not set to argv[0] but
explicitly by a #define MATCHER at compile time default is "grep".
Diffstat (limited to 'm4/missing.m4')
-rw-r--r-- | m4/missing.m4 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/m4/missing.m4 b/m4/missing.m4 new file mode 100644 index 00000000..39178df2 --- /dev/null +++ b/m4/missing.m4 @@ -0,0 +1,18 @@ +## --------------------------------------------------------- ## +## Fake the existence of programs that GNU maintainers use. ## +## --------------------------------------------------------- ## +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) |