diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1997-09-11 13:39:08 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1997-09-11 13:39:08 -0700 |
commit | ac64120eeb133593a61eb39d71c3baa0907e7c7a (patch) | |
tree | 93b7f3c3b69970b2e9f016b8565d78e982265094 /gcc/aclocal.m4 | |
parent | 7f69978172e53d7b484e2ba31eda75b7285b7096 (diff) | |
download | gcc-ac64120eeb133593a61eb39d71c3baa0907e7c7a.tar.gz |
Add Fred Fish's LN/LN_S patch.
From-SVN: r15415
Diffstat (limited to 'gcc/aclocal.m4')
-rw-r--r-- | gcc/aclocal.m4 | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index 6a45a4cfb81..01be979903c 100644 --- a/gcc/aclocal.m4 +++ b/gcc/aclocal.m4 @@ -25,3 +25,67 @@ if test $gcc_cv_decl_needed_$1 = yes; then AC_DEFINE_UNQUOTED($gcc_tr_decl) fi ])dnl + +dnl See if symbolic links work and if not, try to substitute either hard links or simple copy. +AC_DEFUN(GCC_PROG_LN_S, +[AC_MSG_CHECKING(whether ln -s works) +AC_CACHE_VAL(gcc_cv_prog_LN_S, +[rm -f conftestdata_to +echo >conftestdata_from +if ln -s conftestdata_from conftestdata_to 2>/dev/null +then + gcc_cv_prog_LN_S="ln -s" +else + if ln conftestdata_from conftestdata_to 2>/dev/null + then + gcc_cv_prog_LN_S=ln + else + gcc_cv_prog_LN_S=cp + fi +fi +rm -f conftestdata_from conftestdata_to +])dnl +LN_S="$gcc_cv_prog_LN_S" +if test "$gcc_cv_prog_LN_S" = "ln -s"; then + AC_MSG_RESULT(yes) +else + if test "$gcc_cv_prog_LN_S" = "ln"; then + AC_MSG_RESULT([no, using ln]) + else + AC_MSG_RESULT([no, and neither does ln, so using cp]) + fi +fi +AC_SUBST(LN_S)dnl +]) + +dnl See if hard links work and if not, try to substitute either symbolic links or simple copy. +AC_DEFUN(GCC_PROG_LN, +[AC_MSG_CHECKING(whether ln works) +AC_CACHE_VAL(gcc_cv_prog_LN, +[rm -f conftestdata_to +echo >conftestdata_from +if ln conftestdata_from conftestdata_to 2>/dev/null +then + gcc_cv_prog_LN="ln" +else + if ln -s conftestdata_from conftestdata_to 2>/dev/null + then + gcc_cv_prog_LN="ln -s" + else + gcc_cv_prog_LN=cp + fi +fi +rm -f conftestdata_from conftestdata_to +])dnl +LN="$gcc_cv_prog_LN" +if test "$gcc_cv_prog_LN" = "ln"; then + AC_MSG_RESULT(yes) +else + if test "$gcc_cv_prog_LN" = "ln -s"; then + AC_MSG_RESULT([no, using ln -s]) + else + AC_MSG_RESULT([no, and neither does ln -s, so using cp]) + fi +fi +AC_SUBST(LN)dnl +]) |