aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure101
1 files changed, 29 insertions, 72 deletions
diff --git a/configure b/configure
index 9ba4225..7a9b4c4 100755
--- a/configure
+++ b/configure
@@ -1276,83 +1276,40 @@ if [ -f ${srcdir}/${Makefile_in} ] ; then
esac
# real copy now in ./Makefile.tem
- # prepend warning about editing, and a bunch of variables.
- rm -f ${Makefile}
- cat > ${Makefile} <<EOF
-# ${NO_EDIT}
-VPATH = ${srcdir}
-links = ${configlinks}
-host_alias = ${host_alias}
-host_cpu = ${host_cpu}
-host_vendor = ${host_vendor}
-host_os = ${host_os}
-host_canonical = ${host_cpu}-${host_vendor}-${host_os}
-target_alias = ${target_alias}
-target_cpu = ${target_cpu}
-target_vendor = ${target_vendor}
-target_os = ${target_os}
-target_canonical = ${target_cpu}-${target_vendor}-${target_os}
-EOF
- case "${build}" in
- "") ;;
- *) cat >> ${Makefile} << EOF
-build_alias = ${build_alias}
-build_cpu = ${build_cpu}
-build_vendor = ${build_vendor}
-build_os = ${build_os}
-build_canonical = ${build_cpu}-${build_vendor}-${build_os}
-EOF
- esac
-
- case "${package_makefile_frag}" in
- "") ;;
- /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
- *) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
- esac
-
- case "${target_makefile_frag}" in
- "") ;;
- /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
- *) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
- esac
-
- case "${host_makefile_frag}" in
- "") ;;
- /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
- *) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
- esac
-
- if [ "${site_makefile_frag}" != "" ] ; then
- echo site_makefile_frag = ${site_makefile_frag} >>${Makefile}
- fi
-
- echo enable_shared = ${enable_shared} >> ${Makefile}
- echo enable_threads = ${enable_threads} >> ${Makefile}
- # record if we want to rumtime library stuff installed in libsubdir.
+ # record if we want runtime library stuff installed in libsubdir.
+ # Blank means no.
if test -z "${enable_version_specific_runtime_libs}"; then
- echo enable_version_specific_runtime_libs = no >> ${Makefile}
- else
- echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
+ enable_version_specific_runtime_libs=no
fi
- # Emit a macro which describes the file containing gcc's
- # version number.
- echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
- # And emit a macro defining gcc's version number.
- echo gcc_version = ${gcc_version} >> ${Makefile}
+ sed -e "s|@configlinks@|${configlinks}|" \
+ -e "s|@build_alias@|${build_alias}|" \
+ -e "s|@build_cpu@|${build_cpu}|" \
+ -e "s|@build_vendor@|${build_vendor}|" \
+ -e "s|@build_os@|${build_os}|" \
+ -e "s|@host_alias@|${host_alias}|" \
+ -e "s|@host_cpu@|${host_cpu}|" \
+ -e "s|@host_vendor@|${host_vendor}|" \
+ -e "s|@host_os@|${host_os}|" \
+ -e "s|@target_alias@|${target_alias}|" \
+ -e "s|@target_cpu@|${target_cpu}|" \
+ -e "s|@target_vendor@|${target_vendor}|" \
+ -e "s|@target_os@|${target_os}|" \
+ -e "s|@target_makefile_frag@|${target_makefile_frag}|" \
+ -e "s|@host_makefile_frag@|${host_makefile_frag}|" \
+ -e "s|@enable_shared@|${enable_shared}|" \
+ -e "s|@enable_threads@|${enable_threads}|" \
+ -e "s|@enable_version_specific_runtime_libs@|${enable_version_specific_runtime_libs}|" \
+ -e "s|@gcc_version_trigger@|${gcc_version_trigger}|" \
+ -e "s|@gcc_version@|${gcc_version}|" \
+ ./Makefile.tem > ${Makefile}
+ mv -f ${Makefile} ./Makefile.tem
+ # Real copy now in Makefile.tem; no prologue.
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
# remove any form feeds.
- rm -f ./Makefile.tm2
- sedtemp=sed.$$
- cat >$sedtemp <<EOF
-s:@configdirs@:${configdirs}:
-EOF
- sed -f $sedtemp ./Makefile.tem > ./Makefile.tm2
- rm -f $sedtemp
- rm -f ./Makefile.tem
- mv ./Makefile.tm2 ./Makefile.tem
- sed -e "s|@prefix@|${prefix}|" \
+ sed -e "s|@configdirs@|${configdirs}|" \
+ -e "s|@prefix@|${prefix}|" \
-e "s|@exec_prefix@|${exec_prefix}|" \
-e "s|@bindir@|${bindir}|" \
-e "s|@sbindir@|${sbindir}|" \
@@ -1404,7 +1361,7 @@ EOF
-e "s:@DEFAULT_YACC@:${DEFAULT_YACC}:" \
-e "s:@DEFAULT_LEX@:${DEFAULT_LEX}:" \
-e "s:@DEFAULT_M4@:${DEFAULT_M4}:" \
- ./Makefile.tem >> ${Makefile}
+ ./Makefile.tem > ${Makefile}
sed -e "s:@GDB_TK@:${GDB_TK}:" ${Makefile} >${Makefile}.tem
mv -f ${Makefile}.tem ${Makefile}