Blame aclocal.m4

Packit b27855
AC_PREREQ(2.12)
Packit b27855
Packit b27855
AC_DEFUN(CL_PROG_INSTALL,
Packit b27855
[dnl This is mostly copied from AC_PROG_INSTALL.
Packit b27855
# Find a good install program.  We prefer a C program (faster),
Packit b27855
# so one script is as good as another.  But avoid the broken or
Packit b27855
# incompatible versions:
Packit b27855
# SysV /etc/install, /usr/sbin/install
Packit b27855
# SunOS /usr/etc/install
Packit b27855
# IRIX /sbin/install
Packit b27855
# AIX /bin/install
Packit b27855
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
Packit b27855
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Packit b27855
# ./install, which can be erroneously created by make from ./install.sh.
Packit b27855
AC_MSG_CHECKING(for a BSD compatible install)
Packit b27855
if test -z "$INSTALL"; then
Packit b27855
AC_CACHE_VAL(cl_cv_path_install,
Packit b27855
[  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
Packit b27855
  for ac_dir in $PATH; do
Packit b27855
    # Account for people who put trailing slashes in PATH elements.
Packit b27855
    case "$ac_dir/" in
Packit b27855
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
Packit b27855
    *)
Packit b27855
      # OSF1 and SCO ODT 3.0 have their own names for install.
Packit b27855
      for ac_prog in ginstall installbsd scoinst install; do
Packit b27855
        if test -f $ac_dir/$ac_prog; then
Packit b27855
	  if test $ac_prog = install &&
Packit b27855
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
Packit b27855
	    # AIX install.  It has an incompatible calling convention.
Packit b27855
	    # OSF/1 installbsd also uses dspmsg, but is usable.
Packit b27855
	    :
Packit b27855
	  else
Packit b27855
	    if test $ac_prog = installbsd &&
Packit b27855
	      strings $ac_dir/$ac_prog | grep src/bos >/dev/null 2>&1; then
Packit b27855
	      # AIX installbsd doesn't work without option "-g".
Packit b27855
	      :
Packit b27855
	    else
Packit b27855
	      cl_cv_path_install="$ac_dir/$ac_prog -c"
Packit b27855
	      break 2
Packit b27855
	    fi
Packit b27855
	  fi
Packit b27855
	fi
Packit b27855
      done
Packit b27855
      ;;
Packit b27855
    esac
Packit b27855
  done
Packit b27855
  IFS="$ac_save_ifs"
Packit b27855
  # As a last resort, use cp.
Packit b27855
  test -z "$cl_cv_path_install" && cl_cv_path_install="cp"
Packit b27855
])dnl
Packit b27855
  INSTALL="$cl_cv_path_install"
Packit b27855
fi
Packit b27855
dnl We do special magic for INSTALL instead of AC_SUBST, to get
Packit b27855
dnl relative paths right. 
Packit b27855
AC_MSG_RESULT($INSTALL)
Packit b27855
AC_SUBST(INSTALL)dnl
Packit b27855
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
Packit b27855
# It thinks the first close brace ends the variable substitution.
Packit b27855
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
Packit b27855
AC_SUBST(INSTALL_PROGRAM)dnl
Packit b27855
if test -z "$INSTALL_DATA"; then
Packit b27855
  case "$INSTALL" in
Packit b27855
    cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
Packit b27855
    * )         INSTALL_DATA='$(INSTALL) -m 644' ;;
Packit b27855
  esac
Packit b27855
fi
Packit b27855
AC_SUBST(INSTALL_DATA)dnl
Packit b27855
])
Packit b27855