--program-transform-name* | --program-t*)
# Double any backslashes or dollar signs in the argument
program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
- program_transform_nameoption="--program-transform-nameoption='$optarg'"
+ program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
;;
--rm)
removing=--rm
guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
if host_alias=`${guesssys}`
then
+ # If the string we are going to use for
+ # the target is a prefix of the string
+ # we just guessed for the host, then
+ # assume we are running native, and force
+ # the same string for both target and host.
+ case $target_alias in
+ NOTARGET)
+ case $undefs in
+ NOUNDEFS) ;;
+ *)
+ if expr $host_alias : $undefs >/dev/null
+ then
+ host_alias=$undefs
+ fi
+ ;;
+ esac
+ ;;
+ *)
+ if expr $host_alias : $target_alias >/dev/null
+ then
+ host_alias=$target_alias
+ fi
+ ;;
+ esac
echo "Configuring for a ${host_alias} host." 1>&2
arguments="--host=$host_alias $arguments"
else
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
# real copy now in ${subdir}/Makefile.tem
- # Remove patch suffixes from host name.
- # See similar code in configure.in.
- # Example: 'sparc-sun-sunos4.1.3_U1'
- host_osnop=`echo ${host_os} | sed '/sunos/s/_U1//'`
-
# prepend warning about editting, and a bunch of variables.
rm -f ${Makefile}
cat > ${Makefile} <<EOF
host_cpu = ${host_cpu}
host_vendor = ${host_vendor}
host_os = ${host_os}
-host_canonical = ${host_cpu}-${host_vendor}-${host_osnop}
+host_canonical = ${host_cpu}-${host_vendor}-${host_os}
target_alias = ${target_alias}
target_cpu = ${target_cpu}
target_vendor = ${target_vendor}
EOF
case "${build}" in
"") ;;
- *) build_osnop=`echo ${build_os} | sed '/sunos/s/_U1//'`
- cat >> ${Makefile} << EOF
+ *) 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_osnop}
+build_canonical = ${build_cpu}-${build_vendor}-${build_os}
EOF
esac