1 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2 # 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 # This file is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##############################################################################
19 ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
21 AC_INIT(move-if-change)
25 sinclude(config/acx.m4)
27 # clear some things potentially inherited from environment.
31 enable_libstdcxx_v3=yes
32 floating_point=default
36 ### we might need to use some other shell than /bin/sh for running subshells
37 ### If we are on Windows, search for the shell. This will permit people
38 ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
39 ### without also having to set CONFIG_SHELL. This code will work when
40 ### using bash, which sets OSTYPE.
43 if test x${CONFIG_SHELL} = x ; then
44 if test ! -f /bin/sh ; then
45 if test x${SHELL} != x && test -f ${SHELL} ; then
49 for prog in sh sh.exe bash bash.exe; do
50 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
52 test -z "$dir" && dir=.
53 if test -f $dir/$prog; then
54 CONFIG_SHELL=$dir/$prog
60 test -n "${CONFIG_SHELL}" && break
68 config_shell=${CONFIG_SHELL-/bin/sh}
70 ## this is a little touchy and won't always work, but...
72 ## if the argv[[0]] starts with a slash then it is an absolute name that can (and
73 ## must) be used as is.
75 ## otherwise, if argv[[0]] has no slash in it, we can assume that it is on the
76 ## path. Since PATH might include "." we also add `pwd` to the end of PATH.
80 # if PWD already has a value, it is probably wrong.
81 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
84 /* | [[A-Za-z]]:[[\\/]]* ) ;;
87 PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH
91 # Export original configure arguments for use by sub-configures.
92 TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
93 export TOPLEVEL_CONFIGURE_ARGUMENTS
95 moveifchange=${srcdir}/move-if-change
97 # Set srcdir to "." if that's what it is.
98 # This is important for multilib support.
100 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
101 if test "${pwd}" = "${srcpwd}" ; then
108 # Define the trigger file to make sure configure will re-run whenever
109 # the gcc version number changes.
110 if test "${with_gcc_version_trigger+set}" = set ; then
111 gcc_version_trigger="$with_gcc_version_trigger"
112 gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
114 # If gcc's sources are available, define the trigger file.
115 if test -f ${topsrcdir}/gcc/version.c ; then
116 gcc_version_trigger=${topsrcdir}/gcc/version.c
117 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
118 case "$ac_configure_args" in
119 *--with-gcc-version-trigger=$gcc_version_trigger* )
122 # Add to all subconfigure arguments: build, host, and target.
123 ac_configure_args="--with-gcc-version-trigger=$gcc_version_trigger $ac_configure_args"
129 ### To add a new directory to the tree, first choose whether it is a target
130 ### or a host dependent tool. Then put it into the appropriate list
131 ### (library or tools, host or target), doing a dependency sort.
133 # Subdirs will be configured in the order listed in build_configdirs,
134 # configdirs, or target_configdirs; see the serialization section below.
136 # Dependency sorting is only needed when *configuration* must be done in
137 # a particular order. In all cases a dependency should be specified in
138 # the Makefile, whether or not it's implicitly specified here.
140 # Double entries in build_configdirs, configdirs, or target_configdirs may
141 # cause circular dependencies and break everything horribly.
143 # these libraries are used by various programs built for the host environment
145 host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk itcl tix libgui zlib"
147 libstdcxx_version="target-libstdc++-v3"
149 # these tools are built for the host environment
150 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
151 # know that we are building the simulator.
152 # binutils, gas and ld appear in that order because it makes sense to run
153 # "make check" in that particular order.
154 host_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 grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator gettext zip fastjar"
156 # libgcj represents the runtime libraries only used by gcj.
157 libgcj="target-libffi \
163 # these libraries are built for the target environment, and are built after
164 # the host libraries and the host tools (which may be a cross compiler)
166 target_libs="target-libiberty \
169 ${libstdcxx_version} \
174 # these tools are built using the target libs, and are intended to run only
175 # in the target environment
177 # note: any program that *uses* libraries that are in the "target_libs"
178 # list belongs in this list. those programs are also very likely
179 # candidates for the "native_only" list which follows
181 target_tools="target-examples target-groff target-gperf target-rda"
183 ################################################################################
185 ## All tools belong in one of the four categories, and are assigned above
186 ## We assign ${configdirs} this way to remove all embedded newlines. This
187 ## is important because configure will choke if they ever get through.
188 ## ${configdirs} is directories we build using the host tools.
189 ## ${target_configdirs} is directories we build using the target tools.
191 configdirs=`echo ${host_libs} ${host_tools}`
192 target_configdirs=`echo ${target_libs} ${target_tools}`
194 ################################################################################
196 srcname="gnu development package"
198 # This gets set non-empty for some net releases of packages.
201 # Define is_cross_compiler to save on calls to 'test'.
203 if test x"${host}" = x"${target}" ; then
206 is_cross_compiler=yes
209 # We always want to use the same name for this directory, so that dejagnu
210 # can reliably find it.
211 target_subdir=${target_alias}
213 if test ! -d ${target_subdir} ; then
214 if mkdir ${target_subdir} ; then true
216 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
222 build_subdir=${build_prefix}${build_alias}
224 if test x"${build_alias}" != x"${host}" ; then
225 if test ! -d ${build_subdir} ; then
226 if mkdir ${build_subdir} ; then true
228 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
234 # Skipdirs are removed silently.
236 # Noconfigdirs are removed loudly.
240 # Make sure we don't let GNU ld be added if we didn't want it.
241 if test x$with_gnu_ld = xno ; then
243 noconfigdirs="$noconfigdirs ld"
247 # Make sure we don't let GNU as be added if we didn't want it.
248 if test x$with_gnu_as = xno ; then
250 noconfigdirs="$noconfigdirs gas"
253 # some tools are so dependent upon X11 that if we're not building with X,
254 # it's not even worth trying to configure, much less build, that tool.
257 yes | "") ;; # the default value for this tree is that X11 is available
259 skipdirs="${skipdirs} tk tix itcl libgui"
260 # We won't be able to build gdbtk without X.
263 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
266 # Some tools are only suitable for building in a "native" situation.
267 # Remove these if host!=target.
268 native_only="autoconf automake libtool fileutils find gawk gettext grep gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms snavigator gnuserv target-gperf"
270 # Similarly, some are only suitable for cross toolchains.
271 # Remove these if host=target.
272 cross_only="target-libgloss target-newlib target-opcodes"
274 case $is_cross_compiler in
275 no) skipdirs="${skipdirs} ${cross_only}" ;;
276 yes) skipdirs="${skipdirs} ${native_only}" ;;
279 # If both --with-headers and --with-libs are specified, default to
281 if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
282 if test x"${with_newlib}" = x ; then
287 # Recognize --with-newlib/--without-newlib.
288 case ${with_newlib} in
289 no) skipdirs="${skipdirs} target-newlib" ;;
290 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
293 # Configure extra directories which are host specific
297 configdirs="$configdirs libtermcap" ;;
300 # Remove more programs from consideration, based on the host or
301 # target this usually means that a port of the program doesn't
306 noconfigdirs="$noconfigdirs byacc"
309 noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext"
311 i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
312 noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi"
314 i[[3456]]86-*-mingw32*)
315 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv"
316 noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
319 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
322 noconfigdirs="autoconf automake send-pr rcs guile perl"
328 noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv"
331 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
334 noconfigdirs="$noconfigdirs tk itcl tix libgui"
338 # Save it here so that, even in case of --enable-libgcj, if the Java
339 # front-end isn't enabled, we still get libgcj disabled.
341 case $enable_libgcj in
343 # If we reset it here, it won't get added to noconfigdirs in the
344 # target-specific build rules, so it will be forcibly enabled
345 # (unless the Java language itself isn't enabled).
349 # Make sure we get it printed in the list of not supported target libs.
350 noconfigdirs="$noconfigdirs ${libgcj}"
356 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
358 *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
359 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
362 # Skip some stuff on all NetBSD configurations.
363 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
365 # Skip some stuff that's unsupported on some NetBSD configurations.
367 i*86-*-netbsdelf*) ;;
369 noconfigdirs="$noconfigdirs ${libgcj}"
374 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
377 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
379 h8300*-*-* | h8500-*-*)
380 noconfigdirs="$noconfigdirs target-libf2c"
386 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
389 # ld works, but does not support shared libraries.
390 # newlib is not 64 bit ready. I'm not sure about fileutils.
391 # gas doesn't generate exception information.
392 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
395 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
398 # newlib is not 64 bit ready
399 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
402 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
405 # newlib is not 64 bit ready
406 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
409 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
411 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
412 noconfigdirs="$noconfigdirs ${libgcj}"
413 noconfigdirs="$noconfigdirs target-examples"
414 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
415 noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
416 noconfigdirs="$noconfigdirs expect dejagnu"
417 # the C++ libraries don't build on top of CE's C libraries
418 noconfigdirs="$noconfigdirs ${libstdcxx_version}"
419 noconfigdirs="$noconfigdirs target-newlib"
421 *-*-cygwin*) ;; # keep gdb and readline
422 *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
427 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
429 arm-*-coff | strongarm-*-coff | xscale-*-coff)
430 noconfigdirs="$noconfigdirs ${libgcj}"
432 arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
433 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
436 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
439 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
442 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
445 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
448 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
451 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
454 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
457 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
460 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
462 c54x*-*-* | tic54x-*-*)
463 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib"
466 noconfigdirs="$noconfigdirs ${libgcj}"
469 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
472 noconfigdirs="$noconfigdirs ${libgcj}"
475 noconfigdirs="$noconfigdirs ${libgcj}"
478 noconfigdirs="$noconfigdirs ${libgcj}"
481 noconfigdirs="$noconfigdirs target-libgloss"
484 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c"
486 hppa*64*-*-linux* | parisc*64*-*-linux*)
487 # In this case, it's because the hppa64-linux target is for
488 # the kernel only at this point and has no libc, and thus no
489 # headers, crt*.o, etc., all of which are needed by these.
490 noconfigdirs="$noconfigdirs target-zlib"
493 parisc*-*-linux* | hppa*-*-linux* | \
497 noconfigdirs="$noconfigdirs ${libgcj}"
498 # Do configure ld/binutils/gas for this case.
501 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
502 # build on HP-UX 10.20.
503 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
506 # No gdb support yet.
507 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
510 # No gdb or ld support yet.
511 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
513 i[[3456]]86-*-coff | i[[3456]]86-*-elf)
514 noconfigdirs="$noconfigdirs ${libgcj}"
516 i[[34567]]86-*-freebsd*)
517 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
519 i[[3456]]86-*-linux*)
520 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
521 # not build java stuff by default.
524 noconfigdirs="$noconfigdirs ${libgcj}";;
527 # This section makes it possible to build newlib natively on linux.
528 # If we are using a cross compiler then don't configure newlib.
529 if test x${is_cross_compiler} != xno ; then
530 noconfigdirs="$noconfigdirs target-newlib"
532 noconfigdirs="$noconfigdirs target-libgloss"
533 # If we are not using a cross compiler, do configure newlib.
534 # Note however, that newlib will only be configured in this situation
535 # if the --with-newlib option has been given, because otherwise
536 # 'target-newlib' will appear in skipdirs.
538 i[[3456]]86-*-mingw32*)
539 target_configdirs="$target_configdirs target-mingw"
540 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
542 # Can't build gdb for mingw32 if not native.
544 i[[3456]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
545 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigator gnuserv"
550 target_configdirs="$target_configdirs target-libtermcap target-winsup"
551 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
552 # always build newlib.
553 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
555 # Can't build gdb for Cygwin if not native.
557 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
558 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
563 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
565 i[[3456]]86-*-sco3.2v5*)
566 # The linker does not yet know about weak symbols in COFF,
567 # and is not configured to handle mixed ELF and COFF.
568 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
571 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
573 i[[3456]]86-*-solaris2*)
574 noconfigdirs="$noconfigdirs target-libgloss"
576 i[[3456]]86-*-sysv4*)
577 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
580 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
582 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
583 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
586 noconfigdirs="$noconfigdirs ${libgcj}"
589 noconfigdirs="$noconfigdirs ${libgcj}"
592 # The EPOC C++ environment does not support exceptions or rtti,
593 # and so building libstdc++-v3 tends not to always work.
594 noconfigdirs="$noconfigdirs target-libstdc++-v3"
597 noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
600 noconfigdirs="$noconfigdirs ${libgcj}"
603 noconfigdirs="$noconfigdirs ${libgcj}"
606 # copied from rs6000-*-* entry
607 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
609 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
610 target_configdirs="$target_configdirs target-winsup"
611 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv ${libgcj}"
612 # always build newlib.
613 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
615 # This is temporary until we can link against shared libraries
616 powerpcle-*-solaris*)
617 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv ${libgcj}"
620 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
623 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof ${libgcj}"
626 noconfigdirs="$noconfigdirs ${libgcj}"
629 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
631 noconfigdirs="$noconfigdirs target-libffi"
634 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
637 noconfigdirs="$noconfigdirs gprof ${libgcj}"
640 noconfigdirs="$noconfigdirs gprof ${libgcj}"
643 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
646 # The GNU linker does not support shared libraries.
647 noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
650 # The GNU assembler does not support IRIX 6.
651 # Linking libjava exceeds command-line length limits on at least
652 # IRIX 6.2, but not on IRIX 6.5.
653 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
654 # <oldham@codesourcery.com>
655 noconfigdirs="$noconfigdirs gas gprof target-libgloss ${libgcj}"
658 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
661 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
664 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
667 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
670 noconfigdirs="$noconfigdirs gprof ${libgcj}"
673 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
677 i[[3456]]86-*-vsta) ;; # don't add gprof back in
678 i[[3456]]86-*-go32*) ;; # don't add gprof back in
679 i[[3456]]86-*-msdosdjgpp*) ;; # don't add gprof back in
680 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
682 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
685 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
688 noconfigdirs="$noconfigdirs ${libgcj}"
691 noconfigdirs="$noconfigdirs ${libgcj}"
694 noconfigdirs="$noconfigdirs ${libgcj}"
697 noconfigdirs="$noconfigdirs ${libgcj}"
698 if test x${is_cross_compiler} != xno ; then
699 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
704 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
707 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss ${libgcj}"
710 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
713 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
716 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
719 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
722 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
725 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
728 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
731 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
734 noconfigdirs="$noconfigdirs ${libgcj}"
738 # If we aren't building newlib, then don't build libgloss, since libgloss
739 # depends upon some newlib header files.
740 case "${noconfigdirs}" in
741 *target-libgloss*) ;;
742 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
745 # Figure out what language subdirectories are present.
746 # Look if the user specified --enable-languages="..."; if not, use
747 # the environment variable $LANGUAGES if defined. $LANGUAGES might
749 # NB: embedded tabs in this IF block -- do not untabify
750 if test x"${enable_languages+set}" != xset; then
751 if test x"${LANGUAGES+set}" = xset; then
752 enable_languages="${LANGUAGES}"
753 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
758 if test x"${enable_languages}" = x ||
759 test x"${enable_languages}" = xyes;
761 echo configure.in: --enable-languages needs at least one language argument 1>&2
765 enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
767 # First scan to see if an enabled language requires some other language.
768 # We assume that a given config-lang.in will list all the language
769 # front ends it requires, even if some are required indirectly.
770 for lang in ${srcdir}/gcc/*/config-lang.in ..
775 # The odd quoting in the next line works around
776 # an apparent bug in bash 1.12 on linux.
777 ${srcdir}/gcc/[[*]]/config-lang.in)
780 lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^ ]]*\).*$,\1,p' $lang`
781 this_lang_requires=`sed -n -e 's,^lang_requires=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_requires=\([[^ ]]*\).*$,\1,p' $lang`
782 for other in $this_lang_requires
784 case ,${enable_languages}, in
790 echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
791 enable_languages="$enable_languages,$other"
800 for lang in ${srcdir}/gcc/*/config-lang.in ..
804 # The odd quoting in the next line works around
805 # an apparent bug in bash 1.12 on linux.
806 ${srcdir}/gcc/[[*]]/config-lang.in) ;;
808 lang_alias=`sed -n -e 's,^language=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^language=\([[^ ]]*\).*$,\1,p' $lang`
809 this_lang_libs=`sed -n -e 's,^target_libs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^target_libs=\([[^ ]]*\).*$,\1,p' $lang`
810 this_lang_dirs=`sed -n -e 's,^lang_dirs=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^lang_dirs=\([[^ ]]*\).*$,\1,p' $lang`
811 build_by_default=`sed -n -e 's,^build_by_default=[['"'"'"'"]]\(.*\)[["'"'"'"']].*$,\1,p' -e 's,^build_by_default=\([[^ ]]*\).*$,\1,p' $lang`
812 if test "x$lang_alias" = x
814 echo "$lang doesn't set \$language." 1>&2
817 case ${build_by_default},${enable_languages}, in
818 *,$lang_alias,*) add_this_lang=yes ;;
819 no,*) add_this_lang=no ;;
820 *,all,*) add_this_lang=yes ;;
821 *) add_this_lang=no ;;
823 if test x"${add_this_lang}" = xyes; then
824 eval target_libs='"$target_libs "'\"$this_lang_libs\"
826 eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
832 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
833 # $target_configdirs.
834 # If we have the source for $noconfigdirs entries, add them to $notsupp.
837 for dir in . $skipdirs $noconfigdirs ; do
838 dirname=`echo $dir | sed -e s/target-//g`
839 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
840 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
841 if test -r $srcdir/$dirname/configure ; then
842 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
845 notsupp="$notsupp $dir"
849 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
850 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
851 if test -r $srcdir/$dirname/configure ; then
852 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
855 notsupp="$notsupp $dir"
861 # Sometimes the tools are distributed with libiberty but with no other
862 # libraries. In that case, we don't want to build target-libiberty.
863 if test -n "${target_configdirs}" ; then
865 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
866 if test "$i" != "libiberty" ; then
867 if test -r $srcdir/$i/configure ; then
873 if test -z "${others}" ; then
878 # Deconfigure all subdirectories, in case we are changing the
879 # configuration from one where a subdirectory is supported to one where it
881 if test -z "${norecursion}" && test -n "${configdirs}" ; then
882 for i in `echo ${configdirs} | sed -e s/target-//g` ; do
886 if test -z "${norecursion}" && test -n "${target_configdirs}" ; then
887 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
888 rm -f ${target_subdir}/$i/Makefile
892 # Quietly strip out all directories which aren't configurable in this tree.
893 # This relies on all configurable subdirectories being autoconfiscated, which
895 configdirs_all="$configdirs"
897 for i in ${configdirs_all} ; do
898 if test -f ${srcdir}/$i/configure ; then
899 configdirs="${configdirs} $i"
902 target_configdirs_all="$target_configdirs"
904 for i in ${target_configdirs_all} ; do
905 j=`echo $i | sed -e s/target-//g`
906 if test -f ${srcdir}/$j/configure ; then
907 target_configdirs="${target_configdirs} $i"
911 # Produce a warning message for the subdirs we can't configure.
912 # This isn't especially interesting in the Cygnus tree, but in the individual
913 # FSF releases, it's important to let people know when their machine isn't
914 # supported by the one or two programs in a package.
916 if test -n "${notsupp}" && test -z "${norecursion}" ; then
917 # If $appdirs is non-empty, at least one of those directories must still
918 # be configured, or we error out. (E.g., if the gas release supports a
919 # specified target in some subdirs but not the gas subdir, we shouldn't
920 # pretend that all is well.)
921 if test -n "$appdirs" ; then
922 for dir in $appdirs ; do
923 if test -r $dir/Makefile.in ; then
924 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
928 if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
934 if test -n "$appdirs" ; then
935 echo "*** This configuration is not supported by this package." 1>&2
939 # Okay, some application will build, or we don't care to check. Still
940 # notify of subdirs not getting built.
941 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
942 echo " ${notsupp}" 1>&2
943 echo " (Any other directories should still work fine.)" 1>&2
953 # Handle --with-headers=XXX. If the value is not "yes", the contents of
954 # the named directory are copied to $(tooldir)/sys-include.
955 if test x"${with_headers}" != x ; then
956 if test x${is_cross_compiler} = xno ; then
957 echo 1>&2 '***' --with-headers is only supported when cross compiling
960 if test x"${with_headers}" != xyes ; then
961 case "${exec_prefixoption}" in
963 *) x=${exec_prefix} ;;
965 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
969 # Handle --with-libs=XXX. If the value is not "yes", the contents of
970 # the name directories are copied to $(tooldir)/lib. Multiple directories
972 if test x"${with_libs}" != x ; then
973 if test x${is_cross_compiler} = xno ; then
974 echo 1>&2 '***' --with-libs is only supported when cross compiling
977 if test x"${with_libs}" != xyes ; then
978 # Copy the libraries in reverse order, so that files in the first named
979 # library override files in subsequent libraries.
980 case "${exec_prefixoption}" in
982 *) x=${exec_prefix} ;;
984 for l in ${with_libs}; do
985 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
990 # Handle ${copy_dirs}
991 set fnord ${copy_dirs}
993 while test $# != 0 ; do
994 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
997 echo Copying $1 to $2
999 # Use the install script to create the directory and all required
1000 # parent directories.
1001 if test -d $2 ; then
1005 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
1008 # Copy the directory, assuming we have tar.
1009 # FIXME: Should we use B in the second tar? Not all systems support it.
1010 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
1012 # It is the responsibility of the user to correctly adjust all
1013 # symlinks. If somebody can figure out how to handle them correctly
1014 # here, feel free to add the code.
1021 # Work in distributions that contain no compiler tools, like Autoconf.
1023 host_makefile_frag=/dev/null
1024 if test -d ${srcdir}/config ; then
1027 # Avoid "too much defining" errors from HPUX compiler.
1028 tentative_cc="cc -Wp,-H256000"
1029 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1030 # If it's HP/UX ar, this should be harmless.
1034 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1037 #None of the Apollo compilers can compile gas or binutils. The preprocessor
1038 # chokes on bfd, the compiler won't let you assign integers to enums, and
1039 # other problems. Defining CC to gcc is a questionable way to say "don't use
1040 # the apollo compiler" (the preferred version of GCC could be called cc,
1041 # or whatever), but I'm not sure leaving CC as cc is any better...
1042 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1043 # Used to have BISON=yacc.
1047 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1048 host_makefile_frag="config/mh-dgux"
1051 # Under CX/UX, we want to tell the compiler to use ANSI mode.
1052 tentative_cc="cc -Xa"
1053 host_makefile_frag="config/mh-cxux"
1055 m88k-motorola-sysv*)
1058 tentative_cc="cc -Wf,-XNg1000"
1059 host_makefile_frag="config/mh-decstation"
1062 # The C compiler on NEC MIPS SVR4 needs bigger tables.
1063 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1064 host_makefile_frag="config/mh-necv4"
1067 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
1068 # environment. Also bump switch table size so that cp-parse will
1069 # compile. Bump string length limit so linker builds.
1070 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1073 host_makefile_frag="config/mh-sysv4"
1076 # This is for a MIPS running RISC/os 4.52C.
1078 # This is needed for GDB, but needs to be in the top-level make because
1079 # if a library is compiled with the bsd headers and gets linked with the
1080 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1081 # a different size).
1082 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1083 # known except to select the sysv environment. Could we use /proc instead?
1084 # These "sysv environments" and "bsd environments" often end up being a pain.
1086 # This is not part of CFLAGS because perhaps not all C compilers have this
1088 tentative_cc="cc -systype sysv"
1093 i[[3456]]86-*-sysv5*)
1094 host_makefile_frag="config/mh-sysv5"
1096 i[[3456]]86-*-dgux*)
1097 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1098 host_makefile_frag="config/mh-dgux386"
1100 i[[3456]]86-ncr-sysv4.3*)
1101 # The MetaWare compiler will generate a copyright message unless you
1102 # turn it off by adding the -Hnocopyr flag.
1103 tentative_cc="cc -Hnocopyr"
1105 i[[3456]]86-ncr-sysv4*)
1106 # for an NCR 3000 (i486/SVR4) system.
1107 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1108 # This compiler not only emits obnoxious copyright messages every time
1109 # you run it, but it chokes and dies on a whole bunch of GNU source
1110 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1111 tentative_cc="/usr/ccs/ATT/cc"
1112 host_makefile_frag="config/mh-ncr3000"
1114 i[[3456]]86-*-sco3.2v5*)
1117 # The native C compiler botches some simple uses of const. Unfortunately,
1118 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1119 tentative_cc="cc -Dconst="
1120 host_makefile_frag="config/mh-sco"
1123 host_makefile_frag="config/mh-sysv5"
1125 i[[3456]]86-*-solaris2*)
1126 host_makefile_frag="config/mh-sysv4"
1128 i[[3456]]86-*-msdosdjgpp*)
1129 host_makefile_frag="config/mh-djgpp"
1132 host_makefile_frag="config/mh-cygwin"
1135 host_makefile_frag="config/mh-mingw32"
1138 host_makefile_frag="config/mh-interix"
1141 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1145 host_makefile_frag="config/mh-solaris"
1148 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1149 # without overflowing the jump tables (-J says to use a 32 bit table)
1150 tentative_cc="cc -J"
1153 tentative_cc="cc -Wp,-H256000"
1156 tentative_cc="cc -Wp,-H256000"
1159 # /bin/cc is less than useful for our purposes. Always use GCC
1160 tentative_cc="/usr/cygnus/progressive/bin/gcc"
1161 host_makefile_frag="config/mh-lynxrs6k"
1164 # /bin/cc is less than useful for our purposes. Always use GCC
1165 tentative_cc="/bin/gcc"
1168 host_makefile_frag="config/mh-sysv4"
1173 extra_arflags_for_target=
1174 extra_nmflags_for_target=
1175 extra_ranlibflags_for_target=
1176 target_makefile_frag=/dev/null
1178 i[[3456]]86-*-netware*)
1179 target_makefile_frag="config/mt-netware"
1182 target_makefile_frag="config/mt-netware"
1185 target_makefile_frag="config/mt-linux"
1187 *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
1188 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
1189 # commands to handle both 32-bit and 64-bit objects. These flags are
1190 # harmless if we're using GNU nm or ar.
1191 extra_arflags_for_target=" -X32_64"
1192 extra_nmflags_for_target=" -B -X32_64"
1195 # ranlib from Darwin requires the -c flag to look at common symbols.
1196 extra_ranlibflags_for_target=" -c"
1198 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
1199 target_makefile_frag="config/mt-wince"
1203 alphaieee_frag=/dev/null
1206 # This just makes sure to use the -mieee option to build target libs.
1207 # This should probably be set individually by each library.
1208 alphaieee_frag="config/mt-alphaieee"
1212 # If --enable-target-optspace always use -Os instead of -O2 to build
1213 # the target libraries, similarly if it is not specified, use -Os
1214 # on selected platforms.
1215 ospace_frag=/dev/null
1216 case "${enable_target_optspace}:${target}" in
1218 ospace_frag="config/mt-ospace"
1221 ospace_frag="config/mt-d30v"
1223 :m32r-* | :d10v-* | :fr30-*)
1224 ospace_frag="config/mt-ospace"
1229 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
1233 # Set with_gnu_as and with_gnu_ld as appropriate.
1235 # This is done by determining whether or not the appropriate directory
1236 # is available, and by checking whether or not specific configurations
1237 # have requested that this magic not happen.
1239 # The command line options always override the explicit settings in
1240 # configure.in, and the settings in configure.in override this magic.
1242 # If the default for a toolchain is to use GNU as and ld, and you don't
1243 # want to do that, then you should use the --without-gnu-as and
1244 # --without-gnu-ld options for the configure script.
1246 if test x${use_gnu_as} = x &&
1247 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
1249 extra_host_args="$extra_host_args --with-gnu-as"
1252 if test x${use_gnu_ld} = x &&
1253 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
1255 extra_host_args="$extra_host_args --with-gnu-ld"
1258 # If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
1259 # can detect this case.
1261 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
1263 extra_host_args="$extra_host_args --with-newlib"
1266 # We default to --with-shared on platforms where -fpic is meaningless.
1267 # Well, we don't yet, but we will.
1268 if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then
1270 alpha*-dec-osf*) enable_shared=yes ;;
1271 alpha*-*-linux*) enable_shared=yes ;;
1272 mips-sgi-irix5*) enable_shared=yes ;;
1273 *) enable_shared=no ;;
1277 case "${enable_shared}" in
1285 # Default to using --with-stabs for certain targets.
1286 if test x${with_stabs} = x ; then
1290 extra_host_args="${extra_host_args} --with-stabs"
1294 mips*-*-* | alpha*-*-osf*)
1296 extra_host_args="${extra_host_args} --with-stabs"
1301 # hpux11 in 64bit mode has libraries in a weird place. Arrange to find
1302 # them automatically.
1305 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
1309 # If we aren't going to be using gcc, see if we can extract a definition
1310 # of CC from the fragment.
1311 # Actually, use the 'pre-extracted' version above.
1312 if test -z "${CC}" && test "${build}" = "${host}" ; then
1313 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1315 for dir in $PATH; do
1316 test -z "$dir" && dir=.
1317 if test -f $dir/gcc; then
1323 if test -z "${found}" && test -n "${tentative_cc}" ; then
1328 # Some systems (e.g., one of the i386-aix systems the gas testers are
1329 # using) don't handle "\$" correctly, so don't use it here.
1330 tooldir='$(exec_prefix)'/${target_alias}
1331 build_tooldir=${tooldir}
1333 # Generate a default definition for YACC. This is used if the makefile can't
1334 # locate bison or byacc in objdir.
1336 for prog in 'bison -y' byacc yacc
1338 set dummy $prog; tmp=$2
1339 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1340 for dir in $PATH; do
1341 test -z "$dir" && dir=.
1342 if test -f $dir/$tmp; then
1343 DEFAULT_YACC="$prog"
1349 test -n "$DEFAULT_YACC" && break
1352 # Generate a default definition for M4. This is used if the makefile can't
1353 # locate m4 in objdir.
1355 for prog in gm4 gnum4 m4
1357 set dummy $prog; tmp=$2
1358 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1359 for dir in $PATH; do
1360 test -z "$dir" && dir=.
1361 if test -f $dir/$tmp; then
1368 test -n "$DEFAULT_M4" && break
1371 # Generate a default definition for LEX. This is used if the makefile can't
1372 # locate flex in objdir.
1374 for prog in flex lex
1376 set dummy $prog; tmp=$2
1377 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1378 for dir in $PATH; do
1379 test -z "$dir" && dir=.
1380 if test -f $dir/$tmp; then
1387 test -n "$DEFAULT_LEX" && break
1390 if test "${build}" != "${host}" ; then
1391 # If we are doing a Canadian Cross, in which the host and build systems
1392 # are not the same, we set reasonable default values for the tools.
1394 BISON=${BISON-bison}
1395 CC=${CC-${host_alias}-gcc}
1396 CFLAGS=${CFLAGS-"-g -O2"}
1397 CXX=${CXX-${host_alias}-c++}
1398 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1399 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
1400 CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
1401 CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
1402 GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
1403 GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
1404 BUILD_PREFIX=${build_alias}-
1405 BUILD_PREFIX_1=${build_alias}-
1406 MAKEINFO=${MAKEINFO-makeinfo}
1408 if test -z "${YACC}" ; then
1409 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1410 for dir in $PATH; do
1411 test -z "$dir" && dir=.
1412 if test -f $dir/bison; then
1416 if test -f $dir/byacc; then
1420 if test -f $dir/yacc; then
1426 if test -z "${YACC}" ; then
1431 if test -z "${LEX}" ; then
1432 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1433 for dir in $PATH; do
1434 test -z "$dir" && dir=.
1435 if test -f $dir/flex; then
1439 if test -f $dir/lex; then
1449 # Set reasonable default values for some tools even if not Canadian.
1450 # Of course, these are different reasonable default values, originally
1451 # specified directly in the Makefile.
1452 # We don't export, so that autoconf can do its job.
1453 # Note that all these settings are above the fragment inclusion point
1454 # in Makefile.in, so can still be overridden by fragments.
1455 # This is all going to change when we autoconfiscate...
1457 BISON="\$(USUAL_BISON)"
1458 CC_FOR_BUILD="\$(CC)"
1459 GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
1461 BUILD_PREFIX_1=loser-
1462 MAKEINFO="\$(USUAL_MAKEINFO)"
1464 YACC="\$(USUAL_YACC)"
1466 # If CC is still not set, try to get gcc.
1467 if test -z "${CC}" ; then
1468 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1469 for dir in $PATH; do
1470 test -z "$dir" && dir=.
1471 if test -f $dir/gcc; then
1473 echo 'void f(){}' > conftest.c
1474 if test -z "`${CC} -g -c conftest.c 2>&1`"; then
1475 CFLAGS=${CFLAGS-"-g -O2"}
1476 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1478 CFLAGS=${CFLAGS-"-O2"}
1479 CXXFLAGS=${CXXFLAGS-"-O2"}
1488 if test -z "${CFLAGS}"; then
1489 # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
1490 # is set to a version of gcc.
1493 echo 'void f(){}' > conftest.c
1494 if test -z "`${CC} -g -c conftest.c 2>&1`"; then
1495 CFLAGS=${CFLAGS-"-g -O2"}
1496 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1498 CFLAGS=${CFLAGS-"-O2"}
1499 CXXFLAGS=${CXXFLAGS-"-O2"}
1508 CFLAGS=${CFLAGS-"-g"}
1509 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1512 # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
1513 # Set up the list of links to be made.
1514 # ${links} is the list of link names, and ${files} is the list of names to link to.
1517 configlinks="${links}"
1518 if test -r ./config.status ; then
1519 mv -f ./config.status ./config.back
1521 while test -n "${files}" ; do
1522 # set file to car of files, files to cdr of files
1523 set ${files}; file=$1; shift; files=$*
1524 set ${links}; link=$1; shift; links=$*
1526 if test ! -r ${srcdir}/${file} ; then
1527 if test ! -r ${file} ; then
1528 echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
1529 echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
1535 srcfile=${srcdir}/${file}
1538 ${remove} -f ${link}
1539 # Make a symlink if possible, otherwise try a hard link
1540 if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
1543 # We need to re-remove the file because Lynx leaves a
1544 # very strange directory there when it fails an NFS symlink.
1545 ${remove} -r -f ${link}
1546 ${hard_link} ${srcfile} ${link}
1548 if test ! -r ${link} ; then
1549 echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
1553 echo "Linked \"${link}\" to \"${srcfile}\"."
1556 # Create a .gdbinit file which runs the one in srcdir
1557 # and tells GDB to look there for source files.
1559 if test -r ${srcdir}/.gdbinit ; then
1562 *) cat > ./.gdbinit <<EOF
1566 source ${srcdir}/.gdbinit
1572 # record if we want runtime library stuff installed in libsubdir.
1574 if test -z "${enable_version_specific_runtime_libs}"; then
1575 enable_version_specific_runtime_libs=no
1578 # Make sure that the compiler is able to generate an executable. If it
1579 # can't, we are probably in trouble. We don't care whether we can run the
1580 # executable--we might be using a cross compiler--we only care whether it
1581 # can be created. At this point the main configure script has set CC.
1583 echo "int main () { return 0; }" > conftest.c
1584 ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
1585 if test $? = 0 ; then
1586 if test -s conftest || test -s conftest.exe ; then
1592 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
1593 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
1600 # The Solaris /usr/ucb/cc compiler does not appear to work.
1602 sparc-sun-solaris2*)
1603 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
1604 if test "`type $CCBASE | sed 's/^[[^/]]*//'`" = "/usr/ucb/cc" ; then
1606 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
1607 if test -d /opt/cygnus/bin ; then
1608 if test "$could_use" = "" ; then
1609 could_use="/opt/cygnus/bin"
1611 could_use="$could_use or /opt/cygnus/bin"
1614 if test "$could_use" = "" ; then
1615 echo "Warning: compilation may fail because you're using"
1616 echo "/usr/ucb/cc. You should change your PATH or CC "
1617 echo "variable and rerun configure."
1619 echo "Warning: compilation may fail because you're using"
1620 echo "/usr/ucb/cc, when you should use the C compiler from"
1621 echo "$could_use. You should change your"
1622 echo "PATH or CC variable and rerun configure."
1628 # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
1629 # binutils tools will find libbfd.so.
1630 if test "${shared}" = "yes" ; then
1631 SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)"
1638 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
1639 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
1642 # Record target_configdirs and the configure arguments for target and
1643 # build configuration in Makefile.
1644 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
1646 # This is the final value for target_configdirs. configdirs already
1647 # has its final value. It's time to create some lists of valid targets.
1650 configure_build_modules=
1651 # Only make build modules if build != host.
1652 # This should be done more generally, but at the moment it doesn't matter.
1653 if test ${host_alias} != ${build_alias} ; then
1654 all_build_modules=all-build-libiberty
1655 configure_build_modules=configure-build-libiberty
1660 install_host_modules=
1661 configure_host_modules=
1662 for module in ${configdirs} ; do
1663 all_host_modules="${all_host_modules} all-${module}"
1664 check_host_modules="${check_host_modules} check-${module}"
1665 install_host_modules="${install_host_modules} install-${module}"
1666 configure_host_modules="${configure_host_modules} configure-${module}"
1668 install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
1671 check_target_modules=
1672 install_target_modules=
1673 configure_target_modules=
1674 for module in ${target_configdirs} ; do
1675 all_target_modules="${all_target_modules} all-target-${module}"
1676 check_target_modules="${check_target_modules} check-target-${module}"
1677 install_target_modules="${install_target_modules} install-target-${module}"
1678 configure_target_modules="${configure_target_modules} configure-target-${module}"
1681 # Determine whether gdb needs tk/tcl or not.
1682 # Use 'maybe' since enable_gdbtk might be true even if tk isn't available
1683 # and in that case we want gdb to be built without tk. Ugh!
1684 # In fact I believe gdb is the *only* package directly dependent on tk,
1685 # so we should be able to put the 'maybe's in unconditionally and
1686 # leave out the maybe dependencies when enable_gdbtk is false. I'm not
1687 # 100% sure that that's safe though.
1688 case "$enable_gdbtk" in
1692 GDB_TK="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui" ;;
1695 # Create the 'maybe dependencies'. This uses a temporary file.
1697 for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \
1698 ${install_host_modules} ${install_target_modules} \
1699 ${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \
1701 echo "maybe-${item}: ${item}" >> maybedep.tmp
1703 maybe_dependencies=maybedep.tmp
1704 AC_SUBST_FILE(maybe_dependencies)
1706 # Create the serialization dependencies. This uses a temporary file.
1708 # These force 'configure's to be done one at a time, to avoid problems
1709 # with contention over a shared config.cache.
1712 for item in ${build_configdirs} ; do
1715 *) echo "\$(BUILD_SUBDIR)/${item}/Makefile: \$(BUILD_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
1720 for item in ${configdirs} ; do
1723 *) echo "${item}/Makefile: ${olditem}/Makefile" >> serdep.tmp ;;
1728 for item in ${target_configdirs} ; do
1731 *) echo "\$(TARGET_SUBDIR)/${item}/Makefile: \$(TARGET_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
1735 serialization_dependencies=serdep.tmp
1736 AC_SUBST_FILE(serialization_dependencies)
1738 # Base args. Strip norecursion, cache-file, srcdir, host, build, target.
1739 # These are the ones we might not want to pass down to subconfigures.
1740 baseargs=`echo "${ac_configure_args}" | \
1741 sed -e 's/--no[[^ ]]*//' \
1742 -e 's/--cache[[a-z-]]*=[[^ ]]*//' \
1743 -e 's/--sr[[a-z-]]*=[[^ ]]*//' \
1744 -e 's/--ho[[a-z-]]*=[[^ ]]*//' \
1745 -e 's/--bu[[a-z-]]*=[[^ ]]*//' \
1746 -e 's/--ta[[a-z-]]*=[[^ ]]*//'`
1748 # For the build-side libraries, we just need to pretend we're native,
1749 # and not use the same cache file. Multilibs are neither needed nor
1751 build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
1753 # For host modules, accept cache file option, or specification as blank.
1754 case "${cache_file}" in
1756 cache_file_option="" ;;
1757 /* | [[A-Za-z]]:[[\\/]]* ) # absolute path
1758 cache_file_option="--cache-file=${cache_file}" ;;
1760 cache_file_option="--cache-file=../${cache_file}" ;;
1763 host_configargs="${cache_file_option} ${buildopt} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
1765 target_configargs=${baseargs}
1767 # Passing a --with-cross-host argument lets the target libraries know
1768 # whether they are being built with a cross-compiler or being built
1769 # native. However, it would be better to use other mechanisms to make the
1770 # sorts of decisions they want to make on this basis. Please consider
1771 # this option to be deprecated. FIXME.
1772 if test x${is_cross_compiler} = xyes ; then
1773 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
1776 # Default to --enable-multilib.
1777 if test x${enable_multilib} = x ; then
1778 target_configargs="--enable-multilib ${target_configargs}"
1781 # Pass --with-newlib if appropriate. Note that target_configdirs has
1782 # changed from the earlier setting of with_newlib.
1783 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
1784 target_configargs="--with-newlib ${target_configargs}"
1787 # Pass the appropriate --host, --build, and --cache-file arguments.
1788 target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
1790 # provide a proper gxx_include_dir.
1791 # Note, if you change the default, make sure to fix both here and in
1792 # the gcc and libstdc++-v3 subdirectories.
1793 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1795 if test -n "${with_gxx_include_dir}"; then
1796 case "${with_gxx_include_dir}" in
1798 echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
1804 gxx_include_dir=${with_gxx_include_dir}
1808 if test x${gxx_include_dir} = x; then
1809 if test x${enable_version_specific_runtime_libs} = xyes; then
1810 gxx_include_dir='${libsubdir}/include/c++'
1812 . ${srcdir}/config.if
1813 gxx_include_dir='${prefix}/include/${libstdcxx_incdir}'
1816 gxx_include_dir=${gxx_include_dir}
1820 case " $target_configdirs " in
1822 case " $target_configargs " in
1823 *" --with-newlib "*)
1826 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' ;;
1829 # If we're not building GCC, don't discard standard headers.
1830 if test -d ${srcdir}/gcc; then
1831 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
1833 if test "${build}" != "${host}"; then
1834 # On Canadian crosses, CC_FOR_TARGET will have already been set
1835 # by `configure', so we won't have an opportunity to add -Bgcc/
1836 # to it. This is right: we don't want to search that directory
1837 # for binaries, but we want the header files in there, so add
1839 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
1841 # Someone might think of using the pre-installed headers on
1842 # Canadian crosses, in case the installed compiler is not fully
1843 # compatible with the compiler being built. In this case, it
1844 # would be better to flag an error than risking having
1845 # incompatible object files being constructed. We can't
1846 # guarantee that an error will be flagged, but let's hope the
1847 # compiler will do it, when presented with incompatible header
1852 case "${target}-${is_cross_compiler}" in
1853 i[[3456]]86-*-linux*-no)
1854 # Here host == target, so we don't need to build gcc,
1855 # so we don't want to discard standard headers.
1856 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
1859 # If we're building newlib, use its generic headers last, but search
1860 # for any libc-related directories first (so make it the last -B
1862 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
1870 # On Canadian crosses, we'll be searching the right directories for
1871 # the previously-installed cross compiler, so don't bother to add
1872 # flags for directories within the install tree of the compiler
1873 # being built; programs in there won't even run.
1874 if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
1875 # Search for pre-installed headers if nothing else fits.
1876 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include'
1879 if test "x${use_gnu_ld}" = x &&
1880 echo " ${configdirs} " | grep " ld " > /dev/null ; then
1881 # Arrange for us to find uninstalled linker scripts.
1882 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
1885 if test "x${CC_FOR_TARGET+set}" = xset; then
1887 elif test -d ${srcdir}/gcc; then
1888 CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
1889 elif test "$host" = "$target"; then
1890 CC_FOR_TARGET='$(CC)'
1892 CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
1894 CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
1896 if test "x${GCJ_FOR_TARGET+set}" = xset; then
1898 elif test -d ${srcdir}/gcc; then
1899 GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
1900 elif test "$host" = "$target"; then
1901 GCJ_FOR_TARGET='gcj'
1903 GCJ_FOR_TARGET=`echo gcj | sed -e 's/x/x/' ${program_transform_name}`
1905 GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
1907 # Don't use libstdc++-v3's flags to configure/build itself.
1908 libstdcxx_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'
1909 raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
1911 if test "x${CXX_FOR_TARGET+set}" = xset; then
1913 elif test -d ${srcdir}/gcc; then
1914 # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
1915 # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
1916 # default whereas gcc does not.
1917 # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
1919 CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
1920 RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
1921 elif test "$host" = "$target"; then
1922 CXX_FOR_TARGET='$(CXX)'
1923 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
1925 CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}`
1926 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
1928 CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
1929 RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
1931 qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
1932 qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
1934 # We want to defer the evaluation of `cmd`s and shell variables in
1935 # CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
1936 # bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
1937 # quotes, but we still have to duplicate `$'s so that shell variables
1938 # can be expanded by the nested make as shell variables, not as make
1940 qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
1941 qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
1943 # Wrap CC_FOR_TARGET and friends, for certain types of builds.
1944 CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
1945 GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
1946 CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
1947 RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
1948 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
1949 RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
1951 # Makefile fragments.
1952 host_makefile_frag=${srcdir}/${host_makefile_frag}
1953 target_makefile_frag=${srcdir}/${target_makefile_frag}
1954 alphaieee_frag=${srcdir}/${alphaieee_frag}
1955 ospace_frag=${srcdir}/${ospace_frag}
1956 AC_SUBST_FILE(host_makefile_frag)
1957 AC_SUBST_FILE(target_makefile_frag)
1958 AC_SUBST_FILE(alphaieee_frag)
1959 AC_SUBST_FILE(ospace_frag)
1961 # Miscellanea: directories, flags, etc.
1962 AC_SUBST(SET_LIB_PATH)
1963 AC_SUBST(RPATH_ENVVAR)
1964 AC_SUBST(BUILD_PREFIX)
1965 AC_SUBST(BUILD_PREFIX_1)
1966 AC_SUBST(configlinks)
1967 AC_SUBST(enable_shared)
1968 AC_SUBST(enable_threads)
1969 AC_SUBST(enable_version_specific_runtime_libs)
1970 AC_SUBST(gcc_version_trigger)
1971 AC_SUBST(gcc_version)
1973 AC_SUBST(build_tooldir)
1975 AC_SUBST(gxx_include_dir)
1976 AC_SUBST(libstdcxx_incdir)
1978 # Build module lists & subconfigure args.
1979 AC_SUBST(build_subdir)
1980 AC_SUBST(build_configargs)
1981 AC_SUBST(configure_build_modules)
1982 AC_SUBST(all_build_modules)
1984 # Host module lists & subconfigure args.
1985 AC_SUBST(host_configargs)
1986 AC_SUBST(configdirs)
1987 AC_SUBST(configure_host_modules)
1988 AC_SUBST(all_host_modules)
1989 AC_SUBST(check_host_modules)
1990 AC_SUBST(install_host_modules)
1991 AC_SUBST(install_host_modules_nogcc)
1993 # Target module lists & subconfigure args.
1994 AC_SUBST(target_subdir)
1995 AC_SUBST(target_configargs)
1996 AC_SUBST(target_configdirs)
1997 AC_SUBST(configure_target_modules)
1998 AC_SUBST(all_target_modules)
1999 AC_SUBST(check_target_modules)
2000 AC_SUBST(install_target_modules)
2004 AC_SUBST(CC_FOR_BUILD)
2008 AC_SUBST(config_shell)
2011 AC_CHECK_TOOL(AR, ar)
2012 AC_CHECK_TOOL(AS, as)
2013 AC_CHECK_TOOL(DLLTOOL, dlltool)
2014 AC_CHECK_TOOL(LD, ld)
2015 AC_CHECK_TOOL(NM, nm)
2016 AC_CHECK_TOOL(RANLIB, ranlib, :)
2017 AC_CHECK_TOOL(WINDRES, windres)
2018 AC_CHECK_TOOL(OBJCOPY, objcopy)
2019 AC_CHECK_TOOL(OBJDUMP, objdump)
2024 AC_SUBST(DEFAULT_YACC)
2025 AC_SUBST(DEFAULT_LEX)
2026 AC_SUBST(DEFAULT_M4)
2029 NCN_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
2030 NCN_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
2031 NCN_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
2032 NCN_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
2033 NCN_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
2034 NCN_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
2035 NCN_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
2037 AC_SUBST(GCC_FOR_TARGET)
2038 AC_SUBST(FLAGS_FOR_TARGET)
2039 AC_SUBST(CC_FOR_TARGET)
2040 AC_SUBST(GCJ_FOR_TARGET)
2041 AC_SUBST(CXX_FOR_TARGET)
2042 AC_SUBST(RAW_CXX_FOR_TARGET)
2043 AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
2044 AC_SUBST(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
2046 # Fix up target tools.
2047 if test "x${build}" = "x${host}" ; then
2048 # In this case, the newly built tools can and should be used,
2049 # so we override the results of the autoconf tests.
2050 # This should really only happen when the tools are actually being built,
2051 # but that's a further refinement. The new build scheme, where
2052 # tools are built into a structure paralleling where they're installed,
2053 # should also eliminate all of this cleanly.
2054 AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
2055 AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
2056 DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
2057 LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
2058 NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
2059 RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
2060 WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
2062 # Certain tools may need extra flags.
2063 AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
2064 RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
2065 NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}