[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bug in symbolic link determination
From: |
Mikael Andersson |
Subject: |
Possible bug in symbolic link determination |
Date: |
Wed, 14 Feb 2007 11:55:04 -0600 (CST) |
User-agent: |
FuseMail W |
Autoconf version 2.59
Creating a configure script with autoconf produces the following check for
symbolic links:
rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 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
as_ln_s='cp -p'
else
as_ln_s='ln -s'
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$$.file
My question is, why does it execute:
ln -s conf$$.file conf$$
and then test a file:
test -f conf$$.exe
The ".exe" here could be a bug and the "test -f conf$$.exe" seems to be
false always in this case (the file does not exist so it is not a regular
file. Because it is false it is always assumed that ln -s can be used.
Any comments?
Cheers,
-Mikke
- Possible bug in symbolic link determination,
Mikael Andersson <=