868aa6b6c31e7a9929aef5412d907655ca2e9ed2
[platform/upstream/automake.git] / m4 / missing.m4
1 ## --------------------------------------------------------- ##
2 ## Fake the existence of programs that GNU maintainers use.  ##
3 ## --------------------------------------------------------- ##
4
5 # serial 2
6
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"}
12 AC_SUBST($1)])
13
14
15 # AM_MISSING_HAS_RUN
16 # ------------------
17 # Define MISSING if not defined so far and test if it supports --run.
18 # If it does, set am_missing_run to use it, otherwise, to nothing.
19 AC_DEFUN([AM_MISSING_HAS_RUN],
20 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
21 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
22 # Use eval to expand $SHELL
23 if eval "$MISSING --run true"; then
24   am_missing_run="$MISSING --run "
25 else
26   am_missing_run=
27   am_backtick='`'
28   AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
29 fi
30 ])