fall back to `cp'.
+2000-10-18 Akim Demaille <akim@epita.fr>
+
+ * acspecific.m4 (AC_PROG_LN_S): If neither `ln -s' nor `ln' work,
+ fall back to `cp'.
+
2000-10-17 Morten Eriksen <mortene@sim.no>
* acgeneral.m4 (AC_CHECK_TOOL): As AC_CHECK_PROG first tests the
echo >conftest.file
if ln -s conftest.file conftest.sym 2>/dev/null; then
ac_cv_prog_LN_S="ln -s"
-else
+elif ln conftest.file conftest.sym 2>/dev/null; then
ac_cv_prog_LN_S=ln
-fi])dnl
-LN_S=$ac_cv_prog_LN_S
+else
+ ac_cv_prog_LN_S=cp
+fi
+rm -f conftest.sym conftest.file])dnl
+AC_SUBST([LN_S], [$ac_cv_prog_LN_S])
if test "$ac_cv_prog_LN_S" = "ln -s"; then
- AC_MSG_RESULT(yes)
+ AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no, using $LN_S])
fi
-AC_SUBST(LN_S)dnl
])# AC_PROG_LN_S
@ovindex LN_S
If @samp{ln -s} works on the current file system (the operating system
and file system support symbolic links), set output variable @code{LN_S}
-to @samp{ln -s}, otherwise set it to @samp{ln}.
+to @samp{ln -s}, otherwise if @samp{ln} works, set @code{LN_S} to
+@samp{ln}, and otherwise set to @samp{cp}.
If the link is put in a directory other than the current directory, its
meaning depends on whether @samp{ln} or @samp{ln -s} is used. To safely
echo >conftest.file
if ln -s conftest.file conftest.sym 2>/dev/null; then
ac_cv_prog_LN_S="ln -s"
-else
+elif ln conftest.file conftest.sym 2>/dev/null; then
ac_cv_prog_LN_S=ln
-fi])dnl
-LN_S=$ac_cv_prog_LN_S
+else
+ ac_cv_prog_LN_S=cp
+fi
+rm -f conftest.sym conftest.file])dnl
+AC_SUBST([LN_S], [$ac_cv_prog_LN_S])
if test "$ac_cv_prog_LN_S" = "ln -s"; then
- AC_MSG_RESULT(yes)
+ AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no, using $LN_S])
fi
-AC_SUBST(LN_S)dnl
])# AC_PROG_LN_S