Merge from vendor branch GCC:
[dragonfly.git] / contrib / gperf / aclocal.m4
1 AC_PREREQ(2.12)
2
3 AC_DEFUN(CL_PROG_RANLIB, [AC_CHECK_PROG(RANLIB, ranlib, ranlib, true)])
4
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
12 # IRIX /sbin/install
13 # AIX /bin/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.
23     case "$ac_dir/" in
24     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
25     *)
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.
33             :
34           else
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".
38               :
39             else
40               cl_cv_path_install="$ac_dir/$ac_prog -c"
41               break 2
42             fi
43           fi
44         fi
45       done
46       ;;
47     esac
48   done
49   IFS="$ac_save_ifs"
50   # As a last resort, use cp.
51   test -z "$cl_cv_path_install" && cl_cv_path_install="cp"
52 ])dnl
53   INSTALL="$cl_cv_path_install"
54 fi
55 dnl We do special magic for INSTALL instead of AC_SUBST, to get
56 dnl relative paths right. 
57 AC_MSG_RESULT($INSTALL)
58 AC_SUBST(INSTALL)dnl
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
64   case "$INSTALL" in
65     cp | */cp ) INSTALL_DATA='$(INSTALL)' ;;
66     * )         INSTALL_DATA='$(INSTALL) -m 644' ;;
67   esac
68 fi
69 AC_SUBST(INSTALL_DATA)dnl
70 ])
71