* acspecific.m4 (AC_PROG_LN_S): Detect DJGPP < 2.04, which only

supports 'ln -s' for executables.
This commit is contained in:
Akim Demaille 2001-01-22 19:21:58 +00:00
parent 2b4643604b
commit 58135fd6dc
4 changed files with 40 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2001-01-22 Tim Van Holder <tim.van.holder@pandora.be>
* acspecific.m4 (AC_PROG_LN_S): Detect DJGPP < 2.04, which only
supports 'ln -s' for executables.
2001-01-22 Akim Demaille <akim@epita.fr>
* autoscan.pl ($dir, $autoconf): New.

View File

@ -269,16 +269,25 @@ AC_SUBST(INSTALL_DATA)dnl
AC_DEFUN([AC_PROG_LN_S],
[AC_MSG_CHECKING([whether ln -s works])
AC_CACHE_VAL(ac_cv_prog_LN_S,
[rm -f conftest.sym conftest.file
[rm -f conftest conftest.exe conftest.file
echo >conftest.file
if ln -s conftest.file conftest.sym 2>/dev/null; then
ac_cv_prog_LN_S="ln -s"
elif ln conftest.file conftest.sym 2>/dev/null; then
dnl Don't use conftest.sym to avoid filename issues on DJGPP, where this
dnl would yield conftest.sym.exe for DJGPP < 2.04.
if ln -s conftest.file conftest 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conftest.exe; then
ac_cv_prog_LN_S="cp -p" # Don't use ln at all; we don't have any links
else
ac_cv_prog_LN_S="ln -s"
fi
elif ln conftest.file conftest 2>/dev/null; then
ac_cv_prog_LN_S=ln
else
ac_cv_prog_LN_S=cp
fi
rm -f conftest.sym conftest.file])dnl
rm -f conftest conftest.exe conftest.file])dnl
ac_ln_s=$ac_cv_prog_LN_S
AC_SUBST([LN_S], [$ac_cv_prog_LN_S])
if test "$ac_cv_prog_LN_S" = "ln -s"; then
AC_MSG_RESULT([yes])

View File

@ -6287,12 +6287,13 @@ alternation and @code{egrep}.
Don't rely on @command{ln} having a @option{-f} option. Symbolic links
are not available on old systems, use @samp{ln} as a fall back.
The @sc{djgpp} @command{ln} emulates soft links for executables by
generating a stub that in turn calls the real program. This feature
also works with nonexistent files like in the Unix spec. So @samp{ln -s
src dst} will generate @file{src.exe} which will attempt to call
@file{dst.exe}. But this feature only works for executables, therefore,
don't rely on symbolic links on @sc{djgpp}.
For versions of the @sc{djgpp} before 2.04, @command{ln} emulates soft
links for executables by generating a stub that in turn calls the real
program. This feature also works with nonexistent files like in the
Unix spec. So @samp{ln -s src dst} will generate @file{src.exe}, which
will attempt to call @file{dst.exe} if run. But this feature only works
for executables, so @command{cp} @option{-p} is used instead for these
systems. @sc{djgpp} version 2.04 and later have full symlink support.
@item @command{mv}

View File

@ -269,16 +269,25 @@ AC_SUBST(INSTALL_DATA)dnl
AC_DEFUN([AC_PROG_LN_S],
[AC_MSG_CHECKING([whether ln -s works])
AC_CACHE_VAL(ac_cv_prog_LN_S,
[rm -f conftest.sym conftest.file
[rm -f conftest conftest.exe conftest.file
echo >conftest.file
if ln -s conftest.file conftest.sym 2>/dev/null; then
ac_cv_prog_LN_S="ln -s"
elif ln conftest.file conftest.sym 2>/dev/null; then
dnl Don't use conftest.sym to avoid filename issues on DJGPP, where this
dnl would yield conftest.sym.exe for DJGPP < 2.04.
if ln -s conftest.file conftest 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conftest.exe; then
ac_cv_prog_LN_S="cp -p" # Don't use ln at all; we don't have any links
else
ac_cv_prog_LN_S="ln -s"
fi
elif ln conftest.file conftest 2>/dev/null; then
ac_cv_prog_LN_S=ln
else
ac_cv_prog_LN_S=cp
fi
rm -f conftest.sym conftest.file])dnl
rm -f conftest conftest.exe conftest.file])dnl
ac_ln_s=$ac_cv_prog_LN_S
AC_SUBST([LN_S], [$ac_cv_prog_LN_S])
if test "$ac_cv_prog_LN_S" = "ln -s"; then
AC_MSG_RESULT([yes])