From 760ae1ab6b4924f311ca5b6056c7d7099e8324bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Mon, 13 Oct 1997 20:09:31 -0700 Subject: [PATCH] now searches for working m4 Rev: bin/mktestsuite:1.6 --- bin/mktestsuite | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bin/mktestsuite b/bin/mktestsuite index dbf97f854b..2065fb334b 100755 --- a/bin/mktestsuite +++ b/bin/mktestsuite @@ -1,5 +1,21 @@ #!/bin/sh +## +## We attempt to locate a working m4 +## +M4=m4 +IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" +for d in $PATH; do + test -z "$d" && ac_dir=. + if test -f $d/m4; then + M4=$d/m4 + if echo 'divert(-1)changequote([[,]])define(DOIT,ifelse([foo],foo,[DOIT($1)]))DOIT([[m4exit(1)]])' | $d/m4 >/dev/null; then + break + fi + fi +done +IFS="$save_ifs" + ( cat <<\EOF divert(-1) @@ -93,5 +109,5 @@ test_true($1>=$1) ]]) EOF cat $1 -) | (shift ; m4 $@ ) +) | (shift ; $M4 $@ ) -- GitLab