]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/gperf/aclocal.m4
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / gperf / aclocal.m4
1 AC_PREREQ(2.12)
2
3 AC_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.
15 AC_MSG_CHECKING(for a BSD compatible install)
16 if test -z "$INSTALL"; then
17 AC_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"
52 fi
53 dnl We do special magic for INSTALL instead of AC_SUBST, to get
54 dnl relative paths right. 
55 AC_MSG_RESULT($INSTALL)
56 AC_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.
59 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='$(INSTALL)'
60 AC_SUBST(INSTALL_PROGRAM)dnl
61 if test -z "$INSTALL_DATA"; then
62   case "$INSTALL" in
63     cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
64     * )         INSTALL_DATA='$(INSTALL) -m 644' ;;
65   esac
66 fi
67 AC_SUBST(INSTALL_DATA)dnl
68 ])
69