1 ## --------------------------------------------------------- ##
2 ## Fake the existence of programs that GNU maintainers use. ##
3 ## --------------------------------------------------------- ##
7 # AM_MISSING_PROG(NAME, PROGRAM)
8 # ------------------------------
9 AC_DEFUN([AM_MISSING_PROG],
10 [AC_REQUIRE([AM_MISSING_HAS_RUN])
11 $1=${$1-"${am_missing_run}$2"}
15 # AM_MISSING_INSTALL_SH
16 # ---------------------
17 # Like AM_MISSING_PROG, but only looks for install-sh.
18 AC_DEFUN([AM_MISSING_INSTALL_SH],
19 [AC_REQUIRE([AM_MISSING_HAS_RUN])
20 if test -z "$install_sh"; then
21 for install_sh in "$ac_aux_dir/install-sh" \
22 "$ac_aux_dir/install.sh" \
23 "${am_missing_run}${ac_auxdir}/install-sh";
25 test -f "$install_sh" && break
27 # FIXME: an evil hack: we remove the SHELL invocation from
28 # install_sh because automake adds it back in. Sigh.
29 install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
31 AC_SUBST(install_sh)])
36 # Define MISSING if not defined so far and test if it supports --run.
37 # If it does, set am_missing_run to use it, otherwise, to nothing.
38 AC_DEFUN([AM_MISSING_HAS_RUN],
39 [test x"${MISSING+set}" = xset ||
40 MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
41 # Use eval to expand $SHELL
42 if eval "$MISSING --run true"; then
43 am_missing_run="$MISSING --run "
47 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])