source: trunk/src/gcc/configure.in@ 1682

Last change on this file since 1682 was 1394, checked in by bird, 22 years ago

#1040: Joined the GCC 3.3.3 with the trunk.

  • Property cvs2svn:cvs-rev set to 1.4
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 51.5 KB
Line 
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, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
18# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
19#
20# This file is free software; you can redistribute it and/or modify it
21# under the terms of the GNU General Public License as published by
22# the Free Software Foundation; either version 2 of the License, or
23# (at your option) any later version.
24#
25# This program is distributed in the hope that it will be useful, but
26# WITHOUT ANY WARRANTY; without even the implied warranty of
27# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28# General Public License for more details.
29#
30# You should have received a copy of the GNU General Public License
31# along with this program; if not, write to the Free Software
32# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33
34##############################################################################
35
36### To add a new directory to the tree, first choose whether it is a target
37### or a host dependent tool. Then put it into the appropriate list
38### (library or tools, host or target), doing a dependency sort. For
39### example, gdb requires that byacc (or bison) be built first, so it is in
40### the ${host_tools} list after byacc and bison.
41
42
43# these libraries are used by various programs built for the host environment
44#
45host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk tclX itcl tix libgui zlib"
46
47libstdcxx_version="target-libstdc++-v3"
48
49# these tools are built for the host environment
50# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
51# know that we are building the simulator.
52host_tools="texinfo byacc flex bison binutils ld gas gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool grep diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils snavigator libtool gettext zip fastjar"
53
54# libgcj represents the runtime libraries only used by gcj.
55libgcj="target-libffi \
56 target-boehm-gc \
57 target-zlib \
58 target-qthreads \
59 target-libjava"
60
61# these libraries are built for the target environment, and are built after
62# the host libraries and the host tools (which may be a cross compiler)
63#
64target_libs="target-libiberty \
65 target-libgloss \
66 target-newlib \
67 ${libstdcxx_version} \
68 target-libf2c \
69 ${libgcj}
70 target-libobjc"
71
72# these tools are built using the target libs, and are intended to run only
73# in the target environment
74#
75# note: any program that *uses* libraries that are in the "target_libs"
76# list belongs in this list. those programs are also very likely
77# candidates for the "native_only" list which follows
78#
79target_tools="target-examples target-groff target-gperf target-rda"
80
81################################################################################
82
83## All tools belong in one of the four categories, and are assigned above
84## We assign ${configdirs} this way to remove all embedded newlines. This
85## is important because configure will choke if they ever get through.
86## ${configdirs} is directories we build using the host tools.
87## ${target_configdirs} is directories we build using the target tools.
88#
89configdirs=`echo ${host_libs} ${host_tools}`
90target_configdirs=`echo ${target_libs} ${target_tools}`
91
92################################################################################
93
94srctrigger=move-if-change
95srcname="gnu development package"
96
97# This gets set non-empty for some net releases of packages.
98appdirs=""
99
100# per-host:
101
102if [ x${shared} = xyes ]; then
103 case "${host}" in
104 i[3456]86-*-os2-emx)
105 # We don't want -fPIC on OS/2 EMX.
106 esac
107fi
108# GCC-OS2 - end
109
110# There is no longer anything interesting in the per-host section.
111
112# per-target:
113
114# Define is_cross_compiler to save on calls to 'test'.
115is_cross_compiler=
116if test x"${host}" = x"${target}" ; then
117 is_cross_compiler=no
118else
119 is_cross_compiler=yes
120fi
121
122# We always want to use the same name for this directory, so that dejagnu
123# can reliably find it.
124target_subdir=${target_alias}
125
126if test ! -d ${target_subdir} ; then
127 if mkdir ${target_subdir} ; then true
128 else
129 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
130 exit 1
131 fi
132fi
133
134build_subdir=${build_alias}
135
136if test x"${build_alias}" != x"${host}" ; then
137 if test ! -d ${build_subdir} ; then
138 if mkdir ${build_subdir} ; then true
139 else
140 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
141 exit 1
142 fi
143 fi
144fi
145
146# Skipdirs are removed silently.
147skipdirs=
148# Noconfigdirs are removed loudly.
149noconfigdirs=""
150
151use_gnu_ld=
152# Make sure we don't let GNU ld be added if we didn't want it.
153if test x$with_gnu_ld = xno ; then
154 use_gnu_ld=no
155 noconfigdirs="$noconfigdirs ld"
156fi
157
158use_gnu_as=
159# Make sure we don't let GNU as be added if we didn't want it.
160if test x$with_gnu_as = xno ; then
161 use_gnu_as=no
162 noconfigdirs="$noconfigdirs gas"
163fi
164
165# some tools are so dependent upon X11 that if we're not building with X,
166# it's not even worth trying to configure, much less build, that tool.
167
168case ${with_x} in
169 yes | "") ;; # the default value for this tree is that X11 is available
170 no)
171 skipdirs="${skipdirs} tk tix itcl libgui"
172 # We won't be able to build gdbtk without X.
173 enable_gdbtk=no
174 ;;
175 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
176esac
177
178# Some tools are only suitable for building in a "native" situation.
179# Remove these if host!=target.
180native_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"
181
182# Similarly, some are only suitable for cross toolchains.
183# Remove these if host=target.
184cross_only="target-libgloss target-newlib target-opcodes"
185
186case $is_cross_compiler in
187 no) skipdirs="${skipdirs} ${cross_only}" ;;
188 yes) skipdirs="${skipdirs} ${native_only}" ;;
189esac
190
191# If both --with-headers and --with-libs are specified, default to
192# --without-newlib.
193if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
194 if test x"${with_newlib}" = x ; then
195 with_newlib=no
196 fi
197fi
198
199# Recognize --with-newlib/--without-newlib.
200case ${with_newlib} in
201 no) skipdirs="${skipdirs} target-newlib" ;;
202 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
203esac
204
205# Configure extra directories which are host specific
206
207case "${host}" in
208 i[3456]86-*-go32*)
209 configdirs="$configdirs dosrel" ;;
210 i[3456]86-*-mingw32*)
211 configdirs="$configdirs dosrel" ;;
212 *-cygwin*)
213 configdirs="$configdirs libtermcap dosrel" ;;
214esac
215
216# Remove more programs from consideration, based on the host or
217# target this usually means that a port of the program doesn't
218# exist yet.
219
220case "${host}" in
221 hppa*64*-*-*)
222 noconfigdirs="$noconfigdirs byacc"
223 ;;
224 i[3456]86-*-vsta)
225 noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv gettext"
226 ;;
227 i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
228 noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi"
229 ;;
230 i[3456]86-*-mingw32*)
231 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix db snavigator gnuserv"
232 noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
233 ;;
234 i[3456]86-*-beos*)
235 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
236 ;;
237 *-*-cygwin*)
238 noconfigdirs="autoconf automake send-pr rcs guile perl"
239 ;;
240 *-*-netbsd*)
241 noconfigdirs="rcs"
242 ;;
243 ppc*-*-pe)
244 noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv"
245 ;;
246 powerpc-*-beos*)
247 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
248 ;;
249 *-*-darwin*)
250 noconfigdirs="$noconfigdirs tk itcl tix libgui"
251 ;;
252esac
253
254# Save it here so that, even in case of --enable-libgcj, if the Java
255# front-end isn't enabled, we still get libgcj disabled.
256libgcj_saved=$libgcj
257case $enable_libgcj in
258yes)
259 # If we reset it here, it won't get added to noconfigdirs in the
260 # target-specific build rules, so it will be forcibly enabled
261 # (unless the Java language itself isn't enabled).
262 libgcj=
263 ;;
264no)
265 # Make sure we get it printed in the list of not supported target libs.
266 noconfigdirs="$noconfigdirs ${libgcj}"
267 ;;
268esac
269
270case "${target}" in
271 *-*-chorusos)
272 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
273 ;;
274 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
275 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
276 ;;
277 *-*-netbsd*)
278 # Skip some stuff on all NetBSD configurations.
279 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
280
281 # Skip some stuff that's unsupported on some NetBSD configurations.
282 case "${target}" in
283 i*86-*-netbsdelf*) ;;
284 *)
285 noconfigdirs="$noconfigdirs ${libgcj}"
286 ;;
287 esac
288 ;;
289 *-*-netware)
290 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
291 ;;
292 *-*-rtems*)
293 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
294 case ${target} in
295 h8300*-*-* | h8500-*-*)
296 noconfigdirs="$noconfigdirs target-libf2c"
297 ;;
298 *) ;;
299 esac
300 ;;
301 *-*-vxworks*)
302 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
303 ;;
304 alpha*-dec-osf*)
305 # ld works, but does not support shared libraries.
306 # newlib is not 64 bit ready. I'm not sure about fileutils.
307 # gas doesn't generate exception information.
308 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
309 ;;
310 alpha*-*-*vms*)
311 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
312 ;;
313 alpha*-*-linux*)
314 # newlib is not 64 bit ready
315 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
316 ;;
317 alpha*-*-freebsd*)
318 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
319 ;;
320 alpha*-*-*)
321 # newlib is not 64 bit ready
322 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
323 ;;
324 sh-*-linux*)
325 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
326 ;;
327 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
328 noconfigdirs="$noconfigdirs ${libgcj}"
329 noconfigdirs="$noconfigdirs target-examples"
330 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
331 noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
332 noconfigdirs="$noconfigdirs expect dejagnu"
333 # the C++ libraries don't build on top of CE's C libraries
334 noconfigdirs="$noconfigdirs ${libstdcxx_version}"
335 noconfigdirs="$noconfigdirs target-newlib"
336 case "${host}" in
337 *-*-cygwin*) ;; # keep gdb and readline
338 *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
339 ;;
340 esac
341 ;;
342 arc-*-*)
343 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
344 ;;
345 arm-*-coff | strongarm-*-coff | xscale-*-coff)
346 noconfigdirs="$noconfigdirs ${libgcj}"
347 ;;
348 arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
349 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
350 ;;
351 arm-*-pe*)
352 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
353 ;;
354 arm-*-oabi*)
355 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
356 ;;
357 thumb-*-coff)
358 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
359 ;;
360 thumb-*-elf)
361 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
362 ;;
363 thumb-*-oabi)
364 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
365 ;;
366 thumb-*-pe)
367 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
368 ;;
369 arm-*-riscix*)
370 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
371 ;;
372 avr-*-*)
373 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
374 ;;
375 c4x-*-* | tic4x-*-*)
376 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
377 ;;
378 c54x*-*-* | tic54x-*-*)
379 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib"
380 ;;
381 cris-*-*)
382 noconfigdirs="$noconfigdirs ${libgcj}"
383 ;;
384 d10v-*-*)
385 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
386 ;;
387 d30v-*-*)
388 noconfigdirs="$noconfigdirs ${libgcj}"
389 ;;
390 fr30-*-elf*)
391 noconfigdirs="$noconfigdirs ${libgcj}"
392 ;;
393 frv-*-*)
394 noconfigdirs="$noconfigdirs ${libgcj}"
395 ;;
396 h8300*-*-*)
397 noconfigdirs="$noconfigdirs target-libgloss"
398 ;;
399 h8500-*-*)
400 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c"
401 ;;
402 hppa*64*-*-linux* | parisc*64*-*-linux*)
403 # In this case, it's because the hppa64-linux target is for
404 # the kernel only at this point and has no libc, and thus no
405 # headers, crt*.o, etc., all of which are needed by these.
406 noconfigdirs="$noconfigdirs target-zlib"
407 ;;
408 hppa*-*-*elf* | \
409 parisc*-*-linux* | hppa*-*-linux* | \
410 hppa*-*-lites* | \
411 hppa*-*-openbsd* | \
412 hppa*64*-*-*)
413 noconfigdirs="$noconfigdirs ${libgcj}"
414 # Do configure ld/binutils/gas for this case.
415 ;;
416 hppa*-*-*)
417 # According to Alexandre Oliva <[email protected]>, libjava won't
418 # build on HP-UX 10.20.
419 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
420 ;;
421 ia64*-*-elf*)
422 # No gdb support yet.
423 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
424 ;;
425 ia64*-**-hpux*)
426 # No gdb or ld support yet.
427 noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
428 ;;
429 i[3456]86-*-coff | i[3456]86-*-elf)
430 noconfigdirs="$noconfigdirs ${libgcj}"
431 ;;
432 i[34567]86-*-freebsd*)
433 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
434 ;;
435 i[3456]86-*-linux*)
436 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
437 # not build java stuff by default.
438 case "${target}" in
439 *-*-*libc1*)
440 noconfigdirs="$noconfigdirs ${libgcj}";;
441 esac
442
443 # This section makes it possible to build newlib natively on linux.
444 # If we are using a cross compiler then don't configure newlib.
445 if test x${is_cross_compiler} != xno ; then
446 noconfigdirs="$noconfigdirs target-newlib"
447 fi
448 noconfigdirs="$noconfigdirs target-libgloss"
449 # If we are not using a cross compiler, do configure newlib.
450 # Note however, that newlib will only be configured in this situation
451 # if the --with-newlib option has been given, because otherwise
452 # 'target-newlib' will appear in skipdirs.
453 ;;
454 i[3456]86-*-mingw32*)
455 target_configdirs="$target_configdirs target-mingw"
456 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
457
458 # Can't build gdb for mingw32 if not native.
459 case "${host}" in
460 i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
461 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigator gnuserv"
462 ;;
463 esac
464 ;;
465 *-*-cygwin*)
466 target_configdirs="$target_configdirs target-libtermcap target-winsup"
467 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
468 # always build newlib.
469 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
470
471 # Can't build gdb for Cygwin if not native.
472 case "${host}" in
473 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
474 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
475 ;;
476 esac
477 ;;
478 i[3456]86-*-pe)
479 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
480 ;;
481 i[3456]86-*-sco3.2v5*)
482 # The linker does not yet know about weak symbols in COFF,
483 # and is not configured to handle mixed ELF and COFF.
484 noconfigdirs="$noconfigdirs ld target-libgloss"
485 ;;
486 i[3456]86-*-sco*)
487 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
488 ;;
489 i[3456]86-*-solaris2*)
490 noconfigdirs="$noconfigdirs target-libgloss"
491 ;;
492 i[3456]86-*-sysv4*)
493 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
494 ;;
495 i[3456]86-*-beos*)
496 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
497 ;;
498 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
499 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
500 ;;
501 m68k-*-elf*)
502 noconfigdirs="$noconfigdirs ${libgcj}"
503 ;;
504 m68k-*-coff*)
505 noconfigdirs="$noconfigdirs ${libgcj}"
506 ;;
507 mcore-*-pe*)
508 # The EPOC C++ environment does not support exceptions or rtti,
509 # and so building libstdc++-v3 tends not to always work.
510 noconfigdirs="$noconfigdirs target-libstdc++-v3"
511 ;;
512 mmix-*-*)
513 noconfigdirs="$noconfigdirs ${libgcj}"
514 ;;
515 mn10200-*-*)
516 noconfigdirs="$noconfigdirs ${libgcj}"
517 ;;
518 mn10300-*-*)
519 noconfigdirs="$noconfigdirs ${libgcj}"
520 ;;
521 powerpc-*-aix*)
522 # copied from rs6000-*-* entry
523 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
524 ;;
525 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
526 target_configdirs="$target_configdirs target-winsup"
527 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv ${libgcj}"
528 # always build newlib.
529 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
530 ;;
531 # This is temporary until we can link against shared libraries
532 powerpcle-*-solaris*)
533 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv ${libgcj}"
534 ;;
535 powerpc-*-beos*)
536 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
537 ;;
538 powerpc-*-darwin*)
539 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof ${libgcj}"
540 ;;
541 powerpc-*-eabi)
542 noconfigdirs="$noconfigdirs ${libgcj}"
543 ;;
544 powerpc64*-*-linux*)
545 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
546 # not yet ported.
547 noconfigdirs="$noconfigdirs target-libffi"
548 ;;
549 rs6000-*-lynxos*)
550 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
551 ;;
552 rs6000-*-aix*)
553 noconfigdirs="$noconfigdirs gprof ${libgcj}"
554 ;;
555 rs6000-*-*)
556 noconfigdirs="$noconfigdirs gprof ${libgcj}"
557 ;;
558 m68k-apollo-*)
559 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
560 ;;
561 mips*-*-irix5*)
562 # The GNU linker does not support shared libraries.
563 noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
564 ;;
565 mips*-*-irix6*)
566 # The GNU assembler does not support IRIX 6.
567 # Linking libjava exceeds command-line length limits on at least
568 # IRIX 6.2, but not on IRIX 6.5.
569 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
570 # <[email protected]>
571 noconfigdirs="$noconfigdirs gas gprof target-libgloss ${libgcj}"
572 ;;
573 mips*-dec-bsd*)
574 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
575 ;;
576 mips*-*-bsd*)
577 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
578 ;;
579 mipstx39-*-*)
580 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
581 ;;
582 mips*-*-linux*)
583 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
584 ;;
585 mips*-*-*)
586 noconfigdirs="$noconfigdirs gprof ${libgcj}"
587 ;;
588 romp-*-*)
589 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
590 ;;
591 sh-*-*)
592 case "${host}" in
593 i[3456]86-*-vsta) ;; # don't add gprof back in
594 i[3456]86-*-go32*) ;; # don't add gprof back in
595 i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
596 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
597 esac
598 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
599 ;;
600 sh64-*-*)
601 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
602 ;;
603 sparc-*-elf*)
604 noconfigdirs="$noconfigdirs ${libgcj}"
605 ;;
606 sparc64-*-elf*)
607 noconfigdirs="$noconfigdirs ${libgcj}"
608 ;;
609 sparclite-*-*)
610 noconfigdirs="$noconfigdirs ${libgcj}"
611 ;;
612 sparc-*-sunos4*)
613 noconfigdirs="$noconfigdirs ${libgcj}"
614 if test x${is_cross_compiler} != xno ; then
615 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
616 else
617 use_gnu_ld=no
618 fi
619 ;;
620 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
621 ;;
622 v810-*-*)
623 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss ${libgcj}"
624 ;;
625 v850-*-*)
626 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
627 ;;
628 v850e-*-*)
629 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
630 ;;
631 v850ea-*-*)
632 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
633 ;;
634 vax-*-vms)
635 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
636 ;;
637 vax-*-*)
638 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
639 ;;
640 ip2k-*-*)
641 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
642 ;;
643 *-*-linux*)
644 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
645 ;;
646 *-*-lynxos*)
647 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
648 ;;
649 *-*-*)
650 noconfigdirs="$noconfigdirs ${libgcj}"
651 ;;
652esac
653
654# If we aren't building newlib, then don't build libgloss, since libgloss
655# depends upon some newlib header files.
656case "${noconfigdirs}" in
657 *target-libgloss*) ;;
658 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
659esac
660
661# Figure out what language subdirectories are present.
662# Look if the user specified --enable-languages="..."; if not, use
663# the environment variable $LANGUAGES if defined. $LANGUAGES might
664# go away some day.
665# NB: embedded tabs in this IF block -- do not untabify
666if test x"${enable_languages+set}" != xset; then
667 if test x"${LANGUAGES+set}" = xset; then
668 enable_languages="${LANGUAGES}"
669 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
670 else
671 enable_languages=all
672 fi
673else
674 if test x"${enable_languages}" = x ||
675 test x"${enable_languages}" = xyes;
676 then
677 echo configure.in: --enable-languages needs at least one language argument 1>&2
678 exit 1
679 fi
680fi
681enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
682
683# First scan to see if an enabled language requires some other language.
684# We assume that a given config-lang.in will list all the language
685# front ends it requires, even if some are required indirectly.
686for lang in ${srcdir}/gcc/*/config-lang.in ..
687do
688 case $lang in
689 ..)
690 ;;
691 # The odd quoting in the next line works around
692 # an apparent bug in bash 1.12 on linux.
693 ${srcdir}/gcc/[*]/config-lang.in)
694 ;;
695 *)
696 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
697 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
698 for other in $this_lang_requires
699 do
700 case ,${enable_languages}, in
701 *,$other,*)
702 ;;
703 *,all,*)
704 ;;
705 *,$lang_alias,*)
706 echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
707 enable_languages="$enable_languages,$other"
708 ;;
709 esac
710 done
711 ;;
712 esac
713done
714
715subdirs=
716for lang in ${srcdir}/gcc/*/config-lang.in ..
717do
718 case $lang in
719 ..) ;;
720 # The odd quoting in the next line works around
721 # an apparent bug in bash 1.12 on linux.
722 ${srcdir}/gcc/[*]/config-lang.in) ;;
723 *)
724 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
725 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
726 this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^ ]*\).*$,\1,p' $lang`
727 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
728 if test "x$lang_alias" = x
729 then
730 echo "$lang doesn't set \$language." 1>&2
731 exit 1
732 fi
733 case ${build_by_default},${enable_languages}, in
734 *,$lang_alias,*) add_this_lang=yes ;;
735 no,*) add_this_lang=no ;;
736 *,all,*) add_this_lang=yes ;;
737 *) add_this_lang=no ;;
738 esac
739 if test x"${add_this_lang}" = xyes; then
740 eval target_libs='"$target_libs "'\"$this_lang_libs\"
741 else
742 eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
743 fi
744 ;;
745 esac
746done
747
748# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
749# $target_configdirs.
750# If we have the source for $noconfigdirs entries, add them to $notsupp.
751
752notsupp=""
753for dir in . $skipdirs $noconfigdirs ; do
754 dirname=`echo $dir | sed -e s/target-//g`
755 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
756 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
757 if test -r $srcdir/$dirname/configure ; then
758 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
759 true
760 else
761 notsupp="$notsupp $dir"
762 fi
763 fi
764 fi
765 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
766 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
767 if test -r $srcdir/$dirname/configure ; then
768 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
769 true
770 else
771 notsupp="$notsupp $dir"
772 fi
773 fi
774 fi
775done
776
777# Sometimes the tools are distributed with libiberty but with no other
778# libraries. In that case, we don't want to build target-libiberty.
779if test -n "${target_configdirs}" ; then
780 others=
781 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
782 if test "$i" != "libiberty" ; then
783 if test -r $srcdir/$i/configure ; then
784 others=yes;
785 break;
786 fi
787 fi
788 done
789 if test -z "${others}" ; then
790 target_configdirs=
791 fi
792fi
793
794# Deconfigure all subdirectories, in case we are changing the
795# configuration from one where a subdirectory is supported to one where it
796# is not.
797if test -z "${norecursion}" && test -n "${configdirs}" ; then
798 for i in `echo ${configdirs} | sed -e s/target-//g` ; do
799 rm -f $i/Makefile
800 done
801fi
802if test -z "${norecursion}" && test -n "${target_configdirs}" ; then
803 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
804 rm -f ${target_subdir}/$i/Makefile
805 done
806fi
807
808# Quietly strip out all directories which aren't configurable in this tree.
809# This relies on all configurable subdirectories being autoconfiscated, which
810# is now the case.
811configdirs_all="$configdirs"
812configdirs=
813for i in ${configdirs_all} ; do
814 if test -f ${srcdir}/$i/configure ; then
815 configdirs="${configdirs} $i"
816 fi
817done
818target_configdirs_all="$target_configdirs"
819target_configdirs=
820for i in ${target_configdirs_all} ; do
821 j=`echo $i | sed -e s/target-//g`
822 if test -f ${srcdir}/$j/configure ; then
823 target_configdirs="${target_configdirs} $i"
824 fi
825done
826
827# Produce a warning message for the subdirs we can't configure.
828# This isn't especially interesting in the Cygnus tree, but in the individual
829# FSF releases, it's important to let people know when their machine isn't
830# supported by the one or two programs in a package.
831
832if test -n "${notsupp}" && test -z "${norecursion}" ; then
833 # If $appdirs is non-empty, at least one of those directories must still
834 # be configured, or we error out. (E.g., if the gas release supports a
835 # specified target in some subdirs but not the gas subdir, we shouldn't
836 # pretend that all is well.)
837 if test -n "$appdirs" ; then
838 for dir in $appdirs ; do
839 if test -r $dir/Makefile.in ; then
840 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
841 appdirs=""
842 break
843 fi
844 if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
845 appdirs=""
846 break
847 fi
848 fi
849 done
850 if test -n "$appdirs" ; then
851 echo "*** This configuration is not supported by this package." 1>&2
852 exit 1
853 fi
854 fi
855 # Okay, some application will build, or we don't care to check. Still
856 # notify of subdirs not getting built.
857 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
858 echo " ${notsupp}" 1>&2
859 echo " (Any other directories should still work fine.)" 1>&2
860fi
861
862case "$host" in
863 *msdosdjgpp*)
864 enable_gdbtk=no ;;
865esac
866# Determine whether gdb needs tk/tcl or not.
867case "$enable_gdbtk" in
868 no)
869 GDB_TK="" ;;
870 *)
871 GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui" ;;
872esac
873
874copy_dirs=
875
876# Handle --with-headers=XXX. If the value is not "yes", the contents of
877# the named directory are copied to $(tooldir)/sys-include.
878if test x"${with_headers}" != x ; then
879 if test x${is_cross_compiler} = xno ; then
880 echo 1>&2 '***' --with-headers is only supported when cross compiling
881 exit 1
882 fi
883 if test x"${with_headers}" != xyes ; then
884 case "${exec_prefixoption}" in
885 "") x=${prefix} ;;
886 *) x=${exec_prefix} ;;
887 esac
888 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
889 fi
890fi
891
892# Handle --with-libs=XXX. If the value is not "yes", the contents of
893# the name directories are copied to $(tooldir)/lib. Multiple directories
894# are permitted.
895if test x"${with_libs}" != x ; then
896 if test x${is_cross_compiler} = xno ; then
897 echo 1>&2 '***' --with-libs is only supported when cross compiling
898 exit 1
899 fi
900 if test x"${with_libs}" != xyes ; then
901 # Copy the libraries in reverse order, so that files in the first named
902 # library override files in subsequent libraries.
903 case "${exec_prefixoption}" in
904 "") x=${prefix} ;;
905 *) x=${exec_prefix} ;;
906 esac
907 for l in ${with_libs}; do
908 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
909 done
910 fi
911fi
912
913# Handle ${copy_dirs}
914set fnord ${copy_dirs}
915shift
916while test $# != 0 ; do
917 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
918 :
919 else
920 echo Copying $1 to $2
921
922 # Use the install script to create the directory and all required
923 # parent directories.
924 if test -d $2 ; then
925 :
926 else
927 echo >config.temp
928 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
929 fi
930
931 # Copy the directory, assuming we have tar.
932 # FIXME: Should we use B in the second tar? Not all systems support it.
933 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
934
935 # It is the responsibility of the user to correctly adjust all
936 # symlinks. If somebody can figure out how to handle them correctly
937 # here, feel free to add the code.
938
939 echo $1 > $2/COPIED
940 fi
941 shift; shift
942done
943
944# Work in distributions that contain no compiler tools, like Autoconf.
945tentative_cc=""
946if test -d ${srcdir}/config ; then
947case "${host}" in
948 m68k-hp-hpux*)
949 # Avoid "too much defining" errors from HPUX compiler.
950 tentative_cc="cc -Wp,-H256000"
951 host_makefile_frag="config/mh-hp300"
952 ;;
953 m68k-apollo-sysv*)
954 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
955 host_makefile_frag="config/mh-apollo68"
956 ;;
957 m68k-apollo-bsd*)
958 #None of the Apollo compilers can compile gas or binutils. The preprocessor
959 # chokes on bfd, the compiler won't let you assign integers to enums, and
960 # other problems. Defining CC to gcc is a questionable way to say "don't use
961 # the apollo compiler" (the preferred version of GCC could be called cc,
962 # or whatever), but I'm not sure leaving CC as cc is any better...
963 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
964 tentative_cc=gcc
965 host_makefile_frag="config/mh-a68bsd"
966 ;;
967 m88k-dg-dgux*)
968 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
969 host_makefile_frag="config/mh-dgux"
970 ;;
971 m88k-harris-cxux*)
972 # Under CX/UX, we want to tell the compiler to use ANSI mode.
973 tentative_cc="cc -Xa"
974 host_makefile_frag="config/mh-cxux"
975 ;;
976 m88k-motorola-sysv*)
977 host_makefile_frag="config/mh-delta88"
978 ;;
979 mips*-dec-ultrix*)
980 tentative_cc="cc -Wf,-XNg1000"
981 host_makefile_frag="config/mh-decstation"
982 ;;
983 mips*-nec-sysv4*)
984 # The C compiler on NEC MIPS SVR4 needs bigger tables.
985 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
986 host_makefile_frag="config/mh-necv4"
987 ;;
988 mips*-sgi-irix6*)
989 host_makefile_frag="config/mh-irix6"
990 ;;
991 mips*-sgi-irix5*)
992 host_makefile_frag="config/mh-irix5"
993 ;;
994 mips*-sgi-irix4*)
995 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
996 # environment. Also bump switch table size so that cp-parse will
997 # compile. Bump string length limit so linker builds.
998 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
999 ;;
1000 mips*-sgi-irix3*)
1001 host_makefile_frag="config/mh-sysv"
1002 ;;
1003 mips*-*-sysv4*)
1004 host_makefile_frag="config/mh-sysv4"
1005 ;;
1006 mips*-*-sysv*)
1007 # This is for a MIPS running RISC/os 4.52C.
1008
1009 # This is needed for GDB, but needs to be in the top-level make because
1010 # if a library is compiled with the bsd headers and gets linked with the
1011 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1012 # a different size).
1013 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1014 # known except to select the sysv environment. Could we use /proc instead?
1015 # These "sysv environments" and "bsd environments" often end up being a pain.
1016 #
1017 # This is not part of CFLAGS because perhaps not all C compilers have this
1018 # option.
1019 tentative_cc="cc -systype sysv"
1020 host_makefile_frag="config/mh-riscos"
1021 ;;
1022 i370-ibm-opened*)
1023 tentative_cc="c89"
1024 host_makefile_frag="config/mh-openedition"
1025 ;;
1026 i[3456]86-*-sysv5*)
1027 host_makefile_frag="config/mh-sysv5"
1028 ;;
1029 i[3456]86-*-dgux*)
1030 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1031 host_makefile_frag="config/mh-dgux386"
1032 ;;
1033 i[3456]86-ncr-sysv4.3*)
1034 # The MetaWare compiler will generate a copyright message unless you
1035 # turn it off by adding the -Hnocopyr flag.
1036 tentative_cc="cc -Hnocopyr"
1037 host_makefile_frag="config/mh-ncrsvr43"
1038 ;;
1039 i[3456]86-ncr-sysv4*)
1040 # for an NCR 3000 (i486/SVR4) system.
1041 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1042 # This compiler not only emits obnoxious copyright messages every time
1043 # you run it, but it chokes and dies on a whole bunch of GNU source
1044 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1045 tentative_cc="/usr/ccs/ATT/cc"
1046 host_makefile_frag="config/mh-ncr3000"
1047 ;;
1048 i[3456]86-*-sco3.2v5*)
1049 host_makefile_frag="config/mh-sysv"
1050 ;;
1051 i[3456]86-*-sco*)
1052 # The native C compiler botches some simple uses of const. Unfortunately,
1053 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1054 tentative_cc="cc -Dconst="
1055 host_makefile_frag="config/mh-sco"
1056 ;;
1057 i[3456]86-*-udk*)
1058 host_makefile_frag="config/mh-sysv5"
1059 ;;
1060 i[3456]86-*-isc*)
1061 host_makefile_frag="config/mh-sysv"
1062 ;;
1063 i[3456]86-*-solaris2*)
1064 host_makefile_frag="config/mh-sysv4"
1065 ;;
1066 i[3456]86-*-aix*)
1067 host_makefile_frag="config/mh-aix386"
1068 ;;
1069 i[3456]86-*-msdosdjgpp*)
1070 host_makefile_frag="config/mh-djgpp"
1071 ;;
1072 i[3456]86-*-os2*)
1073 host_makefile_frag="config/mh-emx"
1074 ;;
1075 *-cygwin*)
1076 host_makefile_frag="config/mh-cygwin"
1077 ;;
1078 *-mingw32*)
1079 host_makefile_frag="config/mh-mingw32"
1080 ;;
1081 *-interix*)
1082 host_makefile_frag="config/mh-interix"
1083 ;;
1084 vax-*-ultrix2*)
1085 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1086 tentative_cc=gcc
1087 ;;
1088 *-*-solaris2*)
1089 host_makefile_frag="config/mh-solaris"
1090 ;;
1091 m68k-sun-sunos*)
1092 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1093 # without overflowing the jump tables (-J says to use a 32 bit table)
1094 tentative_cc="cc -J"
1095 ;;
1096 *-hp-hpux[78]*)
1097 tentative_cc="cc -Wp,-H256000"
1098 host_makefile_frag="config/mh-hpux8"
1099 ;;
1100 *-hp-hpux*)
1101 tentative_cc="cc -Wp,-H256000"
1102 host_makefile_frag="config/mh-hpux"
1103 ;;
1104 *-*-hiux*)
1105 tentative_cc="cc -Wp,-H256000"
1106 host_makefile_frag="config/mh-hpux"
1107 ;;