| 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_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"; |
| 24 |
do |
| 25 |
test -f "$install_sh" && break |
| 26 |
done |
| 27 |
fi |
| 28 |
AC_SUBST(install_sh)]) |
| 29 |
|
| 30 |
|
| 31 |
# AM_MISSING_HAS_RUN |
| 32 |
# ------------------ |
| 33 |
# Define MISSING if not defined so far and test if it supports --run. |
| 34 |
# If it does, set am_missing_run to use it, otherwise, to nothing. |
| 35 |
AC_DEFUN([AM_MISSING_HAS_RUN], |
| 36 |
[test x"${MISSING+set}" = xset || |
| 37 |
MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing" |
| 38 |
# Use eval to expand $SHELL |
| 39 |
if eval "$MISSING --run true"; then |
| 40 |
am_missing_run="$MISSING --run " |
| 41 |
else |
| 42 |
am_missing_run= |
| 43 |
am_backtick='`' |
| 44 |
AC_MSG_WARN([${am_backtick}missing' script is too old or missing]) |
| 45 |
fi |
| 46 |
]) |
| 47 |
|
| 48 |
# AM_AUX_DIR_EXPAND |
| 49 |
|
| 50 |
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
| 51 |
# $ac_aux_dir to ${srcdir}/foo. In other projects, it is set to `.'. |
| 52 |
# Of course, Automake must honor this variable whenever it call a tool |
| 53 |
# from the auxiliary directory. The problem is that $srcdir (hence |
| 54 |
# $ac_aux_dir) can be either an absolute path or a path relative to |
| 55 |
# $top_srcdir or absolute, this depends on how configure is run. This |
| 56 |
# is pretty annoying since it makes $ac_aux_dir quite unusable in |
| 57 |
# subdirectories: on the top source directory, any form will work |
| 58 |
# fine, but in subdirectories relative pat needs to be adapted. |
| 59 |
# - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is |
| 60 |
# relative, but fail if $srcdir is absolute |
| 61 |
# - conversely, calling $ax_aux_dir/missing would fail if $srcdir is |
| 62 |
# absolute, and success on relative paths. |
| 63 |
# |
| 64 |
# Consequently, we define and use $am_aux_dir, the "always absolute" |
| 65 |
# version of $ac_aux_dir. |
| 66 |
|
| 67 |
AC_DEFUN([AM_AUX_DIR_EXPAND], [ |
| 68 |
# expand $ac_aux_dir to an absolute path |
| 69 |
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd` |
| 70 |
]) |