Changeset 605


Ignore:
Timestamp:
Aug 16, 2003, 6:41:03 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

Location:
branches/GNU/src/binutils
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/GNU/src/binutils/config-ml.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    1 # Configure fragment invoked in the post-target section for subdirs
    2 # wanting multilib support.
    3 #
    4 # It is advisable to support a few --enable/--disable options to let the
    5 # user select which libraries s/he really wants.
    6 #
    7 # Subdirectories wishing to use multilib should put the following lines
    8 # in the "post-target" section of configure.in.
    9 #
    10 # if [ "${srcdir}" = "." ] ; then
    11 #   if [ "${with_target_subdir}" != "." ] ; then
    12 #     . ${with_multisrctop}../../config-ml.in
    13 #   else
    14 #     . ${with_multisrctop}../config-ml.in
    15 #   fi
    16 # else
    17 #   . ${srcdir}/../config-ml.in
    18 # fi
    19 #
    20 # See librx/configure.in in the libg++ distribution for an example of how
    21 # to handle autoconf'd libraries.
    22 #
    23 # Things are complicated because 6 separate cases must be handled:
    24 # 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6.
    25 #
    26 # srcdir=. is special.  It must handle make programs that don't handle VPATH.
    27 # To implement this, a symlink tree is built for each library and for each
    28 # multilib subdir.
    29 #
    30 # The build tree is layed out as
    31 #
    32 # ./
    33 #   libg++
    34 #   newlib
    35 #   m68020/
    36 #          libg++
    37 #          newlib
    38 #          m68881/
    39 #                 libg++
    40 #                 newlib
    41 #
    42 # The nice feature about this arrangement is that inter-library references
    43 # in the build tree work without having to care where you are.  Note that
    44 # inter-library references also work in the source tree because symlink trees
    45 # are built when srcdir=.
    46 #
    47 # Unfortunately, trying to access the libraries in the build tree requires
    48 # the user to manually choose which library to use as GCC won't be able to
    49 # find the right one.  This is viewed as the lesser of two evils.
    50 #
    51 # Configure variables:
    52 # ${with_target_subdir} = "." for native, or ${target_alias} for cross.
    53 # Set by top level Makefile.
    54 # ${with_multisrctop} = how many levels of multilibs there are in the source
    55 # tree.  It exists to handle the case of configuring in the source tree:
    56 # ${srcdir} is not constant.
    57 # ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881).
    58 #
    59 # Makefile variables:
    60 # MULTISRCTOP = number of multilib levels in source tree (+1 if cross)
    61 # (FIXME: note that this is different than ${with_multisrctop}.  Check out.).
    62 # MULTIBUILDTOP = number of multilib levels in build tree
    63 # MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...)
    64 # (only defined in each library's main Makefile).
    65 # MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000)
    66 # (only defined in each multilib subdir).
    67 
    68 # FIXME: Multilib is currently disabled by default for everything other than
    69 # newlib.  It is up to each target to turn on multilib support for the other
    70 # libraries as desired.
    71 
    72 # We have to handle being invoked by both Cygnus configure and Autoconf.
    73 #
    74 # Cygnus configure incoming variables:
    75 # srcdir, subdir, host, arguments
    76 #
    77 # Autoconf incoming variables:
    78 # srcdir, host, ac_configure_args
    79 #
    80 # We *could* figure srcdir and host out, but we'd have to do work that
    81 # our caller has already done to figure them out and requiring these two
    82 # seems reasonable.
    83 # Note that `host' in this case is GCC's `target'.  Target libraries are
    84 # configured for a particular host.
    85 
    86 if [ -n "${ac_configure_args}" ]; then
    87   Makefile=${ac_file-Makefile}
    88   ml_config_shell=${CONFIG_SHELL-/bin/sh}
    89   ml_arguments="${ac_configure_args}"
    90   ml_realsrcdir=${srcdir}
    91 else
    92   Makefile=${Makefile-Makefile}
    93   ml_config_shell=${config_shell-/bin/sh}
    94   ml_arguments="${arguments}"
    95   if [ -n "${subdir}" -a "${subdir}" != "." ] ; then
    96     ml_realsrcdir=${srcdir}/${subdir}
    97   else
    98     ml_realsrcdir=${srcdir}
    99   fi
    100 fi
    101 
    102 # Scan all the arguments and set all the ones we need.
    103 
    104 ml_verbose=--verbose
    105 for option in ${ml_arguments}
    106 do
    107   case $option in
    108   --*) ;;
    109   -*) option=-$option ;;
    110   esac
    111 
    112   case $option in
    113   --*=*)
    114         optarg=`echo $option | sed -e 's/^[^=]*=//'`
    115         ;;
    116   esac
    117 
    118   case $option in
    119   --disable-*)
    120         enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
    121         eval $enableopt=no
    122         ;;
    123   --enable-*)
    124         case "$option" in
    125         *=*)    ;;
    126         *)      optarg=yes ;;
    127         esac
    128         enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
    129         eval $enableopt="$optarg"
    130         ;;
    131   --norecursion | --no*)
    132         ml_norecursion=yes
    133         ;;
    134   --silent | --sil* | --quiet | --q*)
    135         ml_verbose=--silent
    136         ;;
    137   --verbose | --v | --verb*)
    138         ml_verbose=--verbose
    139         ;;
    140   --with-*)
    141         case "$option" in
    142         *=*)    ;;
    143         *)      optarg=yes ;;
    144         esac
    145         withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
    146         eval $withopt="$optarg"
    147         ;;
    148   --without-*)
    149         withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
    150         eval $withopt=no
    151         ;;
    152   esac
    153 done
    154 
    155 # Only do this if --enable-multilib.
    156 if [ "${enable_multilib}" = yes ]; then
    157 
    158 # Compute whether this is the library's top level directory
    159 # (ie: not a multilib subdirectory, and not a subdirectory like libg++/src).
    160 # ${with_multisubdir} tells us we're in the right branch, but we could be
    161 # in a subdir of that.
    162 # ??? The previous version could void this test by separating the process into
    163 # two files: one that only the library's toplevel configure.in ran (to
    164 # configure the multilib subdirs), and another that all configure.in's ran to
    165 # update the Makefile.  It seemed reasonable to collapse all multilib support
    166 # into one file, but it does leave us with having to perform this test.
    167 ml_toplevel_p=no
    168 if [ -z "${with_multisubdir}" ]; then
    169   if [ "${srcdir}" = "." ]; then
    170     # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
    171     # ${with_target_subdir} = "." for native, otherwise target alias.
    172     if [ "${with_target_subdir}" = "." ]; then
    173       if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
    174         ml_toplevel_p=yes
    175       fi
    176     else
    177       if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then
    178         ml_toplevel_p=yes
    179       fi
    180     fi
    181   else
    182     # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
    183     if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
    184       ml_toplevel_p=yes
    185     fi
    186   fi
    187 fi
    188 
    189 # If this is the library's top level directory, set multidirs to the
    190 # multilib subdirs to support.  This lives at the top because we need
    191 # `multidirs' set right away.
    192 
    193 if [ "${ml_toplevel_p}" = yes ]; then
    194 
    195 multidirs=
    196 for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
    197   dir=`echo $i | sed -e 's/;.*$//'`
    198   if [ "${dir}" = "." ]; then
    199     true
    200   else
    201     if [ -z "${multidirs}" ]; then
    202       multidirs="${dir}"
    203     else
    204       multidirs="${multidirs} ${dir}"
    205     fi
    206   fi
    207 done
    208 
    209 # Target libraries are configured for the host they run on, so we check
    210 # $host here, not $target.
    211 
    212 case "${host}" in
    213 arc-*-elf*)
    214         if [ x$enable_biendian != xyes ]
    215         then
    216           old_multidirs=${multidirs}
    217           multidirs=""
    218           for x in ${old_multidirs}; do
    219             case "${x}" in
    220               *be*) : ;;
    221               *) multidirs="${multidirs} ${x}" ;;
    222             esac
    223           done
    224         fi
    225         ;;
    226 arm-*-*)
    227         if [ x"$enable_fpu" = xno ]
    228         then
    229           old_multidirs=${multidirs}
    230           multidirs=""
    231           for x in ${old_multidirs}; do
    232             case "${x}" in
    233               *fpu*) : ;;
    234               *) multidirs="${multidirs} ${x}" ;;
    235             esac
    236           done
    237         fi
    238         if [ x"$enable_26bit" = xno ]
    239         then
    240           old_multidirs=${multidirs}
    241           multidirs=""
    242           for x in ${old_multidirs}; do
    243             case "${x}" in
    244               *26bit*) : ;;
    245               *) multidirs="${multidirs} ${x}" ;;
    246             esac
    247           done
    248         fi
    249         if [ x"$enable_underscore" = xno ]
    250         then
    251           old_multidirs=${multidirs}
    252           multidirs=""
    253           for x in ${old_multidirs}; do
    254             case "${x}" in
    255               *under*) : ;;
    256               *) multidirs="${multidirs} ${x}" ;;
    257             esac
    258           done
    259         fi
    260         if [ x"$enable_interwork" = xno ]
    261         then
    262           old_multidirs=${multidirs}
    263           multidirs=""
    264           for x in ${old_multidirs}; do
    265             case "${x}" in
    266               *interwork*) : ;;
    267               *) multidirs="${multidirs} ${x}" ;;
    268             esac
    269           done
    270         fi
    271         if [ x$enable_biendian = xno ]
    272         then
    273           old_multidirs="${multidirs}"
    274           multidirs=""
    275           for x in ${old_multidirs}; do
    276             case "$x" in
    277               *le* ) : ;;
    278               *be* ) : ;;
    279               *) multidirs="${multidirs} ${x}" ;;
    280             esac
    281           done
    282         fi
    283         if [ x"$enable_nofmult" = xno ]
    284         then
    285           old_multidirs="${multidirs}"
    286           multidirs=""
    287           for x in ${old_multidirs}; do
    288             case "$x" in
    289               *nofmult* ) : ;;
    290               *) multidirs="${multidirs} ${x}" ;;
    291             esac
    292           done
    293         fi
    294         ;;
    295 m68*-*-*)
    296         if [ x$enable_softfloat = xno ]
    297         then
    298           old_multidirs="${multidirs}"
    299           multidirs=""
    300           for x in ${old_multidirs}; do
    301             case "$x" in
    302               *soft-float* ) : ;;
    303               *) multidirs="${multidirs} ${x}" ;;
    304             esac
    305           done
    306         fi
    307         if [ x$enable_m68881 = xno ]
    308         then
    309           old_multidirs="${multidirs}"
    310           multidirs=""
    311           for x in ${old_multidirs}; do
    312             case "$x" in
    313               *m68881* ) : ;;
    314               *) multidirs="${multidirs} ${x}" ;;
    315             esac
    316           done
    317         fi
    318         if [ x$enable_m68000 = xno ]
    319         then
    320           old_multidirs="${multidirs}"
    321           multidirs=""
    322           for x in ${old_multidirs}; do
    323             case "$x" in
    324               *m68000* ) : ;;
    325               *) multidirs="${multidirs} ${x}" ;;
    326             esac
    327           done
    328         fi
    329         if [ x$enable_m68020 = xno ]
    330         then
    331           old_multidirs="${multidirs}"
    332           multidirs=""
    333           for x in ${old_multidirs}; do
    334             case "$x" in
    335               *m68020* ) : ;;
    336               *) multidirs="${multidirs} ${x}" ;;
    337             esac
    338           done
    339         fi
    340         ;;
    341 mips*-*-*)
    342         if [ x$enable_single_float = xno ]
    343         then
    344           old_multidirs="${multidirs}"
    345           multidirs=""
    346           for x in ${old_multidirs}; do
    347             case "$x" in
    348               *single* ) : ;;
    349               *) multidirs="${multidirs} ${x}" ;;
    350             esac
    351           done
    352         fi
    353         if [ x$enable_biendian = xno ]
    354         then
    355           old_multidirs="${multidirs}"
    356           multidirs=""
    357           for x in ${old_multidirs}; do
    358             case "$x" in
    359               *el* ) : ;;
    360               *eb* ) : ;;
    361               *) multidirs="${multidirs} ${x}" ;;
    362             esac
    363           done
    364         fi
    365         if [ x$enable_softfloat = xno ]
    366         then
    367           old_multidirs="${multidirs}"
    368           multidirs=""
    369           for x in ${old_multidirs}; do
    370             case "$x" in
    371               *soft-float* ) : ;;
    372               *) multidirs="${multidirs} ${x}" ;;
    373             esac
    374           done
    375         fi
    376         case " $multidirs " in
    377         *" mabi=64 "*)
    378           # We will not be able to create libraries with -mabi=64 if
    379           # we cannot even link a trivial program.  It usually
    380           # indicates the 64bit libraries are missing.
    381           if echo 'main() {}' > conftest.c &&
    382              ${CC-gcc} -mabi=64 conftest.c -o conftest; then
    383             :
    384           else
    385             echo Could not link program with -mabi=64, disabling it.
    386             old_multidirs="${multidirs}"
    387             multidirs=""
    388             for x in ${old_multidirs}; do
    389               case "$x" in
    390               *mabi=64* ) : ;;
    391               *) multidirs="${multidirs} ${x}" ;;
    392               esac
    393             done
    394           fi
    395           rm -f conftest.c conftest
    396           ;;
    397         esac
    398         ;;
    399 powerpc*-*-* | rs6000*-*-*)
    400         if [ x$enable_softfloat = xno ]
    401         then
    402           old_multidirs="${multidirs}"
    403           multidirs=""
    404           for x in ${old_multidirs}; do
    405             case "$x" in
    406               *soft-float* ) : ;;
    407               *) multidirs="${multidirs} ${x}" ;;
    408             esac
    409           done
    410         fi
    411         if [ x$enable_powercpu = xno ]
    412         then
    413           old_multidirs="${multidirs}"
    414           multidirs=""
    415           for x in ${old_multidirs}; do
    416             case "$x" in
    417               power | */power | */power/* ) : ;;
    418               *) multidirs="${multidirs} ${x}" ;;
    419             esac
    420           done
    421         fi
    422         if [ x$enable_powerpccpu = xno ]
    423         then
    424           old_multidirs="${multidirs}"
    425           multidirs=""
    426           for x in ${old_multidirs}; do
    427             case "$x" in
    428               *powerpc* ) : ;;
    429               *) multidirs="${multidirs} ${x}" ;;
    430             esac
    431           done
    432         fi
    433         if [ x$enable_powerpcos = xno ]
    434         then
    435           old_multidirs="${multidirs}"
    436           multidirs=""
    437           for x in ${old_multidirs}; do
    438             case "$x" in
    439               *mcall-linux* | *mcall-solaris* ) : ;;
    440               *) multidirs="${multidirs} ${x}" ;;
    441             esac
    442           done
    443         fi
    444         if [ x$enable_biendian = xno ]
    445         then
    446           old_multidirs="${multidirs}"
    447           multidirs=""
    448           for x in ${old_multidirs}; do
    449             case "$x" in
    450               *mlittle* | *mbig* ) : ;;
    451               *) multidirs="${multidirs} ${x}" ;;
    452             esac
    453           done
    454         fi
    455         if [ x$enable_sysv = xno ]
    456         then
    457           old_multidirs="${multidirs}"
    458           multidirs=""
    459           for x in ${old_multidirs}; do
    460             case "$x" in
    461               *mcall-sysv* ) : ;;
    462               *) multidirs="${multidirs} ${x}" ;;
    463             esac
    464           done
    465         fi
    466         if [ x$enable_aix = xno ]
    467         then
    468           old_multidirs="${multidirs}"
    469           multidirs=""
    470           for x in ${old_multidirs}; do
    471             case "$x" in
    472               *mcall-aix* ) : ;;
    473               *) multidirs="${multidirs} ${x}" ;;
    474             esac
    475           done
    476         fi
    477         ;;
    478 sparc*-*-*)
    479         case " $multidirs " in
    480         *" m64 "*)
    481           # We will not be able to create libraries with -m64 if
    482           # we cannot even link a trivial program.  It usually
    483           # indicates the 64bit libraries are missing.
    484           if echo 'main() {}' > conftest.c &&
    485              ${CC-gcc} -m64 conftest.c -o conftest; then
    486             :
    487           else
    488             echo Could not link program with -m64, disabling it.
    489             old_multidirs="${multidirs}"
    490             multidirs=""
    491             for x in ${old_multidirs}; do
    492               case "$x" in
    493               *m64* ) : ;;
    494               *) multidirs="${multidirs} ${x}" ;;
    495               esac
    496             done
    497           fi
    498           rm -f conftest.c conftest
    499           ;;
    500         esac
    501         ;;
    502 esac
    503 
    504 # Remove extraneous blanks from multidirs.
    505 # Tests like `if [ -n "$multidirs" ]' require it.
    506 multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'`
    507 
    508 # Add code to library's top level makefile to handle building the multilib
    509 # subdirs.
    510 
    511 cat > Multi.tem <<\EOF
    512 
    513 # FIXME: There should be an @-sign in front of the `if'.
    514 # Leave out until this is tested a bit more.
    515 multi-do:
    516         if [ -z "$(MULTIDIRS)" ]; then \
    517           true; \
    518         else \
    519           rootpre=`pwd`/; export rootpre; \
    520           srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
    521           lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
    522           compiler="$(CC)"; \
    523           for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
    524             dir=`echo $$i | sed -e 's/;.*$$//'`; \
    525             if [ "$${dir}" = "." ]; then \
    526               true; \
    527             else \
    528               if [ -d ../$${dir}/$${lib} ]; then \
    529                 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
    530                 if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
    531                                 CFLAGS="$(CFLAGS) $${flags}" \
    532                                 prefix="$(prefix)" \
    533                                 exec_prefix="$(exec_prefix)" \
    534                                 CXXFLAGS="$(CXXFLAGS) $${flags}" \
    535                                 LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
    536                                 LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
    537                                 LDFLAGS="$(LDFLAGS) $${flags}" \
    538                                 $(DO)); then \
    539                   true; \
    540                 else \
    541                   exit 1; \
    542                 fi; \
    543               else true; \
    544               fi; \
    545             fi; \
    546           done; \
    547         fi
    548 
    549 # FIXME: There should be an @-sign in front of the `if'.
    550 # Leave out until this is tested a bit more.
    551 multi-clean:
    552         if [ -z "$(MULTIDIRS)" ]; then \
    553           true; \
    554         else \
    555           lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
    556           for dir in Makefile $(MULTIDIRS); do \
    557             if [ -f ../$${dir}/$${lib}/Makefile ]; then \
    558               if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \
    559               then true; \
    560               else exit 1; \
    561               fi; \
    562             else true; \
    563             fi; \
    564           done; \
    565         fi
    566 EOF
    567 
    568 cat ${Makefile} Multi.tem > Makefile.tem
    569 rm -f ${Makefile} Multi.tem
    570 mv Makefile.tem ${Makefile}
    571 
    572 fi # ${ml_toplevel_p} = yes
    573 
    574 if [ "${ml_verbose}" = --verbose ]; then
    575   echo "Adding multilib support to Makefile in ${ml_realsrcdir}"
    576   if [ "${ml_toplevel_p}" = yes ]; then
    577     echo "multidirs=${multidirs}"
    578   fi
    579   echo "with_multisubdir=${with_multisubdir}"
    580 fi
    581 
    582 if [ "${srcdir}" = "." ]; then
    583   if [ "${with_target_subdir}" != "." ]; then
    584     ml_srcdotdot="../"
    585   else
    586     ml_srcdotdot=""
    587   fi
    588 else
    589   ml_srcdotdot=""
    590 fi
    591 
    592 if [ -z "${with_multisubdir}" ]; then
    593   ml_subdir=
    594   ml_builddotdot=
    595   : # ml_srcdotdot= # already set
    596 else
    597   ml_subdir="/${with_multisubdir}"
    598   # The '[^/][^/]*' appears that way to work around a SunOS sed bug.
    599   ml_builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`/
    600   if [ "$srcdir" = "." ]; then
    601     ml_srcdotdot=${ml_srcdotdot}${ml_builddotdot}
    602   else
    603     : # ml_srcdotdot= # already set
    604   fi
    605 fi
    606 
    607 if [ "${ml_toplevel_p}" = yes ]; then
    608   ml_do='$(MAKE)'
    609   ml_clean='$(MAKE)'
    610 else
    611   ml_do=true
    612   ml_clean=true
    613 fi
    614 
    615 # TOP is used by newlib and should not be used elsewhere for this purpose.
    616 # MULTI{SRC,BUILD}TOP are the proper ones to use.  MULTISRCTOP is empty
    617 # when srcdir != builddir.  MULTIBUILDTOP is always some number of ../'s.
    618 # FIXME: newlib needs to be updated to use MULTI{SRC,BUILD}TOP so we can
    619 # delete TOP.  Newlib may wish to continue to use TOP for its own purposes
    620 # of course.
    621 # MULTIDIRS is non-empty for the cpu top level Makefile (eg: newlib/Makefile)
    622 # and lists the subdirectories to recurse into.
    623 # MULTISUBDIR is non-empty in each cpu subdirectory's Makefile
    624 # (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with
    625 # a leading '/'.
    626 # MULTIDO is used for targets like all, install, and check where
    627 # $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed.
    628 # MULTICLEAN is used for the *clean targets.
    629 #
    630 # ??? It is possible to merge MULTIDO and MULTICLEAN into one.  They are
    631 # currently kept separate because we don't want the *clean targets to require
    632 # the existence of the compiler (which MULTIDO currently requires) and
    633 # therefore we'd have to record the directory options as well as names
    634 # (currently we just record the names and use --print-multi-lib to get the
    635 # options).
    636 
    637 sed -e "s:^TOP[         ]*=[    ]*\([./]*\)[    ]*$:TOP = ${ml_builddotdot}\1:" \
    638     -e "s:^MULTISRCTOP[         ]*=.*$:MULTISRCTOP = ${ml_srcdotdot}:" \
    639     -e "s:^MULTIBUILDTOP[       ]*=.*$:MULTIBUILDTOP = ${ml_builddotdot}:" \
    640     -e "s:^MULTIDIRS[   ]*=.*$:MULTIDIRS = ${multidirs}:" \
    641     -e "s:^MULTISUBDIR[         ]*=.*$:MULTISUBDIR = ${ml_subdir}:" \
    642     -e "s:^MULTIDO[     ]*=.*$:MULTIDO = $ml_do:" \
    643     -e "s:^MULTICLEAN[  ]*=.*$:MULTICLEAN = $ml_clean:" \
    644         ${Makefile} > Makefile.tem
    645 rm -f ${Makefile}
    646 mv Makefile.tem ${Makefile}
    647 
    648 # If this is the library's top level, configure each multilib subdir.
    649 # This is done at the end because this is the loop that runs configure
    650 # in each multilib subdir and it seemed reasonable to finish updating the
    651 # Makefile before going on to configure the subdirs.
    652 
    653 if [ "${ml_toplevel_p}" = yes ]; then
    654 
    655 # We must freshly configure each subdirectory.  This bit of code is
    656 # actually partially stolen from the main configure script.  FIXME.
    657 
    658 if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
    659 
    660   if [ "${ml_verbose}" = --verbose ]; then
    661     echo "Running configure in multilib subdirs ${multidirs}"
    662     echo "pwd: `pwd`"
    663   fi
    664 
    665   ml_origdir=`pwd`
    666   ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`
    667   # cd to top-level-build-dir/${with_target_subdir}
    668   cd ..
    669 
    670   for ml_dir in ${multidirs}; do
    671 
    672     if [ "${ml_verbose}" = --verbose ]; then
    673       echo "Running configure in multilib subdir ${ml_dir}"
    674       echo "pwd: `pwd`"
    675     fi
    676 
    677     if [ -d ${ml_dir} ]; then true; else
    678       # ``mkdir -p ${ml_dir}'' See also mkinstalldirs.
    679       pathcomp=""
    680       for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do
    681         pathcomp="$pathcomp$d"
    682         case "$pathcomp" in
    683           -* ) pathcomp=./$pathcomp ;;
    684         esac
    685         if test ! -d "$pathcomp"; then
    686            echo "mkdir $pathcomp" 1>&2
    687            mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
    688         fi
    689         if test ! -d "$pathcomp"; then
    690            exit $lasterr
    691         fi
    692         pathcomp="$pathcomp/"
    693       done
    694     fi
    695     if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi
    696 
    697     # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../
    698     dotdot=../`echo ${ml_dir} | sed -e 's|[^/]||g' -e 's|/|../|g'`
    699 
    700     case ${srcdir} in
    701     ".")
    702       echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir}
    703       if [ "${with_target_subdir}" != "." ]; then
    704         ml_unsubdir="../"
    705       else
    706         ml_unsubdir=""
    707       fi
    708       (cd ${ml_dir}/${ml_libdir};
    709        ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "")
    710       if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then
    711         if [ x"${MAKE}" = x ]; then
    712           (cd ${ml_dir}/${ml_libdir}; make distclean)
    713         else
    714           (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean)
    715         fi
    716       fi
    717       ml_newsrcdir="."
    718       ml_srcdiroption=
    719       multisrctop=${dotdot}
    720       ;;
    721     *)
    722       case "${srcdir}" in
    723       /*) # absolute path
    724         ml_newsrcdir=${srcdir}
    725         ;;
    726       *) # otherwise relative
    727         ml_newsrcdir=${dotdot}${srcdir}
    728         ;;
    729       esac
    730       ml_srcdiroption="-srcdir=${ml_newsrcdir}"
    731       multisrctop=
    732       ;;
    733     esac
    734 
    735     case "${progname}" in
    736     /*)     ml_recprog=${progname} ;;
    737     *)      ml_recprog=${dotdot}${progname} ;;
    738     esac
    739 
    740     # FIXME: POPDIR=${PWD=`pwd`} doesn't work here.
    741     ML_POPDIR=`pwd`
    742     cd ${ml_dir}/${ml_libdir}
    743 
    744     if [ -f ${ml_newsrcdir}/configure ]; then
    745       ml_recprog="${ml_newsrcdir}/configure --cache-file=../config.cache"
    746     fi
    747 
    748     # find compiler flag corresponding to ${ml_dir}
    749     for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
    750       dir=`echo $i | sed -e 's/;.*$//'`
    751       if [ "${dir}" = "${ml_dir}" ]; then
    752         flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`
    753         break
    754       fi
    755     done
    756     ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags"'
    757 
    758     if [ "${with_target_subdir}" = "." ]; then
    759         CC_=$CC' '
    760         CXX_=$CXX' '
    761     else
    762         # Create a regular expression that matches any string as long
    763         # as ML_POPDIR.
    764         popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'`
    765         CC_=
    766         for arg in ${CC}; do
    767           case $arg in
    768           -[BIL]"${ML_POPDIR}"/*)
    769             CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;;
    770           "${ML_POPDIR}"/*)
    771             CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
    772           *)
    773             CC_="${CC_}${arg} " ;;
    774           esac
    775         done
    776 
    777         CXX_=
    778         for arg in ${CXX}; do
    779           case $arg in
    780           -[BIL]"${ML_POPDIR}"/*)
    781             CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
    782           "${ML_POPDIR}"/*)
    783             CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
    784           *)
    785             CXX_="${CXX_}${arg} " ;;
    786           esac
    787         done
    788 
    789         if test "x${LD_LIBRARY_PATH+set}" = xset; then
    790           LD_LIBRARY_PATH_=
    791           for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
    792             case "$arg" in
    793             "${ML_POPDIR}"/*)
    794               arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`
    795               ;;
    796             esac
    797             if test "x$LD_LIBRARY_PATH_" != x; then
    798               LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg
    799             else
    800               LD_LIBRARY_PATH_=$arg
    801             fi
    802           done
    803           ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_"
    804         fi
    805 
    806         if test "x${SHLIB_PATH+set}" = xset; then
    807           SHLIB_PATH_=
    808           for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do
    809             case "$arg" in
    810             "${ML_POPDIR}"/*)
    811               arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`
    812               ;;
    813             esac
    814             if test "x$SHLIB_PATH_" != x; then
    815               SHLIB_PATH_=$SHLIB_PATH_:$arg
    816             else
    817               SHLIB_PATH_=$arg
    818             fi
    819           done
    820           ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_"
    821         fi
    822     fi
    823 
    824     if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
    825         --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
    826         ${ml_arguments} ${ml_srcdiroption} ; then
    827       true
    828     else
    829       exit 1
    830     fi
    831 
    832     cd ${ML_POPDIR}
    833 
    834   done
    835 
    836   cd ${ml_origdir}
    837 fi
    838 
    839 fi # ${ml_toplevel_p} = yes
    840 fi # ${enable_multilib} = yes
  • TabularUnified branches/GNU/src/binutils/config.guess

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    4 #   Free Software Foundation, Inc.
    5 
    6 timestamp='2001-03-16'
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-05-09'
    77
    88# This file is free software; you can redistribute it and/or modify it
     
    2525# the same distribution terms that you use for the rest of that program.
    2626
    27 # Written by Per Bothner <bothner@cygnus.com>.
    28 # Please send patches to <config-patches@gnu.org>.
     27# Originally written by Per Bothner <per@bothner.com>.
     28# Please send patches to <config-patches@gnu.org>.  Submit a context
     29# diff and a properly formatted ChangeLog entry.
    2930#
    3031# This script attempts to guess a canonical system name similar to
     
    5354
    5455Originally written by Per Bothner.
    55 Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
     56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    5657Free Software Foundation, Inc.
    5758
     
    8889fi
    8990
    90 
    91 dummy=dummy-$$
    92 trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
    93 
    94 # CC_FOR_BUILD -- compiler used by this script.
     91trap 'exit 1' 1 2 15
     92
     93# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
     94# compiler to aid in system detection is discouraged as it requires
     95# temporary files to be created and, as you can see below, it is a
     96# headache to deal with in a portable fashion.
     97
    9598# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
    9699# use `HOST_CC' if defined, but it is deprecated.
    97100
     101# Portable tmp directory creation inspired by the Autoconf team.
     102
     103set_cc_for_build='
     104trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
     105trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
     106: ${TMPDIR=/tmp} ;
     107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
     109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
     110dummy=$tmp/dummy ;
     111tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    98112case $CC_FOR_BUILD,$HOST_CC,$CC in
    99  ,,)    echo "int dummy(){}" > $dummy.c
    100         for c in cc gcc c89 ; do
    101           ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
    102           if test $? = 0 ; then
    103              CC_FOR_BUILD="$c"; break
    104           fi
    105         done
    106         rm -f $dummy.c $dummy.o $dummy.rel
     113 ,,)    echo "int x;" > $dummy.c ;
     114        for c in cc gcc c89 c99 ; do
     115          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
     116             CC_FOR_BUILD="$c"; break ;
     117          fi ;
     118        done ;
    107119        if test x"$CC_FOR_BUILD" = x ; then
    108           CC_FOR_BUILD=no_compiler_found
     120          CC_FOR_BUILD=no_compiler_found ;
    109121        fi
    110122        ;;
    111123 ,,*)   CC_FOR_BUILD=$CC ;;
    112124 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    113 esac
     125esac ;'
    114126
    115127# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    116 # (ghazi@noc.rutgers.edu 8/24/94.)
     128# (ghazi@noc.rutgers.edu 1994-08-24)
    117129if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
    118130        PATH=$PATH:/.attbin ; export PATH
     
    128140case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    129141    *:NetBSD:*:*)
    130         # Netbsd (nbsd) targets should (where applicable) match one or
     142        # NetBSD (nbsd) targets should (where applicable) match one or
    131143        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
    132144        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
     
    135147        # compatibility and a consistent mechanism for selecting the
    136148        # object file format.
    137         # Determine the machine/vendor (is the vendor relevant).
    138         case "${UNAME_MACHINE}" in
    139             amiga) machine=m68k-unknown ;;
    140             arm32) machine=arm-unknown ;;
    141             atari*) machine=m68k-atari ;;
    142             sun3*) machine=m68k-sun ;;
    143             mac68k) machine=m68k-apple ;;
    144             macppc) machine=powerpc-apple ;;
    145             hp3[0-9][05]) machine=m68k-hp ;;
    146             ibmrt|romp-ibm) machine=romp-ibm ;;
    147             *) machine=${UNAME_MACHINE}-unknown ;;
     149        #
     150        # Note: NetBSD doesn't particularly care about the vendor
     151        # portion of the name.  We always set it to "unknown".
     152        sysctl="sysctl -n hw.machine_arch"
     153        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
     154            /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
     155        case "${UNAME_MACHINE_ARCH}" in
     156            armeb) machine=armeb-unknown ;;
     157            arm*) machine=arm-unknown ;;
     158            sh3el) machine=shl-unknown ;;
     159            sh3eb) machine=sh-unknown ;;
     160            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
    148161        esac
    149162        # The Operating System including object format, if it has switched
    150163        # to ELF recently, or will in the future.
    151         case "${UNAME_MACHINE}" in
    152             i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
     164        case "${UNAME_MACHINE_ARCH}" in
     165            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
     166                eval $set_cc_for_build
    153167                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
    154168                        | grep __ELF__ >/dev/null
     
    166180        esac
    167181        # The OS release
    168         release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     182        # Debian GNU/NetBSD machines have a different userland, and
     183        # thus, need a distinct triplet. However, they do not need
     184        # kernel version information, so it can be replaced with a
     185        # suitable tag, in the style of linux-gnu.
     186        case "${UNAME_VERSION}" in
     187            Debian*)
     188                release='-gnu'
     189                ;;
     190            *)
     191                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     192                ;;
     193        esac
    169194        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
    170195        # contains redundant information, the shorter form:
     
    172197        echo "${machine}-${os}${release}"
    173198        exit 0 ;;
     199    amiga:OpenBSD:*:*)
     200        echo m68k-unknown-openbsd${UNAME_RELEASE}
     201        exit 0 ;;
     202    arc:OpenBSD:*:*)
     203        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     204        exit 0 ;;
     205    hp300:OpenBSD:*:*)
     206        echo m68k-unknown-openbsd${UNAME_RELEASE}
     207        exit 0 ;;
     208    mac68k:OpenBSD:*:*)
     209        echo m68k-unknown-openbsd${UNAME_RELEASE}
     210        exit 0 ;;
     211    macppc:OpenBSD:*:*)
     212        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     213        exit 0 ;;
     214    mvme68k:OpenBSD:*:*)
     215        echo m68k-unknown-openbsd${UNAME_RELEASE}
     216        exit 0 ;;
     217    mvme88k:OpenBSD:*:*)
     218        echo m88k-unknown-openbsd${UNAME_RELEASE}
     219        exit 0 ;;
     220    mvmeppc:OpenBSD:*:*)
     221        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     222        exit 0 ;;
     223    pmax:OpenBSD:*:*)
     224        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     225        exit 0 ;;
     226    sgi:OpenBSD:*:*)
     227        echo mipseb-unknown-openbsd${UNAME_RELEASE}
     228        exit 0 ;;
     229    sun3:OpenBSD:*:*)
     230        echo m68k-unknown-openbsd${UNAME_RELEASE}
     231        exit 0 ;;
     232    wgrisc:OpenBSD:*:*)
     233        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     234        exit 0 ;;
     235    *:OpenBSD:*:*)
     236        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
     237        exit 0 ;;
    174238    alpha:OSF1:*:*)
    175239        if test $UNAME_RELEASE = "V4.0"; then
    176240                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    177241        fi
     242        # According to Compaq, /usr/sbin/psrinfo has been available on
     243        # OSF/1 and Tru64 systems produced since 1995.  I hope that
     244        # covers most systems running today.  This code pipes the CPU
     245        # types through head -n 1, so we only detect the type of CPU 0.
     246        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
     247        case "$ALPHA_CPU_TYPE" in
     248            "EV4 (21064)")
     249                UNAME_MACHINE="alpha" ;;
     250            "EV4.5 (21064)")
     251                UNAME_MACHINE="alpha" ;;
     252            "LCA4 (21066/21068)")
     253                UNAME_MACHINE="alpha" ;;
     254            "EV5 (21164)")
     255                UNAME_MACHINE="alphaev5" ;;
     256            "EV5.6 (21164A)")
     257                UNAME_MACHINE="alphaev56" ;;
     258            "EV5.6 (21164PC)")
     259                UNAME_MACHINE="alphapca56" ;;
     260            "EV5.7 (21164PC)")
     261                UNAME_MACHINE="alphapca57" ;;
     262            "EV6 (21264)")
     263                UNAME_MACHINE="alphaev6" ;;
     264            "EV6.7 (21264A)")
     265                UNAME_MACHINE="alphaev67" ;;
     266            "EV6.8CB (21264C)")
     267                UNAME_MACHINE="alphaev68" ;;
     268            "EV6.8AL (21264B)")
     269                UNAME_MACHINE="alphaev68" ;;
     270            "EV6.8CX (21264D)")
     271                UNAME_MACHINE="alphaev68" ;;
     272            "EV6.9A (21264/EV69A)")
     273                UNAME_MACHINE="alphaev69" ;;
     274            "EV7 (21364)")
     275                UNAME_MACHINE="alphaev7" ;;
     276            "EV7.9 (21364A)")
     277                UNAME_MACHINE="alphaev79" ;;
     278        esac
    178279        # A Vn.n version is a released version.
    179280        # A Tn.n version is a released field test version.
    180281        # A Xn.n version is an unreleased experimental baselevel.
    181282        # 1.2 uses "1.2" for uname -r.
    182         cat <<EOF >$dummy.s
    183         .data
    184 \$Lformat:
    185         .byte 37,100,45,37,120,10,0     # "%d-%x\n"
    186 
    187         .text
    188         .globl main
    189         .align 4
    190         .ent main
    191 main:
    192         .frame \$30,16,\$26,0
    193         ldgp \$29,0(\$27)
    194         .prologue 1
    195         .long 0x47e03d80 # implver \$0
    196         lda \$2,-1
    197         .long 0x47e20c21 # amask \$2,\$1
    198         lda \$16,\$Lformat
    199         mov \$0,\$17
    200         not \$1,\$18
    201         jsr \$26,printf
    202         ldgp \$29,0(\$26)
    203         mov 0,\$16
    204         jsr \$26,exit
    205         .end main
    206 EOF
    207         $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
    208         if test "$?" = 0 ; then
    209                 case `./$dummy` in
    210                         0-0)
    211                                 UNAME_MACHINE="alpha"
    212                                 ;;
    213                         1-0)
    214                                 UNAME_MACHINE="alphaev5"
    215                                 ;;
    216                         1-1)
    217                                 UNAME_MACHINE="alphaev56"
    218                                 ;;
    219                         1-101)
    220                                 UNAME_MACHINE="alphapca56"
    221                                 ;;
    222                         2-303)
    223                                 UNAME_MACHINE="alphaev6"
    224                                 ;;
    225                         2-307)
    226                                 UNAME_MACHINE="alphaev67"
    227                                 ;;
    228                 esac
    229         fi
    230         rm -f $dummy.s $dummy
    231283        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    232284        exit 0 ;;
     
    243295        echo m68k-unknown-sysv4
    244296        exit 0;;
    245     amiga:OpenBSD:*:*)
    246         echo m68k-unknown-openbsd${UNAME_RELEASE}
    247         exit 0 ;;
    248297    *:[Aa]miga[Oo][Ss]:*:*)
    249298        echo ${UNAME_MACHINE}-unknown-amigaos
    250299        exit 0 ;;
    251     arc64:OpenBSD:*:*)
    252         echo mips64el-unknown-openbsd${UNAME_RELEASE}
    253         exit 0 ;;
    254     arc:OpenBSD:*:*)
    255         echo mipsel-unknown-openbsd${UNAME_RELEASE}
    256         exit 0 ;;
    257     hkmips:OpenBSD:*:*)
    258         echo mips-unknown-openbsd${UNAME_RELEASE}
    259         exit 0 ;;
    260     pmax:OpenBSD:*:*)
    261         echo mipsel-unknown-openbsd${UNAME_RELEASE}
    262         exit 0 ;;
    263     sgi:OpenBSD:*:*)
    264         echo mips-unknown-openbsd${UNAME_RELEASE}
    265         exit 0 ;;
    266     wgrisc:OpenBSD:*:*)
    267         echo mipsel-unknown-openbsd${UNAME_RELEASE}
     300    *:[Mm]orph[Oo][Ss]:*:*)
     301        echo ${UNAME_MACHINE}-unknown-morphos
    268302        exit 0 ;;
    269303    *:OS/390:*:*)
     
    287321        echo pyramid-pyramid-svr4
    288322        exit 0 ;;
     323    DRS?6000:UNIX_SV:4.2*:7*)
     324        case `/usr/bin/uname -p` in
     325            sparc) echo sparc-icl-nx7 && exit 0 ;;
     326        esac ;;
    289327    sun4H:SunOS:5.*:*)
    290328        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     
    315353        exit 0 ;;
    316354    sun*:*:4.2BSD:*)
    317         UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
     355        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
    318356        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
    319357        case "`/bin/arch`" in
     
    328366    aushp:SunOS:*:*)
    329367        echo sparc-auspex-sunos${UNAME_RELEASE}
    330         exit 0 ;;
    331     atari*:OpenBSD:*:*)
    332         echo m68k-unknown-openbsd${UNAME_RELEASE}
    333368        exit 0 ;;
    334369    # The situation for MiNT is a little confusing.  The machine name
     
    358393        echo m68k-unknown-mint${UNAME_RELEASE}
    359394        exit 0 ;;
    360     sun3*:OpenBSD:*:*)
    361         echo m68k-unknown-openbsd${UNAME_RELEASE}
    362         exit 0 ;;
    363     mac68k:OpenBSD:*:*)
    364         echo m68k-unknown-openbsd${UNAME_RELEASE}
    365         exit 0 ;;
    366     mvme68k:OpenBSD:*:*)
    367         echo m68k-unknown-openbsd${UNAME_RELEASE}
    368         exit 0 ;;
    369     mvme88k:OpenBSD:*:*)
    370         echo m88k-unknown-openbsd${UNAME_RELEASE}
    371         exit 0 ;;
    372395    powerpc:machten:*:*)
    373396        echo powerpc-apple-machten${UNAME_RELEASE}
     
    386409        exit 0 ;;
    387410    mips:*:*:UMIPS | mips:*:*:RISCos)
     411        eval $set_cc_for_build
    388412        sed 's/^        //' << EOF >$dummy.c
    389413#ifdef __cplusplus
     
    407431        }
    408432EOF
    409         $CC_FOR_BUILD $dummy.c -o $dummy \
    410           && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    411           && rm -f $dummy.c $dummy && exit 0
    412         rm -f $dummy.c $dummy
     433        $CC_FOR_BUILD -o $dummy $dummy.c \
     434          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
     435          && exit 0
    413436        echo mips-mips-riscos${UNAME_RELEASE}
     437        exit 0 ;;
     438    Motorola:PowerMAX_OS:*:*)
     439        echo powerpc-motorola-powermax
     440        exit 0 ;;
     441    Motorola:*:4.3:PL8-*)
     442        echo powerpc-harris-powermax
     443        exit 0 ;;
     444    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
     445        echo powerpc-harris-powermax
    414446        exit 0 ;;
    415447    Night_Hawk:Power_UNIX:*:*)
     
    460492        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
    461493        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
    462     i?86:AIX:*:*)
     494    i*86:AIX:*:*)
    463495        echo i386-ibm-aix
    464496        exit 0 ;;
     
    473505    *:AIX:2:3)
    474506        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
     507                eval $set_cc_for_build
    475508                sed 's/^                //' << EOF >$dummy.c
    476509                #include <sys/systemcfg.h>
     
    484517                        }
    485518EOF
    486                 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
    487                 rm -f $dummy.c $dummy
     519                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    488520                echo rs6000-ibm-aix3.2.5
    489521        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
     
    494526        exit 0 ;;
    495527    *:AIX:*:[45])
    496         IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
     528        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    497529        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
    498530                IBM_ARCH=rs6000
     
    534566            9000/[34]?? )         HP_ARCH=m68k ;;
    535567            9000/[678][0-9][0-9])
    536               case "${HPUX_REV}" in
    537                 11.[0-9][0-9])
    538                   if [ -x /usr/bin/getconf ]; then
    539                     sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
     568                if [ -x /usr/bin/getconf ]; then
     569                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
    540570                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
    541571                    case "${sc_cpu_version}" in
     
    546576                          32) HP_ARCH="hppa2.0n" ;;
    547577                          64) HP_ARCH="hppa2.0w" ;;
     578                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
    548579                        esac ;;
    549580                    esac
    550                   fi ;;
    551               esac
    552               if [ "${HP_ARCH}" = "" ]; then
    553               sed 's/^              //' << EOF >$dummy.c
     581                fi
     582                if [ "${HP_ARCH}" = "" ]; then
     583                    eval $set_cc_for_build
     584                    sed 's/^              //' << EOF >$dummy.c
    554585
    555586              #define _HPUX_SOURCE
     
    584615              }
    585616EOF
    586         (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
    587         if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
    588         rm -f $dummy.c $dummy
    589         fi ;;
     617                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
     618                    test -z "$HP_ARCH" && HP_ARCH=hppa
     619                fi ;;
    590620        esac
     621        if [ ${HP_ARCH} = "hppa2.0w" ]
     622        then
     623            # avoid double evaluation of $set_cc_for_build
     624            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
     625            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
     626            then
     627                HP_ARCH="hppa2.0w"
     628            else
     629                HP_ARCH="hppa64"
     630            fi
     631        fi
    591632        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    592633        exit 0 ;;
     
    596637        exit 0 ;;
    597638    3050*:HI-UX:*:*)
     639        eval $set_cc_for_build
    598640        sed 's/^        //' << EOF >$dummy.c
    599641        #include <unistd.h>
     
    621663        }
    622664EOF
    623         $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
    624         rm -f $dummy.c $dummy
     665        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    625666        echo unknown-hitachi-hiuxwe2
    626667        exit 0 ;;
     
    631672        echo hppa1.0-hp-bsd
    632673        exit 0 ;;
    633     *9??*:MPE/iX:*:*)
     674    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    634675        echo hppa1.0-hp-mpeix
    635676        exit 0 ;;
     
    640681        echo hppa1.0-hp-osf
    641682        exit 0 ;;
    642     i?86:OSF1:*:*)
     683    i*86:OSF1:*:*)
    643684        if [ -x /usr/sbin/sysversion ] ; then
    644685            echo ${UNAME_MACHINE}-unknown-osf1mk
     
    649690    parisc*:Lites*:*:*)
    650691        echo hppa1.1-hp-lites
    651         exit 0 ;;
    652     hppa*:OpenBSD:*:*)
    653         echo hppa-unknown-openbsd
    654692        exit 0 ;;
    655693    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
     
    671709        echo c4-convex-bsd
    672710        exit 0 ;;
    673     CRAY*X-MP:*:*:*)
    674         echo xmp-cray-unicos
    675         exit 0 ;;
    676711    CRAY*Y-MP:*:*:*)
    677         echo ymp-cray-unicos${UNAME_RELEASE}
     712        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    678713        exit 0 ;;
    679714    CRAY*[A-Z]90:*:*:*)
    680715        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
    681716        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
    682               -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
     717              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
     718              -e 's/\.[^.]*$/.X/'
    683719        exit 0 ;;
    684720    CRAY*TS:*:*:*)
    685721        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    686722        exit 0 ;;
    687     CRAY*T3D:*:*:*)
    688         echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    689         exit 0 ;;
    690723    CRAY*T3E:*:*:*)
    691724        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     
    694727        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    695728        exit 0 ;;
    696     CRAY-2:*:*:*)
    697         echo cray2-cray-unicos
    698         exit 0 ;;
     729    *:UNICOS/mp:*:*)
     730        echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     731        exit 0 ;;
    699732    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    700733        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     
    703736        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    704737        exit 0 ;;
    705     hp300:OpenBSD:*:*)
    706         echo m68k-unknown-openbsd${UNAME_RELEASE}
    707         exit 0 ;;
    708     i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
     738    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    709739        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    710740        exit 0 ;;
     
    715745        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    716746        exit 0 ;;
    717     *:FreeBSD:*:*)
    718         echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    719         exit 0 ;;
    720     *:OpenBSD:*:*)
    721         echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     747    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
     748        # Determine whether the default compiler uses glibc.
     749        eval $set_cc_for_build
     750        sed 's/^        //' << EOF >$dummy.c
     751        #include <features.h>
     752        #if __GLIBC__ >= 2
     753        LIBC=gnu
     754        #else
     755        LIBC=
     756        #endif
     757EOF
     758        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     759        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
    722760        exit 0 ;;
    723761    i*:CYGWIN*:*)
     
    729767    i*:PW*:*)
    730768        echo ${UNAME_MACHINE}-pc-pw32
     769        exit 0 ;;
     770    x86:Interix*:3*)
     771        echo i586-pc-interix3
     772        exit 0 ;;
     773    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
     774        echo i${UNAME_MACHINE}-pc-mks
    731775        exit 0 ;;
    732776    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
     
    734778        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    735779        # UNAME_MACHINE based on the output of uname instead of i386?
    736         echo i386-pc-interix
     780        echo i586-pc-interix
    737781        exit 0 ;;
    738782    i*:UWIN*:*)
     
    755799        exit 0 ;;
    756800    ia64:Linux:*:*)
    757         echo ${UNAME_MACHINE}-unknown-linux
     801        echo ${UNAME_MACHINE}-unknown-linux-gnu
    758802        exit 0 ;;
    759803    m68*:Linux:*:*)
     
    761805        exit 0 ;;
    762806    mips:Linux:*:*)
    763         cat >$dummy.c <<EOF
    764 #ifdef __cplusplus
    765 #include <stdio.h>  /* for printf() prototype */
    766 int main (int argc, char *argv[]) {
    767 #else
    768 int main (argc, argv) int argc; char *argv[]; {
    769 #endif
    770 #ifdef __MIPSEB__
    771   printf ("%s-unknown-linux-gnu\n", argv[1]);
    772 #endif
    773 #ifdef __MIPSEL__
    774   printf ("%sel-unknown-linux-gnu\n", argv[1]);
    775 #endif
    776   return 0;
    777 }
     807        eval $set_cc_for_build
     808        sed 's/^        //' << EOF >$dummy.c
     809        #undef CPU
     810        #undef mips
     811        #undef mipsel
     812        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     813        CPU=mipsel
     814        #else
     815        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     816        CPU=mips
     817        #else
     818        CPU=
     819        #endif
     820        #endif
    778821EOF
    779         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
    780         rm -f $dummy.c $dummy
     822        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     823        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     824        ;;
     825    mips64:Linux:*:*)
     826        eval $set_cc_for_build
     827        sed 's/^        //' << EOF >$dummy.c
     828        #undef CPU
     829        #undef mips64
     830        #undef mips64el
     831        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     832        CPU=mips64el
     833        #else
     834        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     835        CPU=mips64
     836        #else
     837        CPU=
     838        #endif
     839        #endif
     840EOF
     841        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     842        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
    781843        ;;
    782844    ppc:Linux:*:*)
    783         # Determine Lib Version
    784         cat >$dummy.c <<EOF
    785 #include <features.h>
    786 #if defined(__GLIBC__)
    787 extern char __libc_version[];
    788 extern char __libc_release[];
    789 #endif
    790 main(argc, argv)
    791      int argc;
    792      char *argv[];
    793 {
    794 #if defined(__GLIBC__)
    795   printf("%s %s\n", __libc_version, __libc_release);
    796 #else
    797   printf("unknown\n");
    798 #endif
    799   return 0;
    800 }
    801 EOF
    802         LIBC=""
    803         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
    804         if test "$?" = 0 ; then
    805                 ./$dummy | grep 1\.99 > /dev/null
    806                 if test "$?" = 0 ; then LIBC="libc1" ; fi
    807         fi
    808         rm -f $dummy.c $dummy
    809         echo powerpc-unknown-linux-gnu${LIBC}
     845        echo powerpc-unknown-linux-gnu
     846        exit 0 ;;
     847    ppc64:Linux:*:*)
     848        echo powerpc64-unknown-linux-gnu
    810849        exit 0 ;;
    811850    alpha:Linux:*:*)
    812         cat <<EOF >$dummy.s
    813           .data
    814           \$Lformat:
    815                 .byte 37,100,45,37,120,10,0     # "%d-%x\n"
    816            .text
    817                 .globl main
    818                 .align 4
    819                 .ent main
    820             main:
    821                 .frame \$30,16,\$26,0
    822                 ldgp \$29,0(\$27)
    823                 .prologue 1
    824                 .long 0x47e03d80 # implver \$0
    825                 lda \$2,-1
    826                 .long 0x47e20c21 # amask \$2,\$1
    827                 lda \$16,\$Lformat
    828                 mov \$0,\$17
    829                 not \$1,\$18
    830                 jsr \$26,printf
    831                 ldgp \$29,0(\$26)
    832                 mov 0,\$16
    833                 jsr \$26,exit
    834                 .end main
    835 EOF
    836         LIBC=""
    837         $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
    838         if test "$?" = 0 ; then
    839                 case `./$dummy` in
    840                 0-0)    UNAME_MACHINE="alpha" ;;
    841                 1-0)    UNAME_MACHINE="alphaev5" ;;
    842                 1-1)    UNAME_MACHINE="alphaev56" ;;
    843                 1-101)  UNAME_MACHINE="alphapca56" ;;
    844                 2-303)  UNAME_MACHINE="alphaev6" ;;
    845                 2-307)  UNAME_MACHINE="alphaev67" ;;
    846                 esac
    847                 objdump --private-headers $dummy | \
    848                   grep ld.so.1 > /dev/null
    849                 if test "$?" = 0 ; then
    850                         LIBC="libc1"
    851                 fi
    852         fi
    853         rm -f $dummy.s $dummy
     851        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     852          EV5)   UNAME_MACHINE=alphaev5 ;;
     853          EV56)  UNAME_MACHINE=alphaev56 ;;
     854          PCA56) UNAME_MACHINE=alphapca56 ;;
     855          PCA57) UNAME_MACHINE=alphapca56 ;;
     856          EV6)   UNAME_MACHINE=alphaev6 ;;
     857          EV67)  UNAME_MACHINE=alphaev67 ;;
     858          EV68*) UNAME_MACHINE=alphaev68 ;;
     859        esac
     860        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
     861        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    854862        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
    855863        exit 0 ;;
     
    877885        echo x86_64-unknown-linux-gnu
    878886        exit 0 ;;
    879     i?86:Linux:*:*)
     887    i*86:Linux:*:*)
    880888        # The BFD linker knows what the default object file format is, so
    881889        # first see if it will tell us. cd to the root directory to prevent
    882890        # problems with other programs or directories called `ld' in the path.
    883         ld_supported_emulations=`cd /; ld --help 2>&1 \
    884                          | sed -ne '/supported emulations:/!d
     891        # Set LC_ALL=C to ensure ld outputs messages in English.
     892        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
     893                         | sed -ne '/supported targets:/!d
    885894                                    s/[         ][      ]*/ /g
    886                                     s/.*supported emulations: *//
     895                                    s/.*supported targets: *//
    887896                                    s/ .*//
    888897                                    p'`
    889         case "$ld_supported_emulations" in
    890           i?86linux)
    891                 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
    892                 exit 0
    893                 ;;
    894           elf_i?86)
     898        case "$ld_supported_targets" in
     899          elf32-i386)
    895900                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
    896901                ;;
    897           i?86coff)
     902          a.out-i386-linux)
     903                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
     904                exit 0 ;;
     905          coff-i386)
    898906                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
    899                 exit 0
    900                 ;;
    901         esac
    902         # Either a pre-BFD a.out linker (linux-gnuoldld)
    903         # or one that does not give us useful --help.
    904         # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
    905         # If ld does not provide *any* "supported emulations:"
    906         # that means it is gnuoldld.
    907         test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
    908         case "${UNAME_MACHINE}" in
    909         i?86)
    910           VENDOR=pc;
    911           ;;
    912         *)
    913           VENDOR=unknown;
    914           ;;
     907                exit 0 ;;
     908          "")
     909                # Either a pre-BFD a.out linker (linux-gnuoldld) or
     910                # one that does not give us useful --help.
     911                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
     912                exit 0 ;;
    915913        esac
    916914        # Determine whether the default compiler is a.out or elf
    917         cat >$dummy.c <<EOF
    918 #include <features.h>
    919 #ifdef __cplusplus
    920 #include <stdio.h>  /* for printf() prototype */
    921         int main (int argc, char *argv[]) {
    922 #else
    923         int main (argc, argv) int argc; char *argv[]; {
    924 #endif
    925 #ifdef __ELF__
    926 # ifdef __GLIBC__
    927 #  if __GLIBC__ >= 2
    928     printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
    929 #  else
    930     printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
    931 #  endif
    932 # else
    933    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
    934 # endif
    935 #else
    936   printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
    937 #endif
    938   return 0;
    939 }
     915        eval $set_cc_for_build
     916        sed 's/^        //' << EOF >$dummy.c
     917        #include <features.h>
     918        #ifdef __ELF__
     919        # ifdef __GLIBC__
     920        #  if __GLIBC__ >= 2
     921        LIBC=gnu
     922        #  else
     923        LIBC=gnulibc1
     924        #  endif
     925        # else
     926        LIBC=gnulibc1
     927        # endif
     928        #else
     929        #ifdef __INTEL_COMPILER
     930        LIBC=gnu
     931        #else
     932        LIBC=gnuaout
     933        #endif
     934        #endif
    940935EOF
    941         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
    942         rm -f $dummy.c $dummy
     936        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     937        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
    943938        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
    944939        ;;
    945 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
    946 # are messed up and put the nodename in both sysname and nodename.
    947     i?86:DYNIX/ptx:4*:*)
     940    i*86:DYNIX/ptx:4*:*)
     941        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
     942        # earlier versions are messed up and put the nodename in both
     943        # sysname and nodename.
    948944        echo i386-sequent-sysv4
    949945        exit 0 ;;
    950     i?86:UNIX_SV:4.2MP:2.*)
     946    i*86:UNIX_SV:4.2MP:2.*)
    951947        # Unixware is an offshoot of SVR4, but it has its own version
    952948        # number series starting with 2...
     
    956952        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    957953        exit 0 ;;
    958     i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
     954    i*86:OS/2:*:*)
     955        # If we were able to find `uname', then EMX Unix compatibility
     956        # is probably installed.
     957        echo ${UNAME_MACHINE}-pc-os2-emx
     958        exit 0 ;;
     959    i*86:XTS-300:*:STOP)
     960        echo ${UNAME_MACHINE}-unknown-stop
     961        exit 0 ;;
     962    i*86:atheos:*:*)
     963        echo ${UNAME_MACHINE}-unknown-atheos
     964        exit 0 ;;
     965    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
     966        echo i386-unknown-lynxos${UNAME_RELEASE}
     967        exit 0 ;;
     968    i*86:*DOS:*:*)
     969        echo ${UNAME_MACHINE}-pc-msdosdjgpp
     970        exit 0 ;;
     971    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    959972        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
    960973        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
     
    964977        fi
    965978        exit 0 ;;
    966     i?86:*:5:7*)
    967         # Fixed at (any) Pentium or better
    968         UNAME_MACHINE=i586
    969         if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
    970             echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
    971         else
    972             echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
    973         fi
    974         exit 0 ;;
    975     i?86:*:3.2:*)
     979    i*86:*:5:[78]*)
     980        case `/bin/uname -X | grep "^Machine"` in
     981            *486*)           UNAME_MACHINE=i486 ;;
     982            *Pentium)        UNAME_MACHINE=i586 ;;
     983            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
     984        esac
     985        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
     986        exit 0 ;;
     987    i*86:*:3.2:*)
    976988        if test -f /usr/options/cb.name; then
    977989                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
    978990                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
    979991        elif /bin/uname -X 2>/dev/null >/dev/null ; then
    980                 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
    981                 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
    982                 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
     992                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
     993                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
     994                (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
    983995                        && UNAME_MACHINE=i586
    984                 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
     996                (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
    985997                        && UNAME_MACHINE=i686
    986                 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
     998                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
    987999                        && UNAME_MACHINE=i686
    9881000                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
     
    9901002                echo ${UNAME_MACHINE}-pc-sysv32
    9911003        fi
    992         exit 0 ;;
    993     i?86:*DOS:*:*)
    994         echo ${UNAME_MACHINE}-pc-msdosdjgpp
    9951004        exit 0 ;;
    9961005    pc:*:*:*)
     
    10171026        echo m68010-convergent-sysv
    10181027        exit 0 ;;
     1028    mc68k:UNIX:SYSTEM5:3.51m)
     1029        echo m68k-convergent-sysv
     1030        exit 0 ;;
     1031    M680?0:D-NIX:5.3:*)
     1032        echo m68k-diab-dnix
     1033        exit 0 ;;
    10191034    M68*:*:R3V[567]*:*)
    10201035        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    1021     3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
     1036    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
    10221037        OS_REL=''
    10231038        test -r /etc/.relid \
     
    10301045        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    10311046          && echo i486-ncr-sysv4 && exit 0 ;;
    1032     m68*:LynxOS:2.*:*)
     1047    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    10331048        echo m68k-unknown-lynxos${UNAME_RELEASE}
    10341049        exit 0 ;;
     
    10361051        echo m68k-atari-sysv4
    10371052        exit 0 ;;
    1038     i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
    1039         echo i386-unknown-lynxos${UNAME_RELEASE}
    1040         exit 0 ;;
    10411053    TSUNAMI:LynxOS:2.*:*)
    10421054        echo sparc-unknown-lynxos${UNAME_RELEASE}
     
    10451057        echo rs6000-unknown-lynxos${UNAME_RELEASE}
    10461058        exit 0 ;;
    1047     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
     1059    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
    10481060        echo powerpc-unknown-lynxos${UNAME_RELEASE}
    10491061        exit 0 ;;
     
    10651077        fi
    10661078        exit 0 ;;
    1067     PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    1068                            # says <Richard.M.Bartel@ccMail.Census.GOV>
     1079    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1080                      # says <Richard.M.Bartel@ccMail.Census.GOV>
    10691081        echo i586-unisys-sysv4
    10701082        exit 0 ;;
     
    10781090        echo i860-stratus-sysv4
    10791091        exit 0 ;;
     1092    *:VOS:*:*)
     1093        # From Paul.Green@stratus.com.
     1094        echo hppa1.1-stratus-vos
     1095        exit 0 ;;
    10801096    mc68*:A/UX:*:*)
    10811097        echo m68k-apple-aux${UNAME_RELEASE}
     
    11061122        echo sx5-nec-superux${UNAME_RELEASE}
    11071123        exit 0 ;;
     1124    SX-6:SUPER-UX:*:*)
     1125        echo sx6-nec-superux${UNAME_RELEASE}
     1126        exit 0 ;;
    11081127    Power*:Rhapsody:*:*)
    11091128        echo powerpc-apple-rhapsody${UNAME_RELEASE}
     
    11131132        exit 0 ;;
    11141133    *:Darwin:*:*)
    1115         echo `uname -p`-apple-darwin${UNAME_RELEASE}
     1134        case `uname -p` in
     1135            *86) UNAME_PROCESSOR=i686 ;;
     1136            powerpc) UNAME_PROCESSOR=powerpc ;;
     1137        esac
     1138        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
    11161139        exit 0 ;;
    11171140    *:procnto*:*:* | *:QNX:[0123456789]*:*)
    1118         if test "${UNAME_MACHINE}" = "x86pc"; then
     1141        UNAME_PROCESSOR=`uname -p`
     1142        if test "$UNAME_PROCESSOR" = "x86"; then
     1143                UNAME_PROCESSOR=i386
    11191144                UNAME_MACHINE=pc
    11201145        fi
    1121         echo `uname -p`-${UNAME_MACHINE}-nto-qnx
     1146        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
    11221147        exit 0 ;;
    11231148    *:QNX:*:4*)
    11241149        echo i386-pc-qnx
    11251150        exit 0 ;;
    1126     NSR-[KW]:NONSTOP_KERNEL:*:*)
     1151    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
    11271152        echo nsr-tandem-nsk${UNAME_RELEASE}
    11281153        exit 0 ;;
     
    11471172        echo ${UNAME_MACHINE}-unknown-plan9
    11481173        exit 0 ;;
    1149     i?86:OS/2:*:*)
    1150         # If we were able to find `uname', then EMX Unix compatibility
    1151         # is probably installed.
    1152         echo ${UNAME_MACHINE}-pc-os2-emx
    1153         exit 0 ;;
    11541174    *:TOPS-10:*:*)
    11551175        echo pdp10-unknown-tops10
     
    11751195#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
    11761196
     1197eval $set_cc_for_build
    11771198cat >$dummy.c <<EOF
    11781199#ifdef _SEQUENT_
     
    12891310EOF
    12901311
    1291 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
    1292 rm -f $dummy.c $dummy
     1312$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
    12931313
    12941314# Apollos put the system type in the environment.
  • TabularUnified branches/GNU/src/binutils/config.if

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    33# determine:
    44#
    5 #       1. libstcxx_interface: the interface name for libstdc++.
    6 #       2. cxx_interface: the interface name for c++.
    7 #       3. libc_interface: the interface name for libc.
     5#       1. libstcxx_incdir: the interface name for libstdc++.
     6#       2. libc_interface: the interface name for libc.
    87#
    98
     
    2221fi
    2322
    24 if [ "${enable_libstdcxx_v3}" = "yes" ] ; then
    25   libstdcxx_srcdir=${if_topsrcdir}/libstdc++-v3
    26 else
    27   libstdcxx_srcdir=${if_topsrcdir}/libstdc++
     23# Set libstdcxx_incdir.
     24# This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4.
     25if test -z "$gcc_version"; then
     26  if test -z "${gcc_version_trigger}" \
     27     && test -f ${if_topsrcdir}/gcc/version.c; then
     28    gcc_version_trigger=${if_topsrcdir}/gcc/version.c
     29  fi   
     30  if test -f "${gcc_version_trigger}"; then
     31    gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
     32  else
     33    gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
     34  fi
     35  gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
    2836fi
    29 
    30 if [ -f ${libstdcxx_srcdir}/Makefile.in ]; then
    31 # We check libstdc++ for libstdcxx_interface.
    32 libstdcxx_interface=`grep "^INTERFACE" ${libstdcxx_srcdir}/Makefile.in | sed 's/INTERFACE[      ]*=[    ]*\(.*\)/\1/'`
    33 else
    34 libstdcxx_interface=
    35 fi
    36 
    37 if [ -f ${if_topsrcdir}/gcc/cp/Makefile.in ]; then
    38 # We check gcc/cp for cxx_interface.
    39 cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[         ]*=[    ]*\(.*\)/\1/'`
    40 else
    41 cxx_interface=
    42 fi
     37libstdcxx_incdir=c++/${gcc_version}
    4338
    4439# The trickiest part is libc_interface.
  • TabularUnified branches/GNU/src/binutils/config.sub

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    11#! /bin/sh
    22# Configuration validation subroutine script.
    3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    4 #   Free Software Foundation, Inc.
    5 
    6 timestamp='2001-03-19'
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-05-09'
    77
    88# This file is (in principle) common to ALL GNU software.
     
    3030# the same distribution terms that you use for the rest of that program.
    3131
    32 # Please send patches to <config-patches@gnu.org>.
     32# Please send patches to <config-patches@gnu.org>.  Submit a context
     33# diff and a properly formatted ChangeLog entry.
    3334#
    3435# Configuration subroutine to validate and canonicalize a configuration type.
     
    118119maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    119120case $maybe_os in
    120   nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
     121  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    121122    os=-$maybe_os
    122123    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    158159                basic_machine=$1
    159160                ;;
     161        -chorusos*)
     162                os=-chorusos
     163                basic_machine=$1
     164                ;;
     165        -chorusrdb)
     166                os=-chorusrdb
     167                basic_machine=$1
     168                ;;
    160169        -hiux*)
    161170                os=-hiuxwe2
     
    216225        # Recognize the basic CPU types without company name.
    217226        # Some are omitted here because they have special meanings below.
    218         tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
    219                 | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
    220                 | pyramid | mn10200 | mn10300 | tron | a29k \
    221                 | 580 | i960 | h8300 \
    222                 | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
    223                 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
    224                 | hppa64 \
    225                 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
    226                 | alphaev6[78] \
    227                 | we32k | ns16k | clipper | i370 | sh | sh[34] \
    228                 | powerpc | powerpcle \
    229                 | 1750a | dsp16xx | pdp10 | pdp11 \
    230                 | mips16 | mips64 | mipsel | mips64el \
    231                 | mips64orion | mips64orionel | mipstx39 | mipstx39el \
    232                 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
    233                 | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
    234                 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
    235                 | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
    236                 | pj | pjl | h8500)
     227        1750a | 580 \
     228        | a29k \
     229        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
     230        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
     231        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
     232        | clipper \
     233        | d10v | d30v | dlx | dsp16xx \
     234        | fr30 | frv \
     235        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
     236        | i370 | i860 | i960 | ia64 \
     237        | ip2k \
     238        | m32r | m68000 | m68k | m88k | mcore \
     239        | mips | mipsbe | mipseb | mipsel | mipsle \
     240        | mips16 \
     241        | mips64 | mips64el \
     242        | mips64vr | mips64vrel \
     243        | mips64orion | mips64orionel \
     244        | mips64vr4100 | mips64vr4100el \
     245        | mips64vr4300 | mips64vr4300el \
     246        | mips64vr5000 | mips64vr5000el \
     247        | mipsisa32 | mipsisa32el \
     248        | mipsisa32r2 | mipsisa32r2el \
     249        | mipsisa64 | mipsisa64el \
     250        | mipsisa64sb1 | mipsisa64sb1el \
     251        | mipsisa64sr71k | mipsisa64sr71kel \
     252        | mipstx39 | mipstx39el \
     253        | mn10200 | mn10300 \
     254        | msp430 \
     255        | ns16k | ns32k \
     256        | openrisc | or32 \
     257        | pdp10 | pdp11 | pj | pjl \
     258        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
     259        | pyramid \
     260        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     261        | sh64 | sh64le \
     262        | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
     263        | strongarm \
     264        | tahoe | thumb | tic80 | tron \
     265        | v850 | v850e \
     266        | we32k \
     267        | x86 | xscale | xstormy16 | xtensa \
     268        | z8k)
    237269                basic_machine=$basic_machine-unknown
    238270                ;;
     
    242274                os=-none
    243275                ;;
    244         m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
     276        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
    245277                ;;
    246278
     
    248280        # because (1) that's what they normally are, and
    249281        # (2) the word "unknown" tends to confuse beginning users.
    250         i[234567]86 | x86_64)
     282        i*86 | x86_64)
    251283          basic_machine=$basic_machine-pc
    252284          ;;
     
    257289                ;;
    258290        # Recognize the basic CPU types with company name.
    259         # FIXME: clean up the formatting here.
    260         vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
    261               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
    262               | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
    263               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
    264               | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
    265               | xmp-* | ymp-* \
    266               | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
    267               | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
    268               | hppa2.0n-* | hppa64-* \
    269               | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
    270               | alphaev6[78]-* \
    271               | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
    272               | clipper-* | orion-* \
    273               | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
    274               | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
    275               | mips64el-* | mips64orion-* | mips64orionel-* \
    276               | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
    277               | mipstx39-* | mipstx39el-* | mcore-* \
    278               | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
    279               | [cjt]90-* \
    280               | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
    281               | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
    282               | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
     291        580-* \
     292        | a29k-* \
     293        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
     294        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
     295        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
     296        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
     297        | avr-* \
     298        | bs2000-* \
     299        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
     300        | clipper-* | cydra-* \
     301        | d10v-* | d30v-* | dlx-* \
     302        | elxsi-* \
     303        | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
     304        | h8300-* | h8500-* \
     305        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
     306        | i*86-* | i860-* | i960-* | ia64-* \
     307        | ip2k-* \
     308        | m32r-* \
     309        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
     310        | m88110-* | m88k-* | mcore-* \
     311        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
     312        | mips16-* \
     313        | mips64-* | mips64el-* \
     314        | mips64vr-* | mips64vrel-* \
     315        | mips64orion-* | mips64orionel-* \
     316        | mips64vr4100-* | mips64vr4100el-* \
     317        | mips64vr4300-* | mips64vr4300el-* \
     318        | mips64vr5000-* | mips64vr5000el-* \
     319        | mipsisa32-* | mipsisa32el-* \
     320        | mipsisa32r2-* | mipsisa32r2el-* \
     321        | mipsisa64-* | mipsisa64el-* \
     322        | mipsisa64sb1-* | mipsisa64sb1el-* \
     323        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
     324        | mipstx39-* | mipstx39el-* \
     325        | msp430-* \
     326        | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
     327        | orion-* \
     328        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     329        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
     330        | pyramid-* \
     331        | romp-* | rs6000-* \
     332        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
     333        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
     334        | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
     335        | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
     336        | tahoe-* | thumb-* \
     337        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     338        | tron-* \
     339        | v850-* | v850e-* | vax-* \
     340        | we32k-* \
     341        | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
     342        | xtensa-* \
     343        | ymp-* \
     344        | z8k-*)
    283345                ;;
    284346        # Recognize the various machine names and aliases which stand
     
    312374                os=-bsd
    313375                ;;
     376        amd64)
     377                basic_machine=x86_64-pc
     378                ;;
    314379        amdahl)
    315380                basic_machine=580-amdahl
     
    343408                os=-dynix
    344409                ;;
     410        c90)
     411                basic_machine=c90-cray
     412                os=-unicos
     413                ;;
    345414        convex-c1)
    346415                basic_machine=c1-convex
     
    363432                os=-bsd
    364433                ;;
    365         cray | ymp)
    366                 basic_machine=ymp-cray
    367                 os=-unicos
    368                 ;;
    369         cray2)
    370                 basic_machine=cray2-cray
    371                 os=-unicos
    372                 ;;
    373         [cjt]90)
    374                 basic_machine=${basic_machine}-cray
     434        cray | j90)
     435                basic_machine=j90-cray
    375436                os=-unicos
    376437                ;;
     
    386447        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
    387448                basic_machine=mips-dec
     449                ;;
     450        decsystem10* | dec10*)
     451                basic_machine=pdp10-dec
     452                os=-tops10
     453                ;;
     454        decsystem20* | dec20*)
     455                basic_machine=pdp10-dec
     456                os=-tops20
    388457                ;;
    389458        delta | 3300 | motorola-3300 | motorola-delta \
     
    507576                ;;
    508577# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
    509         i[34567]86v32)
     578        i*86v32)
    510579                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    511580                os=-sysv32
    512581                ;;
    513         i[34567]86v4*)
     582        i*86v4*)
    514583                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    515584                os=-sysv4
    516585                ;;
    517         i[34567]86v)
     586        i*86v)
    518587                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    519588                os=-sysv
    520589                ;;
    521         i[34567]86sol2)
     590        i*86sol2)
    522591                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    523592                os=-solaris2
     
    567636                os=-mint
    568637                ;;
    569         mipsel*-linux*)
    570                 basic_machine=mipsel-unknown
    571                 os=-linux-gnu
    572                 ;;
    573         mips*-linux*)
    574                 basic_machine=mips-unknown
    575                 os=-linux-gnu
    576                 ;;
    577638        mips3*-*)
    578639                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
     
    588649                basic_machine=m68k-rom68k
    589650                os=-coff
     651                ;;
     652        morphos)
     653                basic_machine=powerpc-unknown
     654                os=-morphos
    590655                ;;
    591656        msdos)
     
    661726                basic_machine=np1-gould
    662727                ;;
     728        nv1)
     729                basic_machine=nv1-cray
     730                os=-unicosmp
     731                ;;
    663732        nsr-tandem)
    664733                basic_machine=nsr-tandem
     
    668737                os=-proelf
    669738                ;;
     739        or32 | or32-*)
     740                basic_machine=or32-unknown
     741                os=-coff
     742                ;;
    670743        OSE68000 | ose68000)
    671744                basic_machine=m68000-ericsson
     
    690763                basic_machine=m68k-tti
    691764                ;;
    692         pc532 | pc532-*)
     765        pc532 | pc532-*)
    693766                basic_machine=ns32k-pc532
    694767                ;;
    695         pentium | p5 | k5 | k6 | nexgen)
     768        pentium | p5 | k5 | k6 | nexgen | viac3)
    696769                basic_machine=i586-pc
    697770                ;;
    698         pentiumpro | p6 | 6x86 | athlon)
     771        pentiumpro | p6 | 6x86 | athlon | athlon_*)
    699772                basic_machine=i686-pc
    700773                ;;
     
    702775                basic_machine=i686-pc
    703776                ;;
    704         pentium-* | p5-* | k5-* | k6-* | nexgen-*)
     777        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
    705778                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
    706779                ;;
     
    717790                ;;
    718791        ppc)    basic_machine=powerpc-unknown
    719                 ;;
     792                ;;
    720793        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
    721794                ;;
    722795        ppcle | powerpclittle | ppc-le | powerpc-little)
    723796                basic_machine=powerpcle-unknown
    724                 ;;
     797                ;;
    725798        ppcle-* | powerpclittle-*)
    726799                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
     800                ;;
     801        ppc64)  basic_machine=powerpc64-unknown
     802                ;;
     803        ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
     804                ;;
     805        ppc64le | powerpc64little | ppc64-le | powerpc64-little)
     806                basic_machine=powerpc64le-unknown
     807                ;;
     808        ppc64le-* | powerpc64little-*)
     809                basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
    727810                ;;
    728811        ps2)
     
    743826                basic_machine=romp-ibm
    744827                ;;
     828        s390 | s390-*)
     829                basic_machine=s390-ibm
     830                ;;
     831        s390x | s390x-*)
     832                basic_machine=s390x-ibm
     833                ;;
    745834        sa29200)
    746835                basic_machine=a29k-amd
    747836                os=-udi
    748837                ;;
     838        sb1)
     839                basic_machine=mipsisa64sb1-unknown
     840                ;;
     841        sb1el)
     842                basic_machine=mipsisa64sb1el-unknown
     843                ;;
    749844        sequent)
    750845                basic_machine=i386-sequent
     
    754849                os=-hms
    755850                ;;
    756         sparclite-wrs)
     851        sparclite-wrs | simso-wrs)
    757852                basic_machine=sparclite-wrs
    758853                os=-vxworks
     
    821916                ;;
    822917        t3e)
    823                 basic_machine=t3e-cray
     918                basic_machine=alphaev5-cray
    824919                os=-unicos
     920                ;;
     921        t90)
     922                basic_machine=t90-cray
     923                os=-unicos
     924                ;;
     925        tic4x | c4x*)
     926                basic_machine=tic4x-unknown
     927                os=-coff
    825928                ;;
    826929        tic54x | c54x*)
     
    828931                os=-coff
    829932                ;;
     933        tic55x | c55x*)
     934                basic_machine=tic55x-unknown
     935                os=-coff
     936                ;;
     937        tic6x | c6x*)
     938                basic_machine=tic6x-unknown
     939                os=-coff
     940                ;;
    830941        tx39)
    831942                basic_machine=mipstx39-unknown
     
    833944        tx39el)
    834945                basic_machine=mipstx39el-unknown
     946                ;;
     947        toad1)
     948                basic_machine=pdp10-xkl
     949                os=-tops20
    835950                ;;
    836951        tower | tower-32)
     
    858973                ;;
    859974        vpp*|vx|vx-*)
    860                basic_machine=f301-fujitsu
    861                ;;
     975                basic_machine=f301-fujitsu
     976                ;;
    862977        vxworks960)
    863978                basic_machine=i960-wrs
     
    880995                os=-proelf
    881996                ;;
    882         xmp)
    883                 basic_machine=xmp-cray
     997        xps | xps100)
     998                basic_machine=xps100-honeywell
     999                ;;
     1000        ymp)
     1001                basic_machine=ymp-cray
    8841002                os=-unicos
    885                 ;;
    886         xps | xps100)
    887                 basic_machine=xps100-honeywell
    8881003                ;;
    8891004        z8k-*-coff)
     
    9071022                basic_machine=hppa1.1-oki
    9081023                ;;
    909         mips)
    910                 if [ x$os = x-linux-gnu ]; then
    911                         basic_machine=mips-unknown
    912                 else
    913                         basic_machine=mips-mips
    914                 fi
    915                 ;;
    9161024        romp)
    9171025                basic_machine=romp-ibm
     
    9331041                basic_machine=we32k-att
    9341042                ;;
    935         sh3 | sh4)
     1043        sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
    9361044                basic_machine=sh-unknown
    9371045                ;;
    938         sparc | sparcv9)
     1046        sh64)
     1047                basic_machine=sh64-unknown
     1048                ;;
     1049        sparc | sparcv9 | sparcv9b)
    9391050                basic_machine=sparc-sun
    9401051                ;;
    941         cydra)
     1052        cydra)
    9421053                basic_machine=cydra-cydrome
    9431054                ;;
     
    9541065                basic_machine=powerpc-apple
    9551066                ;;
    956         c4x*)
    957                 basic_machine=c4x-none
    958                 os=-coff
     1067        *-unknown)
     1068                # Make sure to match an already-canonicalized machine name.
    9591069                ;;
    9601070        *)
     
    10141124              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    10151125              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
     1126              | -chorusos* | -chorusrdb* \
    10161127              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    10171128              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    1018               | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     1129              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    10191130              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    1020               | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
     1131              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
     1132              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
     1133              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     1134              | -powermax* | -dnix*)
    10211135        # Remember, each alternative MUST END IN *, to match a version number.
    10221136                ;;
    10231137        -qnx*)
    10241138                case $basic_machine in
    1025                     x86-* | i[34567]86-*)
     1139                    x86-* | i*86-*)
    10261140                        ;;
    10271141                    *)
     
    10301144                esac
    10311145                ;;
     1146        -nto-qnx*)
     1147                ;;
    10321148        -nto*)
    1033                 os=-nto-qnx
     1149                os=`echo $os | sed -e 's|nto|nto-qnx|'`
    10341150                ;;
    10351151        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
     
    10701186                os=-aos
    10711187                ;;
     1188        -atheos*)
     1189                os=-atheos
     1190                ;;
    10721191        -386bsd)
    10731192                os=-bsd
     
    10761195                os=-sysv
    10771196                ;;
     1197        -nova*)
     1198                os=-rtmk-nova
     1199                ;;
    10781200        -ns2 )
    1079                 os=-nextstep2
     1201                os=-nextstep2
    10801202                ;;
    10811203        -nsk*)
     
    11161238                os=-xenix
    11171239                ;;
    1118         -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    1119                 os=-mint
     1240        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
     1241                os=-mint
     1242                ;;
     1243        -aros*)
     1244                os=-aros
     1245                ;;
     1246        -kaos*)
     1247                os=-kaos
    11201248                ;;
    11211249        -none)
     
    11501278                os=-aout
    11511279                ;;
     1280        # This must come before the *-dec entry.
    11521281        pdp10-*)
    11531282                os=-tops20
    11541283                ;;
    1155         pdp11-*)
     1284        pdp11-*)
    11561285                os=-none
    11571286                ;;
     
    11801309                os=-elf
    11811310                ;;
     1311        or32-*)
     1312                os=-coff
     1313                ;;
    11821314        *-tti)  # must be before sparc entry or we get the wrong os.
    11831315                os=-sysv3
     
    12431375                os=-nextstep3
    12441376                ;;
    1245         *-gould)
     1377        *-gould)
    12461378                os=-sysv
    12471379                ;;
    1248         *-highlevel)
     1380        *-highlevel)
    12491381                os=-bsd
    12501382                ;;
     
    12521384                os=-bsd
    12531385                ;;
    1254         *-sgi)
     1386        *-sgi)
    12551387                os=-irix
    12561388                ;;
    1257         *-siemens)
     1389        *-siemens)
    12581390                os=-sysv4
    12591391                ;;
     
    13271459                                vendor=sequent
    13281460                                ;;
    1329                         -vxsim* | -vxworks*)
     1461                        -vxsim* | -vxworks* | -windiss*)
    13301462                                vendor=wrs
    13311463                                ;;
     
    13411473                        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    13421474                                vendor=atari
     1475                                ;;
     1476                        -vos*)
     1477                                vendor=stratus
    13431478                                ;;
    13441479                esac
  • TabularUnified branches/GNU/src/binutils/configure

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    1 #!/bin/sh
    2 
    3 ### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
    4 
    5 # Configuration script
    6 # Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    7 # Free Software Foundation, Inc.
    8 
    9 # This program is free software; you can redistribute it and/or modify
    10 # it under the terms of the GNU General Public License as published by
    11 # the Free Software Foundation; either version 2 of the License, or
    12 # (at your option) any later version.
    13 #
    14 # This program is distributed in the hope that it will be useful,
    15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    17 # GNU General Public License for more details.
    18 #
    19 # You should have received a copy of the GNU General Public License
    20 # along with this program; if not, write to the Free Software
    21 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    22 
    23 # This file was originally written by K. Richard Pixley.
    24 
     1#! /bin/sh
     2
     3# Guess values for system-dependent variables and create Makefiles.
     4# Generated automatically using autoconf version 2.13
     5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
    256#
    26 # Shell script to create proper links to machine-dependent files in
    27 # preparation for compilation.
    28 #
    29 # If configure succeeds, it leaves its status in config.status.
    30 # If configure fails after disturbing the status quo,
    31 #       config.status is removed.
    32 #
    33 
    34 export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
    35 
    36 remove=rm
    37 hard_link=ln
    38 symbolic_link='ln -s'
    39 
    40 #for Test
    41 #remove="echo rm"
    42 #hard_link="echo ln"
    43 #symbolic_link="echo ln -s"
    44 
    45 # clear some things potentially inherited from environment.
    46 
    47 Makefile=Makefile
    48 Makefile_in=Makefile.in
    49 arguments=
    50 build_alias=
    51 cache_file=config.cache
    52 cache_file_option=
    53 configdirs=
    54 extraconfigdirs=
    55 diroptions=
    56 exec_prefix=
    57 exec_prefixoption=
    58 fatal=
    59 floating_point=default
    60 gas=default
    61 gcc_version=
    62 gcc_version_trigger=
    63 host_alias=NOHOST
    64 host_makefile_frag=
    65 moveifchange=
    66 norecursion=
    67 other_options=
    68 package_makefile_frag=
    69 package_makefile_rules_frag=
    70 prefix=/usr/local
    71 progname=
    72 program_prefix=
    73 program_prefixoption=
    74 program_suffix=
    75 program_suffixoption=
    76 program_transform_name=
    77 program_transform_nameoption=
    78 redirect=
    79 removing=
     7# This configure script is free software; the Free Software Foundation
     8# gives unlimited permission to copy, distribute and modify it.
     9
     10# Defaults:
     11ac_help=
     12ac_default_prefix=/usr/local
     13# Any additions from configure.in:
     14ac_help="$ac_help
     15  --disable-serial-[{host,target,build}-]configure
     16                          Don't force sequential configuration of
     17                          sub-packages for the host, target or build
     18                          machine, or of any sub-packages at all"
     19ac_help="$ac_help
     20  --enable-maintainer-mode enable make rules and dependencies not useful
     21                          (and sometimes confusing) to the casual installer"
     22
     23# Initialize some variables set by options.
     24# The variables have the same names as the options, with
     25# dashes changed to underlines.
     26build=NONE
     27cache_file=./config.cache
     28exec_prefix=NONE
     29host=NONE
     30no_create=
     31nonopt=NONE
     32no_recursion=
     33prefix=NONE
     34program_prefix=NONE
     35program_suffix=NONE
     36program_transform_name=s,x,x,
     37silent=
    8038site=
    81 site_makefile_frag=
    82 site_option=
    8339srcdir=
    84 srctrigger=
    85 subdirs=
    86 target_alias=NOTARGET
    87 target_makefile_frag=
    88 undefs=NOUNDEFS
    89 version="$Revision: 1.11 $"
    90 x11=default
     40target=NONE
     41verbose=
     42x_includes=NONE
     43x_libraries=NONE
    9144bindir='${exec_prefix}/bin'
    9245sbindir='${exec_prefix}/sbin'
     
    10255mandir='${prefix}/man'
    10356
     57# Initialize some other variables.
     58subdirs=
     59MFLAGS= MAKEFLAGS=
     60SHELL=${CONFIG_SHELL-/bin/sh}
     61# Maximum number of lines to put in a shell here document.
     62ac_max_here_lines=12
     63
     64ac_prev=
     65for ac_option
     66do
     67
     68  # If the previous option needs an argument, assign it.
     69  if test -n "$ac_prev"; then
     70    eval "$ac_prev=\$ac_option"
     71    ac_prev=
     72    continue
     73  fi
     74
     75  case "$ac_option" in
     76  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
     77  *) ac_optarg= ;;
     78  esac
     79
     80  # Accept the important Cygnus configure options, so we can diagnose typos.
     81
     82  case "$ac_option" in
     83
     84  -bindir | --bindir | --bindi | --bind | --bin | --bi)
     85    ac_prev=bindir ;;
     86  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
     87    bindir="$ac_optarg" ;;
     88
     89  -build | --build | --buil | --bui | --bu)
     90    ac_prev=build ;;
     91  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
     92    build="$ac_optarg" ;;
     93
     94  -cache-file | --cache-file | --cache-fil | --cache-fi \
     95  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
     96    ac_prev=cache_file ;;
     97  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
     98  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
     99    cache_file="$ac_optarg" ;;
     100
     101  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     102    ac_prev=datadir ;;
     103  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
     104  | --da=*)
     105    datadir="$ac_optarg" ;;
     106
     107  -disable-* | --disable-*)
     108    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
     109    # Reject names that are not valid shell variable names.
     110    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
     111      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
     112    fi
     113    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
     114    eval "enable_${ac_feature}=no" ;;
     115
     116  -enable-* | --enable-*)
     117    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
     118    # Reject names that are not valid shell variable names.
     119    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
     120      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
     121    fi
     122    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
     123    case "$ac_option" in
     124      *=*) ;;
     125      *) ac_optarg=yes ;;
     126    esac
     127    eval "enable_${ac_feature}='$ac_optarg'" ;;
     128
     129  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
     130  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
     131  | --exec | --exe | --ex)
     132    ac_prev=exec_prefix ;;
     133  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
     134  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
     135  | --exec=* | --exe=* | --ex=*)
     136    exec_prefix="$ac_optarg" ;;
     137
     138  -gas | --gas | --ga | --g)
     139    # Obsolete; use --with-gas.
     140    with_gas=yes ;;
     141
     142  -help | --help | --hel | --he)
     143    # Omit some internal or obsolete options to make the list less imposing.
     144    # This message is too long to be a string in the A/UX 3.1 sh.
     145    cat << EOF
     146Usage: configure [options] [host]
     147Options: [defaults in brackets after descriptions]
     148Configuration:
     149  --cache-file=FILE       cache test results in FILE
     150  --help                  print this message
     151  --no-create             do not create output files
     152  --quiet, --silent       do not print \`checking...' messages
     153  --version               print the version of autoconf that created configure
     154Directory and file names:
     155  --prefix=PREFIX         install architecture-independent files in PREFIX
     156                          [$ac_default_prefix]
     157  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
     158                          [same as prefix]
     159  --bindir=DIR            user executables in DIR [EPREFIX/bin]
     160  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
     161  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
     162  --datadir=DIR           read-only architecture-independent data in DIR
     163                          [PREFIX/share]
     164  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
     165  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
     166                          [PREFIX/com]
     167  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
     168  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
     169  --includedir=DIR        C header files in DIR [PREFIX/include]
     170  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
     171  --infodir=DIR           info documentation in DIR [PREFIX/info]
     172  --mandir=DIR            man documentation in DIR [PREFIX/man]
     173  --srcdir=DIR            find the sources in DIR [configure dir or ..]
     174  --program-prefix=PREFIX prepend PREFIX to installed program names
     175  --program-suffix=SUFFIX append SUFFIX to installed program names
     176  --program-transform-name=PROGRAM
     177                          run sed PROGRAM on installed program names
     178EOF
     179    cat << EOF
     180Host type:
     181  --build=BUILD           configure for building on BUILD [BUILD=HOST]
     182  --host=HOST             configure for HOST [guessed]
     183  --target=TARGET         configure for TARGET [TARGET=HOST]
     184Features and packages:
     185  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
     186  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
     187  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
     188  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
     189  --x-includes=DIR        X include files are in DIR
     190  --x-libraries=DIR       X library files are in DIR
     191EOF
     192    if test -n "$ac_help"; then
     193      echo "--enable and --with options recognized:$ac_help"
     194    fi
     195    exit 0 ;;
     196
     197  -host | --host | --hos | --ho)
     198    ac_prev=host ;;
     199  -host=* | --host=* | --hos=* | --ho=*)
     200    host="$ac_optarg" ;;
     201
     202  -includedir | --includedir | --includedi | --included | --include \
     203  | --includ | --inclu | --incl | --inc)
     204    ac_prev=includedir ;;
     205  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
     206  | --includ=* | --inclu=* | --incl=* | --inc=*)
     207    includedir="$ac_optarg" ;;
     208
     209  -infodir | --infodir | --infodi | --infod | --info | --inf)
     210    ac_prev=infodir ;;
     211  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
     212    infodir="$ac_optarg" ;;
     213
     214  -libdir | --libdir | --libdi | --libd)
     215    ac_prev=libdir ;;
     216  -libdir=* | --libdir=* | --libdi=* | --libd=*)
     217    libdir="$ac_optarg" ;;
     218
     219  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
     220  | --libexe | --libex | --libe)
     221    ac_prev=libexecdir ;;
     222  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
     223  | --libexe=* | --libex=* | --libe=*)
     224    libexecdir="$ac_optarg" ;;
     225
     226  -localstatedir | --localstatedir | --localstatedi | --localstated \
     227  | --localstate | --localstat | --localsta | --localst \
     228  | --locals | --local | --loca | --loc | --lo)
     229    ac_prev=localstatedir ;;
     230  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
     231  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
     232  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
     233    localstatedir="$ac_optarg" ;;
     234
     235  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     236    ac_prev=mandir ;;
     237  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
     238    mandir="$ac_optarg" ;;
     239
     240  -nfp | --nfp | --nf)
     241    # Obsolete; use --without-fp.
     242    with_fp=no ;;
     243
     244  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
     245  | --no-cr | --no-c)
     246    no_create=yes ;;
     247
     248  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
     249  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
     250    no_recursion=yes ;;
     251
     252  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
     253  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
     254  | --oldin | --oldi | --old | --ol | --o)
     255    ac_prev=oldincludedir ;;
     256  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
     257  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
     258  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
     259    oldincludedir="$ac_optarg" ;;
     260
     261  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     262    ac_prev=prefix ;;
     263  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
     264    prefix="$ac_optarg" ;;
     265
     266  -program-prefix | --program-prefix | --program-prefi | --program-pref \
     267  | --program-pre | --program-pr | --program-p)
     268    ac_prev=program_prefix ;;
     269  -program-prefix=* | --program-prefix=* | --program-prefi=* \
     270  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
     271    program_prefix="$ac_optarg" ;;
     272
     273  -program-suffix | --program-suffix | --program-suffi | --program-suff \
     274  | --program-suf | --program-su | --program-s)
     275    ac_prev=program_suffix ;;
     276  -program-suffix=* | --program-suffix=* | --program-suffi=* \
     277  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
     278    program_suffix="$ac_optarg" ;;
     279
     280  -program-transform-name | --program-transform-name \
     281  | --program-transform-nam | --program-transform-na \
     282  | --program-transform-n | --program-transform- \
     283  | --program-transform | --program-transfor \
     284  | --program-transfo | --program-transf \
     285  | --program-trans | --program-tran \
     286  | --progr-tra | --program-tr | --program-t)
     287    ac_prev=program_transform_name ;;
     288  -program-transform-name=* | --program-transform-name=* \
     289  | --program-transform-nam=* | --program-transform-na=* \
     290  | --program-transform-n=* | --program-transform-=* \
     291  | --program-transform=* | --program-transfor=* \
     292  | --program-transfo=* | --program-transf=* \
     293  | --program-trans=* | --program-tran=* \
     294  | --progr-tra=* | --program-tr=* | --program-t=*)
     295    program_transform_name="$ac_optarg" ;;
     296
     297  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
     298  | -silent | --silent | --silen | --sile | --sil)
     299    silent=yes ;;
     300
     301  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     302    ac_prev=sbindir ;;
     303  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
     304  | --sbi=* | --sb=*)
     305    sbindir="$ac_optarg" ;;
     306
     307  -sharedstatedir | --sharedstatedir | --sharedstatedi \
     308  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
     309  | --sharedst | --shareds | --shared | --share | --shar \
     310  | --sha | --sh)
     311    ac_prev=sharedstatedir ;;
     312  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
     313  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
     314  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
     315  | --sha=* | --sh=*)
     316    sharedstatedir="$ac_optarg" ;;
     317
     318  -site | --site | --sit)
     319    ac_prev=site ;;
     320  -site=* | --site=* | --sit=*)
     321    site="$ac_optarg" ;;
     322
     323  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     324    ac_prev=srcdir ;;
     325  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
     326    srcdir="$ac_optarg" ;;
     327
     328  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
     329  | --syscon | --sysco | --sysc | --sys | --sy)
     330    ac_prev=sysconfdir ;;
     331  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
     332  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
     333    sysconfdir="$ac_optarg" ;;
     334
     335  -target | --target | --targe | --targ | --tar | --ta | --t)
     336    ac_prev=target ;;
     337  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
     338    target="$ac_optarg" ;;
     339
     340  -v | -verbose | --verbose | --verbos | --verbo | --verb)
     341    verbose=yes ;;
     342
     343  -version | --version | --versio | --versi | --vers)
     344    echo "configure generated by autoconf version 2.13"
     345    exit 0 ;;
     346
     347  -with-* | --with-*)
     348    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
     349    # Reject names that are not valid shell variable names.
     350    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
     351      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
     352    fi
     353    ac_package=`echo $ac_package| sed 's/-/_/g'`
     354    case "$ac_option" in
     355      *=*) ;;
     356      *) ac_optarg=yes ;;
     357    esac
     358    eval "with_${ac_package}='$ac_optarg'" ;;
     359
     360  -without-* | --without-*)
     361    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
     362    # Reject names that are not valid shell variable names.
     363    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
     364      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
     365    fi
     366    ac_package=`echo $ac_package| sed 's/-/_/g'`
     367    eval "with_${ac_package}=no" ;;
     368
     369  --x)
     370    # Obsolete; use --with-x.
     371    with_x=yes ;;
     372
     373  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
     374  | --x-incl | --x-inc | --x-in | --x-i)
     375    ac_prev=x_includes ;;
     376  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
     377  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
     378    x_includes="$ac_optarg" ;;
     379
     380  -x-libraries | --x-libraries | --x-librarie | --x-librari \
     381  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
     382    ac_prev=x_libraries ;;
     383  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
     384  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     385    x_libraries="$ac_optarg" ;;
     386
     387  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
     388    ;;
     389
     390  *)
     391    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
     392      echo "configure: warning: $ac_option: invalid host type" 1>&2
     393    fi
     394    if test "x$nonopt" != xNONE; then
     395      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
     396    fi
     397    nonopt="$ac_option"
     398    ;;
     399
     400  esac
     401done
     402
     403if test -n "$ac_prev"; then
     404  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
     405fi
     406
     407trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
     408
     409# File descriptor usage:
     410# 0 standard input
     411# 1 file creation
     412# 2 errors and warnings
     413# 3 some systems may open it to /dev/tty
     414# 4 used on the Kubota Titan
     415# 6 checking for... messages and results
     416# 5 compiler messages saved in config.log
     417if test "$silent" = yes; then
     418  exec 6>/dev/null
     419else
     420  exec 6>&1
     421fi
     422exec 5>./config.log
     423
     424echo "\
     425This file contains any messages produced by compilers while
     426running configure, to aid debugging if configure makes a mistake.
     427" 1>&5
     428
     429# Strip out --no-create and --no-recursion so they do not pile up.
     430# Also quote any args containing shell metacharacters.
     431ac_configure_args=
     432for ac_arg
     433do
     434  case "$ac_arg" in
     435  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
     436  | --no-cr | --no-c) ;;
     437  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
     438  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
     439  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
     440  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
     441  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
     442  esac
     443done
     444
     445# NLS nuisances.
     446# Only set these to C if already set.  These must not be set unconditionally
     447# because not all systems understand e.g. LANG=C (notably SCO).
     448# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
     449# Non-C LC_CTYPE values break the ctype check.
     450if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
     451if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
     452if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
     453if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
     454
     455# confdefs.h avoids OS command line length limits that DEFS can exceed.
     456rm -rf conftest* confdefs.h
     457# AIX cpp loses on an empty file, so make sure it contains at least a newline.
     458echo > confdefs.h
     459
     460# A filename unique to this package, relative to the directory that
     461# configure is in, which we can look for to find out if srcdir is correct.
     462ac_unique_file=move-if-change
     463
     464# Find the source files, if location was not specified.
     465if test -z "$srcdir"; then
     466  ac_srcdir_defaulted=yes
     467  # Try the directory containing this script, then its parent.
     468  ac_prog=$0
     469  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
     470  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
     471  srcdir=$ac_confdir
     472  if test ! -r $srcdir/$ac_unique_file; then
     473    srcdir=..
     474  fi
     475else
     476  ac_srcdir_defaulted=no
     477fi
     478if test ! -r $srcdir/$ac_unique_file; then
     479  if test "$ac_srcdir_defaulted" = yes; then
     480    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
     481  else
     482    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
     483  fi
     484fi
     485srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
     486
     487# Prefer explicitly selected file to automatically selected ones.
     488if test -z "$CONFIG_SITE"; then
     489  if test "x$prefix" != xNONE; then
     490    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
     491  else
     492    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
     493  fi
     494fi
     495for ac_site_file in $CONFIG_SITE; do
     496  if test -r "$ac_site_file"; then
     497    echo "loading site script $ac_site_file"
     498    . "$ac_site_file"
     499  fi
     500done
     501
     502if test -r "$cache_file"; then
     503  echo "loading cache $cache_file"
     504  . $cache_file
     505else
     506  echo "creating cache $cache_file"
     507  > $cache_file
     508fi
     509
     510ac_ext=c
     511# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
     512ac_cpp='$CPP $CPPFLAGS'
     513ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
     514ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     515cross_compiling=$ac_cv_prog_cc_cross
     516
     517ac_exeext=
     518ac_objext=o
     519if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
     520  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
     521  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
     522    ac_n= ac_c='
     523' ac_t='        '
     524  else
     525    ac_n=-n ac_c= ac_t=
     526  fi
     527else
     528  ac_n= ac_c='\c' ac_t=
     529fi
     530
     531
     532
     533ac_aux_dir=
     534for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
     535  if test -f $ac_dir/install-sh; then
     536    ac_aux_dir=$ac_dir
     537    ac_install_sh="$ac_aux_dir/install-sh -c"
     538    break
     539  elif test -f $ac_dir/install.sh; then
     540    ac_aux_dir=$ac_dir
     541    ac_install_sh="$ac_aux_dir/install.sh -c"
     542    break
     543  fi
     544done
     545if test -z "$ac_aux_dir"; then
     546  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
     547fi
     548ac_config_guess=$ac_aux_dir/config.guess
     549ac_config_sub=$ac_aux_dir/config.sub
     550ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
     551
     552
     553# Do some error checking and defaulting for the host and target type.
     554# The inputs are:
     555#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
     556#
     557# The rules are:
     558# 1. You are not allowed to specify --host, --target, and nonopt at the
     559#    same time.
     560# 2. Host defaults to nonopt.
     561# 3. If nonopt is not specified, then host defaults to the current host,
     562#    as determined by config.guess.
     563# 4. Target and build default to nonopt.
     564# 5. If nonopt is not specified, then target and build default to host.
     565
     566# The aliases save the names the user supplied, while $host etc.
     567# will get canonicalized.
     568case $host---$target---$nonopt in
     569NONE---*---* | *---NONE---* | *---*---NONE) ;;
     570*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
     571esac
     572
     573
     574# Make sure we can run config.sub.
     575if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
     576else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
     577fi
     578
     579echo $ac_n "checking host system type""... $ac_c" 1>&6
     580echo "configure:581: checking host system type" >&5
     581
     582host_alias=$host
     583case "$host_alias" in
     584NONE)
     585  case $nonopt in
     586  NONE)
     587    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
     588    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
     589    fi ;;
     590  *) host_alias=$nonopt ;;
     591  esac ;;
     592esac
     593
     594host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
     595host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
     596host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
     597host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
     598echo "$ac_t""$host" 1>&6
     599
     600echo $ac_n "checking target system type""... $ac_c" 1>&6
     601echo "configure:602: checking target system type" >&5
     602
     603target_alias=$target
     604case "$target_alias" in
     605NONE)
     606  case $nonopt in
     607  NONE) target_alias=$host_alias ;;
     608  *) target_alias=$nonopt ;;
     609  esac ;;
     610esac
     611
     612target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
     613target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
     614target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
     615target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
     616echo "$ac_t""$target" 1>&6
     617
     618echo $ac_n "checking build system type""... $ac_c" 1>&6
     619echo "configure:620: checking build system type" >&5
     620
     621build_alias=$build
     622case "$build_alias" in
     623NONE)
     624  case $nonopt in
     625  NONE) build_alias=$host_alias ;;
     626  *) build_alias=$nonopt ;;
     627  esac ;;
     628esac
     629
     630build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
     631build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
     632build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
     633build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
     634echo "$ac_t""$build" 1>&6
     635
     636test "$host_alias" != "$target_alias" &&
     637  test "$program_prefix$program_suffix$program_transform_name" = \
     638    NONENONEs,x,x, &&
     639  program_prefix=${target_alias}-
     640
     641if test "$program_transform_name" = s,x,x,; then
     642  program_transform_name=
     643else
     644  # Double any \ or $.  echo might interpret backslashes.
     645  cat <<\EOF_SED > conftestsed
     646s,\\,\\\\,g; s,\$,$$,g
     647EOF_SED
     648  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
     649  rm -f conftestsed
     650fi
     651test "$program_prefix" != NONE &&
     652  program_transform_name="s,^,${program_prefix},; $program_transform_name"
     653# Use a double $ so make ignores it.
     654test "$program_suffix" != NONE &&
     655  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
     656
     657# sed with no file args requires a program.
     658test "$program_transform_name" = "" && program_transform_name="s,x,x,"
     659
     660
     661# Autoconf M4 include file defining utility macros for complex Canadian
     662# cross builds.
     663
     664####
     665# _NCN_TOOL_PREFIXES:  Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
     666# or AC_INIT.
     667# These demand that AC_CANONICAL_SYSTEM be called beforehand.
     668 
     669####
     670# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
     671# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
     672# Code is pretty much lifted from autoconf2.53.
     673
     674 
     675
     676####
     677# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
     678# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
     679
     680 
     681
     682####
     683# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
     684# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
     685
     686 
     687
    104688### we might need to use some other shell than /bin/sh for running subshells
    105 
    106689### If we are on Windows, search for the shell.  This will permit people
    107690### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
     
    110693case "${OSTYPE}" in
    111694*win32*)
    112   if [ x${CONFIG_SHELL} = x ]; then
    113     if [ ! -f /bin/sh ]; then
    114       if [ x${SHELL} != x ] && [ -f ${SHELL} ]; then
     695  if test x${CONFIG_SHELL} = x ; then
     696    if test ! -f /bin/sh ; then
     697      if test x${SHELL} != x && test -f ${SHELL} ; then
    115698        CONFIG_SHELL=${SHELL}
    116699        export CONFIG_SHELL
     
    137720config_shell=${CONFIG_SHELL-/bin/sh}
    138721
    139 NO_EDIT="This file was generated automatically by configure.  Do not edit."
    140 
    141 ## this is a little touchy and won't always work, but...
    142 ##
    143 ## if the argv[0] starts with a slash then it is an absolute name that can (and
    144 ## must) be used as is.
    145 ##
    146 ## otherwise, if argv[0] has no slash in it, we can assume that it is on the
    147 ## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
    148 ##
    149 
    150722progname=$0
    151723# if PWD already has a value, it is probably wrong.
    152 if [ -n "$PWD" ]; then PWD=`pwd`; fi
    153 
    154 case "${progname}" in
    155 /*) ;;
    156 */*) ;;
    157 *)
    158         PATH=$PATH:${PWD=`pwd`} ; export PATH
    159         ;;
    160 esac
    161 
    162 # Loop over all args
    163 
    164 while :
    165 do
    166 
    167 # Break out if there are no more args
    168         case $# in
    169         0)
    170                 break
    171                 ;;
    172         esac
    173 
    174 # Get the first arg, and shuffle
    175         option=$1
    176         shift
    177 
    178 # Make all options have two hyphens
    179         orig_option=$option     # Save original for error messages
    180         case $option in
    181         --*) ;;
    182         -*) option=-$option ;;
    183         esac
    184                
    185 # Split out the argument for options that take them
    186         case $option in
    187         --*=*)
    188                 optarg=`echo $option | sed -e 's/^[^=]*=//'`
    189                 arguments="$arguments $option"
    190                 ;;
    191 # These options have mandatory values.  Since we didn't find an = sign,
    192 # the value must be in the next argument
    193         --bu* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-* | --bi* | --sb* | --li* | --da* | --sy* | --sh* | --lo* | --in* | --ol* | --ma*)
    194                 optarg=$1
    195                 shift
    196                 arguments="$arguments $option=$optarg"
    197                 ;;
    198         --v)
    199                 arguments="$arguments -v"
    200                 ;;
    201         --*)
    202                 arguments="$arguments $option"
    203                 ;;
    204         esac
    205 
    206 # Now, process the options
    207         case $option in
    208 
    209         --bi*)
    210                 bindir=$optarg
    211                 diroptions="$diroptions --bindir=$optarg"
    212                 ;;
    213         --build* | --bu*)
    214                 case "$build_alias" in
    215                 "") build_alias=$optarg ;;
    216                 *) echo '***' Can only configure for one build machine at a time.  1>&2
    217                    fatal=yes
    218                    ;;
    219                 esac
    220                 ;;
    221         --cache*)
    222                 cache_file=$optarg
    223                 ;;
    224         --da*)
    225                 datadir=$optarg
    226                 diroptions="$diroptions --datadir=$optarg"
    227                 ;;
    228         --disable-*)
    229                 enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
    230                 eval $enableopt=no
    231                 disableoptions="$disableoptions $option"
    232                 ;;
    233         --enable-*)
    234                 case "$option" in
    235                 *=*)    ;;
    236                 *)      optarg=yes ;;
    237                 esac
    238 
    239                 enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
    240                 eval "$enableopt=\$optarg"
    241                 enableoptions="$enableoptions '$option'"
    242                 ;;
    243         --exec-prefix* | --ex*)
    244                 exec_prefix=$optarg
    245                 exec_prefixoption="--exec-prefix=$optarg"
    246                 ;;
    247         --gas | --g*)
    248                 gas=yes
    249                 ;;
    250         --help | --he*)
    251                 fatal=yes
    252                 ;;
    253         --host* | --ho*)
    254                 case $host_alias in
    255                 NOHOST) host_alias=$optarg ;;
    256                 *) echo '***' Can only configure for one host at a time.  1>&2
    257                    fatal=yes
    258                    ;;
    259                 esac
    260                 ;;
    261         --inc*)
    262                 includedir=$optarg
    263                 diroptions="$diroptions --includedir=$optarg"
    264                 ;;
    265         --inf*)
    266                 infodir=$optarg
    267                 diroptions="$diroptions --infodir=$optarg"
    268                 ;;
    269         --libd*)
    270                 libdir=$optarg
    271                 diroptions="$diroptions --libdir=$optarg"
    272                 ;;
    273         --libe*)
    274                 libexecdir=$optarg
    275                 diroptions="$diroptions --libexecdir=$optarg"
    276                 ;;
    277         --lo*)
    278                 localstatedir=$optarg
    279                 diroptions="$diroptions --localstatedir=$optarg"
    280                 ;;
    281         --ma*)
    282                 mandir=$optarg
    283                 diroptions="$diroptions --mandir=$optarg"
    284                 ;;
    285         --nfp | --nf*)
    286                 floating_point=no
    287                 floating_pointoption="--nfp"
    288                 ;;
    289         --norecursion | --no*)
    290                 norecursion=yes
    291                 ;;
    292         --ol*)
    293                 oldincludedir=$optarg
    294                 diroptions="$diroptions --oldincludedir=$optarg"
    295                 ;;
    296         --prefix* | --pre*)
    297                 prefix=$optarg
    298                 prefixoption="--prefix=$optarg"
    299                 ;;
    300         --program-prefix* | --program-p*)
    301                 program_prefix=$optarg
    302                 program_prefixoption="--program-prefix=$optarg"
    303                 ;;
    304         --program-suffix* | --program-s*)
    305                 program_suffix=$optarg
    306                 program_suffixoption="--program-suffix=$optarg"
    307                 ;;
    308         --program-transform-name* | --program-t*)
    309                 # Double any backslashes or dollar signs in the argument
    310                 program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
    311                 program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
    312                 ;;
    313         --rm)
    314                 removing=--rm
    315                 ;;
    316         --sb*)
    317                 sbindir=$optarg
    318                 diroptions="$diroptions --sbindir=$optarg"
    319                 ;;
    320         --sh*)
    321                 sharedstatedir=$optarg
    322                 diroptions="$diroptions --sharedstatedir=$optarg"
    323                 ;;
    324         --silent | --sil* | --quiet | --q*)
    325                 redirect=">/dev/null"
    326                 verbose=--silent
    327                 ;;
    328         --site* | --sit*)
    329                 site=$optarg
    330                 site_option="--site=$optarg"
    331                 ;;
    332         --srcdir*/ | --sr*/)
    333                 # Remove trailing slashes.  Otherwise, when the file name gets
    334                 # bolted into an object file as debug info, it has two slashes
    335                 # in it.  Ordinarily this is ok, but emacs takes double slash
    336                 # to mean "forget the first part".
    337                 srcdir=`echo $optarg | sed -e 's:/$::'`
    338                 ;;
    339         --srcdir* | --sr*)
    340                 srcdir=$optarg
    341                 ;;
    342         --sy*)
    343                 sysconfdir=$optarg
    344                 diroptions="$diroptions --sysconfdir=$optarg"
    345                 ;;
    346         --target* | --ta*)
    347                 case $target_alias in
    348                 NOTARGET) target_alias=$optarg ;;
    349                 *) echo '***' Can only configure for one target at a time.  1>&2
    350                    fatal=yes
    351                    ;;
    352                 esac
    353                 ;;
    354         --tmpdir* | --tm*)
    355                 TMPDIR=$optarg
    356                 tmpdiroption="--tmpdir=$optarg"
    357                 ;;
    358         --verbose | --v | --verb*)
    359                 redirect=
    360                 verbose=--verbose
    361                 ;;
    362         --version | --V | --vers*)
    363                 echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
    364                 exit 0
    365                 ;;
    366         --with-*)
    367                 case "$option" in
    368                 *=*)    ;;
    369                 *)      optarg=yes ;;
    370                 esac
    371 
    372                 withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
    373                 eval $withopt="\$optarg"
    374                 withoptions="$withoptions $option"
    375                 ;;
    376         --without-*)
    377                 withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
    378                 eval $withopt=no
    379                 withoutoptions="$withoutoptions $option"
    380                 ;;
    381         --x)    with_x=yes
    382                 withoptions="$withoptions --with-x"
    383                 ;;
    384         --x-i* | --x-l*) other_options="$other_options $orig_option"
    385                 ;;
    386         --*)
    387                 echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
    388                 exit 1
    389                 ;;
    390         *)
    391                 case $undefs in
    392                 NOUNDEFS) undefs=$option ;;
    393                 *) echo '***' Can only configure for one host and one target at a time.  1>&2
    394                    fatal=yes
    395                    ;;
    396                 esac
    397                 ;;
    398         esac
    399 done
    400 
    401 # process host and target
    402 
    403 # Do some error checking and defaulting for the host and target type.
    404 # The inputs are:
    405 #    configure --host=HOST --target=TARGET UNDEFS
    406 #
    407 # The rules are:
    408 # 1. You aren't allowed to specify --host, --target, and undefs at the
    409 #    same time.
    410 # 2. Host defaults to undefs.
    411 # 3. If undefs is not specified, then host defaults to the current host,
    412 #    as determined by config.guess.
    413 # 4. Target defaults to undefs.
    414 # 5. If undefs is not specified, then target defaults to host.
    415 
    416 case "${fatal}" in
    417 "")
    418         # Make sure that host, target & undefs aren't all specified at the
    419         # same time.
    420         case $host_alias---$target_alias---$undefs in
    421         NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
    422                 ;;
    423         *) echo '***' Can only configure for one host and one target at a time.  1>&2
    424            fatal=yes
    425            break 2
    426                 ;;
    427         esac
    428 
    429         # Now, do defaulting for host.
    430         case $host_alias in
    431         NOHOST)
    432                 case $undefs in
    433                 NOUNDEFS)
    434                         # Neither --host option nor undefs were present.
    435                         # Call config.guess.
    436                         guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
    437                         if host_alias=`${config_shell} ${guesssys}`
    438                         then
    439                                 # If the string we are going to use for
    440                                 # the target is a prefix of the string
    441                                 # we just guessed for the host, then
    442                                 # assume we are running native, and force
    443                                 # the same string for both target and host.
    444                                 case $target_alias in
    445                                 NOTARGET) ;;
    446                                 *)
    447                                         if expr $host_alias : $target_alias >/dev/null
    448                                         then
    449                                                 host_alias=$target_alias
    450                                         fi
    451                                         ;;
    452                                 esac
    453                                 echo "Configuring for a ${host_alias} host." 1>&2
    454                                 arguments="--host=$host_alias $arguments"
    455                         else
    456                                 echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
    457                                 fatal=yes
    458                         fi
    459                         ;;
    460                 *)
    461                         host_alias=$undefs
    462                         arguments="--host=$host_alias $arguments"
    463                         undefs=NOUNDEFS
    464                         ;;
    465                 esac
    466         esac
    467 
    468         # Do defaulting for target.  If --target option isn't present, default
    469         # to undefs.  If undefs isn't present, default to host.
    470         case $target_alias in
    471         NOTARGET)
    472                 case $undefs in
    473                 NOUNDEFS)
    474                         target_alias=$host_alias
    475                         ;;
    476                 *)
    477                         target_alias=$undefs
    478                         arguments="--target=$target_alias $arguments"
    479                         ;;
    480                 esac
    481         esac
    482         ;;
    483 *) ;;
    484 esac
    485 
    486 if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
    487         exec 1>&2
    488         echo Usage: configure [OPTIONS] [HOST]
    489         echo
    490         echo Options: [defaults in brackets]
    491         echo ' --prefix=MYDIR            install into MYDIR [/usr/local]'
    492         echo ' --exec-prefix=MYDIR       install host-dependent files into MYDIR [/usr/local]'
    493         echo ' --help                    print this message [normal config]'
    494         echo ' --build=BUILD             configure for building on BUILD [BUILD=HOST]'
    495         echo ' --host=HOST               configure for HOST [determined via config.guess]'
    496         echo ' --norecursion             configure this directory only [recurse]'
    497         echo ' --program-prefix=FOO      prepend FOO to installed program names [""]'
    498         echo ' --program-suffix=FOO      append FOO to installed program names [""]'
    499         echo ' --program-transform-name=P transform installed names by sed pattern P [""]'
    500         echo ' --site=SITE               configure with site-specific makefile for SITE'
    501         echo ' --srcdir=DIR              find the sources in DIR [. or ..]'
    502         echo ' --target=TARGET   configure for TARGET [TARGET=HOST]'
    503         echo ' --tmpdir=TMPDIR   create temporary files in TMPDIR [/tmp]'
    504         echo ' --nfp                     configure for software floating point [hard float]'
    505         echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
    506         echo ' --without-FOO             package FOO is NOT available'
    507         echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
    508         echo ' --disable-FOO             do not include feature FOO'
    509         echo
    510         echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
    511         echo
    512         if [ -r config.status ] ; then
    513                 cat config.status
    514         fi
    515 
    516         exit 1
    517 fi
    518 
    519 configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
    520 moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
    521 ## the sed command below emulates the dirname command
    522 topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd`
    523 
    524 
    525 # this is a hack.  sun4 must always be a valid host alias or this will fail.
    526 if ${config_shell} ${configsub} sun4 >/dev/null 2>&1 ; then
    527         true
    528 else
    529         echo '***' cannot find config.sub.  1>&2
    530         exit 1
    531 fi
    532 
    533 touch config.junk
    534 if ${config_shell} ${moveifchange} config.junk config.trash ; then
    535         true
    536 else
    537         echo '***' cannot find move-if-change.  1>&2
    538         exit 1
    539 fi
    540 rm -f config.junk config.trash
    541 
    542 case "${srcdir}" in
    543 "")
    544         if [ -r configure.in ] ; then
    545                 srcdir=.
    546         else
    547                 if [ -r ${progname}.in ] ; then
    548                         srcdir=`echo ${progname} | sed 's:/configure$::'`
    549                 else
    550                         echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
    551                         exit 1
    552                 fi
    553         fi
    554         ;;
    555 *)
    556         # Set srcdir to "." if that's what it is.
    557         # This is important for multilib support.
    558         if [ ! -d ${srcdir} ] ; then
    559                 echo "Invalid source directory ${srcdir}" >&2
    560                 exit 1
    561         fi
    562         pwd=`pwd`
    563         srcpwd=`cd ${srcdir} ; pwd`
    564         if [ "${pwd}" = "${srcpwd}" ] ; then
    565                 srcdir=.
    566         fi
    567 esac
    568 
    569 ### warn about some conflicting configurations.
    570 
    571 case "${srcdir}" in
    572 ".") ;;
    573 *)
    574         if [ -f ${srcdir}/config.status ] ; then
    575                 echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2
    576                 exit 1
    577         fi
    578 esac
    579 
    580 # default exec_prefix
    581 case "${exec_prefixoption}" in
    582 "") exec_prefix="\$(prefix)" ;;
    583 *) ;;
    584 esac
    585 
     724if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
     725
     726# Export original configure arguments for use by sub-configures.
     727TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
     728
     729
     730moveifchange=${srcdir}/move-if-change
     731
     732# Set srcdir to "." if that's what it is.
     733# This is important for multilib support.
     734pwd=`${PWDCMD-pwd}`
     735srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
     736if test "${pwd}" = "${srcpwd}" ; then
     737  srcdir=.
     738fi
     739
     740topsrcdir=$srcpwd
     741
     742extra_host_args=
    586743# Define the trigger file to make sure configure will re-run whenever
    587744# the gcc version number changes.
    588 if [ "${with_gcc_version_trigger+set}" = set ]; then
    589     gcc_version_trigger="$with_gcc_version_trigger"
    590     gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
    591 else
    592     # If gcc's sources are available, define the trigger file.
    593     if [ -f ${topsrcdir}/gcc/version.c ] ; then
    594         gcc_version_trigger=${topsrcdir}/gcc/version.c
    595         gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
    596         case "$arguments" in
    597           *--with-gcc-version-trigger=$gcc_version_trigger* )
    598             ;;
    599           * )
    600             # Make sure configure.in knows about this.
    601             arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
     745if test "${with_gcc_version_trigger+set}" = set ; then
     746  gcc_version_trigger="$with_gcc_version_trigger"
     747  gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
     748else
     749  # If gcc's sources are available, define the trigger file.
     750  if test -f ${topsrcdir}/gcc/version.c ; then
     751    gcc_version_trigger=${topsrcdir}/gcc/version.c
     752    gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
     753    case "$ac_configure_args" in
     754      *--with-gcc-version-trigger=$gcc_version_trigger* )
     755        ;;
     756      * )
     757        # Add to all subconfigure arguments: build, host, and target.
     758        ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
     759        ;;
     760    esac
     761  fi
     762fi
     763
     764### To add a new directory to the tree, first choose whether it is a target
     765### or a host dependent tool.  Then put it into the appropriate list
     766### (library or tools, host or target), doing a dependency sort.
     767
     768# Subdirs will be configured in the order listed in build_configdirs,
     769# configdirs, or target_configdirs; see the serialization section below.
     770
     771# Dependency sorting is only needed when *configuration* must be done in
     772# a particular order.  In all cases a dependency should be specified in
     773# the Makefile, whether or not it's implicitly specified here.
     774
     775# Double entries in build_configdirs, configdirs, or target_configdirs may
     776# cause circular dependencies and break everything horribly.
     777
     778# these libraries are used by various programs built for the host environment
     779#
     780host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
     781
     782# these tools are built for the host environment
     783# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
     784# know that we are building the simulator.
     785# binutils, gas and ld appear in that order because it makes sense to run
     786# "make check" in that particular order.
     787host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
     788
     789# libgcj represents the runtime libraries only used by gcj.
     790libgcj="target-libffi \
     791        target-boehm-gc \
     792        target-zlib \
     793        target-qthreads \
     794        target-libjava"
     795
     796# these libraries are built for the target environment, and are built after
     797# the host libraries and the host tools (which may be a cross compiler)
     798#
     799target_libs="target-libiberty \
     800                target-libgloss \
     801                target-newlib \
     802                target-libstdc++-v3 \
     803                target-libf2c \
     804                ${libgcj} \
     805                target-libobjc"
     806
     807# these tools are built using the target libs, and are intended to run only
     808# in the target environment
     809#
     810# note: any program that *uses* libraries that are in the "target_libs"
     811# list belongs in this list.  those programs are also very likely
     812# candidates for the "native_only" list which follows
     813#
     814target_tools="target-examples target-groff target-gperf target-rda"
     815
     816################################################################################
     817
     818## All tools belong in one of the four categories, and are assigned above
     819## We assign ${configdirs} this way to remove all embedded newlines.  This
     820## is important because configure will choke if they ever get through.
     821## ${configdirs} is directories we build using the host tools.
     822## ${target_configdirs} is directories we build using the target tools.
     823#
     824configdirs=`echo ${host_libs} ${host_tools}`
     825target_configdirs=`echo ${target_libs} ${target_tools}`
     826
     827################################################################################
     828
     829srcname="gnu development package"
     830
     831# This gets set non-empty for some net releases of packages.
     832appdirs=""
     833
     834# Define is_cross_compiler to save on calls to 'test'.
     835is_cross_compiler=
     836if test x"${host}" = x"${target}" ; then
     837  is_cross_compiler=no
     838else
     839  is_cross_compiler=yes
     840fi     
     841
     842# We always want to use the same name for this directory, so that dejagnu
     843# can reliably find it.
     844target_subdir=${target_alias}
     845
     846if test ! -d ${target_subdir} ; then
     847  if mkdir ${target_subdir} ; then true
     848  else
     849    echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
     850    exit 1
     851  fi
     852fi
     853
     854build_prefix=build-
     855build_subdir=${build_prefix}${build_alias}
     856
     857if test x"${build_alias}" != x"${host}" ; then
     858  if test ! -d ${build_subdir} ; then
     859    if mkdir ${build_subdir} ; then true
     860    else
     861      echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
     862      exit 1
     863    fi
     864  fi
     865fi
     866
     867# Skipdirs are removed silently.
     868skipdirs=
     869# Noconfigdirs are removed loudly.
     870noconfigdirs=""
     871
     872use_gnu_ld=
     873# Make sure we don't let GNU ld be added if we didn't want it.
     874if test x$with_gnu_ld = xno ; then
     875  use_gnu_ld=no
     876  noconfigdirs="$noconfigdirs ld"
     877fi
     878
     879use_gnu_as=
     880# Make sure we don't let GNU as be added if we didn't want it.
     881if test x$with_gnu_as = xno ; then
     882  use_gnu_as=no
     883  noconfigdirs="$noconfigdirs gas"
     884fi
     885
     886# some tools are so dependent upon X11 that if we're not building with X,
     887# it's not even worth trying to configure, much less build, that tool.
     888
     889case ${with_x} in
     890  yes | "") ;; # the default value for this tree is that X11 is available
     891  no)
     892    skipdirs="${skipdirs} tk tix itcl libgui"
     893    # We won't be able to build gdbtk without X.
     894    enable_gdbtk=no
     895    ;;
     896  *)  echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
     897esac
     898
     899# Some tools are only suitable for building in a "native" situation.
     900# Remove these if host!=target. 
     901native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
     902
     903# Similarly, some are only suitable for cross toolchains.
     904# Remove these if host=target.
     905cross_only="target-libgloss target-newlib target-opcodes"
     906
     907case $is_cross_compiler in
     908  no) skipdirs="${skipdirs} ${cross_only}" ;;
     909  yes) skipdirs="${skipdirs} ${native_only}" ;;
     910esac
     911
     912# If both --with-headers and --with-libs are specified, default to
     913# --without-newlib.
     914if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
     915  if test x"${with_newlib}" = x ; then
     916    with_newlib=no
     917  fi
     918fi
     919
     920# Recognize --with-newlib/--without-newlib.
     921case ${with_newlib} in
     922  no) skipdirs="${skipdirs} target-newlib" ;;
     923  yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
     924esac
     925
     926# Configure extra directories which are host specific
     927
     928case "${host}" in
     929  *-cygwin*)
     930    configdirs="$configdirs libtermcap" ;;
     931esac
     932
     933# Remove more programs from consideration, based on the host or
     934# target this usually means that a port of the program doesn't
     935# exist yet.
     936
     937case "${host}" in
     938  hppa*64*-*-*)
     939    noconfigdirs="$noconfigdirs byacc"
     940    ;;
     941  i[3456]86-*-vsta)
     942    noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
     943    ;;
     944  i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
     945    noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
     946    ;;
     947  i[3456]86-*-mingw32*)
     948    # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
     949    noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
     950    ;;
     951  i[3456]86-*-beos*)
     952    noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
     953    ;;
     954  *-*-cygwin*)
     955    noconfigdirs="autoconf automake send-pr rcs guile perl"
     956    ;;
     957  *-*-netbsd*)
     958    noconfigdirs="rcs"
     959    ;;
     960  ppc*-*-pe)
     961    noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
     962    ;;
     963  powerpc-*-beos*)
     964    noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
     965    ;;
     966  *-*-darwin*)
     967    noconfigdirs="$noconfigdirs tk itcl tix libgui"
     968    ;;
     969esac
     970
     971# Save it here so that, even in case of --enable-libgcj, if the Java
     972# front-end isn't enabled, we still get libgcj disabled.
     973libgcj_saved=$libgcj
     974case $enable_libgcj in
     975yes)
     976  # If we reset it here, it won't get added to noconfigdirs in the
     977  # target-specific build rules, so it will be forcibly enabled
     978  # (unless the Java language itself isn't enabled).
     979  libgcj=
     980  ;;
     981no)
     982  # Make sure we get it printed in the list of not supported target libs.
     983  noconfigdirs="$noconfigdirs ${libgcj}"
     984  ;;
     985esac
     986
     987case "${target}" in
     988  *-*-chorusos)
     989    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     990    ;;
     991  *-*-darwin*)
     992    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
     993    noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
     994    ;;
     995  *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
     996    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     997    ;;
     998  *-*-kaos*)
     999    # Remove unsupported stuff on all kaOS configurations.
     1000    skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
     1001    skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
     1002    skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
     1003    noconfigdirs="$noconfigdirs target-libgloss"
     1004    ;;
     1005  *-*-netbsd*)
     1006    # Skip some stuff on all NetBSD configurations.
     1007    noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
     1008
     1009    # Skip some stuff that's unsupported on some NetBSD configurations.
     1010    case "${target}" in
     1011      i*86-*-netbsdelf*) ;;
     1012      arm*-*-netbsdelf*) ;;
     1013      *)
     1014        noconfigdirs="$noconfigdirs ${libgcj}"
     1015        ;;
     1016    esac
     1017    ;;
     1018  *-*-netware)
     1019    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
     1020    ;;
     1021  *-*-rtems*)
     1022    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1023    case ${target} in
     1024        h8300*-*-* | h8500-*-*)
     1025          noconfigdirs="$noconfigdirs target-libf2c"
     1026          ;;
     1027        *) ;;
     1028    esac
     1029    ;;
     1030  *-*-vxworks*)
     1031    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     1032    ;;
     1033  alpha*-dec-osf*)
     1034    # ld works, but does not support shared libraries.
     1035    # newlib is not 64 bit ready.  I'm not sure about fileutils.
     1036    # gas doesn't generate exception information.
     1037    noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
     1038    ;;
     1039  alpha*-*-*vms*)
     1040    noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
     1041    ;;
     1042  alpha*-*-linux*)
     1043    # newlib is not 64 bit ready
     1044    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     1045    ;;
     1046  alpha*-*-freebsd*)
     1047    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     1048    ;;
     1049  alpha*-*-*)
     1050    # newlib is not 64 bit ready
     1051    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     1052    ;;
     1053  sh-*-linux*)
     1054    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
     1055    ;;   
     1056  sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     1057    noconfigdirs="$noconfigdirs ${libgcj}"
     1058    noconfigdirs="$noconfigdirs target-examples"
     1059    noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
     1060    noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
     1061    noconfigdirs="$noconfigdirs expect dejagnu"
     1062    # the C++ libraries don't build on top of CE's C libraries
     1063    noconfigdirs="$noconfigdirs target-libstdc++-v3"
     1064    noconfigdirs="$noconfigdirs target-newlib"
     1065    case "${host}" in
     1066      *-*-cygwin*) ;; # keep gdb and readline
     1067      *) noconfigdirs="$noconfigdirs gdb readline"
     1068         ;;
     1069    esac
     1070    ;;
     1071  arc-*-*)
     1072    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1073    ;;
     1074  arm-*-coff | strongarm-*-coff | xscale-*-coff)
     1075    noconfigdirs="$noconfigdirs ${libgcj}"
     1076    ;;
     1077  arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
     1078    noconfigdirs="$noconfigdirs target-libffi target-qthreads"
     1079    ;;
     1080  arm-*-pe*)
     1081    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1082    ;;
     1083  arm-*-oabi*)
     1084    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1085    ;;
     1086  thumb-*-coff)
     1087    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1088    ;;
     1089  thumb-*-elf)
     1090    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1091    ;;
     1092  thumb-*-oabi)
     1093    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1094    ;;
     1095  thumb-*-pe)
     1096    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1097    ;;
     1098  arm-*-riscix*)
     1099    noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
     1100    ;;
     1101  avr-*-*)
     1102    noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
     1103    ;;
     1104  c4x-*-* | tic4x-*-*)
     1105    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
     1106    ;;
     1107  c54x*-*-* | tic54x-*-*)
     1108    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
     1109    ;;
     1110  cris-*-*)
     1111    noconfigdirs="$noconfigdirs ${libgcj}"
     1112    ;;
     1113  d10v-*-*)
     1114    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
     1115    ;;
     1116  d30v-*-*)
     1117    noconfigdirs="$noconfigdirs ${libgcj}"
     1118    ;;
     1119  fr30-*-elf*)
     1120    noconfigdirs="$noconfigdirs ${libgcj}"
     1121    ;;
     1122  frv-*-*)
     1123    noconfigdirs="$noconfigdirs ${libgcj}"
     1124    ;;
     1125  h8300*-*-*)
     1126    noconfigdirs="$noconfigdirs target-libgloss"
     1127    ;;
     1128  h8500-*-*)
     1129    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
     1130    ;;
     1131  hppa*64*-*-linux* | parisc*64*-*-linux*)
     1132    # In this case, it's because the hppa64-linux target is for
     1133    # the kernel only at this point and has no libc, and thus no
     1134    # headers, crt*.o, etc., all of which are needed by these.
     1135    noconfigdirs="$noconfigdirs target-zlib"
     1136    ;;
     1137  hppa*-*-*elf* | \
     1138  parisc*-*-linux* | hppa*-*-linux* | \
     1139  hppa*-*-lites* | \
     1140  hppa*-*-openbsd* | \
     1141  hppa*64*-*-*)
     1142    noconfigdirs="$noconfigdirs ${libgcj}"
     1143    # Do configure ld/binutils/gas for this case.
     1144    ;;
     1145  hppa*-*-*)
     1146    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
     1147    # build on HP-UX 10.20.
     1148    noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
     1149    ;;
     1150  ia64*-*-elf*)
     1151    # No gdb support yet.
     1152    noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
     1153    ;;
     1154  ia64*-**-hpux*)
     1155    # No gdb or ld support yet.
     1156    noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
     1157    ;;
     1158  i[3456]86-*-coff | i[3456]86-*-elf)
     1159    noconfigdirs="$noconfigdirs ${libgcj}"
     1160    ;;
     1161  i[34567]86-*-freebsd*)
     1162    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     1163    ;;
     1164  i[3456]86-*-linux*)
     1165    # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
     1166    # not build java stuff by default.
     1167    case "${target}" in
     1168      *-*-*libc1*)
     1169        noconfigdirs="$noconfigdirs ${libgcj}";;
     1170    esac
     1171
     1172    # This section makes it possible to build newlib natively on linux.
     1173    # If we are using a cross compiler then don't configure newlib.
     1174    if test x${is_cross_compiler} != xno ; then
     1175      noconfigdirs="$noconfigdirs target-newlib"
     1176    fi
     1177    noconfigdirs="$noconfigdirs target-libgloss"
     1178    # If we are not using a cross compiler, do configure newlib.
     1179    # Note however, that newlib will only be configured in this situation
     1180    # if the --with-newlib option has been given, because otherwise
     1181    # 'target-newlib' will appear in skipdirs.
     1182    ;;
     1183  i[3456]86-*-mingw32*)
     1184    target_configdirs="$target_configdirs target-mingw"
     1185    noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
     1186
     1187    # Can't build gdb for mingw32 if not native.
     1188    case "${host}" in
     1189      i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
     1190      *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
     1191         ;;
     1192    esac
     1193    ;;   
     1194  *-*-cygwin*)
     1195    target_configdirs="$target_configdirs target-libtermcap target-winsup"
     1196    noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
     1197    # always build newlib.
     1198    skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
     1199
     1200    # Can't build gdb for Cygwin if not native.
     1201    case "${host}" in
     1202      *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
     1203      *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
     1204         ;;
     1205    esac
     1206    ;;   
     1207  i[3456]86-*-pe)
     1208    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
     1209    ;;
     1210  i[3456]86-*-sco3.2v5*)
     1211    # The linker does not yet know about weak symbols in COFF,
     1212    # and is not configured to handle mixed ELF and COFF.
     1213    noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
     1214    ;;
     1215  i[3456]86-*-sco*)
     1216    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
     1217    ;;
     1218  i[3456]86-*-solaris2*)
     1219    noconfigdirs="$noconfigdirs target-libgloss"
     1220    ;;
     1221  i[3456]86-*-sysv4*)
     1222    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1223    ;;
     1224  i[3456]86-*-beos*)
     1225    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
     1226    ;;
     1227  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
     1228    noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
     1229    ;;
     1230  m68k-*-elf*)
     1231    noconfigdirs="$noconfigdirs ${libgcj}"
     1232    ;;
     1233  m68k-*-coff*)
     1234    noconfigdirs="$noconfigdirs ${libgcj}"
     1235    ;;
     1236  mcore-*-pe*)
     1237  # The EPOC C++ environment does not support exceptions or rtti,
     1238  # and so building libstdc++-v3 tends not to always work.
     1239    noconfigdirs="$noconfigdirs target-libstdc++-v3"
     1240    ;;
     1241  mmix-*-*)
     1242    noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
     1243    ;;
     1244  mn10200-*-*)
     1245    noconfigdirs="$noconfigdirs ${libgcj}"
     1246    ;;
     1247  mn10300-*-*)
     1248    noconfigdirs="$noconfigdirs ${libgcj}"
     1249    ;;
     1250  powerpc-*-aix*)
     1251    # copied from rs6000-*-* entry
     1252    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
     1253    ;;
     1254  powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
     1255    target_configdirs="$target_configdirs target-winsup"
     1256    noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
     1257    # always build newlib.
     1258    skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
     1259    ;;
     1260    # This is temporary until we can link against shared libraries
     1261  powerpcle-*-solaris*)
     1262    noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
     1263    ;;
     1264  powerpc-*-beos*)
     1265    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
     1266    ;;
     1267  powerpc-*-eabi)
     1268    noconfigdirs="$noconfigdirs ${libgcj}"
     1269    ;;
     1270  rs6000-*-lynxos*)
     1271    noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
     1272    ;;
     1273  rs6000-*-aix*)
     1274    noconfigdirs="$noconfigdirs gprof ${libgcj}"
     1275    ;;
     1276  rs6000-*-*)
     1277    noconfigdirs="$noconfigdirs gprof ${libgcj}"
     1278    ;;
     1279  m68k-apollo-*)
     1280    noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
     1281    ;;
     1282  mips*-*-irix5*)
     1283    # The GNU linker does not support shared libraries.
     1284    noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
     1285    ;;
     1286  mips*-*-irix6*)
     1287    # Linking libjava exceeds command-line length limits on at least
     1288    # IRIX 6.2, but not on IRIX 6.5.
     1289    # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
     1290    # <oldham@codesourcery.com>
     1291    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
     1292    ;;
     1293  mips*-dec-bsd*)
     1294    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
     1295    ;;
     1296  mips*-*-bsd*)
     1297    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
     1298    ;;
     1299  mipstx39-*-*)
     1300    noconfigdirs="$noconfigdirs gprof ${libgcj}"   # same as generic mips
     1301    ;;
     1302  mips*-*-linux*)
     1303    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     1304    ;;
     1305  mips*-*-*)
     1306    noconfigdirs="$noconfigdirs gprof ${libgcj}"
     1307    ;;
     1308  romp-*-*)
     1309    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
     1310    ;;
     1311  sh-*-*)
     1312    case "${host}" in
     1313      i[3456]86-*-vsta) ;; # don't add gprof back in
     1314      i[3456]86-*-go32*) ;; # don't add gprof back in
     1315      i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
     1316      *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
     1317    esac
     1318    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1319    ;;
     1320  sh64-*-*)
     1321    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1322    ;;
     1323  sparc-*-elf*)
     1324    noconfigdirs="$noconfigdirs ${libgcj}"
     1325    ;;
     1326  sparc64-*-elf*)
     1327    noconfigdirs="$noconfigdirs ${libgcj}"
     1328    ;;
     1329  sparclite-*-*)
     1330    noconfigdirs="$noconfigdirs ${libgcj}"
     1331    ;;
     1332  sparc-*-sunos4*)
     1333    noconfigdirs="$noconfigdirs ${libgcj}"
     1334    if test x${is_cross_compiler} != xno ; then
     1335           noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
     1336    else
     1337           use_gnu_ld=no
     1338    fi
     1339    ;;
     1340  sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
     1341    ;;
     1342  v810-*-*)
     1343    noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
     1344    ;;
     1345  v850-*-*)
     1346    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1347    ;;
     1348  v850e-*-*)
     1349    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1350    ;;
     1351  v850ea-*-*)
     1352    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     1353    ;;
     1354  vax-*-vms)
     1355    noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
     1356    ;;
     1357  vax-*-*)
     1358    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     1359    ;;
     1360  ip2k-*-*)
     1361    noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
     1362    ;;
     1363  *-*-linux*)
     1364    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     1365    ;;
     1366  *-*-lynxos*)
     1367    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     1368    ;;
     1369  *-*-*)
     1370    noconfigdirs="$noconfigdirs ${libgcj}"
     1371    ;;
     1372esac
     1373
     1374# If we aren't building newlib, then don't build libgloss, since libgloss
     1375# depends upon some newlib header files.
     1376case "${noconfigdirs}" in
     1377  *target-libgloss*) ;;
     1378  *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
     1379esac
     1380
     1381# Figure out what language subdirectories are present.
     1382# Look if the user specified --enable-languages="..."; if not, use
     1383# the environment variable $LANGUAGES if defined. $LANGUAGES might
     1384# go away some day.
     1385# NB:  embedded tabs in this IF block -- do not untabify
     1386if test x"${enable_languages+set}" != xset; then
     1387  if test x"${LANGUAGES+set}" = xset; then
     1388    enable_languages="${LANGUAGES}"
     1389      echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
     1390  else
     1391    enable_languages=all
     1392  fi
     1393else
     1394  if test x"${enable_languages}" = x ||
     1395     test x"${enable_languages}" = xyes;
     1396     then
     1397    echo configure.in: --enable-languages needs at least one language argument 1>&2
     1398    exit 1
     1399  fi
     1400fi
     1401enable_languages=`echo "${enable_languages}" | sed -e 's/[      ,][     ,]*/,/g' -e 's/,$//'`
     1402
     1403# First scan to see if an enabled language requires some other language.
     1404# We assume that a given config-lang.in will list all the language
     1405# front ends it requires, even if some are required indirectly.
     1406for lang in ${srcdir}/gcc/*/config-lang.in ..
     1407do
     1408  case $lang in
     1409    ..) ;;
     1410    # The odd quoting in the next line works around
     1411    # an apparent bug in bash 1.12 on linux.
     1412    ${srcdir}/gcc/[*]/config-lang.in) ;;
     1413    *)
     1414      lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^       ]*\).*$,\1,p' $lang`
     1415      this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^     ]*\).*$,\1,p' $lang`
     1416      for other in $this_lang_requires
     1417      do
     1418        case ,${enable_languages}, in
     1419          *,$other,*) ;;
     1420          *,all,*) ;;
     1421          *,$lang_alias,*)
     1422            echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
     1423            enable_languages="$enable_languages,$other"
    6021424            ;;
    6031425        esac
    604         withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
    605     fi
    606 fi
    607 
    608 ### break up ${srcdir}/configure.in.
    609 case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
    610 "")
    611         echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
    612         # Check for a directory that's been converted to use autoconf since
    613         # it was last configured.
    614         if grep AC_OUTPUT ${srcdir}/configure.in >/dev/null ; then
    615           echo '***' Hmm, looks like this directory has been autoconfiscated. 1>&2
    616           if [ -r ${srcdir}/configure ] ; then
    617             echo '***' Running the local configure script. 1>&2
    618             case "${cache_file}" in
    619             "") cache_file_option= ;;
    620             *)  cache_file_option="--cache-file=${cache_file}" ;;
    621             esac
    622             srcdiroption="--srcdir=${srcdir}"
    623             case "${build_alias}" in
    624             "") buildopt= ;;
    625             *)  buildopt="--build=${build_alias}" ;;
    626             esac
    627             eval exec ${config_shell} ${srcdir}/configure ${verbose} \
    628                 ${buildopt} --host=${host_alias} --target=${target_alias} \
    629                 ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
    630                 ${srcdiroption} ${diroptions} \
    631                 ${program_prefixoption} ${program_suffixoption} \
    632                 ${program_transform_nameoption} ${site_option} \
    633                 ${withoptions} ${withoutoptions} \
    634                 ${enableoptions} ${disableoptions} ${floating_pointoption} \
    635                 ${cache_file_option} ${removing} ${other_options} ${redirect}
    636           else
    637             echo '***' There is no configure script present though. 1>&2
    638           fi
     1426      done
     1427      ;;
     1428  esac
     1429done
     1430
     1431subdirs=
     1432for lang in ${srcdir}/gcc/*/config-lang.in ..
     1433do
     1434  case $lang in
     1435    ..) ;;
     1436    # The odd quoting in the next line works around
     1437    # an apparent bug in bash 1.12 on linux.
     1438    ${srcdir}/gcc/[*]/config-lang.in) ;;
     1439    *)
     1440      lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^       ]*\).*$,\1,p' $lang`
     1441      this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^     ]*\).*$,\1,p' $lang`
     1442      this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^         ]*\).*$,\1,p' $lang`
     1443      build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^         ]*\).*$,\1,p' $lang`
     1444      if test "x$lang_alias" = x
     1445         then
     1446        echo "$lang doesn't set \$language." 1>&2
     1447        exit 1
     1448      fi
     1449      case ${build_by_default},${enable_languages}, in
     1450        *,$lang_alias,*) add_this_lang=yes ;;
     1451        no,*) add_this_lang=no ;;
     1452        *,all,*) add_this_lang=yes ;;
     1453        *) add_this_lang=no ;;
     1454      esac
     1455      if test x"${add_this_lang}" = xyes; then
     1456        eval target_libs='"$target_libs "'\"$this_lang_libs\"
     1457      else
     1458        eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
     1459      fi
     1460      ;;
     1461  esac
     1462done
     1463
     1464# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
     1465# $target_configdirs.
     1466# If we have the source for $noconfigdirs entries, add them to $notsupp.
     1467
     1468notsupp=""
     1469for dir in . $skipdirs $noconfigdirs ; do
     1470  dirname=`echo $dir | sed -e s/target-//g`
     1471  if test $dir != .  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     1472    configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
     1473    if test -r $srcdir/$dirname/configure ; then
     1474      if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     1475        true
     1476      else
     1477        notsupp="$notsupp $dir"
     1478      fi
     1479    fi
     1480  fi
     1481  if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     1482    target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
     1483    if test -r $srcdir/$dirname/configure ; then
     1484      if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     1485        true
     1486      else
     1487        notsupp="$notsupp $dir"
     1488      fi
     1489    fi
     1490  fi
     1491done
     1492
     1493# Sometimes the tools are distributed with libiberty but with no other
     1494# libraries.  In that case, we don't want to build target-libiberty.
     1495if test -n "${target_configdirs}" ; then
     1496  others=
     1497  for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
     1498    if test "$i" != "libiberty" ; then
     1499      if test -r $srcdir/$i/configure ; then
     1500        others=yes;
     1501        break;
     1502      fi
     1503    fi
     1504  done
     1505  if test -z "${others}" ; then
     1506    target_configdirs=
     1507  fi
     1508fi
     1509
     1510# Quietly strip out all directories which aren't configurable in this tree.
     1511# This relies on all configurable subdirectories being autoconfiscated, which
     1512# is now the case.
     1513configdirs_all="$configdirs"
     1514configdirs=
     1515for i in ${configdirs_all} ; do
     1516  if test -f ${srcdir}/$i/configure ; then
     1517    configdirs="${configdirs} $i"
     1518  fi
     1519done
     1520target_configdirs_all="$target_configdirs"
     1521target_configdirs=
     1522for i in ${target_configdirs_all} ; do
     1523  j=`echo $i | sed -e s/target-//g`
     1524  if test -f ${srcdir}/$j/configure ; then
     1525    target_configdirs="${target_configdirs} $i"
     1526  fi
     1527done
     1528
     1529# Produce a warning message for the subdirs we can't configure.
     1530# This isn't especially interesting in the Cygnus tree, but in the individual
     1531# FSF releases, it's important to let people know when their machine isn't
     1532# supported by the one or two programs in a package.
     1533
     1534if test -n "${notsupp}" && test -z "${norecursion}" ; then
     1535  # If $appdirs is non-empty, at least one of those directories must still
     1536  # be configured, or we error out.  (E.g., if the gas release supports a
     1537  # specified target in some subdirs but not the gas subdir, we shouldn't
     1538  # pretend that all is well.)
     1539  if test -n "$appdirs" ; then
     1540    for dir in $appdirs ; do
     1541      if test -r $dir/Makefile.in ; then
     1542        if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     1543          appdirs=""
     1544          break
    6391545        fi
    640         exit 1
    641         ;;
    642 *) ;;
     1546        if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     1547          appdirs=""
     1548          break
     1549        fi
     1550      fi
     1551    done
     1552    if test -n "$appdirs" ; then
     1553      echo "*** This configuration is not supported by this package." 1>&2
     1554      exit 1
     1555    fi
     1556  fi
     1557  # Okay, some application will build, or we don't care to check.  Still
     1558  # notify of subdirs not getting built.
     1559  echo "*** This configuration is not supported in the following subdirectories:" 1>&2
     1560  echo "    ${notsupp}" 1>&2
     1561  echo "    (Any other directories should still work fine.)" 1>&2
     1562fi
     1563
     1564case "$host" in
     1565  *msdosdjgpp*)
     1566    enable_gdbtk=no ;;
    6431567esac
    6441568
    645 case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
    646 "")
    647         echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
    648         exit 1
    649         ;;
    650 *) ;;
     1569copy_dirs=
     1570
     1571# Handle --with-headers=XXX.  If the value is not "yes", the contents of
     1572# the named directory are copied to $(tooldir)/sys-include.
     1573if test x"${with_headers}" != x ; then
     1574  if test x${is_cross_compiler} = xno ; then
     1575    echo 1>&2 '***' --with-headers is only supported when cross compiling
     1576    exit 1
     1577  fi
     1578  if test x"${with_headers}" != xyes ; then
     1579    case "${exec_prefixoption}" in
     1580    "") x=${prefix} ;;
     1581    *) x=${exec_prefix} ;;
     1582    esac
     1583    copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
     1584  fi
     1585fi
     1586
     1587# Handle --with-libs=XXX.  If the value is not "yes", the contents of
     1588# the name directories are copied to $(tooldir)/lib.  Multiple directories
     1589# are permitted.
     1590if test x"${with_libs}" != x ; then
     1591  if test x${is_cross_compiler} = xno ; then
     1592    echo 1>&2 '***' --with-libs is only supported when cross compiling
     1593    exit 1
     1594  fi
     1595  if test x"${with_libs}" != xyes ; then
     1596    # Copy the libraries in reverse order, so that files in the first named
     1597    # library override files in subsequent libraries.
     1598    case "${exec_prefixoption}" in
     1599    "") x=${prefix} ;;
     1600    *) x=${exec_prefix} ;;
     1601    esac
     1602    for l in ${with_libs}; do
     1603      copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
     1604    done
     1605  fi
     1606fi
     1607
     1608# Handle ${copy_dirs}
     1609set fnord ${copy_dirs}
     1610shift
     1611while test $# != 0 ; do
     1612  if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
     1613    :
     1614  else
     1615    echo Copying $1 to $2
     1616
     1617    # Use the install script to create the directory and all required
     1618    # parent directories.
     1619    if test -d $2 ; then
     1620      :
     1621    else
     1622      echo >config.temp
     1623      ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
     1624    fi
     1625
     1626    # Copy the directory, assuming we have tar.
     1627    # FIXME: Should we use B in the second tar?  Not all systems support it.
     1628    (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
     1629
     1630    # It is the responsibility of the user to correctly adjust all
     1631    # symlinks.  If somebody can figure out how to handle them correctly
     1632    # here, feel free to add the code.
     1633
     1634    echo $1 > $2/COPIED
     1635  fi
     1636  shift; shift
     1637done
     1638
     1639# Work in distributions that contain no compiler tools, like Autoconf.
     1640tentative_cc=""
     1641host_makefile_frag=/dev/null
     1642if test -d ${srcdir}/config ; then
     1643case "${host}" in
     1644  m68k-hp-hpux*)
     1645    # Avoid "too much defining" errors from HPUX compiler.
     1646    tentative_cc="cc -Wp,-H256000"
     1647    # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
     1648    # If it's HP/UX ar, this should be harmless.
     1649    RANLIB="ar ts"
     1650    ;;
     1651  m68k-apollo-sysv*)
     1652    tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
     1653    ;;
     1654  m68k-apollo-bsd*)
     1655    #None of the Apollo compilers can compile gas or binutils.  The preprocessor
     1656    # chokes on bfd, the compiler won't let you assign integers to enums, and
     1657    # other problems.  Defining CC to gcc is a questionable way to say "don't use
     1658    # the apollo compiler" (the preferred version of GCC could be called cc,
     1659    # or whatever), but I'm not sure leaving CC as cc is any better...
     1660    #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
     1661    # Used to have BISON=yacc.
     1662    tentative_cc=gcc
     1663    ;;
     1664  m88k-dg-dgux*)
     1665    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
     1666    ;;
     1667  m88k-harris-cxux*)
     1668    # Under CX/UX, we want to tell the compiler to use ANSI mode.
     1669    tentative_cc="cc -Xa"
     1670    host_makefile_frag="config/mh-cxux"
     1671    ;;
     1672  m88k-motorola-sysv*)
     1673    ;;
     1674  mips*-dec-ultrix*)
     1675    tentative_cc="cc -Wf,-XNg1000"
     1676    host_makefile_frag="config/mh-decstation"
     1677    ;;
     1678  mips*-nec-sysv4*)
     1679    # The C compiler on NEC MIPS SVR4 needs bigger tables.
     1680    tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
     1681    host_makefile_frag="config/mh-necv4"
     1682    ;;
     1683  mips*-sgi-irix4*)
     1684    # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
     1685    # environment.  Also bump switch table size so that cp-parse will
     1686    # compile.  Bump string length limit so linker builds.
     1687    tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
     1688    ;;
     1689  mips*-*-sysv4*)
     1690    host_makefile_frag="config/mh-sysv4"
     1691    ;;
     1692  mips*-*-sysv*)
     1693    # This is for a MIPS running RISC/os 4.52C.
     1694
     1695    # This is needed for GDB, but needs to be in the top-level make because
     1696    # if a library is compiled with the bsd headers and gets linked with the
     1697    # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
     1698    # a different size).
     1699    # ptrace(2) apparently has problems in the BSD environment.  No workaround is
     1700    # known except to select the sysv environment.  Could we use /proc instead?
     1701    # These "sysv environments" and "bsd environments" often end up being a pain.
     1702    #
     1703    # This is not part of CFLAGS because perhaps not all C compilers have this
     1704    # option.
     1705    tentative_cc="cc -systype sysv"
     1706    ;;
     1707  i370-ibm-opened*)
     1708    tentative_cc="c89"
     1709    ;;
     1710  i[3456]86-*-sysv5*)
     1711    host_makefile_frag="config/mh-sysv5"
     1712    ;;
     1713  i[3456]86-*-dgux*)
     1714    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
     1715    host_makefile_frag="config/mh-dgux386"
     1716    ;;
     1717  i[3456]86-ncr-sysv4.3*)
     1718    # The MetaWare compiler will generate a copyright message unless you
     1719    # turn it off by adding the -Hnocopyr flag.
     1720    tentative_cc="cc -Hnocopyr"
     1721    ;;
     1722  i[3456]86-ncr-sysv4*)
     1723    # for an NCR 3000 (i486/SVR4) system.
     1724    # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
     1725    # This compiler not only emits obnoxious copyright messages every time
     1726    # you run it, but it chokes and dies on a whole bunch of GNU source
     1727    # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
     1728    tentative_cc="/usr/ccs/ATT/cc"
     1729    host_makefile_frag="config/mh-ncr3000"
     1730    ;;
     1731  i[3456]86-*-sco3.2v5*)
     1732    ;;
     1733  i[3456]86-*-sco*)
     1734    # The native C compiler botches some simple uses of const.  Unfortunately,
     1735    # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
     1736    tentative_cc="cc -Dconst="
     1737    host_makefile_frag="config/mh-sco"
     1738    ;;
     1739  i[3456]86-*-udk*)
     1740    host_makefile_frag="config/mh-sysv5"
     1741    ;;
     1742  i[3456]86-*-solaris2*)
     1743    host_makefile_frag="config/mh-sysv4"
     1744    ;;
     1745  i[3456]86-*-msdosdjgpp*)
     1746    host_makefile_frag="config/mh-djgpp"
     1747    ;;
     1748  *-cygwin*)
     1749    host_makefile_frag="config/mh-cygwin"
     1750    ;;
     1751  *-mingw32*)
     1752    host_makefile_frag="config/mh-mingw32"
     1753    ;;
     1754  *-interix*)
     1755    host_makefile_frag="config/mh-interix"
     1756    ;;
     1757  vax-*-ultrix2*)
     1758    # The old BSD pcc isn't up to compiling parts of gdb so use gcc
     1759    tentative_cc=gcc
     1760    ;;
     1761  *-*-solaris2*)
     1762    host_makefile_frag="config/mh-solaris"
     1763    ;;
     1764  m68k-sun-sunos*)
     1765    # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
     1766    # without overflowing the jump tables (-J says to use a 32 bit table)
     1767    tentative_cc="cc -J"
     1768    ;;
     1769  *-hp-hpux*)
     1770    tentative_cc="cc -Wp,-H256000"
     1771    ;;
     1772  *-*-hiux*)
     1773    tentative_cc="cc -Wp,-H256000"
     1774    ;;
     1775  rs6000-*-lynxos*)
     1776    # /bin/cc is less than useful for our purposes.  Always use GCC
     1777    tentative_cc="/usr/cygnus/progressive/bin/gcc"
     1778    host_makefile_frag="config/mh-lynxrs6k"
     1779    ;;
     1780  *-*-lynxos*)
     1781    # /bin/cc is less than useful for our purposes.  Always use GCC
     1782    tentative_cc="/bin/gcc"
     1783    ;;
     1784  *-*-sysv4*)
     1785    host_makefile_frag="config/mh-sysv4"
     1786    ;;
    6511787esac
    652 
    653 case "${TMPDIR}" in
    654 "") TMPDIR=/tmp ; export TMPDIR ;;
    655 *) ;;
     1788fi
     1789
     1790extra_arflags_for_target=
     1791extra_nmflags_for_target=
     1792extra_ranlibflags_for_target=
     1793target_makefile_frag=/dev/null
     1794case "${target}" in
     1795  i[3456]86-*-netware*)
     1796    target_makefile_frag="config/mt-netware"
     1797    ;;
     1798  powerpc-*-netware*)
     1799    target_makefile_frag="config/mt-netware"
     1800    ;;
     1801  *-*-linux*)
     1802    target_makefile_frag="config/mt-linux"
     1803    ;;
     1804  *-*-aix4.[3456789]* | *-*-aix[56789].*)
     1805    # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
     1806    # commands to handle both 32-bit and 64-bit objects.  These flags are
     1807    # harmless if we're using GNU nm or ar.
     1808    extra_arflags_for_target=" -X32_64"
     1809    extra_nmflags_for_target=" -B -X32_64"
     1810    ;;
     1811  *-*-darwin*)
     1812    # ranlib from Darwin requires the -c flag to look at common symbols.
     1813    extra_ranlibflags_for_target=" -c"
     1814    ;;
     1815  mips*-*-pe | sh*-*-pe | *arm-wince-pe)
     1816    target_makefile_frag="config/mt-wince"
     1817    ;;
    6561818esac
    6571819
    658 # keep this filename short for &%*%$*# 14 char file names and 8+3 file names
    659 tmpfile=${TMPDIR}/cNf$$
    660 # Note that under many versions of sh a trap handler for 0 will *override* any
    661 # exit status you explicitly specify!  At this point, the only non-error exit
    662 # is at the end of the script; these actions are duplicated there, minus
    663 # the "exit 1".  Don't use "exit 0" anywhere after this without resetting the
    664 # trap handler, or you'll lose.
    665 trap "rm -f Makefile.tem ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 0 1 2 15
    666 
    667 # split ${srcdir}/configure.in into common, per-host, per-target,
    668 # and post-target parts.  Post-target is optional.
    669 sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
    670 sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst
    671 if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then
    672   sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
    673   sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
    674 else
    675   sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
    676   echo >${tmpfile}.pos
    677 fi
    678 
    679 ### do common part of configure.in
    680 
    681 # If the language specific compiler does not exist, but the "gcc" directory does,
    682 # we will skip this directory; in this case the sub-directory's common part
    683 # of configure.in will create a small shell script "skip-this-dir" containing
    684 # commands to completely clean up any temporary or created files.
    685 
    686 . ${tmpfile}.com
    687 
    688 if test -f skip-this-dir; then
    689         # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
    690         # and reset the trap handler.
    691         trap 0
    692         rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
    693         # Execute the final clean-up actions
    694         ${config_shell} skip-this-dir
    695         # and stop configuring this directory.
    696         exit 0
    697 fi
    698 
    699 # some sanity checks on configure.in
    700 case "${srctrigger}" in
    701 "")
    702         echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in.  1>&2
    703         exit 1
    704         ;;
    705 *) ;;
     1820alphaieee_frag=/dev/null
     1821case $target in
     1822  alpha*-*-*)
     1823    # This just makes sure to use the -mieee option to build target libs.
     1824    # This should probably be set individually by each library.
     1825    alphaieee_frag="config/mt-alphaieee"
     1826    ;;
    7061827esac
    7071828
    708 case "${build_alias}" in
    709 "")
    710         if result=`${config_shell} ${configsub} ${host_alias}` ; then
    711             build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
    712             build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
    713             build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    714             build=${build_cpu}-${build_vendor}-${build_os}
    715             build_alias=${host_alias}
    716         fi
    717         ;;
    718 *)
    719         if result=`${config_shell} ${configsub} ${build_alias}` ; then
    720             buildopt="--build=${build_alias}"
    721             build_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
    722             build_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
    723             build_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    724             build=${build_cpu}-${build_vendor}-${build_os}
    725         else
    726             echo "Unrecognized build system name ${build_alias}." 1>&2
    727             exit 1
    728         fi
    729         ;;
     1829# If --enable-target-optspace always use -Os instead of -O2 to build
     1830# the target libraries, similarly if it is not specified, use -Os
     1831# on selected platforms.
     1832ospace_frag=/dev/null
     1833case "${enable_target_optspace}:${target}" in
     1834  yes:*)
     1835    ospace_frag="config/mt-ospace"
     1836    ;;
     1837  :d30v-*)
     1838    ospace_frag="config/mt-d30v"
     1839    ;;
     1840  :m32r-* | :d10v-* | :fr30-*)
     1841    ospace_frag="config/mt-ospace"
     1842    ;;
     1843  no:* | :*)
     1844    ;;
     1845  *)
     1846    echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
     1847    ;;
    7301848esac
    7311849
    732 if result=`${config_shell} ${configsub} ${host_alias}` ; then
    733     true
    734 else
    735     echo "Unrecognized host system name ${host_alias}." 1>&2
    736     exit 1
    737 fi
    738 host_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
    739 host_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
    740 host_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    741 host=${host_cpu}-${host_vendor}-${host_os}
    742 
    743 . ${tmpfile}.hst
    744 
    745 if result=`${config_shell} ${configsub} ${target_alias}` ; then
    746     true
    747 else
    748     echo "Unrecognized target system name ${target_alias}." 1>&2
    749     exit 1
    750 fi
    751 target_cpu=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
    752 target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
    753 target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    754 target=${target_cpu}-${target_vendor}-${target_os}
    755 
    756 . ${tmpfile}.tgt
    757 
    758 # Find the source files, if location was not specified.
    759 case "${srcdir}" in
    760 "")
    761         srcdirdefaulted=1
    762         srcdir=.
    763         if [ ! -r ${srctrigger} ] ; then
    764                 srcdir=..
    765         fi
    766         ;;
    767 *) ;;
     1850# Set with_gnu_as and with_gnu_ld as appropriate.
     1851#
     1852# This is done by determining whether or not the appropriate directory
     1853# is available, and by checking whether or not specific configurations
     1854# have requested that this magic not happen.
     1855#
     1856# The command line options always override the explicit settings in
     1857# configure.in, and the settings in configure.in override this magic.
     1858#
     1859# If the default for a toolchain is to use GNU as and ld, and you don't
     1860# want to do that, then you should use the --without-gnu-as and
     1861# --without-gnu-ld options for the configure script.
     1862
     1863if test x${use_gnu_as} = x &&
     1864   echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
     1865  with_gnu_as=yes
     1866  extra_host_args="$extra_host_args --with-gnu-as"
     1867fi
     1868
     1869if test x${use_gnu_ld} = x &&
     1870   echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
     1871  with_gnu_ld=yes
     1872  extra_host_args="$extra_host_args --with-gnu-ld"
     1873fi
     1874
     1875# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
     1876# can detect this case.
     1877
     1878if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
     1879  with_newlib=yes
     1880  extra_host_args="$extra_host_args --with-newlib"
     1881fi
     1882
     1883
     1884# Default to using --with-stabs for certain targets.
     1885if test x${with_stabs} = x ; then
     1886  case "${target}" in
     1887  mips*-*-irix6*o32)
     1888    with_stabs=yes;
     1889    extra_host_args="${extra_host_args} --with-stabs"
     1890    ;;
     1891  mips*-*-irix6*)
     1892    ;;
     1893  mips*-*-* | alpha*-*-osf*)
     1894    with_stabs=yes;
     1895    extra_host_args="${extra_host_args} --with-stabs"
     1896    ;;
     1897  esac
     1898fi
     1899
     1900# hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
     1901# them automatically.
     1902case "${host}" in
     1903  hppa*64*-*-hpux11*)   
     1904    extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
     1905    ;;
    7681906esac
    7691907
    770 if [ ! -r ${srcdir}/${srctrigger} ] ; then
    771         case "${srcdirdefaulted}" in
    772         "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;;
    773         *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;;
    774         esac
    775 
    776         echo '***' \(At least ${srctrigger} is missing.\) 1>&2
    777         exit 1
     1908# If we aren't going to be using gcc, see if we can extract a definition
     1909# of CC from the fragment.
     1910# Actually, use the 'pre-extracted' version above.
     1911if test -z "${CC}" && test "${build}" = "${host}" ; then
     1912  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
     1913  found=
     1914  for dir in $PATH; do
     1915    test -z "$dir" && dir=.
     1916    if test -f $dir/gcc; then
     1917      found=yes
     1918      break
     1919    fi
     1920  done
     1921  IFS="$save_ifs"
     1922  if test -z "${found}" && test -n "${tentative_cc}" ; then
     1923    CC=$tentative_cc
     1924  fi
    7781925fi
    7791926
     
    7811928# using) don't handle "\$" correctly, so don't use it here.
    7821929tooldir='$(exec_prefix)'/${target_alias}
    783 
    784 if [ "${host_alias}" != "${target_alias}" ] ; then
    785     if [ "${program_prefixoption}" = "" ] ; then
    786         if [ "${program_suffixoption}" = "" ] ; then
    787             if [ "${program_transform_nameoption}" = "" ] ; then
    788                 program_prefix=${target_alias}- ;
    789             fi
    790         fi
    791     fi
    792 fi
    793 
    794 # Merge program_prefix and program_suffix onto program_transform_name.
    795 # (program_suffix used to use $, but it's hard to preserve $ through both
    796 # make and sh.)
    797 if [ "${program_suffix}" != "" ] ; then
    798     program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
    799 fi
    800 
    801 if [ "${program_prefix}" != "" ] ; then
    802     program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
    803 fi
    804 
    805 # If CC and CXX are not set in the environment, and the Makefile
    806 # exists, try to extract them from it.  This is to handle running
    807 # ./config.status by hand.
    808 if [ -z "${CC}" ] && [ -r Makefile ]; then
    809   sed -n -e ':loop
    810 /\\$/ N
    811 s/\\\n//g
    812 t loop
    813 /^CC[   ]*=/ s/CC[      ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
    814   CC=`tail -1 Makefile.cc`
    815   rm -f Makefile.cc
    816 fi
    817 
    818 if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
    819   sed -n -e ':loop
    820 /\\$/ N
    821 s/\\\n//g
    822 t loop
    823 /^CFLAGS[       ]*=/ s/CFLAGS[  ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
    824   CFLAGS=`tail -1 Makefile.cc`
    825   rm -f Makefile.cc
    826 fi
    827 
    828 if [ -z "${CXX}" ] && [ -r Makefile ]; then
    829   sed -n -e ':loop
    830 /\\$/ N
    831 s/\\\n//g
    832 t loop
    833 /^CXX[  ]*=/ s/CXX[     ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
    834   CXX=`tail -1 Makefile.cc`
    835   rm -f Makefile.cc
    836 fi
    837 
    838 if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
    839   sed -n -e ':loop
    840 /\\$/ N
    841 s/\\\n//g
    842 t loop
    843 /^CXXFLAGS[     ]*=/ s/CXXFLAGS[        ]*=[    ]*\(.*\)/\1/p' < Makefile > Makefile.cc
    844   CXXFLAGS=`tail -1 Makefile.cc`
    845   rm -f Makefile.cc
    846 fi
     1930build_tooldir=${tooldir}
    8471931
    8481932# Generate a default definition for YACC.  This is used if the makefile can't
     
    9031987done
    9041988
    905 if [ "${build}" != "${host}" ]; then
     1989if test "${build}" != "${host}" ; then
    9061990  # If we are doing a Canadian Cross, in which the host and build systems
    9071991  # are not the same, we set reasonable default values for the tools.
    9081992
    909   tools="AR AR_FOR_TARGET AS AS_FOR_TARGET BISON CC_FOR_BUILD"
    910   tools="${tools} CC_FOR_TARGET CXX_FOR_TARGET"
    911   tools="${tools} DLLTOOL DLLTOOL_FOR_TARGET GCC_FOR_TARGET HOST_PREFIX"
    912   tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
    913   tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
    914   tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
    915   tools="${tools} OBJCOPY OBJDUMP"
    916 
    917   for var in ${tools}; do
    918     if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
    919       sed -n -e ':loop
    920 /\\$/ N
    921 s/\\\n//g
    922 t loop
    923 /^'"${var}"'[   ]*=/ s/'"${var}"'[      ]*=[    ]*\(.*\)/\1/p' \
    924         < Makefile > Makefile.v
    925       t=`tail -1 Makefile.v`
    926       if [ -n "${t}" ]; then
    927         eval "${var}=\${t}"
    928       fi
    929       rm -f Makefile.v
    930     fi
    931   done
    932 
    933   AR=${AR-${host_alias}-ar}
    934   AR_FOR_TARGET=${AR_FOR_TARGET-${target_alias}-ar}
    935   AS=${AS-${host_alias}-as}
    936   AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as}
    9371993  BISON=${BISON-bison}
    9381994  CC=${CC-${host_alias}-gcc}
     
    9431999  CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
    9442000  CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
    945   DLLTOOL=${DLLTOOL-${host_alias}-dlltool}
    946   DLLTOOL_FOR_TARGET=${DLLTOOL_FOR_TARGET-${target_alias}-dlltool}
     2001  GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
    9472002  GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
    948   HOST_PREFIX=${build_alias}-
    949   HOST_PREFIX_1=${build_alias}-
    950   LD=${LD-${host_alias}-ld}
    951   LD_FOR_TARGET=${LD_FOR_TARGET-${target_alias}-ld}
     2003  BUILD_PREFIX=${build_alias}-
     2004  BUILD_PREFIX_1=${build_alias}-
    9522005  MAKEINFO=${MAKEINFO-makeinfo}
    953   NM=${NM-${host_alias}-nm}
    954   NM_FOR_TARGET=${NM_FOR_TARGET-${target_alias}-nm}
    955   RANLIB=${RANLIB-${host_alias}-ranlib}
    956   RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
    957   WINDRES=${WINDRES-${host_alias}-windres}
    958   WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
    959   OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
    960   OBJDUMP=${OBJDUMP-${host_alias}-objdump}
    961 
    962   if [ -z "${YACC}" ]; then
     2006
     2007  if test -z "${YACC}" ; then
    9632008    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    9642009    for dir in $PATH; do
     
    9782023    done
    9792024    IFS="$save_ifs"
    980     if [ -z "${YACC}" ]; then
     2025    if test -z "${YACC}" ; then
    9812026      YACC="bison -y"
    9822027    fi
    9832028  fi
    9842029
    985   if [ -z "${LEX}" ]; then
     2030  if test -z "${LEX}" ; then
    9862031    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    9872032    for dir in $PATH; do
     
    10002045  fi
    10012046
    1002   # Export variables which autoconf might try to set.
    1003   export AS
    1004   export AR
    1005   export CC_FOR_BUILD
    1006   export DLLTOOL
    1007   export LD
    1008   export NM
    1009   export RANLIB
    1010   export WINDRES
    1011   export OBJCOPY
    1012   export OBJDUMP
    1013 else
     2047else
     2048  # Set reasonable default values for some tools even if not Canadian.
     2049  # Of course, these are different reasonable default values, originally
     2050  # specified directly in the Makefile.
     2051  # We don't export, so that autoconf can do its job.
     2052  # Note that all these settings are above the fragment inclusion point
     2053  # in Makefile.in, so can still be overridden by fragments.
     2054  # This is all going to change when we autoconfiscate...
     2055
     2056  BISON="\$(USUAL_BISON)"
     2057  CC_FOR_BUILD="\$(CC)"
     2058  GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
     2059  BUILD_PREFIX=
     2060  BUILD_PREFIX_1=loser-
     2061  MAKEINFO="\$(USUAL_MAKEINFO)"
     2062  LEX="\$(USUAL_LEX)"
     2063  YACC="\$(USUAL_YACC)"
     2064
    10142065  # If CC is still not set, try to get gcc.
    1015   if [ -z "${CC}" ]; then
     2066  cc_prog_is_gcc=
     2067  if test -z "${CC}" ; then
    10162068    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
    10172069    for dir in $PATH; do
     
    10192071      if test -f $dir/gcc; then
    10202072        CC="gcc"
     2073        cc_prog_is_gcc=yes
    10212074        echo 'void f(){}' > conftest.c
    10222075        if test -z "`${CC} -g -c conftest.c 2>&1`"; then
     
    10342087    CC=${CC-cc}
    10352088  else
     2089    # Determine if we are using gcc.
     2090    cat > conftest.c <<EOF
     2091#ifdef __GNUC__
     2092  yes;
     2093#endif
     2094EOF
     2095    if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
     2096      cc_prog_is_gcc=yes
     2097    fi
     2098    rm -f conftest.c
    10362099    if test -z "${CFLAGS}"; then
    10372100      # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
    10382101      # is set to a version of gcc.
    1039       case "${CC}" in
    1040       *gcc)
     2102      if test "$cc_prog_is_gcc" = yes; then
    10412103        echo 'void f(){}' > conftest.c
    10422104        if test -z "`${CC} -g -c conftest.c 2>&1`"; then
     
    10482110        fi
    10492111        rm -f conftest*
    1050         ;;
     2112      fi
     2113    fi
     2114  fi
     2115
     2116  # We must set the default linker to the linker used by gcc for the correct
     2117  # operation of libtool.  If LD is not defined and we are using gcc, try to
     2118  # set the LD default to the ld used by gcc.
     2119  if test -z "$LD"; then
     2120    if test "$cc_prog_is_gcc" = yes; then
     2121      case $build in
     2122      *-*-mingw*)
     2123        gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
     2124      *)
     2125        gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
     2126      esac
     2127      case $gcc_prog_ld in
     2128      # Accept absolute paths.
     2129      [\\/]* | [A-Za-z]:[\\/]*)
     2130        LD="$gcc_prog_ld" ;;
    10512131      esac
    10522132    fi
     
    10582138fi
    10592139
    1060 export CC
    1061 export CXX
    1062 export CFLAGS
    1063 export CXXFLAGS
    1064 
    1065 # FIXME: This should be in configure.in, not configure
    1066 case "$host" in
    1067         *go32*)
    1068             enable_gdbtk=no ;;
    1069         *msdosdjgpp*)
    1070             enable_gdbtk=no ;;
     2140# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
     2141# Set up the list of links to be made.
     2142# ${links} is the list of link names, and ${files} is the list of names to link to.
     2143
     2144# Make the links.
     2145configlinks="${links}"
     2146if test -r ./config.status  ; then
     2147  mv -f ./config.status ./config.back
     2148fi
     2149while test -n "${files}" ; do
     2150  # set file to car of files, files to cdr of files
     2151  set ${files}; file=$1; shift; files=$*
     2152  set ${links}; link=$1; shift; links=$*
     2153
     2154  if test ! -r ${srcdir}/${file} ; then
     2155    if test ! -r ${file} ; then
     2156      echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
     2157      echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
     2158      exit 1
     2159    else
     2160      srcfile=${file}
     2161    fi
     2162  else
     2163    srcfile=${srcdir}/${file}
     2164  fi
     2165
     2166  ${remove} -f ${link}
     2167  # Make a symlink if possible, otherwise try a hard link
     2168  if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
     2169    true
     2170  else
     2171    # We need to re-remove the file because Lynx leaves a
     2172    # very strange directory there when it fails an NFS symlink.
     2173    ${remove} -r -f ${link}
     2174    ${hard_link} ${srcfile} ${link}
     2175  fi
     2176  if test ! -r ${link} ; then
     2177    echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
     2178    exit 1
     2179  fi
     2180
     2181  echo "Linked \"${link}\" to \"${srcfile}\"."
     2182done
     2183
     2184# Create a .gdbinit file which runs the one in srcdir
     2185# and tells GDB to look there for source files.
     2186
     2187if test -r ${srcdir}/.gdbinit ; then
     2188  case ${srcdir} in
     2189    .) ;;
     2190    *) cat > ./.gdbinit <<EOF
     2191# ${NO_EDIT}
     2192dir ${srcdir}
     2193dir .
     2194source ${srcdir}/.gdbinit
     2195EOF
     2196    ;;
     2197  esac
     2198fi
     2199
     2200# Make sure that the compiler is able to generate an executable.  If it
     2201# can't, we are probably in trouble.  We don't care whether we can run the
     2202# executable--we might be using a cross compiler--we only care whether it
     2203# can be created.  At this point the main configure script has set CC.
     2204we_are_ok=no
     2205echo "int main () { return 0; }" > conftest.c
     2206${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
     2207if test $? = 0 ; then
     2208  if test -s conftest || test -s conftest.exe ; then
     2209    we_are_ok=yes
     2210  fi
     2211fi
     2212case $we_are_ok in
     2213  no)
     2214    echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
     2215    echo 1>&2 "*** You must set the environment variable CC to a working compiler."
     2216    rm -f conftest*
     2217    exit 1
     2218    ;;
    10712219esac
    1072 
    1073 # FIXME: This should be in configure.in, not configure
     2220rm -f conftest*
     2221
     2222# The Solaris /usr/ucb/cc compiler does not appear to work.
     2223case "${host}" in
     2224  sparc-sun-solaris2*)
     2225      CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
     2226      if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
     2227          could_use=
     2228          test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
     2229          if test -d /opt/cygnus/bin ; then
     2230              if test "$could_use" = "" ; then
     2231                  could_use="/opt/cygnus/bin"
     2232              else
     2233                  could_use="$could_use or /opt/cygnus/bin"
     2234              fi
     2235          fi
     2236        if test "$could_use" = "" ; then
     2237            echo "Warning: compilation may fail because you're using"
     2238            echo "/usr/ucb/cc.  You should change your PATH or CC "
     2239            echo "variable and rerun configure."
     2240        else
     2241            echo "Warning: compilation may fail because you're using"
     2242            echo "/usr/ucb/cc, when you should use the C compiler from"
     2243            echo "$could_use.  You should change your"
     2244            echo "PATH or CC variable and rerun configure."
     2245        fi
     2246      fi
     2247  ;;
     2248esac
     2249
     2250# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
     2251# binutils tools will find libbfd.so.
     2252case "${enable_shared}" in
     2253  no | "") SET_LIB_PATH= ;;
     2254  *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
     2255esac
     2256
     2257case "${host}" in
     2258  *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
     2259  *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
     2260esac
     2261
     2262# Record target_configdirs and the configure arguments for target and
     2263# build configuration in Makefile.
     2264target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
     2265
     2266# This is the final value for target_configdirs.  configdirs already
     2267# has its final value.  It's time to create some lists of valid targets.
     2268
     2269# While at that, we remove Makefiles if we were started for recursive
     2270# configuration, such that the top-level Makefile reconfigures them,
     2271# like we used to do when configure itself was recursive.
     2272
     2273all_build_modules=
     2274configure_build_modules=
     2275# Only make build modules if build != host.
     2276# This should be done more generally, but at the moment it doesn't matter.
     2277if test ${host_alias} != ${build_alias} ; then
     2278  for module in libiberty ; do
     2279    all_build_modules=all-build-${module}
     2280    configure_build_modules=configure-build-${module}
     2281    if test -z "${no_recursion}" \
     2282       && test -f ${build_subdir}/${module}/Makefile; then
     2283      echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
     2284      rm -f ${build_subdir}/${module}/Makefile
     2285    fi
     2286  done
     2287fi
     2288
     2289all_host_modules=
     2290check_host_modules=
     2291install_host_modules=
     2292configure_host_modules=
     2293for module in ${configdirs} ; do
     2294  all_host_modules="${all_host_modules} all-${module}"
     2295  check_host_modules="${check_host_modules} check-${module}"
     2296  install_host_modules="${install_host_modules} install-${module}"
     2297  configure_host_modules="${configure_host_modules} configure-${module}"
     2298  if test -z "${no_recursion}" \
     2299     && test -f ${module}/Makefile; then
     2300    echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
     2301    rm -f ${module}/Makefile
     2302  fi
     2303done
     2304install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
     2305
     2306all_target_modules=
     2307check_target_modules=
     2308install_target_modules=
     2309configure_target_modules=
     2310for module in ${target_configdirs} ; do
     2311  all_target_modules="${all_target_modules} all-target-${module}"
     2312  check_target_modules="${check_target_modules} check-target-${module}"
     2313  install_target_modules="${install_target_modules} install-target-${module}"
     2314  configure_target_modules="${configure_target_modules} configure-target-${module}"
     2315  if test -z "${no_recursion}" \
     2316     && test -f ${target_subdir}/${module}/Makefile; then
     2317    echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
     2318    rm -f ${target_subdir}/${module}/Makefile
     2319  fi
     2320done
     2321
    10742322# Determine whether gdb needs tk/tcl or not.
    1075 if [ "$enable_gdbtk" != "no" ]; then
    1076         GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui"
    1077 else
    1078         GDB_TK=""
    1079 fi
    1080 
    1081 for subdir in . ${subdirs} ; do
    1082 
    1083     # ${subdir} is relative path from . to the directory we're currently
    1084     # configuring.
    1085     # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
    1086     invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
    1087 
    1088     ### figure out what to do with srcdir
    1089     case "${srcdir}" in
    1090         ".")  # no -srcdir option.  We're building in place.
    1091                 makesrcdir=. ;;
    1092         /*) # absolute path
    1093                 makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
    1094                 ;;
    1095         *) # otherwise relative
    1096                 case "${subdir}" in
    1097                 .) makesrcdir=${srcdir} ;;
    1098                 *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;;
    1099                 esac
    1100                 ;;
    1101     esac
    1102 
    1103     if [ "${subdir}/" != "./" ] ; then
    1104         Makefile=${subdir}/Makefile
    1105     fi
    1106 
    1107     if [ ! -d ${subdir} ] ; then
    1108         if mkdir ${subdir} ; then
    1109                 true
    1110         else
    1111                 echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2
    1112                 exit 1
    1113         fi
    1114     fi
    1115 
    1116     case "${removing}" in
    1117     "")
    1118         case "${subdir}" in
    1119         .) ;;
    1120         *) eval echo Building in ${subdir} ${redirect} ;;
    1121         esac
    1122 
    1123         # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
    1124         # Set up the list of links to be made.
    1125         # ${links} is the list of link names, and ${files} is the list of names to link to.
    1126 
    1127         # Make the links.
    1128         configlinks="${links}"
    1129         if [ -r ${subdir}/config.status ] ; then
    1130                 mv -f ${subdir}/config.status ${subdir}/config.back
    1131         fi
    1132         while [ -n "${files}" ] ; do
    1133                 # set file to car of files, files to cdr of files
    1134                 set ${files}; file=$1; shift; files=$*
    1135                 set ${links}; link=$1; shift; links=$*
    1136 
    1137                 if [ ! -r ${srcdir}/${file} ] ; then
    1138                   if [ ! -r ${file} ] ; then
    1139                    
    1140                         echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
    1141                         echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
    1142                         exit 1
    1143                   else
    1144                         srcfile=${file}
    1145                   fi
    1146                 else
    1147                         srcfile=${srcdir}/${file}
    1148                 fi
    1149 
    1150                 ${remove} -f ${link}
    1151                 # Make a symlink if possible, otherwise try a hard link
    1152                 if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
    1153                         true
    1154                 else
    1155                         # We need to re-remove the file because Lynx leaves a
    1156                         # very strange directory there when it fails an NFS symlink.
    1157                         ${remove} -r -f ${link}
    1158                         ${hard_link} ${srcfile} ${link}
    1159                 fi
    1160                 if [ ! -r ${link} ] ; then
    1161                         echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
    1162                         exit 1
    1163                 fi
    1164 
    1165                 echo "Linked \"${link}\" to \"${srcfile}\"."
    1166         done
    1167 
    1168         # Create a .gdbinit file which runs the one in srcdir
    1169         # and tells GDB to look there for source files.
    1170 
    1171         if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
    1172                 case ${srcdir} in
    1173                 .) ;;
    1174                 *) cat > ${subdir}/.gdbinit <<EOF
    1175 # ${NO_EDIT}
    1176 dir ${makesrcdir}
    1177 dir .
    1178 source ${makesrcdir}/.gdbinit
     2323# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
     2324# and in that case we want gdb to be built without tk.  Ugh!
     2325# In fact I believe gdb is the *only* package directly dependent on tk,
     2326# so we should be able to put the 'maybe's in unconditionally and
     2327# leave out the maybe dependencies when enable_gdbtk is false.  I'm not
     2328# 100% sure that that's safe though.
     2329
     2330gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
     2331case "$enable_gdbtk" in
     2332  no)
     2333    GDB_TK="" ;;
     2334  yes)
     2335    GDB_TK="${gdb_tk}" ;;
     2336  *)
     2337    # Only add the dependency on gdbtk when GDBtk is part of the gdb
     2338    # distro.  Eventually someone will fix this and move Insight, nee
     2339    # gdbtk to a separate directory.
     2340    if test -d ${srcdir}/gdb/gdbtk ; then
     2341      GDB_TK="${gdb_tk}"
     2342    else
     2343      GDB_TK=""
     2344    fi
     2345    ;;
     2346esac
     2347
     2348# Create the 'maybe dependencies'.  This uses a temporary file.
     2349rm -f maybedep.tmp
     2350echo '# maybedep.tmp' > maybedep.tmp
     2351for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \
     2352        ${install_host_modules} ${install_target_modules} \
     2353        ${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \
     2354        ; do
     2355  echo "maybe-${item}: ${item}" >> maybedep.tmp
     2356done
     2357maybe_dependencies=maybedep.tmp
     2358
     2359
     2360# Create the serialization dependencies.  This uses a temporary file.
     2361
     2362# Check whether --enable-serial-configure or --disable-serial-configure was given.
     2363if test "${enable_serial_configure+set}" = set; then
     2364  enableval="$enable_serial_configure"
     2365  :
     2366fi
     2367
     2368
     2369# These force 'configure's to be done one at a time, to avoid problems
     2370# with contention over a shared config.cache.
     2371rm -f serdep.tmp
     2372echo '# serdep.tmp' > serdep.tmp
     2373olditem=
     2374test "x${enable_serial_configure}" = xno ||
     2375test "x${enable_serial_build_configure}" = xno ||
     2376for item in ${build_configdirs} ; do
     2377  case ${olditem} in
     2378    "") ;;
     2379    *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
     2380  esac
     2381  olditem=${item}
     2382done
     2383olditem=
     2384test "x${enable_serial_configure}" = xno ||
     2385test "x${enable_serial_host_configure}" = xno ||
     2386for item in ${configdirs} ; do
     2387  case ${olditem} in
     2388    "") ;;
     2389    *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
     2390  esac
     2391  olditem=${item}
     2392done
     2393olditem=
     2394test "x${enable_serial_configure}" = xno ||
     2395test "x${enable_serial_target_configure}" = xno ||
     2396for item in ${target_configdirs} ; do
     2397  case ${olditem} in
     2398    "") ;;
     2399    *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
     2400  esac
     2401  olditem=${item}
     2402done
     2403serialization_dependencies=serdep.tmp
     2404
     2405
     2406# Base args.  Strip norecursion, cache-file, srcdir, host, build,
     2407# target and nonopt.  These are the ones we might not want to pass
     2408# down to subconfigures.
     2409baseargs=`echo " ${ac_configure_args} " | \
     2410        sed -e 's/ --no[^ ]* / /' \
     2411            -e 's/ --c[a-z-]*[= ][^ ]* / /' \
     2412            -e 's/ --sr[a-z-]*[= ][^ ]* / /' \
     2413            -e 's/ --ho[a-z-]*[= ][^ ]* / /' \
     2414            -e 's/ --bu[a-z-]*[= ][^ ]* / /' \
     2415            -e 's/ --t[a-z-]*[= ][^ ]* / /' \
     2416            -e 's/ -cache-file[= ][^ ]* / /' \
     2417            -e 's/ -srcdir[= ][^ ]* / /' \
     2418            -e 's/ -host[= ][^ ]* / /' \
     2419            -e 's/ -build[= ][^ ]* / /' \
     2420            -e 's/ -target[= ][^ ]* / /' \
     2421            -e "s/ [^' -][^ ]* / /" \
     2422            -e 's/^ *//;s/ *$//'`
     2423
     2424# For the build-side libraries, we just need to pretend we're native,
     2425# and not use the same cache file.  Multilibs are neither needed nor
     2426# desired.
     2427build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
     2428
     2429# For host modules, accept cache file option, or specification as blank.
     2430case "${cache_file}" in
     2431"") # empty
     2432  cache_file_option="" ;;
     2433/* | [A-Za-z]:[\\/]* ) # absolute path
     2434  cache_file_option="--cache-file=${cache_file}" ;;
     2435*) # relative path
     2436  cache_file_option="--cache-file=../${cache_file}" ;;
     2437esac
     2438
     2439host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
     2440
     2441target_configargs=${baseargs}
     2442
     2443# Passing a --with-cross-host argument lets the target libraries know
     2444# whether they are being built with a cross-compiler or being built
     2445# native.  However, it would be better to use other mechanisms to make the
     2446# sorts of decisions they want to make on this basis.  Please consider
     2447# this option to be deprecated.  FIXME.
     2448if test x${is_cross_compiler} = xyes ; then
     2449  target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
     2450fi
     2451
     2452# Default to --enable-multilib.
     2453if test x${enable_multilib} = x ; then
     2454  target_configargs="--enable-multilib ${target_configargs}"
     2455fi
     2456
     2457# Pass --with-newlib if appropriate.  Note that target_configdirs has
     2458# changed from the earlier setting of with_newlib.
     2459if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
     2460  target_configargs="--with-newlib ${target_configargs}"
     2461fi
     2462
     2463# Pass the appropriate --host, --build, and --cache-file arguments.
     2464target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
     2465
     2466# provide a proper gxx_include_dir.
     2467# Note, if you change the default, make sure to fix both here and in
     2468# the gcc and libstdc++-v3 subdirectories.
     2469# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
     2470case "${with_gxx_include_dir}" in
     2471  yes)
     2472    { echo "configure: error: --with-gxx-include-dir=[dir] requires a directory" 1>&2; exit 1; }
     2473    ;;
     2474  no | "")
     2475    case "${enable_version_specific_runtime_libs}" in
     2476      yes) gxx_include_dir='${libsubdir}/include/c++' ;;
     2477      *)
     2478        . ${srcdir}/config.if
     2479        gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
     2480    esac ;;
     2481  *) gxx_include_dir=${with_gxx_include_dir} ;;
     2482esac
     2483
     2484FLAGS_FOR_TARGET=
     2485case " $target_configdirs " in
     2486 *" newlib "*)
     2487  case " $target_configargs " in
     2488  *" --with-newlib "*)
     2489   case "$target" in
     2490   *-cygwin*)
     2491     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' ;;
     2492   esac
     2493
     2494   # If we're not building GCC, don't discard standard headers.
     2495   if test -d ${srcdir}/gcc; then
     2496     FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
     2497
     2498     if test "${build}" != "${host}"; then
     2499       # On Canadian crosses, CC_FOR_TARGET will have already been set
     2500       # by `configure', so we won't have an opportunity to add -Bgcc/
     2501       # to it.  This is right: we don't want to search that directory
     2502       # for binaries, but we want the header files in there, so add
     2503       # them explicitly.
     2504       FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
     2505
     2506       # Someone might think of using the pre-installed headers on
     2507       # Canadian crosses, in case the installed compiler is not fully
     2508       # compatible with the compiler being built.  In this case, it
     2509       # would be better to flag an error than risking having
     2510       # incompatible object files being constructed.  We can't
     2511       # guarantee that an error will be flagged, but let's hope the
     2512       # compiler will do it, when presented with incompatible header
     2513       # files.
     2514     fi
     2515   fi
     2516
     2517   case "${target}-${is_cross_compiler}" in
     2518   i[3456]86-*-linux*-no)
     2519      # Here host == target, so we don't need to build gcc,
     2520      # so we don't want to discard standard headers.
     2521      FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
     2522      ;;
     2523   *)
     2524      # If we're building newlib, use its generic headers last, but search
     2525      # for any libc-related directories first (so make it the last -B
     2526      # switch).
     2527      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
     2528      ;;
     2529   esac
     2530   ;;
     2531  esac
     2532  ;;
     2533esac
     2534
     2535# On Canadian crosses, we'll be searching the right directories for
     2536# the previously-installed cross compiler, so don't bother to add
     2537# flags for directories within the install tree of the compiler
     2538# being built; programs in there won't even run.
     2539if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
     2540  # Search for pre-installed headers if nothing else fits.
     2541  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
     2542fi
     2543
     2544if test "x${use_gnu_ld}" = x &&
     2545   echo " ${configdirs} " | grep " ld " > /dev/null ; then
     2546  # Arrange for us to find uninstalled linker scripts.
     2547  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
     2548fi
     2549
     2550if test "x${CC_FOR_TARGET+set}" = xset; then
     2551  :
     2552elif test -d ${srcdir}/gcc; then
     2553  CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
     2554elif test "$host" = "$target"; then
     2555  CC_FOR_TARGET='$(CC)'
     2556else
     2557  CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
     2558fi
     2559CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
     2560
     2561if test "x${GCJ_FOR_TARGET+set}" = xset; then
     2562  :
     2563elif test -d ${srcdir}/gcc; then
     2564  GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
     2565elif test "$host" = "$target"; then
     2566  GCJ_FOR_TARGET='gcj'
     2567else
     2568  GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
     2569fi
     2570GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
     2571
     2572# Don't use libstdc++-v3's flags to configure/build itself.
     2573libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
     2574raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
     2575
     2576if test "x${CXX_FOR_TARGET+set}" = xset; then
     2577  :
     2578elif test -d ${srcdir}/gcc; then
     2579  # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
     2580  # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
     2581  # default whereas gcc does not.
     2582  # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
     2583  # all other cases.
     2584  CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
     2585  RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
     2586elif test "$host" = "$target"; then
     2587  CXX_FOR_TARGET='$(CXX)'
     2588  RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
     2589else
     2590  CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
     2591  RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
     2592fi
     2593CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
     2594RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
     2595
     2596qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
     2597qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
     2598
     2599# We want to defer the evaluation of `cmd`s and shell variables in
     2600# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
     2601# bootstrap.  We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
     2602# quotes, but we still have to duplicate `$'s so that shell variables
     2603# can be expanded by the nested make as shell variables, not as make
     2604# macros.
     2605qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
     2606qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
     2607
     2608# Wrap CC_FOR_TARGET and friends, for certain types of builds.
     2609CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
     2610GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
     2611CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
     2612RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
     2613CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
     2614RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
     2615
     2616# Makefile fragments.
     2617host_makefile_frag=${srcdir}/${host_makefile_frag}
     2618target_makefile_frag=${srcdir}/${target_makefile_frag}
     2619alphaieee_frag=${srcdir}/${alphaieee_frag}
     2620ospace_frag=${srcdir}/${ospace_frag}
     2621
     2622
     2623
     2624
     2625
     2626# Miscellanea: directories, flags, etc.
     2627
     2628
     2629
     2630
     2631
     2632
     2633
     2634
     2635
     2636
     2637
     2638
     2639
     2640# Build module lists & subconfigure args.
     2641
     2642
     2643
     2644
     2645
     2646# Host module lists & subconfigure args.
     2647
     2648
     2649
     2650
     2651
     2652
     2653
     2654
     2655# Target module lists & subconfigure args.
     2656
     2657
     2658
     2659
     2660
     2661
     2662
     2663
     2664# Build tools.
     2665
     2666
     2667
     2668
     2669
     2670
     2671
     2672# Host tools.
     2673ncn_tool_prefix=
     2674test -n "$host_alias" && ncn_tool_prefix=$host_alias-
     2675ncn_target_tool_prefix=
     2676test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
     2677
     2678 if test -n "$ncn_tool_prefix"; then
     2679  # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
     2680set dummy ${ncn_tool_prefix}ar; ac_word=$2
     2681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2682echo "configure:2683: checking for $ac_word" >&5
     2683if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
     2684  echo $ac_n "(cached) $ac_c" 1>&6
     2685else
     2686  if test -n "$AR"; then
     2687  ac_cv_prog_AR="$AR" # Let the user override the test.
     2688else
     2689  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2690  ac_dummy="$PATH"
     2691  for ac_dir in $ac_dummy; do
     2692    test -z "$ac_dir" && ac_dir=.
     2693    if test -f $ac_dir/$ac_word; then
     2694      ac_cv_prog_AR="${ncn_tool_prefix}ar"
     2695      break
     2696    fi
     2697  done
     2698  IFS="$ac_save_ifs"
     2699fi
     2700fi
     2701AR="$ac_cv_prog_AR"
     2702if test -n "$AR"; then
     2703  echo "$ac_t""$AR" 1>&6
     2704else
     2705  echo "$ac_t""no" 1>&6
     2706fi
     2707
     2708fi
     2709if test -z "$ac_cv_prog_AR" ; then
     2710  if test $build = $host ; then
     2711    ncn_cv_AR=$AR
     2712    # Extract the first word of "ar", so it can be a program name with args.
     2713set dummy ar; ac_word=$2
     2714echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2715echo "configure:2716: checking for $ac_word" >&5
     2716if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
     2717  echo $ac_n "(cached) $ac_c" 1>&6
     2718else
     2719  if test -n "$ncn_cv_AR"; then
     2720  ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test.
     2721else
     2722  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2723  ac_dummy="$PATH"
     2724  for ac_dir in $ac_dummy; do
     2725    test -z "$ac_dir" && ac_dir=.
     2726    if test -f $ac_dir/$ac_word; then
     2727      ac_cv_prog_ncn_cv_AR="ar"
     2728      break
     2729    fi
     2730  done
     2731  IFS="$ac_save_ifs"
     2732  test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar"
     2733fi
     2734fi
     2735ncn_cv_AR="$ac_cv_prog_ncn_cv_AR"
     2736if test -n "$ncn_cv_AR"; then
     2737  echo "$ac_t""$ncn_cv_AR" 1>&6
     2738else
     2739  echo "$ac_t""no" 1>&6
     2740fi
     2741 
     2742    AR=$ncn_cv_AR
     2743  else
     2744    AR="${ncn_tool_prefix}ar"
     2745  fi
     2746else
     2747  AR="$ac_cv_prog_AR"
     2748fi
     2749
     2750 if test -n "$ncn_tool_prefix"; then
     2751  # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
     2752set dummy ${ncn_tool_prefix}as; ac_word=$2
     2753echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2754echo "configure:2755: checking for $ac_word" >&5
     2755if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
     2756  echo $ac_n "(cached) $ac_c" 1>&6
     2757else
     2758  if test -n "$AS"; then
     2759  ac_cv_prog_AS="$AS" # Let the user override the test.
     2760else
     2761  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2762  ac_dummy="$PATH"
     2763  for ac_dir in $ac_dummy; do
     2764    test -z "$ac_dir" && ac_dir=.
     2765    if test -f $ac_dir/$ac_word; then
     2766      ac_cv_prog_AS="${ncn_tool_prefix}as"
     2767      break
     2768    fi
     2769  done
     2770  IFS="$ac_save_ifs"
     2771fi
     2772fi
     2773AS="$ac_cv_prog_AS"
     2774if test -n "$AS"; then
     2775  echo "$ac_t""$AS" 1>&6
     2776else
     2777  echo "$ac_t""no" 1>&6
     2778fi
     2779
     2780fi
     2781if test -z "$ac_cv_prog_AS" ; then
     2782  if test $build = $host ; then
     2783    ncn_cv_AS=$AS
     2784    # Extract the first word of "as", so it can be a program name with args.
     2785set dummy as; ac_word=$2
     2786echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2787echo "configure:2788: checking for $ac_word" >&5
     2788if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
     2789  echo $ac_n "(cached) $ac_c" 1>&6
     2790else
     2791  if test -n "$ncn_cv_AS"; then
     2792  ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test.
     2793else
     2794  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2795  ac_dummy="$PATH"
     2796  for ac_dir in $ac_dummy; do
     2797    test -z "$ac_dir" && ac_dir=.
     2798    if test -f $ac_dir/$ac_word; then
     2799      ac_cv_prog_ncn_cv_AS="as"
     2800      break
     2801    fi
     2802  done
     2803  IFS="$ac_save_ifs"
     2804  test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as"
     2805fi
     2806fi
     2807ncn_cv_AS="$ac_cv_prog_ncn_cv_AS"
     2808if test -n "$ncn_cv_AS"; then
     2809  echo "$ac_t""$ncn_cv_AS" 1>&6
     2810else
     2811  echo "$ac_t""no" 1>&6
     2812fi
     2813 
     2814    AS=$ncn_cv_AS
     2815  else
     2816    AS="${ncn_tool_prefix}as"
     2817  fi
     2818else
     2819  AS="$ac_cv_prog_AS"
     2820fi
     2821
     2822 if test -n "$ncn_tool_prefix"; then
     2823  # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
     2824set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
     2825echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2826echo "configure:2827: checking for $ac_word" >&5
     2827if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
     2828  echo $ac_n "(cached) $ac_c" 1>&6
     2829else
     2830  if test -n "$DLLTOOL"; then
     2831  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
     2832else
     2833  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2834  ac_dummy="$PATH"
     2835  for ac_dir in $ac_dummy; do
     2836    test -z "$ac_dir" && ac_dir=.
     2837    if test -f $ac_dir/$ac_word; then
     2838      ac_cv_prog_DLLTOOL="${ncn_tool_prefix}dlltool"
     2839      break
     2840    fi
     2841  done
     2842  IFS="$ac_save_ifs"
     2843fi
     2844fi
     2845DLLTOOL="$ac_cv_prog_DLLTOOL"
     2846if test -n "$DLLTOOL"; then
     2847  echo "$ac_t""$DLLTOOL" 1>&6
     2848else
     2849  echo "$ac_t""no" 1>&6
     2850fi
     2851
     2852fi
     2853if test -z "$ac_cv_prog_DLLTOOL" ; then
     2854  if test $build = $host ; then
     2855    ncn_cv_DLLTOOL=$DLLTOOL
     2856    # Extract the first word of "dlltool", so it can be a program name with args.
     2857set dummy dlltool; ac_word=$2
     2858echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2859echo "configure:2860: checking for $ac_word" >&5
     2860if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
     2861  echo $ac_n "(cached) $ac_c" 1>&6
     2862else
     2863  if test -n "$ncn_cv_DLLTOOL"; then
     2864  ac_cv_prog_ncn_cv_DLLTOOL="$ncn_cv_DLLTOOL" # Let the user override the test.
     2865else
     2866  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2867  ac_dummy="$PATH"
     2868  for ac_dir in $ac_dummy; do
     2869    test -z "$ac_dir" && ac_dir=.
     2870    if test -f $ac_dir/$ac_word; then
     2871      ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
     2872      break
     2873    fi
     2874  done
     2875  IFS="$ac_save_ifs"
     2876  test -z "$ac_cv_prog_ncn_cv_DLLTOOL" && ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
     2877fi
     2878fi
     2879ncn_cv_DLLTOOL="$ac_cv_prog_ncn_cv_DLLTOOL"
     2880if test -n "$ncn_cv_DLLTOOL"; then
     2881  echo "$ac_t""$ncn_cv_DLLTOOL" 1>&6
     2882else
     2883  echo "$ac_t""no" 1>&6
     2884fi
     2885 
     2886    DLLTOOL=$ncn_cv_DLLTOOL
     2887  else
     2888    DLLTOOL="${ncn_tool_prefix}dlltool"
     2889  fi
     2890else
     2891  DLLTOOL="$ac_cv_prog_DLLTOOL"
     2892fi
     2893
     2894 if test -n "$ncn_tool_prefix"; then
     2895  # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
     2896set dummy ${ncn_tool_prefix}ld; ac_word=$2
     2897echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2898echo "configure:2899: checking for $ac_word" >&5
     2899if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
     2900  echo $ac_n "(cached) $ac_c" 1>&6
     2901else
     2902  if test -n "$LD"; then
     2903  ac_cv_prog_LD="$LD" # Let the user override the test.
     2904else
     2905  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2906  ac_dummy="$PATH"
     2907  for ac_dir in $ac_dummy; do
     2908    test -z "$ac_dir" && ac_dir=.
     2909    if test -f $ac_dir/$ac_word; then
     2910      ac_cv_prog_LD="${ncn_tool_prefix}ld"
     2911      break
     2912    fi
     2913  done
     2914  IFS="$ac_save_ifs"
     2915fi
     2916fi
     2917LD="$ac_cv_prog_LD"
     2918if test -n "$LD"; then
     2919  echo "$ac_t""$LD" 1>&6
     2920else
     2921  echo "$ac_t""no" 1>&6
     2922fi
     2923
     2924fi
     2925if test -z "$ac_cv_prog_LD" ; then
     2926  if test $build = $host ; then
     2927    ncn_cv_LD=$LD
     2928    # Extract the first word of "ld", so it can be a program name with args.
     2929set dummy ld; ac_word=$2
     2930echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2931echo "configure:2932: checking for $ac_word" >&5
     2932if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
     2933  echo $ac_n "(cached) $ac_c" 1>&6
     2934else
     2935  if test -n "$ncn_cv_LD"; then
     2936  ac_cv_prog_ncn_cv_LD="$ncn_cv_LD" # Let the user override the test.
     2937else
     2938  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2939  ac_dummy="$PATH"
     2940  for ac_dir in $ac_dummy; do
     2941    test -z "$ac_dir" && ac_dir=.
     2942    if test -f $ac_dir/$ac_word; then
     2943      ac_cv_prog_ncn_cv_LD="ld"
     2944      break
     2945    fi
     2946  done
     2947  IFS="$ac_save_ifs"
     2948  test -z "$ac_cv_prog_ncn_cv_LD" && ac_cv_prog_ncn_cv_LD="ld"
     2949fi
     2950fi
     2951ncn_cv_LD="$ac_cv_prog_ncn_cv_LD"
     2952if test -n "$ncn_cv_LD"; then
     2953  echo "$ac_t""$ncn_cv_LD" 1>&6
     2954else
     2955  echo "$ac_t""no" 1>&6
     2956fi
     2957 
     2958    LD=$ncn_cv_LD
     2959  else
     2960    LD="${ncn_tool_prefix}ld"
     2961  fi
     2962else
     2963  LD="$ac_cv_prog_LD"
     2964fi
     2965
     2966 if test -n "$ncn_tool_prefix"; then
     2967  # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
     2968set dummy ${ncn_tool_prefix}nm; ac_word=$2
     2969echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     2970echo "configure:2971: checking for $ac_word" >&5
     2971if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
     2972  echo $ac_n "(cached) $ac_c" 1>&6
     2973else
     2974  if test -n "$NM"; then
     2975  ac_cv_prog_NM="$NM" # Let the user override the test.
     2976else
     2977  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     2978  ac_dummy="$PATH"
     2979  for ac_dir in $ac_dummy; do
     2980    test -z "$ac_dir" && ac_dir=.
     2981    if test -f $ac_dir/$ac_word; then
     2982      ac_cv_prog_NM="${ncn_tool_prefix}nm"
     2983      break
     2984    fi
     2985  done
     2986  IFS="$ac_save_ifs"
     2987fi
     2988fi
     2989NM="$ac_cv_prog_NM"
     2990if test -n "$NM"; then
     2991  echo "$ac_t""$NM" 1>&6
     2992else
     2993  echo "$ac_t""no" 1>&6
     2994fi
     2995
     2996fi
     2997if test -z "$ac_cv_prog_NM" ; then
     2998  if test $build = $host ; then
     2999    ncn_cv_NM=$NM
     3000    # Extract the first word of "nm", so it can be a program name with args.
     3001set dummy nm; ac_word=$2
     3002echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3003echo "configure:3004: checking for $ac_word" >&5
     3004if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
     3005  echo $ac_n "(cached) $ac_c" 1>&6
     3006else
     3007  if test -n "$ncn_cv_NM"; then
     3008  ac_cv_prog_ncn_cv_NM="$ncn_cv_NM" # Let the user override the test.
     3009else
     3010  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3011  ac_dummy="$PATH"
     3012  for ac_dir in $ac_dummy; do
     3013    test -z "$ac_dir" && ac_dir=.
     3014    if test -f $ac_dir/$ac_word; then
     3015      ac_cv_prog_ncn_cv_NM="nm"
     3016      break
     3017    fi
     3018  done
     3019  IFS="$ac_save_ifs"
     3020  test -z "$ac_cv_prog_ncn_cv_NM" && ac_cv_prog_ncn_cv_NM="nm"
     3021fi
     3022fi
     3023ncn_cv_NM="$ac_cv_prog_ncn_cv_NM"
     3024if test -n "$ncn_cv_NM"; then
     3025  echo "$ac_t""$ncn_cv_NM" 1>&6
     3026else
     3027  echo "$ac_t""no" 1>&6
     3028fi
     3029 
     3030    NM=$ncn_cv_NM
     3031  else
     3032    NM="${ncn_tool_prefix}nm"
     3033  fi
     3034else
     3035  NM="$ac_cv_prog_NM"
     3036fi
     3037
     3038 if test -n "$ncn_tool_prefix"; then
     3039  # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
     3040set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
     3041echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3042echo "configure:3043: checking for $ac_word" >&5
     3043if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
     3044  echo $ac_n "(cached) $ac_c" 1>&6
     3045else
     3046  if test -n "$RANLIB"; then
     3047  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
     3048else
     3049  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3050  ac_dummy="$PATH"
     3051  for ac_dir in $ac_dummy; do
     3052    test -z "$ac_dir" && ac_dir=.
     3053    if test -f $ac_dir/$ac_word; then
     3054      ac_cv_prog_RANLIB="${ncn_tool_prefix}ranlib"
     3055      break
     3056    fi
     3057  done
     3058  IFS="$ac_save_ifs"
     3059fi
     3060fi
     3061RANLIB="$ac_cv_prog_RANLIB"
     3062if test -n "$RANLIB"; then
     3063  echo "$ac_t""$RANLIB" 1>&6
     3064else
     3065  echo "$ac_t""no" 1>&6
     3066fi
     3067
     3068fi
     3069if test -z "$ac_cv_prog_RANLIB" ; then
     3070  if test $build = $host ; then
     3071    ncn_cv_RANLIB=$RANLIB
     3072    # Extract the first word of "ranlib", so it can be a program name with args.
     3073set dummy ranlib; ac_word=$2
     3074echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3075echo "configure:3076: checking for $ac_word" >&5
     3076if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
     3077  echo $ac_n "(cached) $ac_c" 1>&6
     3078else
     3079  if test -n "$ncn_cv_RANLIB"; then
     3080  ac_cv_prog_ncn_cv_RANLIB="$ncn_cv_RANLIB" # Let the user override the test.
     3081else
     3082  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3083  ac_dummy="$PATH"
     3084  for ac_dir in $ac_dummy; do
     3085    test -z "$ac_dir" && ac_dir=.
     3086    if test -f $ac_dir/$ac_word; then
     3087      ac_cv_prog_ncn_cv_RANLIB="ranlib"
     3088      break
     3089    fi
     3090  done
     3091  IFS="$ac_save_ifs"
     3092  test -z "$ac_cv_prog_ncn_cv_RANLIB" && ac_cv_prog_ncn_cv_RANLIB=":"
     3093fi
     3094fi
     3095ncn_cv_RANLIB="$ac_cv_prog_ncn_cv_RANLIB"
     3096if test -n "$ncn_cv_RANLIB"; then
     3097  echo "$ac_t""$ncn_cv_RANLIB" 1>&6
     3098else
     3099  echo "$ac_t""no" 1>&6
     3100fi
     3101 
     3102    RANLIB=$ncn_cv_RANLIB
     3103  else
     3104    RANLIB=":"
     3105  fi
     3106else
     3107  RANLIB="$ac_cv_prog_RANLIB"
     3108fi
     3109
     3110 if test -n "$ncn_tool_prefix"; then
     3111  # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
     3112set dummy ${ncn_tool_prefix}windres; ac_word=$2
     3113echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3114echo "configure:3115: checking for $ac_word" >&5
     3115if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
     3116  echo $ac_n "(cached) $ac_c" 1>&6
     3117else
     3118  if test -n "$WINDRES"; then
     3119  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
     3120else
     3121  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3122  ac_dummy="$PATH"
     3123  for ac_dir in $ac_dummy; do
     3124    test -z "$ac_dir" && ac_dir=.
     3125    if test -f $ac_dir/$ac_word; then
     3126      ac_cv_prog_WINDRES="${ncn_tool_prefix}windres"
     3127      break
     3128    fi
     3129  done
     3130  IFS="$ac_save_ifs"
     3131fi
     3132fi
     3133WINDRES="$ac_cv_prog_WINDRES"
     3134if test -n "$WINDRES"; then
     3135  echo "$ac_t""$WINDRES" 1>&6
     3136else
     3137  echo "$ac_t""no" 1>&6
     3138fi
     3139
     3140fi
     3141if test -z "$ac_cv_prog_WINDRES" ; then
     3142  if test $build = $host ; then
     3143    ncn_cv_WINDRES=$WINDRES
     3144    # Extract the first word of "windres", so it can be a program name with args.
     3145set dummy windres; ac_word=$2
     3146echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3147echo "configure:3148: checking for $ac_word" >&5
     3148if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
     3149  echo $ac_n "(cached) $ac_c" 1>&6
     3150else
     3151  if test -n "$ncn_cv_WINDRES"; then
     3152  ac_cv_prog_ncn_cv_WINDRES="$ncn_cv_WINDRES" # Let the user override the test.
     3153else
     3154  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3155  ac_dummy="$PATH"
     3156  for ac_dir in $ac_dummy; do
     3157    test -z "$ac_dir" && ac_dir=.
     3158    if test -f $ac_dir/$ac_word; then
     3159      ac_cv_prog_ncn_cv_WINDRES="windres"
     3160      break
     3161    fi
     3162  done
     3163  IFS="$ac_save_ifs"
     3164  test -z "$ac_cv_prog_ncn_cv_WINDRES" && ac_cv_prog_ncn_cv_WINDRES="windres"
     3165fi
     3166fi
     3167ncn_cv_WINDRES="$ac_cv_prog_ncn_cv_WINDRES"
     3168if test -n "$ncn_cv_WINDRES"; then
     3169  echo "$ac_t""$ncn_cv_WINDRES" 1>&6
     3170else
     3171  echo "$ac_t""no" 1>&6
     3172fi
     3173 
     3174    WINDRES=$ncn_cv_WINDRES
     3175  else
     3176    WINDRES="${ncn_tool_prefix}windres"
     3177  fi
     3178else
     3179  WINDRES="$ac_cv_prog_WINDRES"
     3180fi
     3181
     3182 if test -n "$ncn_tool_prefix"; then
     3183  # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
     3184set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
     3185echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3186echo "configure:3187: checking for $ac_word" >&5
     3187if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
     3188  echo $ac_n "(cached) $ac_c" 1>&6
     3189else
     3190  if test -n "$OBJCOPY"; then
     3191  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
     3192else
     3193  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3194  ac_dummy="$PATH"
     3195  for ac_dir in $ac_dummy; do
     3196    test -z "$ac_dir" && ac_dir=.
     3197    if test -f $ac_dir/$ac_word; then
     3198      ac_cv_prog_OBJCOPY="${ncn_tool_prefix}objcopy"
     3199      break
     3200    fi
     3201  done
     3202  IFS="$ac_save_ifs"
     3203fi
     3204fi
     3205OBJCOPY="$ac_cv_prog_OBJCOPY"
     3206if test -n "$OBJCOPY"; then
     3207  echo "$ac_t""$OBJCOPY" 1>&6
     3208else
     3209  echo "$ac_t""no" 1>&6
     3210fi
     3211
     3212fi
     3213if test -z "$ac_cv_prog_OBJCOPY" ; then
     3214  if test $build = $host ; then
     3215    ncn_cv_OBJCOPY=$OBJCOPY
     3216    # Extract the first word of "objcopy", so it can be a program name with args.
     3217set dummy objcopy; ac_word=$2
     3218echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3219echo "configure:3220: checking for $ac_word" >&5
     3220if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
     3221  echo $ac_n "(cached) $ac_c" 1>&6
     3222else
     3223  if test -n "$ncn_cv_OBJCOPY"; then
     3224  ac_cv_prog_ncn_cv_OBJCOPY="$ncn_cv_OBJCOPY" # Let the user override the test.
     3225else
     3226  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3227  ac_dummy="$PATH"
     3228  for ac_dir in $ac_dummy; do
     3229    test -z "$ac_dir" && ac_dir=.
     3230    if test -f $ac_dir/$ac_word; then
     3231      ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
     3232      break
     3233    fi
     3234  done
     3235  IFS="$ac_save_ifs"
     3236  test -z "$ac_cv_prog_ncn_cv_OBJCOPY" && ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
     3237fi
     3238fi
     3239ncn_cv_OBJCOPY="$ac_cv_prog_ncn_cv_OBJCOPY"
     3240if test -n "$ncn_cv_OBJCOPY"; then
     3241  echo "$ac_t""$ncn_cv_OBJCOPY" 1>&6
     3242else
     3243  echo "$ac_t""no" 1>&6
     3244fi
     3245 
     3246    OBJCOPY=$ncn_cv_OBJCOPY
     3247  else
     3248    OBJCOPY="${ncn_tool_prefix}objcopy"
     3249  fi
     3250else
     3251  OBJCOPY="$ac_cv_prog_OBJCOPY"
     3252fi
     3253
     3254 if test -n "$ncn_tool_prefix"; then
     3255  # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
     3256set dummy ${ncn_tool_prefix}objdump; ac_word=$2
     3257echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3258echo "configure:3259: checking for $ac_word" >&5
     3259if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
     3260  echo $ac_n "(cached) $ac_c" 1>&6
     3261else
     3262  if test -n "$OBJDUMP"; then
     3263  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
     3264else
     3265  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3266  ac_dummy="$PATH"
     3267  for ac_dir in $ac_dummy; do
     3268    test -z "$ac_dir" && ac_dir=.
     3269    if test -f $ac_dir/$ac_word; then
     3270      ac_cv_prog_OBJDUMP="${ncn_tool_prefix}objdump"
     3271      break
     3272    fi
     3273  done
     3274  IFS="$ac_save_ifs"
     3275fi
     3276fi
     3277OBJDUMP="$ac_cv_prog_OBJDUMP"
     3278if test -n "$OBJDUMP"; then
     3279  echo "$ac_t""$OBJDUMP" 1>&6
     3280else
     3281  echo "$ac_t""no" 1>&6
     3282fi
     3283
     3284fi
     3285if test -z "$ac_cv_prog_OBJDUMP" ; then
     3286  if test $build = $host ; then
     3287    ncn_cv_OBJDUMP=$OBJDUMP
     3288    # Extract the first word of "objdump", so it can be a program name with args.
     3289set dummy objdump; ac_word=$2
     3290echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3291echo "configure:3292: checking for $ac_word" >&5
     3292if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
     3293  echo $ac_n "(cached) $ac_c" 1>&6
     3294else
     3295  if test -n "$ncn_cv_OBJDUMP"; then
     3296  ac_cv_prog_ncn_cv_OBJDUMP="$ncn_cv_OBJDUMP" # Let the user override the test.
     3297else
     3298  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3299  ac_dummy="$PATH"
     3300  for ac_dir in $ac_dummy; do
     3301    test -z "$ac_dir" && ac_dir=.
     3302    if test -f $ac_dir/$ac_word; then
     3303      ac_cv_prog_ncn_cv_OBJDUMP="objdump"
     3304      break
     3305    fi
     3306  done
     3307  IFS="$ac_save_ifs"
     3308  test -z "$ac_cv_prog_ncn_cv_OBJDUMP" && ac_cv_prog_ncn_cv_OBJDUMP="objdump"
     3309fi
     3310fi
     3311ncn_cv_OBJDUMP="$ac_cv_prog_ncn_cv_OBJDUMP"
     3312if test -n "$ncn_cv_OBJDUMP"; then
     3313  echo "$ac_t""$ncn_cv_OBJDUMP" 1>&6
     3314else
     3315  echo "$ac_t""no" 1>&6
     3316fi
     3317 
     3318    OBJDUMP=$ncn_cv_OBJDUMP
     3319  else
     3320    OBJDUMP="${ncn_tool_prefix}objdump"
     3321  fi
     3322else
     3323  OBJDUMP="$ac_cv_prog_OBJDUMP"
     3324fi
     3325
     3326
     3327
     3328
     3329
     3330
     3331
     3332
     3333
     3334# Target tools.
     3335 if test -n "$ncn_target_tool_prefix"; then
     3336  # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
     3337set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
     3338echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3339echo "configure:3340: checking for $ac_word" >&5
     3340if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
     3341  echo $ac_n "(cached) $ac_c" 1>&6
     3342else
     3343  if test -n "$AR_FOR_TARGET"; then
     3344  ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
     3345else
     3346  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3347  ac_dummy="$PATH"
     3348  for ac_dir in $ac_dummy; do
     3349    test -z "$ac_dir" && ac_dir=.
     3350    if test -f $ac_dir/$ac_word; then
     3351      ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
     3352      break
     3353    fi
     3354  done
     3355  IFS="$ac_save_ifs"
     3356fi
     3357fi
     3358AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
     3359if test -n "$AR_FOR_TARGET"; then
     3360  echo "$ac_t""$AR_FOR_TARGET" 1>&6
     3361else
     3362  echo "$ac_t""no" 1>&6
     3363fi
     3364
     3365fi
     3366if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
     3367  if test $build = $target ; then
     3368    ncn_cv_AR_FOR_TARGET=$AR_FOR_TARGET
     3369    # Extract the first word of "ar", so it can be a program name with args.
     3370set dummy ar; ac_word=$2
     3371echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3372echo "configure:3373: checking for $ac_word" >&5
     3373if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
     3374  echo $ac_n "(cached) $ac_c" 1>&6
     3375else
     3376  if test -n "$ncn_cv_AR_FOR_TARGET"; then
     3377  ac_cv_prog_ncn_cv_AR_FOR_TARGET="$ncn_cv_AR_FOR_TARGET" # Let the user override the test.
     3378else
     3379  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3380  ac_dummy="$PATH"
     3381  for ac_dir in $ac_dummy; do
     3382    test -z "$ac_dir" && ac_dir=.
     3383    if test -f $ac_dir/$ac_word; then
     3384      ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
     3385      break
     3386    fi
     3387  done
     3388  IFS="$ac_save_ifs"
     3389  test -z "$ac_cv_prog_ncn_cv_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_AR_FOR_TARGET="ar"
     3390fi
     3391fi
     3392ncn_cv_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_AR_FOR_TARGET"
     3393if test -n "$ncn_cv_AR_FOR_TARGET"; then
     3394  echo "$ac_t""$ncn_cv_AR_FOR_TARGET" 1>&6
     3395else
     3396  echo "$ac_t""no" 1>&6
     3397fi
     3398 
     3399    AR_FOR_TARGET=$ncn_cv_AR_FOR_TARGET
     3400  else
     3401    AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
     3402  fi
     3403else
     3404  AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
     3405fi
     3406
     3407 if test -n "$ncn_target_tool_prefix"; then
     3408  # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
     3409set dummy ${ncn_target_tool_prefix}as; ac_word=$2
     3410echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3411echo "configure:3412: checking for $ac_word" >&5
     3412if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
     3413  echo $ac_n "(cached) $ac_c" 1>&6
     3414else
     3415  if test -n "$AS_FOR_TARGET"; then
     3416  ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
     3417else
     3418  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3419  ac_dummy="$PATH"
     3420  for ac_dir in $ac_dummy; do
     3421    test -z "$ac_dir" && ac_dir=.
     3422    if test -f $ac_dir/$ac_word; then
     3423      ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
     3424      break
     3425    fi
     3426  done
     3427  IFS="$ac_save_ifs"
     3428fi
     3429fi
     3430AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
     3431if test -n "$AS_FOR_TARGET"; then
     3432  echo "$ac_t""$AS_FOR_TARGET" 1>&6
     3433else
     3434  echo "$ac_t""no" 1>&6
     3435fi
     3436
     3437fi
     3438if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
     3439  if test $build = $target ; then
     3440    ncn_cv_AS_FOR_TARGET=$AS_FOR_TARGET
     3441    # Extract the first word of "as", so it can be a program name with args.
     3442set dummy as; ac_word=$2
     3443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3444echo "configure:3445: checking for $ac_word" >&5
     3445if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
     3446  echo $ac_n "(cached) $ac_c" 1>&6
     3447else
     3448  if test -n "$ncn_cv_AS_FOR_TARGET"; then
     3449  ac_cv_prog_ncn_cv_AS_FOR_TARGET="$ncn_cv_AS_FOR_TARGET" # Let the user override the test.
     3450else
     3451  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3452  ac_dummy="$PATH"
     3453  for ac_dir in $ac_dummy; do
     3454    test -z "$ac_dir" && ac_dir=.
     3455    if test -f $ac_dir/$ac_word; then
     3456      ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
     3457      break
     3458    fi
     3459  done
     3460  IFS="$ac_save_ifs"
     3461  test -z "$ac_cv_prog_ncn_cv_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_AS_FOR_TARGET="as"
     3462fi
     3463fi
     3464ncn_cv_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_AS_FOR_TARGET"
     3465if test -n "$ncn_cv_AS_FOR_TARGET"; then
     3466  echo "$ac_t""$ncn_cv_AS_FOR_TARGET" 1>&6
     3467else
     3468  echo "$ac_t""no" 1>&6
     3469fi
     3470 
     3471    AS_FOR_TARGET=$ncn_cv_AS_FOR_TARGET
     3472  else
     3473    AS_FOR_TARGET="${ncn_target_tool_prefix}as"
     3474  fi
     3475else
     3476  AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
     3477fi
     3478
     3479 if test -n "$ncn_target_tool_prefix"; then
     3480  # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
     3481set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
     3482echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3483echo "configure:3484: checking for $ac_word" >&5
     3484if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
     3485  echo $ac_n "(cached) $ac_c" 1>&6
     3486else
     3487  if test -n "$DLLTOOL_FOR_TARGET"; then
     3488  ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
     3489else
     3490  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3491  ac_dummy="$PATH"
     3492  for ac_dir in $ac_dummy; do
     3493    test -z "$ac_dir" && ac_dir=.
     3494    if test -f $ac_dir/$ac_word; then
     3495      ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
     3496      break
     3497    fi
     3498  done
     3499  IFS="$ac_save_ifs"
     3500fi
     3501fi
     3502DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
     3503if test -n "$DLLTOOL_FOR_TARGET"; then
     3504  echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
     3505else
     3506  echo "$ac_t""no" 1>&6
     3507fi
     3508
     3509fi
     3510if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
     3511  if test $build = $target ; then
     3512    ncn_cv_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
     3513    # Extract the first word of "dlltool", so it can be a program name with args.
     3514set dummy dlltool; ac_word=$2
     3515echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3516echo "configure:3517: checking for $ac_word" >&5
     3517if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
     3518  echo $ac_n "(cached) $ac_c" 1>&6
     3519else
     3520  if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
     3521  ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="$ncn_cv_DLLTOOL_FOR_TARGET" # Let the user override the test.
     3522else
     3523  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3524  ac_dummy="$PATH"
     3525  for ac_dir in $ac_dummy; do
     3526    test -z "$ac_dir" && ac_dir=.
     3527    if test -f $ac_dir/$ac_word; then
     3528      ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
     3529      break
     3530    fi
     3531  done
     3532  IFS="$ac_save_ifs"
     3533  test -z "$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET="dlltool"
     3534fi
     3535fi
     3536ncn_cv_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET"
     3537if test -n "$ncn_cv_DLLTOOL_FOR_TARGET"; then
     3538  echo "$ac_t""$ncn_cv_DLLTOOL_FOR_TARGET" 1>&6
     3539else
     3540  echo "$ac_t""no" 1>&6
     3541fi
     3542 
     3543    DLLTOOL_FOR_TARGET=$ncn_cv_DLLTOOL_FOR_TARGET
     3544  else
     3545    DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
     3546  fi
     3547else
     3548  DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
     3549fi
     3550
     3551 if test -n "$ncn_target_tool_prefix"; then
     3552  # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
     3553set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
     3554echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3555echo "configure:3556: checking for $ac_word" >&5
     3556if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
     3557  echo $ac_n "(cached) $ac_c" 1>&6
     3558else
     3559  if test -n "$LD_FOR_TARGET"; then
     3560  ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
     3561else
     3562  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3563  ac_dummy="$PATH"
     3564  for ac_dir in $ac_dummy; do
     3565    test -z "$ac_dir" && ac_dir=.
     3566    if test -f $ac_dir/$ac_word; then
     3567      ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
     3568      break
     3569    fi
     3570  done
     3571  IFS="$ac_save_ifs"
     3572fi
     3573fi
     3574LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
     3575if test -n "$LD_FOR_TARGET"; then
     3576  echo "$ac_t""$LD_FOR_TARGET" 1>&6
     3577else
     3578  echo "$ac_t""no" 1>&6
     3579fi
     3580
     3581fi
     3582if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
     3583  if test $build = $target ; then
     3584    ncn_cv_LD_FOR_TARGET=$LD_FOR_TARGET
     3585    # Extract the first word of "ld", so it can be a program name with args.
     3586set dummy ld; ac_word=$2
     3587echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3588echo "configure:3589: checking for $ac_word" >&5
     3589if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
     3590  echo $ac_n "(cached) $ac_c" 1>&6
     3591else
     3592  if test -n "$ncn_cv_LD_FOR_TARGET"; then
     3593  ac_cv_prog_ncn_cv_LD_FOR_TARGET="$ncn_cv_LD_FOR_TARGET" # Let the user override the test.
     3594else
     3595  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3596  ac_dummy="$PATH"
     3597  for ac_dir in $ac_dummy; do
     3598    test -z "$ac_dir" && ac_dir=.
     3599    if test -f $ac_dir/$ac_word; then
     3600      ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
     3601      break
     3602    fi
     3603  done
     3604  IFS="$ac_save_ifs"
     3605  test -z "$ac_cv_prog_ncn_cv_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_LD_FOR_TARGET="ld"
     3606fi
     3607fi
     3608ncn_cv_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_LD_FOR_TARGET"
     3609if test -n "$ncn_cv_LD_FOR_TARGET"; then
     3610  echo "$ac_t""$ncn_cv_LD_FOR_TARGET" 1>&6
     3611else
     3612  echo "$ac_t""no" 1>&6
     3613fi
     3614 
     3615    LD_FOR_TARGET=$ncn_cv_LD_FOR_TARGET
     3616  else
     3617    LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
     3618  fi
     3619else
     3620  LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
     3621fi
     3622
     3623 if test -n "$ncn_target_tool_prefix"; then
     3624  # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
     3625set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
     3626echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3627echo "configure:3628: checking for $ac_word" >&5
     3628if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
     3629  echo $ac_n "(cached) $ac_c" 1>&6
     3630else
     3631  if test -n "$NM_FOR_TARGET"; then
     3632  ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
     3633else
     3634  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3635  ac_dummy="$PATH"
     3636  for ac_dir in $ac_dummy; do
     3637    test -z "$ac_dir" && ac_dir=.
     3638    if test -f $ac_dir/$ac_word; then
     3639      ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
     3640      break
     3641    fi
     3642  done
     3643  IFS="$ac_save_ifs"
     3644fi
     3645fi
     3646NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
     3647if test -n "$NM_FOR_TARGET"; then
     3648  echo "$ac_t""$NM_FOR_TARGET" 1>&6
     3649else
     3650  echo "$ac_t""no" 1>&6
     3651fi
     3652
     3653fi
     3654if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
     3655  if test $build = $target ; then
     3656    ncn_cv_NM_FOR_TARGET=$NM_FOR_TARGET
     3657    # Extract the first word of "nm", so it can be a program name with args.
     3658set dummy nm; ac_word=$2
     3659echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3660echo "configure:3661: checking for $ac_word" >&5
     3661if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
     3662  echo $ac_n "(cached) $ac_c" 1>&6
     3663else
     3664  if test -n "$ncn_cv_NM_FOR_TARGET"; then
     3665  ac_cv_prog_ncn_cv_NM_FOR_TARGET="$ncn_cv_NM_FOR_TARGET" # Let the user override the test.
     3666else
     3667  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3668  ac_dummy="$PATH"
     3669  for ac_dir in $ac_dummy; do
     3670    test -z "$ac_dir" && ac_dir=.
     3671    if test -f $ac_dir/$ac_word; then
     3672      ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
     3673      break
     3674    fi
     3675  done
     3676  IFS="$ac_save_ifs"
     3677  test -z "$ac_cv_prog_ncn_cv_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_NM_FOR_TARGET="nm"
     3678fi
     3679fi
     3680ncn_cv_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_NM_FOR_TARGET"
     3681if test -n "$ncn_cv_NM_FOR_TARGET"; then
     3682  echo "$ac_t""$ncn_cv_NM_FOR_TARGET" 1>&6
     3683else
     3684  echo "$ac_t""no" 1>&6
     3685fi
     3686 
     3687    NM_FOR_TARGET=$ncn_cv_NM_FOR_TARGET
     3688  else
     3689    NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
     3690  fi
     3691else
     3692  NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
     3693fi
     3694
     3695 if test -n "$ncn_target_tool_prefix"; then
     3696  # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
     3697set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
     3698echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3699echo "configure:3700: checking for $ac_word" >&5
     3700if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
     3701  echo $ac_n "(cached) $ac_c" 1>&6
     3702else
     3703  if test -n "$RANLIB_FOR_TARGET"; then
     3704  ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
     3705else
     3706  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3707  ac_dummy="$PATH"
     3708  for ac_dir in $ac_dummy; do
     3709    test -z "$ac_dir" && ac_dir=.
     3710    if test -f $ac_dir/$ac_word; then
     3711      ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}ranlib"
     3712      break
     3713    fi
     3714  done
     3715  IFS="$ac_save_ifs"
     3716fi
     3717fi
     3718RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
     3719if test -n "$RANLIB_FOR_TARGET"; then
     3720  echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
     3721else
     3722  echo "$ac_t""no" 1>&6
     3723fi
     3724
     3725fi
     3726if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
     3727  if test $build = $target ; then
     3728    ncn_cv_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
     3729    # Extract the first word of "ranlib", so it can be a program name with args.
     3730set dummy ranlib; ac_word=$2
     3731echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3732echo "configure:3733: checking for $ac_word" >&5
     3733if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
     3734  echo $ac_n "(cached) $ac_c" 1>&6
     3735else
     3736  if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
     3737  ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="$ncn_cv_RANLIB_FOR_TARGET" # Let the user override the test.
     3738else
     3739  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3740  ac_dummy="$PATH"
     3741  for ac_dir in $ac_dummy; do
     3742    test -z "$ac_dir" && ac_dir=.
     3743    if test -f $ac_dir/$ac_word; then
     3744      ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET="ranlib"
     3745      break
     3746    fi
     3747  done
     3748  IFS="$ac_save_ifs"
     3749  test -z "$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET=":"
     3750fi
     3751fi
     3752ncn_cv_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET"
     3753if test -n "$ncn_cv_RANLIB_FOR_TARGET"; then
     3754  echo "$ac_t""$ncn_cv_RANLIB_FOR_TARGET" 1>&6
     3755else
     3756  echo "$ac_t""no" 1>&6
     3757fi
     3758 
     3759    RANLIB_FOR_TARGET=$ncn_cv_RANLIB_FOR_TARGET
     3760  else
     3761    RANLIB_FOR_TARGET=":"
     3762  fi
     3763else
     3764  RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
     3765fi
     3766
     3767 if test -n "$ncn_target_tool_prefix"; then
     3768  # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
     3769set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
     3770echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3771echo "configure:3772: checking for $ac_word" >&5
     3772if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
     3773  echo $ac_n "(cached) $ac_c" 1>&6
     3774else
     3775  if test -n "$WINDRES_FOR_TARGET"; then
     3776  ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
     3777else
     3778  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3779  ac_dummy="$PATH"
     3780  for ac_dir in $ac_dummy; do
     3781    test -z "$ac_dir" && ac_dir=.
     3782    if test -f $ac_dir/$ac_word; then
     3783      ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
     3784      break
     3785    fi
     3786  done
     3787  IFS="$ac_save_ifs"
     3788fi
     3789fi
     3790WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
     3791if test -n "$WINDRES_FOR_TARGET"; then
     3792  echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
     3793else
     3794  echo "$ac_t""no" 1>&6
     3795fi
     3796
     3797fi
     3798if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
     3799  if test $build = $target ; then
     3800    ncn_cv_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
     3801    # Extract the first word of "windres", so it can be a program name with args.
     3802set dummy windres; ac_word=$2
     3803echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     3804echo "configure:3805: checking for $ac_word" >&5
     3805if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
     3806  echo $ac_n "(cached) $ac_c" 1>&6
     3807else
     3808  if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
     3809  ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="$ncn_cv_WINDRES_FOR_TARGET" # Let the user override the test.
     3810else
     3811  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
     3812  ac_dummy="$PATH"
     3813  for ac_dir in $ac_dummy; do
     3814    test -z "$ac_dir" && ac_dir=.
     3815    if test -f $ac_dir/$ac_word; then
     3816      ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
     3817      break
     3818    fi
     3819  done
     3820  IFS="$ac_save_ifs"
     3821  test -z "$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET="windres"
     3822fi
     3823fi
     3824ncn_cv_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET"
     3825if test -n "$ncn_cv_WINDRES_FOR_TARGET"; then
     3826  echo "$ac_t""$ncn_cv_WINDRES_FOR_TARGET" 1>&6
     3827else
     3828  echo "$ac_t""no" 1>&6
     3829fi
     3830 
     3831    WINDRES_FOR_TARGET=$ncn_cv_WINDRES_FOR_TARGET
     3832  else
     3833    WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
     3834  fi
     3835else
     3836  WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
     3837fi
     3838
     3839
     3840
     3841
     3842
     3843
     3844
     3845
     3846
     3847
     3848
     3849# Fix up target tools.
     3850if test "x${build}" = "x${host}" ; then
     3851  # In this case, the newly built tools can and should be used,
     3852  # so we override the results of the autoconf tests.
     3853  # This should really only happen when the tools are actually being built,
     3854  # but that's a further refinement.  The new build scheme, where
     3855  # tools are built into a structure paralleling where they're installed,
     3856  # should also eliminate all of this cleanly.
     3857  AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
     3858  AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
     3859  DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
     3860  LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
     3861  NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
     3862  RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
     3863  WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
     3864fi
     3865# Certain tools may need extra flags.
     3866AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
     3867RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
     3868NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
     3869
     3870echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
     3871echo "configure:3872: checking whether to enable maintainer-specific portions of Makefiles" >&5
     3872# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
     3873if test "${enable_maintainer_mode+set}" = set; then
     3874  enableval="$enable_maintainer_mode"
     3875  USE_MAINTAINER_MODE=$enableval
     3876else
     3877  USE_MAINTAINER_MODE=no
     3878fi
     3879
     3880echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
     3881
     3882
     3883if test "$USE_MAINTAINER_MODE" = yes; then
     3884  MAINTAINER_MODE_TRUE=
     3885  MAINTAINER_MODE_FALSE='#'
     3886else
     3887  MAINTAINER_MODE_TRUE='#'
     3888  MAINTAINER_MODE_FALSE=
     3889fi     
     3890MAINT=$MAINTAINER_MODE_TRUE
     3891
     3892trap '' 1 2 15
     3893cat > confcache <<\EOF
     3894# This file is a shell script that caches the results of configure
     3895# tests run on this system so they can be shared between configure
     3896# scripts and configure runs.  It is not useful on other systems.
     3897# If it contains results you don't want to keep, you may remove or edit it.
     3898#
     3899# By default, configure uses ./config.cache as the cache file,
     3900# creating it if it does not exist already.  You can give configure
     3901# the --cache-file=FILE option to use a different cache file; that is
     3902# what configure does when it calls configure scripts in
     3903# subdirectories, so they share the cache.
     3904# Giving --cache-file=/dev/null disables caching, for debugging configure.
     3905# config.status only pays attention to the cache file if you give it the
     3906# --recheck option to rerun configure.
     3907#
    11793908EOF
    1180                         ;;
    1181                 esac
    1182         fi
    1183 
    1184         # Install a makefile, and make it set VPATH
    1185         # if necessary so that the sources are found.
    1186         # Also change its value of srcdir.
    1187         # NOTE: Makefile generation constitutes the majority of the time in configure.  Hence, this section has
    1188         # been somewhat optimized and is perhaps a bit twisty.
    1189 
    1190         # code is order so as to try to sed the smallest input files we know.
    1191         # so do these separately because I don't trust the order of sed -e expressions.
    1192 
    1193         # the five makefile fragments MUST end up in the resulting Makefile in this order:
    1194         # package macros, target, host, site, and package rules.
    1195 
    1196         if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
    1197 
    1198             # Conditionalize the makefile for this package from "Makefile.in" (or whatever it's called) into Makefile.tem.
    1199             rm -f ${subdir}/${Makefile}.tem
    1200             case "${package_makefile_rules_frag}" in
    1201               "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
    1202               *)
    1203                       if [ ! -f ${package_makefile_rules_frag} ] ; then
    1204                               package_makefile_rules_frag=${srcdir}/${package_makefile_rules_frag}
    1205                       fi
    1206                       if [ -f ${package_makefile_rules_frag} ] ; then
    1207                               sed -e "/^####/  r ${package_makefile_rules_frag}" ${srcdir}/${subdir}/${Makefile_in} > ${Makefile}.tem
    1208                       else
    1209                               echo '***' Expected package makefile rules fragment \"${package_makefile_rules_frag}\" 1>&2
    1210                               echo '***' is missing in ${PWD=`pwd`}. 1>&2
    1211                               cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
    1212                       fi
    1213             esac
    1214             # working copy now in ${Makefile}.tem
    1215 
    1216             # Conditionalize for this site.
    1217             rm -f ${Makefile}
    1218               case "${site}" in
    1219               "") mv ${subdir}/Makefile.tem ${Makefile} ;;
    1220               *)
    1221                       site_makefile_frag=${srcdir}/config/ms-${site}
    1222 
    1223                       if [ -f ${site_makefile_frag} ] ; then
    1224                               sed -e "/^####/  r ${site_makefile_frag}" ${subdir}/Makefile.tem \
    1225                                       > ${Makefile}
    1226                       else
    1227                               mv ${subdir}/Makefile.tem ${Makefile}
    1228                               site_makefile_frag=
    1229                       fi
    1230                       ;;
    1231             esac
    1232             # working copy now in ${Makefile}
    1233 
    1234             # Conditionalize the makefile for this host.
    1235             rm -f ${subdir}/Makefile.tem
    1236             case "${host_makefile_frag}" in
    1237               "") mv ${Makefile} ${subdir}/Makefile.tem ;;
    1238               *)
    1239                       if [ ! -f ${host_makefile_frag} ] ; then
    1240                               host_makefile_frag=${srcdir}/${host_makefile_frag}
    1241                       fi
    1242                       if [ -f ${host_makefile_frag} ] ; then
    1243                               sed -e "/^####/  r ${host_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
    1244                       else
    1245                               echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
    1246                               echo '***' is missing in ${PWD=`pwd`}. 1>&2
    1247                               mv ${Makefile} ${subdir}/Makefile.tem
    1248                       fi
    1249             esac
    1250             # working copy now in ${subdir)/Makefile.tem
    1251 
    1252             # Conditionalize the makefile for this target.
    1253             rm -f ${Makefile}
    1254             case "${target_makefile_frag}" in
    1255               "") mv ${subdir}/Makefile.tem ${Makefile} ;;
    1256               *)
    1257                       if [ ! -f ${target_makefile_frag} ] ; then
    1258                               target_makefile_frag=${srcdir}/${target_makefile_frag}
    1259                       fi
    1260                       if [ -f ${target_makefile_frag} ] ; then
    1261                               sed -e "/^####/  r ${target_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
    1262                       else
    1263                               mv ${subdir}/Makefile.tem ${Makefile}
    1264                               target_makefile_frag=
    1265                       fi
    1266                       ;;
    1267             esac
    1268             # working copy now in ${Makefile}
    1269 
    1270             # Emit the default values of this package's macros.
    1271             rm -f ${subdir}/Makefile.tem
    1272             case "${package_makefile_frag}" in
    1273               "") mv ${Makefile} ${subdir}/Makefile.tem ;;
    1274               *)
    1275                       if [ ! -f ${package_makefile_frag} ] ; then
    1276                               package_makefile_frag=${srcdir}/${package_makefile_frag}
    1277                       fi
    1278                       if [ -f ${package_makefile_frag} ] ; then
    1279                               sed -e "/^####/  r ${package_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
    1280                       else
    1281                               echo '***' Expected package makefile fragment \"${package_makefile_rules_frag}\" 1>&2
    1282                               echo '***' is missing in ${PWD=`pwd`}. 1>&2
    1283                               mv ${Makefile} ${subdir}/Makefile.tem
    1284                       fi
    1285             esac
    1286             # real copy now in ${subdir}/Makefile.tem
    1287 
    1288             # prepend warning about editting, and a bunch of variables.
    1289             rm -f ${Makefile}
    1290             cat > ${Makefile} <<EOF
    1291 # ${NO_EDIT}
    1292 VPATH = ${makesrcdir}
    1293 links = ${configlinks}
    1294 host_alias = ${host_alias}
    1295 host_cpu = ${host_cpu}
    1296 host_vendor = ${host_vendor}
    1297 host_os = ${host_os}
    1298 host_canonical = ${host_cpu}-${host_vendor}-${host_os}
    1299 target_alias = ${target_alias}
    1300 target_cpu = ${target_cpu}
    1301 target_vendor = ${target_vendor}
    1302 target_os = ${target_os}
    1303 target_canonical = ${target_cpu}-${target_vendor}-${target_os}
     3909# The following way of writing the cache mishandles newlines in values,
     3910# but we know of no workaround that is simple, portable, and efficient.
     3911# So, don't put newlines in cache variables' values.
     3912# Ultrix sh set writes to stderr and can't be redirected directly,
     3913# and sets the high bit in the cache file unless we assign to the vars.
     3914(set) 2>&1 |
     3915  case `(ac_space=' '; set | grep ac_space) 2>&1` in
     3916  *ac_space=\ *)
     3917    # `set' does not quote correctly, so add quotes (double-quote substitution
     3918    # turns \\\\ into \\, and sed turns \\ into \).
     3919    sed -n \
     3920      -e "s/'/'\\\\''/g" \
     3921      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
     3922    ;;
     3923  *)
     3924    # `set' quotes correctly as required by POSIX, so do not add quotes.
     3925    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
     3926    ;;
     3927  esac >> confcache
     3928if cmp -s $cache_file confcache; then
     3929  :
     3930else
     3931  if test -w $cache_file; then
     3932    echo "updating cache $cache_file"
     3933    cat confcache > $cache_file
     3934  else
     3935    echo "not updating unwritable cache $cache_file"
     3936  fi
     3937fi
     3938rm -f confcache
     3939
     3940trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
     3941
     3942test "x$prefix" = xNONE && prefix=$ac_default_prefix
     3943# Let make expand exec_prefix.
     3944test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
     3945
     3946# Any assignment to VPATH causes Sun make to only execute
     3947# the first set of double-colon rules, so remove it if not needed.
     3948# If there is a colon in the path, we need to keep it.
     3949if test "x$srcdir" = x.; then
     3950  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
     3951fi
     3952
     3953trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
     3954
     3955# Transform confdefs.h into DEFS.
     3956# Protect against shell expansion while executing Makefile rules.
     3957# Protect against Makefile macro expansion.
     3958cat > conftest.defs <<\EOF
     3959s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
     3960s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
     3961s%\[%\\&%g
     3962s%\]%\\&%g
     3963s%\$%$$%g
    13043964EOF
    1305             case "${build}" in
    1306               "") ;;
    1307               *)  cat >> ${Makefile} << EOF
    1308 build_alias = ${build_alias}
    1309 build_cpu = ${build_cpu}
    1310 build_vendor = ${build_vendor}
    1311 build_os = ${build_os}
    1312 build_canonical = ${build_cpu}-${build_vendor}-${build_os}
     3965DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
     3966rm -f conftest.defs
     3967
     3968
     3969# Without the "./", some shells look in PATH for config.status.
     3970: ${CONFIG_STATUS=./config.status}
     3971
     3972echo creating $CONFIG_STATUS
     3973rm -f $CONFIG_STATUS
     3974cat > $CONFIG_STATUS <<EOF
     3975#! /bin/sh
     3976# Generated automatically by configure.
     3977# Run this file to recreate the current configuration.
     3978# This directory was configured as follows,
     3979# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
     3980#
     3981# $0 $ac_configure_args
     3982#
     3983# Compiler output produced by configure, useful for debugging
     3984# configure, is in ./config.log if it exists.
     3985
     3986ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
     3987for ac_option
     3988do
     3989  case "\$ac_option" in
     3990  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     3991    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     3992    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
     3993  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
     3994    echo "$CONFIG_STATUS generated by autoconf version 2.13"
     3995    exit 0 ;;
     3996  -help | --help | --hel | --he | --h)
     3997    echo "\$ac_cs_usage"; exit 0 ;;
     3998  *) echo "\$ac_cs_usage"; exit 1 ;;
     3999  esac
     4000done
     4001
     4002ac_given_srcdir=$srcdir
     4003
     4004trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
    13134005EOF
    1314             esac
    1315 
    1316             case "${package_makefile_frag}" in
    1317               "") ;;
    1318               /*) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
    1319               *)  echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
    1320             esac
    1321 
    1322             case "${target_makefile_frag}" in
    1323               "") ;;
    1324               /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
    1325               *)  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
    1326             esac
    1327 
    1328             case "${host_makefile_frag}" in
    1329               "") ;;
    1330               /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
    1331               *)  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
    1332             esac
    1333 
    1334             if [ "${site_makefile_frag}" != "" ] ; then
    1335                 echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
    1336             fi
    1337 
    1338             # record if we want to build shared libs.
    1339             if test -z "${enable_shared}"; then
    1340                 echo enable_shared = no >> ${Makefile}
    1341             else
    1342                 echo enable_shared = ${enable_shared} >> ${Makefile}
    1343             fi
    1344             # record if we want to rumtime library stuff installed in libsubdir.
    1345             if test -z "${enable_version_specific_runtime_libs}"; then
    1346                 echo enable_version_specific_runtime_libs = no >> ${Makefile}
    1347             else
    1348                 echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
    1349             fi
    1350 
    1351             # Emit a macro which describes the file containing gcc's
    1352             # version number.
    1353             echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
    1354             # And emit a macro defining gcc's version number.
    1355             echo gcc_version = ${gcc_version} >> ${Makefile}
    1356 
    1357             # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
    1358             # remove any form feeds.
    1359             if [ -z "${subdirs}" ]; then
    1360                 rm -f ${subdir}/Makefile.tm2
    1361                 sed -e "s:^SUBDIRS[     ]*=.*$:SUBDIRS = ${configdirs}:" \
    1362                     -e "s:^NONSUBDIRS[  ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \
    1363                     ${subdir}/Makefile.tem > ${subdir}/Makefile.tm2
    1364                 rm -f ${subdir}/Makefile.tem
    1365                 mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem
    1366             fi
    1367             sed     -e "s|^prefix[      ]*=.*$|prefix = ${prefix}|" \
    1368                     -e "s|^exec_prefix[         ]*=.*$|exec_prefix = ${exec_prefix}|" \
    1369                     -e "s|^bindir[      ]*=.*$|bindir = ${bindir}|" \
    1370                     -e "s|^sbindir[     ]*=.*$|sbindir = ${sbindir}|" \
    1371                     -e "s|^libexecdir[  ]*=.*$|libexecdir = ${libexecdir}|" \
    1372                     -e "s|^datadir[     ]*=.*$|datadir = ${datadir}|" \
    1373                     -e "s|^sysconfdir[  ]*=.*$|sysconfdir = ${sysconfdir}|" \
    1374                     -e "s|^sharedstatedir[      ]*=.*$|sharedstatedir = ${sharedstatedir}|" \
    1375                     -e "s|^localstatedir[       ]*=.*$|localstatedir = ${localstatedir}|" \
    1376                     -e "s|^libdir[      ]*=.*$|libdir = ${libdir}|" \
    1377                     -e "s|^includedir[  ]*=.*$|includedir = ${includedir}|" \
    1378                     -e "s|^oldincludedir[       ]*=.*$|oldincludedir = ${oldincludedir}|" \
    1379                     -e "s|^infodir[     ]*=.*$|infodir = ${infodir}|" \
    1380                     -e "s|^mandir[      ]*=.*$|mandir = ${mandir}|" \
    1381                     -e "/^CC[   ]*=/{
    1382                         :loop1
    1383                         /\\\\$/ N
    1384                         s/\\\\\\n//g
    1385                         t loop1
    1386                         s%^CC[  ]*=.*$%CC = ${CC}%
    1387                         }" \
    1388                     -e "/^CXX[  ]*=/{
    1389                         :loop2
    1390                         /\\\\$/ N
    1391                         s/\\\\\\n//g
    1392                         t loop2
    1393                         s%^CXX[         ]*=.*$%CXX = ${CXX}%
    1394                         }" \
    1395                     -e "/^CFLAGS[       ]*=/{
    1396                         :loop3
    1397                         /\\\\$/ N
    1398                         s/\\\\\\n//g
    1399                         t loop3
    1400                         s%^CFLAGS[      ]*=.*$%CFLAGS = ${CFLAGS}%
    1401                         }" \
    1402                     -e "/^CXXFLAGS[     ]*=/{
    1403                         :loop4
    1404                         /\\\\$/ N
    1405                         s/\\\\\\n//g
    1406                         t loop4
    1407                         s%^CXXFLAGS[    ]*=.*$%CXXFLAGS = ${CXXFLAGS}%
    1408                         }" \
    1409                     -e "s|^SHELL[        ]*=.*$|SHELL = ${config_shell}|" \
    1410                     -e "s|^srcdir[      ]*=.*$|srcdir = ${makesrcdir}|" \
    1411                     -e "s/
    1412 //" \
    1413                     -e "s:^program_prefix[      ]*=.*$:program_prefix = ${program_prefix}:" \
    1414                     -e "s:^program_suffix[      ]*=.*$:program_suffix = ${program_suffix}:" \
    1415                     -e "s:^program_transform_name[      ]*=.*$:program_transform_name = ${program_transform_name}:" \
    1416                     -e "s|^tooldir[     ]*=.*$|tooldir = ${tooldir}|" \
    1417                     -e "s|^build_tooldir[       ]*=.*$|build_tooldir = ${tooldir}|" \
    1418                     -e "s:^DEFAULT_YACC[         ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
    1419                     -e "s:^DEFAULT_LEX[  ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
    1420                     -e "s:^DEFAULT_M4[  ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
    1421                     ${subdir}/Makefile.tem >> ${Makefile}
    1422  
    1423             sed -e "s:^GDB_TK[   ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
    1424             mv -f ${Makefile}.tem ${Makefile}
    1425 
    1426             # If this is a Canadian Cross, preset the values of many more
    1427             # tools.
    1428             if [ "${build}" != "${host}" ]; then
    1429                 for var in ${tools}; do
    1430                     eval val=\$${var}
    1431                     sed -e "/^${var}[   ]*=/{
    1432                            :loop1
    1433                            /\\\\$/ N
    1434                            /\\\\$/ b loop1
    1435                            s/\\\\\\n//g
    1436                            s%^${var}[   ]*=.*$%${var} = ${val}%
    1437                            }" ${Makefile} > ${Makefile}.tem
    1438                     mv -f ${Makefile}.tem ${Makefile}
    1439                 done
    1440             fi
    1441 
    1442             # final copy now in ${Makefile}
    1443 
    1444         else
    1445            echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
    1446         fi
    1447 
    1448         rm -f ${subdir}/Makefile.tem
    1449 
    1450         case "${host_makefile_frag}" in
    1451         "") using= ;;
    1452         *) using="and \"${host_makefile_frag}\"" ;;
    1453         esac
    1454 
    1455         case "${target_makefile_frag}" in
    1456         "") ;;
    1457         *) using="${using} and \"${target_makefile_frag}\"" ;;
    1458         esac
    1459 
    1460         case "${site_makefile_frag}" in
    1461         "") ;;
    1462         *) using="${using} and \"${site_makefile_frag}\"" ;;
    1463         esac
    1464 
    1465         newusing=`echo "${using}" | sed 's/and/using/'`
    1466         using=${newusing}
    1467         echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
    1468 
    1469         . ${tmpfile}.pos
    1470 
    1471         # describe the chosen configuration in config.status.
    1472         # Make that file a shellscript which will reestablish
    1473         # the same configuration.  Used in Makefiles to rebuild
    1474         # Makefiles.
    1475 
    1476         case "${norecursion}" in
    1477         "") arguments="${arguments} --norecursion" ;;
    1478         *) ;;
    1479         esac
    1480 
    1481         if [ ${subdir} = . ] ; then
    1482             echo "#!/bin/sh
    1483 # ${NO_EDIT}
    1484 # This directory was configured as follows:
    1485 ${progname}" ${arguments}  "
    1486 # ${using}" > ${subdir}/config.new
    1487         else
    1488             echo "#!/bin/sh
    1489 # ${NO_EDIT}
    1490 # This directory was configured as follows:
    1491 cd ${invsubdir}
    1492 ${progname}" ${arguments}  "
    1493 # ${using}" > ${subdir}/config.new
    1494         fi
    1495         chmod a+x ${subdir}/config.new
    1496         if [ -r ${subdir}/config.back ] ; then
    1497                 mv -f ${subdir}/config.back ${subdir}/config.status
    1498         fi
    1499         ${config_shell} ${moveifchange} ${subdir}/config.new ${subdir}/config.status
    1500         ;;
    1501 
    1502     *)  rm -f ${Makefile} ${subdir}/config.status ${links} ;;
    1503     esac
     4006cat >> $CONFIG_STATUS <<EOF
     4007
     4008# Protect against being on the right side of a sed subst in config.status.
     4009sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
     4010 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
     4011$ac_vpsub
     4012$extrasub
     4013s%@SHELL@%$SHELL%g
     4014s%@CFLAGS@%$CFLAGS%g
     4015s%@CPPFLAGS@%$CPPFLAGS%g
     4016s%@CXXFLAGS@%$CXXFLAGS%g
     4017s%@FFLAGS@%$FFLAGS%g
     4018s%@DEFS@%$DEFS%g
     4019s%@LDFLAGS@%$LDFLAGS%g
     4020s%@LIBS@%$LIBS%g
     4021s%@exec_prefix@%$exec_prefix%g
     4022s%@prefix@%$prefix%g
     4023s%@program_transform_name@%$program_transform_name%g
     4024s%@bindir@%$bindir%g
     4025s%@sbindir@%$sbindir%g
     4026s%@libexecdir@%$libexecdir%g
     4027s%@datadir@%$datadir%g
     4028s%@sysconfdir@%$sysconfdir%g
     4029s%@sharedstatedir@%$sharedstatedir%g
     4030s%@localstatedir@%$localstatedir%g
     4031s%@libdir@%$libdir%g
     4032s%@includedir@%$includedir%g
     4033s%@oldincludedir@%$oldincludedir%g
     4034s%@infodir@%$infodir%g
     4035s%@mandir@%$mandir%g
     4036s%@host@%$host%g
     4037s%@host_alias@%$host_alias%g
     4038s%@host_cpu@%$host_cpu%g
     4039s%@host_vendor@%$host_vendor%g
     4040s%@host_os@%$host_os%g
     4041s%@target@%$target%g
     4042s%@target_alias@%$target_alias%g
     4043s%@target_cpu@%$target_cpu%g
     4044s%@target_vendor@%$target_vendor%g
     4045s%@target_os@%$target_os%g
     4046s%@build@%$build%g
     4047s%@build_alias@%$build_alias%g
     4048s%@build_cpu@%$build_cpu%g
     4049s%@build_vendor@%$build_vendor%g
     4050s%@build_os@%$build_os%g
     4051s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
     4052/@maybe_dependencies@/r $maybe_dependencies
     4053s%@maybe_dependencies@%%g
     4054/@serialization_dependencies@/r $serialization_dependencies
     4055s%@serialization_dependencies@%%g
     4056/@host_makefile_frag@/r $host_makefile_frag
     4057s%@host_makefile_frag@%%g
     4058/@target_makefile_frag@/r $target_makefile_frag
     4059s%@target_makefile_frag@%%g
     4060/@alphaieee_frag@/r $alphaieee_frag
     4061s%@alphaieee_frag@%%g
     4062/@ospace_frag@/r $ospace_frag
     4063s%@ospace_frag@%%g
     4064s%@SET_LIB_PATH@%$SET_LIB_PATH%g
     4065s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
     4066s%@BUILD_PREFIX@%$BUILD_PREFIX%g
     4067s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
     4068s%@configlinks@%$configlinks%g
     4069s%@gcc_version_trigger@%$gcc_version_trigger%g
     4070s%@gcc_version@%$gcc_version%g
     4071s%@tooldir@%$tooldir%g
     4072s%@build_tooldir@%$build_tooldir%g
     4073s%@GDB_TK@%$GDB_TK%g
     4074s%@gxx_include_dir@%$gxx_include_dir%g
     4075s%@libstdcxx_incdir@%$libstdcxx_incdir%g
     4076s%@build_subdir@%$build_subdir%g
     4077s%@build_configargs@%$build_configargs%g
     4078s%@configure_build_modules@%$configure_build_modules%g
     4079s%@all_build_modules@%$all_build_modules%g
     4080s%@host_configargs@%$host_configargs%g
     4081s%@configdirs@%$configdirs%g
     4082s%@configure_host_modules@%$configure_host_modules%g
     4083s%@all_host_modules@%$all_host_modules%g
     4084s%@check_host_modules@%$check_host_modules%g
     4085s%@install_host_modules@%$install_host_modules%g
     4086s%@install_host_modules_nogcc@%$install_host_modules_nogcc%g
     4087s%@target_subdir@%$target_subdir%g
     4088s%@target_configargs@%$target_configargs%g
     4089s%@target_configdirs@%$target_configdirs%g
     4090s%@configure_target_modules@%$configure_target_modules%g
     4091s%@all_target_modules@%$all_target_modules%g
     4092s%@check_target_modules@%$check_target_modules%g
     4093s%@install_target_modules@%$install_target_modules%g
     4094s%@BISON@%$BISON%g
     4095s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
     4096s%@LEX@%$LEX%g
     4097s%@MAKEINFO@%$MAKEINFO%g
     4098s%@YACC@%$YACC%g
     4099s%@config_shell@%$config_shell%g
     4100s%@AR@%$AR%g
     4101s%@ncn_cv_AR@%$ncn_cv_AR%g
     4102s%@AS@%$AS%g
     4103s%@ncn_cv_AS@%$ncn_cv_AS%g
     4104s%@DLLTOOL@%$DLLTOOL%g
     4105s%@ncn_cv_DLLTOOL@%$ncn_cv_DLLTOOL%g
     4106s%@LD@%$LD%g
     4107s%@ncn_cv_LD@%$ncn_cv_LD%g
     4108s%@NM@%$NM%g
     4109s%@ncn_cv_NM@%$ncn_cv_NM%g
     4110s%@RANLIB@%$RANLIB%g
     4111s%@ncn_cv_RANLIB@%$ncn_cv_RANLIB%g
     4112s%@WINDRES@%$WINDRES%g
     4113s%@ncn_cv_WINDRES@%$ncn_cv_WINDRES%g
     4114s%@OBJCOPY@%$OBJCOPY%g
     4115s%@ncn_cv_OBJCOPY@%$ncn_cv_OBJCOPY%g
     4116s%@OBJDUMP@%$OBJDUMP%g
     4117s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g
     4118s%@CC@%$CC%g
     4119s%@CXX@%$CXX%g
     4120s%@DEFAULT_YACC@%$DEFAULT_YACC%g
     4121s%@DEFAULT_LEX@%$DEFAULT_LEX%g
     4122s%@DEFAULT_M4@%$DEFAULT_M4%g
     4123s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
     4124s%@ncn_cv_AR_FOR_TARGET@%$ncn_cv_AR_FOR_TARGET%g
     4125s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
     4126s%@ncn_cv_AS_FOR_TARGET@%$ncn_cv_AS_FOR_TARGET%g
     4127s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
     4128s%@ncn_cv_DLLTOOL_FOR_TARGET@%$ncn_cv_DLLTOOL_FOR_TARGET%g
     4129s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
     4130s%@ncn_cv_LD_FOR_TARGET@%$ncn_cv_LD_FOR_TARGET%g
     4131s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
     4132s%@ncn_cv_NM_FOR_TARGET@%$ncn_cv_NM_FOR_TARGET%g
     4133s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
     4134s%@ncn_cv_RANLIB_FOR_TARGET@%$ncn_cv_RANLIB_FOR_TARGET%g
     4135s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
     4136s%@ncn_cv_WINDRES_FOR_TARGET@%$ncn_cv_WINDRES_FOR_TARGET%g
     4137s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
     4138s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
     4139s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
     4140s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
     4141s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
     4142s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
     4143s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
     4144s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
     4145s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
     4146s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
     4147s%@MAINT@%$MAINT%g
     4148
     4149CEOF
     4150EOF
     4151
     4152cat >> $CONFIG_STATUS <<\EOF
     4153
     4154# Split the substitutions into bite-sized pieces for seds with
     4155# small command number limits, like on Digital OSF/1 and HP-UX.
     4156ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
     4157ac_file=1 # Number of current file.
     4158ac_beg=1 # First line for current file.
     4159ac_end=$ac_max_sed_cmds # Line after last line for current file.
     4160ac_more_lines=:
     4161ac_sed_cmds=""
     4162while $ac_more_lines; do
     4163  if test $ac_beg -gt 1; then
     4164    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
     4165  else
     4166    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
     4167  fi
     4168  if test ! -s conftest.s$ac_file; then
     4169    ac_more_lines=false
     4170    rm -f conftest.s$ac_file
     4171  else
     4172    if test -z "$ac_sed_cmds"; then
     4173      ac_sed_cmds="sed -f conftest.s$ac_file"
     4174    else
     4175      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
     4176    fi
     4177    ac_file=`expr $ac_file + 1`
     4178    ac_beg=$ac_end
     4179    ac_end=`expr $ac_end + $ac_max_sed_cmds`
     4180  fi
    15044181done
    1505 
    1506 # If there are subdirectories, then recur.
    1507 if [ -z "${norecursion}" ] && [ -n "${configdirs}" ] ; then
    1508         for configdir in ${configdirs} ${extraconfigdirs} ; do
    1509 
    1510                 # If configdir contains ',' it is
    1511                 # srcdir,builddir,target_alias
    1512                 # These come from extraconfigdirs.
    1513                 case ${configdir} in
    1514                 *,*)
    1515                     eval `echo ${configdir} | sed -e 's/\([^,]*\),\([^,]*\),\(.*\)/cfg_dir=\1 bld_dir=\2 tgt_alias=\3/'`
    1516                     ;;
    1517                 *)
    1518                     cfg_dir=${configdir}
    1519                     bld_dir=${configdir}
    1520                     tgt_alias=${target_alias}
    1521                     ;;
    1522                 esac
    1523 
    1524                 if [ -d ${srcdir}/${cfg_dir} ] ; then
    1525                         eval echo Configuring ${configdir}... ${redirect}
    1526                         case "${srcdir}" in
    1527                         ".") ;;
    1528                         *)
    1529                                 if [ ! -d ./${bld_dir} ] ; then
    1530                                         if mkdir ./${bld_dir} ; then
    1531                                                 true
    1532                                         else
    1533                                                 echo '***' "${progname}: could not make ${PWD=`pwd`}/${bld_dir}" 1>&2
    1534                                                 exit 1
    1535                                         fi
    1536                                 fi
    1537                                 ;;
    1538                         esac
    1539 
    1540                         POPDIR=${PWD=`pwd`}
    1541                         cd ${bld_dir}
    1542 
    1543 ### figure out what to do with srcdir
    1544                         case "${srcdir}" in
    1545                         ".") newsrcdir=${srcdir} ;; # no -srcdir option.  We're building in place.
    1546                         /*) # absolute path
    1547                                 newsrcdir=${srcdir}/${cfg_dir}
    1548                                 srcdiroption="--srcdir=${newsrcdir}"
    1549                                 ;;
    1550                         ?:*) # absolute path on win32
    1551                                 newsrcdir=${srcdir}/${cfg_dir}
    1552                                 srcdiroption="--srcdir=${newsrcdir}"
    1553                                 ;;
    1554                         *) # otherwise relative
    1555                                 newsrcdir=../${srcdir}/${cfg_dir}
    1556                                 srcdiroption="--srcdir=${newsrcdir}"
    1557                                 ;;
    1558                         esac
    1559 
    1560                         # Handle --cache-file=../XXX
    1561                         case "${cache_file}" in
    1562                         "") # empty
    1563                                 ;;
    1564                         /*) # absolute path
    1565                                 cache_file_option="--cache-file=${cache_file}"
    1566                                 ;;
    1567                         ?:*) # absolute path on win32
    1568                                 cache_file_option="--cache-file=${cache_file}"
    1569                                 ;;
    1570                         *) # relative path
    1571                                 cache_file_option="--cache-file=../${cache_file}"
    1572                                 ;;
    1573                         esac
    1574 
    1575 ### check for guested configure, otherwise fix possibly relative progname
    1576                         if [ -f ${newsrcdir}/configure ] ; then
    1577                                 recprog=${newsrcdir}/configure
    1578                         elif [ -f ${newsrcdir}/configure.in ] ; then
    1579                                 case "${progname}" in
    1580                                 /*)     recprog=${progname} ;;
    1581                                 ?:*)    recprog=${progname} ;;
    1582                                 *)      recprog=../${progname} ;;
    1583                                 esac
    1584                         else
    1585                                 eval echo No configuration information in ${cfg_dir} ${redirect}
    1586                                 recprog=
    1587                         fi
    1588 
    1589 ### The recursion line is here.
    1590                         if [ ! -z "${recprog}" ] ; then
    1591                                 if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${tgt_alias} \
    1592                                         ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
    1593                                         ${srcdiroption} ${diroptions} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
    1594                                         true
    1595                                 else
    1596                                         echo Configure in `pwd` failed, exiting. 1>&2
    1597                                         exit 1
    1598                                 fi
    1599                         fi
    1600 
    1601                         cd ${POPDIR}
    1602                 fi
    1603         done
    1604 fi
    1605 
    1606 # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
    1607 # and reset the trap handler.
    1608 rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
    1609 trap 0
     4182if test -z "$ac_sed_cmds"; then
     4183  ac_sed_cmds=cat
     4184fi
     4185EOF
     4186
     4187cat >> $CONFIG_STATUS <<EOF
     4188
     4189CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
     4190EOF
     4191cat >> $CONFIG_STATUS <<\EOF
     4192for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
     4193  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
     4194  case "$ac_file" in
     4195  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
     4196       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
     4197  *) ac_file_in="${ac_file}.in" ;;
     4198  esac
     4199
     4200  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
     4201
     4202  # Remove last slash and all that follows it.  Not all systems have dirname.
     4203  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
     4204  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
     4205    # The file is in a subdirectory.
     4206    test ! -d "$ac_dir" && mkdir "$ac_dir"
     4207    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
     4208    # A "../" for each directory in $ac_dir_suffix.
     4209    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
     4210  else
     4211    ac_dir_suffix= ac_dots=
     4212  fi
     4213
     4214  case "$ac_given_srcdir" in
     4215  .)  srcdir=.
     4216      if test -z "$ac_dots"; then top_srcdir=.
     4217      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
     4218  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
     4219  *) # Relative path.
     4220    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
     4221    top_srcdir="$ac_dots$ac_given_srcdir" ;;
     4222  esac
     4223
     4224
     4225  echo creating "$ac_file"
     4226  rm -f "$ac_file"
     4227  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
     4228  case "$ac_file" in
     4229  *Makefile*) ac_comsub="1i\\
     4230# $configure_input" ;;
     4231  *) ac_comsub= ;;
     4232  esac
     4233
     4234  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
     4235  sed -e "$ac_comsub
     4236s%@configure_input@%$configure_input%g
     4237s%@srcdir@%$srcdir%g
     4238s%@top_srcdir@%$top_srcdir%g
     4239" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
     4240fi; done
     4241rm -f conftest.s*
     4242
     4243EOF
     4244cat >> $CONFIG_STATUS <<EOF
     4245
     4246EOF
     4247cat >> $CONFIG_STATUS <<\EOF
    16104248
    16114249exit 0
    1612 
    1613 #
    1614 # Local Variables:
    1615 # fill-column: 131
    1616 # End:
    1617 #
    1618 
    1619 # end of configure
     4250EOF
     4251chmod +x $CONFIG_STATUS
     4252rm -fr confdefs* $ac_clean_files
     4253test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
     4254
  • TabularUnified branches/GNU/src/binutils/configure.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    1 #! /bin/bash
    2 ##############################################################################
    3 
    4 ## This file is a shell script fragment that supplies the information
    5 ## necessary to tailor a template configure script into the configure
    6 ## script appropriate for this directory.  For more information, check
    7 ## any existing configure script. 
    8 
    9 ## Be warned, there are two types of configure.in files.  There are those
    10 ## used by Autoconf, which are macros which are expanded into a configure
    11 ## script by autoconf.  The other sort, of which this is one, is executed
    12 ## by Cygnus configure. 
    13 
    14 ## For more information on these two systems, check out the documentation
    15 ## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi). 
    16 
    17 #   Copyright (C) 1992-99, 2000 Free Software Foundation, Inc.
     1#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
     2#   1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    183#
    194# This file is free software; you can redistribute it and/or modify it
     
    3217
    3318##############################################################################
     19### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
     20
     21AC_INIT(move-if-change)
     22AC_PREREQ(2.13)
     23AC_CANONICAL_SYSTEM
     24AC_ARG_PROGRAM
     25
     26sinclude(config/acx.m4)
     27
     28### we might need to use some other shell than /bin/sh for running subshells
     29### If we are on Windows, search for the shell.  This will permit people
     30### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
     31### without also having to set CONFIG_SHELL.  This code will work when
     32### using bash, which sets OSTYPE.
     33case "${OSTYPE}" in
     34*win32*)
     35  if test x${CONFIG_SHELL} = x ; then
     36    if test ! -f /bin/sh ; then
     37      if test x${SHELL} != x && test -f ${SHELL} ; then
     38        CONFIG_SHELL=${SHELL}
     39        export CONFIG_SHELL
     40      else
     41        for prog in sh sh.exe bash bash.exe; do
     42          IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
     43          for dir in $PATH; do
     44            test -z "$dir" && dir=.
     45            if test -f $dir/$prog; then
     46              CONFIG_SHELL=$dir/$prog
     47              export CONFIG_SHELL
     48              break
     49            fi
     50          done
     51          IFS="$save_ifs"
     52          test -n "${CONFIG_SHELL}" && break
     53        done
     54      fi
     55    fi
     56  fi
     57  ;;
     58esac
     59
     60config_shell=${CONFIG_SHELL-/bin/sh}
     61
     62progname=$0
     63# if PWD already has a value, it is probably wrong.
     64if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
     65
     66# Export original configure arguments for use by sub-configures.
     67TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
     68AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
     69
     70moveifchange=${srcdir}/move-if-change
     71
     72# Set srcdir to "." if that's what it is.
     73# This is important for multilib support.
     74pwd=`${PWDCMD-pwd}`
     75srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
     76if test "${pwd}" = "${srcpwd}" ; then
     77  srcdir=.
     78fi
     79
     80topsrcdir=$srcpwd
     81
     82extra_host_args=
     83# Define the trigger file to make sure configure will re-run whenever
     84# the gcc version number changes.
     85if test "${with_gcc_version_trigger+set}" = set ; then
     86  gcc_version_trigger="$with_gcc_version_trigger"
     87  gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
     88else
     89  # If gcc's sources are available, define the trigger file.
     90  if test -f ${topsrcdir}/gcc/version.c ; then
     91    gcc_version_trigger=${topsrcdir}/gcc/version.c
     92    gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
     93    case "$ac_configure_args" in
     94      *--with-gcc-version-trigger=$gcc_version_trigger* )
     95        ;;
     96      * )
     97        # Add to all subconfigure arguments: build, host, and target.
     98        ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
     99        ;;
     100    esac
     101  fi
     102fi
    34103
    35104### To add a new directory to the tree, first choose whether it is a target
    36105### or a host dependent tool.  Then put it into the appropriate list
    37 ### (library or tools, host or target), doing a dependency sort.  For
    38 ### example, gdb requires that byacc (or bison) be built first, so it is in
    39 ### the ${host_tools} list after byacc and bison. 
    40 
     106### (library or tools, host or target), doing a dependency sort.
     107
     108# Subdirs will be configured in the order listed in build_configdirs,
     109# configdirs, or target_configdirs; see the serialization section below.
     110
     111# Dependency sorting is only needed when *configuration* must be done in
     112# a particular order.  In all cases a dependency should be specified in
     113# the Makefile, whether or not it's implicitly specified here.
     114
     115# Double entries in build_configdirs, configdirs, or target_configdirs may
     116# cause circular dependencies and break everything horribly.
    41117
    42118# these libraries are used by various programs built for the host environment
    43119#
    44 host_libs="intl mmalloc libiberty opcodes bfd readline gash db tcl tk tcl8.1 tk8.1 tclX itcl tix libgui"
    45 
    46 if [ "${enable_gdbgui}" = "yes" ] ; then
    47         host_libs="${host_libs} libgui"
    48 fi
    49 
    50 # Set up configure/Makefile variables if libstdc++-v3 is to be built.
    51 if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then
    52         libstdcxx_version="target-libstdc++-v3"
    53         # Don't use libstdc++-v3's flags to configure/build itself.
    54         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'
    55 else
    56         libstdcxx_version="target-libio target-libstdc++"
    57         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++'
    58 fi
     120host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
    59121
    60122# these tools are built for the host environment
    61123# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
    62124# know that we are building the simulator.
    63 host_tools="byacc flex bison binutils ld gas gcc cgen sid 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"
     125# binutils, gas and ld appear in that order because it makes sense to run
     126# "make check" in that particular order.
     127host_tools="byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
     128
     129# libgcj represents the runtime libraries only used by gcj.
     130libgcj="target-libffi \
     131        target-boehm-gc \
     132        target-zlib \
     133        target-qthreads \
     134        target-libjava"
    64135
    65136# these libraries are built for the target environment, and are built after
     
    69140                target-libgloss \
    70141                target-newlib \
    71                 ${libstdcxx_version} \
     142                target-libstdc++-v3 \
    72143                target-libf2c \
    73                 target-libchill \
    74                 target-libffi \
    75                 target-libjava \
    76                 target-zlib \
    77                 target-boehm-gc \
    78                 target-qthreads \
     144                ${libgcj} \
    79145                target-libobjc"
    80146
     
    86152# candidates for the "native_only" list which follows
    87153#
    88 target_tools="target-examples target-groff target-gperf"
     154target_tools="target-examples target-groff target-gperf target-rda"
    89155
    90156################################################################################
    91 
    92 ## These two lists are of directories that are to be removed from the
    93 ## ${configdirs} list for either cross-compilations or for native-
    94 ## compilations.  For example, it doesn't make that much sense to
    95 ## cross-compile Emacs, nor is it terribly useful to compile target-libiberty in
    96 ## a native environment. 
    97 
    98 # directories to be built in the native environment only
    99 #
    100 # This must be a single line because of the way it is searched by grep in
    101 # the code below.
    102 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"
    103 
    104 # directories to be built in a cross environment only
    105 #
    106 cross_only="target-libgloss target-newlib target-cygmon target-opcodes target-libstub"
    107157
    108158## All tools belong in one of the four categories, and are assigned above
     
    117167################################################################################
    118168
    119 srctrigger=move-if-change
    120169srcname="gnu development package"
    121170
     
    123172appdirs=""
    124173
    125 # per-host:
    126 
    127 # Work in distributions that contain no compiler tools, like Autoconf.
    128 if [ -d ${srcdir}/config ]; then
    129 case "${host}" in
    130   m68k-hp-hpux*)
    131     host_makefile_frag="${host_makefile_frag} config/mh-hp300"
    132     ;;
    133   m68k-apollo-sysv*)
    134     host_makefile_frag="${host_makefile_frag} config/mh-apollo68"
    135     ;;
    136   m68k-apollo-bsd*)
    137     host_makefile_frag="${host_makefile_frag} config/mh-a68bsd"
    138     ;;
    139   m88k-dg-dgux*)
    140     host_makefile_frag="${host_makefile_frag} config/mh-dgux"
    141     ;;
    142   m88k-harris-cxux*)
    143     host_makefile_frag="${host_makefile_frag} config/mh-cxux"
    144     ;;
    145   m88k-motorola-sysv*)
    146     host_makefile_frag="${host_makefile_frag} config/mh-delta88"
    147     ;;
    148   mips*-dec-ultrix*)
    149     host_makefile_frag="${host_makefile_frag} config/mh-decstation"
    150     ;;
    151   mips*-nec-sysv4*)
    152     host_makefile_frag="${host_makefile_frag} config/mh-necv4"
    153     ;;
    154   mips*-sgi-irix6*)
    155     host_makefile_frag="${host_makefile_frag} config/mh-irix6"
    156     ;;
    157   mips*-sgi-irix5*)
    158     host_makefile_frag="${host_makefile_frag} config/mh-irix5"
    159     ;;
    160   mips*-sgi-irix4*)
    161     host_makefile_frag="${host_makefile_frag} config/mh-irix4"
    162     ;;
    163   mips*-sgi-irix3*)
    164     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
    165     ;;
    166   mips*-*-sysv4*)
    167     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
    168     ;;
    169   mips*-*-sysv*)
    170     host_makefile_frag="${host_makefile_frag} config/mh-riscos"
    171     ;;
    172   i370-ibm-opened*)
    173     host_makefile_frag="${host_makefile_frag} config/mh-openedition"
    174     ;;
    175   i[3456]86-*-sysv5*)
    176     host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
    177     ;;
    178   i[3456]86-*-dgux*)
    179     host_makefile_frag="${host_makefile_frag} config/mh-dgux386"
    180     ;;
    181   i[3456]86-ncr-sysv4.3*)
    182     host_makefile_frag="${host_makefile_frag} config/mh-ncrsvr43"
    183     ;;
    184   i[3456]86-ncr-sysv4*)
    185     host_makefile_frag="${host_makefile_frag} config/mh-ncr3000"
    186     ;;
    187   i[3456]86-*-sco3.2v5*)
    188     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
    189     ;;
    190   i[3456]86-*-sco*)
    191     host_makefile_frag="${host_makefile_frag} config/mh-sco"
    192     ;;
    193   i[3456]86-*-udk*)
    194     host_makefile_frag="${host_makefile_frag} config/mh-sysv5"
    195     ;;
    196   i[3456]86-*-isc*)
    197     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
    198     ;;
    199   i[3456]86-*-solaris2*)
    200     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
    201     ;;
    202   i[3456]86-*-aix*)
    203     host_makefile_frag="${host_makefile_frag} config/mh-aix386"
    204     ;;
    205   i[3456]86-*-msdosdjgpp*)
    206     host_makefile_frag="${host_makefile_frag} config/mh-djgpp"
    207     ;;
    208   *-cygwin*)
    209     host_makefile_frag="${host_makefile_frag} config/mh-cygwin"
    210     ;;
    211   *-mingw32*)
    212     host_makefile_frag="${host_makefile_frag} config/mh-mingw32"
    213     ;;
    214   *-interix*)
    215     host_makefile_frag="${host_makefile_frag} config/mh-interix"
    216     ;;
    217   *-windows*)
    218     host_makefile_frag="${host_makefile_frag} config/mh-windows"
    219     ;;
    220   vax-*-ultrix2*)
    221     host_makefile_frag="${host_makefile_frag} config/mh-vaxult2"
    222     ;;
    223   *-*-solaris2*)
    224     host_makefile_frag="${host_makefile_frag} config/mh-solaris"
    225     ;;
    226   m68k-sun-sunos*)
    227     host_makefile_frag="${host_makefile_frag} config/mh-sun3"
    228     ;;
    229   *-hp-hpux[78]*)
    230     host_makefile_frag="${host_makefile_frag} config/mh-hpux8"
    231     ;;
    232   *-hp-hpux*)
    233     host_makefile_frag="${host_makefile_frag} config/mh-hpux"
    234     ;;
    235   *-*-hiux*)
    236     host_makefile_frag="${host_makefile_frag} config/mh-hpux"
    237     ;;
    238   rs6000-*-lynxos*)
    239     host_makefile_frag="${host_makefile_frag} config/mh-lynxrs6k"
    240     ;;
    241   *-*-lynxos*)
    242     host_makefile_frag="${host_makefile_frag} config/mh-lynxos"
    243     ;;
    244   *-*-sysv4*)
    245     host_makefile_frag="${host_makefile_frag} config/mh-sysv4"
    246     ;;
    247   *-*-sysv*)
    248     host_makefile_frag="${host_makefile_frag} config/mh-sysv"
    249     ;;
    250 esac
    251 fi
    252 
    253 # If we aren't going to be using gcc, see if we can extract a definition
    254 # of CC from the fragment.
    255 if [ -z "${CC}" ] && [ "${build}" = "${host}" ]; then
    256   IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
    257   found=
    258   for dir in $PATH; do
    259     test -z "$dir" && dir=.
    260     if test -f $dir/gcc; then
    261       found=yes
    262       break
    263     fi
    264   done
    265   IFS="$save_ifs"
    266   if [ -z "${found}" ] && [ -n "${host_makefile_frag}" ] && [ -f "${srcdir}/${host_makefile_frag}" ]; then
    267     xx=`sed -n -e 's/^[         ]*CC[   ]*=[    ]*\(.*\)$/\1/p' < ${srcdir}/${host_makefile_frag}`
    268     if [ -n "${xx}" ] ; then
    269       CC=$xx
    270     fi
    271   fi
    272 fi
    273 
    274 # We default to --with-shared on platforms where -fpic is meaningless.
    275 # Well, we don't yet, but we will.
    276 if false && [ "${host}" = "${target}" ] && [ x${enable_shared} = x ]; then
    277   case "${target}" in
    278     alpha*-dec-osf*)    enable_shared=yes ;;
    279     alpha*-*-linux*)    enable_shared=yes ;;
    280     mips-sgi-irix5*)    enable_shared=yes ;;
    281     *)                  enable_shared=no ;;
    282   esac
    283 fi
    284 
    285 case "${enable_shared}" in
    286   yes) shared=yes ;;
    287   no) shared=no ;;
    288   "") shared=no ;;
    289   *) shared=yes ;;
    290 esac
    291 
    292 if [ x${shared} = xyes ]; then
    293   case "${host}" in
    294     alpha*-*-linux*)
    295       host_makefile_frag="${host_makefile_frag} config/mh-elfalphapic"
    296       ;;
    297     arm*-*-*)
    298       host_makefile_frag="${host_makefile_frag} config/mh-armpic"
    299       ;;
    300     hppa*-*-*)
    301       host_makefile_frag="${host_makefile_frag} config/mh-papic"
    302       ;;
    303     i[3456]86-*-cygwin*)
    304       # We don't want -fPIC on Cygwin.
    305       ;;
    306     i[3456]86-*-*)
    307       host_makefile_frag="${host_makefile_frag} config/mh-x86pic"
    308       ;;
    309     i370-*-*)
    310       host_makefile_frag="${host_makefile_frag} config/mh-i370pic"
    311       ;;
    312     ia64-*-*)
    313       host_makefile_frag="${host_makefile_frag} config/mh-ia64pic"
    314       ;;
    315     sparc64-*-*)
    316       host_makefile_frag="${host_makefile_frag} config/mh-sparcpic"
    317       ;;
    318     powerpc*-*-aix*)
    319       # We don't want -fPIC on AIX.
    320       ;;
    321     powerpc*-*-*)
    322       host_makefile_frag="${host_makefile_frag} config/mh-ppcpic"
    323       ;;
    324     *-*-*)
    325       if test -f ${srcdir}/config/mh-${host_cpu}pic; then
    326         host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic"
    327       fi
    328       ;;
    329   esac
    330 fi
    331 
    332 rm -f mh-frag
    333 if [ -n "${host_makefile_frag}" ] ; then
    334   for f in ${host_makefile_frag}
    335   do
    336     cat ${srcdir}/$f >> mh-frag
    337   done
    338   host_makefile_frag=mh-frag
    339 fi
    340 
    341 # per-target:
    342 
    343 case "${target}" in
    344   v810*)
    345     target_makefile_frag="${target_makefile_frag} config/mt-v810"
    346     ;;
    347   i[3456]86-*-netware*)
    348     target_makefile_frag="${target_makefile_frag} config/mt-netware"
    349     ;;
    350   powerpc-*-netware*)
    351     target_makefile_frag="${target_makefile_frag} config/mt-netware"
    352     ;;
    353   *-*-linux-gnu*)
    354     target_makefile_frag="${target_makefile_frag} config/mt-linux"
    355     ;;
    356   *-*-aix4.[3456789]* | *-*-aix[56789].*)
    357     target_makefile_frag="${target_makefile_frag} config/mt-aix43"
    358     ;;
    359   mips*-*-pe | sh*-*-pe | *arm-wince-pe)
    360     target_makefile_frag="${target_makefile_frag} config/mt-wince"
    361     ;;
    362 esac
    363 
    364 # If --enable-target-optspace always use -Os instead of -O2 to build
    365 # the target libraries, similarly if it is not specified, use -Os
    366 # on selected platforms.
    367 case "${enable_target_optspace}:${target}" in
    368   yes:*)
    369     target_makefile_frag="${target_makefile_frag} config/mt-ospace"
    370     ;;
    371   :d30v-*)
    372     target_makefile_frag="${target_makefile_frag} config/mt-d30v"
    373     ;;
    374   :m32r-* | :d10v-* | :fr30-*)
    375     target_makefile_frag="${target_makefile_frag} config/mt-ospace"
    376     ;;
    377   no:* | :*)
    378     ;;
    379   *)
    380     echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
    381     ;;
    382 esac
    383 
    384 skipdirs=
    385 gasdir=gas
    386 use_gnu_ld=
    387 use_gnu_as=
    388 
    389 # some tools are so dependent upon X11 that if we're not building with X,
    390 # it's not even worth trying to configure, much less build, that tool.
    391 
    392 case ${with_x} in
    393   yes | "")  # the default value for this tree is that X11 is available
    394         ;;
    395   no)
    396         skipdirs="${skipdirs} tk libgui gash"
    397         ;;
    398   *)
    399         echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2
    400         ;;
    401 esac
    402 
    403 # Some tools are only suitable for building in a "native" situation.
    404 # Those are added when we have a host==target configuration.  For cross
    405 # toolchains, we add some directories that should only be useful in a
    406 # cross-compiler.
    407 
     174# Define is_cross_compiler to save on calls to 'test'.
    408175is_cross_compiler=
    409 
    410 if [ x"${host}" = x"${target}" ] ; then
    411         # when doing a native toolchain, don't build the targets
    412         # that are in the 'cross only' list
    413         skipdirs="${skipdirs} ${cross_only}"
    414         is_cross_compiler=no
     176if test x"${host}" = x"${target}" ; then
     177  is_cross_compiler=no
    415178else
    416         # similarly, don't build the targets in the 'native only'
    417         # list when building a cross compiler
    418         skipdirs="${skipdirs} ${native_only}"
    419         is_cross_compiler=yes
     179  is_cross_compiler=yes
    420180fi     
    421181
     
    424184target_subdir=${target_alias}
    425185
    426 if [ ! -d ${target_subdir} ] ; then
     186if test ! -d ${target_subdir} ; then
    427187  if mkdir ${target_subdir} ; then true
    428188  else
    429     echo "'*** could not make ${PWD=`pwd`}/${target_subdir}" 1>&2
     189    echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
    430190    exit 1
    431191  fi
    432192fi
    433193
    434 copy_dirs=
    435 
    436 # Handle --with-headers=XXX.  The contents of the named directory are
    437 # copied to $(tooldir)/sys-include.
    438 if [ x"${with_headers}" != x ]; then
    439   if [ x${is_cross_compiler} = xno ]; then
    440     echo 1>&2 '***' --with-headers is only supported when cross compiling
    441     exit 1
    442   fi
    443   case "${exec_prefixoption}" in
    444   "") x=${prefix} ;;
    445   *) x=${exec_prefix} ;;
    446   esac
    447   copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
    448 fi
    449 
    450 # Handle --with-libs=XXX.  Multiple directories are permitted.  The
    451 # contents are copied to $(tooldir)/lib.
    452 if [ x"${with_libs}" != x ]; then
    453   if [ x${is_cross_compiler} = xno ]; then
    454     echo 1>&2 '***' --with-libs is only supported when cross compiling
    455     exit 1
    456   fi
    457   # Copy the libraries in reverse order, so that files in the first named
    458   # library override files in subsequent libraries.
    459   case "${exec_prefixoption}" in
    460   "") x=${prefix} ;;
    461   *) x=${exec_prefix} ;;
    462   esac
    463   for l in ${with_libs}; do
    464     copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
    465   done
    466 fi
     194build_prefix=build-
     195build_subdir=${build_prefix}${build_alias}
     196
     197if test x"${build_alias}" != x"${host}" ; then
     198  if test ! -d ${build_subdir} ; then
     199    if mkdir ${build_subdir} ; then true
     200    else
     201      echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
     202      exit 1
     203    fi
     204  fi
     205fi
     206
     207# Skipdirs are removed silently.
     208skipdirs=
     209# Noconfigdirs are removed loudly.
     210noconfigdirs=""
     211
     212use_gnu_ld=
     213# Make sure we don't let GNU ld be added if we didn't want it.
     214if test x$with_gnu_ld = xno ; then
     215  use_gnu_ld=no
     216  noconfigdirs="$noconfigdirs ld"
     217fi
     218
     219use_gnu_as=
     220# Make sure we don't let GNU as be added if we didn't want it.
     221if test x$with_gnu_as = xno ; then
     222  use_gnu_as=no
     223  noconfigdirs="$noconfigdirs gas"
     224fi
     225
     226# some tools are so dependent upon X11 that if we're not building with X,
     227# it's not even worth trying to configure, much less build, that tool.
     228
     229case ${with_x} in
     230  yes | "") ;; # the default value for this tree is that X11 is available
     231  no)
     232    skipdirs="${skipdirs} tk tix itcl libgui"
     233    # We won't be able to build gdbtk without X.
     234    enable_gdbtk=no
     235    ;;
     236  *)  echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
     237esac
     238
     239# Some tools are only suitable for building in a "native" situation.
     240# Remove these if host!=target. 
     241native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
     242
     243# Similarly, some are only suitable for cross toolchains.
     244# Remove these if host=target.
     245cross_only="target-libgloss target-newlib target-opcodes"
     246
     247case $is_cross_compiler in
     248  no) skipdirs="${skipdirs} ${cross_only}" ;;
     249  yes) skipdirs="${skipdirs} ${native_only}" ;;
     250esac
    467251
    468252# If both --with-headers and --with-libs are specified, default to
    469253# --without-newlib.
    470 if [ x"${with_headers}" != x ] && [ x"${with_libs}" != x ]; then
    471   if [ x"${with_newlib}" = x ]; then
     254if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
     255  if test x"${with_newlib}" = x ; then
    472256    with_newlib=no
    473257  fi
     
    475259
    476260# Recognize --with-newlib/--without-newlib.
    477 if [ x${with_newlib} = xno ]; then
    478   skipdirs="${skipdirs} target-newlib"
    479 elif [ x${with_newlib} = xyes ]; then
    480   skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
    481 fi
    482 
    483 # Default to using --with-stabs for certain targets.
    484 if [ x${with_stabs} = x ]; then
    485   case "${target}" in
    486   mips*-*-irix6*)
    487     ;;
    488   mips*-*-* | alpha*-*-osf*)
    489     with_stabs=yes;
    490     withoptions="${withoptions} --with-stabs"
    491     ;;
    492   esac
    493 fi
    494 
    495 # Handle ${copy_dirs}
    496 set fnord ${copy_dirs}
    497 shift
    498 while [ $# != 0 ]; do
    499   if [ -f $2/COPIED ] && [ x"`cat $2/COPIED`" = x"$1" ]; then
    500     :
    501   else
    502     echo Copying $1 to $2
    503 
    504     # Use the install script to create the directory and all required
    505     # parent directories.
    506     if [ -d $2 ]; then
    507       :
    508     else
    509       echo >config.temp
    510       ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
    511     fi
    512 
    513     # Copy the directory, assuming we have tar.
    514     # FIXME: Should we use B in the second tar?  Not all systems support it.
    515     (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
    516 
    517     # It is the responsibility of the user to correctly adjust all
    518     # symlinks.  If somebody can figure out how to handle them correctly
    519     # here, feel free to add the code.
    520 
    521     echo $1 > $2/COPIED
    522   fi
    523   shift; shift
    524 done
     261case ${with_newlib} in
     262  no) skipdirs="${skipdirs} target-newlib" ;;
     263  yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
     264esac
    525265
    526266# Configure extra directories which are host specific
    527267
    528268case "${host}" in
    529         i[3456]86-*-go32*)
    530           configdirs="$configdirs dosrel" ;;
    531         i[3456]86-*-mingw32*)
    532           configdirs="$configdirs dosrel" ;;
    533         *-cygwin*)
    534           configdirs="$configdirs libtermcap dosrel" ;;
     269  *-cygwin*)
     270    configdirs="$configdirs libtermcap" ;;
    535271esac
    536272
     
    539275# exist yet.
    540276
    541 noconfigdirs=""
    542 
    543277case "${host}" in
    544   i[3456]86-*-vsta)
    545     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"
    546     ;;
    547   i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
    548     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"
    549         ;;
    550   i[3456]86-*-mingw32*)
    551     # 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"
    552      noconfigdirs="expect dejagnu cvs autoconf automake send-pr rcs guile perl texinfo apache inet libtool"
    553         ;;
    554   i[3456]86-*-beos*)
    555      noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
    556      ;;
     278  hppa*64*-*-*)
     279    noconfigdirs="$noconfigdirs byacc"
     280    ;;
     281  i[[3456]]86-*-vsta)
     282    noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
     283    ;;
     284  i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
     285    noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
     286    ;;
     287  i[[3456]]86-*-mingw32*)
     288    # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
     289    noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
     290    ;;
     291  i[[3456]]86-*-beos*)
     292    noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
     293    ;;
    557294  *-*-cygwin*)
    558      noconfigdirs="autoconf automake send-pr rcs guile perl texinfo apache inet"
     295    noconfigdirs="autoconf automake send-pr rcs guile perl"
    559296    ;;
    560297  *-*-netbsd*)
     
    562299    ;;
    563300  ppc*-*-pe)
    564      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"
     301    noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
    565302    ;;
    566303  powerpc-*-beos*)
    567304    noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
    568305    ;;
    569 esac
    570 
     306  *-*-darwin*)
     307    noconfigdirs="$noconfigdirs tk itcl tix libgui"
     308    ;;
     309esac
     310
     311# Save it here so that, even in case of --enable-libgcj, if the Java
     312# front-end isn't enabled, we still get libgcj disabled.
     313libgcj_saved=$libgcj
     314case $enable_libgcj in
     315yes)
     316  # If we reset it here, it won't get added to noconfigdirs in the
     317  # target-specific build rules, so it will be forcibly enabled
     318  # (unless the Java language itself isn't enabled).
     319  libgcj=
     320  ;;
     321no)
     322  # Make sure we get it printed in the list of not supported target libs.
     323  noconfigdirs="$noconfigdirs ${libgcj}"
     324  ;;
     325esac
    571326
    572327case "${target}" in
     328  *-*-chorusos)
     329    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     330    ;;
     331  *-*-darwin*)
     332    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
     333    noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
     334    ;;
     335  *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
     336    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     337    ;;
     338  *-*-kaos*)
     339    # Remove unsupported stuff on all kaOS configurations.
     340    skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
     341    skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
     342    skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
     343    noconfigdirs="$noconfigdirs target-libgloss"
     344    ;;
     345  *-*-netbsd*)
     346    # Skip some stuff on all NetBSD configurations.
     347    noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
     348
     349    # Skip some stuff that's unsupported on some NetBSD configurations.
     350    case "${target}" in
     351      i*86-*-netbsdelf*) ;;
     352      arm*-*-netbsdelf*) ;;
     353      *)
     354        noconfigdirs="$noconfigdirs ${libgcj}"
     355        ;;
     356    esac
     357    ;;
    573358  *-*-netware)
    574     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss target-libffi"
     359    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
    575360    ;;
    576361  *-*-rtems*)
    577     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
     362    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     363    case ${target} in
     364        h8300*-*-* | h8500-*-*)
     365          noconfigdirs="$noconfigdirs target-libf2c"
     366          ;;
     367        *) ;;
     368    esac
    578369    ;;
    579370  *-*-vxworks*)
    580     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
     371    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
    581372    ;;
    582373  alpha*-dec-osf*)
    583     # ld works, but does not support shared libraries.  emacs doesn't
    584     # work.  newlib is not 64 bit ready.  I'm not sure about fileutils.
     374    # ld works, but does not support shared libraries.
     375    # newlib is not 64 bit ready.  I'm not sure about fileutils.
    585376    # gas doesn't generate exception information.
    586     noconfigdirs="$noconfigdirs gas ld emacs fileutils target-newlib target-libgloss"
     377    noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
    587378    ;;
    588379  alpha*-*-*vms*)
    589     noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss target-libffi"
     380    noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
     381    ;;
     382  alpha*-*-linux*)
     383    # newlib is not 64 bit ready
     384    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     385    ;;
     386  alpha*-*-freebsd*)
     387    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
    590388    ;;
    591389  alpha*-*-*)
    592390    # newlib is not 64 bit ready
    593     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
    594     ;;
     391    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     392    ;;
     393  sh-*-linux*)
     394    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
     395    ;;   
    595396  sh*-*-pe|mips*-*-pe|*arm-wince-pe)
    596     noconfigdirs="$noconfigdirs target-libjava target-libffi target-zlib"
    597     noconfigdirs="$noconfigdirs target-boehm-gc target-qthreads target-examples"
     397    noconfigdirs="$noconfigdirs ${libgcj}"
     398    noconfigdirs="$noconfigdirs target-examples"
    598399    noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
    599400    noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
    600401    noconfigdirs="$noconfigdirs expect dejagnu"
    601402    # the C++ libraries don't build on top of CE's C libraries
    602     noconfigdirs="$noconfigdirs ${libstdcxx_version}"
    603     skipdirs="$skipdirs target-newlib"
     403    noconfigdirs="$noconfigdirs target-libstdc++-v3"
     404    noconfigdirs="$noconfigdirs target-newlib"
    604405    case "${host}" in
    605406      *-*-cygwin*) ;; # keep gdb and readline
    606       *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
     407      *) noconfigdirs="$noconfigdirs gdb readline"
    607408         ;;
    608409    esac
    609410    ;;
    610411  arc-*-*)
    611     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
     412    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     413    ;;
     414  arm-*-coff | strongarm-*-coff | xscale-*-coff)
     415    noconfigdirs="$noconfigdirs ${libgcj}"
     416    ;;
     417  arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
     418    noconfigdirs="$noconfigdirs target-libffi target-qthreads"
    612419    ;;
    613420  arm-*-pe*)
     421    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     422    ;;
     423  arm-*-oabi*)
     424    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     425    ;;
     426  thumb-*-coff)
     427    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     428    ;;
     429  thumb-*-elf)
     430    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     431    ;;
     432  thumb-*-oabi)
     433    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     434    ;;
     435  thumb-*-pe)
     436    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     437    ;;
     438  arm-*-riscix*)
     439    noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
     440    ;;
     441  avr-*-*)
     442    noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
     443    ;;
     444  c4x-*-* | tic4x-*-*)
     445    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
     446    ;;
     447  c54x*-*-* | tic54x-*-*)
     448    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
     449    ;;
     450  cris-*-*)
     451    noconfigdirs="$noconfigdirs ${libgcj}"
     452    ;;
     453  d10v-*-*)
     454    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
     455    ;;
     456  d30v-*-*)
     457    noconfigdirs="$noconfigdirs ${libgcj}"
     458    ;;
     459  fr30-*-elf*)
     460    noconfigdirs="$noconfigdirs ${libgcj}"
     461    ;;
     462  frv-*-*)
     463    noconfigdirs="$noconfigdirs ${libgcj}"
     464    ;;
     465  h8300*-*-*)
    614466    noconfigdirs="$noconfigdirs target-libgloss"
    615467    ;;
    616   arm-*-coff*)
    617     noconfigdirs="$noconfigdirs target-libgloss"
    618     if [ x${is_cross_compiler} != xno ] ; then
    619            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    620     fi
    621     ;;
    622   arm-*-elf*)
    623     noconfigdirs="$noconfigdirs target-libgloss"
    624     if [ x${is_cross_compiler} != xno ] ; then
    625            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    626     fi
    627     ;;
    628   arm-*-oabi*)
    629     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    630     ;;
    631   thumb-*-coff)
    632     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    633     ;;
    634   thumb-*-elf)
    635     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    636     ;;
    637   thumb-*-oabi)
    638     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    639     ;;
    640   strongarm-*-elf)
    641     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    642     if [ x${is_cross_compiler} != xno ] ; then
    643            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    644     fi
    645     ;;
    646   strongarm-*-coff)
    647     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    648     if [ x${is_cross_compiler} != xno ] ; then
    649            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    650     fi
    651     ;;
    652   xscale-*-elf)
    653     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    654     if [ x${is_cross_compiler} != xno ] ; then
    655            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    656     fi
    657     ;;
    658   xscale-*-coff)
    659     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    660     if [ x${is_cross_compiler} != xno ] ; then
    661            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    662     fi
    663     ;;
    664   thumb-*-pe)
    665     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
    666     ;;
    667   arm-*-riscix*)
    668     noconfigdirs="$noconfigdirs ld target-libgloss target-libffi"
    669     ;;
    670   c4x-*-*)
    671     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
    672     ;;
    673   c54x*-*-* | tic54x-*-*)
    674     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi gcc gdb newlib"
    675     ;;
    676   d10v-*-*)
    677     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
    678     ;;
    679   d30v-*-*)
    680     ;;
    681   fr30-*-elf*)
    682     if [ x${is_cross_compiler} != xno ] ; then
    683            target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    684     fi
    685     ;;
    686   h8300*-*-* | \
    687468  h8500-*-*)
    688     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
     469    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
     470    ;;
     471  hppa*64*-*-linux* | parisc*64*-*-linux*)
     472    # In this case, it's because the hppa64-linux target is for
     473    # the kernel only at this point and has no libc, and thus no
     474    # headers, crt*.o, etc., all of which are needed by these.
     475    noconfigdirs="$noconfigdirs target-zlib"
    689476    ;;
    690477  hppa*-*-*elf* | \
    691   hppa*-*-linux-gnu* | \
     478  parisc*-*-linux* | hppa*-*-linux* | \
    692479  hppa*-*-lites* | \
     480  hppa*-*-openbsd* | \
    693481  hppa*64*-*-*)
     482    noconfigdirs="$noconfigdirs ${libgcj}"
    694483    # Do configure ld/binutils/gas for this case.
    695484    ;;
    696485  hppa*-*-*)
    697     # HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach
    698     # cc is gcc, and on any system a user should be able to link cc to
    699     # whatever they want.  FIXME, emacs emacs19).
    700     case "${CC}" in
    701         "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
    702         *) ;;
    703     esac
    704     noconfigdirs="$noconfigdirs ld shellutils"
     486    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
     487    # build on HP-UX 10.20.
     488    noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
    705489    ;;
    706490  ia64*-*-elf*)
     
    708492    noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
    709493    ;;
    710   i[3456]86-*-coff | i[3456]86-*-elf)
    711     if [ x${is_cross_compiler} != xno ] ; then
    712          target_configdirs="${target_configdirs} target-libstub target-cygmon"
     494  ia64*-**-hpux*)
     495    # No gdb or ld support yet.
     496    noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
     497    ;;
     498  i[[3456]]86-*-coff | i[[3456]]86-*-elf)
     499    noconfigdirs="$noconfigdirs ${libgcj}"
     500    ;;
     501  i[[34567]]86-*-freebsd*)
     502    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     503    ;;
     504  i[[3456]]86-*-linux*)
     505    # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
     506    # not build java stuff by default.
     507    case "${target}" in
     508      *-*-*libc1*)
     509        noconfigdirs="$noconfigdirs ${libgcj}";;
     510    esac
     511
     512    # This section makes it possible to build newlib natively on linux.
     513    # If we are using a cross compiler then don't configure newlib.
     514    if test x${is_cross_compiler} != xno ; then
     515      noconfigdirs="$noconfigdirs target-newlib"
    713516    fi
    714     ;;
    715   i[3456]86-*-go32* | i[3456]-*-msdosdjgpp*)
    716     # but don't build gdb
    717     noconfigdirs="$noconfigdirs gdb ${libstdcxx_version} target-libffi"
    718     ;;
    719   i[3456]86-*-mingw32*)
     517    noconfigdirs="$noconfigdirs target-libgloss"
     518    # If we are not using a cross compiler, do configure newlib.
     519    # Note however, that newlib will only be configured in this situation
     520    # if the --with-newlib option has been given, because otherwise
     521    # 'target-newlib' will appear in skipdirs.
     522    ;;
     523  i[[3456]]86-*-mingw32*)
    720524    target_configdirs="$target_configdirs target-mingw"
    721     noconfigdirs="$noconfigdirs expect target-libgloss target-libffi"
     525    noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
    722526
    723527    # Can't build gdb for mingw32 if not native.
    724528    case "${host}" in
    725       i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
    726       *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigator gnuserv"
     529      i[[3456]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
     530      *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
    727531         ;;
    728532    esac
     
    730534  *-*-cygwin*)
    731535    target_configdirs="$target_configdirs target-libtermcap target-winsup"
    732     noconfigdirs="$noconfigdirs target-gperf target-libgloss target-libffi"
     536    noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
    733537    # always build newlib.
    734538    skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
     
    737541    case "${host}" in
    738542      *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
    739       *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
     543      *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
    740544         ;;
    741545    esac
    742546    ;;   
    743   i[3456]86-*-pe)
    744     noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
    745     ;;
    746   i[3456]86-*-sco3.2v5*)
     547  i[[3456]]86-*-pe)
     548    noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
     549    ;;
     550  i[[3456]]86-*-sco3.2v5*)
    747551    # The linker does not yet know about weak symbols in COFF,
    748552    # and is not configured to handle mixed ELF and COFF.
    749     noconfigdirs="$noconfigdirs ld target-libgloss target-libffi"
    750     ;;
    751   i[3456]86-*-sco*)
    752     noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
    753     ;;
    754   i[3456]86-*-solaris2*)
     553    noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
     554    ;;
     555  i[[3456]]86-*-sco*)
     556    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
     557    ;;
     558  i[[3456]]86-*-solaris2*)
    755559    noconfigdirs="$noconfigdirs target-libgloss"
    756560    ;;
    757   i[3456]86-*-sysv4*)
    758     # The SYSV4 C compiler doesn't handle Emacs correctly
    759     case "${CC}" in
    760         "" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
    761         *) ;;
    762     esac
    763     # but that's okay since emacs doesn't work anyway
    764     noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss target-libffi"
    765     ;;
    766   i[3456]86-*-beos*)
    767      noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
    768      ;;
    769  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
    770     noconfigdirs="$noconfigdirs target-libiberty target-librx target-libg++ target-libstdc++ target-libio target-libf2c target-libchill target-zlib target-libobjc"
    771     ;;
    772  m68k-*-elf*)
    773     if [ x${is_cross_compiler} != xno ] ; then
    774            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    775     fi
     561  i[[3456]]86-*-sysv4*)
     562    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     563    ;;
     564  i[[3456]]86-*-beos*)
     565    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
     566    ;;
     567  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
     568    noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
     569    ;;
     570  m68k-*-elf*)
     571    noconfigdirs="$noconfigdirs ${libgcj}"
    776572    ;;
    777573  m68k-*-coff*)
    778     if [ x${is_cross_compiler} != xno ] ; then
    779            target_configdirs="${target_configdirs} target-bsp target-cygmon"
    780     fi
     574    noconfigdirs="$noconfigdirs ${libgcj}"
     575    ;;
     576  mcore-*-pe*)
     577  # The EPOC C++ environment does not support exceptions or rtti,
     578  # and so building libstdc++-v3 tends not to always work.
     579    noconfigdirs="$noconfigdirs target-libstdc++-v3"
     580    ;;
     581  mmix-*-*)
     582    noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
    781583    ;;
    782584  mn10200-*-*)
    783     noconfigdirs="$noconfigdirs target-libffi"
    784     if [ x${is_cross_compiler} != xno ] ; then
    785            target_configdirs="${target_configdirs} target-libstub target-cygmon"
    786     fi
     585    noconfigdirs="$noconfigdirs ${libgcj}"
    787586    ;;
    788587  mn10300-*-*)
    789     noconfigdirs="$noconfigdirs target-libffi"
    790     if [ x${is_cross_compiler} != xno ] ; then
    791            target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    792     fi
     588    noconfigdirs="$noconfigdirs ${libgcj}"
    793589    ;;
    794590  powerpc-*-aix*)
    795591    # copied from rs6000-*-* entry
    796     # The configure and build of ld are currently disabled because
    797     # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least)
    798     # The symptom is that GDBtk 4.18 fails at startup with a segfault
    799     # if linked by GNU ld, but not if linked by the native ld.
    800     noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss target-libffi ld"
    801     use_gnu_ld=no
     592    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
    802593    ;;
    803594  powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
    804595    target_configdirs="$target_configdirs target-winsup"
    805     noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv target-libffi"
     596    noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
    806597    # always build newlib.
    807598    skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
     
    809600    # This is temporary until we can link against shared libraries
    810601  powerpcle-*-solaris*)
    811     noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv target-libffi"
     602    noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
    812603    ;;
    813604  powerpc-*-beos*)
    814     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
     605    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
    815606    ;;
    816607  powerpc-*-eabi)
    817     if [ x${is_cross_compiler} != xno ] ; then
    818            target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    819     fi
     608    noconfigdirs="$noconfigdirs ${libgcj}"
    820609    ;;
    821610  rs6000-*-lynxos*)
    822     # The CVS server code doesn't work on the RS/6000
    823     noconfigdirs="$noconfigdirs target-newlib gprof cvssrc target-libffi"
     611    noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
    824612    ;;
    825613  rs6000-*-aix*)
    826     # The configure and build of ld are currently disabled because
    827     # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least)
    828     # The symptom is that GDBtk 4.18 fails at startup with a segfault
    829     # if linked by GNU ld, but not if linked by the native ld.
    830     noconfigdirs="$noconfigdirs gprof target-libffi ld"
    831     use_gnu_ld=no
     614    noconfigdirs="$noconfigdirs gprof ${libgcj}"
    832615    ;;
    833616  rs6000-*-*)
    834     noconfigdirs="$noconfigdirs gprof target-libffi"
     617    noconfigdirs="$noconfigdirs gprof ${libgcj}"
    835618    ;;
    836619  m68k-apollo-*)
    837     noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss target-libffi"
     620    noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
    838621    ;;
    839622  mips*-*-irix5*)
    840623    # The GNU linker does not support shared libraries.
    841     # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
    842     noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss"
     624    noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
    843625    ;;
    844626  mips*-*-irix6*)
    845     # The GNU assembler does not support IRIX 6.
    846     # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
    847     noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss"
     627    # Linking libjava exceeds command-line length limits on at least
     628    # IRIX 6.2, but not on IRIX 6.5.
     629    # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
     630    # <oldham@codesourcery.com>
     631    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
    848632    ;;
    849633  mips*-dec-bsd*)
    850     noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
     634    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
    851635    ;;
    852636  mips*-*-bsd*)
    853     noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
     637    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
    854638    ;;
    855639  mipstx39-*-*)
    856     noconfigdirs="$noconfigdirs gprof target-libffi"   # same as generic mips
    857     target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    858    ;;
     640    noconfigdirs="$noconfigdirs gprof ${libgcj}"   # same as generic mips
     641    ;;
     642  mips*-*-linux*)
     643    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     644    ;;
    859645  mips*-*-*)
    860     noconfigdirs="$noconfigdirs gprof target-libffi"
     646    noconfigdirs="$noconfigdirs gprof ${libgcj}"
    861647    ;;
    862648  romp-*-*)
    863     noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss target-libffi"
     649    noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
    864650    ;;
    865651  sh-*-*)
    866652    case "${host}" in
    867       i[3456]86-*-vsta) ;; # don't add gprof back in
    868       i[3456]86-*-go32*) ;; # don't add gprof back in
    869       i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
     653      i[[3456]]86-*-vsta) ;; # don't add gprof back in
     654      i[[3456]]86-*-go32*) ;; # don't add gprof back in
     655      i[[3456]]86-*-msdosdjgpp*) ;; # don't add gprof back in
    870656      *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
    871657    esac
    872     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
     658    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
     659    ;;
     660  sh64-*-*)
     661    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    873662    ;;
    874663  sparc-*-elf*)
    875     if [ x${is_cross_compiler} != xno ] ; then
    876            target_configdirs="${target_configdirs} target-libstub target-cygmon"
    877     fi
     664    noconfigdirs="$noconfigdirs ${libgcj}"
    878665    ;;
    879666  sparc64-*-elf*)
    880     if [ x${is_cross_compiler} != xno ] ; then
    881            target_configdirs="${target_configdirs} target-libstub target-cygmon"
    882     fi
    883     noconfigdirs="target-libffi"
     667    noconfigdirs="$noconfigdirs ${libgcj}"
    884668    ;;
    885669  sparclite-*-*)
    886     if [ x${is_cross_compiler} != xno ] ; then
    887            target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
    888     fi
    889     noconfigdirs="target-libffi"
     670    noconfigdirs="$noconfigdirs ${libgcj}"
    890671    ;;
    891672  sparc-*-sunos4*)
    892     if [ x${is_cross_compiler} != xno ] ; then
    893            noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss"
     673    noconfigdirs="$noconfigdirs ${libgcj}"
     674    if test x${is_cross_compiler} != xno ; then
     675           noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
    894676    else
    895677           use_gnu_ld=no
    896678    fi
    897679    ;;
     680  sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
     681    ;;
    898682  v810-*-*)
    899     noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss target-libffi"
     683    noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
    900684    ;;
    901685  v850-*-*)
    902     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
     686    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    903687    ;;
    904688  v850e-*-*)
    905     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
     689    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    906690    ;;
    907691  v850ea-*-*)
    908     noconfigdirs="$noconfigdirs target-libgloss target-libffi"
     692    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
    909693    ;;
    910694  vax-*-vms)
    911     noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss target-libffi"
     695    noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
    912696    ;;
    913697  vax-*-*)
    914     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
     698    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
     699    ;;
     700  ip2k-*-*)
     701    noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
     702    ;;
     703  *-*-linux*)
     704    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
    915705    ;;
    916706  *-*-lynxos*)
    917     noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi"
     707    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
    918708    ;;
    919   *-*-macos* | \
    920   *-*-mpw*)
    921     # Macs want a resource compiler.
    922     configdirs="$configdirs grez"
    923     noconfigdirs="target-libffi"
    924     ;;   
     709  *-*-*)
     710    noconfigdirs="$noconfigdirs ${libgcj}"
     711    ;;
    925712esac
    926713
     
    932719esac
    933720
    934 # Make sure we don't let GNU ld be added if we didn't want it.
    935 if [ x$with_gnu_ld = xno ]; then
    936   use_gnu_ld=no
    937   noconfigdirs="$noconfigdirs ld"
    938 fi
    939 
    940 # Make sure we don't let GNU as be added if we didn't want it.
    941 if [ x$with_gnu_as = xno ]; then
    942   use_gnu_as=no
    943   noconfigdirs="$noconfigdirs gas"
    944 fi
    945 
    946721# Figure out what language subdirectories are present.
    947722# Look if the user specified --enable-languages="..."; if not, use
    948723# the environment variable $LANGUAGES if defined. $LANGUAGES might
    949724# go away some day.
     725# NB:  embedded tabs in this IF block -- do not untabify
    950726if test x"${enable_languages+set}" != xset; then
    951         if test x"${LANGUAGES+set}" = xset; then
    952                 enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
    953         else
    954                 enable_languages=all
    955         fi
     727  if test x"${LANGUAGES+set}" = xset; then
     728    enable_languages="${LANGUAGES}"
     729      echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
     730  else
     731    enable_languages=all
     732  fi
    956733else
    957         if test x"${enable_languages}" = x; then
    958                 echo configure.in: --enable-languages needs at least one argument 1>&2
    959                 exit 1
    960         fi
    961 fi
     734  if test x"${enable_languages}" = x ||
     735     test x"${enable_languages}" = xyes;
     736     then
     737    echo configure.in: --enable-languages needs at least one language argument 1>&2
     738    exit 1
     739  fi
     740fi
     741enable_languages=`echo "${enable_languages}" | sed -e 's/[[     ,]][[   ,]]*/,/g' -e 's/,$//'`
     742
     743# First scan to see if an enabled language requires some other language.
     744# We assume that a given config-lang.in will list all the language
     745# front ends it requires, even if some are required indirectly.
     746for lang in ${srcdir}/gcc/*/config-lang.in ..
     747do
     748  case $lang in
     749    ..) ;;
     750    # The odd quoting in the next line works around
     751    # an apparent bug in bash 1.12 on linux.
     752    ${srcdir}/gcc/[[*]]/config-lang.in) ;;
     753    *)
     754      lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^  ]]*\).*$,\1,p' $lang`
     755      this_lang_requires=`sed -n -e 's,^lang_requires=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_requires=\([[^        ]]*\).*$,\1,p' $lang`
     756      for other in $this_lang_requires
     757      do
     758        case ,${enable_languages}, in
     759          *,$other,*) ;;
     760          *,all,*) ;;
     761          *,$lang_alias,*)
     762            echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
     763            enable_languages="$enable_languages,$other"
     764            ;;
     765        esac
     766      done
     767      ;;
     768  esac
     769done
     770
    962771subdirs=
    963772for lang in ${srcdir}/gcc/*/config-lang.in ..
    964773do
    965         case $lang in
    966         ..) ;;
    967         # The odd quoting in the next line works around
    968         # an apparent bug in bash 1.12 on linux.
    969         ${srcdir}/gcc/[*]/config-lang.in) ;;
    970         *)
    971           lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^   ]*\).*$,\1,p' $lang`
    972           this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^         ]*\).*$,\1,p' $lang`
    973           build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^     ]*\).*$,\1,p' $lang`
    974           if test "x$lang_alias" = x
    975           then
    976                 echo "$lang doesn't set \$language." 1>&2
    977                 exit 1
    978           fi
    979           case ${build_by_default},${enable_languages}, in
    980           *,$lang_alias,*) add_this_lang=yes ;;
    981           no,*) add_this_lang=no ;;
    982           *,all,*) add_this_lang=yes ;;
    983           *) add_this_lang=no ;;
    984           esac
    985           if test x"${add_this_lang}" = xyes; then
    986               eval target_libs='"$target_libs "'\"$this_lang_libs\"
    987           else
    988               eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs\"
    989           fi
    990           ;;
    991         esac
     774  case $lang in
     775    ..) ;;
     776    # The odd quoting in the next line works around
     777    # an apparent bug in bash 1.12 on linux.
     778    ${srcdir}/gcc/[[*]]/config-lang.in) ;;
     779    *)
     780      lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^  ]]*\).*$,\1,p' $lang`
     781      this_lang_libs=`sed -n -e 's,^target_libs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^target_libs=\([[^        ]]*\).*$,\1,p' $lang`
     782      this_lang_dirs=`sed -n -e 's,^lang_dirs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_dirs=\([[^    ]]*\).*$,\1,p' $lang`
     783      build_by_default=`sed -n -e 's,^build_by_default=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^build_by_default=\([[^    ]]*\).*$,\1,p' $lang`
     784      if test "x$lang_alias" = x
     785         then
     786        echo "$lang doesn't set \$language." 1>&2
     787        exit 1
     788      fi
     789      case ${build_by_default},${enable_languages}, in
     790        *,$lang_alias,*) add_this_lang=yes ;;
     791        no,*) add_this_lang=no ;;
     792        *,all,*) add_this_lang=yes ;;
     793        *) add_this_lang=no ;;
     794      esac
     795      if test x"${add_this_lang}" = xyes; then
     796        eval target_libs='"$target_libs "'\"$this_lang_libs\"
     797      else
     798        eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
     799      fi
     800      ;;
     801  esac
    992802done
    993 
    994803
    995804# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
     
    1000809for dir in . $skipdirs $noconfigdirs ; do
    1001810  dirname=`echo $dir | sed -e s/target-//g`
    1002   if [ $dir != . ]  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     811  if test $dir != .  && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1003812    configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
    1004     if [ -r $srcdir/$dirname/configure ] \
    1005         || [ -r $srcdir/$dirname/configure.in ]; then
     813    if test -r $srcdir/$dirname/configure ; then
    1006814      if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1007815        true
     
    1011819    fi
    1012820  fi
    1013   if [ $dir != . ] && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
     821  if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1014822    target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
    1015     if [ -r $srcdir/$dirname/configure ] \
    1016         || [ -r $srcdir/$dirname/configure.in ]; then
     823    if test -r $srcdir/$dirname/configure ; then
    1017824      if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1018825        true
     
    1026833# Sometimes the tools are distributed with libiberty but with no other
    1027834# libraries.  In that case, we don't want to build target-libiberty.
    1028 if [ -n "${target_configdirs}" ]; then
     835if test -n "${target_configdirs}" ; then
    1029836  others=
    1030837  for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
    1031     if [ "$i" != "libiberty" ]; then
    1032       if [ -r $srcdir/$i/configure ] || [ -r $srcdir/$i/configure.in ]; then
     838    if test "$i" != "libiberty" ; then
     839      if test -r $srcdir/$i/configure ; then
    1033840        others=yes;
    1034841        break;
     
    1036843    fi
    1037844  done
    1038   if [ -z "${others}" ]; then
     845  if test -z "${others}" ; then
    1039846    target_configdirs=
    1040847  fi
    1041848fi
    1042849
    1043 # Deconfigure all subdirectories, in case we are changing the
    1044 # configuration from one where a subdirectory is supported to one where it
    1045 # is not.
    1046 if [ -z "${norecursion}" ] && [ -n "${configdirs}" ]; then
    1047   for i in `echo ${configdirs} | sed -e s/target-//g` ; do
    1048     rm -f $i/Makefile
    1049   done
    1050 fi
    1051 if [ -z "${norecursion}" ] && [ -n "${target_configdirs}" ]; then
    1052   for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
    1053     rm -f ${target_subdir}/$i/Makefile
    1054   done
    1055 fi
     850# Quietly strip out all directories which aren't configurable in this tree.
     851# This relies on all configurable subdirectories being autoconfiscated, which
     852# is now the case.
     853configdirs_all="$configdirs"
     854configdirs=
     855for i in ${configdirs_all} ; do
     856  if test -f ${srcdir}/$i/configure ; then
     857    configdirs="${configdirs} $i"
     858  fi
     859done
     860target_configdirs_all="$target_configdirs"
     861target_configdirs=
     862for i in ${target_configdirs_all} ; do
     863  j=`echo $i | sed -e s/target-//g`
     864  if test -f ${srcdir}/$j/configure ; then
     865    target_configdirs="${target_configdirs} $i"
     866  fi
     867done
    1056868
    1057869# Produce a warning message for the subdirs we can't configure.
     
    1060872# supported by the one or two programs in a package.
    1061873
    1062 if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then
     874if test -n "${notsupp}" && test -z "${norecursion}" ; then
    1063875  # If $appdirs is non-empty, at least one of those directories must still
    1064876  # be configured, or we error out.  (E.g., if the gas release supports a
    1065877  # specified target in some subdirs but not the gas subdir, we shouldn't
    1066878  # pretend that all is well.)
    1067   if [ -n "$appdirs" ]; then
     879  if test -n "$appdirs" ; then
    1068880    for dir in $appdirs ; do
    1069       if [ -r $dir/Makefile.in ]; then
     881      if test -r $dir/Makefile.in ; then
    1070882        if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
    1071883          appdirs=""
     
    1078890      fi
    1079891    done
    1080     if [ -n "$appdirs" ]; then
     892    if test -n "$appdirs" ; then
    1081893      echo "*** This configuration is not supported by this package." 1>&2
    1082894      exit 1
     
    1089901  echo "    (Any other directories should still work fine.)" 1>&2
    1090902fi
     903
     904case "$host" in
     905  *msdosdjgpp*)
     906    enable_gdbtk=no ;;
     907esac
     908
     909copy_dirs=
     910
     911# Handle --with-headers=XXX.  If the value is not "yes", the contents of
     912# the named directory are copied to $(tooldir)/sys-include.
     913if test x"${with_headers}" != x ; then
     914  if test x${is_cross_compiler} = xno ; then
     915    echo 1>&2 '***' --with-headers is only supported when cross compiling
     916    exit 1
     917  fi
     918  if test x"${with_headers}" != xyes ; then
     919    case "${exec_prefixoption}" in
     920    "") x=${prefix} ;;
     921    *) x=${exec_prefix} ;;
     922    esac
     923    copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
     924  fi
     925fi
     926
     927# Handle --with-libs=XXX.  If the value is not "yes", the contents of
     928# the name directories are copied to $(tooldir)/lib.  Multiple directories
     929# are permitted.
     930if test x"${with_libs}" != x ; then
     931  if test x${is_cross_compiler} = xno ; then
     932    echo 1>&2 '***' --with-libs is only supported when cross compiling
     933    exit 1
     934  fi
     935  if test x"${with_libs}" != xyes ; then
     936    # Copy the libraries in reverse order, so that files in the first named
     937    # library override files in subsequent libraries.
     938    case "${exec_prefixoption}" in
     939    "") x=${prefix} ;;
     940    *) x=${exec_prefix} ;;
     941    esac
     942    for l in ${with_libs}; do
     943      copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
     944    done
     945  fi
     946fi
     947
     948# Handle ${copy_dirs}
     949set fnord ${copy_dirs}
     950shift
     951while test $# != 0 ; do
     952  if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
     953    :
     954  else
     955    echo Copying $1 to $2
     956
     957    # Use the install script to create the directory and all required
     958    # parent directories.
     959    if test -d $2 ; then
     960      :
     961    else
     962      echo >config.temp
     963      ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
     964    fi
     965
     966    # Copy the directory, assuming we have tar.
     967    # FIXME: Should we use B in the second tar?  Not all systems support it.
     968    (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
     969
     970    # It is the responsibility of the user to correctly adjust all
     971    # symlinks.  If somebody can figure out how to handle them correctly
     972    # here, feel free to add the code.
     973
     974    echo $1 > $2/COPIED
     975  fi
     976  shift; shift
     977done
     978
     979# Work in distributions that contain no compiler tools, like Autoconf.
     980tentative_cc=""
     981host_makefile_frag=/dev/null
     982if test -d ${srcdir}/config ; then
     983case "${host}" in
     984  m68k-hp-hpux*)
     985    # Avoid "too much defining" errors from HPUX compiler.
     986    tentative_cc="cc -Wp,-H256000"
     987    # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
     988    # If it's HP/UX ar, this should be harmless.
     989    RANLIB="ar ts"
     990    ;;
     991  m68k-apollo-sysv*)
     992    tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
     993    ;;
     994  m68k-apollo-bsd*)
     995    #None of the Apollo compilers can compile gas or binutils.  The preprocessor
     996    # chokes on bfd, the compiler won't let you assign integers to enums, and
     997    # other problems.  Defining CC to gcc is a questionable way to say "don't use
     998    # the apollo compiler" (the preferred version of GCC could be called cc,
     999    # or whatever), but I'm not sure leaving CC as cc is any better...
     1000    #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
     1001    # Used to have BISON=yacc.
     1002    tentative_cc=gcc
     1003    ;;
     1004  m88k-dg-dgux*)
     1005    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
     1006    ;;
     1007  m88k-harris-cxux*)
     1008    # Under CX/UX, we want to tell the compiler to use ANSI mode.
     1009    tentative_cc="cc -Xa"
     1010    host_makefile_frag="config/mh-cxux"
     1011    ;;
     1012  m88k-motorola-sysv*)
     1013    ;;
     1014  mips*-dec-ultrix*)
     1015    tentative_cc="cc -Wf,-XNg1000"
     1016    host_makefile_frag="config/mh-decstation"
     1017    ;;
     1018  mips*-nec-sysv4*)
     1019    # The C compiler on NEC MIPS SVR4 needs bigger tables.
     1020    tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
     1021    host_makefile_frag="config/mh-necv4"
     1022    ;;
     1023  mips*-sgi-irix4*)
     1024    # Tell compiler to use K&R C.  We can't compile under the SGI Ansi
     1025    # environment.  Also bump switch table size so that cp-parse will
     1026    # compile.  Bump string length limit so linker builds.
     1027    tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
     1028    ;;
     1029  mips*-*-sysv4*)
     1030    host_makefile_frag="config/mh-sysv4"
     1031    ;;
     1032  mips*-*-sysv*)
     1033    # This is for a MIPS running RISC/os 4.52C.
     1034
     1035    # This is needed for GDB, but needs to be in the top-level make because
     1036    # if a library is compiled with the bsd headers and gets linked with the
     1037    # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
     1038    # a different size).
     1039    # ptrace(2) apparently has problems in the BSD environment.  No workaround is
     1040    # known except to select the sysv environment.  Could we use /proc instead?
     1041    # These "sysv environments" and "bsd environments" often end up being a pain.
     1042    #
     1043    # This is not part of CFLAGS because perhaps not all C compilers have this
     1044    # option.
     1045    tentative_cc="cc -systype sysv"
     1046    ;;
     1047  i370-ibm-opened*)
     1048    tentative_cc="c89"
     1049    ;;
     1050  i[[3456]]86-*-sysv5*)
     1051    host_makefile_frag="config/mh-sysv5"
     1052    ;;
     1053  i[[3456]]86-*-dgux*)
     1054    tentative_cc="gcc -Wall -ansi -D__using_DGUX"
     1055    host_makefile_frag="config/mh-dgux386"
     1056    ;;
     1057  i[[3456]]86-ncr-sysv4.3*)
     1058    # The MetaWare compiler will generate a copyright message unless you
     1059    # turn it off by adding the -Hnocopyr flag.
     1060    tentative_cc="cc -Hnocopyr"
     1061    ;;
     1062  i[[3456]]86-ncr-sysv4*)
     1063    # for an NCR 3000 (i486/SVR4) system.
     1064    # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
     1065    # This compiler not only emits obnoxious copyright messages every time
     1066    # you run it, but it chokes and dies on a whole bunch of GNU source
     1067    # files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
     1068    tentative_cc="/usr/ccs/ATT/cc"
     1069    host_makefile_frag="config/mh-ncr3000"
     1070    ;;
     1071  i[[3456]]86-*-sco3.2v5*)
     1072    ;;
     1073  i[[3456]]86-*-sco*)
     1074    # The native C compiler botches some simple uses of const.  Unfortunately,
     1075    # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
     1076    tentative_cc="cc -Dconst="
     1077    host_makefile_frag="config/mh-sco"
     1078    ;;
     1079  i[[3456]]86-*-udk*)
     1080    host_makefile_frag="config/mh-sysv5"
     1081    ;;
     1082  i[[3456]]86-*-solaris2*)
     1083    host_makefile_frag="config/mh-sysv4"
     1084    ;;
     1085  i[[3456]]86-*-msdosdjgpp*)
     1086    host_makefile_frag="config/mh-djgpp"
     1087    ;;
     1088  *-cygwin*)
     1089    host_makefile_frag="config/mh-cygwin"
     1090    ;;
     1091  *-mingw32*)
     1092    host_makefile_frag="config/mh-mingw32"
     1093    ;;
     1094  *-interix*)
     1095    host_makefile_frag="config/mh-interix"
     1096    ;;
     1097  vax-*-ultrix2*)
     1098    # The old BSD pcc isn't up to compiling parts of gdb so use gcc
     1099    tentative_cc=gcc
     1100    ;;
     1101  *-*-solaris2*)
     1102    host_makefile_frag="config/mh-solaris"
     1103    ;;
     1104  m68k-sun-sunos*)
     1105    # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
     1106    # without overflowing the jump tables (-J says to use a 32 bit table)
     1107    tentative_cc="cc -J"
     1108    ;;
     1109  *-hp-hpux*)
     1110    tentative_cc="cc -Wp,-H256000"
     1111    ;;
     1112  *-*-hiux*)
     1113    tentative_cc="cc -Wp,-H256000"
     1114    ;;
     1115  rs6000-*-lynxos*)
     1116    # /bin/cc is less than useful for our purposes.  Always use GCC
     1117    tentative_cc="/usr/cygnus/progressive/bin/gcc"
     1118    host_makefile_frag="config/mh-lynxrs6k"
     1119    ;;
     1120  *-*-lynxos*)
     1121    # /bin/cc is less than useful for our purposes.  Always use GCC
     1122    tentative_cc="/bin/gcc"
     1123    ;;
     1124  *-*-sysv4*)
     1125    host_makefile_frag="config/mh-sysv4"
     1126    ;;
     1127esac
     1128fi
     1129
     1130extra_arflags_for_target=
     1131extra_nmflags_for_target=
     1132extra_ranlibflags_for_target=
     1133target_makefile_frag=/dev/null
     1134case "${target}" in
     1135  i[[3456]]86-*-netware*)
     1136    target_makefile_frag="config/mt-netware"
     1137    ;;
     1138  powerpc-*-netware*)
     1139    target_makefile_frag="config/mt-netware"
     1140    ;;
     1141  *-*-linux*)
     1142    target_makefile_frag="config/mt-linux"
     1143    ;;
     1144  *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
     1145    # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
     1146    # commands to handle both 32-bit and 64-bit objects.  These flags are
     1147    # harmless if we're using GNU nm or ar.
     1148    extra_arflags_for_target=" -X32_64"
     1149    extra_nmflags_for_target=" -B -X32_64"
     1150    ;;
     1151  *-*-darwin*)
     1152    # ranlib from Darwin requires the -c flag to look at common symbols.
     1153    extra_ranlibflags_for_target=" -c"
     1154    ;;
     1155  mips*-*-pe | sh*-*-pe | *arm-wince-pe)
     1156    target_makefile_frag="config/mt-wince"
     1157    ;;
     1158esac
     1159
     1160alphaieee_frag=/dev/null
     1161case $target in
     1162  alpha*-*-*)
     1163    # This just makes sure to use the -mieee option to build target libs.
     1164    # This should probably be set individually by each library.
     1165    alphaieee_frag="config/mt-alphaieee"
     1166    ;;
     1167esac
     1168
     1169# If --enable-target-optspace always use -Os instead of -O2 to build
     1170# the target libraries, similarly if it is not specified, use -Os
     1171# on selected platforms.
     1172ospace_frag=/dev/null
     1173case "${enable_target_optspace}:${target}" in
     1174  yes:*)
     1175    ospace_frag="config/mt-ospace"
     1176    ;;
     1177  :d30v-*)
     1178    ospace_frag="config/mt-d30v"
     1179    ;;
     1180  :m32r-* | :d10v-* | :fr30-*)
     1181    ospace_frag="config/mt-ospace"
     1182    ;;
     1183  no:* | :*)
     1184    ;;
     1185  *)
     1186    echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
     1187    ;;
     1188esac
    10911189
    10921190# Set with_gnu_as and with_gnu_ld as appropriate.
     
    11031201# --without-gnu-ld options for the configure script.
    11041202
    1105 if [ x${use_gnu_as} = x ] ; then
    1106   if [ x${with_gnu_as} != xno ] && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && [ -d ${srcdir}/${gasdir} ] ; then
    1107     with_gnu_as=yes
    1108     withoptions="$withoptions --with-gnu-as"
    1109   fi
    1110 fi
    1111 
    1112 if [ x${use_gnu_ld} = x ] ; then
    1113   if [ x${with_gnu_ld} != xno ] && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 && [ -d ${srcdir}/ld ] ; then
    1114     with_gnu_ld=yes
    1115     withoptions="$withoptions --with-gnu-ld"
    1116   fi
    1117 fi
    1118 
    1119 # If using newlib, add --with-newlib to the withoptions so that gcc/configure
     1203if test x${use_gnu_as} = x &&
     1204   echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
     1205  with_gnu_as=yes
     1206  extra_host_args="$extra_host_args --with-gnu-as"
     1207fi
     1208
     1209if test x${use_gnu_ld} = x &&
     1210   echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
     1211  with_gnu_ld=yes
     1212  extra_host_args="$extra_host_args --with-gnu-ld"
     1213fi
     1214
     1215# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
    11201216# can detect this case.
    11211217
    1122 if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then
     1218if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
    11231219  with_newlib=yes
    1124   withoptions="$withoptions --with-newlib"
    1125 fi
    1126 
    1127 if [ x${shared} = xyes ]; then
     1220  extra_host_args="$extra_host_args --with-newlib"
     1221fi
     1222
     1223
     1224# Default to using --with-stabs for certain targets.
     1225if test x${with_stabs} = x ; then
    11281226  case "${target}" in
    1129     hppa*)
    1130       target_makefile_frag="${target_makefile_frag} config/mt-papic"
    1131       ;;
    1132     i[3456]86-*)
    1133       target_makefile_frag="${target_makefile_frag} config/mt-x86pic"
    1134       ;;
    1135     ia64-*)
    1136       target_makefile_frag="${target_makefile_frag} config/mt-ia64pic"
    1137       ;;
    1138     powerpc*-*-aix*)
    1139       # We don't want -fPIC on AIX.
    1140       ;;
    1141     powerpc*-*)
    1142       target_makefile_frag="${target_makefile_frag} config/mt-ppcpic"
    1143       ;;
    1144     alpha*-*-linux*)
    1145       target_makefile_frag="${target_makefile_frag} config/mt-elfalphapic"
    1146       ;;
    1147     *)
    1148       if test -f ${srcdir}/config/mt-${target_cpu}pic; then
    1149         target_makefile_frag="${target_makefile_frag} config/mt-${target_cpu}pic"
     1227  mips*-*-irix6*o32)
     1228    with_stabs=yes;
     1229    extra_host_args="${extra_host_args} --with-stabs"
     1230    ;;
     1231  mips*-*-irix6*)
     1232    ;;
     1233  mips*-*-* | alpha*-*-osf*)
     1234    with_stabs=yes;
     1235    extra_host_args="${extra_host_args} --with-stabs"
     1236    ;;
     1237  esac
     1238fi
     1239
     1240# hpux11 in 64bit mode has libraries in a weird place.  Arrange to find
     1241# them automatically.
     1242case "${host}" in
     1243  hppa*64*-*-hpux11*)   
     1244    extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
     1245    ;;
     1246esac
     1247
     1248# If we aren't going to be using gcc, see if we can extract a definition
     1249# of CC from the fragment.
     1250# Actually, use the 'pre-extracted' version above.
     1251if test -z "${CC}" && test "${build}" = "${host}" ; then
     1252  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
     1253  found=
     1254  for dir in $PATH; do
     1255    test -z "$dir" && dir=.
     1256    if test -f $dir/gcc; then
     1257      found=yes
     1258      break
     1259    fi
     1260  done
     1261  IFS="$save_ifs"
     1262  if test -z "${found}" && test -n "${tentative_cc}" ; then
     1263    CC=$tentative_cc
     1264  fi
     1265fi
     1266
     1267# Some systems (e.g., one of the i386-aix systems the gas testers are
     1268# using) don't handle "\$" correctly, so don't use it here.
     1269tooldir='$(exec_prefix)'/${target_alias}
     1270build_tooldir=${tooldir}
     1271
     1272# Generate a default definition for YACC.  This is used if the makefile can't
     1273# locate bison or byacc in objdir.
     1274
     1275for prog in 'bison -y' byacc yacc
     1276do
     1277  set dummy $prog; tmp=$2
     1278  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
     1279  for dir in $PATH; do
     1280    test -z "$dir" && dir=.
     1281    if test -f $dir/$tmp; then
     1282      DEFAULT_YACC="$prog"
     1283      break
     1284    fi
     1285  done
     1286  IFS="$save_ifs"
     1287
     1288  test -n "$DEFAULT_YACC" && break
     1289done
     1290
     1291# Generate a default definition for M4.  This is used if the makefile can't
     1292# locate m4 in objdir.
     1293
     1294for prog in gm4 gnum4 m4
     1295do
     1296  set dummy $prog; tmp=$2
     1297  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
     1298  for dir in $PATH; do
     1299    test -z "$dir" && dir=.
     1300    if test -f $dir/$tmp; then
     1301      DEFAULT_M4="$prog"
     1302      break
     1303    fi
     1304  done
     1305  IFS="$save_ifs"
     1306
     1307  test -n "$DEFAULT_M4" && break
     1308done
     1309
     1310# Generate a default definition for LEX.  This is used if the makefile can't
     1311# locate flex in objdir.
     1312
     1313for prog in flex lex
     1314do
     1315  set dummy $prog; tmp=$2
     1316  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}:"
     1317  for dir in $PATH; do
     1318    test -z "$dir" && dir=.
     1319    if test -f $dir/$tmp; then
     1320      DEFAULT_LEX="$prog"
     1321      break
     1322    fi
     1323  done
     1324  IFS="$save_ifs"
     1325
     1326  test -n "$DEFAULT_LEX" && break
     1327done
     1328
     1329if test "${build}" != "${host}" ; then
     1330  # If we are doing a Canadian Cross, in which the host and build systems
     1331  # are not the same, we set reasonable default values for the tools.
     1332
     1333  BISON=${BISON-bison}
     1334  CC=${CC-${host_alias}-gcc}
     1335  CFLAGS=${CFLAGS-"-g -O2"}
     1336  CXX=${CXX-${host_alias}-c++}
     1337  CXXFLAGS=${CXXFLAGS-"-g -O2"}
     1338  CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
     1339  CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
     1340  CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
     1341  GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
     1342  GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
     1343  BUILD_PREFIX=${build_alias}-
     1344  BUILD_PREFIX_1=${build_alias}-
     1345  MAKEINFO=${MAKEINFO-makeinfo}
     1346
     1347  if test -z "${YACC}" ; then
     1348    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
     1349    for dir in $PATH; do
     1350      test -z "$dir" && dir=.
     1351      if test -f $dir/bison; then
     1352        YACC="bison -y"
     1353        break
    11501354      fi
    1151       ;;
     1355      if test -f $dir/byacc; then
     1356        YACC=byacc
     1357        break
     1358      fi
     1359      if test -f $dir/yacc; then
     1360        YACC=yacc
     1361        break
     1362      fi
     1363    done
     1364    IFS="$save_ifs"
     1365    if test -z "${YACC}" ; then
     1366      YACC="bison -y"
     1367    fi
     1368  fi
     1369
     1370  if test -z "${LEX}" ; then
     1371    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
     1372    for dir in $PATH; do
     1373      test -z "$dir" && dir=.
     1374      if test -f $dir/flex; then
     1375        LEX=flex
     1376        break
     1377      fi
     1378      if test -f $dir/lex; then
     1379        LEX=lex
     1380        break
     1381      fi
     1382    done
     1383    IFS="$save_ifs"
     1384    LEX=${LEX-flex}
     1385  fi
     1386
     1387else
     1388  # Set reasonable default values for some tools even if not Canadian.
     1389  # Of course, these are different reasonable default values, originally
     1390  # specified directly in the Makefile.
     1391  # We don't export, so that autoconf can do its job.
     1392  # Note that all these settings are above the fragment inclusion point
     1393  # in Makefile.in, so can still be overridden by fragments.
     1394  # This is all going to change when we autoconfiscate...
     1395
     1396  BISON="\$(USUAL_BISON)"
     1397  CC_FOR_BUILD="\$(CC)"
     1398  GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
     1399  BUILD_PREFIX=
     1400  BUILD_PREFIX_1=loser-
     1401  MAKEINFO="\$(USUAL_MAKEINFO)"
     1402  LEX="\$(USUAL_LEX)"
     1403  YACC="\$(USUAL_YACC)"
     1404
     1405  # If CC is still not set, try to get gcc.
     1406  cc_prog_is_gcc=
     1407  if test -z "${CC}" ; then
     1408    IFS="${IFS=         }"; save_ifs="$IFS"; IFS="${IFS}:"
     1409    for dir in $PATH; do
     1410      test -z "$dir" && dir=.
     1411      if test -f $dir/gcc; then
     1412        CC="gcc"
     1413        cc_prog_is_gcc=yes
     1414        echo 'void f(){}' > conftest.c
     1415        if test -z "`${CC} -g -c conftest.c 2>&1`"; then
     1416          CFLAGS=${CFLAGS-"-g -O2"}
     1417          CXXFLAGS=${CXXFLAGS-"-g -O2"}
     1418        else
     1419          CFLAGS=${CFLAGS-"-O2"}
     1420          CXXFLAGS=${CXXFLAGS-"-O2"}
     1421        fi
     1422        rm -f conftest*
     1423        break
     1424      fi
     1425    done
     1426    IFS="$save_ifs"
     1427    CC=${CC-cc}
     1428  else
     1429    # Determine if we are using gcc.
     1430    cat > conftest.c <<EOF
     1431#ifdef __GNUC__
     1432  yes;
     1433#endif
     1434EOF
     1435    if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
     1436      cc_prog_is_gcc=yes
     1437    fi
     1438    rm -f conftest.c
     1439    if test -z "${CFLAGS}"; then
     1440      # Here CC is set but CFLAGS is not.  Use a quick hack to use -O2 if CC
     1441      # is set to a version of gcc.
     1442      if test "$cc_prog_is_gcc" = yes; then
     1443        echo 'void f(){}' > conftest.c
     1444        if test -z "`${CC} -g -c conftest.c 2>&1`"; then
     1445          CFLAGS=${CFLAGS-"-g -O2"}
     1446          CXXFLAGS=${CXXFLAGS-"-g -O2"}
     1447        else
     1448          CFLAGS=${CFLAGS-"-O2"}
     1449          CXXFLAGS=${CXXFLAGS-"-O2"}
     1450        fi
     1451        rm -f conftest*
     1452      fi
     1453    fi
     1454  fi
     1455
     1456  # We must set the default linker to the linker used by gcc for the correct
     1457  # operation of libtool.  If LD is not defined and we are using gcc, try to
     1458  # set the LD default to the ld used by gcc.
     1459  if test -z "$LD"; then
     1460    if test "$cc_prog_is_gcc" = yes; then
     1461      case $build in
     1462      *-*-mingw*)
     1463        gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
     1464      *)
     1465        gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
     1466      esac
     1467      case $gcc_prog_ld in
     1468      # Accept absolute paths.
     1469      [[\\/]* | [A-Za-z]:[\\/]*)]
     1470        LD="$gcc_prog_ld" ;;
     1471      esac
     1472    fi
     1473  fi
     1474
     1475  CXX=${CXX-"c++"}
     1476  CFLAGS=${CFLAGS-"-g"}
     1477  CXXFLAGS=${CXXFLAGS-"-g -O2"}
     1478fi
     1479
     1480# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
     1481# Set up the list of links to be made.
     1482# ${links} is the list of link names, and ${files} is the list of names to link to.
     1483
     1484# Make the links.
     1485configlinks="${links}"
     1486if test -r ./config.status  ; then
     1487  mv -f ./config.status ./config.back
     1488fi
     1489while test -n "${files}" ; do
     1490  # set file to car of files, files to cdr of files
     1491  set ${files}; file=$1; shift; files=$*
     1492  set ${links}; link=$1; shift; links=$*
     1493
     1494  if test ! -r ${srcdir}/${file} ; then
     1495    if test ! -r ${file} ; then
     1496      echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
     1497      echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
     1498      exit 1
     1499    else
     1500      srcfile=${file}
     1501    fi
     1502  else
     1503    srcfile=${srcdir}/${file}
     1504  fi
     1505
     1506  ${remove} -f ${link}
     1507  # Make a symlink if possible, otherwise try a hard link
     1508  if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
     1509    true
     1510  else
     1511    # We need to re-remove the file because Lynx leaves a
     1512    # very strange directory there when it fails an NFS symlink.
     1513    ${remove} -r -f ${link}
     1514    ${hard_link} ${srcfile} ${link}
     1515  fi
     1516  if test ! -r ${link} ; then
     1517    echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
     1518    exit 1
     1519  fi
     1520
     1521  echo "Linked \"${link}\" to \"${srcfile}\"."
     1522done
     1523
     1524# Create a .gdbinit file which runs the one in srcdir
     1525# and tells GDB to look there for source files.
     1526
     1527if test -r ${srcdir}/.gdbinit ; then
     1528  case ${srcdir} in
     1529    .) ;;
     1530    *) cat > ./.gdbinit <<EOF
     1531# ${NO_EDIT}
     1532dir ${srcdir}
     1533dir .
     1534source ${srcdir}/.gdbinit
     1535EOF
     1536    ;;
    11521537  esac
    11531538fi
    1154 
    1155 rm -f mt-frag
    1156 if [ -n "${target_makefile_frag}" ] ; then
    1157   for f in ${target_makefile_frag}
    1158   do
    1159     cat ${srcdir}/$f >> mt-frag
    1160   done
    1161   target_makefile_frag=mt-frag
    1162 fi
    1163 
    1164 # post-target:
    11651539
    11661540# Make sure that the compiler is able to generate an executable.  If it
     
    11681542# executable--we might be using a cross compiler--we only care whether it
    11691543# can be created.  At this point the main configure script has set CC.
     1544we_are_ok=no
    11701545echo "int main () { return 0; }" > conftest.c
    11711546${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
    1172 if [ $? = 0 ] && [ -s conftest -o -s conftest.exe ]; then
    1173   :
    1174 else
    1175   echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
    1176   echo 1>&2 "*** You must set the environment variable CC to a working compiler."
    1177   rm -f conftest*
    1178   exit 1
    1179 fi
     1547if test $? = 0 ; then
     1548  if test -s conftest || test -s conftest.exe ; then
     1549    we_are_ok=yes
     1550  fi
     1551fi
     1552case $we_are_ok in
     1553  no)
     1554    echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
     1555    echo 1>&2 "*** You must set the environment variable CC to a working compiler."
     1556    rm -f conftest*
     1557    exit 1
     1558    ;;
     1559esac
    11801560rm -f conftest*
    11811561
     
    11841564  sparc-sun-solaris2*)
    11851565      CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
    1186       if [ "`/usr/bin/which $CCBASE`" = "/usr/ucb/cc" ] ; then
     1566      if test "`type $CCBASE | sed 's/^[[^/]]*//'`" = "/usr/ucb/cc" ; then
    11871567          could_use=
    1188           [ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin"
    1189           if [ -d /opt/cygnus/bin ] ; then
    1190               if [ "$could_use" = "" ] ; then
     1568          test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
     1569          if test -d /opt/cygnus/bin ; then
     1570              if test "$could_use" = "" ; then
    11911571                  could_use="/opt/cygnus/bin"
    11921572              else
     
    11941574              fi
    11951575          fi
    1196         if [ "$could_use" = "" ] ; then
     1576        if test "$could_use" = "" ; then
    11971577            echo "Warning: compilation may fail because you're using"
    11981578            echo "/usr/ucb/cc.  You should change your PATH or CC "
     
    12101590# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
    12111591# binutils tools will find libbfd.so.
    1212 if [ "${shared}" = "yes" ]; then
    1213   sed -e 's/^SET_LIB_PATH[      ]*=.*$/SET_LIB_PATH = $(REALLY_SET_LIB_PATH)/' \
    1214       Makefile > Makefile.tem
    1215   rm -f Makefile
    1216   mv -f Makefile.tem Makefile
    1217 
    1218   case "${host}" in
    1219   *-*-hpux*)
    1220     sed -e 's/^RPATH_ENVVAR[    ]*=.*$/RPATH_ENVVAR = SHLIB_PATH/' \
    1221         Makefile > Makefile.tem
    1222     rm -f Makefile
    1223     mv -f Makefile.tem Makefile
    1224     ;;
     1592case "${enable_shared}" in
     1593  no | "") SET_LIB_PATH= ;;
     1594  *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
     1595esac
     1596
     1597case "${host}" in
     1598  *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
     1599  *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
     1600esac
     1601
     1602# Record target_configdirs and the configure arguments for target and
     1603# build configuration in Makefile.
     1604target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
     1605
     1606# This is the final value for target_configdirs.  configdirs already
     1607# has its final value.  It's time to create some lists of valid targets.
     1608
     1609# While at that, we remove Makefiles if we were started for recursive
     1610# configuration, such that the top-level Makefile reconfigures them,
     1611# like we used to do when configure itself was recursive.
     1612
     1613all_build_modules=
     1614configure_build_modules=
     1615# Only make build modules if build != host.
     1616# This should be done more generally, but at the moment it doesn't matter.
     1617if test ${host_alias} != ${build_alias} ; then
     1618  for module in libiberty ; do
     1619    all_build_modules=all-build-${module}
     1620    configure_build_modules=configure-build-${module}
     1621    if test -z "${no_recursion}" \
     1622       && test -f ${build_subdir}/${module}/Makefile; then
     1623      echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
     1624      rm -f ${build_subdir}/${module}/Makefile
     1625    fi
     1626  done
     1627fi
     1628
     1629all_host_modules=
     1630check_host_modules=
     1631install_host_modules=
     1632configure_host_modules=
     1633for module in ${configdirs} ; do
     1634  all_host_modules="${all_host_modules} all-${module}"
     1635  check_host_modules="${check_host_modules} check-${module}"
     1636  install_host_modules="${install_host_modules} install-${module}"
     1637  configure_host_modules="${configure_host_modules} configure-${module}"
     1638  if test -z "${no_recursion}" \
     1639     && test -f ${module}/Makefile; then
     1640    echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
     1641    rm -f ${module}/Makefile
     1642  fi
     1643done
     1644install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
     1645
     1646all_target_modules=
     1647check_target_modules=
     1648install_target_modules=
     1649configure_target_modules=
     1650for module in ${target_configdirs} ; do
     1651  all_target_modules="${all_target_modules} all-target-${module}"
     1652  check_target_modules="${check_target_modules} check-target-${module}"
     1653  install_target_modules="${install_target_modules} install-target-${module}"
     1654  configure_target_modules="${configure_target_modules} configure-target-${module}"
     1655  if test -z "${no_recursion}" \
     1656     && test -f ${target_subdir}/${module}/Makefile; then
     1657    echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
     1658    rm -f ${target_subdir}/${module}/Makefile
     1659  fi
     1660done
     1661
     1662# Determine whether gdb needs tk/tcl or not.
     1663# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
     1664# and in that case we want gdb to be built without tk.  Ugh!
     1665# In fact I believe gdb is the *only* package directly dependent on tk,
     1666# so we should be able to put the 'maybe's in unconditionally and
     1667# leave out the maybe dependencies when enable_gdbtk is false.  I'm not
     1668# 100% sure that that's safe though.
     1669
     1670gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
     1671case "$enable_gdbtk" in
     1672  no)
     1673    GDB_TK="" ;;
     1674  yes)
     1675    GDB_TK="${gdb_tk}" ;;
     1676  *)
     1677    # Only add the dependency on gdbtk when GDBtk is part of the gdb
     1678    # distro.  Eventually someone will fix this and move Insight, nee
     1679    # gdbtk to a separate directory.
     1680    if test -d ${srcdir}/gdb/gdbtk ; then
     1681      GDB_TK="${gdb_tk}"
     1682    else
     1683      GDB_TK=""
     1684    fi
     1685    ;;
     1686esac
     1687
     1688# Create the 'maybe dependencies'.  This uses a temporary file.
     1689rm -f maybedep.tmp
     1690echo '# maybedep.tmp' > maybedep.tmp
     1691for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \
     1692        ${install_host_modules} ${install_target_modules} \
     1693        ${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \
     1694        ; do
     1695  echo "maybe-${item}: ${item}" >> maybedep.tmp
     1696done
     1697maybe_dependencies=maybedep.tmp
     1698AC_SUBST_FILE(maybe_dependencies)
     1699
     1700# Create the serialization dependencies.  This uses a temporary file.
     1701
     1702AC_ARG_ENABLE([serial-configure],
     1703[  --disable-serial-[{host,target,build}-]configure
     1704                          Don't force sequential configuration of
     1705                          sub-packages for the host, target or build
     1706                          machine, or of any sub-packages at all])
     1707
     1708# These force 'configure's to be done one at a time, to avoid problems
     1709# with contention over a shared config.cache.
     1710rm -f serdep.tmp
     1711echo '# serdep.tmp' > serdep.tmp
     1712olditem=
     1713test "x${enable_serial_configure}" = xno ||
     1714test "x${enable_serial_build_configure}" = xno ||
     1715for item in ${build_configdirs} ; do
     1716  case ${olditem} in
     1717    "") ;;
     1718    *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
    12251719  esac
    1226 fi
    1227 
    1228 # Record target_configdirs and the configure arguments in Makefile.
    1229 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
    1230 targargs=`echo "${arguments}" | \
    1231         sed -e 's/--no[^        ]*//' \
    1232             -e 's/--cache[a-z-]*=[^     ]*//' \
    1233             -e 's/--ho[a-z-]*=[^        ]*//' \
    1234             -e 's/--bu[a-z-]*=[^        ]*//' \
    1235             -e 's/--ta[a-z-]*=[^        ]*//'`
     1720  olditem=${item}
     1721done
     1722olditem=
     1723test "x${enable_serial_configure}" = xno ||
     1724test "x${enable_serial_host_configure}" = xno ||
     1725for item in ${configdirs} ; do
     1726  case ${olditem} in
     1727    "") ;;
     1728    *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
     1729  esac
     1730  olditem=${item}
     1731done
     1732olditem=
     1733test "x${enable_serial_configure}" = xno ||
     1734test "x${enable_serial_target_configure}" = xno ||
     1735for item in ${target_configdirs} ; do
     1736  case ${olditem} in
     1737    "") ;;
     1738    *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
     1739  esac
     1740  olditem=${item}
     1741done
     1742serialization_dependencies=serdep.tmp
     1743AC_SUBST_FILE(serialization_dependencies)
     1744
     1745# Base args.  Strip norecursion, cache-file, srcdir, host, build,
     1746# target and nonopt.  These are the ones we might not want to pass
     1747# down to subconfigures.
     1748baseargs=`echo " ${ac_configure_args} " | \
     1749        sed -e 's/ --no[[^ ]]* / /' \
     1750            -e 's/ --c[[a-z-]]*[[= ]][[^ ]]* / /' \
     1751            -e 's/ --sr[[a-z-]]*[[= ]][[^ ]]* / /' \
     1752            -e 's/ --ho[[a-z-]]*[[= ]][[^ ]]* / /' \
     1753            -e 's/ --bu[[a-z-]]*[[= ]][[^ ]]* / /' \
     1754            -e 's/ --t[[a-z-]]*[[= ]][[^ ]]* / /' \
     1755            -e 's/ -cache-file[[= ]][[^ ]]* / /' \
     1756            -e 's/ -srcdir[[= ]][[^ ]]* / /' \
     1757            -e 's/ -host[[= ]][[^ ]]* / /' \
     1758            -e 's/ -build[[= ]][[^ ]]* / /' \
     1759            -e 's/ -target[[= ]][[^ ]]* / /' \
     1760            -e "s/ [[^' -][^ ]*] / /" \
     1761            -e 's/^ *//;s/ *$//'`
     1762
     1763# For the build-side libraries, we just need to pretend we're native,
     1764# and not use the same cache file.  Multilibs are neither needed nor
     1765# desired.
     1766build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
     1767
     1768# For host modules, accept cache file option, or specification as blank.
     1769case "${cache_file}" in
     1770"") # empty
     1771  cache_file_option="" ;;
     1772/* | [[A-Za-z]]:[[\\/]]* ) # absolute path
     1773  cache_file_option="--cache-file=${cache_file}" ;;
     1774*) # relative path
     1775  cache_file_option="--cache-file=../${cache_file}" ;;
     1776esac
     1777
     1778host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
     1779
     1780target_configargs=${baseargs}
    12361781
    12371782# Passing a --with-cross-host argument lets the target libraries know
     
    12401785# sorts of decisions they want to make on this basis.  Please consider
    12411786# this option to be deprecated.  FIXME.
    1242 if [ x${is_cross_compiler} = xyes ]; then
    1243   targargs="--with-cross-host=${host_alias} ${targargs}"
     1787if test x${is_cross_compiler} = xyes ; then
     1788  target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
    12441789fi
    12451790
    12461791# Default to --enable-multilib.
    1247 if [ x${enable_multilib} = x ]; then
    1248   targargs="--enable-multilib ${targargs}"
     1792if test x${enable_multilib} = x ; then
     1793  target_configargs="--enable-multilib ${target_configargs}"
    12491794fi
    12501795
    12511796# Pass --with-newlib if appropriate.  Note that target_configdirs has
    12521797# changed from the earlier setting of with_newlib.
    1253 if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then
    1254   targargs="--with-newlib ${targargs}"
    1255 fi
     1798if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
     1799  target_configargs="--with-newlib ${target_configargs}"
     1800fi
     1801
     1802# Pass the appropriate --host, --build, and --cache-file arguments.
     1803target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
    12561804
    12571805# provide a proper gxx_include_dir.
    12581806# Note, if you change the default, make sure to fix both here and in
    1259 # the gcc, libio, and libstdc++ subdirectories.
     1807# the gcc and libstdc++-v3 subdirectories.
    12601808# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
    1261 gxx_include_dir=
    1262 if test -n "${with_gxx_include_dir}"; then
    1263   case "${with_gxx_include_dir}" in
    1264     yes )
    1265       echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
    1266       exit 1
    1267       ;;
    1268     no )
    1269       ;;
    1270     * )
    1271       gxx_include_dir=${with_gxx_include_dir}
    1272       ;;
    1273   esac
    1274 fi
    1275 if test x${gxx_include_dir} = x; then
    1276   if test x${enable_version_specific_runtime_libs} = xyes; then
    1277     gxx_include_dir='${libsubdir}/include/g++'
    1278   else
    1279     . ${topsrcdir}/config.if
    1280     gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
    1281   fi
    1282 else
    1283   gxx_include_dir=${gxx_include_dir}
    1284 fi
     1809case "${with_gxx_include_dir}" in
     1810  yes)
     1811    AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory])
     1812    ;;
     1813  no | "")
     1814    case "${enable_version_specific_runtime_libs}" in
     1815      yes) gxx_include_dir='${libsubdir}/include/c++' ;;
     1816      *)
     1817        . ${srcdir}/config.if
     1818        gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
     1819    esac ;;
     1820  *) gxx_include_dir=${with_gxx_include_dir} ;;
     1821esac
    12851822
    12861823FLAGS_FOR_TARGET=
    1287 case " $skipdirs " in
    1288 *" target-newlib "*) ;;
    1289 *)
     1824case " $target_configdirs " in
     1825 *" newlib "*)
     1826  case " $target_configargs " in
     1827  *" --with-newlib "*)
    12901828   case "$target" in
    12911829   *-cygwin*)
     
    12941832
    12951833   # If we're not building GCC, don't discard standard headers.
    1296    if test -d ${topsrcdir}/gcc; then
     1834   if test -d ${srcdir}/gcc; then
    12971835     FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
    12981836
     
    13161854   fi
    13171855
    1318    # If we're building newlib, use its generic headers last, but search
    1319    # for any libc-related directories first (so make it the last -B
    1320    # switch).
    1321    FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
     1856   case "${target}-${is_cross_compiler}" in
     1857   i[[3456]]86-*-linux*-no)
     1858      # Here host == target, so we don't need to build gcc,
     1859      # so we don't want to discard standard headers.
     1860      FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
     1861      ;;
     1862   *)
     1863      # If we're building newlib, use its generic headers last, but search
     1864      # for any libc-related directories first (so make it the last -B
     1865      # switch).
     1866      FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
     1867      ;;
     1868   esac
    13221869   ;;
     1870  esac
     1871  ;;
    13231872esac
    13241873
     
    13271876# flags for directories within the install tree of the compiler
    13281877# being built; programs in there won't even run.
    1329 if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then
     1878if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
    13301879  # Search for pre-installed headers if nothing else fits.
    1331   FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
    1332 fi
    1333 
    1334 if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno &&
    1335    echo " ${configdirs} " | grep " ld " > /dev/null &&
    1336    test -d ${srcdir}/ld; then
     1880  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
     1881fi
     1882
     1883if test "x${use_gnu_ld}" = x &&
     1884   echo " ${configdirs} " | grep " ld " > /dev/null ; then
    13371885  # Arrange for us to find uninstalled linker scripts.
    13381886  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
     
    13411889if test "x${CC_FOR_TARGET+set}" = xset; then
    13421890  :
    1343 elif test -d ${topsrcdir}/gcc; then
     1891elif test -d ${srcdir}/gcc; then
    13441892  CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
    13451893elif test "$host" = "$target"; then
    13461894  CC_FOR_TARGET='$(CC)'
    13471895else
    1348   CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
    1349 fi
    1350 # On Canadian crosses, configure reads CC_FOR_TARGET from Makefile,
    1351 # if Makefile exists.  Prevent $(FLAGS_FOR_TARGET) from being duplicated.
    1352 case $CC_FOR_TARGET in
    1353 *' $(FLAGS_FOR_TARGET)') ;;
    1354 *) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
    1355 esac
    1356 
    1357 if test "x${CHILL_FOR_TARGET+set}" = xset; then
     1896  CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
     1897fi
     1898CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
     1899
     1900if test "x${GCJ_FOR_TARGET+set}" = xset; then
    13581901  :
    1359 elif test -d ${topsrcdir}/gcc; then
    1360   CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/'
     1902elif test -d ${srcdir}/gcc; then
     1903  GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
    13611904elif test "$host" = "$target"; then
    1362   CHILL_FOR_TARGET='$(CC)'
     1905  GCJ_FOR_TARGET='gcj'
    13631906else
    1364   CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
    1365 fi
    1366 case $CHILL_FOR_TARGET in
    1367 *' $(FLAGS_FOR_TARGET)') ;;
    1368 *) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
    1369 esac
     1907  GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
     1908fi
     1909GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
     1910
     1911# Don't use libstdc++-v3's flags to configure/build itself.
     1912libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
     1913raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
    13701914
    13711915if test "x${CXX_FOR_TARGET+set}" = xset; then
    13721916  :
    1373 elif test -d ${topsrcdir}/gcc; then
     1917elif test -d ${srcdir}/gcc; then
     1918  # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
     1919  # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
     1920  # default whereas gcc does not.
     1921  # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
     1922  # all other cases.
    13741923  CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
     1924  RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
    13751925elif test "$host" = "$target"; then
    13761926  CXX_FOR_TARGET='$(CXX)'
     1927  RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
    13771928else
    1378   CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}`
    1379 fi
    1380 case $CXX_FOR_TARGET in
    1381 *' $(FLAGS_FOR_TARGET)') ;;
    1382 *) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
    1383 esac
    1384 qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'`
    1385 
    1386 targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"
    1387 sed -e "s:^TARGET_CONFIGDIRS[   ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
    1388     -e "s%^CONFIG_ARGUMENTS[    ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \
    1389     -e "s%^FLAGS_FOR_TARGET[    ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \
    1390     -e "s%^CC_FOR_TARGET[       ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \
    1391     -e "s%^CHILL_FOR_TARGET[    ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \
    1392     -e "s%^CXX_FOR_TARGET[      ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \
    1393     -e "s%^TARGET_SUBDIR[       ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \
    1394     -e "s%^gxx_include_dir[     ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
    1395        Makefile > Makefile.tem
    1396 rm -f Makefile
    1397 mv -f Makefile.tem Makefile
    1398 
    1399 #
    1400 # Local Variables:
    1401 # fill-column: 131
    1402 # End:
    1403 #
     1929  CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
     1930  RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
     1931fi
     1932CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
     1933RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
     1934
     1935qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
     1936qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
     1937
     1938# We want to defer the evaluation of `cmd`s and shell variables in
     1939# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
     1940# bootstrap.  We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
     1941# quotes, but we still have to duplicate `$'s so that shell variables
     1942# can be expanded by the nested make as shell variables, not as make
     1943# macros.
     1944qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
     1945qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
     1946
     1947# Wrap CC_FOR_TARGET and friends, for certain types of builds.
     1948CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
     1949GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
     1950CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
     1951RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
     1952CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
     1953RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
     1954
     1955# Makefile fragments.
     1956host_makefile_frag=${srcdir}/${host_makefile_frag}
     1957target_makefile_frag=${srcdir}/${target_makefile_frag}
     1958alphaieee_frag=${srcdir}/${alphaieee_frag}
     1959ospace_frag=${srcdir}/${ospace_frag}
     1960AC_SUBST_FILE(host_makefile_frag)
     1961AC_SUBST_FILE(target_makefile_frag)
     1962AC_SUBST_FILE(alphaieee_frag)
     1963AC_SUBST_FILE(ospace_frag)
     1964
     1965# Miscellanea: directories, flags, etc.
     1966AC_SUBST(SET_LIB_PATH)
     1967AC_SUBST(RPATH_ENVVAR)
     1968AC_SUBST(BUILD_PREFIX)
     1969AC_SUBST(BUILD_PREFIX_1)
     1970AC_SUBST(configlinks)
     1971AC_SUBST(gcc_version_trigger)
     1972AC_SUBST(gcc_version)
     1973AC_SUBST(tooldir)
     1974AC_SUBST(build_tooldir)
     1975AC_SUBST(GDB_TK)
     1976AC_SUBST(gxx_include_dir)
     1977AC_SUBST(libstdcxx_incdir)
     1978
     1979# Build module lists & subconfigure args.
     1980AC_SUBST(build_subdir)
     1981AC_SUBST(build_configargs)
     1982AC_SUBST(configure_build_modules)
     1983AC_SUBST(all_build_modules)
     1984
     1985# Host module lists & subconfigure args.
     1986AC_SUBST(host_configargs)
     1987AC_SUBST(configdirs)
     1988AC_SUBST(configure_host_modules)
     1989AC_SUBST(all_host_modules)
     1990AC_SUBST(check_host_modules)
     1991AC_SUBST(install_host_modules)
     1992AC_SUBST(install_host_modules_nogcc)
     1993
     1994# Target module lists & subconfigure args.
     1995AC_SUBST(target_subdir)
     1996AC_SUBST(target_configargs)
     1997AC_SUBST(target_configdirs)
     1998AC_SUBST(configure_target_modules)
     1999AC_SUBST(all_target_modules)
     2000AC_SUBST(check_target_modules)
     2001AC_SUBST(install_target_modules)
     2002
     2003# Build tools.
     2004AC_SUBST(BISON)
     2005AC_SUBST(CC_FOR_BUILD)
     2006AC_SUBST(LEX)
     2007AC_SUBST(MAKEINFO)
     2008AC_SUBST(YACC)
     2009AC_SUBST(config_shell)
     2010
     2011# Host tools.
     2012NCN_STRICT_CHECK_TOOL(AR, ar)
     2013NCN_STRICT_CHECK_TOOL(AS, as)
     2014NCN_STRICT_CHECK_TOOL(DLLTOOL, dlltool)
     2015NCN_STRICT_CHECK_TOOL(LD, ld)
     2016NCN_STRICT_CHECK_TOOL(NM, nm)
     2017NCN_STRICT_CHECK_TOOL(RANLIB, ranlib, :)
     2018NCN_STRICT_CHECK_TOOL(WINDRES, windres)
     2019NCN_STRICT_CHECK_TOOL(OBJCOPY, objcopy)
     2020NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump)
     2021AC_SUBST(CC)
     2022AC_SUBST(CXX)
     2023AC_SUBST(CFLAGS)
     2024AC_SUBST(CXXFLAGS)
     2025AC_SUBST(DEFAULT_YACC)
     2026AC_SUBST(DEFAULT_LEX)
     2027AC_SUBST(DEFAULT_M4)
     2028
     2029# Target tools.
     2030NCN_STRICT_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
     2031NCN_STRICT_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
     2032NCN_STRICT_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
     2033NCN_STRICT_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
     2034NCN_STRICT_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
     2035NCN_STRICT_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
     2036NCN_STRICT_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
     2037
     2038AC_SUBST(GCC_FOR_TARGET)
     2039AC_SUBST(FLAGS_FOR_TARGET)
     2040AC_SUBST(CC_FOR_TARGET)
     2041AC_SUBST(GCJ_FOR_TARGET)
     2042AC_SUBST(CXX_FOR_TARGET)
     2043AC_SUBST(RAW_CXX_FOR_TARGET)
     2044AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
     2045AC_SUBST(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
     2046
     2047# Fix up target tools.
     2048if test "x${build}" = "x${host}" ; then
     2049  # In this case, the newly built tools can and should be used,
     2050  # so we override the results of the autoconf tests.
     2051  # This should really only happen when the tools are actually being built,
     2052  # but that's a further refinement.  The new build scheme, where
     2053  # tools are built into a structure paralleling where they're installed,
     2054  # should also eliminate all of this cleanly.
     2055  AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
     2056  AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
     2057  DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
     2058  LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
     2059  NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
     2060  RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
     2061  WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
     2062fi
     2063# Certain tools may need extra flags.
     2064AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
     2065RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
     2066NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
     2067
     2068AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
     2069AC_ARG_ENABLE(maintainer-mode,
     2070[  --enable-maintainer-mode enable make rules and dependencies not useful
     2071                          (and sometimes confusing) to the casual installer],
     2072      USE_MAINTAINER_MODE=$enableval,
     2073      USE_MAINTAINER_MODE=no)
     2074AC_MSG_RESULT($USE_MAINTAINER_MODE)
     2075AC_SUBST(MAINTAINER_MODE_TRUE)
     2076AC_SUBST(MAINTAINER_MODE_FALSE)
     2077if test "$USE_MAINTAINER_MODE" = yes; then
     2078  MAINTAINER_MODE_TRUE=
     2079  MAINTAINER_MODE_FALSE='#'
     2080else
     2081  MAINTAINER_MODE_TRUE='#'
     2082  MAINTAINER_MODE_FALSE=
     2083fi     
     2084MAINT=$MAINTAINER_MODE_TRUE
     2085AC_SUBST(MAINT)dnl
     2086
     2087AC_OUTPUT(Makefile)
  • TabularUnified branches/GNU/src/binutils/gettext.m4

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    257257   dnl Generate list of files to be processed by xgettext which will
    258258   dnl be included in po/Makefile.  But only do this if the po directory
    259    dnl exists in srcdir.
    260    if test -d $srcdir/po; then
     259   dnl exists in srcdir and contains POTFILES.in.
     260   if test -f $srcdir/po/POTFILES.in; then
    261261      test -d po || mkdir po
    262262      if test "x$srcdir" != "x."; then
  • TabularUnified branches/GNU/src/binutils/libtool.m4

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    2323## the same distribution terms that you use for the rest of that program.
    2424
    25 # serial 45 AC_PROG_LIBTOOL
    26 AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL])
     25# serial 46 AC_PROG_LIBTOOL
     26AC_DEFUN([AC_PROG_LIBTOOL],
     27[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
    2728dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
    2829dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
     
    5152])])])])])])
    5253
    53 AC_DEFUN(_AC_PROG_LIBTOOL,
     54AC_DEFUN([_AC_PROG_LIBTOOL],
    5455[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
    5556AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
     
    8586])
    8687
    87 AC_DEFUN(AC_LIBTOOL_SETUP,
     88AC_DEFUN([AC_LIBTOOL_SETUP],
    8889[AC_PREREQ(2.13)dnl
    8990AC_REQUIRE([AC_ENABLE_SHARED])dnl
     
    104105
    105106# Only perform the check for file, if the check method requires it
    106 case "$deplibs_check_method" in
     107case $deplibs_check_method in
    107108file_magic*)
    108109  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
     
    120121test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
    121122test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
    122 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
    123 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
     123test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
     124test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
    124125ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
    125126[libtool_flags="$libtool_flags --enable-dlopen"])
     
    139140# Some flags need to be propagated to the compiler or linker for good
    140141# libtool support.
    141 case "$host" in
     142case $host in
    142143*-*-irix6*)
    143144  # Find out which ABI we are using.
    144145  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
    145146  if AC_TRY_EVAL(ac_compile); then
    146     case "`/usr/bin/file conftest.o`" in
     147   if test "$lt_cv_prog_gnu_ld" = yes; then
     148    case `/usr/bin/file conftest.$ac_objext` in
     149    *32-bit*)
     150      LD="${LD-ld} -melf32bsmip"
     151      ;;
     152    *N32*)
     153      LD="${LD-ld} -melf32bmipn32"
     154      ;;
     155    *64-bit*)
     156      LD="${LD-ld} -melf64bmip"
     157      ;;
     158    esac
     159   else
     160    case `/usr/bin/file conftest.$ac_objext` in
    147161    *32-bit*)
    148162      LD="${LD-ld} -32"
     
    153167    *64-bit*)
    154168      LD="${LD-ld} -64"
     169      ;;
     170    esac
     171   fi
     172  fi
     173  rm -rf conftest*
     174  ;;
     175
     176ia64-*-hpux*)
     177  # Find out which ABI we are using.
     178  echo 'int i;' > conftest.$ac_ext
     179  if AC_TRY_EVAL(ac_compile); then
     180    case "`/usr/bin/file conftest.o`" in
     181    *ELF-32*)
     182      HPUX_IA64_MODE="32"
     183      ;;
     184    *ELF-64*)
     185      HPUX_IA64_MODE="64"
    155186      ;;
    156187    esac
     
    188219      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
    189220
    190   case "$host/$CC" in
     221  case $host/$CC in
    191222  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
    192223    # old mingw systems require "-dll" to link a DLL, while more recent ones
     
    208239
    209240# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
    210 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
     241AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
    211242
    212243# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
    213 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
     244AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
    214245
    215246# AC_ENABLE_SHARED - implement the --enable-shared flag
     
    217248#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
    218249#   `yes'.
    219 AC_DEFUN(AC_ENABLE_SHARED, [dnl
    220 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
     250AC_DEFUN([AC_ENABLE_SHARED],
     251[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
    221252AC_ARG_ENABLE(shared,
    222253changequote(<<, >>)dnl
     
    224255changequote([, ])dnl
    225256[p=${PACKAGE-default}
    226 case "$enableval" in
     257case $enableval in
    227258yes) enable_shared=yes ;;
    228259no) enable_shared=no ;;
     
    243274
    244275# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
    245 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
     276AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    246277AC_ENABLE_SHARED(no)])
    247278
     
    250281#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
    251282#   `yes'.
    252 AC_DEFUN(AC_ENABLE_STATIC, [dnl
    253 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
     283AC_DEFUN([AC_ENABLE_STATIC],
     284[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
    254285AC_ARG_ENABLE(static,
    255286changequote(<<, >>)dnl
     
    257288changequote([, ])dnl
    258289[p=${PACKAGE-default}
    259 case "$enableval" in
     290case $enableval in
    260291yes) enable_static=yes ;;
    261292no) enable_static=no ;;
     
    276307
    277308# AC_DISABLE_STATIC - set the default static flag to --disable-static
    278 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
     309AC_DEFUN([AC_DISABLE_STATIC],
     310[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    279311AC_ENABLE_STATIC(no)])
    280312
     
    284316#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
    285317#   `yes'.
    286 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
    287 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
     318AC_DEFUN([AC_ENABLE_FAST_INSTALL],
     319[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
    288320AC_ARG_ENABLE(fast-install,
    289321changequote(<<, >>)dnl
     
    291323changequote([, ])dnl
    292324[p=${PACKAGE-default}
    293 case "$enableval" in
     325case $enableval in
    294326yes) enable_fast_install=yes ;;
    295327no) enable_fast_install=no ;;
     
    310342
    311343# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
    312 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
     344AC_DEFUN([AC_DISABLE_FAST_INSTALL],
     345[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    313346AC_ENABLE_FAST_INSTALL(no)])
    314347
     
    317350#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
    318351#   `both'.
    319 AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
     352AC_DEFUN([AC_LIBTOOL_PICMODE],
     353[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    320354pic_mode=ifelse($#,1,$1,default)])
    321355
    322356
    323357# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
    324 AC_DEFUN(AC_PATH_TOOL_PREFIX,
     358AC_DEFUN([AC_PATH_TOOL_PREFIX],
    325359[AC_MSG_CHECKING([for $1])
    326360AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
    327 [case "$MAGIC_CMD" in
     361[case $MAGIC_CMD in
    328362  /*)
    329363  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
     
    344378      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
    345379      if test -n "$file_magic_test_file"; then
    346         case "$deplibs_check_method" in
     380        case $deplibs_check_method in
    347381        "file_magic "*)
    348382          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
     
    384418
    385419# AC_PATH_MAGIC - find a file program which can recognise a shared library
    386 AC_DEFUN(AC_PATH_MAGIC,
     420AC_DEFUN([AC_PATH_MAGIC],
    387421[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
    388422AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
     
    398432
    399433# AC_PROG_LD - find the path to the GNU or non-GNU linker
    400 AC_DEFUN(AC_PROG_LD,
     434AC_DEFUN([AC_PROG_LD],
    401435[AC_ARG_WITH(gnu-ld,
    402436[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
     
    406440AC_REQUIRE([AC_CANONICAL_BUILD])dnl
    407441ac_prog=ld
    408 if test "$ac_cv_prog_gcc" = yes; then
     442if test "$GCC" = yes; then
    409443  # Check if gcc -print-prog-name=ld gives a path.
    410444  AC_MSG_CHECKING([for ld used by GCC])
     
    416450    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
    417451  esac
    418   case "$ac_prog" in
     452  case $ac_prog in
    419453    # Accept absolute paths.
    420 changequote(,)dnl
    421     [\\/]* | [A-Za-z]:[\\/]*)
    422       re_direlt='/[^/][^/]*/\.\./'
    423 changequote([,])dnl
     454    [[\\/]* | [A-Za-z]:[\\/]*)]
     455      re_direlt=['/[^/][^/]*/\.\./']
    424456      # Canonicalize the path of ld
    425457      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
     
    443475  AC_MSG_CHECKING([for non-GNU ld])
    444476fi
    445 AC_CACHE_VAL(ac_cv_path_LD,
     477AC_CACHE_VAL(lt_cv_path_LD,
    446478[if test -z "$LD"; then
    447479  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
     
    449481    test -z "$ac_dir" && ac_dir=.
    450482    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
    451       ac_cv_path_LD="$ac_dir/$ac_prog"
     483      lt_cv_path_LD="$ac_dir/$ac_prog"
    452484      # Check to see if the program is GNU ld.  I'd rather use --version,
    453485      # but apparently some GNU ld's only accept -v.
    454486      # Break only if it was the GNU/non-GNU ld that we prefer.
    455       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
     487      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
    456488        test "$with_gnu_ld" != no && break
    457489      else
     
    462494  IFS="$ac_save_ifs"
    463495else
    464   ac_cv_path_LD="$LD" # Let the user override the test with a path.
     496  lt_cv_path_LD="$LD" # Let the user override the test with a path.
    465497fi])
    466 LD="$ac_cv_path_LD"
     498LD="$lt_cv_path_LD"
    467499if test -n "$LD"; then
    468500  AC_MSG_RESULT($LD)
     
    474506])
    475507
    476 AC_DEFUN(AC_PROG_LD_GNU,
    477 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
     508AC_DEFUN([AC_PROG_LD_GNU],
     509[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
    478510[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
    479511if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
    480   ac_cv_prog_gnu_ld=yes
     512  lt_cv_prog_gnu_ld=yes
    481513else
    482   ac_cv_prog_gnu_ld=no
     514  lt_cv_prog_gnu_ld=no
    483515fi])
    484 with_gnu_ld=$ac_cv_prog_gnu_ld
     516with_gnu_ld=$lt_cv_prog_gnu_ld
    485517])
    486518
    487519# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
    488520#   -- PORTME Some linkers may need a different reload flag.
    489 AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
     521AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
    490522[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
    491523[lt_cv_ld_reload_flag='-r'])
     
    496528# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
    497529#  -- PORTME fill in with the dynamic library characteristics
    498 AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
     530AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
    499531[AC_CACHE_CHECK([how to recognise dependant libraries],
    500532lt_cv_deplibs_check_method,
     
    513545# whether `pass_all' will *always* work, you probably want this one.
    514546
    515 case "$host_os" in
    516 aix4*)
     547case $host_os in
     548aix*)
    517549  lt_cv_deplibs_check_method=pass_all
    518550  ;;
     
    523555
    524556bsdi4*)
    525   changequote(,)dnl
    526   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
    527   changequote([, ])dnl
     557  lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
    528558  lt_cv_file_magic_cmd='/usr/bin/file -L'
    529559  lt_cv_file_magic_test_file=/shlib/libc.so
     
    535565  ;;
    536566
     567darwin* | rhapsody*)
     568  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
     569  lt_cv_file_magic_cmd='/usr/bin/file -L'
     570  case "$host_os" in
     571  rhapsody* | darwin1.[012])
     572    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
     573    ;;
     574  *) # Darwin 1.3 on
     575    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
     576    ;;
     577  esac
     578  ;;
     579
    537580freebsd* )
    538581  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
    539     case "$host_cpu" in
     582    case $host_cpu in
    540583    i*86 )
    541584      # Not sure whether the presence of OpenBSD here was a mistake.
    542585      # Let's accept both of them until this is cleared up.
    543       changequote(,)dnl
    544       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
    545       changequote([, ])dnl
     586      lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
    546587      lt_cv_file_magic_cmd=/usr/bin/file
    547588      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
     
    557598  ;;
    558599
    559 hpux10.20*)
    560   # TODO:  Does this work for hpux-11 too?
    561   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
    562   lt_cv_file_magic_cmd=/usr/bin/file
    563   lt_cv_file_magic_test_file=/usr/lib/libc.sl
     600hpux10.20*|hpux11*)
     601  case $host_cpu in
     602  hppa*)
     603    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
     604    lt_cv_file_magic_cmd=/usr/bin/file
     605    lt_cv_file_magic_test_file=/usr/lib/libc.sl
     606    ;;
     607  ia64*)
     608    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
     609    lt_cv_file_magic_cmd=/usr/bin/file
     610    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     611    ;;
     612  esac
    564613  ;;
    565614
    566615irix5* | irix6*)
    567   case "$host_os" in
     616  case $host_os in
    568617  irix5*)
    569618    # this will be overridden with pass_all, but let us keep it just in case
     
    571620    ;;
    572621  *)
    573     case "$LD" in
     622    case $LD in
    574623    *-32|*"-32 ") libmagic=32-bit;;
    575624    *-n32|*"-n32 ") libmagic=N32;;
     
    578627    esac
    579628    # this will be overridden with pass_all, but let us keep it just in case
    580     changequote(,)dnl
    581     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
    582     changequote([, ])dnl
     629    lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
    583630    ;;
    584631  esac
     
    589636# This must be Linux ELF.
    590637linux-gnu*)
    591   case "$host_cpu" in
    592   alpha* | i*86 | powerpc* | sparc* | ia64* )
     638  case $host_cpu in
     639  alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
    593640    lt_cv_deplibs_check_method=pass_all ;;
    594641  *)
    595642    # glibc up to 2.1.1 does not perform some relocations on ARM
    596     changequote(,)dnl
    597     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
    598     changequote([, ])dnl
     643    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
    599644  esac
    600645  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
     
    602647
    603648netbsd*)
    604   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
     649  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     650    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
    605651  else
    606     changequote(,)dnl
    607     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
    608     changequote([, ])dnl
    609     lt_cv_file_magic_cmd='/usr/bin/file -L'
    610     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
     652    [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
    611653  fi
     654  ;;
     655
     656newsos6)
     657  [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
     658  lt_cv_file_magic_cmd=/usr/bin/file
     659  lt_cv_file_magic_test_file=/usr/lib/libnls.so
    612660  ;;
    613661
     
    628676  ;;
    629677
     678[sysv5uw[78]* | sysv4*uw2*)]
     679  lt_cv_deplibs_check_method=pass_all
     680  ;;
     681
    630682sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
    631   case "$host_vendor" in
     683  case $host_vendor in
    632684  ncr)
    633685    lt_cv_deplibs_check_method=pass_all
    634686    ;;
    635687  motorola)
    636     changequote(,)dnl
    637     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
    638     changequote([, ])dnl
     688    lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
    639689    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
    640690    ;;
     
    649699
    650700# AC_PROG_NM - find the path to a BSD-compatible name lister
    651 AC_DEFUN(AC_PROG_NM,
     701AC_DEFUN([AC_PROG_NM],
    652702[AC_MSG_CHECKING([for BSD-compatible nm])
    653 AC_CACHE_VAL(ac_cv_path_NM,
     703AC_CACHE_VAL(lt_cv_path_NM,
    654704[if test -n "$NM"; then
    655705  # Let the user override the test.
    656   ac_cv_path_NM="$NM"
     706  lt_cv_path_NM="$NM"
    657707else
    658708  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
     
    666716      # Tru64's nm complains that /dev/null is an invalid object file
    667717      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
    668         ac_cv_path_NM="$tmp_nm -B"
     718        lt_cv_path_NM="$tmp_nm -B"
    669719        break
    670720      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
    671         ac_cv_path_NM="$tmp_nm -p"
     721        lt_cv_path_NM="$tmp_nm -p"
    672722        break
    673723      else
    674         ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
     724        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
    675725        continue # so that we can try to find one that supports BSD flags
    676726      fi
     
    678728  done
    679729  IFS="$ac_save_ifs"
    680   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
     730  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
    681731fi])
    682 NM="$ac_cv_path_NM"
     732NM="$lt_cv_path_NM"
    683733AC_MSG_RESULT([$NM])
    684734])
    685735
    686736# AC_CHECK_LIBM - check for math library
    687 AC_DEFUN(AC_CHECK_LIBM,
     737AC_DEFUN([AC_CHECK_LIBM],
    688738[AC_REQUIRE([AC_CANONICAL_HOST])dnl
    689739LIBM=
    690 case "$host" in
     740case $host in
    691741*-*-beos* | *-*-cygwin* | *-*-pw32*)
    692742  # These system don't have libm
     
    712762# flat and you're not using automake, define top_builddir and
    713763# top_srcdir appropriately in the Makefiles.
    714 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    715   case "$enable_ltdl_convenience" in
     764AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
     765[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
     766  case $enable_ltdl_convenience in
    716767  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
    717768  "") enable_ltdl_convenience=yes
     
    733784# top_srcdir appropriately in the Makefiles.
    734785# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
    735 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
     786AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
     787[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
    736788  AC_CHECK_LIB(ltdl, main,
    737789  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
     
    761813
    762814# AC_LIBTOOL_CXX - enable support for C++ libraries
    763 AC_DEFUN(AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])])
    764 AC_DEFUN(_AC_LIBTOOL_CXX,
    765 [AC_REQUIRE([AC_PROG_LIBTOOL])
    766 AC_REQUIRE([AC_PROG_CXX])
     815AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
     816
     817AC_DEFUN([_AC_LIBTOOL_CXX],
     818[AC_REQUIRE([AC_PROG_CXX])
    767819AC_REQUIRE([AC_PROG_CXXCPP])
    768820LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
     
    772824dnl is set to the C++ compiler.
    773825AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
    774 MAGIC_CMD="$MAGIC_CMD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
     826MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
    775827LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
    776828AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
     
    790842
    791843# AC_LIBTOOL_GCJ - enable support for GCJ libraries
    792 AC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
    793 AC_DEFUN(_AC_LIBTOOL_GCJ,
     844AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
     845
     846AC_DEFUN([_AC_LIBTOOL_GCJ],
    794847[AC_REQUIRE([AC_PROG_LIBTOOL])
    795848AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
     
    805858dnl is set to the C++ compiler.
    806859AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
    807 MAGIC_CMD="$MAGIC_CMD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
     860MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
    808861LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
    809862AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
     
    823876
    824877dnl old names
    825 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
    826 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
    827 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
    828 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
    829 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
    830 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
    831 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
     878AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
     879AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
     880AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
     881AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
     882AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
     883AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
     884AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
    832885
    833886dnl This is just to silence aclocal about the macro not being used
    834887ifelse([AC_DISABLE_FAST_INSTALL])dnl
    835888
    836 AC_DEFUN([LT_AC_PROG_GCJ],[
    837   AC_CHECK_TOOL(GCJ, gcj, no)
     889AC_DEFUN([LT_AC_PROG_GCJ],
     890[AC_CHECK_TOOL(GCJ, gcj, no)
    838891  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
    839892  AC_SUBST(GCJFLAGS)
  • TabularUnified branches/GNU/src/binutils/ltcf-c.sh

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    33# ltcf-c.sh - Create a C compiler specific configuration
    44#
    5 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
     5# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
    66# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    77#
     
    3939
    4040## Linker Characteristics
    41 case "$host_os" in
     41case $host_os in
    4242cygwin* | mingw*)
    4343  # FIXME: the MSVC++ port hasn't been tested in a loooong time
     
    5757
    5858  # See if GNU ld supports shared libraries.
    59   case "$host_os" in
    60   aix3* | aix4*)
    61     # On AIX, the GNU linker is very broken
    62     ld_shlibs=no
    63     cat <<EOF 1>&2
     59  case $host_os in
     60  aix3* | aix4* | aix5*)
     61    # On AIX/PPC, the GNU linker is very broken
     62    if test "$host_cpu" != ia64; then
     63      ld_shlibs=no
     64      cat <<EOF 1>&2
    6465
    6566*** Warning: the GNU linker, at least up to release 2.9.1, is reported
     
    7071
    7172EOF
     73    fi
    7274    ;;
    7375
     
    107109      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
    108110      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
    109       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
     111      if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \
    110112      else $CC -o impgen impgen.c ; fi)~
    111       $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
     113      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
    112114
    113115    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
     
    118120    dll_entry=__cygwin_dll_entry@12
    119121    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
    120     case "$host_os" in
     122    case $host_os in
    121123    mingw*)
    122124      # mingw values
     
    149151      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
    150152
     153    # If the export-symbols file already is a .def file (1st line
     154    # is EXPORTS), use it as is.
    151155    # If DATA tags from a recent dlltool are present, honour them!
    152     archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
    153       _lt_hint=1;
    154       cat $export_symbols | while read symbol; do
    155         set dummy \$symbol;
    156         case \$# in
    157           2) echo "     \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
    158           *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
    159         esac;
    160         _lt_hint=`expr 1 + \$_lt_hint`;
    161       done~
     156    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
     157        cp $export_symbols $output_objdir/$soname-def;
     158      else
     159        echo EXPORTS > $output_objdir/$soname-def;
     160        _lt_hint=1;
     161        cat $export_symbols | while read symbol; do
     162         set dummy \$symbol;
     163         case \[$]# in
     164           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
     165           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
     166         esac;
     167         _lt_hint=`expr 1 + \$_lt_hint`;
     168        done;
     169      fi~
    162170      '"$ltdll_cmds"'
    163       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
     171      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
    164172      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
    165       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
    166       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
    167       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
     173      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
     174      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
     175      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
     176    ;;
     177
     178  darwin* | rhapsody*)
     179    allow_undefined_flag='-undefined suppress'
     180    archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`'
     181    # We need to add '_' to the symbols in $export_symbols first
     182    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     183    hardcode_direct=yes
     184    hardcode_shlibpath_var=no
     185    whole_archive_flag_spec='-all_load $convenience'
    168186    ;;
    169187
     
    173191      wlarc=
    174192    else
    175       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    176       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     193      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
     194      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
    177195    fi
    178196    ;;
     
    237255else
    238256  # PORTME fill in a description of your system's linker (not GNU ld)
    239   case "$host_os" in
     257  case $host_os in
    240258  aix3*)
    241259    allow_undefined_flag=unsupported
     
    252270    ;;
    253271
    254   aix4*)
    255     hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
     272  aix4* | aix5*)
     273    hardcode_direct=yes
    256274    hardcode_libdir_separator=':'
     275    link_all_deplibs=yes
     276    # When large executables or shared objects are built, AIX ld can
     277    # have problems creating the table of contents.  If linking a library
     278    # or program results in "error TOC overflow" add -mminimal-toc to
     279    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
     280    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
    257281    if test "$with_gcc" = yes; then
    258       collect2name=`${CC} -print-prog-name=collect2`
    259       if test -f "$collect2name" && \
    260          strings "$collect2name" | grep resolve_lib_name >/dev/null
    261       then
    262         # We have reworked collect2
    263         hardcode_direct=yes
     282      case $host_os in aix4.[012]|aix4.[012].*)
     283      # We only want to do this on AIX 4.2 and lower, the check
     284      # below for broken collect2 doesn't work under 4.3+
     285        collect2name=`${CC} -print-prog-name=collect2`
     286        if test -f "$collect2name" && \
     287           strings "$collect2name" | grep resolve_lib_name >/dev/null
     288        then
     289          # We have reworked collect2
     290          hardcode_direct=yes
     291        else
     292          # We have old collect2
     293          hardcode_direct=unsupported
     294          # It fails to find uninstalled libraries when the uninstalled
     295          # path is not listed in the libpath.  Setting hardcode_minus_L
     296          # to unsupported forces relinking
     297          hardcode_minus_L=yes
     298          hardcode_libdir_flag_spec='-L$libdir'
     299          hardcode_libdir_separator=
     300        fi
     301      esac
     302      shared_flag='-shared'
     303    else
     304      # not using gcc
     305      if test "$host_cpu" = ia64; then
     306        shared_flag='${wl}-G'
    264307      else
    265         # We have old collect2
    266         hardcode_direct=unsupported
    267         # It fails to find uninstalled libraries when the uninstalled
    268         # path is not listed in the libpath.  Setting hardcode_minus_L
    269         # to unsupported forces relinking
    270         hardcode_minus_L=yes
    271         hardcode_libdir_flag_spec='-L$libdir'
    272         hardcode_libdir_separator=
     308        shared_flag='${wl}-bM:SRE'
    273309      fi
    274       shared_flag='-shared'
    275     else
    276       shared_flag='${wl}-bM:SRE'
    277       hardcode_direct=yes
    278     fi
    279     allow_undefined_flag=' ${wl}-berok'
    280     archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
    281     archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
    282     case "$host_os" in aix4.[01]|aix4.[01].*)
    283       # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
    284       always_export_symbols=yes ;;
    285     esac
    286    ;;
     310    fi
     311
     312    if test "$host_cpu" = ia64; then
     313      # On IA64, the linker does run time linking by default, so we don't
     314      # have to do anything special.
     315      aix_use_runtimelinking=no
     316      if test $with_gnu_ld = no; then
     317        exp_sym_flag='-Bexport'
     318        no_entry_flag=""
     319      fi
     320    else
     321      # Test if we are trying to use run time linking, or normal AIX style linking.
     322      # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
     323      aix_use_runtimelinking=no
     324      for ld_flag in $LDFLAGS; do
     325        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
     326          aix_use_runtimelinking=yes
     327          break
     328        fi
     329      done
     330      exp_sym_flag='-bexport'
     331      no_entry_flag='-bnoentry'
     332    fi
     333    # -bexpall does not export symbols beginning with underscore (_)
     334    always_export_symbols=yes
     335    if test "$aix_use_runtimelinking" = yes; then
     336      # Warning - without using the other run time loading flags (-brtl), -berok will
     337      #           link without error, but may produce a broken library.
     338      allow_undefined_flag=' ${wl}-berok'
     339      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
     340      archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
     341    else
     342      if test "$host_cpu" = ia64; then
     343        if test $with_gnu_ld = no; then
     344          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
     345          allow_undefined_flag="-z nodefs"
     346          archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
     347        fi
     348      else
     349        allow_undefined_flag=' ${wl}-berok'
     350        # -bexpall does not export symbols beginning with underscore (_)
     351        always_export_symbols=yes
     352        # Exported symbols can be pulled into shared objects from archives
     353        whole_archive_flag_spec=' '
     354        build_libtool_need_lc=yes
     355        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
     356        # This is similar to how AIX traditionally builds it's shared libraries.
     357        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
     358      fi
     359    fi
     360    ;;
    287361
    288362  amigaos*)
     
    309383    # FIXME: Should let the user specify the lib program.
    310384    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
    311     fix_srcfile_path='`cygpath -w $srcfile`'
     385    fix_srcfile_path='`cygpath -w "$srcfile"`'
    312386    ;;
    313387
     
    344418
    345419  hpux9* | hpux10* | hpux11*)
    346     case "$host_os" in
    347     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
    348     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
     420    case "$host_cpu" in
     421    ia64*)
     422      hardcode_direct=no
     423      hardcode_shlibpath_var=no
     424      archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
     425      hardcode_libdir_flag_spec='-L$libdir' ;;
     426    *)
     427      if test $with_gcc = yes; then
     428        case "$host_os" in
     429        hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
     430        *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
     431        esac
     432      else
     433        case $host_os in
     434        hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
     435        *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
     436        esac
     437      fi
     438      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
     439      hardcode_libdir_separator=:
     440      hardcode_minus_L=yes # Not in the search PATH, but as the default
     441                           # location of the library.
     442      ;;
    349443    esac
    350     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
    351     hardcode_libdir_separator=:
    352     hardcode_direct=yes
    353     hardcode_minus_L=yes # Not in the search PATH, but as the default
    354                          # location of the library.
    355444    export_dynamic_flag_spec='${wl}-E'
     445    hardcode_direct=yes
    356446    ;;
    357447
     
    373463      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
    374464    fi
    375     hardcode_libdir_flag_spec='${wl}-R$libdir'
    376     hardcode_direct=yes
     465    hardcode_libdir_flag_spec='-R$libdir'
     466    hardcode_direct=yes
     467    hardcode_shlibpath_var=no
     468    ;;
     469
     470  newsos6)
     471    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
     472    hardcode_direct=yes
     473    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     474    hardcode_libdir_separator=:
    377475    hardcode_shlibpath_var=no
    378476    ;;
     
    409507      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
    410508      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
     509      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
    411510    else
    412511      allow_undefined_flag=' -expect_unresolved \*'
    413512      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
    414     fi
    415     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     513      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
     514      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
     515
     516      # cc supports -rpath directly
     517      hardcode_libdir_flag_spec='-rpath $libdir'
     518    fi
    416519    hardcode_libdir_separator=:
    417520    ;;
     
    425528
    426529  solaris*)
    427     no_undefined_flag=' -z text'
    428     # $CC -shared without GNU ld will not create a library from C++
    429     # object files and a static libstdc++, better avoid it by now
    430     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
    431     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
    432                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
     530    no_undefined_flag=' -z defs'
     531    if test "$with_gcc" = yes; then
     532      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
     533      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
     534                  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
     535    else
     536      archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
     537      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
     538                  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
     539    fi
    433540    hardcode_libdir_flag_spec='-R$libdir'
    434541    hardcode_shlibpath_var=no
    435     case "$host_os" in
     542    case $host_os in
    436543    solaris2.[0-5] | solaris2.[0-5].*) ;;
    437544    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
     
    505612    ;;
    506613
    507   unixware7*)
    508     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
     614  sysv5uw7* | unixware7*)
     615    no_undefined_flag='${wl}-z ${wl}text'
     616    if test "$GCC" = yes; then
     617      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
     618    else
     619      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
     620    fi
    509621    runpath_var='LD_RUN_PATH'
    510622    hardcode_shlibpath_var=no
     
    532644    ac_cv_prog_cc_static='-static'
    533645
    534     case "$host_os" in
    535     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
    536       # PIC is the default for these OSes.
    537       ;;
     646    case $host_os in
    538647    aix*)
    539       # Below there is a dirty hack to force normal static linking with -ldl
    540       # The problem is because libdl dynamically linked with both libc and
    541       # libC (AIX C++ library), which obviously doesn't included in libraries
    542       # list by gcc. This cause undefined symbols with -static flags.
    543       # This hack allows C programs to be linked with "-static -ldl", but
    544       # we not sure about C++ programs.
    545       ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
    546       ;;
    547     cygwin* | mingw* | os2*)
    548       # This hack is so that the source file can tell whether it is being
    549       # built for inclusion in a dll (and should export symbols for example).
    550       ac_cv_prog_cc_pic='-DDLL_EXPORT'
     648      # All AIX code is PIC.
     649      if test "$host_cpu" = ia64; then
     650        # AIX 5 now supports IA64 processor
     651        lt_cv_prog_cc_static='-Bstatic'
     652      else
     653        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
     654      fi
    551655      ;;
    552656    amigaos*)
     
    556660      ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
    557661      ;;
     662    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
     663      # PIC is the default for these OSes.
     664      ;;
     665    cygwin* | mingw* | os2*)
     666      # This hack is so that the source file can tell whether it is being
     667      # built for inclusion in a dll (and should export symbols for example).
     668      ac_cv_prog_cc_pic='-DDLL_EXPORT'
     669      ;;
     670    darwin* | rhapsody*)
     671      # PIC is the default on this platform
     672      # Common symbols not allowed in MH_DYLIB files
     673      lt_cv_prog_cc_pic='-fno-common'
     674      ;;
     675    *djgpp*)
     676      # DJGPP does not support shared libraries at all
     677      ac_cv_prog_cc_pic=
     678      ;;
    558679    sysv4*MP*)
    559680      if test -d /usr/nec; then
     
    567688  else
    568689    # PORTME Check for PIC flags for the system compiler.
    569     case "$host_os" in
    570     aix3* | aix4*)
     690    case $host_os in
     691    aix*)
    571692     # All AIX code is PIC.
    572       ac_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
     693      ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
    573694      ;;
    574695
     
    592713      ;;
    593714
     715    newsos6)
     716      ac_cv_prog_cc_pic='-KPIC'
     717      ac_cv_prog_cc_static='-Bstatic'
     718      ;;
     719
    594720    osf3* | osf4* | osf5*)
    595721      # All OSF/1 code is PIC.
     
    639765    esac
    640766  fi
    641   ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
     767  case "$host_os" in
     768      # Platforms which do not suport PIC and -DPIC is meaningless
     769      # on them:
     770      *djgpp*)
     771        ac_cv_prog_cc_pic=
     772        ;;
     773      *)
     774        ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
     775        ;;
     776  esac
    642777fi
    643778
    644779need_lc=yes
    645780if test "$enable_shared" = yes && test "$with_gcc" = yes; then
    646   case "$archive_cmds" in
     781  case $archive_cmds in
    647782  *'~'*)
    648783    # FIXME: we may have to deal with multi-command sequences.
     
    664799        soname=conftest
    665800        lib=conftest
    666         libobjs=conftest.o
     801        libobjs=conftest.$objext
    667802        deplibs=
    668803        wl=$ac_cv_prog_cc_wl
  • TabularUnified branches/GNU/src/binutils/ltcf-cxx.sh

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    33# ltcf-cxx.sh - Create a C++ compiler specific configuration
    44#
    5 # Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
     5# Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc.
    66# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    77#
     
    6969
    7070  # Check if GNU C++ uses GNU ld as the underlying linker, since the
    71   # archiving commands below assume that GNU ld is being used.
    72   if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
    73       egrep 'GNU ld' > /dev/null; then
    74     with_gnu_ld=yes
    75 
     71  # archiving commands below assume that GNU ld is being used.  The
     72  # assumption here is that the linker is going to be the same as that
     73  # used by the C compiler.  For the purposes of GCC, this is ok, but
     74  # if someone uses g++ along with a non-GNU C compiler that doesn't
     75  # use GNU ld, we may lose.  This is ok for the toolchain tree, since
     76  # the only users of ltcf-cxx.sh are libstdc++-v3 and libjava,
     77  # anyway, and those use both gcc and g++, so the settings are bound
     78  # to be the same.
     79
     80  if test "$with_gnu_ld" = yes; then
    7681    archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
    7782    archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     
    9398    fi
    9499  else
    95     with_gnu_ld=no
    96100    wlarc=
    97101
     
    107111  # what "hidden" libraries, object files and flags are used when
    108112  # linking a shared library.
    109   output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
     113  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
    110114
    111115else
    112116  with_gcc=no
    113   with_gnu_ld=no
    114117  wlarc=
    115118fi
    116119
    117 # In general, the C++ compiler should always link C++ objects.
    118 case $target in
    119 *aix3* | *aix4*)
    120   # AIX just has to be different, doesn't it? :-\
    121   LD=makeC++SharedLib_r
    122   LDFLAGS="$LDFLAGS -p 0"
    123   ;;
    124 *)
    125   LD="$CC"
    126   LDFLAGS="$LDFLAGS"
    127   ;;
    128 esac
    129 
    130 
    131120# PORTME: fill in a description of your system's C++ link characteristics
    132 case "$host_os" in
     121case $host_os in
    133122  aix3*)
    134123    # FIXME: insert proper C++ library support
    135124    ld_shlibs=no
    136125    ;;
    137   aix4*)
    138     archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
    139     # -bexpall does not export symbols beginning with underscore (_)
     126  aix4* | aix5*)
     127    archive_cmds=''
     128    hardcode_direct=yes
     129    hardcode_libdir_separator=':'
     130    link_all_deplibs=yes
     131    # When large executables or shared objects are built, AIX ld can
     132    # have problems creating the table of contents.  If linking a library
     133    # or program results in "error TOC overflow" add -mminimal-toc to
     134    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
     135    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
     136    if test "$with_gcc" = yes; then
     137      case $host_os in aix4.[012]|aix4.[012].*)
     138      # We only want to do this on AIX 4.2 and lower, the check
     139      # below for broken collect2 doesn't work under 4.3+
     140        collect2name=`${CC} -print-prog-name=collect2`
     141        if test -f "$collect2name" && \
     142           strings "$collect2name" | grep resolve_lib_name >/dev/null
     143        then
     144          # We have reworked collect2
     145          hardcode_direct=yes
     146        else
     147          # We have old collect2
     148          hardcode_direct=unsupported
     149          # It fails to find uninstalled libraries when the uninstalled
     150          # path is not listed in the libpath.  Setting hardcode_minus_L
     151          # to unsupported forces relinking
     152          hardcode_minus_L=yes
     153          hardcode_libdir_flag_spec='-L$libdir'
     154          hardcode_libdir_separator=
     155        fi
     156      esac
     157      shared_flag='-shared'
     158    else
     159      # not using gcc
     160      if test "$host_cpu" = ia64; then
     161        shared_flag='${wl}-G'
     162      else
     163        shared_flag='${wl}-bM:SRE'
     164      fi
     165    fi
     166
     167    if test "$host_cpu" = ia64; then
     168      # On IA64, the linker does run time linking by default, so we don't
     169      # have to do anything special.
     170      aix_use_runtimelinking=no
     171      if test $with_gnu_ld = no; then
     172        exp_sym_flag='-Bexport'
     173        no_entry_flag=""
     174      fi
     175    else
     176      # Test if we are trying to use run time linking, or normal AIX style linking.
     177      # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
     178      aix_use_runtimelinking=no
     179      for ld_flag in $LDFLAGS; do
     180        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
     181          aix_use_runtimelinking=yes
     182          break
     183        fi
     184      done
     185      exp_sym_flag='-bexport'
     186      no_entry_flag='-bnoentry'
     187    fi
     188    # It seems that -bexpall does not export symbols beginning with
     189    # underscore (_), so it is better to generate a list of symbols to export.
    140190    always_export_symbols=yes
    141     # Exported symbols can be pulled into shared objects from archives
    142     whole_archive_flag_spec=' '
    143     build_libtool_need_lc=yes
     191    if test "$aix_use_runtimelinking" = yes; then
     192      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
     193      allow_undefined_flag=' -Wl,-G'
     194      archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}-brtl \${wl}$exp_sym_flag:\$export_symbols"
     195     else
     196      if test "$host_cpu" = ia64; then
     197        if test $with_gnu_ld = no; then
     198          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
     199          allow_undefined_flag="-z nodefs"
     200          archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
     201        fi
     202      else
     203        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
     204        # Warning - without using the other run time loading flags, -berok will
     205        #           link without error, but may produce a broken library.
     206        no_undefined_flag=' ${wl}-bnoerok'
     207        allow_undefined_flag=' ${wl}-berok'
     208        # -bexpall does not export symbols beginning with underscore (_)
     209        always_export_symbols=yes
     210        # Exported symbols can be pulled into shared objects from archives
     211        whole_archive_flag_spec=' '
     212        build_libtool_need_lc=yes
     213        # This is similar to how AIX traditionally builds it's shared libraries.
     214        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
     215      fi
     216    fi
    144217    ;;
    145218  chorus*)
    146     case "$cc_basename" in
     219    case $cc_basename in
    147220      *)
    148221        # FIXME: insert proper C++ library support
    149222        ld_shlibs=no
    150223        ;;
    151     esac 
     224    esac
    152225    ;;
    153226  dgux*)
    154     case "$cc_basename" in
     227    case $cc_basename in
    155228      ec++)
    156229        # FIXME: insert proper C++ library support
     
    168241    esac
    169242    ;;
     243  freebsd[12]*)
     244    # C++ shared libraries reported to be fairly broken before switch to ELF
     245    ld_shlibs=no
     246    ;;
    170247  freebsd*)
    171     # FreeBSD uses GNU C++ and GNU ld
    172     # FIXME: insert proper C++ library support
    173     ld_shlibs=no
     248    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
     249    # conventions
     250    ld_shlibs=yes
     251    ;;
     252  gnu*)
    174253    ;;
    175254  hpux*)
    176     case "$cc_basename" in
     255    if test $with_gnu_ld = no; then
     256      case "$host_cpu" in
     257        ia64*)
     258          hardcode_libdir_flag_spec='-L$libdir'
     259          hardcode_shlibpath_var=no ;;
     260        *)
     261          hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ;;
     262      esac
     263      hardcode_direct=yes
     264      hardcode_libdir_separator=:
     265      export_dynamic_flag_spec='${wl}-E'
     266    fi
     267    hardcode_minus_L=yes # Not in the search PATH, but as the default
     268                         # location of the library.
     269
     270    case $cc_basename in
    177271      CC)
    178272        # FIXME: insert proper C++ library support
     
    180274        ;;
    181275      aCC)
    182         case "$host_os" in
     276        case $host_os in
    183277        hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
    184278        *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
    185279        esac
    186         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
    187         hardcode_libdir_separator=:
    188         hardcode_direct=yes
    189         hardcode_minus_L=yes # Not in the search PATH, but as the default
    190                              # location of the library.
    191         export_dynamic_flag_spec='${wl}-E'
    192 
    193280        # Commands to make compiler produce verbose output that lists
    194281        # what "hidden" libraries, object files and flags are used when
     
    199286        # from the output so that they don't get included in the library
    200287        # dependencies.
    201         output_verbose_link_cmds='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
     288        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    202289        ;;
    203290      *)
    204         # FIXME: insert proper C++ library support
    205         ld_shlibs=no
     291        if test $with_gcc = yes; then
     292          if test $with_gnu_ld = no; then
     293            case "$host_os" in
     294            hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
     295            *)
     296              case "$host_cpu" in
     297                ia64*)
     298                  archive_cmds='$LD -b +h $soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ;;
     299                *)
     300                  archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
     301              esac
     302              ;;
     303            esac
     304          fi
     305        else
     306          # FIXME: insert proper C++ library support
     307          ld_shlibs=no
     308        fi
    206309        ;;
    207310    esac
    208311    ;;
    209312  irix5* | irix6*)
    210     case "$cc_basename" in
     313    case $cc_basename in
    211314      CC)
    212315        # SGI C++
     
    222325        if test "$with_gcc" = yes; then
    223326          if test "$with_gnu_ld" = no; then
    224             archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
     327            archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
    225328          else
    226             archive_cmds='$LD -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
     329            archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
    227330          fi
    228331        fi
     
    234337    ;;
    235338  linux*)
    236     case "$cc_basename" in
     339    case $cc_basename in
    237340      KCC)
    238341        # Kuck and Associates, Inc. (KAI) C++ Compiler
     
    252355        # from the output so that they don't get included in the library
    253356        # dependencies.
    254         output_verbose_link_cmds='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
     357        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    255358
    256359        hardcode_libdir_flag_spec='${wl}--rpath,$libdir'
     
    278381        # from the output so that they don't get included in the library
    279382        # dependencies.
    280         output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
     383        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    281384        ;;
    282385    esac
     
    291394    ;;
    292395  mvs*)
    293     case "$cc_basename" in
     396    case $cc_basename in
    294397      cxx)
    295398        # FIXME: insert proper C++ library support
     
    300403        ld_shlibs=no
    301404        ;;
    302     esac   
     405    esac
    303406    ;;
    304407  netbsd*)
     
    306409    ;;
    307410  osf3*)
    308     if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
    309       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
    310       archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
    311 
    312       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
    313       hardcode_libdir_separator=:
    314 
    315       # Commands to make compiler produce verbose output that lists
    316       # what "hidden" libraries, object files and flags are used when
    317       # linking a shared library.
    318       output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
    319     fi
    320 
    321     case "$cc_basename" in
     411    case $cc_basename in
    322412      KCC)
    323413        # Kuck and Associates, Inc. (KAI) C++ Compiler
     
    356446        # from the output so that they don't get included in the library
    357447        # dependencies.
    358         output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
     448        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    359449        ;;
    360450      *)
    361         # FIXME: insert proper C++ library support
    362         ld_shlibs=no
     451        if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
     452          allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
     453          archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
     454
     455          hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     456          hardcode_libdir_separator=:
     457
     458          # Commands to make compiler produce verbose output that lists
     459          # what "hidden" libraries, object files and flags are used when
     460          # linking a shared library.
     461          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
     462    else
     463          # FIXME: insert proper C++ library support
     464          ld_shlibs=no
     465    fi
    363466        ;;
    364467    esac
    365468    ;;
    366469  osf4* | osf5*)
    367     if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
    368       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
    369       archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
    370 
    371       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
    372       hardcode_libdir_separator=:
    373 
    374       # Commands to make compiler produce verbose output that lists
    375       # what "hidden" libraries, object files and flags are used when
    376       # linking a shared library.
    377       output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
    378     fi
    379 
    380     case "$cc_basename" in
     470    case $cc_basename in
    381471      KCC)
    382472        # Kuck and Associates, Inc. (KAI) C++ Compiler
     
    400490        ;;
    401491      cxx)
    402         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
    403         archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
    404        
    405         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     492        allow_undefined_flag=' -expect_unresolved \*'
     493        archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
     494        archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
     495          echo "-hidden">> $lib.exp~
     496          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
     497          $rm $lib.exp'
     498
     499        hardcode_libdir_flag_spec='-rpath $libdir'
    406500        hardcode_libdir_separator=:
    407501
     
    414508        # from the output so that they don't get included in the library
    415509        # dependencies.
    416         output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
     510        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    417511        ;;
    418512      *)
    419         # FIXME: insert proper C++ library support
    420         ld_shlibs=no
     513        if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
     514          allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
     515          archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
     516         
     517          hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     518          hardcode_libdir_separator=:
     519         
     520          # Commands to make compiler produce verbose output that lists
     521          # what "hidden" libraries, object files and flags are used when
     522          # linking a shared library.
     523          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
     524    else
     525          # FIXME: insert proper C++ library support
     526          ld_shlibs=no
     527    fi
    421528        ;;
    422529    esac
     
    427534    ;;
    428535  sco*)
    429     case "$cc_basename" in
     536    case $cc_basename in
    430537      CC)
    431538        # FIXME: insert proper C++ library support
     
    439546    ;;
    440547  sunos4*)
    441     case "$cc_basename" in
     548    case $cc_basename in
    442549      CC)
    443550        # Sun C++ 4.x
     
    457564    ;;
    458565  solaris*)
    459     case "$cc_basename" in
     566    case $cc_basename in
    460567      CC)
    461568        # Sun C++ 4.2, 5.x and Centerline C++
    462         no_undefined_flag=' -ztext'
     569        no_undefined_flag=' -zdefs'
    463570        archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
    464571        archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
     
    467574        hardcode_libdir_flag_spec='-R$libdir'
    468575        hardcode_shlibpath_var=no
    469         case "$host_os" in
     576        case $host_os in
    470577          solaris2.[0-5] | solaris2.[0-5].*) ;;
    471578          *)
     
    487594        # from the output so that they don't get included in the library
    488595        # dependencies.
    489         output_verbose_link_cmds='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
     596        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
    490597
    491598        # Archives containing C++ object files must be created using
     
    505612        # GNU C++ compiler with Solaris linker
    506613        if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
     614          no_undefined_flag=' ${wl}-z ${wl}defs'
    507615          if $CC --version | egrep -v '^2\.7' > /dev/null; then
    508             archive_cmds='$LD -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
     616            archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    509617            archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
    510                 $LD -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
     618                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
    511619
    512620            # Commands to make compiler produce verbose output that lists
    513621            # what "hidden" libraries, object files and flags are used when
    514622            # linking a shared library.
    515             output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
     623            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
    516624          else
    517625            # g++ 2.7 appears to require `-G' NOT `-shared' on this
    518626            # platform.
    519             archive_cmds='$LD -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
     627            archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    520628            archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
    521                 $LD -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
     629                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
    522630
    523631            # Commands to make compiler produce verbose output that lists
    524632            # what "hidden" libraries, object files and flags are used when
    525633            # linking a shared library.
    526             output_verbose_link_cmds="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
     634            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
    527635          fi
    528636
     
    530638        fi
    531639        ;;
    532     esac   
     640    esac
    533641    ;;
    534642  tandem*)
    535     case "$cc_basename" in
     643    case $cc_basename in
    536644      NCC)
    537645        # NonStop-UX NCC 3.20
     
    543651        ld_shlibs=no
    544652        ;;
    545     esac   
     653    esac
    546654    ;;
    547655  unixware*)
     
    571679ac_cv_prog_cc_can_build_shared=$can_build_shared
    572680
    573 # It is not enough to reset these cached values, they must be unset.
    574 unset ac_cv_prog_cc_pic_works
    575 unset ac_cv_prog_cc_static_works
     681ac_cv_prog_cc_pic_works=
     682ac_cv_prog_cc_static_works=
    576683
    577684if test "$with_gcc" = yes; then
     
    579686  ac_cv_prog_cc_static='-static'
    580687
    581   case "$host_os" in
    582   beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
    583     # PIC is the default for these OSes.
    584     ;;
     688  case $host_os in
    585689  aix*)
    586     # Below there is a dirty hack to force normal static linking with -ldl
    587     # The problem is because libdl dynamically linked with both libc and
    588     # libC (AIX C++ library), which obviously doesn't included in libraries
    589     # list by gcc. This cause undefined symbols with -static flags.
    590     # This hack allows C programs to be linked with "-static -ldl", but
    591     # we not sure about C++ programs.
    592     ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
    593     ;;
    594   cygwin* | mingw* | os2*)
    595     # This hack is so that the source file can tell whether it is being
    596     # built for inclusion in a dll (and should export symbols for example).
    597     ac_cv_prog_cc_pic='-DDLL_EXPORT'
     690    # All AIX code is PIC.
     691    if test "$host_cpu" = ia64; then
     692      # AIX 5 now supports IA64 processor
     693      lt_cv_prog_cc_static='-Bstatic'
     694    else
     695      lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
     696    fi
    598697    ;;
    599698  amigaos*)
     
    603702    ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
    604703    ;;
     704  beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
     705    # PIC is the default for these OSes.
     706    ;;
     707  cygwin* | mingw* | os2*)
     708    # This hack is so that the source file can tell whether it is being
     709    # built for inclusion in a dll (and should export symbols for example).
     710    ac_cv_prog_cc_pic='-DDLL_EXPORT'
     711    ;;
     712  darwin* | rhapsody*)
     713    # PIC is the default on this platform
     714    # Common symbols not allowed in MH_DYLIB files
     715    lt_cv_prog_cc_pic='-fno-common'
     716    ;;
     717  *djgpp*)
     718    # DJGPP does not support shared libraries at all
     719    ac_cv_prog_cc_pic=
     720    ;;
    605721  sysv4*MP*)
    606722    if test -d /usr/nec; then
     
    613729  esac
    614730else
    615   case "$host_os" in
    616     aix4*)
     731  case $host_os in
     732    aix4* | aix5*)
    617733      # All AIX code is PIC.
     734      if test "$host_cpu" = ia64; then
     735        # AIX 5 now supports IA64 processor
     736        lt_cv_prog_cc_static='-Bstatic'
     737      else
     738        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
     739      fi
    618740      ;;
    619741    chorus*)
    620       case "$cc_basename" in
     742      case $cc_basename in
    621743      cxch68)
    622744        # Green Hills C++ Compiler
    623745        # ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
    624746        ;;
    625       esac 
     747      esac
    626748      ;;
    627749    dgux*)
    628       case "$cc_basename" in
     750      case $cc_basename in
    629751        ec++)
    630752          ac_cv_prog_cc_pic='-KPIC'
     
    641763      # FreeBSD uses GNU C++
    642764      ;;
     765    gnu*)
     766      ;;
    643767    hpux9* | hpux10* | hpux11*)
    644       case "$cc_basename" in
     768      case $cc_basename in
    645769        CC)
    646770          ac_cv_prog_cc_wl='-Wl,'
     
    658782      ;;
    659783    irix5* | irix6*)
    660       case "$cc_basename" in
     784      case $cc_basename in
    661785        CC)
    662786          ac_cv_prog_cc_wl='-Wl,'
     
    669793      ;;
    670794    linux*)
    671       case "$cc_basename" in
     795      case $cc_basename in
    672796        KCC)
    673797          # KAI C++ Compiler
     
    691815      ;;
    692816    mvs*)
    693       case "$cc_basename" in
     817      case $cc_basename in
    694818        cxx)
    695819          ac_cv_prog_cc_pic='-W c,exportall'
     
    697821        *)
    698822          ;;
    699       esac   
     823      esac
    700824      ;;
    701825    netbsd*)
    702826      ;;
    703827    osf3* | osf4* | osf5*)
    704       case "$cc_basename" in
     828      case $cc_basename in
    705829        KCC)
    706830          ac_cv_prog_cc_wl='--backend -Wl,'
     
    725849      ;;
    726850    sco*)
    727       case "$cc_basename" in
     851      case $cc_basename in
    728852        CC)
    729853          ac_cv_prog_cc_pic='-fPIC'
     
    734858      ;;
    735859    solaris*)
    736       case "$cc_basename" in
     860      case $cc_basename in
    737861        CC)
    738862          # Sun C++ 4.2, 5.x and Centerline C++
     
    747871        *)
    748872          ;;
    749       esac   
     873      esac
    750874      ;;
    751875    sunos4*)
    752       case "$cc_basename" in
     876      case $cc_basename in
    753877        CC)
    754878          # Sun C++ 4.x
     
    765889      ;;
    766890    tandem*)
    767       case "$cc_basename" in
     891      case $cc_basename in
    768892        NCC)
    769893          # NonStop-UX NCC 3.20
     
    772896        *)
    773897          ;;
    774       esac   
     898      esac
    775899      ;;
    776900    unixware*)
     
    783907  esac
    784908fi
    785 ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
     909
     910case "$host_os" in
     911    # Platforms which do not suport PIC and -DPIC is meaningless
     912    # on them:
     913    *djgpp*)
     914      ac_cv_prog_cc_pic=
     915      ;;
     916    *)
     917      ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
     918      ;;
     919esac
    786920
    787921
     
    799933
    800934
    801 if eval $ac_compile 2>&5; then
     935if (eval $ac_compile) 2>&5; then
    802936  # Parse the compiler output and extract the necessary
    803937  # objects, libraries and library flags.
     
    807941  pre_test_object_deps_done=no
    808942
    809   for p in `eval $output_verbose_link_cmds`; do
     943  for p in `eval $output_verbose_link_cmd`; do
    810944
    811945    case $p in
  • TabularUnified branches/GNU/src/binutils/ltcf-gcj.sh

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    33# ltcf-gcj.sh - Create a GCJ compiler specific configuration
    44#
    5 # Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
     5# Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc.
    66# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    77#
     
    4242
    4343## Linker Characteristics
    44 case "$host_os" in
     44case $host_os in
    4545cygwin* | mingw*)
    4646  # FIXME: the MSVC++ port hasn't been tested in a loooong time
     
    6060
    6161  # See if GNU ld supports shared libraries.
    62   case "$host_os" in
    63   aix3* | aix4*)
    64     # On AIX, the GNU linker is very broken
    65     ld_shlibs=no
    66     cat <<EOF 1>&2
     62  case $host_os in
     63  aix3* | aix4* | aix5*)
     64    # On AIX/PPC, the GNU linker is very broken
     65    if test "$host_cpu" != ia64; then
     66      ld_shlibs=no
     67      cat <<EOF 1>&2
    6768
    6869*** Warning: the GNU linker, at least up to release 2.9.1, is reported
     
    7374
    7475EOF
     76    fi
    7577    ;;
    7678
     
    110112      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
    111113      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
    112       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
     114      if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \
    113115      else $CC -o impgen impgen.c ; fi)~
    114       $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
     116      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
    115117
    116118    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
     
    121123    dll_entry=__cygwin_dll_entry@12
    122124    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
    123     case "$host_os" in
     125    case $host_os in
    124126    mingw*)
    125127      # mingw values
     
    152154      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
    153155
     156    # If the export-symbols file already is a .def file (1st line
     157    # is EXPORTS), use it as is.
    154158    # If DATA tags from a recent dlltool are present, honour them!
    155     archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
    156       _lt_hint=1;
    157       cat $export_symbols | while read symbol; do
    158         set dummy \$symbol;
    159         case \$# in
    160           2) echo "     \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
    161           *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
    162         esac;
    163         _lt_hint=`expr 1 + \$_lt_hint`;
    164       done~
     159    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
     160        cp $export_symbols $output_objdir/$soname-def;
     161      else
     162        echo EXPORTS > $output_objdir/$soname-def;
     163        _lt_hint=1;
     164        cat $export_symbols | while read symbol; do
     165         set dummy \$symbol;
     166         case \[$]# in
     167           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
     168           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
     169         esac;
     170         _lt_hint=`expr 1 + \$_lt_hint`;
     171        done;
     172      fi~
    165173      '"$ltdll_cmds"'
    166       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
     174      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
    167175      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
    168       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
    169       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
    170       $CC $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
     176      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
     177      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
     178      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
    171179    ;;
    172180
     
    176184      wlarc=
    177185    else
    178       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
    179       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
     186      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
     187      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
    180188    fi
    181189    ;;
     
    240248else
    241249  # PORTME fill in a description of your system's linker (not GNU ld)
    242   case "$host_os" in
     250  case $host_os in
    243251  aix3*)
    244252    allow_undefined_flag=unsupported
     
    255263    ;;
    256264
    257   aix4*)
    258     hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
     265  aix4* | aix5*)
     266    hardcode_direct=yes
    259267    hardcode_libdir_separator=':'
     268    link_all_deplibs=yes
     269    # When large executables or shared objects are built, AIX ld can
     270    # have problems creating the table of contents.  If linking a library
     271    # or program results in "error TOC overflow" add -mminimal-toc to
     272    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
     273    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
    260274    if test "$with_gcc" = yes; then
    261       collect2name=`${CC} -print-prog-name=collect2`
    262       if test -f "$collect2name" && \
    263          strings "$collect2name" | grep resolve_lib_name >/dev/null
    264       then
    265         # We have reworked collect2
    266         hardcode_direct=yes
     275      case $host_os in aix4.[012]|aix4.[012].*)
     276      # We only want to do this on AIX 4.2 and lower, the check
     277      # below for broken collect2 doesn't work under 4.3+
     278        collect2name=`${CC} -print-prog-name=collect2`
     279        if test -f "$collect2name" && \
     280           strings "$collect2name" | grep resolve_lib_name >/dev/null
     281        then
     282          # We have reworked collect2
     283          hardcode_direct=yes
     284        else
     285          # We have old collect2
     286          hardcode_direct=unsupported
     287          # It fails to find uninstalled libraries when the uninstalled
     288          # path is not listed in the libpath.  Setting hardcode_minus_L
     289          # to unsupported forces relinking
     290          hardcode_minus_L=yes
     291          hardcode_libdir_flag_spec='-L$libdir'
     292          hardcode_libdir_separator=
     293        fi
     294      esac
     295      shared_flag='-shared'
     296    else
     297      # not using gcc
     298      if test "$host_cpu" = ia64; then
     299        shared_flag='${wl}-G'
    267300      else
    268         # We have old collect2
    269         hardcode_direct=unsupported
    270         # It fails to find uninstalled libraries when the uninstalled
    271         # path is not listed in the libpath.  Setting hardcode_minus_L
    272         # to unsupported forces relinking
    273         hardcode_minus_L=yes
    274         hardcode_libdir_flag_spec='-L$libdir'
    275         hardcode_libdir_separator=
     301        shared_flag='${wl}-bM:SRE'
    276302      fi
    277       shared_flag='-shared'
    278     else
    279       shared_flag='${wl}-bM:SRE'
    280       hardcode_direct=yes
    281     fi
    282     allow_undefined_flag=' ${wl}-berok'
    283     archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
    284     archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
    285     case "$host_os" in aix4.[01]|aix4.[01].*)
    286       # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
    287       always_export_symbols=yes ;;
    288     esac
    289    ;;
     303    fi
     304
     305    if test "$host_cpu" = ia64; then
     306      # On IA64, the linker does run time linking by default, so we don't
     307      # have to do anything special.
     308      aix_use_runtimelinking=no
     309      if test $with_gnu_ld = no; then
     310        exp_sym_flag='-Bexport'
     311        no_entry_flag=""
     312      fi
     313    else
     314      # Test if we are trying to use run time linking, or normal AIX style linking.
     315      # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
     316      aix_use_runtimelinking=no
     317      for ld_flag in $LDFLAGS; do
     318        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
     319          aix_use_runtimelinking=yes
     320          break
     321        fi
     322      done
     323      exp_sym_flag='-bexport'
     324      no_entry_flag='-bnoentry'
     325    fi
     326    # -bexpall does not export symbols beginning with underscore (_)
     327    always_export_symbols=yes
     328    if test "$aix_use_runtimelinking" = yes; then
     329      # Warning - without using the other run time loading flags (-brtl), -berok will
     330      #           link without error, but may produce a broken library.
     331      allow_undefined_flag=' ${wl}-berok'
     332      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
     333      archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
     334    else
     335      if test "$host_cpu" = ia64; then
     336        if test $with_gnu_ld = no; then
     337          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
     338          allow_undefined_flag="-z nodefs"
     339          archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
     340        fi
     341      else
     342        allow_undefined_flag=' ${wl}-berok'
     343        # -bexpall does not export symbols beginning with underscore (_)
     344        always_export_symbols=yes
     345        # Exported symbols can be pulled into shared objects from archives
     346        whole_archive_flag_spec=' '
     347        build_libtool_need_lc=yes
     348        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
     349        # This is similar to how AIX traditionally builds it's shared libraries.
     350        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
     351      fi
     352    fi
     353  ;;
    290354
    291355  amigaos*)
     
    312376    # FIXME: Should let the user specify the lib program.
    313377    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
    314     fix_srcfile_path='`cygpath -w $srcfile`'
     378    fix_srcfile_path='`cygpath -w "$srcfile"`'
    315379    ;;
    316380
     
    347411
    348412  hpux9* | hpux10* | hpux11*)
    349     case "$host_os" in
     413    case $host_os in
    350414    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
    351415    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
     
    374438      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
    375439    else
    376       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
     440      archive_cmds='$LD -shared -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags'      # ELF
    377441    fi
    378442    hardcode_libdir_flag_spec='${wl}-R$libdir'
     
    428492
    429493  solaris*)
    430     no_undefined_flag=' -z text'
    431     # $CC -shared without GNU ld will not create a library from C++
    432     # object files and a static libstdc++, better avoid it by now
    433     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
     494    no_undefined_flag=' ${wl}-z ${wl}defs'
     495    archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
    434496    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
    435                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
    436     hardcode_libdir_flag_spec='-R$libdir'
    437     hardcode_shlibpath_var=no
    438     case "$host_os" in
     497      $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
     498
     499    # Commands to make compiler produce verbose output that lists
     500    # what "hidden" libraries, object files and flags are used when
     501    # linking a shared library.
     502    output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
     503
     504    hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
     505    hardcode_shlibpath_var=no
     506    case $host_os in
    439507    solaris2.[0-5] | solaris2.[0-5].*) ;;
    440508    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
    441       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
     509      whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
    442510    esac
    443511    link_all_deplibs=yes
     
    508576    ;;
    509577
    510   unixware7*)
    511     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
     578  sysv5uw7* | unixware7*)
     579    no_undefined_flag='${wl}-z ${wl}text'
     580    if test "$GCC" = yes; then
     581      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
     582    else
     583      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
     584    fi
    512585    runpath_var='LD_RUN_PATH'
    513586    hardcode_shlibpath_var=no
     
    534607    ac_cv_prog_cc_static='-static'
    535608
    536     case "$host_os" in
     609    case $host_os in
    537610    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
    538611      # PIC is the default for these OSes.
     
    547620      ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
    548621      ;;
     622    *djgpp*)
     623      # DJGPP does not suppot shared libraries at all
     624      ac_cv_prog_cc_pic=
     625      ;;
    549626    cygwin* | mingw* | os2*)
    550627      # This hack is so that the source file can tell whether it is being
     
    570647# GCJ did not exist at the time GCC didn't implicitly link libc in.
    571648need_lc=no
     649
     650# All existing releases of GCJ support `-c -o'.
     651lt_cv_compiler_c_o=yes
  • TabularUnified branches/GNU/src/binutils/ltconfig

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    22
    33# ltconfig - Create a system-specific libtool.
    4 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
     4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
     5# Free Software Foundation, Inc.
    56# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    67#
     
    181182PROGRAM=ltconfig
    182183PACKAGE=libtool
    183 VERSION=1.4a
    184 TIMESTAMP=" (1.641.2.122 2000/09/30 05:27:52)"
     184VERSION=1.4a-GCC3.0
     185TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
    185186ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    186187ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
     
    217218libext=a
    218219cache_file=
     220max_cmd_len=
    219221
    220222## Dependencies to place before and after the object being linked:
     
    295297for option
    296298do
    297   case "$option" in
     299  case $option in
    298300  -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    299301  *) optarg= ;;
     
    307309  fi
    308310
    309   case "$option" in
     311  case $option in
    310312  --help) cat <<EOM
    311313Usage: $progname [OPTION]... LTMAIN [HOST]
     
    423425if test -n "$tagname"; then
    424426  # Check whether tagname contains only valid characters
    425   case "$tagname" in
    426   *[!-_A-Za-z0-9,/]*)
     427  case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
     428  "") ;;
     429  *)
    427430    echo "$progname: invalid tag name: $tagname" 1>&2
    428431    exit 1
     
    453456for arg
    454457do
    455   case "$arg" in
     458  case $arg in
    456459  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
    457460  ltconfig_args="$ltconfig_args '$arg'" ;;
     
    536539
    537540  host_alias=$host
    538   case "$host_alias" in
     541  case $host_alias in
    539542  "")
    540543    # Force config.guess to use the C compiler.
     
    564567
    565568  build_alias=$build
    566   case "$build_alias" in
     569  case $build_alias in
    567570  NONE)
    568571    case $nonopt in
     
    599602
    600603# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
    601 case "$host_os" in
     604case $host_os in
    602605linux-gnu*) ;;
    603606linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
    604607esac
    605608
    606 case "$host_os" in
     609case $host_os in
    607610aix3*)
    608611  # AIX sometimes has problems with the GCC collect2 program.  For some
     
    673676# the associated values are set (in the cache) correctly too.
    674677echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
    675 echo "$progname:675:checking for $compiler option to produce PIC" 1>&5
     678echo "$progname:678:checking for $compiler option to produce PIC" 1>&5
    676679
    677680if test -z "$ac_cv_prog_cc_pic"; then
     
    682685  # Check to make sure the pic_flag actually works.
    683686  echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
    684   echo "$progname:684:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
     687  echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
    685688  if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \
    686689     test "X${ac_cv_prog_cc_pic_works}" != X; then
     
    692695    save_CFLAGS="$CFLAGS"
    693696    CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
    694     if { (eval echo $progname:694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
     697    if { (eval echo $progname:697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
    695698      # Append any warnings to the config.log.
    696699      cat conftest.err 1>&5
    697700
    698       case "$host_os" in
     701      case $host_os in
    699702      hpux9* | hpux10* | hpux11*)
    700703        # On HP-UX, both CC and GCC only warn that PIC is supported... then
     
    744747
    745748echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
    746 echo "$progname:746: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
     749echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
    747750if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \
    748751   test "X${ac_cv_prog_cc_static_works}" != X; then
     
    753756  save_LDFLAGS="$LDFLAGS"
    754757  LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
    755   if { (eval echo $progname:755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     758  if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    756759    ac_cv_prog_cc_static_works=yes
    757760  else
     
    774777can_build_shared="$ac_cv_prog_cc_can_build_shared"
    775778
     779# find the maximum length of command line arguments
     780echo "$progname:780: finding the maximum length of command line arguments" 1>&5
     781echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6
     782if test "${lt_cv_sys_max_cmd_len+set}" = set; then
     783  echo $ac_n "(cached) $ac_c" 1>&6
     784else
     785  i=0
     786  testring="ABCD"
     787  # If test is not a shell built-in, we'll probably end up computing a
     788  # maximum length that is only half of the actual maximum length, but
     789  # we can't tell.
     790  while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
     791             = "XX$testring" &&
     792          new_result=`expr "X$testring" : ".*" 2>&1` &&
     793          lt_cv_sys_max_cmd_len=$new_result &&
     794          test $i != 17 # 1/2 MB should be enough
     795  do
     796    i=`expr $i + 1`
     797    testring=$testring$testring
     798  done
     799  testring=
     800  # add a significant safety factor because C++ compilers can tack on massive amounts
     801  # of additional arguments before passing them to the linker.  1/4 should be good.
     802  len=`expr $lt_cv_sys_max_cmd_len \/ 4`
     803  lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
     804fi
     805echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5
     806echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6
     807
     808if test -n $lt_cv_sys_max_cmd_len ; then
     809  max_cmd_len=$lt_cv_sys_max_cmd_len
     810else
     811  max_cmd_len=none
     812fi
     813
    776814# Check to see if options -o and -c are simultaneously supported by compiler
    777815echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6
    778 $rm -r conftest 2>/dev/null
    779 mkdir conftest
    780 cd conftest
    781 $rm conftest*
    782 echo $lt_simple_compile_test_code > conftest.$ac_ext
    783 mkdir out
    784 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
    785 # that will create temporary files in the current directory regardless of
    786 # the output directory.  Thus, making CWD read-only will cause this test
    787 # to fail, enabling locking or at least warning the user not to do parallel
    788 # builds.
    789 chmod -w .
    790 save_CFLAGS="$CFLAGS"
    791 CFLAGS="$CFLAGS -o out/conftest2.$objext"
    792 echo "$progname:792: checking if $compiler supports -c -o file.$objext" >&5
    793 if { (eval echo $progname:793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
    794 
    795   # The compiler can only warn and ignore the option if not recognized
    796   # So say no if there are warnings
    797     if test -s out/conftest.err; then
    798       echo "$ac_t"no 1>&6
    799       compiler_c_o=no
    800     else
    801       echo "$ac_t"yes 1>&6
    802       compiler_c_o=yes
    803     fi
    804 else
    805   # Append any errors to the config.log.
    806   cat out/conftest.err 1>&5
    807   compiler_c_o=no
    808   echo "$ac_t"no 1>&6
    809 fi
    810 CFLAGS="$save_CFLAGS"
    811 chmod u+w .
    812 $rm conftest* out/*
    813 rmdir out
    814 cd ..
    815 rmdir conftest
    816 $rm -r conftest 2>/dev/null
     816if test "${lt_cv_compiler_c_o+set}" = set; then
     817  echo $ac_n "(cached) $ac_c" 1>&6
     818else
     819  $rm -r conftest 2>/dev/null
     820  mkdir conftest
     821  cd conftest
     822  $rm conftest*
     823  echo $lt_simple_compile_test_code > conftest.$ac_ext
     824  mkdir out
     825  # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
     826  # that will create temporary files in the current directory regardless of
     827  # the output directory.  Thus, making CWD read-only will cause this test
     828  # to fail, enabling locking or at least warning the user not to do parallel
     829  # builds.
     830  chmod -w .
     831  save_CFLAGS="$CFLAGS"
     832  CFLAGS="$CFLAGS -o out/conftest2.$objext"
     833  echo "$progname:833: checking if $compiler supports -c -o file.$objext" >&5
     834  if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
     835
     836    # The compiler can only warn and ignore the option if not recognized
     837    # So say no if there are warnings
     838      if test -s out/conftest.err; then
     839        lt_cv_compiler_c_o=no
     840      else
     841        lt_cv_compiler_c_o=yes
     842      fi
     843  else
     844    # Append any errors to the config.log.
     845    cat out/conftest.err 1>&5
     846    lt_cv_compiler_c_o=no
     847  fi
     848  CFLAGS="$save_CFLAGS"
     849  chmod u+w .
     850  $rm conftest* out/*
     851  rmdir out
     852  cd ..
     853  rmdir conftest
     854  $rm -r conftest 2>/dev/null
     855fi
     856compiler_c_o=$lt_cv_compiler_c_o
     857echo "${ac_t}$compiler_c_o" 1>&6
    817858
    818859# Check to see if we can do hard links to lock some files if needed
     
    844885  save_CFLAGS="$CFLAGS"
    845886  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
    846   echo "$progname:846: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
    847   if { (eval echo $progname:847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
     887  echo "$progname:887: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
     888  if { (eval echo $progname:888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
    848889
    849890    # The compiler can only warn and ignore the option if not recognized
     
    914955fi
    915956
     957case $reload_flag in
     958"" | " "*) ;;
     959*) reload_flag=" $reload_flag" ;;
     960esac
    916961reload_cmds='$LD$reload_flag -o $output$reload_objs'
    917962test -z "$deplibs_check_method" && deplibs_check_method=unknown
     
    933978
    934979echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
    935 case "$host_os" in
     980case $host_os in
    936981aix3*)
    937982  version_type=linux
     
    939984  shlibpath_var=LIBPATH
    940985
    941   # AIX has no versioning support, so we append a major version to the name.
     986  # AIX 3 has no versioning support, so we append a major version to the name.
    942987  soname_spec='${libname}${release}.so$major'
    943988  ;;
    944989
    945 aix4*)
     990aix4* | aix5*)
    946991  version_type=linux
    947   # AIX has no versioning support, so currently we can not hardcode correct
    948   # soname into executable. Probably we can add versioning support to
    949   # collect2, so additional links can be useful in future.
    950   # We preserve .a as extension for shared libraries though AIX4.2
    951   # and later linker supports .so
    952   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
    953   shlibpath_var=LIBPATH
     992  if test "$host_cpu" = ia64; then
     993    # AIX 5 supports IA64
     994    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
     995    shlibpath_var=LD_LIBRARY_PATH
     996  else
     997    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
     998    # soname into executable. Probably we can add versioning support to
     999    # collect2, so additional links can be useful in future.
     1000    # We preserve .a as extension for shared libraries though AIX4.2
     1001    # and later linker supports .so
     1002    if test "$aix_use_runtimelinking" = yes; then
     1003      # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
     1004      # lib<name>.a to let people know that these are not typical AIX shared libraries.
     1005      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
     1006    else
     1007      # We preserve .a as extension for shared libraries though AIX4.2
     1008      # and later when we are not doing run time linking.
     1009      library_names_spec='${libname}${release}.a $libname.a'
     1010      soname_spec='${libname}${release}.so$major'
     1011    fi
     1012    # If we're using GNU nm, then we don't want the "-C" option.
     1013    # -C means demangle to AIX nm, but means don't demangle with GNU nm
     1014    if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
     1015      export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
     1016    else
     1017      export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
     1018    fi
     1019    shlibpath_var=LIBPATH
     1020    deplibs_check_method=pass_all
     1021    case $host_os in
     1022    aix4 | aix4.[01] | aix4.[01].*)
     1023      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
     1024           echo ' yes '
     1025           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
     1026        :
     1027      else
     1028        # With GCC up to 2.95.x, collect2 would create an import file
     1029        # for dependence libraries.  The import file would start with
     1030        # the line `#! .'.  This would cause the generated library to
     1031        # depend on `.', always an invalid library.  This was fixed in
     1032        # development snapshots of GCC prior to 3.0.
     1033        can_build_shared=no
     1034      fi
     1035      ;;
     1036    esac
     1037  fi
    9541038  ;;
    9551039
     
    9881072  need_version=no
    9891073  need_lib_prefix=no
    990   if test "$with_gcc" = yes; then
     1074  case $with_gcc,$host_os in
     1075  yes,cygwin*)
     1076    library_names_spec='$libname.dll.a'
     1077    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
     1078    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~
     1079      dldir=$destdir/`dirname \$dlpath`~
     1080      test -d \$dldir || mkdir -p \$dldir~
     1081      $install_prog .libs/$dlname \$dldir/$dlname'
     1082    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
     1083      dlpath=$dir/\$dldll; $rm \$dlpath'
     1084    ;;
     1085  yes,mingw*)
    9911086    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
    992   else
     1087    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
     1088    ;;
     1089  yes,pw32*)
     1090    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
     1091;;
     1092  *)
    9931093    library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
    994   fi
     1094    ;;
     1095  esac
    9951096  dynamic_linker='Win32 ld.exe'
    9961097  # FIXME: first we should search . and the directory the executable is in
     
    10001101  ;;
    10011102
     1103darwin* | rhapsody*)
     1104  dynamic_linker="$host_os dyld"
     1105  version_type=darwin
     1106  need_lib_prefix=no
     1107  need_version=no
     1108  library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`'
     1109  soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'
     1110  shlibpath_overrides_runpath=yes
     1111  shlibpath_var=DYLD_LIBRARY_PATH
     1112  ;;
     1113
    10021114freebsd1*)
    10031115  dynamic_linker=no
     
    10071119  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
    10081120  version_type=freebsd-$objformat
    1009   case "$version_type" in
     1121  case $version_type in
    10101122    freebsd-elf*)
    10111123      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
    10121124      need_version=no
     1125      need_lc=no
    10131126      need_lib_prefix=no
    10141127      ;;
     
    10191132  esac
    10201133  shlibpath_var=LD_LIBRARY_PATH
    1021   case "$host_os" in
     1134  case $host_os in
    10221135  freebsd2*)
    10231136    shlibpath_overrides_runpath=yes
     
    10431156  # Give a soname corresponding to the major version so that dld.sl refuses to
    10441157  # link against other versions.
    1045   dynamic_linker="$host_os dld.sl"
    10461158  version_type=sunos
    10471159  need_lib_prefix=no
    10481160  need_version=no
    1049   shlibpath_var=SHLIB_PATH
    1050   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
    1051   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
    1052   soname_spec='${libname}${release}.sl$major'
     1161  case "$host_cpu" in
     1162  ia64*)
     1163    dynamic_linker="$host_os dld.so"
     1164    shlibpath_var=LD_LIBRARY_PATH
     1165    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
     1166    soname_spec='${libname}${release}.so$major'
     1167    shlibpath_var=LD_LIBRARY_PATH
     1168    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
     1169    if test "X$HPUX_IA64_MODE" = X32; then
     1170      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32/usr/local/lib"
     1171    else
     1172      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
     1173    fi
     1174    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     1175    ;;
     1176  *)
     1177    dynamic_linker="$host_os dld.sl"
     1178    shlibpath_var=SHLIB_PATH
     1179    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
     1180    library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
     1181    soname_spec='${libname}${release}.sl$major'
     1182    ;;
     1183  esac
    10531184  # HP-UX runs *really* slowly unless shared libraries are mode 555.
    10541185  postinstall_cmds='chmod 555 $lib'
     
    10561187
    10571188irix5* | irix6*)
     1189  if test "$with_gnu_ld" = yes; then
     1190    version_type=linux
     1191  else
     1192    version_type=irix
     1193  fi
    10581194  version_type=irix
    10591195  need_lib_prefix=no
     
    10611197  soname_spec='${libname}${release}.so$major'
    10621198  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
    1063   case "$host_os" in
     1199  case $host_os in
    10641200  irix5*)
    10651201    libsuff= shlibsuff=
    10661202    ;;
    10671203  *)
    1068     case "$LD" in # libtool.m4 will add one of these switches to LD
    1069     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
    1070     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
    1071     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
     1204    case $LD in # libtool.m4 will add one of these switches to LD
     1205    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
     1206      libsuff= shlibsuff= libmagic=32-bit;;
     1207    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
     1208      libsuff=32 shlibsuff=N32 libmagic=N32;;
     1209    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
     1210      libsuff=64 shlibsuff=64 libmagic=64-bit;;
    10721211    *) libsuff= shlibsuff= libmagic=never-match;;
    10731212    esac
     
    11101249
    11111250netbsd*)
     1251  need_lib_prefix=no
     1252  need_version=no
    11121253  version_type=sunos
    11131254  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
     
    11231264  shlibpath_overrides_runpath=yes
    11241265  hardcode_into_libs=yes
     1266  ;;
     1267
     1268newsos6)
     1269  version_type=linux
     1270  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
     1271  shlibpath_var=LD_LIBRARY_PATH
     1272  shlibpath_overrides_runpath=yes
    11251273  ;;
    11261274
     
    11911339  soname_spec='${libname}${release}.so$major'
    11921340  shlibpath_var=LD_LIBRARY_PATH
    1193   case "$host_vendor" in
     1341  case $host_vendor in
    11941342    motorola)
    11951343      need_lib_prefix=no
     
    12521400
    12531401# Define system-specific variables.
    1254 case "$host_os" in
     1402case $host_os in
    12551403aix*)
    12561404  symcode='[BCDT]'
     
    12601408  ;;
    12611409hpux*) # Its linker distinguishes data from code symbols
    1262   global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
     1410  global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
    12631411  ;;
    12641412irix*)
     
    12731421esac
    12741422
    1275 # Handle CRLF in mingw too chain
     1423# Handle CRLF in mingw tool chain
    12761424opt_cr=
    1277 case "$host_os" in
     1425case $host_os in
    12781426mingw*)
    12791427  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
     
    12901438
    12911439  # Write the raw and C identifiers.
    1292 global_symbol_pipe="sed -n -e 's/^.*[   ]\($symcode\)[  ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
     1440  global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
    12931441
    12941442  # Check to see that the pipe works correctly.
     
    13041452}
    13051453#endif
    1306 main(){nm_test_var='a';nm_test_func();return(0);}
     1454int main(){nm_test_var='a';nm_test_func();return(0);}
    13071455EOF
    13081456
    1309   echo "$progname:1309: checking if global_symbol_pipe works" >&5
    1310   if { (eval echo $progname:1310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
     1457  echo "$progname:1431: checking if global_symbol_pipe works" >&5
     1458  if { (eval echo $progname:1432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
    13111459    # Now try to grab the symbols.
    13121460    nlist=conftest.nm
    1313     if { echo "$progname:1313: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
     1461    if { echo "$progname:1435: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
    13141462
    13151463      # Try sorting and uniquifying the output.
     
    13481496{
    13491497EOF
    1350           sed 's/^. \(.*\) \(.*\)$/  {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext
     1498          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
    13511499          cat <<\EOF >> conftest.$ac_ext
    13521500  {0, (lt_ptr_t) 0}
     
    13631511          LIBS="conftstm.$objext"
    13641512          CFLAGS="$CFLAGS$no_builtin_flag"
    1365           if { (eval echo $progname:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
     1513          if { (eval echo $progname:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    13661514            pipe_works=yes
    13671515          else
     
    14071555# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
    14081556# configure.in, otherwise build static only libraries.
    1409 case "$host_os" in
     1557case $host_os in
    14101558cygwin* | mingw* | pw32* | os2*)
    14111559  if test x$can_build_shared = xyes; then
     
    14211569# On AIX, shared libraries and static libraries use the same namespace, and
    14221570# are all built from PIC.
    1423 case "$host_os" in
     1571case $host_os in
    14241572aix3*)
    14251573  test "$enable_shared" = yes && enable_static=no
     
    14671615  lt_cv_dlopen=no lt_cv_dlopen_libs=
    14681616echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
    1469 echo "$progname:1469: checking for dlopen in -ldl" >&5
     1617echo "$progname:1591: checking for dlopen in -ldl" >&5
    14701618if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
    14711619  echo $ac_n "(cached) $ac_c" 1>&6
     
    14741622LIBS="-ldl  $LIBS"
    14751623cat > conftest.$ac_ext <<EOF
    1476 #line 1476 "ltconfig"
     1624#line 1598 "ltconfig"
    14771625/* Override any gcc2 internal prototype to avoid an error.  */
    14781626/* We use char because int might match the return type of a gcc2
     
    14871635; return 0; }
    14881636EOF
    1489 if { (eval echo $progname:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1637if { (eval echo $progname:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    14901638  rm -rf conftest*
    14911639  ac_cv_lib_dl_dlopen=yes
     
    15061654  echo "$ac_t""no" 1>&6
    15071655echo $ac_n "checking for dlopen""... $ac_c" 1>&6
    1508 echo "$progname:1508: checking for dlopen" >&5
     1656echo "$progname:1630: checking for dlopen" >&5
    15091657if test "X${ac_cv_func_dlopen+set}" = Xset; then
    15101658  echo $ac_n "(cached) $ac_c" 1>&6
    15111659else
    15121660  cat > conftest.$ac_ext <<EOF
    1513 #line 1513 "ltconfig"
     1661#line 1635 "ltconfig"
    15141662/* System header to define __stub macros and hopefully few prototypes,
    15151663    which can conflict with char dlopen(); below.  */
     
    15361684; return 0; }
    15371685EOF
    1538 if { (eval echo $progname:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1686if { (eval echo $progname:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    15391687  rm -rf conftest*
    15401688  ac_cv_func_dlopen=yes
     
    15531701  echo "$ac_t""no" 1>&6
    15541702echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
    1555 echo "$progname:1555: checking for dlopen in -lsvld" >&5
     1703echo "$progname:1677: checking for dlopen in -lsvld" >&5
    15561704if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
    15571705  echo $ac_n "(cached) $ac_c" 1>&6
     
    15601708LIBS="-lsvld  $LIBS"
    15611709cat > conftest.$ac_ext <<EOF
    1562 #line 1562 "ltconfig"
     1710#line 1684 "ltconfig"
    15631711/* Override any gcc2 internal prototype to avoid an error.  */
    15641712/* We use char because int might match the return type of a gcc2
     
    15731721; return 0; }
    15741722EOF
    1575 if { (eval echo $progname:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1723if { (eval echo $progname:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    15761724  rm -rf conftest*
    15771725  ac_cv_lib_svld_dlopen=yes
     
    15921740  echo "$ac_t""no" 1>&6
    15931741echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
    1594 echo "$progname:1594: checking for dld_link in -ldld" >&5
     1742echo "$progname:1716: checking for dld_link in -ldld" >&5
    15951743if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
    15961744  echo $ac_n "(cached) $ac_c" 1>&6
     
    15991747LIBS="-ldld  $LIBS"
    16001748cat > conftest.$ac_ext <<EOF
    1601 #line 1601 "ltconfig"
     1749#line 1723 "ltconfig"
    16021750/* Override any gcc2 internal prototype to avoid an error.  */
    16031751/* We use char because int might match the return type of a gcc2
     
    16121760; return 0; }
    16131761EOF
    1614 if { (eval echo $progname:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1762if { (eval echo $progname:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    16151763  rm -rf conftest*
    16161764  ac_cv_lib_dld_dld_link=yes
     
    16311779  echo "$ac_t""no" 1>&6
    16321780echo $ac_n "checking for shl_load""... $ac_c" 1>&6
    1633 echo "$progname:1633: checking for shl_load" >&5
     1781echo "$progname:1755: checking for shl_load" >&5
    16341782if test "X${ac_cv_func_shl_load+set}" = Xset; then
    16351783  echo $ac_n "(cached) $ac_c" 1>&6
    16361784else
    16371785  cat > conftest.$ac_ext <<EOF
    1638 #line 1638 "ltconfig"
     1786#line 1760 "ltconfig"
    16391787/* System header to define __stub macros and hopefully few prototypes,
    16401788    which can conflict with char shl_load(); below.  */
     
    16611809; return 0; }
    16621810EOF
    1663 if { (eval echo $progname:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1811if { (eval echo $progname:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    16641812  rm -rf conftest*
    16651813  ac_cv_func_shl_load=yes
     
    16791827  echo "$ac_t""no" 1>&6
    16801828echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
    1681 echo "$progname:1681: checking for shl_load in -ldld" >&5
     1829echo "$progname:1803: checking for shl_load in -ldld" >&5
    16821830if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
    16831831  echo $ac_n "(cached) $ac_c" 1>&6
     
    16861834LIBS="-ldld  $LIBS"
    16871835cat > conftest.$ac_ext <<EOF
    1688 #line 1688 "ltconfig"
     1836#line 1810 "ltconfig"
    16891837#include "confdefs.h"
    16901838/* Override any gcc2 internal prototype to avoid an error.  */
     
    17001848; return 0; }
    17011849EOF
    1702 if { (eval echo $progname:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1850if { (eval echo $progname:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    17031851  rm -rf conftest*
    17041852  ac_cv_lib_dld_shl_load=yes
     
    17421890  fi
    17431891
    1744   case "$lt_cv_dlopen" in
     1892  case $lt_cv_dlopen in
    17451893  dlopen)
    17461894for ac_hdr in dlfcn.h; do
    17471895ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
    17481896echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
    1749 echo "$progname:1749: checking for $ac_hdr" >&5
     1897echo "$progname:1871: checking for $ac_hdr" >&5
    17501898if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
    17511899  echo $ac_n "(cached) $ac_c" 1>&6
    17521900else
    17531901  cat > conftest.$ac_ext <<EOF
    1754 #line 1754 "ltconfig"
     1902#line 1876 "ltconfig"
    17551903#include <$ac_hdr>
    17561904int fnord = 0;
     
    17581906EOF
    17591907ac_try="$ac_compile >/dev/null 2>conftest.out"
    1760 { (eval echo $progname:1760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     1908{ (eval echo $progname:1882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    17611909ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    17621910if test -z "$ac_err"; then
     
    17861934
    17871935  echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
    1788 echo "$progname:1788: checking whether a program can dlopen itself" >&5
     1936echo "$progname:1910: checking whether a program can dlopen itself" >&5
    17891937if test "X${lt_cv_dlopen_self+set}" = Xset; then
    17901938  echo $ac_n "(cached) $ac_c" 1>&6
     
    17941942  else
    17951943    cat > conftest.$ac_ext <<EOF
    1796 #line 1796 "ltconfig"
     1944#line 1918 "ltconfig"
    17971945
    17981946#if HAVE_DLFCN_H
     
    18341982#endif
    18351983
    1836 fnord() { int i=42;}
    1837 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
     1984void fnord() { int i=42; }
     1985int main() {
     1986    void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
    18381987    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
    18391988               if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
    18401989
    18411990EOF
    1842 if { (eval echo $progname:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
     1991if { (eval echo $progname:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    18431992then
    18441993  lt_cv_dlopen_self=yes
     
    18592008    LDFLAGS="$LDFLAGS $link_static_flag"
    18602009  echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
    1861 echo "$progname:1861: checking whether a statically linked program can dlopen itself" >&5
     2010echo "$progname:1984: checking whether a statically linked program can dlopen itself" >&5
    18622011if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
    18632012  echo $ac_n "(cached) $ac_c" 1>&6
     
    18672016  else
    18682017    cat > conftest.$ac_ext <<EOF
    1869 #line 1869 "ltconfig"
     2018#line 1992 "ltconfig"
    18702019
    18712020#if HAVE_DLFCN_H
     
    19072056#endif
    19082057
    1909 fnord() { int i=42;}
    1910 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
     2058void fnord() { int i=42; }
     2059int main() {
     2060    void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
    19112061    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
    19122062    if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
    19132063
    19142064EOF
    1915 if { (eval echo $progname:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
     2065if { (eval echo $progname:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
    19162066then
    19172067  lt_cv_dlopen_self_static=yes
     
    19322082  esac
    19332083
    1934   case "$lt_cv_dlopen_self" in
     2084  case $lt_cv_dlopen_self in
    19352085  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
    19362086  *) enable_dlopen_self=unknown ;;
    19372087  esac
    19382088
    1939   case "$lt_cv_dlopen_self_static" in
     2089  case $lt_cv_dlopen_self_static in
    19402090  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
    19412091  *) enable_dlopen_self_static=unknown ;;
     
    19542104
    19552105# Only quote variables if we're using ltmain.sh.
    1956 case "$ltmain" in
     2106case $ltmain in
    19572107*.sh)
    19582108  # Now quote all the things that may contain metacharacters.
     
    19792129    compiler_c_o need_locks exclude_expsyms include_expsyms; do
    19802130
    1981     case "$var" in
     2131    case $var in
    19822132    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
    19832133    old_postinstall_cmds | old_postuninstall_cmds | \
     
    19952145  done
    19962146
    1997   case "$ltecho" in
     2147  case $ltecho in
    19982148  *'\$0 --fallback-echo"')
    19992149    ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
     
    21842334pic_mode=$pic_mode
    21852335
     2336# What is the maximum length of a command?
     2337max_cmd_len=$max_cmd_len
     2338
    21862339# Does compiler simultaneously support -c and -o options?
    21872340compiler_c_o=$compiler_c_o
     
    23722525fi
    23732526
    2374 case "$ltmain" in
     2527case $ltmain in
    23752528*.sh)
    23762529  echo >> "$ofile"
    23772530  if test -z "$tagname"; then
    2378     case "$host_os" in
     2531    case $host_os in
    23792532    aix3*)
    23802533      cat <<\EOF >> "$ofile"
     
    23902543      ;;
    23912544    esac
    2392     case "$host" in
     2545    case $host in
    23932546    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    23942547      cat <<'EOF' >> "$ofile"
     
    25062659#
    25072660#      dll = open(filename, O_RDONLY|O_BINARY);
    2508 #      if (!dll)
     2661#      if (dll < 1)
    25092662#       return 1;
    25102663#
  • TabularUnified branches/GNU/src/binutils/ltmain.sh

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r604 r605  
    22# NOTE: Changing this file will not affect anything until you rerun ltconfig.
    33#
    4 # Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
     4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
     5# Free Software Foundation, Inc.
    56# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    67#
     
    5556PROGRAM=ltmain.sh
    5657PACKAGE=libtool
    57 VERSION=1.4a
    58 TIMESTAMP=" (1.641.2.122 2000/09/30 05:27:52)"
     58VERSION=1.4a-GCC3.0
     59TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
    5960
    6061default_mode=
     
    107108lo2o="s/\\.lo\$/.${objext}/"
    108109o2lo="s/\\.${objext}\$/.lo/"
     110taglist=
    109111
    110112# Parse our command line options once, thoroughly.
     
    114116  shift
    115117
    116   case "$arg" in
     118  case $arg in
    117119  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
    118120  *) optarg= ;;
     
    121123  # If the previous option needs an argument, assign it.
    122124  if test -n "$prev"; then
    123     case "$prev" in
     125    case $prev in
    124126    execute_dlfiles)
    125       eval "$prev=\"\$$prev \$arg\""
     127      execute_dlfiles="$execute_dlfiles $arg"
    126128      ;;
    127129    tag)
     
    129131
    130132      # Check whether tagname contains only valid characters
    131       case "$tagname" in
     133      case $tagname in
    132134      *[!-_A-Za-z0-9,/]*)
    133135        echo "$progname: invalid tag name: $tagname" 1>&2
     
    136138      esac
    137139
    138       if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
    139         taglist="$taglist $tagname"
    140         # Evaluate the configuration.
    141         eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
    142       else
    143         echo "$progname: ignoring unknown tag $tagname" 1>&2
    144       fi
     140      case $tagname in
     141      CC)
     142        # Don't test for the "default" C tag, as we know, it's there, but
     143        # not specially marked.
     144        taglist="$taglist $tagname"
     145        ;;
     146      *)
     147        if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
     148          taglist="$taglist $tagname"
     149          # Evaluate the configuration.
     150          eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
     151        else
     152          echo "$progname: ignoring unknown tag $tagname" 1>&2
     153        fi
     154        ;;
     155      esac
    145156      ;;
    146157    *)
     
    155166
    156167  # Have we seen a non-optional argument yet?
    157   case "$arg" in
     168  case $arg in
    158169  --help)
    159170    show_help=yes
     
    238249fi
    239250
     251# If this variable is set in any of the actions, the command in it
     252# will be execed at the end.  This prevents here-documents from being
     253# left over by shells.
     254exec_cmd=
     255
    240256if test -z "$show_help"; then
    241257
    242258  # Infer the operation mode.
    243259  if test -z "$mode"; then
    244     case "$nonopt" in
     260    case $nonopt in
    245261    *cc | *++ | gcc* | *-gcc*)
    246262      mode=link
    247263      for arg
    248264      do
    249         case "$arg" in
     265        case $arg in
    250266        -c)
    251267           mode=compile
     
    292308
    293309  # These modes are in order of execution frequency so that they run quickly.
    294   case "$mode" in
     310  case $mode in
    295311  # libtool compile mode
    296312  compile)
     
    306322    for arg
    307323    do
    308       case "$prev" in
     324      case $prev in
    309325      "") ;;
    310326      xcompiler)
     
    313329        lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    314330
    315         case "$arg" in
     331        case $arg in
    316332        # Double-quote args containing other shell metacharacters.
    317333        # Many Bourne shells cannot handle close brackets correctly
     
    333349
    334350      # Accept any command-line options.
    335       case "$arg" in
     351      case $arg in
    336352      -o)
    337353        if test "$user_target" != "no"; then
     
    372388          # Many Bourne shells cannot handle close brackets correctly
    373389          # in scan sets, so we specify it separately.
    374           case "$arg" in
     390          case $arg in
    375391            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
    376392            arg="\"$arg\""
     
    392408      esac
    393409
    394       case "$user_target" in
     410      case $user_target in
    395411      next)
    396412        # The next one is the -o target name
     
    420436      # Many Bourne shells cannot handle close brackets correctly
    421437      # in scan sets, so we specify it separately.
    422       case "$lastarg" in
     438      case $lastarg in
    423439      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
    424440        lastarg="\"$lastarg\""
     
    434450    done
    435451
    436     case "$user_target" in
     452    case $user_target in
    437453    set)
    438454      ;;
     
    450466    # If the user specifies -o file.o, it is replaced with file.lo
    451467    xform='[cCFSfmso]'
    452     case "$libobj" in
     468    case $libobj in
    453469    *.ada) xform=ada ;;
    454470    *.adb) xform=adb ;;
     
    467483    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
    468484
    469     case "$libobj" in
     485    case $libobj in
    470486    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
    471487    *)
     
    545561
    546562    # On Cygwin there's no "real" PIC flag so we must build both object types
    547     case "$host_os" in
     563    case $host_os in
    548564    cygwin* | mingw* | pw32* | os2*)
    549565      pic_mode=default
     
    778794  link | relink)
    779795    modename="$modename: link"
    780     case "$host" in
     796    case $host in
    781797    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    782798      # It is impossible to link a dll without this setting, and
     
    844860    for arg
    845861    do
    846       case "$arg" in
     862      case $arg in
    847863      -all-static | -static)
    848864        if test "X$arg" = "X-all-static"; then
     
    874890      base_compile="$base_compile $arg"
    875891      shift
    876       case "$arg" in
     892      case $arg in
    877893      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
    878894        qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
     
    884900      # If the previous option needs an argument, assign it.
    885901      if test -n "$prev"; then
    886         case "$prev" in
     902        case $prev in
    887903        output)
    888904          compile_command="$compile_command @OUTPUT@"
     
    891907        esac
    892908
    893         case "$prev" in
     909        case $prev in
    894910        dlfiles|dlprefiles)
    895911          if test "$preload" = no; then
     
    899915            preload=yes
    900916          fi
    901           case "$arg" in
     917          case $arg in
    902918          *.la | *.lo) ;;  # We handle these cases below.
    903919          force)
     
    951967          continue
    952968          ;;
     969        objectlist)
     970          if test -f "$arg"; then
     971            save_arg=$arg
     972            moreargs=
     973            for fil in `cat $save_arg`
     974            do
     975#             moreargs="$moreargs $fil"
     976              arg=$fil
     977              # A libtool-controlled object.
     978
     979              # Check to see that this really is a libtool object.
     980              if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
     981                pic_object=
     982                non_pic_object=
     983
     984                # Read the .lo file
     985                # If there is no directory component, then add one.
     986                case $arg in
     987                */* | *\\*) . $arg ;;
     988                *) . ./$arg ;;
     989                esac
     990
     991                if test -z "$pic_object" || \
     992                   test -z "$non_pic_object" ||
     993                   test "$pic_object" = none && \
     994                   test "$non_pic_object" = none; then
     995                  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
     996                  exit 1
     997                fi
     998
     999                # Extract subdirectory from the argument.
     1000                xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
     1001                if test "X$xdir" = "X$arg"; then
     1002                  xdir=
     1003                else
     1004                  xdir="$xdir/"
     1005                fi
     1006
     1007                if test "$pic_object" != none; then
     1008                  # Prepend the subdirectory the object is found in.
     1009                  pic_object="$xdir$pic_object"
     1010
     1011                  if test "$prev" = dlfiles; then
     1012                    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
     1013                      dlfiles="$dlfiles $pic_object"
     1014                      prev=
     1015                      continue
     1016                    else
     1017                      # If libtool objects are unsupported, then we need to preload.
     1018                      prev=dlprefiles
     1019                    fi
     1020                  fi
     1021
     1022                  # CHECK ME:  I think I busted this.  -Ossama
     1023                  if test "$prev" = dlprefiles; then
     1024                    # Preload the old-style object.
     1025                    dlprefiles="$dlprefiles $pic_object"
     1026                    prev=
     1027                  fi
     1028
     1029                  # A PIC object.
     1030                  libobjs="$libobjs $pic_object"
     1031                  arg="$pic_object"
     1032                fi
     1033
     1034                # Non-PIC object.
     1035                if test "$non_pic_object" != none; then
     1036                  # Prepend the subdirectory the object is found in.
     1037                  non_pic_object="$xdir$non_pic_object"
     1038
     1039                  # A standard non-PIC object
     1040                  non_pic_objects="$non_pic_objects $non_pic_object"
     1041                  if test -z "$pic_object" || test "$pic_object" = none ; then
     1042                    arg="$non_pic_object"
     1043                  fi
     1044                fi
     1045              else
     1046                # Only an error if not doing a dry-run.
     1047                if test -z "$run"; then
     1048                  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
     1049                  exit 1
     1050                else
     1051                  # Dry-run case.
     1052
     1053                  # Extract subdirectory from the argument.
     1054                  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
     1055                  if test "X$xdir" = "X$arg"; then
     1056                    xdir=
     1057                  else
     1058                    xdir="$xdir/"
     1059                  fi
     1060
     1061                  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
     1062                  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
     1063                  libobjs="$libobjs $pic_object"
     1064                  non_pic_objects="$non_pic_objects $non_pic_object"
     1065                fi
     1066              fi
     1067            done
     1068          else
     1069            $echo "$modename: link input file \`$save_arg' does not exist"
     1070            exit 1
     1071          fi
     1072          arg=$save_arg
     1073          prev=
     1074          continue
     1075          ;;
    9531076        rpath | xrpath)
    9541077          # We need an absolute path.
    955           case "$arg" in
     1078          case $arg in
    9561079          [\\/]* | [A-Za-z]:[\\/]*) ;;
    9571080          *)
     
    9951118          ;;
    9961119        esac
    997       fi
     1120      fi # test -n $prev
    9981121
    9991122      prevarg="$arg"
    10001123
    1001       case "$arg" in
     1124      case $arg in
    10021125      -all-static)
    10031126        if test -n "$link_static_flag"; then
     
    10361159      -export-symbols | -export-symbols-regex)
    10371160        if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
    1038           $echo "$modename: not more than one -exported-symbols argument allowed"
     1161          $echo "$modename: more than one -exported-symbols argument is not allowed"
    10391162          exit 1
    10401163        fi
     
    10581181        continue
    10591182        ;;
    1060        
     1183
    10611184      -L*)
    10621185        dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
    10631186        # We need an absolute path.
    1064         case "$dir" in
     1187        case $dir in
    10651188        [\\/]* | [A-Za-z]:[\\/]*) ;;
    10661189        *)
     
    10801203          ;;
    10811204        esac
    1082         case "$host" in
     1205        case $host in
    10831206        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    1084           case ":$dllsearchpath:" in
     1207          case :$dllsearchpath: in
    10851208          *":$dir:"*) ;;
    10861209          *) dllsearchpath="$dllsearchpath:$dir";;
     
    10921215
    10931216      -l*)
    1094         if test "$arg" = "-lc"; then
    1095           case "$host" in
    1096           *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
    1097             # These systems don't actually have c library (as such)
     1217        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
     1218          case $host in
     1219          *-*-cygwin* | *-*-pw32* | *-*-beos*)
     1220            # These systems don't actually have a C or math library (as such)
    10981221            continue
    10991222            ;;
    1100           esac
    1101         elif test "$arg" = "-lm"; then
    1102           case "$host" in
    1103           *-*-cygwin* | *-*-pw32* | *-*-beos*)
    1104             # These systems don't actually have math library (as such)
    1105             continue
     1223          *-*-mingw* | *-*-os2*)
     1224            # These systems don't actually have a C library (as such)
     1225            test "X$arg" = "X-lc" && continue
    11061226            ;;
    11071227          esac
     
    11221242
    11231243      -no-install)
    1124         case "$host" in
     1244        case $host in
    11251245        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    11261246          # The PATH hackery in wrapper scripts is required on Windows
     
    11301250          fast_install=no
    11311251          ;;
    1132         *-*-rhapsody*)
    1133           # rhapsody is a little odd...
    1134           deplibs="$deplibs -framework System"
    1135           ;;
    1136         *)
    1137           no_install=yes
    1138           ;;
     1252        *) no_install=yes ;;
    11391253        esac
    11401254        continue
     
    11461260        ;;
    11471261
     1262      -objectlist)
     1263        prev=objectlist
     1264        continue
     1265        ;;
     1266
    11481267      -o) prev=output ;;
    11491268
     
    11661285        dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
    11671286        # We need an absolute path.
    1168         case "$dir" in
     1287        case $dir in
    11691288        [\\/]* | [A-Za-z]:[\\/]*) ;;
    11701289        *)
     
    11811300
    11821301      -static)
    1183         # The effects of -static are defined in a previous loop.
     1302        # The effects of -static are defined in a previous loop.
    11841303        # We used to do the same as -all-static on platforms that
    11851304        # didn't have a PIC flag, but the assumption that the effects
     
    12051324        for flag in $args; do
    12061325          IFS="$save_ifs"
    1207           case "$flag" in
     1326          case $flag in
    12081327            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
    12091328            flag="\"$flag\""
     
    12231342        for flag in $args; do
    12241343          IFS="$save_ifs"
    1225           case "$flag" in
     1344          case $flag in
    12261345            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
    12271346            flag="\"$flag\""
     
    12511370        # to be aesthetically quoted because they are evaled later.
    12521371        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    1253         case "$arg" in
     1372        case $arg in
    12541373        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
    12551374          arg="\"$arg\""
     
    12731392          # Read the .lo file
    12741393          # If there is no directory component, then add one.
    1275           case "$arg" in
     1394          case $arg in
    12761395          */* | *\\*) . $arg ;;
    12771396          *) . ./$arg ;;
     
    13851504        # to be aesthetically quoted because they are evaled later.
    13861505        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    1387         case "$arg" in
     1506        case $arg in
    13881507        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
    13891508          arg="\"$arg\""
     
    13911510        esac
    13921511        ;;
    1393       esac
     1512      esac # arg
    13941513
    13951514      # Now actually substitute the argument into the commands.
     
    13981517        finalize_command="$finalize_command $arg"
    13991518      fi
    1400     done
     1519    done # argument parsing loop
    14011520
    14021521    if test -n "$prev"; then
     
    14561575    fi
    14571576
    1458     oldlibs=
    14591577    # calculate the name of the file, without its directory
    14601578    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
     
    14871605
    14881606    # Determine the type of output
    1489     case "$output" in
     1607    case $output in
    14901608    "")
    14911609      $echo "$modename: you must specify an output file" 1>&2
     
    15121630    if test $linkmode = lib; then
    15131631      libs="$predeps $libs $compiler_lib_search_path $postdeps"
     1632
     1633      # Compute libraries that are listed more than once in $predeps
     1634      # $postdeps and mark them as special (i.e., whose duplicates are
     1635      # not to be eliminated).
     1636      pre_post_deps=
     1637      for pre_post_dep in $predeps $postdeps; do
     1638        case "$pre_post_deps " in
     1639        *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
     1640        esac
     1641        pre_post_deps="$pre_post_deps $pre_post_dep"
     1642      done
     1643      pre_post_deps=
    15141644    fi
    15151645
     
    15181648    newlib_search_path=
    15191649    need_relink=no # whether we're linking any uninstalled libtool libraries
    1520     uninst_deplibs= # uninstalled libtool libraries
    1521     uninst_path= # paths that contain uninstalled libtool libraries
     1650    notinst_deplibs= # not-installed libtool libraries
     1651    notinst_path= # paths that contain not-installed libtool libraries
    15221652    case $linkmode in
    15231653    lib)
    15241654        passes="conv link"
    15251655        for file in $dlfiles $dlprefiles; do
    1526           case "$file" in
     1656          case $file in
    15271657          *.la) ;;
    15281658          *)
     
    15411671        passes="conv scan dlopen dlpreopen link"
    15421672        ;;
    1543     *)  passes="conv"
     1673    *)  passes="conv"
    15441674        ;;
    15451675    esac
    15461676    for pass in $passes; do
    1547       if test "$linkmode,$pass" = "lib,link" ||
    1548          test "$linkmode,$pass" = "prog,scan"; then
    1549         libs="$deplibs"
    1550         deplibs=
    1551       fi
    15521677      if test $linkmode = prog; then
     1678        # Determine which files to process
    15531679        case $pass in
    1554         dlopen) libs="$dlfiles" ;;
     1680        dlopen)
     1681          libs="$dlfiles"
     1682          save_deplibs="$deplibs" # Collect dlpreopened libraries
     1683          deplibs=
     1684          ;;
    15551685        dlpreopen) libs="$dlprefiles" ;;
    15561686        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
    15571687        esac
    15581688      fi
    1559       if test $pass = dlopen; then
    1560         # Collect dlpreopened libraries
    1561         save_deplibs="$deplibs"
    1562         deplibs=
    1563       fi
    15641689      for deplib in $libs; do
    15651690        lib=
    15661691        found=no
    1567         case "$deplib" in
     1692        case $deplib in
    15681693        -l*)
    1569           if test $linkmode != lib && test $linkmode != prog; then
    1570             $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
     1694          if test $linkmode = oldlib && test $linkmode = obj; then
     1695            $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
    15711696            continue
    15721697          fi
     
    15851710          done
    15861711          if test "$found" != yes; then
     1712            # deplib doesn't seem to be a libtool library
    15871713            if test "$linkmode,$pass" = "prog,link"; then
    15881714              compile_deplibs="$deplib $compile_deplibs"
     
    15941720            continue
    15951721          fi
    1596           ;;
     1722          ;; # -l
    15971723        -L*)
    15981724          case $linkmode in
     
    16171743            ;;
    16181744          *)
    1619             $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
     1745            $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
    16201746            ;;
    1621           esac
     1747          esac # linkmode
    16221748          continue
    1623           ;;
     1749          ;; # -L
    16241750        -R*)
    16251751          if test $pass = link; then
     
    16651791            continue
    16661792            ;;
    1667           esac
    1668           ;;
     1793          esac # linkmode
     1794          ;; # *.$libext
    16691795        *.lo | *.$objext)
    1670           if test $pass = conv; then
    1671             deplibs="$deplib $deplibs"
    1672           elif test $linkmode = prog; then
    1673             if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
    1674               # If there is no dlopen support or we're linking statically,
    1675               # we need to preload.
    1676               newdlprefiles="$newdlprefiles $deplib"
    1677               compile_deplibs="$deplib $compile_deplibs"
    1678               finalize_deplibs="$deplib $finalize_deplibs"
    1679             else
    1680               newdlfiles="$newdlfiles $deplib"
    1681             fi
     1796          if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
     1797            # If there is no dlopen support or we're linking statically,
     1798            # we need to preload.
     1799            newdlprefiles="$newdlprefiles $deplib"
     1800            compile_deplibs="$deplib $compile_deplibs"
     1801            finalize_deplibs="$deplib $finalize_deplibs"
     1802          else
     1803            newdlfiles="$newdlfiles $deplib"
    16821804          fi
    16831805          continue
     
    16871809          continue
    16881810          ;;
    1689         esac
     1811        esac # case $deplib
    16901812        if test $found = yes || test -f "$lib"; then :
    16911813        else
     
    17151837
    17161838        # Read the .la file
    1717         case "$lib" in
     1839        case $lib in
    17181840        */* | *\\*) . $lib ;;
    17191841        *) . ./$lib ;;
     
    17221844        if test "$linkmode,$pass" = "lib,link" ||
    17231845           test "$linkmode,$pass" = "prog,scan" ||
    1724            { test $linkmode != prog && test $linkmode != lib; }; then
     1846           { test $linkmode = oldlib && test $linkmode = obj; }; then
     1847           # Add dl[pre]opened files of deplib
    17251848          test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
    17261849          test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
     
    17281851
    17291852        if test $pass = conv; then
    1730           # only check for convenience libraries
     1853          # Only check for convenience libraries
    17311854          deplibs="$lib $deplibs"
    17321855          if test -z "$libdir"; then
     
    17511874          fi
    17521875          continue
    1753         fi
     1876        fi # $pass = conv
    17541877
    17551878        # Get the name of the library we link against.
     
    17701893          fi
    17711894          if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
    1772             # If there is no dlname, no dlopen support or we're linking statically,
    1773             # we need to preload.
     1895            # If there is no dlname, no dlopen support or we're linking
     1896            # statically, we need to preload.
    17741897            dlprefiles="$dlprefiles $lib"
    17751898          else
     
    17771900          fi
    17781901          continue
    1779         fi
     1902        fi # $pass = dlopen
    17801903
    17811904        # We need an absolute path.
    1782         case "$ladir" in
     1905        case $ladir in
    17831906        [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
    17841907        *)
     
    18081931          absdir="$abs_ladir/$objdir"
    18091932          # Remove this search path later
    1810           uninst_path="$uninst_path $abs_ladir"
    1811         fi
     1933          notinst_path="$notinst_path $abs_ladir"
     1934        fi # $installed = yes
    18121935        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
    18131936
     
    18281951            newdlprefiles="$newdlprefiles $dir/$linklib"
    18291952          fi
    1830         fi
     1953        fi # $pass = dlpreopen
    18311954
    18321955        if test -z "$libdir"; then
    1833           # link the convenience library
     1956          # Link the convenience library
    18341957          if test $linkmode = lib; then
    18351958            deplibs="$dir/$old_library $deplibs"
     
    18381961            finalize_deplibs="$dir/$old_library $finalize_deplibs"
    18391962          else
    1840             deplibs="$lib $deplibs" # used for prog,scan pass
     1963            deplibs="$lib $deplibs"
    18411964          fi
    18421965          continue
     
    18551978          tmp_libs=
    18561979          for deplib in $dependency_libs; do
    1857             case "$deplib" in
     1980            case $deplib in
    18581981            -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
    18591982            esac
     
    18701993            esac
    18711994            tmp_libs="$tmp_libs $deplib"
    1872           done
     1995          done # for deplib
    18731996          continue
    1874         fi
    1875 
    1876         if test "$linkmode,$pass" = "prog,link"; then
    1877           if test -n "$library_names" &&
    1878              { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
    1879             # We need to hardcode the library path
    1880             if test -n "$shlibpath_var"; then
    1881               # Make sure the rpath contains only unique directories.
    1882               case "$temp_rpath " in
    1883               *" $dir "*) ;;
    1884               *" $absdir "*) ;;
    1885               *) temp_rpath="$temp_rpath $dir" ;;
    1886               esac
    1887             fi
    1888 
    1889             # Hardcode the library path.
    1890             # Skip directories that are in the system default run-time
    1891             # search path.
    1892             case " $sys_lib_dlsearch_path " in
    1893             *" $absdir "*) ;;
    1894             *)
    1895               case "$compile_rpath " in
    1896               *" $absdir "*) ;;
    1897               *) compile_rpath="$compile_rpath $absdir"
    1898               esac
    1899               ;;
    1900             esac
    1901 
    1902             case " $sys_lib_dlsearch_path " in
    1903             *" $libdir "*) ;;
    1904             *)
    1905               case "$finalize_rpath " in
    1906               *" $libdir "*) ;;
    1907               *) finalize_rpath="$finalize_rpath $libdir"
    1908               esac
    1909               ;;
    1910             esac
    1911           fi
    1912 
    1913           if test "$alldeplibs" = yes &&
    1914              { test "$deplibs_check_method" = pass_all ||
    1915                { test "$build_libtool_libs" = yes &&
    1916                  test -n "$library_names"; }; }; then
    1917             # We only need to search for static libraries
    1918             continue
    1919           fi
    1920         fi
     1997        fi # $linkmode = prog...
    19211998
    19221999        link_static=no # Whether the deplib will be linked statically
    19232000        if test -n "$library_names" &&
    19242001           { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
    1925           if test "$installed" = no; then
    1926             uninst_deplibs="$uninst_deplibs $lib"
    1927             need_relink=yes
    1928           fi
    1929           # This is a shared library
    1930           if test $linkmode = lib &&
    1931              test $hardcode_into_libs = yes; then
     2002          # Link against this shared library
     2003
     2004          if test "$linkmode,$pass" = "prog,link" ||
     2005           { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
    19322006            # Hardcode the library path.
    19332007            # Skip directories that are in the system default run-time
     
    19512025              ;;
    19522026            esac
     2027            if test $linkmode = prog; then
     2028              # We need to hardcode the library path
     2029              if test -n "$shlibpath_var"; then
     2030                # Make sure the rpath contains only unique directories.
     2031                case "$temp_rpath " in
     2032                *" $dir "*) ;;
     2033                *" $absdir "*) ;;
     2034                *) temp_rpath="$temp_rpath $dir" ;;
     2035                esac
     2036              fi
     2037            fi
     2038          fi # $linkmode,$pass = prog,link...
     2039
     2040          if test "$alldeplibs" = yes &&
     2041             { test "$deplibs_check_method" = pass_all ||
     2042               { test "$build_libtool_libs" = yes &&
     2043                 test -n "$library_names"; }; }; then
     2044            # We only need to search for static libraries
     2045            continue
     2046          fi
     2047
     2048          if test "$installed" = no; then
     2049            notinst_deplibs="$notinst_deplibs $lib"
     2050            need_relink=yes
    19532051          fi
    19542052
     
    19592057            shift; shift
    19602058            libname=`eval \\$echo \"$libname_spec\"`
    1961             if test -n "$soname_spec"; then
     2059            # use dlname if we got it. it's perfectly good, no?
     2060            if test -n "$dlname"; then
     2061              soname="$dlname"
     2062            elif test -n "$soname_spec"; then
     2063              # bleh windows
     2064              case $host in
     2065              *cygwin*)
     2066                major=`expr $current - $age`
     2067                versuffix="-$major"
     2068                ;;
     2069              esac
    19622070              eval soname=\"$soname_spec\"
    19632071            else
     
    19662074
    19672075            # Make a new name for the extract_expsyms_cmds to use
     2076            soroot="$soname"
     2077            soname=`echo $soroot | sed -e 's/^.*\///'`
    19682078            newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
    19692079
     
    19972107            dir=$output_objdir
    19982108            linklib=$newlib
    1999           fi
     2109          fi # test -n $old_archive_from_expsyms_cmds
    20002110
    20012111          if test $linkmode = prog || test "$mode" != relink; then
     
    20042114            add=
    20052115            lib_linked=yes
    2006             case "$hardcode_action" in
     2116            case $hardcode_action in
    20072117            immediate | unsupported)
    20082118              if test "$hardcode_direct" = no; then
    20092119                add="$dir/$linklib"
    20102120              elif test "$hardcode_minus_L" = no; then
    2011                 case "$host" in
     2121                case $host in
    20122122                *-*-sunos*) add_shlibpath="$dir" ;;
    20132123                esac
     
    20432153
    20442154            if test -n "$add_shlibpath"; then
    2045               case ":$compile_shlibpath:" in
     2155              case :$compile_shlibpath: in
    20462156              *":$add_shlibpath:"*) ;;
    20472157              *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
     
    20572167                 test "$hardcode_minus_L" != yes && \
    20582168                 test "$hardcode_shlibpath_var" = yes; then
    2059                 case ":$finalize_shlibpath:" in
     2169                case :$finalize_shlibpath: in
    20602170                *":$libdir:"*) ;;
    20612171                *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
     
    20762186              add="-l$name"
    20772187            elif test "$hardcode_shlibpath_var" = yes; then
    2078               case ":$finalize_shlibpath:" in
     2188              case :$finalize_shlibpath: in
    20792189              *":$libdir:"*) ;;
    20802190              *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
     
    20962206          fi
    20972207        elif test $linkmode = prog; then
     2208          if test "$alldeplibs" = yes &&
     2209             { test "$deplibs_check_method" = pass_all ||
     2210               { test "$build_libtool_libs" = yes &&
     2211                 test -n "$library_names"; }; }; then
     2212            # We only need to search for static libraries
     2213            continue
     2214          fi
     2215
     2216          # Try to link the static library
    20982217          # Here we assume that one of hardcode_direct or hardcode_minus_L
    20992218          # is not unsupported.  This is valid on all known static and
     
    21122231            # We're trying link a shared library against a static one
    21132232            # but the system doesn't support it.
     2233
    21142234            # Just print a warning and add the library to dependency_libs so
    21152235            # that the program can be linked against the static library.
     
    21192239            echo "*** you link to this library.  But I can only do this if you have a"
    21202240            echo "*** shared version of the library, which you do not appear to have."
     2241            if test "$module" = yes; then
     2242              echo "*** Therefore, libtool will create a static module, that should work "
     2243              echo "*** as long as the dlopening application is linked with the -dlopen flag."
     2244              if test -z "$global_symbol_pipe"; then
     2245                echo
     2246                echo "*** However, this would only work if libtool was able to extract symbol"
     2247                echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
     2248                echo "*** not find such a program.  So, this module is probably useless."
     2249                echo "*** \`nm' from GNU binutils and a full rebuild may help."
     2250              fi
     2251              if test "$build_old_libs" = no; then
     2252                build_libtool_libs=module
     2253                build_old_libs=yes
     2254              else
     2255                build_libtool_libs=no
     2256              fi
     2257            fi
    21212258          else
    21222259            convenience="$convenience $dir/$old_library"
     
    21252262            link_static=yes
    21262263          fi
    2127         fi
     2264        fi # link shared/static library?
    21282265
    21292266        if test $linkmode = lib; then
     
    21342271            temp_deplibs=
    21352272            for libdir in $dependency_libs; do
    2136               case "$libdir" in
     2273              case $libdir in
    21372274              -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
    21382275                   case " $xrpath " in
     
    21622299            # Add the search paths of all dependency libraries
    21632300            for deplib in $dependency_libs; do
    2164               case "$deplib" in
     2301              case $deplib in
    21652302              -L*) path="$deplib" ;;
    21662303              *.la)
     
    21682305                test "X$dir" = "X$deplib" && dir="."
    21692306                # We need an absolute path.
    2170                 case "$dir" in
     2307                case $dir in
    21712308                [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
    21722309                *)
     
    21992336              esac
    22002337            done
    2201           fi
    2202         fi
    2203       done
    2204       dependency_libs="$newdependency_libs"
     2338          fi # link_all_deplibs != no
     2339        fi # linkmode = lib
     2340      done # for deplib in $libs
    22052341      if test $pass = dlpreopen; then
    22062342        # Link the dlpreopened libraries before other libraries
     
    22102346      fi
    22112347      if test $pass != dlopen; then
     2348        test $pass != scan && dependency_libs="$newdependency_libs"
    22122349        if test $pass != conv; then
    22132350          # Make sure lib_search_path contains only unique directories.
     
    22282365        fi
    22292366        for var in $vars dependency_libs; do
    2230           # Make sure that $var contains only unique libraries
    2231           # and add them in reverse order
     2367          # Add libraries to $var in reverse order
    22322368          eval tmp_libs=\"\$$var\"
    22332369          new_libs=
    22342370          for deplib in $tmp_libs; do
    2235             case "$deplib" in
     2371            case $deplib in
    22362372            -L*) new_libs="$deplib $new_libs" ;;
    22372373            *)
     
    22502386          tmp_libs=
    22512387          for deplib in $new_libs; do
    2252             case "$deplib" in
     2388            case $deplib in
    22532389            -L*)
    22542390              case " $tmp_libs " in
     
    22612397          done
    22622398          eval $var=\"$tmp_libs\"
    2263         done
    2264       fi
    2265     done
     2399        done # for var
     2400      fi
     2401      if test "$pass" = "conv" &&
     2402       { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
     2403        libs="$deplibs" # reset libs
     2404        deplibs=
     2405      fi
     2406    done # for pass
    22662407    if test $linkmode = prog; then
    22672408      dlfiles="$newdlfiles"
     
    22712412    case $linkmode in
    22722413    oldlib)
    2273       if test -n "$deplibs"; then
    2274         $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
    2275       fi
    2276 
    22772414      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
    22782415        $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
     
    23072444    lib)
    23082445      # Make sure we only generate libraries of the form `libNAME.la'.
    2309       case "$outputname" in
     2446      case $outputname in
    23102447      lib*)
    23112448        name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
     
    23872524
    23882525        # Check that each of the things are valid numbers.
    2389         case "$current" in
    2390         0 | [1-9] | [1-9][0-9]*) ;;
     2526        case $current in
     2527        0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
    23912528        *)
    23922529          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
     
    23962533        esac
    23972534
    2398         case "$revision" in
    2399         0 | [1-9] | [1-9][0-9]*) ;;
     2535        case $revision in
     2536        0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
    24002537        *)
    24012538          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
     
    24052542        esac
    24062543
    2407         case "$age" in
    2408         0 | [1-9] | [1-9][0-9]*) ;;
     2544        case $age in
     2545        0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
    24092546        *)
    24102547          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
     
    24242561        versuffix=
    24252562        verstring=
    2426         case "$version_type" in
     2563        case $version_type in
    24272564        none) ;;
     2565
     2566        darwin)
     2567          # Like Linux, but with the current version available in
     2568          # verstring for coding it into the library header
     2569          major=.`expr $current - $age`
     2570          versuffix="$major.$age.$revision"
     2571          # Darwin ld doesn't like 0 for these options...
     2572          minor_current=`expr $current + 1`
     2573          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
     2574          ;;
     2575
     2576        freebsd-aout)
     2577          major=".$current"
     2578          versuffix=".$current.$revision";
     2579          ;;
     2580
     2581        freebsd-elf)
     2582          major=".$current"
     2583          versuffix=".$current";
     2584          ;;
    24282585
    24292586        irix)
     
    24692626          major=".$current"
    24702627          versuffix=".$current.$revision"
    2471           ;;
    2472 
    2473         freebsd-aout)
    2474           major=".$current"
    2475           versuffix=".$current.$revision";
    2476           ;;
    2477 
    2478         freebsd-elf)
    2479           major=".$current"
    2480           versuffix=".$current";
    24812628          ;;
    24822629
     
    25322679        tempremovelist=`echo "$output_objdir/*"`
    25332680        for p in $tempremovelist; do
    2534           case "$p" in
     2681          case $p in
    25352682            *.$objext)
    25362683               ;;
     
    25562703
    25572704      # Eliminate all temporary directories.
    2558       for path in $uninst_path; do
     2705      for path in $notinst_path; do
    25592706        lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
    25602707        deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
     
    25992746      if test "$build_libtool_libs" = yes; then
    26002747        if test -n "$rpath"; then
    2601           case "$host" in
     2748          case $host in
    26022749          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
    26032750            # these systems don't actually have a c library (as such)!
    26042751            ;;
     2752          *-*-rhapsody* | *-*-darwin1.[012])
     2753            # Rhapsody C library is in the System framework
     2754            deplibs="$deplibs -framework System"
     2755            ;;
     2756          *-*-netbsd*)
     2757            # Don't link with libc until the a.out ld.so is fixed.
     2758            ;;
    26052759          *)
    2606             # Add libc to deplibs on all other systems if necessary.
    2607             if test $build_libtool_need_lc = "yes"; then
    2608               deplibs="$deplibs -lc"
    2609             fi
     2760            # Add libc to deplibs on all other systems if necessary.
     2761            if test $build_libtool_need_lc = "yes"; then
     2762              deplibs="$deplibs -lc"
     2763            fi
    26102764            ;;
    26112765          esac
     
    26262780        newdeplibs=
    26272781        droppeddeps=no
    2628         case "$deplibs_check_method" in
     2782        case $deplibs_check_method in
    26292783        pass_all)
    26302784          # Don't check for shared/static.  Everything works.
     
    26512805              name="`expr $i : '-l\(.*\)'`"
    26522806              # If $name is empty we are operating on a -L argument.
    2653               if test "$name" != "" ; then
     2807              if test -n "$name" && test "$name" != "0"; then
    26542808                libname=`eval \\$echo \"$libname_spec\"`
    26552809                deplib_matches=`eval \\$echo \"$library_names_spec\"`
     
    26762830              name="`expr $i : '-l\(.*\)'`"
    26772831             # If $name is empty we are operating on a -L argument.
    2678               if test "$name" != "" ; then
     2832              if test -n "$name" && test "$name" != "0"; then
    26792833                $rm conftest
    26802834                $LTCC -o conftest conftest.c $i
     
    27162870            name="`expr $a_deplib : '-l\(.*\)'`"
    27172871            # If $name is empty we are operating on a -L argument.
    2718             if test "$name" != "" ; then
     2872            if test -n "$name" && test "$name" != "0"; then
    27192873              libname=`eval \\$echo \"$libname_spec\"`
    27202874              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
     
    27342888                      while test -h "$potlib" 2>/dev/null; do
    27352889                        potliblink=`ls -ld $potlib | sed 's/.* -> //'`
    2736                         case "$potliblink" in
     2890                        case $potliblink in
    27372891                        [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
    27382892                        *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
     
    27472901                      fi
    27482902                    done
     2903              done
     2904              if test -n "$a_deplib" ; then
     2905                droppeddeps=yes
     2906                echo
     2907                echo "*** Warning: This library needs some functionality provided by $a_deplib."
     2908                echo "*** I have the capability to make that library automatically link in when"
     2909                echo "*** you link to this library.  But I can only do this if you have a"
     2910                echo "*** shared version of the library, which you do not appear to have."
     2911              fi
     2912            else
     2913              # Add a -L argument.
     2914              newdeplibs="$newdeplibs $a_deplib"
     2915            fi
     2916          done # Gone through all deplibs.
     2917          ;;
     2918        match_pattern*)
     2919          set dummy $deplibs_check_method
     2920          match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
     2921          for a_deplib in $deplibs; do
     2922            name="`expr $a_deplib : '-l\(.*\)'`"
     2923            # If $name is empty we are operating on a -L argument.
     2924            if test -n "$name" && test "$name" != "0"; then
     2925              libname=`eval \\$echo \"$libname_spec\"`
     2926              for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
     2927                potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
     2928                for potent_lib in $potential_libs; do
     2929                  if eval echo \"$potent_lib\" 2>/dev/null \
     2930                      | sed 10q \
     2931                      | egrep "$match_pattern_regex" > /dev/null; then
     2932                    newdeplibs="$newdeplibs $a_deplib"
     2933                    a_deplib=""
     2934                    break 2
     2935                  fi
     2936                done
    27492937              done
    27502938              if test -n "$a_deplib" ; then
     
    27842972        name=$name_save
    27852973
     2974        case $host in
     2975        *-*-rhapsody* | *-*-darwin1.[012])
     2976          # On Rhapsody replace the C library is the System framework
     2977          newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
     2978          ;;
     2979        esac
     2980
    27862981        if test "$droppeddeps" = yes; then
    27872982          if test "$module" = yes; then
     
    28093004            echo "*** automatically added whenever a program is linked with this library"
    28103005            echo "*** or is declared to -dlopen it."
     3006
     3007            if test $allow_undefined = no; then
     3008              echo
     3009              echo "*** Since this library must not contain undefined symbols,"
     3010              echo "*** because either the platform does not support them or"
     3011              echo "*** it was explicitly requested with -no-undefined,"
     3012              echo "*** libtool will only create a static version of it."
     3013              if test "$build_old_libs" = no; then
     3014                oldlibs="$output_objdir/$libname.$libext"
     3015                build_libtool_libs=module
     3016                build_old_libs=yes
     3017              else
     3018                build_libtool_libs=no
     3019              fi
     3020            fi
    28113021          fi
    28123022        fi
     
    28353045                else
    28363046                  # Just accumulate the unique libdirs.
    2837                   case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
     3047                  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
    28383048                  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
    28393049                    ;;
     
    28883098          soname="$realname"
    28893099        fi
     3100        test -z "$dlname" && dlname=$soname
    28903101
    28913102        lib="$output_objdir/$realname"
     
    29443155        if test -n "$convenience"; then
    29453156          if test -n "$whole_archive_flag_spec"; then
     3157            save_libobjs=$libobjs
    29463158            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
    29473159          else
     
    29593171            for xlib in $convenience; do
    29603172              # Extract the objects.
    2961               case "$xlib" in
     3173              case $xlib in
    29623174              [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    29633175              *) xabs=`pwd`"/$xlib" ;;
     
    29983210          eval cmds=\"$archive_cmds\"
    29993211        fi
    3000         IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
    3001         for cmd in $cmds; do
    3002           IFS="$save_ifs"
    3003           $show "$cmd"
    3004           $run eval "$cmd" || exit $?
    3005         done
    3006         IFS="$save_ifs"
     3212        if len=`expr "X$cmds" : ".*"` &&
     3213           test $len -le $max_cmd_len; then
     3214          :
     3215        else
     3216          # The command line is too long to link in one step, link piecewise.
     3217          $echo "creating reloadable object files..."
     3218
     3219          # Save the value of $output and $libobjs because we want to
     3220          # use them later.  If we have whole_archive_flag_spec, we
     3221          # want to use save_libobjs as it was before
     3222          # whole_archive_flag_spec was expanded, because we can't
     3223          # assume the linker understands whole_archive_flag_spec.
     3224          # This may have to be revisited, in case too many
     3225          # convenience libraries get linked in and end up exceeding
     3226          # the spec.
     3227          if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
     3228            save_libobjs=$libobjs
     3229          fi
     3230          save_output=$output
     3231
     3232          # Clear the reloadable object creation command queue and
     3233          # initialize k to one.
     3234          test_cmds=
     3235          concat_cmds=
     3236          objlist=
     3237          delfiles=
     3238          last_robj=
     3239          k=1
     3240          output=$output_objdir/$save_output-${k}.$objext
     3241          # Loop over the list of objects to be linked.
     3242          for obj in $save_libobjs
     3243          do
     3244            eval test_cmds=\"$reload_cmds $objlist $last_robj\"
     3245            if test "X$objlist" = X ||
     3246               { len=`expr "X$test_cmds" : ".*"` &&
     3247                 test $len -le $max_cmd_len; }; then
     3248              objlist="$objlist $obj"
     3249            else
     3250              # The command $test_cmds is almost too long, add a
     3251              # command to the queue.
     3252              if test $k -eq 1 ; then
     3253                # The first file doesn't have a previous command to add.
     3254                eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
     3255              else
     3256                # All subsequent reloadable object files will link in
     3257                # the last one created.
     3258                eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
     3259              fi
     3260              last_robj=$output_objdir/$save_output-${k}.$objext
     3261              k=`expr $k + 1`
     3262              output=$output_objdir/$save_output-${k}.$objext
     3263              objlist=$obj
     3264              len=1
     3265            fi
     3266          done
     3267          # Handle the remaining objects by creating one last
     3268          # reloadable object file.  All subsequent reloadable object
     3269          # files will link in the last one created.
     3270          test -z "$concat_cmds" || concat_cmds=$concat_cmds~
     3271          eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
     3272
     3273          # Set up a command to remove the reloadale object files
     3274          # after they are used.
     3275          i=0
     3276          while test $i -lt $k
     3277          do
     3278            i=`expr $i + 1`
     3279            delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
     3280          done
     3281
     3282          $echo "creating a temporary reloadable object file: $output"
     3283
     3284          # Loop through the commands generated above and execute them.
     3285          IFS="${IFS=   }"; save_ifs="$IFS"; IFS='~'
     3286          for cmd in $concat_cmds; do
     3287            IFS="$save_ifs"
     3288            $show "$cmd"
     3289            $run eval "$cmd" || exit $?
     3290          done
     3291          IFS="$save_ifs"
     3292
     3293          libobjs=$output
     3294          # Restore the value of output.
     3295          output=$save_output
     3296
     3297          if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
     3298            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
     3299          fi
     3300          # Expand the library linking commands again to reset the
     3301          # value of $libobjs for piecewise linking.
     3302
     3303          # Do each of the archive commands.
     3304          if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
     3305            eval cmds=\"$archive_expsym_cmds\"
     3306          else
     3307            eval cmds=\"$archive_cmds\"
     3308          fi
     3309
     3310          # Append the command to remove the reloadable object files
     3311          # to the just-reset $cmds.
     3312          eval cmds=\"\$cmds~$rm $delfiles\"
     3313        fi
     3314        IFS="${IFS=     }"; save_ifs="$IFS"; IFS='~'
     3315        for cmd in $cmds; do
     3316          IFS="$save_ifs"
     3317          $show "$cmd"
     3318          $run eval "$cmd" || exit $?
     3319        done
     3320        IFS="$save_ifs"
    30073321
    30083322        # Restore the uninstalled library and exit
     
    30533367      fi
    30543368
    3055       case "$output" in
     3369      case $output in
    30563370      *.lo)
    30573371        if test -n "$objs$old_deplibs"; then
     
    30983412          for xlib in $convenience; do
    30993413            # Extract the objects.
    3100             case "$xlib" in
     3414            case $xlib in
    31013415            [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    31023416            *) xabs=`pwd`"/$xlib" ;;
     
    31943508
    31953509    prog)
     3510      case $host in
     3511        *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
     3512      esac
    31963513      if test -n "$vinfo"; then
    31973514        $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
     
    32083525        fi
    32093526      fi
     3527
     3528      case $host in
     3529      *-*-rhapsody* | *-*-darwin1.[012])
     3530        # On Rhapsody replace the C library is the System framework
     3531        compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
     3532        finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
     3533        ;;
     3534      esac
    32103535
    32113536      compile_command="$compile_command $compile_deplibs"
     
    32333558            else
    32343559              # Just accumulate the unique libdirs.
    3235               case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
     3560              case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
    32363561              *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
    32373562                ;;
     
    32513576          esac
    32523577        fi
    3253         case "$host" in
     3578        case $host in
    32543579        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
    3255           case ":$dllsearchpath:" in
     3580          case :$dllsearchpath: in
    32563581          *":$libdir:"*) ;;
    32573582          *) dllsearchpath="$dllsearchpath:$libdir";;
     
    32773602            else
    32783603              # Just accumulate the unique libdirs.
    3279               case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
     3604              case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
    32803605              *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
    32813606                ;;
     
    33143639
    33153640      if test -n "$dlsyms"; then
    3316         case "$dlsyms" in
     3641        case $dlsyms in
    33173642        "") ;;
    33183643        *.c)
     
    34453770
    34463771          pic_flag_for_symtable=
    3447           case "$host" in
     3772          case $host in
    34483773          # compiling the symbol table file with pic_flag works around
    34493774          # a FreeBSD bug that causes programs to crash when -lm is
     
    35133838        rpath=
    35143839        for dir in $temp_rpath; do
    3515           case "$dir" in
     3840          case $dir in
    35163841          [\\/]* | [A-Za-z]:[\\/]*)
    35173842            # Absolute path.
     
    36213946      # Quote $echo for shipping.
    36223947      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
    3623         case "$0" in
     3948        case $0 in
    36243949        [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
    36253950        *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
     
    36363961        case $output in
    36373962          *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
     3963        esac
     3964        # test for cygwin because mv fails w/o .exe extensions
     3965        case $host in
     3966          *cygwin*) exeext=.exe ;;
     3967          *) exeext= ;;
    36383968        esac
    36393969        $rm $output
     
    36663996if test \"\$libtool_install_magic\" = \"$magic\"; then
    36673997  # install mode needs the following variable:
    3668   uninst_deplibs='$uninst_deplibs'
     3998  notinst_deplibs='$notinst_deplibs'
    36693999else
    36704000  # When we are sourced in execute mode, \$file and \$echo are already set.
     
    37154045        if test "$fast_install" = yes; then
    37164046          echo >> $output "\
    3717   program=lt-'$outputname'
     4047  program=lt-'$outputname'$exeext
    37184048  progdir=\"\$thisdir/$objdir\"
    37194049
     
    37344064    # relink executable if necessary
    37354065    if test -n \"\$relink_command\"; then
    3736       if (eval \$relink_command); then :
     4066      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
    37374067      else
     4068        $echo \"\$relink_command_output\" >&2
    37384069        $rm \"\$progdir/\$file\"
    37394070        exit 1
     
    38604191        for xlib in $addlibs; do
    38614192          # Extract the objects.
    3862           case "$xlib" in
     4193          case $xlib in
    38634194          [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    38644195          *) xabs=`pwd`"/$xlib" ;;
     
    39044235#       done
    39054236
    3906         eval cmds=\"$old_archive_cmds\"
     4237        eval cmds=\"$old_archive_cmds\"
     4238
     4239        if len=`expr "X$cmds" : ".*"` &&
     4240             test $len -le $max_cmd_len; then
     4241          :
     4242        else
     4243          # the command line is too long to link in one step, link in parts
     4244          $echo "using piecewise archive linking..."
     4245          save_RANLIB=$RANLIB
     4246          RANLIB=:
     4247          objlist=
     4248          concat_cmds=
     4249          save_oldobjs=$oldobjs
     4250          for obj in $save_oldobjs
     4251          do
     4252            oldobjs="$objlist $obj"
     4253            objlist="$objlist $obj"
     4254            eval test_cmds=\"$old_archive_cmds\"
     4255            if len=`expr "X$test_cmds" : ".*"` &&
     4256               test $len -le $max_cmd_len; then
     4257              :
     4258            else
     4259              # the above command should be used before it gets too long
     4260              oldobjs=$objlist
     4261              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
     4262              eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
     4263              objlist=
     4264            fi
     4265          done
     4266          RANLIB=$save_RANLIB
     4267          oldobjs=$objlist
     4268          eval cmds=\"\$concat_cmds~$old_archive_cmds\"
     4269        fi
    39074270      fi
    39084271      IFS="${IFS=       }"; save_ifs="$IFS"; IFS='~'
     
    39214284
    39224285    # Now create the libtool archive.
    3923     case "$output" in
     4286    case $output in
    39244287    *.la)
    39254288      old_library=
     
    39394302      done
    39404303      # Quote the link command for shipping.
    3941       relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
     4304      tagopts=
     4305      for tag in $taglist; do
     4306        tagopts="$tagopts --tag $tag"
     4307      done
     4308      relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)"
    39424309      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
    39434310
     
    39534320            newdependency_libs=
    39544321            for deplib in $dependency_libs; do
    3955               case "$deplib" in
     4322              case $deplib in
    39564323              *.la)
    39574324                name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
     
    39914358          fi
    39924359          $rm $output
     4360          # place dlname in correct position for cygwin
     4361          tdlname=$dlname
     4362          case $host,$output,$installed,$module,$dlname in
     4363            *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
     4364          esac
    39934365          $echo > $output "\
    39944366# $outputname - a libtool library file
     
    39994371
    40004372# The name that we can dlopen(3).
    4001 dlname='$dlname'
     4373dlname='$tdlname'
    40024374
    40034375# Names of this library.
     
    40514423      # Aesthetically quote it.
    40524424      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
    4053       case "$arg" in
     4425      case $arg in
    40544426      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
    40554427        arg="\"$arg\""
     
    40674439    # Aesthetically quote it.
    40684440    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    4069     case "$arg" in
     4441    case $arg in
    40704442    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*)
    40714443      arg="\"$arg\""
     
    40904462      fi
    40914463
    4092       case "$arg" in
     4464      case $arg in
    40934465      -d) isdir=yes ;;
    40944466      -f) prev="-f" ;;
     
    41154487      # Aesthetically quote the argument.
    41164488      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
    4117       case "$arg" in
     4489      case $arg in
    41184490      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
    41194491        arg="\"$arg\""
     
    41664538      fi
    41674539    fi
    4168     case "$destdir" in
     4540    case $destdir in
    41694541    [\\/]* | [A-Za-z]:[\\/]*) ;;
    41704542    *)
    41714543      for file in $files; do
    4172         case "$file" in
     4544        case $file in
    41734545        *.lo) ;;
    41744546        *)
     
    41924564
    41934565      # Do each installation.
    4194       case "$file" in
     4566      case $file in
    41954567      *.$libext)
    41964568        # Do the static libraries later.
     
    42114583        relink_command=
    42124584        # If there is no directory component, then add one.
    4213         case "$file" in
     4585        case $file in
    42144586        */* | *\\*) . $file ;;
    42154587        *) . ./$file ;;
     
    42404612          else
    42414613            $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
    4242             continue
     4614            exit 1
    42434615          fi
    42444616        fi
     
    43074679
    43084680        # Deduce the name of the destination old-style object file.
    4309         case "$destfile" in
     4681        case $destfile in
    43104682        *.lo)
    43114683          staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
     
    43504722        # Do a test to see if this is really a libtool program.
    43514723        if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    4352           uninst_deplibs=
     4724          notinst_deplibs=
    43534725          relink_command=
    43544726
    43554727          # If there is no directory component, then add one.
    4356           case "$file" in
     4728          case $file in
    43574729          */* | *\\*) . $file ;;
    43584730          *) . ./$file ;;
     
    43604732
    43614733          # Check the variables that should have been set.
    4362           if test -z "$uninst_deplibs"; then
     4734          if test -z "$notinst_deplibs"; then
    43634735            $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
    43644736            exit 1
     
    43664738
    43674739          finalize=yes
    4368           for lib in $uninst_deplibs; do
     4740          for lib in $notinst_deplibs; do
    43694741            # Check to see that each library is installed.
    43704742            libdir=
    43714743            if test -f "$lib"; then
    43724744              # If there is no directory component, then add one.
    4373               case "$lib" in
     4745              case $lib in
    43744746              */* | *\\*) . $lib ;;
    43754747              *) . ./$lib ;;
     
    43854757          relink_command=
    43864758          # If there is no directory component, then add one.
    4387           case "$file" in
     4759          case $file in
    43884760          */* | *\\*) . $file ;;
    43894761          *) . ./$file ;;
     
    44234795        fi
    44244796
     4797
     4798        # remove .exe since cygwin /usr/bin/install will append another
     4799        # one anyways
     4800        case $install_prog,$host in
     4801        */usr/bin/install*,*cygwin*)
     4802          case $file:$destfile in
     4803          *.exe:*.exe)
     4804            # this is ok
     4805            ;;
     4806          *.exe:*)
     4807            destfile=$destfile.exe
     4808            ;;
     4809          *:*.exe)
     4810            destfile=`echo $destfile | sed -e 's,.exe$,,'`
     4811            ;;
     4812          esac
     4813          ;;
     4814        esac
     4815
    44254816        $show "$install_prog$stripme $file $destfile"
    44264817        $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
     
    44624853      # Maybe just do a dry run.
    44634854      test -n "$run" && current_libdirs=" -n$current_libdirs"
    4464       exec $SHELL $0 --finish$current_libdirs
    4465       exit 1
     4855      exec_cmd='$SHELL $0 --finish$current_libdirs'
     4856    else
     4857      exit 0
    44664858    fi
    4467 
    4468     exit 0
    44694859    ;;
    44704860
     
    45044894
    45054895    # Exit here if they wanted silent mode.
    4506     test "$show" = : && exit 0
     4896    test "$show" = ":" && exit 0
    45074897
    45084898    echo "----------------------------------------------------------------------"
     
    45144904    echo "If you ever happen to want to link against installed libraries"
    45154905    echo "in a given directory, LIBDIR, you must either use libtool, and"
    4516     echo "specify the full pathname of the library, or use \`-LLIBDIR'"
     4906    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
    45174907    echo "flag during linking and do at least one of the following:"
    45184908    if test -n "$shlibpath_var"; then
     
    45644954
    45654955      dir=
    4566       case "$file" in
     4956      case $file in
    45674957      *.la)
    45684958        # Check to see that this really is a libtool archive.
     
    45794969
    45804970        # If there is no directory component, then add one.
    4581         case "$file" in
     4971        case $file in
    45824972        */* | *\\*) . $file ;;
    45834973        *) . ./$file ;;
     
    46345024    for file
    46355025    do
    4636       case "$file" in
     5026      case $file in
    46375027      -*) ;;
    46385028      *)
     
    46405030        if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    46415031          # If there is no directory component, then add one.
    4642           case "$file" in
     5032          case $file in
    46435033          */* | *\\*) . $file ;;
    46445034          *) . ./$file ;;
     
    46695059      fi
    46705060
    4671       # Now actually exec the command.
    4672       eval "exec \$cmd$args"
    4673 
    4674       $echo "$modename: cannot exec \$cmd$args"
    4675       exit 1
     5061      # Now prepare to actually exec the command.
     5062      exec_cmd='"$cmd"$args'
    46765063    else
    46775064      # Display what would be done.
     
    46905077    rm="$nonopt"
    46915078    files=
     5079    rmforce=
     5080    exit_status=0
    46925081
    46935082    # This variable tells wrapper scripts just to set variables rather
     
    46975086    for arg
    46985087    do
    4699       case "$arg" in
     5088      case $arg in
     5089      -f) rm="$rm $arg"; rmforce=yes ;;
    47005090      -*) rm="$rm $arg" ;;
    47015091      *) files="$files $arg" ;;
     
    47085098      exit 1
    47095099    fi
     5100
     5101    rmdirs=
    47105102
    47115103    for file in $files; do
     
    47205112      test $mode = uninstall && objdir="$dir"
    47215113
     5114      # Remember objdir for removal later, being careful to avoid duplicates
     5115      if test $mode = clean; then
     5116        case " $rmdirs " in
     5117          *" $objdir "*) ;;
     5118          *) rmdirs="$rmdirs $objdir" ;;
     5119        esac
     5120      fi
     5121
     5122      # Don't error if the file doesn't exist and rm -f was used.
     5123      if (test -L "$file") >/dev/null 2>&1 \
     5124        || (test -h "$file") >/dev/null 2>&1 \
     5125        || test -f "$file"; then
     5126        :
     5127      elif test -d "$file"; then
     5128        exit_status=1
     5129        continue
     5130      elif test "$rmforce" = yes; then
     5131        continue
     5132      fi
     5133
    47225134      rmfiles="$file"
    47235135
    4724       case "$name" in
     5136      case $name in
    47255137      *.la)
    47265138        # Possibly a libtool archive, so verify it.
     
    47445156                $show "$cmd"
    47455157                $run eval "$cmd"
     5158                if test $? != 0 && test "$rmforce" != yes; then
     5159                  exit_status=1
     5160                fi
    47465161              done
    47475162              IFS="$save_ifs"
     
    47565171                $show "$cmd"
    47575172                $run eval "$cmd"
     5173                if test $? != 0 && test "$rmforce" != yes; then
     5174                  exit_status=1
     5175                fi
    47585176              done
    47595177              IFS="$save_ifs"
     
    47665184      *.lo)
    47675185        # Possibly a libtool object, so verify it.
    4768         if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
     5186        if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
    47695187
    47705188          # Read the .lo file
    4771           . ./$file
     5189          . $dir/$name
    47725190
    47735191          # Add PIC object to the list of files to remove.
     
    48005218      esac
    48015219      $show "$rm $rmfiles"
    4802       $run $rm $rmfiles
     5220      $run $rm $rmfiles || exit_status=1
    48035221    done
    4804     exit 0
     5222
     5223    # Try to remove the ${objdir}s in the directories where we deleted files
     5224    for dir in $rmdirs; do
     5225      if test -d "$dir"; then
     5226        $show "rmdir $dir"
     5227        $run rmdir $dir >/dev/null 2>&1
     5228      fi
     5229    done
     5230
     5231    exit $exit_status
    48055232    ;;
    48065233
     
    48125239  esac
    48135240
    4814   $echo "$modename: invalid operation mode \`$mode'" 1>&2
    4815   $echo "$generic_help" 1>&2
     5241  if test -z "$exec_cmd"; then
     5242    $echo "$modename: invalid operation mode \`$mode'" 1>&2
     5243    $echo "$generic_help" 1>&2
     5244    exit 1
     5245  fi
     5246fi # test -z "$show_help"
     5247
     5248if test -n "$exec_cmd"; then
     5249  eval exec $exec_cmd
    48165250  exit 1
    4817 fi # test -z "$show_help"
     5251fi
    48185252
    48195253# We need to display help for each of the modes.
    4820 case "$mode" in
     5254case $mode in
    48215255"") $echo \
    48225256"Usage: $modename [OPTION]... [MODE-ARG]...
     
    48745308
    48755309  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
     5310  -prefer-pic       try to building PIC objects only
     5311  -prefer-non-pic   try to building non-PIC objects only
    48765312  -static           always build a \`.o' file suitable for static linking
    48775313
     
    49575393  -no-undefined     declare that a library does not refer to external symbols
    49585394  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
     5395  -objectlist FILE  Use a list of object files found in FILE to specify objects
    49595396  -release RELEASE  specify package release information
    49605397  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
Note: See TracChangeset for help on using the changeset viewer.