2000-01-29 18:30:15 +08:00
|
|
|
## --------------------------------------------------------- ##
|
|
|
|
## 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,
|
2000-11-11 15:05:02 +08:00
|
|
|
[AC_MSG_CHECKING([for working $2])
|
2000-01-29 18:30:15 +08:00
|
|
|
# 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
|
2000-11-11 15:05:02 +08:00
|
|
|
AC_MSG_RESULT([found])
|
2000-01-29 18:30:15 +08:00
|
|
|
else
|
2000-10-15 10:12:38 +08:00
|
|
|
$1="$SHELL $3/missing $2"
|
2000-11-11 15:05:02 +08:00
|
|
|
AC_MSG_RESULT([missing])
|
2000-01-29 18:30:15 +08:00
|
|
|
fi
|
|
|
|
AC_SUBST($1)])
|