Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (21 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28dir.info
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/configure.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1515## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi). 
    1616
    17 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
    18 #   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
     17#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     18#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    1919#
    2020# This file is free software; you can redistribute it and/or modify it
     
    4343# these libraries are used by various programs built for the host environment
    4444#
    45 host_libs="intl mmalloc libiberty opcodes bfd readline gash db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui zlib"
    46 
    47 if [ "${enable_gdbgui}" = "yes" ] ; then
    48         host_libs="${host_libs} libgui"
    49 fi
     45host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tclX itcl tix libgui zlib"
    5046
    5147libstdcxx_version="target-libstdc++-v3"
    52 # Don't use libstdc++-v3's flags to configure/build itself.
    53 libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
    5448
    5549# these tools are built for the host environment
    5650# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
    5751# know that we are building the simulator.
    58 host_tools="texinfo byacc flex bison binutils ld gas gcc 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 fastjar"
     52host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator libtool gettext zip fastjar"
    5953
    6054# libgcj represents the runtime libraries only used by gcj.
     
    7165                target-libgloss \
    7266                target-newlib \
    73                 target-librx \
    7467                ${libstdcxx_version} \
    7568                target-libf2c \
     
    8477# candidates for the "native_only" list which follows
    8578#
    86 target_tools="target-examples target-groff target-gperf"
     79target_tools="target-examples target-groff target-gperf target-rda"
    8780
    8881################################################################################
    89 
    90 ## These two lists are of directories that are to be removed from the
    91 ## ${configdirs} list for either cross-compilations or for native-
    92 ## compilations.  For example, it doesn't make that much sense to
    93 ## cross-compile Emacs, nor is it terribly useful to compile target-libiberty in
    94 ## a native environment. 
    95 
    96 # directories to be built in the native environment only
    97 #
    98 # This must be a single line because of the way it is searched by grep in
    99 # the code below.
    100 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"
    101 
    102 # directories to be built in a cross environment only
    103 #
    104 cross_only="target-libgloss target-newlib target-cygmon target-opcodes target-libstub"
    10582
    10683## All tools belong in one of the four categories, and are assigned above
     
    123100# per-host:
    124101
    125 # Work in distributions that contain no compiler tools, like Autoconf.
    126 if [ -d ${srcdir}/config ]; then
    127 case "${host}" in
    128   m68k-hp-hpux*)
    129     host_makefile_frag="${host_makefile_frag} config/mh-hp300"
    130     ;;
    131   m68k-apollo-sysv*)
    132     host_makefile_frag="${host_makefile_frag} config/mh-apollo68"
    133     ;;
    134   m68k-apollo-bsd*)
    135     host_makefile_frag="${host_makefile_frag} config/mh-a68bsd"
    136     ;;
    137   m88k-dg-dgux*)
    138     host_makefile_frag="${host_makefile_frag} config/mh-dgux"
    139     ;;
    140   m88k-harris-cxux*)
    141     host_makefile_frag="${host_makefile_frag} config/mh-cxux"
    142     ;;
    143   m88k-motorola-sysv*)
    144     host_makefile_frag="${host_makefile_frag} config/mh-delta88"
    145     ;;
    146   mips*-dec-ultrix*)
    147     host_makefile_frag="${host_makefile_frag} config/mh-decstation"
    148     ;;
    149   mips*-nec-sysv4*)
    150     host_makefile_frag="${host_makefile_frag} config/mh-necv4"
    151     ;;
    152   mips*-sgi-irix6*)
    153     host_makefile_frag="${host_makefile_frag} config/mh-irix6"
    154     ;;
    155   mips*-sgi-irix5*)
    156     host_makefile_frag="${host_makefile_frag} config/mh-irix5"
    157     ;;
    158   mips*-sgi-irix4*)
    159     host_makefile_frag="${host_makefile_frag} config/mh-irix4"
    160     ;;
    161   mips*-sgi-irix3*)
    162     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
    163     ;;
    164   mips*-*-sysv4*)
    165     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
    166     ;;
    167   mips*-*-sysv*)
    168     host_makefile_frag="${host_makefile_frag} config/mh-riscos"
    169     ;;
    170   i370-ibm-opened*)
    171     host_makefile_frag="${host_makefile_frag} config/mh-openedition"
    172     ;;
    173   i[3456]86-*-sysv5*)
    174     host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
    175     ;;
    176   i[3456]86-*-dgux*)
    177     host_makefile_frag="${host_makefile_frag} config/mh-dgux386"
    178     ;;
    179   i[3456]86-ncr-sysv4.3*)
    180     host_makefile_frag="${host_makefile_frag} config/mh-ncrsvr43"
    181     ;;
    182   i[3456]86-ncr-sysv4*)
    183     host_makefile_frag="${host_makefile_frag} config/mh-ncr3000"
    184     ;;
    185   i[3456]86-*-sco3.2v5*)
    186     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
    187     ;;
    188   i[3456]86-*-sco*)
    189     host_makefile_frag="${host_makefile_frag} config/mh-sco"
    190     ;;
    191   i[3456]86-*-udk*)
    192     host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
    193     ;;
    194   i[3456]86-*-isc*)
    195     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
    196     ;;
    197   i[3456]86-*-solaris2*)
    198     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
    199     ;;
    200   i[3456]86-*-aix*)
    201     host_makefile_frag="${host_makefile_frag} config/mh-aix386"
    202     ;;
    203   i[3456]86-*-msdosdjgpp*)
    204     host_makefile_frag="${host_makefile_frag} config/mh-djgpp"
    205     ;;
    206   *-cygwin*)
    207     host_makefile_frag="${host_makefile_frag} config/mh-cygwin"
    208     ;;
    209   *-mingw32*)
    210     host_makefile_frag="${host_makefile_frag} config/mh-mingw32"
    211     ;;
    212   *-interix*)
    213     host_makefile_frag="${host_makefile_frag} config/mh-interix"
    214     ;;
    215   *-windows*)
    216     host_makefile_frag="${host_makefile_frag} config/mh-windows"
    217     ;;
    218   vax-*-ultrix2*)
    219     host_makefile_frag="${host_makefile_frag} config/mh-vaxult2"
    220     ;;
    221   *-*-solaris2*)
    222     host_makefile_frag="${host_makefile_frag} config/mh-solaris"
    223     ;;
    224   m68k-sun-sunos*)
    225     host_makefile_frag="${host_makefile_frag} config/mh-sun3"
    226     ;;
    227   *-hp-hpux[78]*)
    228     host_makefile_frag="${host_makefile_frag} config/mh-hpux8"
    229     ;;
    230   *-hp-hpux*)
    231     host_makefile_frag="${host_makefile_frag} config/mh-hpux"
    232     ;;
    233   *-*-hiux*)
    234     host_makefile_frag="${host_makefile_frag} config/mh-hpux"
    235     ;;
    236   rs6000-*-lynxos*)
    237     host_makefile_frag="${host_makefile_frag} config/mh-lynxrs6k"
    238     ;;
    239   *-*-lynxos*)
    240     host_makefile_frag="${host_makefile_frag} config/mh-lynxos"
    241     ;;
    242   *-*-sysv4*)
    243     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
    244     ;;
    245   *-*-sysv*)
    246     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
    247     ;;
    248 esac
    249 fi
    250 
    251 # If we aren't going to be using gcc, see if we can extract a definition
    252 # of CC from the fragment.
    253 if [ -z "${CC}" ] && [ "${build}" = "${host}" ]; then
    254   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
    255   found=
    256   for dir in $PATH; do
    257     test -z "$dir" && dir=.
    258     if test -f $dir/gcc; then
    259       found=yes
    260       break
    261     fi
    262   done
    263   IFS="$save_ifs"
    264   if [ -z "${found}" ] && [ -n "${host_makefile_frag}" ] && [ -f "${srcdir}/${host_makefile_frag}" ]; then
    265     xx=`sed -n -e 's/^[         ]*CC[   ]*=[    ]*\(.*\)$/\1/p' < ${srcdir}/${host_makefile_frag}`
    266     if [ -n "${xx}" ] ; then
    267       CC=$xx
    268     fi
    269   fi
    270 fi
    271 
    272 # We default to --with-shared on platforms where -fpic is meaningless.
    273 # Well, we don't yet, but we will.
    274 if false && [ "${host}" = "${target}" ] && [ x${enable_shared} = x ]; then
    275   case "${target}" in
    276     alpha*-dec-osf*)    enable_shared=yes ;;
    277     alpha*-*-linux*)    enable_shared=yes ;;
    278     mips-sgi-irix5*)    enable_shared=yes ;;
    279     *)                  enable_shared=no ;;
    280   esac
    281 fi
    282 
    283 # hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
    284 # them automatically.
    285 case "${host}" in
    286   hppa*64*-*-hpux11*)   
    287     withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
    288     ;;
    289 esac
    290 
    291 case "${enable_shared}" in
    292   yes) shared=yes ;;
    293   no) shared=no ;;
    294   "") shared=no ;;
    295   *) shared=yes ;;
    296 esac
    297 
    298 if [ x${shared} = xyes ]; then
    299   case "${host}" in
    300     alpha*-*-linux*)
    301       host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic"
    302       ;;
    303     arm*-*-*)
    304       host_makefile_frag="${host_makefile_frag} config/mh-armpic"
    305       ;;
    306     parisc*-*-* | hppa*-*-*)
    307       host_makefile_frag="${host_makefile_frag} config/mh-papic"
    308       ;;
    309     i[3456]86-*-cygwin*)
    310       # We don't want -fPIC on Cygwin.
    311       ;;
    312     i[3456]86-*-*)
    313       host_makefile_frag="${host_makefile_frag} config/mh-x86pic"
    314       ;;
    315     i370-*-*)
    316       host_makefile_frag="${host_makefile_frag} config/mh-i370pic"
    317       ;;
    318     ia64-*-*)
    319       host_makefile_frag="${host_makefile_frag} config/mh-ia64pic"
    320       ;;
    321     sparc64-*-*)
    322       host_makefile_frag="${host_makefile_frag} config/mh-sparcpic"
    323       ;;
    324     powerpc*-*-aix*)
    325       # We don't want -fPIC on AIX.
    326       ;;
    327     powerpc*-*-*)
    328       host_makefile_frag="${host_makefile_frag} config/mh-ppcpic"
    329       ;;
    330     *-*-*)
    331       if test -f ${srcdir}/config/mh-${host_cpu}pic; then
    332         host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic"
    333       fi
    334       ;;
    335   esac
    336 fi
    337 
    338 rm -f mh-frag
    339 if [ -n "${host_makefile_frag}" ] ; then
    340   for f in ${host_makefile_frag}
    341   do
    342     cat ${srcdir}/$f >> mh-frag
    343   done
    344   host_makefile_frag=mh-frag
    345 fi
     102# There is no longer anything interesting in the per-host section.
    346103
    347104# per-target:
    348105
    349 case "${target}" in
    350   v810*)
    351     target_makefile_frag="${target_makefile_frag} config/mt-v810"
    352     ;;
    353   i[3456]86-*-netware*)
    354     target_makefile_frag="${target_makefile_frag} config/mt-netware"
    355     ;;
    356   powerpc-*-netware*)
    357     target_makefile_frag="${target_makefile_frag} config/mt-netware"
    358     ;;
    359   alpha*-*-linux*)
    360     target_makefile_frag="${target_makefile_frag} config/mt-linux"
    361     target_makefile_frag="${target_makefile_frag} config/mt-alphaieee"
    362     ;;
    363   alpha*-*-*)
    364     target_makefile_frag="${target_makefile_frag} config/mt-alphaieee"
    365     ;;
    366   *-*-linux*)
    367     target_makefile_frag="${target_makefile_frag} config/mt-linux"
    368     ;;
    369   *-*-aix4.[3456789]* | *-*-aix[56789].*)
    370     target_makefile_frag="${target_makefile_frag} config/mt-aix43"
    371     ;;
    372   mips*-*-pe | sh*-*-pe | *arm-wince-pe)
    373     target_makefile_frag="${target_makefile_frag} config/mt-wince"
    374     ;;
    375 esac
    376 
    377 # If --enable-target-optspace always use -Os instead of -O2 to build
    378 # the target libraries, similarly if it is not specified, use -Os
    379 # on selected platforms.
    380 case "${enable_target_optspace}:${target}" in
    381   yes:*)
    382     target_makefile_frag="${target_makefile_frag} config/mt-ospace"
    383     ;;
    384   :d30v-*)
    385     target_makefile_frag="${target_makefile_frag} config/mt-d30v"
    386     ;;
    387   :m32r-* | :d10v-* | :fr30-*)
    388     target_makefile_frag="${target_makefile_frag} config/mt-ospace"
    389     ;;
    390   no:* | :*)
    391     ;;
    392   *)
    393     echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
    394     ;;
    395 esac
    396 
    397 skipdirs=
    398 gasdir=gas
    399 use_gnu_ld=
    400 use_gnu_as=
    401 
    402 # some tools are so dependent upon X11 that if we're not building with X,
    403 # it's not even worth trying to configure, much less build, that tool.
    404 
    405 case ${with_x} in
    406   yes | "")  # the default value for this tree is that X11 is available
    407         ;;
    408   no)
    409         skipdirs="${skipdirs} tk libgui gash"
    410         ;;
    411   *)
    412         echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2
    413         ;;
    414 esac
    415 
    416 # Some tools are only suitable for building in a "native" situation.
    417 # Those are added when we have a host==target configuration.  For cross
    418 # toolchains, we add some directories that should only be useful in a
    419 # cross-compiler.
    420 
     106# Define is_cross_compiler to save on calls to 'test'.
    421107is_cross_compiler=
    422 
    423 if [ x"${host}" = x"${target}" ] ; then
    424         # when doing a native toolchain, don't build the targets
    425         # that are in the 'cross only' list
    426         skipdirs="${skipdirs} ${cross_only}"
    427         is_cross_compiler=no
     108if test x"${host}" = x"${target}" ; then
     109  is_cross_compiler=no
    428110else
    429         # similarly, don't build the targets in the 'native only'
    430         # list when building a cross compiler
    431         skipdirs="${skipdirs} ${native_only}"
    432         is_cross_compiler=yes
     111  is_cross_compiler=yes
    433112fi     
    434113
     
    437116target_subdir=${target_alias}
    438117
    439 if [ ! -d ${target_subdir} ] ; then
     118if test ! -d ${target_subdir} ; then
    440119  if mkdir ${target_subdir} ; then true
    441120  else
    442     echo "'*** could not make ${PWD=`pwd`}/${target_subdir}" 1>&2
     121    echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
    443122    exit 1
    444123  fi
     
    447126build_subdir=${build_alias}
    448127
    449 if [ x"${build_alias}" != x"${host}" ] ; then
    450   if [ ! -d ${build_subdir} ] ; then
     128if test x"${build_alias}" != x"${host}" ; then
     129  if test ! -d ${build_subdir} ; then
    451130    if mkdir ${build_subdir} ; then true
    452131    else
    453       echo "'*** could not make ${PWD=`pwd`}/${build_subdir}" 1>&2
     132      echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
    454133      exit 1
    455134    fi
     
    457136fi
    458137
    459 copy_dirs=
    460 
    461 # Handle --with-headers=XXX.  The contents of the named directory are
    462 # copied to $(tooldir)/sys-include.
    463 if [ x"${with_headers}" != x ]; then
    464   if [ x${is_cross_compiler} = xno ]; then
    465     echo 1>&2 '***' --with-headers is only supported when cross compiling
    466     exit 1
    467   fi
    468   case "${exec_prefixoption}" in
    469   "") x=${prefix} ;;
    470   *) x=${exec_prefix} ;;
    471   esac
    472   copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
    473 fi
    474 
    475 # Handle --with-libs=XXX.  Multiple directories are permitted.  The
    476 # contents are copied to $(tooldir)/lib.
    477 if [ x"${with_libs}" != x ]; then
    478   if [ x${is_cross_compiler} = xno ]; then
    479     echo 1>&2 '***' --with-libs is only supported when cross compiling
    480     exit 1
    481   fi
    482   # Copy the libraries in reverse order, so that files in the first named
    483   # library override files in subsequent libraries.
    484   case "${exec_prefixoption}" in
    485   "") x=${prefix} ;;
    486   *) x=${exec_prefix} ;;
    487   esac
    488   for l in ${with_libs}; do
    489     copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
    490   done
    491 fi
     138# Skipdirs are removed silently.
     139skipdirs=
     140# Noconfigdirs are removed loudly.
     141noconfigdirs=""
     142
     143use_gnu_ld=
     144# Make sure we don't let GNU ld be added if we didn't want it.
     145if test x$with_gnu_ld = xno ; then
     146  use_gnu_ld=no
     147  noconfigdirs="$noconfigdirs ld"
     148fi
     149
     150use_gnu_as=
     151# Make sure we don't let GNU as be added if we didn't want it.
     152if test x$with_gnu_as = xno ; then
     153  use_gnu_as=no
     154  noconfigdirs="$noconfigdirs gas"
     155fi
     156
     157# some tools are so dependent upon X11 that if we're not building with X,
     158# it's not even worth trying to configure, much less build, that tool.
     159
     160case ${with_x} in
     161  yes | "") ;; # the default value for this tree is that X11 is available
     162  no)
     163    skipdirs="${skipdirs} tk tix itcl libgui"
     164    # We won't be able to build gdbtk without X.
     165    enable_gdbtk=no
     166    ;;
     167  *)  echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
     168esac
     169
     170# Some tools are only suitable for building in a "native" situation.
     171# Remove these if host!=target. 
     172native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf"
     173
     174# Similarly, some are only suitable for cross toolchains.
     175# Remove these if host=target.
     176cross_only="target-libgloss target-newlib target-opcodes"
     177
     178case $is_cross_compiler in
     179  no) skipdirs="${skipdirs} ${cross_only}" ;;
     180  yes) skipdirs="${skipdirs} ${native_only}" ;;
     181esac
    492182
    493183# If both --with-headers and --with-libs are specified, default to
    494184# --without-newlib.
    495 if [ x"${with_headers}" != x ] && [ x"${with_libs}" != x ]; then
    496   if [ x"${with_newlib}" = x ]; then
     185if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
     186  if test x"${with_newlib}" = x ; then
    497187    with_newlib=no
    498188  fi
     
    500190
    501191# Recognize --with-newlib/--without-newlib.
    502 if [ x${with_newlib} = xno ]; then
    503   skipdirs="${skipdirs} target-newlib"
    504 elif [ x${with_newlib} = xyes ]; then
    505   skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
    506 fi
    507 
    508 # Default to using --with-stabs for certain targets.
    509 if [ x${with_stabs} = x ]; then
    510   case "${target}" in
    511   mips*-*-irix6*)
    512     ;;
    513   mips*-*-* | alpha*-*-osf*)
    514     with_stabs=yes;
    515     withoptions="${withoptions} --with-stabs"
    516     ;;
    517   esac
    518 fi
    519 
    520 # Handle ${copy_dirs}
    521 set fnord ${copy_dirs}
    522 shift
    523 while [ $# != 0 ]; do
    524   if [ -f $2/COPIED ] && [ x"`cat $2/COPIED`" = x"$1" ]; then
    525     :
    526   else
    527     echo Copying $1 to $2
    528 
    529     # Use the install script to create the directory and all required
    530     # parent directories.
    531     if [ -d $2 ]; then
    532       :
    533     else
    534       echo >config.temp
    535       ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
    536     fi
    537 
    538     # Copy the directory, assuming we have tar.
    539     # FIXME: Should we use B in the second tar?  Not all systems support it.
    540     (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
    541 
    542     # It is the responsibility of the user to correctly adjust all
    543     # symlinks.  If somebody can figure out how to handle them correctly
    544     # here, feel free to add the code.
    545 
    546     echo $1 > $2/COPIED
    547   fi
    548   shift; shift
    549 done
     192case ${with_newlib} in
     193  no) skipdirs="${skipdirs} target-newlib" ;;
     194  yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
     195esac
    550196
    551197# Configure extra directories which are host specific
    552198
    553199case "${host}" in
    554         i[3456]86-*-go32*)
    555           configdirs="$configdirs dosrel" ;;
    556         i[3456]86-*-mingw32*)
    557           configdirs="$configdirs dosrel" ;;
    558         *-cygwin*)
    559           configdirs="$configdirs libtermcap dosrel" ;;
     200  i[3456]86-*-go32*)
     201    configdirs="$configdirs dosrel" ;;
     202  i[3456]86-*-mingw32*)
     203    configdirs="$configdirs dosrel" ;;
     204  *-cygwin*)
     205    configdirs="$configdirs libtermcap dosrel" ;;
    560206esac
    561207
     
    564210# exist yet.
    565211
    566 noconfigdirs=""
    567 
    568212case "${host}" in
    569213  hppa*64*-*-*)
     
    571215    ;;
    572216  i[3456]86-*-vsta)
    573     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"
     217    noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext"
    574218    ;;
    575219  i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
    576     noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile apache inet itcl tix db snavigator gnuserv libffi"
     220    noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi"
    577221        ;;
    578222  i[3456]86-*-mingw32*)
    579     # 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"
    580      noconfigdirs="expect dejagnu cvs autoconf automake send-pr rcs guile perl texinfo apache inet libtool"
     223    # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv"
     224     noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
    581225        ;;
    582226  i[3456]86-*-beos*)
     
    584228     ;;
    585229  *-*-cygwin*)
    586      noconfigdirs="autoconf automake send-pr rcs guile perl apache inet"
     230     noconfigdirs="autoconf automake send-pr rcs guile perl"
    587231    ;;
    588232  *-*-netbsd*)
     
    590234    ;;
    591235  ppc*-*-pe)
    592      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"
     236     noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv"
    593237    ;;
    594238  powerpc-*-beos*)
    595239    noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
     240    ;;
     241  *-*-darwin*)
     242    noconfigdirs="$noconfigdirs tk itcl tix libgui"
    596243    ;;
    597244esac
     
    622269  *-*-netbsd*)
    623270    # Skip some stuff on all NetBSD configurations.
    624     skipdirs="$skipdirs target-newlib target-libiberty target-libgloss"
     271    noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
    625272
    626273    # Skip some stuff that's unsupported on some NetBSD configurations.
     
    633280    ;;
    634281  *-*-netware)
    635     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-newlib target-libiberty target-libgloss ${libgcj}"
     282    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
    636283    ;;
    637284  *-*-rtems*)
     
    648295    ;;
    649296  alpha*-dec-osf*)
    650     # ld works, but does not support shared libraries.  emacs doesn't
    651     # work.  newlib is not 64 bit ready.  I'm not sure about fileutils.
     297    # ld works, but does not support shared libraries.
     298    # newlib is not 64 bit ready.  I'm not sure about fileutils.
    652299    # gas doesn't generate exception information.
    653     noconfigdirs="$noconfigdirs gas ld emacs fileutils target-newlib target-libgloss"
     300    noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
    654301    ;;
    655302  alpha*-*-*vms*)
     
    659306    # newlib is not 64 bit ready
    660307    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
    661     # linux has rx in libc
    662     skipdirs="$skipdirs target-librx"
    663308    ;;
    664309  alpha*-*-freebsd*)
     
    671316  sh-*-linux*)
    672317    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
    673     # linux has rx in libc
    674     skipdirs="$skipdirs target-librx"
    675318    ;;   
    676319  sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     
    682325    # the C++ libraries don't build on top of CE's C libraries
    683326    noconfigdirs="$noconfigdirs ${libstdcxx_version}"
    684     skipdirs="$skipdirs target-newlib"
     327    noconfigdirs="$noconfigdirs target-newlib"
    685328    case "${host}" in
    686329      *-*-cygwin*) ;; # keep gdb and readline
     
    692335    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    693336    ;;
     337  arm-*-coff | strongarm-*-coff | xscale-*-coff)
     338    noconfigdirs="$noconfigdirs ${libgcj}"
     339    ;;
     340  arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
     341    noconfigdirs="$noconfigdirs target-libffi target-qthreads"
     342    ;;
    694343  arm-*-pe*)
    695344    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    696345    ;;
    697   arm-*-coff*)
    698     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    699     if [ x${is_cross_compiler} != xno ] ; then
    700            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    701     fi
    702     ;;
    703   arm-*-elf*)
    704     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    705     if [ x${is_cross_compiler} != xno ] ; then
    706            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    707     fi
    708     ;;
    709346  arm-*-oabi*)
    710347    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    711348    ;;
    712   c4x-*-*)
    713     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj}"
     349  thumb-*-coff)
     350    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     351    ;;
     352  thumb-*-elf)
     353    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     354    ;;
     355  thumb-*-oabi)
     356    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     357    ;;
     358  thumb-*-pe)
     359    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     360    ;;
     361  arm-*-riscix*)
     362    noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
     363    ;;
     364  avr-*-*)
     365    noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
     366    ;;
     367  c4x-*-* | tic4x-*-*)
     368    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
    714369    ;;
    715370  c54x*-*-* | tic54x-*-*)
    716371    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib"
    717372    ;;
    718   thumb-*-coff)
    719     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    720     ;;
    721   thumb-*-elf)
    722     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    723     ;;
    724   thumb-*-oabi)
    725     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    726     ;;
    727   strongarm-*-elf)
    728     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    729     if [ x${is_cross_compiler} != xno ] ; then
    730            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    731     fi
    732     ;;
    733   strongarm-*-coff)
    734     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    735     if [ x${is_cross_compiler} != xno ] ; then
    736            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    737     fi
    738     ;;
    739   xscale-*-elf)
    740     noconfigdirs="$noconfigdirs target-libgloss target-libffi target-qthreads"
    741     if [ x${is_cross_compiler} != xno ] ; then
    742            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    743     fi
    744     ;;
    745   xscale-*-coff)
    746     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    747     if [ x${is_cross_compiler} != xno ] ; then
    748            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    749     fi
    750     ;;
    751   thumb-*-pe)
    752     noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    753     ;;
    754   arm-*-riscix*)
    755     noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
    756     ;;
    757373  cris-*-*)
    758374    noconfigdirs="$noconfigdirs ${libgcj}"
    759375    ;;
    760376  d10v-*-*)
    761     noconfigdirs="$noconfigdirs target-librx ${libstdcxx_version} target-libgloss ${libgcj}"
     377    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
    762378    ;;
    763379  d30v-*-*)
     
    766382  fr30-*-elf*)
    767383    noconfigdirs="$noconfigdirs ${libgcj}"
    768     if [ x${is_cross_compiler} != xno ] ; then
    769            target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    770     fi
    771     ;;
    772   h8300*-*-* | \
     384    ;;
     385  frv-*-*)
     386    noconfigdirs="$noconfigdirs ${libgcj}"
     387    ;;
     388  h8300*-*-*)
     389    noconfigdirs="$noconfigdirs target-libgloss"
     390    ;;
    773391  h8500-*-*)
    774     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj} target-libf2c"
     392    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c"
    775393    ;;
    776394  hppa*64*-*-linux* | parisc*64*-*-linux*)
     
    783401  parisc*-*-linux* | hppa*-*-linux* | \
    784402  hppa*-*-lites* | \
     403  hppa*-*-openbsd* | \
    785404  hppa*64*-*-*)
    786405    noconfigdirs="$noconfigdirs ${libgcj}"
     
    788407    ;;
    789408  hppa*-*-*)
    790     # HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach
    791     # cc is gcc, and on any system a user should be able to link cc to
    792     # whatever they want.  FIXME, emacs emacs19).
    793     case "${CC}" in
    794         "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
    795         *) ;;
    796     esac
    797409    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
    798410    # build on HP-UX 10.20.
     
    803415    noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
    804416    ;;
     417  ia64*-**-hpux*)
     418    # No gdb or ld support yet.
     419    noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
     420    ;;
    805421  i[3456]86-*-coff | i[3456]86-*-elf)
    806422    noconfigdirs="$noconfigdirs ${libgcj}"
    807     if [ x${is_cross_compiler} != xno ] ; then
    808          target_configdirs="${target_configdirs} target-libstub target-cygmon"
    809     fi
    810423    ;;
    811424  i[34567]86-*-freebsd*)
    812425    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
    813426    ;;
    814   s390*-*-linux*)
    815     # The libffi port is not yet in the GCC tree
    816     noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
    817     # linux has rx in libc
    818     skipdirs="$skipdirs target-librx"
    819     ;;
    820   *-*-linux*)
    821     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
    822     # linux has rx in libc
    823     skipdirs="$skipdirs target-librx"
     427  i[3456]86-*-linux*)
     428    # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
     429    # not build java stuff by default.
     430    case "${target}" in
     431      *-*-*libc1*)
     432        noconfigdirs="$noconfigdirs ${libgcj}";;
     433    esac
     434
     435    # This section makes it possible to build newlib natively on linux.
     436    # If we are using a cross compiler then don't configure newlib.
     437    if test x${is_cross_compiler} != xno ; then
     438         noconfigdirs="$noconfigdirs target-newlib"
     439    fi
     440    noconfigdirs="$noconfigdirs target-libgloss"
     441    # If we are not using a cross compiler, do configure newlib.
     442    # Note however, that newlib will only be configured in this situation
     443    # if the --with-newlib option has been given, because otherwise
     444    # 'target-newlib' will appear in skipdirs.
    824445    ;;
    825446  i[3456]86-*-mingw32*)
     
    848469    ;;   
    849470  i[3456]86-*-pe)
    850     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-librx target-libgloss ${libgcj}"
     471    noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
    851472    ;;
    852473  i[3456]86-*-sco3.2v5*)
    853474    # The linker does not yet know about weak symbols in COFF,
    854475    # and is not configured to handle mixed ELF and COFF.
    855     noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
     476    noconfigdirs="$noconfigdirs ld target-libgloss"
    856477    ;;
    857478  i[3456]86-*-sco*)
     
    862483    ;;
    863484  i[3456]86-*-sysv4*)
    864     # The SYSV4 C compiler doesn't handle Emacs correctly
    865     case "${CC}" in
    866         "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
    867         *) ;;
    868     esac
    869     # but that's okay since emacs doesn't work anyway
    870     noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss ${libgcj}"
     485    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    871486    ;;
    872487  i[3456]86-*-beos*)
     
    878493  m68k-*-elf*)
    879494    noconfigdirs="$noconfigdirs ${libgcj}"
    880     if [ x${is_cross_compiler} != xno ] ; then
    881            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    882     fi
    883495    ;;
    884496  m68k-*-coff*)
    885497    noconfigdirs="$noconfigdirs ${libgcj}"
    886     if [ x${is_cross_compiler} != xno ] ; then
    887            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    888     fi
    889498    ;;
    890499  mcore-*-pe*)
     
    898507  mn10200-*-*)
    899508    noconfigdirs="$noconfigdirs ${libgcj}"
    900     if [ x${is_cross_compiler} != xno ] ; then
    901            target_configdirs="${target_configdirs} target-libstub target-cygmon"
    902     fi
    903509    ;;
    904510  mn10300-*-*)
    905511    noconfigdirs="$noconfigdirs ${libgcj}"
    906     if [ x${is_cross_compiler} != xno ] ; then
    907            target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    908     fi
    909512    ;;
    910513  powerpc-*-aix*)
    911514    # copied from rs6000-*-* entry
    912     # The configure and build of ld are currently disabled because
    913     # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least)
    914     # The symptom is that GDBtk 4.18 fails at startup with a segfault
    915     # if linked by GNU ld, but not if linked by the native ld.
    916     noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss ${libgcj} ld"
    917     use_gnu_ld=no
     515    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
    918516    ;;
    919517  powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
     
    930528    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
    931529    ;;
     530  powerpc-*-darwin*)
     531    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof ${libgcj}"
     532    ;;
    932533  powerpc-*-eabi)
    933534    noconfigdirs="$noconfigdirs ${libgcj}"
    934     if [ x${is_cross_compiler} != xno ] ; then
    935            target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    936     fi
     535    ;;
     536  powerpc64*-*-linux*)
     537    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     538    # not yet ported.
     539    noconfigdirs="$noconfigdirs target-libffi"
    937540    ;;
    938541  rs6000-*-lynxos*)
    939     # The CVS server code doesn't work on the RS/6000
    940     noconfigdirs="$noconfigdirs target-newlib gprof cvssrc ${libgcj}"
     542    noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
    941543    ;;
    942544  rs6000-*-aix*)
    943     # The configure and build of ld are currently disabled because
    944     # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least)
    945     # The symptom is that GDBtk 4.18 fails at startup with a segfault
    946     # if linked by GNU ld, but not if linked by the native ld.
    947     noconfigdirs="$noconfigdirs gprof ld ${libgcj}"
    948     use_gnu_ld=no
     545    noconfigdirs="$noconfigdirs gprof ${libgcj}"
    949546    ;;
    950547  rs6000-*-*)
     
    956553  mips*-*-irix5*)
    957554    # The GNU linker does not support shared libraries.
    958     # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
    959     noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss ${libgcj}"
     555    noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
    960556    ;;
    961557  mips*-*-irix6*)
    962558    # The GNU assembler does not support IRIX 6.
    963     # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
    964559    # Linking libjava exceeds command-line length limits on at least
    965560    # IRIX 6.2, but not on IRIX 6.5.
    966561    # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
    967562    # <oldham@codesourcery.com>
    968     noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss ${libgcj}"
     563    noconfigdirs="$noconfigdirs gas gprof target-libgloss ${libgcj}"
    969564    ;;
    970565  mips*-dec-bsd*)
     
    976571  mipstx39-*-*)
    977572    noconfigdirs="$noconfigdirs gprof ${libgcj}"   # same as generic mips
    978     target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    979573   ;;
    980574  mips*-*-linux*)
    981     noconfigdirs="$noconfigdirs target-libffi"
     575    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
    982576    ;;
    983577  mips*-*-*)
     
    1000594    ;;
    1001595  sparc-*-elf*)
    1002     if [ x${is_cross_compiler} != xno ] ; then
    1003            target_configdirs="${target_configdirs} target-libstub target-cygmon"
    1004     fi
    1005596    noconfigdirs="$noconfigdirs ${libgcj}"
    1006597    ;;
    1007598  sparc64-*-elf*)
    1008     if [ x${is_cross_compiler} != xno ] ; then
    1009            target_configdirs="${target_configdirs} target-libstub target-cygmon"
    1010     fi
    1011599    noconfigdirs="$noconfigdirs ${libgcj}"
    1012600    ;;
    1013601  sparclite-*-*)
    1014     if [ x${is_cross_compiler} != xno ] ; then
    1015            target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    1016     fi
    1017602    noconfigdirs="$noconfigdirs ${libgcj}"
    1018603    ;;
    1019604  sparc-*-sunos4*)
    1020605    noconfigdirs="$noconfigdirs ${libgcj}"
    1021     if [ x${is_cross_compiler} != xno ] ; then
    1022            noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss"
     606    if test x${is_cross_compiler} != xno ; then
     607           noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
    1023608    else
    1024609           use_gnu_ld=no
     
    1045630    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
    1046631    ;;
     632  ip2k-*-*)
     633    noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
     634    ;;
     635  *-*-linux*)
     636    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     637    ;;
    1047638  *-*-lynxos*)
    1048639    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
    1049640    ;;
    1050   *-*-macos* | \
    1051   *-*-mpw*)
    1052     # Macs want a resource compiler.
    1053     configdirs="$configdirs grez"
    1054     noconfigdirs="$noconfigdirs ${libgcj}"
    1055     ;;   
    1056641  *-*-*)
    1057642    noconfigdirs="$noconfigdirs ${libgcj}"
     
    1065650  *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
    1066651esac
    1067 
    1068 # Make sure we don't let GNU ld be added if we didn't want it.
    1069 if [ x$with_gnu_ld = xno ]; then
    1070   use_gnu_ld=no
    1071   noconfigdirs="$noconfigdirs ld"
    1072 fi
    1073 
    1074 # Make sure we don't let GNU as be added if we didn't want it.
    1075 if [ x$with_gnu_as = xno ]; then
    1076   use_gnu_as=no
    1077   noconfigdirs="$noconfigdirs gas"
    1078 fi
    1079652
    1080653# Figure out what language subdirectories are present.
     
    1172745for dir in . $skipdirs $noconfigdirs ; do
    1173746  dirname=`echo $dir | sed -e s/target-//g`
    1174   if [ $dir != . ]  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     747  if test $dir != .  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1175748    configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
    1176     if [ -r $srcdir/$dirname/configure ] \
    1177         || [ -r $srcdir/$dirname/configure.in ]; then
     749    if test -r $srcdir/$dirname/configure ; then
    1178750      if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1179751        true
     
    1183755    fi
    1184756  fi
    1185   if [ $dir != . ] && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     757  if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1186758    target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
    1187     if [ -r $srcdir/$dirname/configure ] \
    1188         || [ -r $srcdir/$dirname/configure.in ]; then
     759    if test -r $srcdir/$dirname/configure ; then
    1189760      if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1190761        true
     
    1198769# Sometimes the tools are distributed with libiberty but with no other
    1199770# libraries.  In that case, we don't want to build target-libiberty.
    1200 if [ -n "${target_configdirs}" ]; then
     771if test -n "${target_configdirs}" ; then
    1201772  others=
    1202773  for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
    1203     if [ "$i" != "libiberty" ]; then
    1204       if [ -r $srcdir/$i/configure ] || [ -r $srcdir/$i/configure.in ]; then
     774    if test "$i" != "libiberty" ; then
     775      if test -r $srcdir/$i/configure ; then
    1205776        others=yes;
    1206777        break;
     
    1208779    fi
    1209780  done
    1210   if [ -z "${others}" ]; then
     781  if test -z "${others}" ; then
    1211782    target_configdirs=
    1212783  fi
     
    1216787# configuration from one where a subdirectory is supported to one where it
    1217788# is not.
    1218 if [ -z "${norecursion}" ] && [ -n "${configdirs}" ]; then
     789if test -z "${norecursion}" && test -n "${configdirs}" ; then
    1219790  for i in `echo ${configdirs} | sed -e s/target-//g` ; do
    1220791    rm -f $i/Makefile
    1221792  done
    1222793fi
    1223 if [ -z "${norecursion}" ] && [ -n "${target_configdirs}" ]; then
     794if test -z "${norecursion}" && test -n "${target_configdirs}" ; then
    1224795  for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
    1225796    rm -f ${target_subdir}/$i/Makefile
    1226797  done
    1227798fi
     799
     800# Quietly strip out all directories which aren't configurable in this tree.
     801# This relies on all configurable subdirectories being autoconfiscated, which
     802# is now the case.
     803configdirs_all="$configdirs"
     804configdirs=
     805for i in ${configdirs_all} ; do
     806  if test -f ${srcdir}/$i/configure ; then
     807    configdirs="${configdirs} $i"
     808  fi
     809done
     810target_configdirs_all="$target_configdirs"
     811target_configdirs=
     812for i in ${target_configdirs_all} ; do
     813  j=`echo $i | sed -e s/target-//g`
     814  if test -f ${srcdir}/$j/configure ; then
     815    target_configdirs="${target_configdirs} $i"
     816  fi
     817done
    1228818
    1229819# Produce a warning message for the subdirs we can't configure.
     
    1232822# supported by the one or two programs in a package.
    1233823
    1234 if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then
     824if test -n "${notsupp}" && test -z "${norecursion}" ; then
    1235825  # If $appdirs is non-empty, at least one of those directories must still
    1236826  # be configured, or we error out.  (E.g., if the gas release supports a
    1237827  # specified target in some subdirs but not the gas subdir, we shouldn't
    1238828  # pretend that all is well.)
    1239   if [ -n "$appdirs" ]; then
     829  if test -n "$appdirs" ; then
    1240830    for dir in $appdirs ; do
    1241       if [ -r $dir/Makefile.in ]; then
     831      if test -r $dir/Makefile.in ; then
    1242832        if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1243833          appdirs=""
     
    1250840      fi
    1251841    done
    1252     if [ -n "$appdirs" ]; then
     842    if test -n "$appdirs" ; then
    1253843      echo "*** This configuration is not supported by this package." 1>&2
    1254844      exit 1
     
    1260850  echo "    ${notsupp}" 1>&2
    1261851  echo "    (Any other directories should still work fine.)" 1>&2
     852fi
     853
     854case "$host" in
     855  *msdosdjgpp*)
     856    enable_gdbtk=no ;;
     857esac
     858# Determine whether gdb needs tk/tcl or not.
     859case "$enable_gdbtk" in
     860  no)
     861    GDB_TK="" ;;
     862  *)
     863    GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" ;;
     864esac
     865
     866copy_dirs=
     867
     868# Handle --with-headers=XXX.  If the value is not "yes", the contents of
     869# the named directory are copied to $(tooldir)/sys-include.
     870if test x"${with_headers}" != x ; then
     871  if test x${is_cross_compiler} = xno ; then
     872    echo 1>&2 '***' --with-headers is only supported when cross compiling
     873    exit 1
     874  fi
     875  if test x"${with_headers}" != xyes ; then
     876    case "${exec_prefixoption}" in
     877    "") x=${prefix} ;;
     878    *) x=${exec_prefix} ;;
     879    esac
     880    copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
     881  fi
     882fi
     883
     884# Handle --with-libs=XXX.  If the value is not "yes", the contents of
     885# the name directories are copied to $(tooldir)/lib.  Multiple directories
     886# are permitted.
     887if test x"${with_libs}" != x ; then
     888  if test x${is_cross_compiler} = xno ; then
     889    echo 1>&2 '***' --with-libs is only supported when cross compiling
     890    exit 1
     891  fi
     892  if test x"${with_libs}" != xyes ; then
     893    # Copy the libraries in reverse order, so that files in the first named
     894    # library override files in subsequent libraries.
     895    case "${exec_prefixoption}" in
     896    "") x=${prefix} ;;
     897    *) x=${exec_prefix} ;;
     898    esac
     899    for l in ${with_libs}; do
     900      copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
     901    done
     902  fi
     903fi
     904
     905# Handle ${copy_dirs}
     906set fnord ${copy_dirs}
     907shift
     908while test $# != 0 ; do
     909  if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
     910    :
     911  else
     912    echo Copying $1 to $2
     913
     914    # Use the install script to create the directory and all required
     915    # parent directories.
     916    if test -d $2 ; then
     917      :
     918    else
     919      echo >config.temp
     920      ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
     921    fi
     922
     923    # Copy the directory, assuming we have tar.
     924    # FIXME: Should we use B in the second tar?  Not all systems support it.
     925    (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
     926
     927    # It is the responsibility of the user to correctly adjust all
     928    # symlinks.  If somebody can figure out how to handle them correctly
     929    # here, feel free to add the code.
     930
     931    echo $1 > $2/COPIED
     932  fi
     933  shift; shift
     934done
     935
     936# Work in distributions that contain no compiler tools, like Autoconf.
     937tentative_cc=""
     938if test -d ${srcdir}/config ; then
     939case "${host}" in
     940  m68k-hp-hpux*)
     941    # Avoid "too much defining" errors from HPUX compiler.
     942    tentative_cc="cc -Wp,-H256000"
     943    host_makefile_frag="config/mh-hp300"
     944    ;;
     945  m68k-apollo-sysv*)
     946    tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
     947    host_makefile_frag="config/mh-apollo68"
     948    ;;
     949  m68k-apollo-bsd*)
     950    #None of the Apollo compilers can compile gas or binutils.  The preprocessor
     951    # chokes on bfd, the compiler won't let you assign integers to enums, and
     952    # other problems.  Defining CC to gcc is a questionable way to say "don't use
     953    # the apollo compiler" (the preferred version of GCC could be called cc,
     954    # or whatever), but I'm not sure leaving CC as cc is any better...
     955    #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
     956    tentative_cc=gcc
     957    host_makefile_frag="config/mh-a68bsd"
     958    ;;
     959  m88k-dg-dgux*)
     960    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
     961    host_makefile_frag="config/mh-dgux"
     962    ;;
     963  m88k-harris-cxux*)
     964    # Under CX/UX, we want to tell the compiler to use ANSI mode.
     965    tentative_cc="cc -Xa"
     966    host_makefile_frag="config/mh-cxux"
     967    ;;
     968  m88k-motorola-sysv*)
     969    host_makefile_frag="config/mh-delta88"
     970    ;;
     971  mips*-dec-ultrix*)
     972    tentative_cc="cc -Wf,-XNg1000"
     973    host_makefile_frag="config/mh-decstation"
     974    ;;
     975  mips*-nec-sysv4*)
     976    # The C compiler on NEC MIPS SVR4 needs bigger tables.
     977    tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
     978    host_makefile_frag="config/mh-necv4"
     979    ;;
     980  mips*-sgi-irix6*)
     981    host_makefile_frag="config/mh-irix6"
     982    ;;
     983  mips*-sgi-irix5*)
     984    host_makefile_frag="config/mh-irix5"
     985    ;;
     986  mips*-sgi-irix4*)
     987    # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
     988    # environment.  Also bump switch table size so that cp-parse will
     989    # compile.  Bump string length limit so linker builds.
     990    tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
     991    ;;
     992  mips*-sgi-irix3*)
     993    host_makefile_frag="config/mh-sysv"
     994    ;;
     995  mips*-*-sysv4*)
     996    host_makefile_frag="config/mh-sysv4"
     997    ;;
     998  mips*-*-sysv*)
     999    # This is for a MIPS running RISC/os 4.52C.
     1000
     1001    # This is needed for GDB, but needs to be in the top-level make because
     1002    # if a library is compiled with the bsd headers and gets linked with the
     1003    # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
     1004    # a different size).
     1005    # ptrace(2) apparently has problems in the BSD environment.  No workaround is
     1006    # known except to select the sysv environment.  Could we use /proc instead?
     1007    # These "sysv environments" and "bsd environments" often end up being a pain.
     1008    #
     1009    # This is not part of CFLAGS because perhaps not all C compilers have this
     1010    # option.
     1011    tentative_cc="cc -systype sysv"
     1012    host_makefile_frag="config/mh-riscos"
     1013    ;;
     1014  i370-ibm-opened*)
     1015    tentative_cc="c89"
     1016    host_makefile_frag="config/mh-openedition"
     1017    ;;
     1018  i[3456]86-*-sysv5*)
     1019    host_makefile_frag="config/mh-sysv5"
     1020    ;;
     1021  i[3456]86-*-dgux*)
     1022    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
     1023    host_makefile_frag="config/mh-dgux386"
     1024    ;;
     1025  i[3456]86-ncr-sysv4.3*)
     1026    # The MetaWare compiler will generate a copyright message unless you
     1027    # turn it off by adding the -Hnocopyr flag.
     1028    tentative_cc="cc -Hnocopyr"
     1029    host_makefile_frag="config/mh-ncrsvr43"
     1030    ;;
     1031  i[3456]86-ncr-sysv4*)
     1032    # for an NCR 3000 (i486/SVR4) system.
     1033    # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
     1034    # This compiler not only emits obnoxious copyright messages every time
     1035    # you run it, but it chokes and dies on a whole bunch of GNU source
     1036    # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
     1037    tentative_cc="/usr/ccs/ATT/cc"
     1038    host_makefile_frag="config/mh-ncr3000"
     1039    ;;
     1040  i[3456]86-*-sco3.2v5*)
     1041    host_makefile_frag="config/mh-sysv"
     1042    ;;
     1043  i[3456]86-*-sco*)
     1044    # The native C compiler botches some simple uses of const.  Unfortunately,
     1045    # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
     1046    tentative_cc="cc -Dconst="
     1047    host_makefile_frag="config/mh-sco"
     1048    ;;
     1049  i[3456]86-*-udk*)
     1050    host_makefile_frag="config/mh-sysv5"
     1051    ;;
     1052  i[3456]86-*-isc*)
     1053    host_makefile_frag="config/mh-sysv"
     1054    ;;
     1055  i[3456]86-*-solaris2*)
     1056    host_makefile_frag="config/mh-sysv4"
     1057    ;;
     1058  i[3456]86-*-aix*)
     1059    host_makefile_frag="config/mh-aix386"
     1060    ;;
     1061  i[3456]86-*-msdosdjgpp*)
     1062    host_makefile_frag="config/mh-djgpp"
     1063    ;;
     1064  *-cygwin*)
     1065    host_makefile_frag="config/mh-cygwin"
     1066    ;;
     1067  *-mingw32*)
     1068    host_makefile_frag="config/mh-mingw32"
     1069    ;;
     1070  *-interix*)
     1071    host_makefile_frag="config/mh-interix"
     1072    ;;
     1073  vax-*-ultrix2*)
     1074    # The old BSD pcc isn't up to compiling parts of gdb so use gcc
     1075    tentative_cc=gcc
     1076    ;;
     1077  *-*-solaris2*)
     1078    host_makefile_frag="config/mh-solaris"
     1079    ;;
     1080  m68k-sun-sunos*)
     1081    # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
     1082    # without overflowing the jump tables (-J says to use a 32 bit table)
     1083    tentative_cc="cc -J"
     1084    ;;
     1085  *-hp-hpux[78]*)
     1086    tentative_cc="cc -Wp,-H256000"
     1087    host_makefile_frag="config/mh-hpux8"
     1088    ;;
     1089  *-hp-hpux*)
     1090    tentative_cc="cc -Wp,-H256000"
     1091    host_makefile_frag="config/mh-hpux"
     1092    ;;
     1093  *-*-hiux*)
     1094    tentative_cc="cc -Wp,-H256000"
     1095    host_makefile_frag="config/mh-hpux"
     1096    ;;
     1097  rs6000-*-lynxos*)
     1098    # /bin/cc is less than useful for our purposes.  Always use GCC
     1099    tentative_cc="/usr/cygnus/progressive/bin/gcc"
     1100    host_makefile_frag="config/mh-lynxrs6k"
     1101    ;;
     1102  *-*-lynxos*)
     1103    # /bin/cc is less than useful for our purposes.  Always use GCC
     1104    tentative_cc="/bin/gcc"
     1105    ;;
     1106  *-*-sysv4*)
     1107    host_makefile_frag="config/mh-sysv4"
     1108    ;;
     1109  *-*-sysv*)
     1110    host_makefile_frag="config/mh-sysv"
     1111    ;;
     1112esac
     1113fi
     1114
     1115rm -f mh-frag
     1116if test -n "${host_makefile_frag}" ; then
     1117  for f in ${host_makefile_frag}
     1118  do
     1119    cat ${srcdir}/$f >> mh-frag
     1120  done
     1121  host_makefile_frag=mh-frag
     1122fi
     1123
     1124case "${target}" in
     1125  v810*)
     1126    target_makefile_frag="config/mt-v810"
     1127    ;;
     1128  i[3456]86-*-netware*)
     1129    target_makefile_frag="config/mt-netware"
     1130    ;;
     1131  powerpc-*-netware*)
     1132    target_makefile_frag="config/mt-netware"
     1133    ;;
     1134  *-*-linux*)
     1135    target_makefile_frag="config/mt-linux"
     1136    ;;
     1137  *-*-aix4.[3456789]* | *-*-aix[56789].*)
     1138    target_makefile_frag="config/mt-aix43"
     1139    ;;
     1140  mips*-*-pe | sh*-*-pe | *arm-wince-pe)
     1141    target_makefile_frag="config/mt-wince"
     1142    ;;
     1143esac
     1144
     1145alphaieee_frag=
     1146case $target in
     1147  alpha*-*-*)
     1148    # This just makes sure to use the -mieee option to build target libs.
     1149    # This should probably be set individually by each library.
     1150    alphaieee_frag="config/mt-alphaieee"
     1151    ;;
     1152esac
     1153
     1154# If --enable-target-optspace always use -Os instead of -O2 to build
     1155# the target libraries, similarly if it is not specified, use -Os
     1156# on selected platforms.
     1157ospace_frag=
     1158case "${enable_target_optspace}:${target}" in
     1159  yes:*)
     1160    ospace_frag="config/mt-ospace"
     1161    ;;
     1162  :d30v-*)
     1163    ospace_frag="config/mt-d30v"
     1164    ;;
     1165  :m32r-* | :d10v-* | :fr30-*)
     1166    ospace_frag="config/mt-ospace"
     1167    ;;
     1168  no:* | :*)
     1169    ;;
     1170  *)
     1171    echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
     1172    ;;
     1173esac
     1174
     1175rm -f mt-frag
     1176if test -n "${target_makefile_frag}${alphaieee_frag}${ospace_frag}" ; then
     1177  for f in ${target_makefile_frag} ${alphaieee_frag} ${ospace_frag}
     1178  do
     1179    cat ${srcdir}/$f >> mt-frag
     1180  done
     1181  target_makefile_frag=mt-frag
    12621182fi
    12631183
     
    12751195# --without-gnu-ld options for the configure script.
    12761196
    1277 if [ x${use_gnu_as} = x ] ; then
    1278   if [ x${with_gnu_as} != xno ] && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && [ -d ${srcdir}/${gasdir} ] ; then
    1279     with_gnu_as=yes
    1280     withoptions="$withoptions --with-gnu-as"
    1281   fi
    1282 fi
    1283 
    1284 if [ x${use_gnu_ld} = x ] ; then
    1285   if [ x${with_gnu_ld} != xno ] && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 && [ -d ${srcdir}/ld ] ; then
    1286     with_gnu_ld=yes
    1287     withoptions="$withoptions --with-gnu-ld"
    1288   fi
     1197if test x${use_gnu_as} = x &&
     1198   echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
     1199  with_gnu_as=yes
     1200  withoptions="$withoptions --with-gnu-as"
     1201fi
     1202
     1203if test x${use_gnu_ld} = x &&
     1204   echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
     1205  with_gnu_ld=yes
     1206  withoptions="$withoptions --with-gnu-ld"
    12891207fi
    12901208
     
    12921210# can detect this case.
    12931211
    1294 if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then
     1212if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
    12951213  with_newlib=yes
    12961214  withoptions="$withoptions --with-newlib"
    12971215fi
    12981216
    1299 if [ x${shared} = xyes ]; then
     1217# We default to --with-shared on platforms where -fpic is meaningless.
     1218# Well, we don't yet, but we will.
     1219if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then
    13001220  case "${target}" in
    1301     hppa* | parisc*)
    1302       target_makefile_frag="${target_makefile_frag} config/mt-papic"
    1303       ;;
    1304     i[3456]86-*)
    1305       target_makefile_frag="${target_makefile_frag} config/mt-x86pic"
    1306       ;;
    1307     ia64-*)
    1308       target_makefile_frag="${target_makefile_frag} config/mt-ia64pic"
    1309       ;;
    1310     powerpc*-*-aix*)
    1311       # We don't want -fPIC on AIX.
    1312       ;;
    1313     powerpc*-*)
    1314       target_makefile_frag="${target_makefile_frag} config/mt-ppcpic"
    1315       ;;
    1316     alpha*-*-linux*)
    1317       target_makefile_frag="${target_makefile_frag} config/mt-elfalphapic"
    1318       ;;
    1319     *)
    1320       if test -f ${srcdir}/config/mt-${target_cpu}pic; then
    1321         target_makefile_frag="${target_makefile_frag} config/mt-${target_cpu}pic"
    1322       fi
    1323       ;;
     1221    alpha*-dec-osf*)    enable_shared=yes ;;
     1222    alpha*-*-linux*)    enable_shared=yes ;;
     1223    mips-sgi-irix5*)    enable_shared=yes ;;
     1224    *)                  enable_shared=no ;;
    13241225  esac
    13251226fi
    13261227
    1327 rm -f mt-frag
    1328 if [ -n "${target_makefile_frag}" ] ; then
    1329   for f in ${target_makefile_frag}
    1330   do
    1331     cat ${srcdir}/$f >> mt-frag
     1228case "${enable_shared}" in
     1229  yes) shared=yes ;;
     1230  no) shared=no ;;
     1231  "") shared=no ;;
     1232  *) shared=yes ;;
     1233esac
     1234
     1235
     1236# Default to using --with-stabs for certain targets.
     1237if test x${with_stabs} = x ; then
     1238  case "${target}" in
     1239  mips*-*-irix6*)
     1240    ;;
     1241  mips*-*-* | alpha*-*-osf*)
     1242    with_stabs=yes;
     1243    withoptions="${withoptions} --with-stabs"
     1244    ;;
     1245  esac
     1246fi
     1247
     1248# hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
     1249# them automatically.
     1250case "${host}" in
     1251  hppa*64*-*-hpux11*)   
     1252    withoptions="$withoptions -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
     1253    ;;
     1254esac
     1255
     1256# If we aren't going to be using gcc, see if we can extract a definition
     1257# of CC from the fragment.
     1258# Actually, use the 'pre-extracted' version above.
     1259if test -z "${CC}" && test "${build}" = "${host}" ; then
     1260  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
     1261  found=
     1262  for dir in $PATH; do
     1263    test -z "$dir" && dir=.
     1264    if test -f $dir/gcc; then
     1265      found=yes
     1266      break
     1267    fi
    13321268  done
    1333   target_makefile_frag=mt-frag
     1269  IFS="$save_ifs"
     1270  if test -z "${found}" && test -n "${tentative_cc}" ; then
     1271    CC=$tentative_cc
     1272  fi
    13341273fi
    13351274
     
    13401279# executable--we might be using a cross compiler--we only care whether it
    13411280# can be created.  At this point the main configure script has set CC.
     1281we_are_ok=no
    13421282echo "int main () { return 0; }" > conftest.c
    13431283${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
    1344 if [ $? = 0 ] && [ -s conftest -o -s conftest.exe ]; then
    1345   :
    1346 else
    1347   echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
    1348   echo 1>&2 "*** You must set the environment variable CC to a working compiler."
    1349   rm -f conftest*
    1350   exit 1
    1351 fi
     1284if test $? = 0 ; then
     1285  if test -s conftest || test -s conftest.exe ; then
     1286    we_are_ok=yes
     1287  fi
     1288fi
     1289case $we_are_ok in
     1290  no)
     1291    echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
     1292    echo 1>&2 "*** You must set the environment variable CC to a working compiler."
     1293    rm -f conftest*
     1294    exit 1
     1295    ;;
     1296esac
    13521297rm -f conftest*
    13531298
     
    13561301  sparc-sun-solaris2*)
    13571302      CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
    1358       if [ "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ] ; then
     1303      if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
    13591304          could_use=
    1360           [ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin"
    1361           if [ -d /opt/cygnus/bin ] ; then
    1362               if [ "$could_use" = "" ] ; then
     1305          test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
     1306          if test -d /opt/cygnus/bin ; then
     1307              if test "$could_use" = "" ; then
    13631308                  could_use="/opt/cygnus/bin"
    13641309              else
     
    13661311              fi
    13671312          fi
    1368         if [ "$could_use" = "" ] ; then
     1313        if test "$could_use" = "" ; then
    13691314            echo "Warning: compilation may fail because you're using"
    13701315            echo "/usr/ucb/cc.  You should change your PATH or CC "
     
    13821327# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
    13831328# binutils tools will find libbfd.so.
    1384 if [ "${shared}" = "yes" ]; then
    1385   sed -e 's/^SET_LIB_PATH[      ]*=.*$/SET_LIB_PATH = $(REALLY_SET_LIB_PATH)/' \
    1386       Makefile > Makefile.tem
    1387   rm -f Makefile
    1388   mv -f Makefile.tem Makefile
    1389 
    1390   case "${host}" in
    1391   *-*-hpux*)
    1392     sed -e 's/^RPATH_ENVVAR[    ]*=.*$/RPATH_ENVVAR = SHLIB_PATH/' \
    1393         Makefile > Makefile.tem
    1394     rm -f Makefile
    1395     mv -f Makefile.tem Makefile
    1396     ;;
    1397   esac
    1398 fi
     1329if test "${shared}" = "yes" ; then
     1330  SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)"
     1331else
     1332  SET_LIB_PATH=
     1333fi
     1334sed -e "s/@SET_LIB_PATH@/${SET_LIB_PATH}/" Makefile > Makefile.tem
     1335rm -f Makefile
     1336mv -f Makefile.tem Makefile
     1337
     1338
     1339case "${host}" in
     1340  *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
     1341  *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
     1342esac
     1343sed -e "s/@RPATH_ENVVAR@/${RPATH_ENVVAR}/" Makefile > Makefile.tem
     1344rm -f Makefile
     1345mv -f Makefile.tem Makefile
     1346
     1347
     1348# Base args.  Strip norecursion, cache-file, srcdir, host, build, target.
     1349# These are the ones we might not want to pass down to subconfigures.
     1350baseargs=`echo "${arguments}" | \
     1351        sed -e 's/--no[^        ]*//' \
     1352            -e 's/--cache[a-z-]*=[^     ]*//' \
     1353            -e 's/--sr[a-z-]*=[^        ]*//' \
     1354            -e 's/--ho[a-z-]*=[^        ]*//' \
     1355            -e 's/--bu[a-z-]*=[^        ]*//' \
     1356            -e 's/--ta[a-z-]*=[^        ]*//'`
     1357
     1358# For the build-side libraries, we just need to pretend we're native,
     1359# and not use the same cache file.  Multilibs are neither needed nor
     1360# desired.
     1361buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
    13991362
    14001363# Record target_configdirs and the configure arguments for target and
    14011364# build configuration in Makefile.
    14021365target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
    1403 targargs=`echo "${arguments}" | \
    1404         sed -e 's/--no[^        ]*//' \
    1405             -e 's/--cache[a-z-]*=[^     ]*//' \
    1406             -e 's/--ho[a-z-]*=[^        ]*//' \
    1407             -e 's/--bu[a-z-]*=[^        ]*//' \
    1408             -e 's/--ta[a-z-]*=[^        ]*//'`
    1409 
    1410 # For the build-side libraries, we just need to pretend we're native,
    1411 # and not use the same cache file.  Multilibs are neither needed nor
    1412 # desired.
    1413 buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${targargs}"
     1366targargs=${baseargs}
    14141367
    14151368# Passing a --with-cross-host argument lets the target libraries know
     
    14181371# sorts of decisions they want to make on this basis.  Please consider
    14191372# this option to be deprecated.  FIXME.
    1420 if [ x${is_cross_compiler} = xyes ]; then
     1373if test x${is_cross_compiler} = xyes ; then
    14211374  targargs="--with-cross-host=${host_alias} ${targargs}"
    14221375fi
    14231376
    14241377# Default to --enable-multilib.
    1425 if [ x${enable_multilib} = x ]; then
     1378if test x${enable_multilib} = x ; then
    14261379  targargs="--enable-multilib ${targargs}"
    14271380fi
     
    14291382# Pass --with-newlib if appropriate.  Note that target_configdirs has
    14301383# changed from the earlier setting of with_newlib.
    1431 if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then
     1384if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
    14321385  targargs="--with-newlib ${targargs}"
    14331386fi
     
    14581411    gxx_include_dir='${libsubdir}/include/c++'
    14591412  else
    1460     . ${topsrcdir}/config.if
    1461     gxx_include_dir='${prefix}/include/${libstdcxx_incdir}'
     1413    . ${srcdir}/config.if
     1414    gxx_include_dir='${prefix}/include/'${libstdcxx_incdir}
    14621415  fi
    14631416else
     
    14661419
    14671420FLAGS_FOR_TARGET=
    1468 case " $skipdirs " in
    1469 *" target-newlib "*) ;;
    1470 *)
    1471  case " $target_configdirs " in
     1421case " $target_configdirs " in
    14721422 *" newlib "*)
    14731423  case " $targargs " in
     
    14791429
    14801430   # If we're not building GCC, don't discard standard headers.
    1481    if test -d ${topsrcdir}/gcc; then
     1431   if test -d ${srcdir}/gcc; then
    14821432     FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
    14831433
     
    15011451   fi
    15021452
    1503    # If we're building newlib, use its generic headers last, but search
    1504    # for any libc-related directories first (so make it the last -B
    1505    # switch).
    1506    FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
     1453   case "${target}-${is_cross_compiler}" in
     1454   i[3456]86-*-linux*-no)
     1455      # Here host == target, so we don't need to build gcc,
     1456      # so we don't want to discard standard headers.
     1457      FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
     1458      ;;
     1459   *)
     1460      # If we're building newlib, use its generic headers last, but search
     1461      # for any libc-related directories first (so make it the last -B
     1462      # switch).
     1463      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
     1464      ;;
     1465   esac
    15071466   ;;
    15081467  esac
    15091468  ;;
    1510  esac
    1511  ;;
    15121469esac
    15131470
     
    15161473# flags for directories within the install tree of the compiler
    15171474# being built; programs in there won't even run.
    1518 if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then
     1475if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
    15191476  # Search for pre-installed headers if nothing else fits.
    15201477  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
    15211478fi
    15221479
    1523 if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno &&
    1524    echo " ${configdirs} " | grep " ld " > /dev/null &&
    1525    test -d ${srcdir}/ld; then
     1480if test "x${use_gnu_ld}" = x &&
     1481   echo " ${configdirs} " | grep " ld " > /dev/null ; then
    15261482  # Arrange for us to find uninstalled linker scripts.
    15271483  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
     
    15301486if test "x${CC_FOR_TARGET+set}" = xset; then
    15311487  :
    1532 elif test -d ${topsrcdir}/gcc; then
     1488elif test -d ${srcdir}/gcc; then
    15331489  CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
    15341490elif test "$host" = "$target"; then
     
    15461502if test "x${GCJ_FOR_TARGET+set}" = xset; then
    15471503  :
    1548 elif test -d ${topsrcdir}/gcc; then
     1504elif test -d ${srcdir}/gcc; then
    15491505  GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
    15501506elif test "$host" = "$target"; then
     
    15581514esac
    15591515
     1516# Don't use libstdc++-v3's flags to configure/build itself.
     1517libstdcxx_flags='`case $$dir in libstdc++-v3 | libjava) ;; *) test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes;; esac` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
     1518
    15601519if test "x${CXX_FOR_TARGET+set}" = xset; then
    15611520  :
    1562 elif test -d ${topsrcdir}/gcc; then
     1521elif test -d ${srcdir}/gcc; then
    15631522  # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
    15641523  # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
     
    15861545sedtemp=sed.$$
    15871546cat >$sedtemp <<EOF
    1588 s:^TARGET_CONFIGDIRS[   ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:
    1589 s%^TARGET_CONFIGARGS[   ]*=.*$%TARGET_CONFIGARGS = ${targargs}%
    1590 s%^FLAGS_FOR_TARGET[    ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%
    1591 s%^CC_FOR_TARGET[       ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%
    1592 s%^GCJ_FOR_TARGET[      ]*=.*$%GCJ_FOR_TARGET = ${GCJ_FOR_TARGET}%
    1593 s%^CXX_FOR_TARGET[      ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%
    1594 s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[   ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%
    1595 s%^TARGET_SUBDIR[       ]*=.*$%TARGET_SUBDIR = ${target_subdir}%
    1596 s%^BUILD_SUBDIR[        ]*=.*$%BUILD_SUBDIR = ${build_subdir}%
    1597 s%^BUILD_CONFIGARGS[    ]*=.*$%BUILD_CONFIGARGS = ${buildargs}%
    1598 s%^gxx_include_dir[     ]*=.*$%gxx_include_dir=${gxx_include_dir}%
     1547s:@target_configdirs@:${target_configdirs}:
     1548s%@target_configargs@%${targargs}%
     1549s%@FLAGS_FOR_TARGET@%${FLAGS_FOR_TARGET}%
     1550s%@CC_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
     1551s%@GCJ_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
     1552s%@CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
     1553s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}%
     1554s%@target_subdir@%${target_subdir}%
     1555s%@build_subdir@%${build_subdir}%
     1556s%@build_configargs@%${buildargs}%
     1557s%@gxx_include_dir@%${gxx_include_dir}%
    15991558EOF
    16001559sed -f $sedtemp Makefile > Makefile.tem
Note: See TracChangeset for help on using the changeset viewer.