"Townsend, Paul" <a...@purdue.edu> wrote: > I am probably incorrectly interpreting the autoconf code that > checks whether or not 'ln -s target dir' works. It seems the > check code is satisfied if > > mkdir a > > touch b > > ln -s b a > > works without aborting. On Ubuntu this does create a 'b' symlink > in 'a' but that symlink is an infinite a/b->a/b.
AFAIK this has been the normal behavior of "ln -s" for as long as symlinks have existed. Indeed, because "ln -s" (unlike "ln" without -s) does not stat the link target, it would still work even if you left out the "touch b". > In fact I think the only way to succeed is to use > > ln -s $PWD/b a or, better, "ln -s ../b a" One way to help keep such things straight is to make symlinks only in the current directory, e.g. ( cd a && ln -s ../b . ) > i.e., the ln app should be a heck of a lot smarter. Arguably it should have originally been designed to issue a warning if the target does not exist or if the result will be a loop, but to change its behavior now would break backward compatibility.