source: branches/libc-0.6/src/gcc/configure.in@ 2998

Last change on this file since 2998 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