3 AC_DEFUN(CL_PROG_RANLIB, [AC_CHECK_PROG(RANLIB, ranlib, ranlib, true)])
5 AC_DEFUN(CL_PROG_INSTALL,
6 [dnl This is mostly copied from AC_PROG_INSTALL.
7 # Find a good install program. We prefer a C program (faster),
8 # so one script is as good as another. But avoid the broken or
9 # incompatible versions:
10 # SysV /etc/install, /usr/sbin/install
11 # SunOS /usr/etc/install
14 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
15 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
16 # ./install, which can be erroneously created by make from ./install.sh.
17 AC_MSG_CHECKING(for a BSD compatible install)
18 if test -z "$INSTALL"; then
19 AC_CACHE_VAL(cl_cv_path_install,
20 [ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
21 for ac_dir in $PATH; do
22 # Account for people who put trailing slashes in PATH elements.
24 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
26 # OSF1 and SCO ODT 3.0 have their own names for install.
27 for ac_prog in ginstall installbsd scoinst install; do
28 if test -f $ac_dir/$ac_prog; then
29 if test $ac_prog = install &&
30 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
31 # AIX install. It has an incompatible calling convention.
32 # OSF/1 installbsd also uses dspmsg, but is usable.
35 if test $ac_prog = installbsd &&
36 grep src/bos $ac_dir/$ac_prog >/dev/null 2>&1; then
37 # AIX installbsd doesn't work without option "-g".
40 cl_cv_path_install="$ac_dir/$ac_prog -c"
50 # As a last resort, use cp.
51 test -z "$cl_cv_path_install" && cl_cv_path_install="cp"
53 INSTALL="$cl_cv_path_install"
55 dnl We do special magic for INSTALL instead of AC_SUBST, to get
56 dnl relative paths right.
57 AC_MSG_RESULT($INSTALL)
59 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
60 # It thinks the first close brace ends the variable substitution.
61 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
62 AC_SUBST(INSTALL_PROGRAM)dnl
63 if test -z "$INSTALL_DATA"; then
65 cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
66 * ) INSTALL_DATA='$(INSTALL) -m 644' ;;
69 AC_SUBST(INSTALL_DATA)dnl