summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/configure
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-07-20 03:29:51 +0000
committerobrien <obrien@FreeBSD.org>2001-07-20 03:29:51 +0000
commite55b0aebbf54426e20afda566c99dbca2d20aa89 (patch)
tree415722f688fd7a16e38a20dc5d1c4477f42180d8 /contrib/binutils/configure
parente4de9fb2c006e11baefc9c92a5a4ed38408d5361 (diff)
downloadFreeBSD-src-e55b0aebbf54426e20afda566c99dbca2d20aa89.zip
FreeBSD-src-e55b0aebbf54426e20afda566c99dbca2d20aa89.tar.gz
Import of Binutils from the FSF 2.11 branch [checked out 19-July-2001].
This fixes an annoying `ld' bug.
Diffstat (limited to 'contrib/binutils/configure')
-rwxr-xr-xcontrib/binutils/configure63
1 files changed, 37 insertions, 26 deletions
diff --git a/contrib/binutils/configure b/contrib/binutils/configure
index 57e22d8..af895c1 100755
--- a/contrib/binutils/configure
+++ b/contrib/binutils/configure
@@ -3,7 +3,7 @@
### WARNING: this file contains embedded tabs. Do not run untabify on this file.
# Configuration script
-# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -804,46 +804,57 @@ fi
# If CC and CXX are not set in the environment, and the Makefile
# exists, try to extract them from it. This is to handle running
-# ./config.status by hand.
-if [ -z "${CC}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
+# ./config.status by hand. Do the same for various Makefile fragments
+# so that they can specify these vars.
+for file in Mafefile ${package_makefile_rules_frag} \
+ ${site:+config/ms-${site}} ${host_makefile_frag} \
+ ${target_makefile_frag} ${package_makefile_frag}
+do
+ if ! test -r $file; then
+ file=${srcdir}/${file}
+ if ! test -r $file; then continue; fi
+ fi
+
+ if [ -z "${CC}" ]; then
+ sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
-/^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CC=`tail -1 Makefile.cc`
- rm -f Makefile.cc
-fi
+/^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
+ CC=`tail -1 Makefile.cc`
+ rm -f Makefile.cc
+ fi
-if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
+ if [ -z "${CFLAGS}" ]; then
+ sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
-/^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CFLAGS=`tail -1 Makefile.cc`
- rm -f Makefile.cc
-fi
+/^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
+ CFLAGS=`tail -1 Makefile.cc`
+ rm -f Makefile.cc
+ fi
-if [ -z "${CXX}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
+ if [ -z "${CXX}" ]; then
+ sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
-/^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CXX=`tail -1 Makefile.cc`
- rm -f Makefile.cc
-fi
+/^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
+ CXX=`tail -1 Makefile.cc`
+ rm -f Makefile.cc
+ fi
-if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
+ if [ -z "${CXXFLAGS}" ]; then
+ sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
-/^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CXXFLAGS=`tail -1 Makefile.cc`
- rm -f Makefile.cc
-fi
+/^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
+ CXXFLAGS=`tail -1 Makefile.cc`
+ rm -f Makefile.cc
+ fi
+done
# Generate a default definition for YACC. This is used if the makefile can't
# locate bison or byacc in objdir.
OpenPOWER on IntegriCloud