* automake.texi (Texinfo): Mention vers*.texi.
[automake.git] / m4 / missing.m4
blob70c13a21be4968f00a40306fad6531357c3d4d9d
1 ## --------------------------------------------------------- ##
2 ## Fake the existence of programs that GNU maintainers use.  ##
3 ## --------------------------------------------------------- ##
4 dnl AM_MISSING_PROG(NAME, PROGRAM)
5 AC_DEFUN(AM_MISSING_PROG, [
6 AC_REQUIRE([AM_MISSING_HAS_RUN])
7 $1=${$1-"${am_missing_run}$2"}
8 AC_SUBST($1)])
10 dnl Like AM_MISSING_PROG, but only looks for install-sh.
11 dnl AM_MISSING_INSTALL_SH()
12 AC_DEFUN(AM_MISSING_INSTALL_SH, [
13 AC_REQUIRE([AM_MISSING_HAS_RUN])
14 if test -z "$install_sh"; then
15    install_sh="$ac_aux_dir/install-sh"
16    test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh"
17    test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh"
18    dnl FIXME: an evil hack: we remove the SHELL invocation from
19    dnl install_sh because automake adds it back in.  Sigh.
20    install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`"
22 AC_SUBST(install_sh)])
24 dnl AM_MISSING_HAS_RUN.
25 dnl Define MISSING if not defined so far and test if it supports --run.
26 dnl If it does, set am_missing_run to use it, otherwise, to nothing.
27 AC_DEFUN([AM_MISSING_HAS_RUN], [
28 test x"${MISSING+set}" = xset || \
29   MISSING="\${SHELL} `CDPATH=: && cd $ac_aux_dir && pwd`/missing"
30 dnl Use eval to expand $SHELL
31 if eval "$MISSING --run :"; then
32   am_missing_run="$MISSING --run "
33 else
34   am_missing_run=
35   am_backtick='`'
36   AC_MSG_WARN([${am_backtick}missing' script is too old or missing])