dnl VIM_MISSING_PROG(NAME, PROGRAM, DIRECTORY, TEST_DIRECTORY) dnl The program must properly implement --version. dnl vimhack: CD to a directory to avoid current dnl vimhack: configuration alteration by poorly dnl vimhack: written scripts AC_DEFUN(VIM_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. vim_old_pwd=`pwd` cd $4 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 cd $vim_old_pwd AC_SUBST($1)])