aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorH.J. Lu <hjl@gnu.ai.mit.edu>1998-03-17 01:24:55 +0000
committerManfred Hollstein <manfred@gcc.gnu.org>1998-03-17 01:24:55 +0000
commitbd064fd5065282561c96f8cc0808fa67d57bb647 (patch)
tree3fb714935f99bd5765fa9f0a117069dacc3129e8 /configure
parent04b9356733c40d828c1382875b02ab672f4564ac (diff)
downloadgcc-bd064fd5065282561c96f8cc0808fa67d57bb647.zip
gcc-bd064fd5065282561c96f8cc0808fa67d57bb647.tar.gz
gcc-bd064fd5065282561c96f8cc0808fa67d57bb647.tar.bz2
configure: When making link, also check the current directory.
8 * configure: When making link, also check the current directory. The configure scripts may create one. From-SVN: r18641
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 11 insertions, 4 deletions
diff --git a/configure b/configure
index 5421fa7..ed54ced 100755
--- a/configure
+++ b/configure
@@ -993,27 +993,34 @@ for subdir in . ${subdirs} ; do
set ${links}; link=$1; shift; links=$*
if [ ! -r ${srcdir}/${file} ] ; then
+ if [ ! -r ${file} ] ; then
+
echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
exit 1
+ else
+ srcfile=${file}
+ fi
+ else
+ srcfile=${srcdir}/${file}
fi
${remove} -f ${link}
# Make a symlink if possible, otherwise try a hard link
- if ${symbolic_link} ${srcdir}/${file} ${link} >/dev/null 2>&1 ; then
+ if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
true
else
# We need to re-remove the file because Lynx leaves a
# very strange directory there when it fails an NFS symlink.
${remove} -r -f ${link}
- ${hard_link} ${srcdir}/${file} ${link}
+ ${hard_link} ${srcfile} ${link}
fi
if [ ! -r ${link} ] ; then
- echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
+ echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
exit 1
fi
- echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
+ echo "Linked \"${link}\" to \"${srcfile}\"."
done
# Create a .gdbinit file which runs the one in srcdir