aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1997-09-16 18:01:15 +0000
committerJeff Law <law@redhat.com>1997-09-16 18:01:15 +0000
commit0208b0ddc56d463533dc9f74937fc3395fbff6ab (patch)
tree8e5c72f2c25d3213c7bd4f08582b17c0d298d913 /configure
parent1a1ec983c0e1b22409f63b535dbbb11b75d9d853 (diff)
downloadgdb-0208b0ddc56d463533dc9f74937fc3395fbff6ab.zip
gdb-0208b0ddc56d463533dc9f74937fc3395fbff6ab.tar.gz
gdb-0208b0ddc56d463533dc9f74937fc3395fbff6ab.tar.bz2
Uli's libio/libstdc++ changes.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure91
1 files changed, 55 insertions, 36 deletions
diff --git a/configure b/configure
index 0185f0e..3fae2e7 100755
--- a/configure
+++ b/configure
@@ -712,6 +712,16 @@ t loop
rm -f Makefile.cc
fi
+if [ -z "${CFLAGS}" -a -r Makefile ]; 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
+
if [ -z "${CXX}" -a -r Makefile ]; then
sed -n -e ':loop
/\\$/ N
@@ -722,6 +732,16 @@ t loop
rm -f Makefile.cc
fi
+if [ -z "${CXXFLAGS}" -a -r Makefile ]; 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
+
# Generate a default definition for YACC. This is used if the makefile can't
# locate bison or byacc in objdir.
@@ -1025,78 +1045,77 @@ EOF
if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
- # Conditionalize for this site from "Makefile.in" (or whatever it's called) into Makefile.tem
- rm -f ${subdir}/Makefile.tem
- case "${site}" in
+ # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem.
+ rm -f ${subdir}/${Makefile}.tem
+ case "${package_makefile_frag}" in
"") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
*)
+ if [ ! -f ${package_makefile_frag} ] ; then
+ package_makefile_frag=${srcdir}/${package_makefile_frag}
+ fi
+ if [ -f ${package_makefile_frag} ] ; then
+ sed -e "/^####/ r ${package_makefile_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem
+ else
+ echo '***' Expected package makefile fragment \"${package_makefile_frag}\" 1>&2
+ echo '***' is missing in ${PWD=`pwd`}. 1>&2
+ cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
+ fi
+ esac
+ # working copy now in ${Makefile}.tem
+
+ # Conditionalize for this site.
+ rm -f ${Makefile}
+ case "${site}" in
+ "") mv ${subdir}/Makefile.tem ${Makefile} ;;
+ *)
site_makefile_frag=${srcdir}/config/ms-${site}
if [ -f ${site_makefile_frag} ] ; then
- sed -e "/^####/ r ${site_makefile_frag}" ${srcdir}/${subdir}/${Makefile_in} \
- > ${subdir}/Makefile.tem
+ sed -e "/^####/ r ${site_makefile_frag}" ${subdir}/Makefile.tem \
+ > ${Makefile}
else
- cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
+ mv ${subdir}/Makefile.tem ${Makefile}
site_makefile_frag=
fi
;;
esac
- # working copy now in ${subdir}/Makefile.tem
+ # working copy now in ${Makefile}
# Conditionalize the makefile for this host.
- rm -f ${Makefile}
+ rm -f ${subdir}/Makefile.tem
case "${host_makefile_frag}" in
- "") mv ${subdir}/Makefile.tem ${Makefile} ;;
+ "") mv ${Makefile} ${subdir}/Makefile.tem ;;
*)
if [ ! -f ${host_makefile_frag} ] ; then
host_makefile_frag=${srcdir}/${host_makefile_frag}
fi
if [ -f ${host_makefile_frag} ] ; then
- sed -e "/^####/ r ${host_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
+ sed -e "/^####/ r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
else
echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
echo '***' is missing in ${PWD=`pwd`}. 1>&2
- mv ${subdir}/Makefile.tem ${Makefile}
+ mv ${Makefile} ${subdir}/Makefile.tem
fi
esac
- # working copy now in ${Makefile}
+ # working copy now in ${subdir)/Makefile.tem
# Conditionalize the makefile for this target.
- rm -f ${subdir}/Makefile.tem
+ rm -f ${Makefile}
case "${target_makefile_frag}" in
- "") mv ${Makefile} ${subdir}/Makefile.tem ;;
+ "") mv ${subdir}/Makefile.tem ${Makefile} ;;
*)
if [ ! -f ${target_makefile_frag} ] ; then
target_makefile_frag=${srcdir}/${target_makefile_frag}
fi
if [ -f ${target_makefile_frag} ] ; then
- sed -e "/^####/ r ${target_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
+ sed -e "/^####/ r ${target_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
else
- mv ${Makefile} ${subdir}/Makefile.tem
+ mv ${subdir}/Makefile.tem ${Makefile}
target_makefile_frag=
fi
;;
esac
- # real copy now in ${subdir}/Makefile.tem
-
- # Conditionalize the makefile for this package.
- rm -f ${Makefile}
- case "${package_makefile_frag}" in
- "") mv ${subdir}/Makefile.tem ${Makefile} ;;
- *)
- if [ ! -f ${package_makefile_frag} ] ; then
- package_makefile_frag=${srcdir}/${package_makefile_frag}
- fi
- if [ -f ${package_makefile_frag} ] ; then
- sed -e "/^####/ r ${package_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
- rm -f ${subdir}/Makefile.tem
- else
- echo '***' Expected package makefile fragment \"${package_makefile_frag}\" 1>&2
- echo '***' is missing in ${PWD=`pwd`}. 1>&2
- mv ${subdir}/Makefile.tem ${Makefile}
- fi
- esac
- # working copy now in ${Makefile}
+ # real copy now in ${Makefile}
mv ${Makefile} ${subdir}/Makefile.tem