2005-08-02 18:25:17 +00:00
|
|
|
AC_DEFUN([SAH_LINKS],[
|
|
|
|
AC_PATH_PROGS(LN,[ln cp copy])
|
|
|
|
if test -n "$LN" ; then
|
|
|
|
AC_MSG_CHECKING(whether '$LN' works)
|
2017-04-11 13:16:08 +00:00
|
|
|
mkdir -p lntest
|
|
|
|
cp ${ac_aux_dir}/config.sub lntest/
|
|
|
|
if $LN lntest/config.sub erase.me$$ && \
|
2005-08-02 18:25:17 +00:00
|
|
|
test -e erase.me$$ && \
|
2017-04-11 13:16:08 +00:00
|
|
|
diff lntest/config.sub erase.me$$ >/dev/null 2>&5
|
2005-08-02 18:25:17 +00:00
|
|
|
then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
LN=cp
|
|
|
|
fi
|
2017-04-11 13:16:08 +00:00
|
|
|
/bin/rm erase.me$$ lntest/config.sub
|
|
|
|
/bin/rmdir ln_test
|
2005-08-02 18:25:17 +00:00
|
|
|
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)
|
2012-11-02 00:58:57 +00:00
|
|
|
if $LN_S ${ac_aux_dir}/config.sub erase.me$$ && \
|
2005-08-02 18:25:17 +00:00
|
|
|
test -e erase.me$$ && \
|
2017-04-11 13:16:08 +00:00
|
|
|
diff ${ac_aux_dir}/config.sub erase.me$$ >/dev/null 2>&5
|
2005-08-02 18:25:17 +00:00
|
|
|
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
|
2017-04-11 13:16:08 +00:00
|
|
|
])
|