From 1cc1bf05a8105431d45088e3dcf90c7ea7ccb0bf Mon Sep 17 00:00:00 2001 From: "Eric J. Korpela" Date: Tue, 2 Aug 2005 18:25:17 +0000 Subject: [PATCH] Added autoconf macro to check if soft and hard links really work, or are just faked. svn path=/trunk/boinc/; revision=6976 --- m4/sah_links.m4 | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 m4/sah_links.m4 diff --git a/m4/sah_links.m4 b/m4/sah_links.m4 new file mode 100644 index 0000000000..492282ddbf --- /dev/null +++ b/m4/sah_links.m4 @@ -0,0 +1,36 @@ +AC_DEFUN([SAH_LINKS],[ + AC_PATH_PROGS(LN,[ln cp copy]) + if test -n "$LN" ; then + AC_MSG_CHECKING(whether '$LN' works) + if $LN config.sub erase.me$$ && \ + test -e erase.me$$ && \ + diff config.sub erase.me$$ >/dev/null 2>&5 + then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + LN=cp + fi + /bin/rm erase.me$$ + else + LN=cp + fi + AC_PROG_LN_S + if test -n "$LN_S" ; then + AC_MSG_CHECKING(whether '$LN_S' really works or whether I'm deluding myself) + if $LN_S config.sub erase.me$$ && \ + test -e erase.me$$ && \ + diff config.sub erase.me$$ >/dev/null 2>&5 + then + AC_MSG_RESULT(it works) + else + AC_MSG_RESULT(I'm deluding myself) + LN_S=cp + fi + /bin/rm erase.me$$ + else + LN_S=cp + fi +]) + +