aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDavid D. Zuhn <zoo@cygnus>1993-09-15 02:11:35 +0000
committerDavid D. Zuhn <zoo@cygnus>1993-09-15 02:11:35 +0000
commit03abfb2cbc1fea0f8dc86498fdd5646ddab2f8f5 (patch)
tree1904f38973fb90022b153608818b1b14d15b2c96 /configure
parent06f63f95db91d560f8776bb7aa49c5053c331aaa (diff)
downloadgdb-03abfb2cbc1fea0f8dc86498fdd5646ddab2f8f5.zip
gdb-03abfb2cbc1fea0f8dc86498fdd5646ddab2f8f5.tar.gz
gdb-03abfb2cbc1fea0f8dc86498fdd5646ddab2f8f5.tar.bz2
fix replacement of multiline values for CC and CXX
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure b/configure
index 5bbd7b0..9dcc294 100755
--- a/configure
+++ b/configure
@@ -796,6 +796,11 @@ EOF
echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
fi
+ # make sure that some sort of reasonable default exists for these
+ # two variables
+ CXX=${CXX-"g++ -O"}
+ CC=${CC-cc}
+
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
# remove any form feeds.
if [ -z "${subdirs}" ]; then
@@ -808,6 +813,24 @@ EOF
fi
sed -e "s:^prefix[ ]*=.*$:prefix = ${prefix}:" \
-e "s:^exec_prefix[ ]*=.*$:exec_prefix = ${exec_prefix}:" \
+ -e "/^CC[ ]*=/{
+ b chkcc
+ :contcc
+ N
+ :chkcc
+ s/\\\\$//
+ t contcc
+ s/^CC[ ]*=.*$/CC = ${CC}/
+ }" \
+ -e "/^CXX[ ]*=/{
+ b chkcxx
+ :contcxx
+ N
+ :chkcxx
+ s/\\\\$//
+ t contcxx
+ s/^CXX[ ]*=.*$/CXX = ${CXX}/
+ }" \
-e "s:^srcdir[ ]*=.*$:srcdir = ${makesrcdir}:" \
-e "s/ //" \
-e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \