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