#! /bin/bash
host_libs="intl mmalloc libiberty opcodes bfd readline electric-fence gash db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui"
if [ "${enable_gdbgui}" = "yes" ] ; then
host_libs="${host_libs} libgui"
fi
if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then
libstdcxx_version="target-libstdc++-v3"
libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs'
else
libstdcxx_version="target-libio target-libstdc++"
libstdcxx_flags='-isystem $$s/libstdc++ -isystem $$s/libstdc++/std -isystem $$s/libstdc++/stl -isystem $$s/libio/ -isystem $$s/libio/stdio -L$$r/$(TARGET_SUBDIR)/libstdc++'
fi
host_tools="texinfo byacc flex bison binutils ld gas gcc cgen sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
target_libs="target-libiberty \
target-libgloss \
target-newlib \
${libstdcxx_version} \
target-libf2c \
target-libchill \
target-libffi \
target-libjava \
target-zlib \
target-boehm-gc \
target-qthreads \
target-libobjc"
target_tools="target-examples target-groff target-gperf"
native_only="autoconf automake libtool cvssrc emacs emacs19 fileutils find gawk gettext grep gzip hello indent ispell m4 rcs recode sed shellutils tar textutils gash uudecode wdiff gprof target-groff guile perl apache inet time ash bash bzip2 prms snavigator gnuserv target-gperf"
cross_only="target-libgloss target-newlib target-cygmon target-opcodes target-libstub"
configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libs} ${target_tools}`
srctrigger=move-if-change
srcname="gnu development package"
appdirs=""
if [ -d ${srcdir}/config ]; then
case "${host}" in
m68k-hp-hpux*)
host_makefile_frag="${host_makefile_frag} config/mh-hp300"
;;
m68k-apollo-sysv*)
host_makefile_frag="${host_makefile_frag} config/mh-apollo68"
;;
m68k-apollo-bsd*)
host_makefile_frag="${host_makefile_frag} config/mh-a68bsd"
;;
m88k-dg-dgux*)
host_makefile_frag="${host_makefile_frag} config/mh-dgux"
;;
m88k-harris-cxux*)
host_makefile_frag="${host_makefile_frag} config/mh-cxux"
;;
m88k-motorola-sysv*)
host_makefile_frag="${host_makefile_frag} config/mh-delta88"
;;
mips*-dec-ultrix*)
host_makefile_frag="${host_makefile_frag} config/mh-decstation"
;;
mips*-nec-sysv4*)
host_makefile_frag="${host_makefile_frag} config/mh-necv4"
;;
mips*-sgi-irix6*)
host_makefile_frag="${host_makefile_frag} config/mh-irix6"
;;
mips*-sgi-irix5*)
host_makefile_frag="${host_makefile_frag} config/mh-irix5"
;;
mips*-sgi-irix4*)
host_makefile_frag="${host_makefile_frag} config/mh-irix4"
;;
mips*-sgi-irix3*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv"
;;
mips*-*-sysv4*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
;;
mips*-*-sysv*)
host_makefile_frag="${host_makefile_frag} config/mh-riscos"
;;
i370-ibm-opened*)
host_makefile_frag="${host_makefile_frag} config/mh-openedition"
;;
i[3456]86-*-sysv5*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
;;
i[3456]86-*-dgux*)
host_makefile_frag="${host_makefile_frag} config/mh-dgux386"
;;
i[3456]86-ncr-sysv4.3*)
host_makefile_frag="${host_makefile_frag} config/mh-ncrsvr43"
;;
i[3456]86-ncr-sysv4*)
host_makefile_frag="${host_makefile_frag} config/mh-ncr3000"
;;
i[3456]86-*-sco3.2v5*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv"
;;
i[3456]86-*-sco*)
host_makefile_frag="${host_makefile_frag} config/mh-sco"
;;
i[3456]86-*-udk*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
;;
i[3456]86-*-isc*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv"
;;
i[3456]86-*-solaris2*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
;;
i[3456]86-*-aix*)
host_makefile_frag="${host_makefile_frag} config/mh-aix386"
;;
i[3456]86-*-msdosdjgpp*)
host_makefile_frag="${host_makefile_frag} config/mh-djgpp"
;;
*-cygwin*)
host_makefile_frag="${host_makefile_frag} config/mh-cygwin"
;;
*-mingw32*)
host_makefile_frag="${host_makefile_frag} config/mh-mingw32"
;;
*-interix*)
host_makefile_frag="${host_makefile_frag} config/mh-interix"
;;
*-windows*)
host_makefile_frag="${host_makefile_frag} config/mh-windows"
;;
vax-*-ultrix2*)
host_makefile_frag="${host_makefile_frag} config/mh-vaxult2"
;;
*-*-solaris2*)
host_makefile_frag="${host_makefile_frag} config/mh-solaris"
;;
m68k-sun-sunos*)
host_makefile_frag="${host_makefile_frag} config/mh-sun3"
;;
*-hp-hpux[78]*)
host_makefile_frag="${host_makefile_frag} config/mh-hpux8"
;;
*-hp-hpux*)
host_makefile_frag="${host_makefile_frag} config/mh-hpux"
;;
*-*-hiux*)
host_makefile_frag="${host_makefile_frag} config/mh-hpux"
;;
rs6000-*-lynxos*)
host_makefile_frag="${host_makefile_frag} config/mh-lynxrs6k"
;;
*-*-lynxos*)
host_makefile_frag="${host_makefile_frag} config/mh-lynxos"
;;
*-*-sysv4*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
;;
*-*-sysv*)
host_makefile_frag="${host_makefile_frag} config/mh-sysv"
;;
esac
fi
if [ -z "${CC}" ] && [ "${build}" = "${host}" ]; then
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
found=
for dir in $PATH; do
test -z "$dir" && dir=.
if test -f $dir/gcc; then
found=yes
break
fi
done
IFS="$save_ifs"
if [ -z "${found}" ] && [ -n "${host_makefile_frag}" ] && [ -f "${srcdir}/${host_makefile_frag}" ]; then
xx=`sed -n -e 's/^[ ]*CC[ ]*=[ ]*\(.*\)$/\1/p' < ${srcdir}/${host_makefile_frag}`
if [ -n "${xx}" ] ; then
CC=$xx
fi
fi
fi
if false && [ "${host}" = "${target}" ] && [ x${enable_shared} = x ]; then
case "${target}" in
alpha*-dec-osf*) enable_shared=yes ;;
alpha*-*-linux*) enable_shared=yes ;;
mips-sgi-irix5*) enable_shared=yes ;;
*) enable_shared=no ;;
esac
fi
case "${enable_shared}" in
yes) shared=yes ;;
no) shared=no ;;
"") shared=no ;;
*) shared=yes ;;
esac
if [ x${shared} = xyes ]; then
case "${host}" in
alpha*-*-linux*)
host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic"
;;
arm*-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-armpic"
;;
hppa*-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-papic"
;;
i[3456]86-*-cygwin*)
;;
i[3456]86-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-x86pic"
;;
i370-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-i370pic"
;;
ia64-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-ia64pic"
;;
sparc64-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-sparcpic"
;;
powerpc*-*-aix*)
;;
powerpc*-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-ppcpic"
;;
*-*-*)
if test -f ${srcdir}/config/mh-${host_cpu}pic; then
host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic"
fi
;;
esac
fi
rm -f mh-frag
if [ -n "${host_makefile_frag}" ] ; then
for f in ${host_makefile_frag}
do
cat ${srcdir}/$f >> mh-frag
done
host_makefile_frag=mh-frag
fi
case "${target}" in
v810*)
target_makefile_frag="${target_makefile_frag} config/mt-v810"
;;
i[3456]86-*-netware*)
target_makefile_frag="${target_makefile_frag} config/mt-netware"
;;
powerpc-*-netware*)
target_makefile_frag="${target_makefile_frag} config/mt-netware"
;;
*-*-linux-gnu*)
target_makefile_frag="${target_makefile_frag} config/mt-linux"
;;
*-*-aix4.[3456789]* | *-*-aix[56789].*)
target_makefile_frag="${target_makefile_frag} config/mt-aix43"
;;
mips*-*-pe | sh*-*-pe | *arm-wince-pe)
target_makefile_frag="${target_makefile_frag} config/mt-wince"
;;
esac
case "${enable_target_optspace}:${target}" in
yes:*)
target_makefile_frag="${target_makefile_frag} config/mt-ospace"
;;
:d30v-*)
target_makefile_frag="${target_makefile_frag} config/mt-d30v"
;;
:m32r-* | :d10v-* | :fr30-*)
target_makefile_frag="${target_makefile_frag} config/mt-ospace"
;;
no:* | :*)
;;
*)
echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
;;
esac
skipdirs=
gasdir=gas
use_gnu_ld=
use_gnu_as=
case ${with_x} in
yes | "") ;;
no)
skipdirs="${skipdirs} tk libgui gash"
;;
*)
echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2
;;
esac
is_cross_compiler=
if [ x"${host}" = x"${target}" ] ; then
skipdirs="${skipdirs} ${cross_only}"
is_cross_compiler=no
else
skipdirs="${skipdirs} ${native_only}"
is_cross_compiler=yes
fi
target_subdir=${target_alias}
if [ ! -d ${target_subdir} ] ; then
if mkdir ${target_subdir} ; then true
else
echo "'*** could not make ${PWD=`pwd`}/${target_subdir}" 1>&2
exit 1
fi
fi
copy_dirs=
if [ x"${with_headers}" != x ]; then
if [ x${is_cross_compiler} = xno ]; then
echo 1>&2 '***' --with-headers is only supported when cross compiling
exit 1
fi
case "${exec_prefixoption}" in
"") x=${prefix} ;;
*) x=${exec_prefix} ;;
esac
copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
fi
if [ x"${with_libs}" != x ]; then
if [ x${is_cross_compiler} = xno ]; then
echo 1>&2 '***' --with-libs is only supported when cross compiling
exit 1
fi
case "${exec_prefixoption}" in
"") x=${prefix} ;;
*) x=${exec_prefix} ;;
esac
for l in ${with_libs}; do
copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
done
fi
if [ x"${with_headers}" != x ] && [ x"${with_libs}" != x ]; then
if [ x"${with_newlib}" = x ]; then
with_newlib=no
fi
fi
if [ x${with_newlib} = xno ]; then
skipdirs="${skipdirs} target-newlib"
elif [ x${with_newlib} = xyes ]; then
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
fi
if [ x${with_stabs} = x ]; then
case "${target}" in
mips*-*-irix6*)
;;
mips*-*-* | alpha*-*-osf*)
with_stabs=yes;
withoptions="${withoptions} --with-stabs"
;;
esac
fi
set fnord ${copy_dirs}
shift
while [ $ if [ -f $2/COPIED ] && [ x"`cat $2/COPIED`" = x"$1" ]; then
:
else
echo Copying $1 to $2
if [ -d $2 ]; then
:
else
echo >config.temp
${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
fi
(cd $1; tar -cf - .) | (cd $2; tar -xpf -)
echo $1 > $2/COPIED
fi
shift; shift
done
case "${host}" in
i[3456]86-*-go32*)
configdirs="$configdirs dosrel" ;;
i[3456]86-*-mingw32*)
configdirs="$configdirs dosrel" ;;
*-cygwin*)
configdirs="$configdirs libtermcap dosrel" ;;
esac
noconfigdirs=""
case "${host}" in
i[3456]86-*-vsta)
noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext"
;;
i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext libffi"
;;
i[3456]86-*-mingw32*)
noconfigdirs="expect dejagnu cvs autoconf automake send-pr rcs guile perl texinfo apache inet libtool"
;;
i[3456]86-*-beos*)
noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
;;
*-*-cygwin*)
noconfigdirs="autoconf automake send-pr rcs guile perl texinfo apache inet"
;;
*-*-netbsd*)
noconfigdirs="rcs"
;;
ppc*-*-pe)
noconfigdirs="patch diff make tk tcl expect dejagnu cvssrc autoconf automake texinfo bison send-pr gprof rcs guile perl apache inet itcl tix db snavigator gnuserv"
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
;;
esac
case "${target}" in
*-*-netware)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss target-libffi"
;;
*-*-rtems*)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
*-*-vxworks*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
;;
alpha*-dec-osf*)
noconfigdirs="$noconfigdirs gas ld emacs fileutils target-newlib target-libgloss"
;;
alpha*-*-*vms*)
noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss target-libffi"
;;
alpha*-*-*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs target-libjava target-libffi target-zlib"
noconfigdirs="$noconfigdirs target-boehm-gc target-qthreads target-examples"
noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
noconfigdirs="$noconfigdirs expect dejagnu"
noconfigdirs="$noconfigdirs ${libstdcxx_version}"
skipdirs="$skipdirs target-newlib"
case "${host}" in
*-*-cygwin*) ;; *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
;;
esac
;;
arc-*-*)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
arm-*-coff*)
noconfigdirs="$noconfigdirs target-libgloss"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
arm-*-elf*)
noconfigdirs="$noconfigdirs target-libgloss"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
arm-*-oabi*)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
c4x-*-*)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
;;
c54x*-*-* | tic54x-*-*)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi gcc gdb newlib"
;;
thumb-*-coff)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
thumb-*-elf)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
thumb-*-oabi)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
strongarm-*-elf)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
strongarm-*-coff)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
thumb-*-pe)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
arm-*-riscix*)
noconfigdirs="$noconfigdirs ld target-libgloss target-libffi"
;;
d10v-*-*)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
;;
d30v-*-*)
;;
fr30-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
;;
h8300*-*-* | \
h8500-*-*)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
;;
hppa*-*-*elf* | \
hppa*-*-linux-gnu* | \
hppa*-*-lites* | \
hppa*64*-*-*)
;;
hppa*-*-*)
case "${CC}" in
"" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
*) ;;
esac
noconfigdirs="$noconfigdirs ld shellutils"
;;
ia64*-*-elf*)
noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
;;
i[3456]86-*-coff | i[3456]86-*-elf)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
;;
i[3456]86-*-go32* | i[3456]-*-msdosdjgpp*)
noconfigdirs="$noconfigdirs gdb ${libstdcxx_version} target-libffi"
;;
i[3456]86-*-mingw32*)
target_configdirs="$target_configdirs target-mingw"
noconfigdirs="$noconfigdirs expect target-libgloss target-libffi"
case "${host}" in
i[3456]86-*-mingw32) ;; *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigator gnuserv"
;;
esac
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss target-libffi"
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
case "${host}" in
*-*-cygwin*) ;; *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
;;
esac
;;
i[3456]86-*-pe)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
;;
i[3456]86-*-sco3.2v5*)
noconfigdirs="$noconfigdirs ld target-libgloss target-libffi"
;;
i[3456]86-*-sco*)
noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
;;
i[3456]86-*-solaris2*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
i[3456]86-*-sysv4*)
case "${CC}" in
"" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
*) ;;
esac
noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss target-libffi"
;;
i[3456]86-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
;;
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-librx target-libg++ target-libstdc++ target-libio target-libf2c target-libchill target-zlib target-libobjc"
;;
m68k-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
m68k-*-coff*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
mn10200-*-*)
noconfigdirs="$noconfigdirs target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
;;
mn10300-*-*)
noconfigdirs="$noconfigdirs target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
;;
powerpc-*-aix*)
noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss target-libffi ld"
use_gnu_ld=no
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
target_configdirs="$target_configdirs target-winsup"
noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv target-libffi"
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
;;
powerpcle-*-solaris*)
noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv target-libffi"
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
;;
powerpc-*-eabi)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
;;
rs6000-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib gprof cvssrc target-libffi"
;;
rs6000-*-aix*)
noconfigdirs="$noconfigdirs gprof target-libffi ld"
use_gnu_ld=no
;;
rs6000-*-*)
noconfigdirs="$noconfigdirs gprof target-libffi"
;;
m68k-apollo-*)
noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss target-libffi"
;;
mips*-*-irix5*)
noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss"
;;
mips*-*-irix6*)
noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss"
;;
mips*-dec-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
;;
mips*-*-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
;;
mipstx39-*-*)
noconfigdirs="$noconfigdirs gprof target-libffi" target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
;;
mips*-*-*)
noconfigdirs="$noconfigdirs gprof target-libffi"
;;
romp-*-*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss target-libffi"
;;
sh-*-*)
case "${host}" in
i[3456]86-*-vsta) ;; i[3456]86-*-go32*) ;; i[3456]86-*-msdosdjgpp*) ;; *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
esac
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
sparc-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
;;
sparc64-*-elf*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
noconfigdirs="target-libffi"
;;
sparclite-*-*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
noconfigdirs="target-libffi"
;;
sparc-*-sunos4*)
if [ x${is_cross_compiler} != xno ] ; then
noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss"
else
use_gnu_ld=no
fi
;;
v810-*-*)
noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss target-libffi"
;;
v850-*-*)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
v850e-*-*)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
v850ea-*-*)
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
vax-*-vms)
noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss target-libffi"
;;
vax-*-*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
;;
*-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
;;
*-apple-rhapsody* | \
*-apple-macos10* | \
*-apple-darwin*)
noconfigdirs="$noconfigdirs gas ld tk itcl tix itk libgui"
;;
*-*-macos* | \
*-*-mpw*)
configdirs="$configdirs grez"
noconfigdirs="target-libffi"
;;
esac
case "${noconfigdirs}" in
*target-libgloss*) ;;
*target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
esac
if [ "x$enable_cgen_maint" != xyes ] ; then
noconfigdirs="$noconfigdirs cgen"
fi
if [ x$with_gnu_ld = xno ]; then
use_gnu_ld=no
noconfigdirs="$noconfigdirs ld"
fi
if [ x$with_gnu_as = xno ]; then
use_gnu_as=no
noconfigdirs="$noconfigdirs gas"
fi
notsupp=""
for dir in . $skipdirs $noconfigdirs ; do
dirname=`echo $dir | sed -e s/target-//g`
if [ $dir != . ] && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
if [ -r $srcdir/$dirname/configure ] \
|| [ -r $srcdir/$dirname/configure.in ]; then
if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
true
else
notsupp="$notsupp $dir"
fi
fi
fi
if [ $dir != . ] && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
if [ -r $srcdir/$dirname/configure ] \
|| [ -r $srcdir/$dirname/configure.in ]; then
if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
true
else
notsupp="$notsupp $dir"
fi
fi
fi
done
if [ -n "${target_configdirs}" ]; then
others=
for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
if [ "$i" != "libiberty" ]; then
if [ -r $srcdir/$i/configure ] || [ -r $srcdir/$i/configure.in ]; then
others=yes;
break;
fi
fi
done
if [ -z "${others}" ]; then
target_configdirs=
fi
fi
if [ -z "${norecursion}" ] && [ -n "${configdirs}" ]; then
for i in `echo ${configdirs} | sed -e s/target-//g` ; do
rm -f $i/Makefile
done
fi
if [ -z "${norecursion}" ] && [ -n "${target_configdirs}" ]; then
for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
rm -f ${target_subdir}/$i/Makefile
done
fi
if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then
if [ -n "$appdirs" ]; then
for dir in $appdirs ; do
if [ -r $dir/Makefile.in ]; then
if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
appdirs=""
break
fi
if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
appdirs=""
break
fi
fi
done
if [ -n "$appdirs" ]; then
echo "*** This configuration is not supported by this package." 1>&2
exit 1
fi
fi
echo "*** This configuration is not supported in the following subdirectories:" 1>&2
echo " ${notsupp}" 1>&2
echo " (Any other directories should still work fine.)" 1>&2
fi
if [ x${use_gnu_as} = x ] ; then
if [ x${with_gnu_as} != xno ] && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && [ -d ${srcdir}/${gasdir} ] ; then
with_gnu_as=yes
withoptions="$withoptions --with-gnu-as"
fi
fi
if [ x${use_gnu_ld} = x ] ; then
if [ x${with_gnu_ld} != xno ] && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 && [ -d ${srcdir}/ld ] ; then
with_gnu_ld=yes
withoptions="$withoptions --with-gnu-ld"
fi
fi
if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then
with_newlib=yes
withoptions="$withoptions --with-newlib"
fi
if [ x${shared} = xyes ]; then
case "${target}" in
hppa*)
target_makefile_frag="${target_makefile_frag} config/mt-papic"
;;
i[3456]86-*)
target_makefile_frag="${target_makefile_frag} config/mt-x86pic"
;;
ia64-*)
target_makefile_frag="${target_makefile_frag} config/mt-ia64pic"
;;
powerpc*-*-aix*)
;;
powerpc*-*)
target_makefile_frag="${target_makefile_frag} config/mt-ppcpic"
;;
alpha*-*-linux*)
target_makefile_frag="${target_makefile_frag} config/mt-elfalphapic"
;;
*)
if test -f ${srcdir}/config/mt-${target_cpu}pic; then
target_makefile_frag="${target_makefile_frag} config/mt-${target_cpu}pic"
fi
;;
esac
fi
rm -f mt-frag
if [ -n "${target_makefile_frag}" ] ; then
for f in ${target_makefile_frag}
do
cat ${srcdir}/$f >> mt-frag
done
target_makefile_frag=mt-frag
fi
echo "int main () { return 0; }" > conftest.c
${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
if [ $? = 0 ] && [ -s conftest -o -s conftest.exe ]; then
:
else
echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
echo 1>&2 "*** You must set the environment variable CC to a working compiler."
rm -f conftest*
exit 1
fi
rm -f conftest*
case "${host}" in
sparc-sun-solaris2*)
CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
if [ "`/usr/bin/which $CCBASE`" = "/usr/ucb/cc" ] ; then
could_use=
[ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin"
if [ -d /opt/cygnus/bin ] ; then
if [ "$could_use" = "" ] ; then
could_use="/opt/cygnus/bin"
else
could_use="$could_use or /opt/cygnus/bin"
fi
fi
if [ "$could_use" = "" ] ; then
echo "Warning: compilation may fail because you're using"
echo "/usr/ucb/cc. You should change your PATH or CC "
echo "variable and rerun configure."
else
echo "Warning: compilation may fail because you're using"
echo "/usr/ucb/cc, when you should use the C compiler from"
echo "$could_use. You should change your"
echo "PATH or CC variable and rerun configure."
fi
fi
;;
esac
if [ "${shared}" = "yes" ]; then
sed -e 's/^SET_LIB_PATH[ ]*=.*$/SET_LIB_PATH = $(REALLY_SET_LIB_PATH)/' \
Makefile > Makefile.tem
rm -f Makefile
mv -f Makefile.tem Makefile
case "${host}" in
*-*-hpux*)
sed -e 's/^RPATH_ENVVAR[ ]*=.*$/RPATH_ENVVAR = SHLIB_PATH/' \
Makefile > Makefile.tem
rm -f Makefile
mv -f Makefile.tem Makefile
;;
esac
fi
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
targargs=`echo "${arguments}" | \
sed -e 's/--no[^ ]*//' \
-e 's/--cache[a-z-]*=[^ ]*//' \
-e 's/--ho[a-z-]*=[^ ]*//' \
-e 's/--bu[a-z-]*=[^ ]*//' \
-e 's/--ta[a-z-]*=[^ ]*//'`
if [ x${is_cross_compiler} = xyes ]; then
targargs="--with-cross-host=${host_alias} ${targargs}"
fi
if [ x${enable_multilib} = x ]; then
targargs="--enable-multilib ${targargs}"
fi
if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then
targargs="--with-newlib ${targargs}"
fi
gxx_include_dir=
if test -n "${with_gxx_include_dir}"; then
case "${with_gxx_include_dir}" in
yes )
echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
exit 1
;;
no )
;;
* )
gxx_include_dir=${with_gxx_include_dir}
;;
esac
fi
if test x${gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
gxx_include_dir='${libsubdir}/include/g++'
else
. ${topsrcdir}/config.if
gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
fi
else
gxx_include_dir=${gxx_include_dir}
fi
FLAGS_FOR_TARGET=
case " $skipdirs " in
*" target-newlib "*) ;;
*)
case "$target" in
*-cygwin*)
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;;
esac
if test -d ${topsrcdir}/gcc; then
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
if test "${build}" != "${host}"; then
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
fi
fi
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
;;
esac
if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
fi
if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno &&
echo " ${configdirs} " | grep " ld " > /dev/null &&
test -d ${srcdir}/ld; then
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
fi
if test "x${CC_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
elif test "$host" = "$target"; then
CC_FOR_TARGET='$(CC)'
else
CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
fi
case $CC_FOR_TARGET in
*' $(FLAGS_FOR_TARGET)') ;;
*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
if test "x${CHILL_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/'
elif test "$host" = "$target"; then
CHILL_FOR_TARGET='$(CC)'
else
CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
fi
case $CHILL_FOR_TARGET in
*' $(FLAGS_FOR_TARGET)') ;;
*) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
if test "x${CXX_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
elif test "$host" = "$target"; then
CXX_FOR_TARGET='$(CXX)'
else
CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}`
fi
case $CXX_FOR_TARGET in
*' $(FLAGS_FOR_TARGET)') ;;
*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'`
targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"
sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
-e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \
-e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \
-e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \
-e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \
-e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \
-e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \
-e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
Makefile > Makefile.tem
rm -f Makefile
mv -f Makefile.tem Makefile