1 dnl See whether we need a declaration for a function.
2 AC_DEFUN(GCC_NEED_DECLARATION,
3 [AC_MSG_CHECKING([whether $1 must be declared])
4 AC_CACHE_VAL(gcc_cv_decl_needed_$1,
20 [char *(*pfn) = (char *(*)) $1],
21 gcc_cv_decl_needed_$1=no, gcc_cv_decl_needed_$1=yes)])
22 AC_MSG_RESULT($gcc_cv_decl_needed_$1)
23 if test $gcc_cv_decl_needed_$1 = yes; then
24 gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
25 AC_DEFINE_UNQUOTED($gcc_tr_decl)
29 dnl See if symbolic links work and if not, try to substitute either hard links or simple copy.
30 AC_DEFUN(GCC_PROG_LN_S,
31 [AC_MSG_CHECKING(whether ln -s works)
32 AC_CACHE_VAL(gcc_cv_prog_LN_S,
35 if ln -s conftestdata_f conftestdata_t 2>/dev/null
37 gcc_cv_prog_LN_S="ln -s"
39 if ln conftestdata_f conftestdata_t 2>/dev/null
46 rm -f conftestdata_f conftestdata_t
48 LN_S="$gcc_cv_prog_LN_S"
49 if test "$gcc_cv_prog_LN_S" = "ln -s"; then
52 if test "$gcc_cv_prog_LN_S" = "ln"; then
53 AC_MSG_RESULT([no, using ln])
55 AC_MSG_RESULT([no, and neither does ln, so using cp])
61 dnl See if hard links work and if not, try to substitute either symbolic links or simple copy.
63 [AC_MSG_CHECKING(whether ln works)
64 AC_CACHE_VAL(gcc_cv_prog_LN,
67 if ln conftestdata_f conftestdata_t 2>/dev/null
71 if ln -s conftestdata_f conftestdata_t 2>/dev/null
73 gcc_cv_prog_LN="ln -s"
78 rm -f conftestdata_f conftestdata_t
81 if test "$gcc_cv_prog_LN" = "ln"; then
84 if test "$gcc_cv_prog_LN" = "ln -s"; then
85 AC_MSG_RESULT([no, using ln -s])
87 AC_MSG_RESULT([no, and neither does ln -s, so using cp])
93 AC_DEFUN(EGCS_PROG_INSTALL,
94 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
95 # Find a good install program. We prefer a C program (faster),
96 # so one script is as good as another. But avoid the broken or
97 # incompatible versions:
98 # SysV /etc/install, /usr/sbin/install
99 # SunOS /usr/etc/install
102 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
103 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
104 # ./install, which can be erroneously created by make from ./install.sh.
105 AC_MSG_CHECKING(for a BSD compatible install)
106 if test -z "$INSTALL"; then
107 AC_CACHE_VAL(ac_cv_path_install,
108 [ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
109 for ac_dir in $PATH; do
110 # Account for people who put trailing slashes in PATH elements.
112 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
114 # OSF1 and SCO ODT 3.0 have their own names for install.
115 for ac_prog in ginstall scoinst install; do
116 if test -f $ac_dir/$ac_prog; then
117 if test $ac_prog = install &&
118 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
119 # AIX install. It has an incompatible calling convention.
120 # OSF/1 installbsd also uses dspmsg, but is usable.
123 ac_cv_path_install="$ac_dir/$ac_prog -c"
133 if test "${ac_cv_path_install+set}" = set; then
134 INSTALL="$ac_cv_path_install"
136 # As a last resort, use the slow shell script. We don't cache a
137 # path for INSTALL within a source directory, because that will
138 # break other packages using the cache if that directory is
139 # removed, or if the path is relative.
140 INSTALL="$ac_install_sh"
143 dnl We do special magic for INSTALL instead of AC_SUBST, to get
144 dnl relative paths right.
145 AC_MSG_RESULT($INSTALL)
148 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
149 # It thinks the first close brace ends the variable substitution.
150 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
151 AC_SUBST(INSTALL_PROGRAM)dnl
153 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
154 AC_SUBST(INSTALL_DATA)dnl