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,
33 [rm -f conftestdata_to
34 echo >conftestdata_from
35 if ln -s conftestdata_from conftestdata_to 2>/dev/null
37 gcc_cv_prog_LN_S="ln -s"
39 if ln conftestdata_from conftestdata_to 2>/dev/null
46 rm -f conftestdata_from conftestdata_to
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,
65 [rm -f conftestdata_to
66 echo >conftestdata_from
67 if ln conftestdata_from conftestdata_to 2>/dev/null
71 if ln -s conftestdata_from conftestdata_to 2>/dev/null
73 gcc_cv_prog_LN="ln -s"
78 rm -f conftestdata_from conftestdata_to
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])