1
dnl Copyright (C) 1993-2004 Free Software Foundation, Inc.
2
dnl This file is free software, distributed under the terms of the GNU
3
dnl General Public License. As a special exception to the GNU General
4
dnl Public License, this file may be distributed as part of a program
5
dnl that contains a configuration script generated by Autoconf, under
6
dnl the same distribution terms as the rest of that program.
8
dnl From Bruno Haible, Marcus Daniels.
12
AC_DEFUN([CL_PROG_INSTALL],
13
[dnl This is mostly copied from AC_PROG_INSTALL.
14
# Find a good install program. We prefer a C program (faster),
15
# so one script is as good as another. But avoid the broken or
16
# incompatible versions:
17
# SysV /etc/install, /usr/sbin/install
18
# SunOS /usr/etc/install
21
# AFS /usr/afsws/bin/install, which mis-handles nonexistent args
22
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
23
# ./install, which can be erroneously created by make from ./install.sh.
24
AC_MSG_CHECKING(for a BSD compatible install)
25
if test -z "$INSTALL"; then
26
AC_CACHE_VAL(cl_cv_path_install,
27
[ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
28
for ac_dir in $PATH; do
29
# Account for people who put trailing slashes in PATH elements.
31
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
33
# OSF1 and SCO ODT 3.0 have their own names for install.
34
# Don't use installbsd from OSF since it installs stuff as root
36
for ac_prog in ginstall scoinst install; do
37
if test -f $ac_dir/$ac_prog; then
38
if test $ac_prog = install &&
39
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
40
# AIX install. It has an incompatible calling convention.
43
cl_cv_path_install="$ac_dir/$ac_prog -c"
52
# As a last resort, use the absolute pathname of cp.
53
if test -z "$cl_cv_path_install"; then
54
cl_cv_path_install="cp"
55
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
56
for ac_dir in $PATH; do
57
if test -f $ac_dir/cp; then
58
cl_cv_path_install="$ac_dir/cp"
65
INSTALL="$cl_cv_path_install"
67
dnl We do special magic for INSTALL instead of AC_SUBST, to get
68
dnl relative paths right.
69
AC_MSG_RESULT($INSTALL)
71
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
72
# It thinks the first close brace ends the variable substitution.
73
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
74
AC_SUBST(INSTALL_PROGRAM)dnl
75
if test -z "$INSTALL_DATA"; then
77
cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
78
* ) INSTALL_DATA='$(INSTALL) -m 644' ;;
81
AC_SUBST(INSTALL_DATA)dnl