]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acspecific.m4 (AC_PROG_LN_S): Detect DJGPP < 2.04, which only
authorAkim Demaille <akim@epita.fr>
Mon, 22 Jan 2001 19:21:58 +0000 (19:21 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 22 Jan 2001 19:21:58 +0000 (19:21 +0000)
supports 'ln -s' for executables.

ChangeLog
acspecific.m4
doc/autoconf.texi
lib/autoconf/specific.m4

index 43419e53b1157d292fe2b80e424945bf41c9c74d..21626002b75d16f0fba0a5c997dc48b0380ddeef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index f223ae59e77ee95c2d691328b175e299c5cf726b..d4194f7b809b2fed4719b5f5f13ddc2900c7540d 100644 (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])
index abe0ef40d73bc74f14e3eafe2c7b27e10aef81d7..d02692dc13512f1266c43f61d9e612ae4796987f 100644 (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}
index f223ae59e77ee95c2d691328b175e299c5cf726b..d4194f7b809b2fed4719b5f5f13ddc2900c7540d 100644 (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])