|
Packit |
bbfece |
# AC_PROG_INSTALL
|
|
Packit |
bbfece |
# ---------------
|
|
Packit |
bbfece |
#
|
|
Packit |
bbfece |
# This macro is stolen from Autoconf 2.61a-341.
|
|
Packit |
bbfece |
# It requires `install' to be able to install multiple files at once.
|
|
Packit |
bbfece |
# This file will be obsolete when GCC moves to Autoconf 2.62.
|
|
Packit |
bbfece |
|
|
Packit |
bbfece |
m4_version_prereq([2.62], [],
|
|
Packit |
bbfece |
[
|
|
Packit |
bbfece |
AC_DEFUN([AC_PROG_INSTALL],
|
|
Packit |
bbfece |
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
|
Packit |
bbfece |
dnl AC_REQUIRE_AUX_FILE([install-sh])dnl This line does not work with 2.59.
|
|
Packit |
bbfece |
# Find a good install program. We prefer a C program (faster),
|
|
Packit |
bbfece |
# so one script is as good as another. But avoid the broken or
|
|
Packit |
bbfece |
# incompatible versions:
|
|
Packit |
bbfece |
# SysV /etc/install, /usr/sbin/install
|
|
Packit |
bbfece |
# SunOS /usr/etc/install
|
|
Packit |
bbfece |
# IRIX /sbin/install
|
|
Packit |
bbfece |
# AIX /bin/install
|
|
Packit |
bbfece |
# AmigaOS /C/install, which installs bootblocks on floppy discs
|
|
Packit |
bbfece |
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
|
|
Packit |
bbfece |
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
|
|
Packit |
bbfece |
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
|
Packit |
bbfece |
# OS/2's system install, which has a completely different semantic
|
|
Packit |
bbfece |
# ./install, which can be erroneously created by make from ./install.sh.
|
|
Packit |
bbfece |
# Reject install programs that cannot install multiple files.
|
|
Packit |
bbfece |
AC_MSG_CHECKING([for a BSD-compatible install])
|
|
Packit |
bbfece |
if test -z "$INSTALL"; then
|
|
Packit |
bbfece |
AC_CACHE_VAL(ac_cv_path_install,
|
|
Packit |
bbfece |
[_AS_PATH_WALK([$PATH],
|
|
Packit |
bbfece |
[# Account for people who put trailing slashes in PATH elements.
|
|
Packit |
bbfece |
case $as_dir/ in
|
|
Packit |
bbfece |
./ | .// | /[cC]/* | \
|
|
Packit |
bbfece |
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
|
|
Packit |
bbfece |
?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
|
|
Packit |
bbfece |
/usr/ucb/* ) ;;
|
|
Packit |
bbfece |
*)
|
|
Packit |
bbfece |
# OSF1 and SCO ODT 3.0 have their own names for install.
|
|
Packit |
bbfece |
# Don't use installbsd from OSF since it installs stuff as root
|
|
Packit |
bbfece |
# by default.
|
|
Packit |
bbfece |
for ac_prog in ginstall scoinst install; do
|
|
Packit |
bbfece |
for ac_exec_ext in '' $ac_executable_extensions; do
|
|
Packit |
bbfece |
if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then
|
|
Packit |
bbfece |
if test $ac_prog = install &&
|
|
Packit |
bbfece |
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
|
|
Packit |
bbfece |
# AIX install. It has an incompatible calling convention.
|
|
Packit |
bbfece |
:
|
|
Packit |
bbfece |
elif test $ac_prog = install &&
|
|
Packit |
bbfece |
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
|
|
Packit |
bbfece |
# program-specific install script used by HP pwplus--don't use.
|
|
Packit |
bbfece |
:
|
|
Packit |
bbfece |
else
|
|
Packit |
bbfece |
rm -rf conftest.one conftest.two conftest.dir
|
|
Packit |
bbfece |
echo one > conftest.one
|
|
Packit |
bbfece |
echo two > conftest.two
|
|
Packit |
bbfece |
mkdir conftest.dir
|
|
Packit |
bbfece |
if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
|
|
Packit |
bbfece |
test -s conftest.one && test -s conftest.two &&
|
|
Packit |
bbfece |
test -s conftest.dir/conftest.one &&
|
|
Packit |
bbfece |
test -s conftest.dir/conftest.two
|
|
Packit |
bbfece |
then
|
|
Packit |
bbfece |
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
|
|
Packit |
bbfece |
break 3
|
|
Packit |
bbfece |
fi
|
|
Packit |
bbfece |
fi
|
|
Packit |
bbfece |
fi
|
|
Packit |
bbfece |
done
|
|
Packit |
bbfece |
done
|
|
Packit |
bbfece |
;;
|
|
Packit |
bbfece |
esac])
|
|
Packit |
bbfece |
rm -rf conftest.one conftest.two conftest.dir
|
|
Packit |
bbfece |
])dnl
|
|
Packit |
bbfece |
if test "${ac_cv_path_install+set}" = set; then
|
|
Packit |
bbfece |
INSTALL=$ac_cv_path_install
|
|
Packit |
bbfece |
else
|
|
Packit |
bbfece |
# As a last resort, use the slow shell script. Don't cache a
|
|
Packit |
bbfece |
# value for INSTALL within a source directory, because that will
|
|
Packit |
bbfece |
# break other packages using the cache if that directory is
|
|
Packit |
bbfece |
# removed, or if the value is a relative name.
|
|
Packit |
bbfece |
INSTALL=$ac_install_sh
|
|
Packit |
bbfece |
fi
|
|
Packit |
bbfece |
fi
|
|
Packit |
bbfece |
dnl Do special magic for INSTALL instead of AC_SUBST, to get
|
|
Packit |
bbfece |
dnl relative names right.
|
|
Packit |
bbfece |
AC_MSG_RESULT([$INSTALL])
|
|
Packit |
bbfece |
|
|
Packit |
bbfece |
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
|
|
Packit |
bbfece |
# It thinks the first close brace ends the variable substitution.
|
|
Packit |
bbfece |
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
|
|
Packit |
bbfece |
AC_SUBST(INSTALL_PROGRAM)dnl
|
|
Packit |
bbfece |
|
|
Packit |
bbfece |
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
|
|
Packit |
bbfece |
AC_SUBST(INSTALL_SCRIPT)dnl
|
|
Packit |
bbfece |
|
|
Packit |
bbfece |
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
|
Packit |
bbfece |
AC_SUBST(INSTALL_DATA)dnl
|
|
Packit |
bbfece |
])# AC_PROG_INSTALL
|
|
Packit |
bbfece |
])
|