From: Stepan Kasal Date: Wed, 12 Apr 2006 12:20:13 +0000 (+0000) Subject: * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Simplify the summary of X-Git-Tag: AUTOCONF-2.59c~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3c78a065bb3b01fd286b97ee0343c0e7c0bfdd4;p=thirdparty%2Fautoconf.git * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Simplify the summary of all the changes since 2006-04-07. --- diff --git a/ChangeLog b/ChangeLog index 04292730d..e39c42df0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-12 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Simplify the summary of + all the changes since 2006-04-07. + 2006-04-11 Ralf Wildenhues * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): If `ln -s file1 file2' diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 6506dc95d..aac29eec6 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -857,7 +857,7 @@ _AS_LINENO_WORKS || { # Don't use conftest.sym to avoid file name issues on DJGPP, where this # would yield conftest.sym.exe for DJGPP < 2.04. And don't use `conftest' # as base name to avoid prohibiting concurrency (e.g., concurrent -# config.statuses). MSYS `ln -s' fails with a target directory. +# config.statuses). m4_defun([_AS_LN_S_PREPARE], [rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -867,19 +867,15 @@ else mkdir conf$$.dir fi echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null && - ln -s conf$$.file conf$$.dir 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 conf$$.exe; then - # Don't use ln at all; we don't have any links +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif rm -f conf$$ conf$$.dir/conf$$.file && - ln conf$$.file conf$$ 2>/dev/null && - ln conf$$.file conf$$.dir 2>/dev/null; then +elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p'