diff --git a/Config/defs.mk.in b/Config/defs.mk.in index 2bc17482a..c979307f7 100644 --- a/Config/defs.mk.in +++ b/Config/defs.mk.in @@ -75,6 +75,7 @@ IMPOPT = @IMPOPT@ # utilities AWK = @AWK@ +DIFF = @DIFF@ ANSI2KNR = @ANSI2KNR@ YODL = @YODL@ @YODL_OPTIONS@ YODL2TXT = @YODL@2txt diff --git a/Test/Makefile.in b/Test/Makefile.in index 09f37bf53..636746a45 100644 --- a/Test/Makefile.in +++ b/Test/Makefile.in @@ -53,6 +53,7 @@ check test: if ZTST_testlist="`for f in $(sdir)/$(TESTNUM)*.ztst; \ do echo $$f; done`" \ ZTST_srcdir="$(sdir)" \ + ZTST_diff_pg="$(DIFF)" \ ZTST_exe=$(dir_top)/Src/zsh@EXEEXT@ \ $(dir_top)/Src/zsh@EXEEXT@ +Z -f $(sdir)/$$ZTST_handler; then \ stat=0; \ diff --git a/Test/ztst.zsh b/Test/ztst.zsh index ea1b016d5..96a138483 100755 --- a/Test/ztst.zsh +++ b/Test/ztst.zsh @@ -382,7 +382,7 @@ ZTST_diff() { diff_ret=1 fi else - diff_out=$(diff -a "$@") + diff_out=$(${=ZTST_diff_pg} "$@") diff_ret="$?" if [[ "$diff_ret" != "0" ]]; then print -r -- "$diff_out" diff --git a/configure.ac b/configure.ac index 074141d38..7e9426148 100644 --- a/configure.ac +++ b/configure.ac @@ -611,6 +611,19 @@ AC_PROG_AWK dnl Check for mawk,gawk,nawk, then awk. AC_PROG_LN dnl Check for working ln, for "make install" AC_PROG_LN_S dnl Use ln -s/ln/cp for "make install.runhelp" AC_PROG_EGREP dnl sets $EGREP to grep -E or egrep + +dnl check for diff that supports -a +AC_CACHE_CHECK([for diff that supports -a],[ac_cv_path_DIFF], + [AC_PATH_PROGS_FEATURE_CHECK([DIFF],[diff gdiff], + [[ + echo "abcdef" > conftest.$$ + echo "abcdef" > conftest2.$$ + $ac_path_DIFF -a conftest.$$ conftest2.$$ > /dev/null 2>&1 + test "x$?" = x0 \ + && ac_cv_path_DIFF="$ac_path_DIFF -a" ac_path_DIFF_found=:]], + [ac_cv_path_DIFF="diff"])]) +AC_SUBST([DIFF],[$ac_cv_path_DIFF]) + AC_CHECK_PROGS([YODL], [yodl], [: yodl]) YODL_OPTIONS=''