2006-04-10 Stepan Kasal * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Move the check for DJGPP < 2.04 before the check for MSYS. Index: lib/m4sugar/m4sh.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v retrieving revision 1.178 diff -u -r1.178 m4sh.m4 --- lib/m4sugar/m4sh.m4 10 Apr 2006 17:55:33 -0000 1.178 +++ lib/m4sugar/m4sh.m4 10 Apr 2006 21:25:13 -0000 @@ -857,7 +857,7 @@ # 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,20 +867,23 @@ 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 +as_ln_s= +if ln -s conf$$.file conf$$ 2>/dev/null; then + # Don't use ln on DJGPP < 2.04; it doesn't have any links. # 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 + test -f conf$$.exe && as_ln_s='cp -p' - else + # MSYS `ln -s' fails with a target directory. + ln -s conf$$.file conf$$.dir 2>/dev/null && as_ln_s='ln -s' +fi +if test -z "$as_ln_s"; then + if ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null