(toplev)
[deliverable/binutils-gdb.git] / configure.in
CommitLineData
75205f78
DD
1# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2# 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
252b5132
RH
3#
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.
8#
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.
13#
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.
17
18##############################################################################
a0da8069
NN
19### WARNING: this file contains embedded tabs. Do not run untabify on this file.
20
21AC_INIT(move-if-change)
22AC_CANONICAL_SYSTEM
23AC_ARG_PROGRAM
24
25sinclude(config/acx.m4)
26
27# clear some things potentially inherited from environment.
28
29enable_threads=no
30enable_shared=no
31enable_libstdcxx_v3=yes
32floating_point=default
33gas=default
34x11=default
35
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.
41case "${OSTYPE}" in
42*win32*)
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
46 CONFIG_SHELL=${SHELL}
47 export CONFIG_SHELL
48 else
49 for prog in sh sh.exe bash bash.exe; do
50 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
51 for dir in $PATH; do
52 test -z "$dir" && dir=.
53 if test -f $dir/$prog; then
54 CONFIG_SHELL=$dir/$prog
55 export CONFIG_SHELL
56 break
57 fi
58 done
59 IFS="$save_ifs"
60 test -n "${CONFIG_SHELL}" && break
61 done
62 fi
63 fi
64 fi
65 ;;
66esac
67
68config_shell=${CONFIG_SHELL-/bin/sh}
69
70## this is a little touchy and won't always work, but...
71##
72## if the argv[[0]] starts with a slash then it is an absolute name that can (and
73## must) be used as is.
74##
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.
77##
78
79progname=$0
80# if PWD already has a value, it is probably wrong.
81if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
82
83case "${progname}" in
84/* | [[A-Za-z]]:[[\\/]]* ) ;;
85*/*) ;;
86*)
87 PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH
88 ;;
89esac
90
91# Export original configure arguments for use by sub-configures.
92TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
93export TOPLEVEL_CONFIGURE_ARGUMENTS
94
95moveifchange=${srcdir}/move-if-change
96
97# Set srcdir to "." if that's what it is.
98# This is important for multilib support.
99pwd=`${PWDCMD-pwd}`
100srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
101if test "${pwd}" = "${srcpwd}" ; then
102 srcdir=.
103fi
104
105topsrcdir=$srcpwd
252b5132 106
ae831be5
NN
107extra_host_args=
108# Define the trigger file to make sure configure will re-run whenever
109# the gcc version number changes.
a0da8069
NN
110if 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/'`
ae831be5 113else
a0da8069
NN
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* )
120 ;;
121 * )
122 # Add to all subconfigure arguments: build, host, and target.
123 ac_configure_args="--with-gcc-version-trigger=$gcc_version_trigger $ac_configure_args"
124 ;;
125 esac
126 fi
ae831be5
NN
127fi
128
252b5132
RH
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
a2cc058a 131### (library or tools, host or target), doing a dependency sort.
252b5132 132
a2cc058a
NN
133# Subdirs will be configured in the order listed in build_configdirs,
134# configdirs, or target_configdirs; see the serialization section below.
135
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.
139
140# Double entries in build_configdirs, configdirs, or target_configdirs may
141# cause circular dependencies and break everything horribly.
252b5132
RH
142
143# these libraries are used by various programs built for the host environment
144#
54103d1e 145host_libs="intl mmalloc libiberty opcodes bfd readline db tcl tk itcl tix libgui zlib"
252b5132 146
2e8357fc 147libstdcxx_version="target-libstdc++-v3"
ba73c63f 148
252b5132
RH
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.
2af579c4
NN
152# binutils, gas and ld appear in that order because it makes sense to run
153# "make check" in that particular order.
154host_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"
75205f78
DD
155
156# libgcj represents the runtime libraries only used by gcj.
157libgcj="target-libffi \
158 target-boehm-gc \
159 target-zlib \
160 target-qthreads \
161 target-libjava"
252b5132
RH
162
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)
165#
166target_libs="target-libiberty \
167 target-libgloss \
168 target-newlib \
ba73c63f
JM
169 ${libstdcxx_version} \
170 target-libf2c \
75205f78 171 ${libgcj}
ba73c63f 172 target-libobjc"
252b5132
RH
173
174# these tools are built using the target libs, and are intended to run only
175# in the target environment
176#
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
180#
dd2768ff 181target_tools="target-examples target-groff target-gperf target-rda"
252b5132
RH
182
183################################################################################
184
252b5132
RH
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.
190#
191configdirs=`echo ${host_libs} ${host_tools}`
192target_configdirs=`echo ${target_libs} ${target_tools}`
193
194################################################################################
195
252b5132
RH
196srcname="gnu development package"
197
198# This gets set non-empty for some net releases of packages.
199appdirs=""
200
c712250a
DD
201# Define is_cross_compiler to save on calls to 'test'.
202is_cross_compiler=
203if test x"${host}" = x"${target}" ; then
204 is_cross_compiler=no
205else
206 is_cross_compiler=yes
207fi
208
252b5132
RH
209# We always want to use the same name for this directory, so that dejagnu
210# can reliably find it.
211target_subdir=${target_alias}
212
a0c4f3a0 213if test ! -d ${target_subdir} ; then
252b5132
RH
214 if mkdir ${target_subdir} ; then true
215 else
d5de0a84 216 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
252b5132
RH
217 exit 1
218 fi
219fi
220
14c428fb
NN
221build_prefix=build-
222build_subdir=${build_prefix}${build_alias}
49b7683b 223
a0c4f3a0
DD
224if test x"${build_alias}" != x"${host}" ; then
225 if test ! -d ${build_subdir} ; then
49b7683b
DD
226 if mkdir ${build_subdir} ; then true
227 else
d5de0a84 228 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
49b7683b
DD
229 exit 1
230 fi
231 fi
232fi
233
f48556b1
DD
234# Skipdirs are removed silently.
235skipdirs=
236# Noconfigdirs are removed loudly.
237noconfigdirs=""
252b5132 238
f48556b1
DD
239use_gnu_ld=
240# Make sure we don't let GNU ld be added if we didn't want it.
241if test x$with_gnu_ld = xno ; then
242 use_gnu_ld=no
243 noconfigdirs="$noconfigdirs ld"
252b5132
RH
244fi
245
f48556b1
DD
246use_gnu_as=
247# Make sure we don't let GNU as be added if we didn't want it.
248if test x$with_gnu_as = xno ; then
249 use_gnu_as=no
250 noconfigdirs="$noconfigdirs gas"
252b5132
RH
251fi
252
f48556b1
DD
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.
252b5132 255
f48556b1
DD
256case ${with_x} in
257 yes | "") ;; # the default value for this tree is that X11 is available
ff0a3bf8
DD
258 no)
259 skipdirs="${skipdirs} tk tix itcl libgui"
260 # We won't be able to build gdbtk without X.
261 enable_gdbtk=no
262 ;;
f48556b1
DD
263 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
264esac
252b5132 265
f48556b1 266# Some tools are only suitable for building in a "native" situation.
405ea7a0 267# Remove these if host!=target.
bcaf2395 268native_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"
405ea7a0
NN
269
270# Similarly, some are only suitable for cross toolchains.
271# Remove these if host=target.
272cross_only="target-libgloss target-newlib target-opcodes"
252b5132 273
f48556b1
DD
274case $is_cross_compiler in
275 no) skipdirs="${skipdirs} ${cross_only}" ;;
276 yes) skipdirs="${skipdirs} ${native_only}" ;;
277esac
252b5132 278
a32d391c
DD
279# If both --with-headers and --with-libs are specified, default to
280# --without-newlib.
281if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
282 if test x"${with_newlib}" = x ; then
283 with_newlib=no
284 fi
285fi
286
287# Recognize --with-newlib/--without-newlib.
288case ${with_newlib} in
289 no) skipdirs="${skipdirs} target-newlib" ;;
290 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
291esac
292
252b5132
RH
293# Configure extra directories which are host specific
294
295case "${host}" in
f48556b1 296 *-cygwin*)
3866be5d 297 configdirs="$configdirs libtermcap" ;;
252b5132
RH
298esac
299
300# Remove more programs from consideration, based on the host or
301# target this usually means that a port of the program doesn't
302# exist yet.
303
252b5132 304case "${host}" in
75205f78
DD
305 hppa*64*-*-*)
306 noconfigdirs="$noconfigdirs byacc"
307 ;;
a0da8069 308 i[[3456]]86-*-vsta)
07637366 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"
252b5132 310 ;;
a0da8069 311 i[[3456]]86-*-go32* | i[[3456]]86-*-msdosdjgpp*)
07637366 312 noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix db snavigator gnuserv libffi"
252b5132 313 ;;
a0da8069 314 i[[3456]]86-*-mingw32*)
07637366
DD
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"
252b5132 317 ;;
a0da8069 318 i[[3456]]86-*-beos*)
252b5132
RH
319 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
320 ;;
321 *-*-cygwin*)
07637366 322 noconfigdirs="autoconf automake send-pr rcs guile perl"
252b5132
RH
323 ;;
324 *-*-netbsd*)
325 noconfigdirs="rcs"
326 ;;
327 ppc*-*-pe)
07637366 328 noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix db snavigator gnuserv"
252b5132 329 ;;
ba73c63f
JM
330 powerpc-*-beos*)
331 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
332 ;;
bbf7c8ac
NN
333 *-*-darwin*)
334 noconfigdirs="$noconfigdirs tk itcl tix libgui"
335 ;;
252b5132
RH
336esac
337
96111c10
AO
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.
340libgcj_saved=$libgcj
341case $enable_libgcj in
342yes)
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).
346 libgcj=
347 ;;
348no)
349 # Make sure we get it printed in the list of not supported target libs.
350 noconfigdirs="$noconfigdirs ${libgcj}"
351 ;;
352esac
353
252b5132 354case "${target}" in
75205f78
DD
355 *-*-chorusos)
356 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
357 ;;
a0da8069 358 *-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*)
ffb97b2f
DD
359 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
360 ;;
e82380cc
JT
361 *-*-netbsd*)
362 # Skip some stuff on all NetBSD configurations.
ae03d6e2 363 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
e82380cc
JT
364
365 # Skip some stuff that's unsupported on some NetBSD configurations.
366 case "${target}" in
75205f78 367 i*86-*-netbsdelf*) ;;
e82380cc 368 *)
75205f78 369 noconfigdirs="$noconfigdirs ${libgcj}"
e82380cc
JT
370 ;;
371 esac
372 ;;
252b5132 373 *-*-netware)
e3b0c936 374 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss ${libgcj}"
252b5132
RH
375 ;;
376 *-*-rtems*)
75205f78 377 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
d5ec694c
DD
378 case ${target} in
379 h8300*-*-* | h8500-*-*)
380 noconfigdirs="$noconfigdirs target-libf2c"
381 ;;
382 *) ;;
383 esac
252b5132
RH
384 ;;
385 *-*-vxworks*)
75205f78 386 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
252b5132
RH
387 ;;
388 alpha*-dec-osf*)
e99daf2b
DD
389 # ld works, but does not support shared libraries.
390 # newlib is not 64 bit ready. I'm not sure about fileutils.
252b5132 391 # gas doesn't generate exception information.
e99daf2b 392 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
252b5132
RH
393 ;;
394 alpha*-*-*vms*)
75205f78
DD
395 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
396 ;;
397 alpha*-*-linux*)
398 # newlib is not 64 bit ready
399 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
252b5132 400 ;;
ffb97b2f
DD
401 alpha*-*-freebsd*)
402 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
403 ;;
252b5132
RH
404 alpha*-*-*)
405 # newlib is not 64 bit ready
75205f78 406 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
252b5132 407 ;;
75205f78
DD
408 sh-*-linux*)
409 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
75205f78 410 ;;
2fb651f6 411 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
75205f78
DD
412 noconfigdirs="$noconfigdirs ${libgcj}"
413 noconfigdirs="$noconfigdirs target-examples"
ba73c63f 414 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
2fb651f6
NC
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
ba73c63f 418 noconfigdirs="$noconfigdirs ${libstdcxx_version}"
ae03d6e2 419 noconfigdirs="$noconfigdirs target-newlib"
2fb651f6
NC
420 case "${host}" in
421 *-*-cygwin*) ;; # keep gdb and readline
ba73c63f 422 *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}"
2fb651f6
NC
423 ;;
424 esac
425 ;;
252b5132 426 arc-*-*)
75205f78 427 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132 428 ;;
f03b4789
NN
429 arm-*-coff | strongarm-*-coff | xscale-*-coff)
430 noconfigdirs="$noconfigdirs ${libgcj}"
431 ;;
432 arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
433 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
434 ;;
252b5132 435 arm-*-pe*)
75205f78 436 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132 437 ;;
252b5132 438 arm-*-oabi*)
75205f78 439 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132 440 ;;
252b5132 441 thumb-*-coff)
75205f78 442 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132 443 ;;
252b5132 444 thumb-*-elf)
75205f78 445 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132
RH
446 ;;
447 thumb-*-oabi)
75205f78 448 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132 449 ;;
347dad9e 450 thumb-*-pe)
75205f78 451 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132
RH
452 ;;
453 arm-*-riscix*)
75205f78 454 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
252b5132 455 ;;
c95f53ae
MM
456 avr-*-*)
457 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
458 ;;
ff72e302 459 c4x-*-* | tic4x-*-*)
e3b0c936 460 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
077b8428
NC
461 ;;
462 c54x*-*-* | tic54x-*-*)
75205f78
DD
463 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} gcc gdb newlib"
464 ;;
465 cris-*-*)
466 noconfigdirs="$noconfigdirs ${libgcj}"
077b8428 467 ;;
252b5132 468 d10v-*-*)
e3b0c936 469 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
252b5132 470 ;;
252b5132 471 d30v-*-*)
75205f78 472 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132 473 ;;
252b5132 474 fr30-*-elf*)
75205f78 475 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132 476 ;;
d2a86414
DB
477 frv-*-*)
478 noconfigdirs="$noconfigdirs ${libgcj}"
d2a86414 479 ;;
dd1e52a4
JH
480 h8300*-*-*)
481 noconfigdirs="$noconfigdirs target-libgloss"
482 ;;
252b5132 483 h8500-*-*)
e3b0c936 484 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj} target-libf2c"
75205f78
DD
485 ;;
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"
252b5132
RH
491 ;;
492 hppa*-*-*elf* | \
75205f78 493 parisc*-*-linux* | hppa*-*-linux* | \
09e90eb4 494 hppa*-*-lites* | \
17240c1f 495 hppa*-*-openbsd* | \
09e90eb4 496 hppa*64*-*-*)
75205f78 497 noconfigdirs="$noconfigdirs ${libgcj}"
ba73c63f 498 # Do configure ld/binutils/gas for this case.
252b5132
RH
499 ;;
500 hppa*-*-*)
b3ed1d6b
AO
501 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
502 # build on HP-UX 10.20.
503 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
252b5132 504 ;;
2315914d
JW
505 ia64*-*-elf*)
506 # No gdb support yet.
507 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
508 ;;
a0c1c920
NC
509 ia64*-**-hpux*)
510 # No gdb or ld support yet.
511 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
512 ;;
a0da8069 513 i[[3456]]86-*-coff | i[[3456]]86-*-elf)
75205f78 514 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132 515 ;;
a0da8069 516 i[[34567]]86-*-freebsd*)
ffb97b2f
DD
517 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
518 ;;
a0da8069 519 i[[3456]]86-*-linux*)
28f46298
HPN
520 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
521 # not build java stuff by default.
522 case "${target}" in
523 *-*-*libc1*)
524 noconfigdirs="$noconfigdirs ${libgcj}";;
525 esac
526
c72f388d
TF
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.
a018e15b 529 if test x${is_cross_compiler} != xno ; then
c72f388d
TF
530 noconfigdirs="$noconfigdirs target-newlib"
531 fi
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.
c72f388d 537 ;;
a0da8069 538 i[[3456]]86-*-mingw32*)
252b5132 539 target_configdirs="$target_configdirs target-mingw"
b1af961c 540 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
252b5132
RH
541
542 # Can't build gdb for mingw32 if not native.
543 case "${host}" in
a0da8069 544 i[[3456]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
252b5132
RH
545 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db snavigator gnuserv"
546 ;;
547 esac
548 ;;
549 *-*-cygwin*)
550 target_configdirs="$target_configdirs target-libtermcap target-winsup"
b1af961c 551 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
252b5132
RH
552 # always build newlib.
553 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
554
555 # Can't build gdb for Cygwin if not native.
556 case "${host}" in
557 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
558 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui db snavigator gnuserv"
559 ;;
560 esac
561 ;;
a0da8069 562 i[[3456]]86-*-pe)
e3b0c936 563 noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss ${libgcj}"
252b5132 564 ;;
a0da8069 565 i[[3456]]86-*-sco3.2v5*)
252b5132
RH
566 # The linker does not yet know about weak symbols in COFF,
567 # and is not configured to handle mixed ELF and COFF.
75205f78 568 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
252b5132 569 ;;
a0da8069 570 i[[3456]]86-*-sco*)
75205f78 571 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
252b5132 572 ;;
a0da8069 573 i[[3456]]86-*-solaris2*)
252b5132
RH
574 noconfigdirs="$noconfigdirs target-libgloss"
575 ;;
a0da8069 576 i[[3456]]86-*-sysv4*)
e99daf2b 577 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132 578 ;;
a0da8069 579 i[[3456]]86-*-beos*)
b1af961c 580 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
252b5132 581 ;;
75205f78
DD
582 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
583 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
f9e0997d 584 ;;
75205f78
DD
585 m68k-*-elf*)
586 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132
RH
587 ;;
588 m68k-*-coff*)
75205f78 589 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132 590 ;;
75205f78
DD
591 mcore-*-pe*)
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"
595 ;;
596 mmix-*-*)
95c72c44 597 noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
75205f78 598 ;;
252b5132 599 mn10200-*-*)
75205f78 600 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132
RH
601 ;;
602 mn10300-*-*)
75205f78 603 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132
RH
604 ;;
605 powerpc-*-aix*)
606 # copied from rs6000-*-* entry
07637366 607 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
252b5132
RH
608 ;;
609 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
610 target_configdirs="$target_configdirs target-winsup"
75205f78 611 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv ${libgcj}"
252b5132
RH
612 # always build newlib.
613 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
614 ;;
615 # This is temporary until we can link against shared libraries
616 powerpcle-*-solaris*)
75205f78 617 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv ${libgcj}"
ba73c63f
JM
618 ;;
619 powerpc-*-beos*)
75205f78 620 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
252b5132 621 ;;
c0292023 622 powerpc-*-darwin*)
bbf7c8ac 623 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof ${libgcj}"
c0292023 624 ;;
252b5132 625 powerpc-*-eabi)
75205f78 626 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132 627 ;;
574e6d11
DD
628 powerpc64*-*-linux*)
629 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
630 # not yet ported.
631 noconfigdirs="$noconfigdirs target-libffi"
632 ;;
252b5132 633 rs6000-*-lynxos*)
07637366 634 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
252b5132
RH
635 ;;
636 rs6000-*-aix*)
75205f78 637 noconfigdirs="$noconfigdirs gprof ${libgcj}"
252b5132
RH
638 ;;
639 rs6000-*-*)
75205f78 640 noconfigdirs="$noconfigdirs gprof ${libgcj}"
252b5132
RH
641 ;;
642 m68k-apollo-*)
75205f78 643 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
252b5132
RH
644 ;;
645 mips*-*-irix5*)
646 # The GNU linker does not support shared libraries.
e99daf2b 647 noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
252b5132
RH
648 ;;
649 mips*-*-irix6*)
106117aa 650 # The GNU assembler does not support IRIX 6.
b3ed1d6b
AO
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>
e99daf2b 655 noconfigdirs="$noconfigdirs gas gprof target-libgloss ${libgcj}"
252b5132
RH
656 ;;
657 mips*-dec-bsd*)
75205f78 658 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
252b5132
RH
659 ;;
660 mips*-*-bsd*)
75205f78 661 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
252b5132
RH
662 ;;
663 mipstx39-*-*)
75205f78 664 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
252b5132 665 ;;
fad93c55 666 mips*-*-linux*)
574e6d11 667 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
fad93c55 668 ;;
252b5132 669 mips*-*-*)
75205f78 670 noconfigdirs="$noconfigdirs gprof ${libgcj}"
252b5132
RH
671 ;;
672 romp-*-*)
75205f78 673 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
252b5132
RH
674 ;;
675 sh-*-*)
676 case "${host}" in
a0da8069
NN
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
252b5132
RH
680 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
681 esac
75205f78 682 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132 683 ;;
20a5393b
AO
684 sh64-*-*)
685 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
686 ;;
252b5132 687 sparc-*-elf*)
d5ec694c 688 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132
RH
689 ;;
690 sparc64-*-elf*)
d5ec694c 691 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132
RH
692 ;;
693 sparclite-*-*)
75205f78 694 noconfigdirs="$noconfigdirs ${libgcj}"
252b5132
RH
695 ;;
696 sparc-*-sunos4*)
75205f78 697 noconfigdirs="$noconfigdirs ${libgcj}"
a0c4f3a0 698 if test x${is_cross_compiler} != xno ; then
c74222f7 699 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
252b5132
RH
700 else
701 use_gnu_ld=no
702 fi
703 ;;
3a036cdc 704 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
b3ed1d6b 705 ;;
252b5132 706 v810-*-*)
75205f78 707 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss ${libgcj}"
252b5132
RH
708 ;;
709 v850-*-*)
75205f78 710 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132 711 ;;
347dad9e 712 v850e-*-*)
75205f78 713 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
252b5132
RH
714 ;;
715 v850ea-*-*)
75205f78 716 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
347dad9e 717 ;;
252b5132 718 vax-*-vms)
75205f78 719 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
252b5132
RH
720 ;;
721 vax-*-*)
75205f78 722 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
96ce09a7 723 ;;
f48556b1
DD
724 ip2k-*-*)
725 noconfigdirs="$noconfigdirs target-libiberty ${libstdcxx_version} ${libgcj}"
726 ;;
574e6d11
DD
727 *-*-linux*)
728 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
729 ;;
252b5132 730 *-*-lynxos*)
75205f78 731 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
252b5132 732 ;;
75205f78
DD
733 *-*-*)
734 noconfigdirs="$noconfigdirs ${libgcj}"
735 ;;
252b5132
RH
736esac
737
738# If we aren't building newlib, then don't build libgloss, since libgloss
739# depends upon some newlib header files.
740case "${noconfigdirs}" in
741 *target-libgloss*) ;;
742 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
f48556b1 743esac
252b5132 744
6ee6cea6
AO
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
748# go away some day.
922b2485 749# NB: embedded tabs in this IF block -- do not untabify
6ee6cea6
AO
750if test x"${enable_languages+set}" != xset; then
751 if test x"${LANGUAGES+set}" = xset; then
922b2485
DD
752 enable_languages="${LANGUAGES}"
753 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
6ee6cea6
AO
754 else
755 enable_languages=all
756 fi
757else
922b2485
DD
758 if test x"${enable_languages}" = x ||
759 test x"${enable_languages}" = xyes;
760 then
761 echo configure.in: --enable-languages needs at least one language argument 1>&2
6ee6cea6
AO
762 exit 1
763 fi
764fi
a0da8069 765enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
922b2485 766
75205f78
DD
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.
770for lang in ${srcdir}/gcc/*/config-lang.in ..
771do
772 case $lang in
773 ..)
774 ;;
775 # The odd quoting in the next line works around
776 # an apparent bug in bash 1.12 on linux.
a0da8069 777 ${srcdir}/gcc/[[*]]/config-lang.in)
75205f78
DD
778 ;;
779 *)
a0da8069
NN
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`
75205f78
DD
782 for other in $this_lang_requires
783 do
784 case ,${enable_languages}, in
785 *,$other,*)
786 ;;
787 *,all,*)
788 ;;
789 *,$lang_alias,*)
790 echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
791 enable_languages="$enable_languages,$other"
792 ;;
793 esac
794 done
795 ;;
796 esac
797done
798
6ee6cea6
AO
799subdirs=
800for lang in ${srcdir}/gcc/*/config-lang.in ..
801do
802 case $lang in
803 ..) ;;
804 # The odd quoting in the next line works around
805 # an apparent bug in bash 1.12 on linux.
a0da8069 806 ${srcdir}/gcc/[[*]]/config-lang.in) ;;
6ee6cea6 807 *)
a0da8069
NN
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`
6ee6cea6
AO
812 if test "x$lang_alias" = x
813 then
814 echo "$lang doesn't set \$language." 1>&2
815 exit 1
816 fi
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 ;;
822 esac
823 if test x"${add_this_lang}" = xyes; then
824 eval target_libs='"$target_libs "'\"$this_lang_libs\"
825 else
75205f78 826 eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
6ee6cea6
AO
827 fi
828 ;;
829 esac
830done
831
252b5132
RH
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.
835
836notsupp=""
837for dir in . $skipdirs $noconfigdirs ; do
838 dirname=`echo $dir | sed -e s/target-//g`
a0c4f3a0 839 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
252b5132 840 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
405ea7a0 841 if test -r $srcdir/$dirname/configure ; then
252b5132
RH
842 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
843 true
844 else
845 notsupp="$notsupp $dir"
846 fi
847 fi
848 fi
a0c4f3a0 849 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
252b5132 850 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
405ea7a0 851 if test -r $srcdir/$dirname/configure ; then
252b5132
RH
852 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
853 true
854 else
855 notsupp="$notsupp $dir"
856 fi
857 fi
858 fi
859done
860
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.
a0c4f3a0 863if test -n "${target_configdirs}" ; then
252b5132
RH
864 others=
865 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
a0c4f3a0 866 if test "$i" != "libiberty" ; then
405ea7a0 867 if test -r $srcdir/$i/configure ; then
252b5132
RH
868 others=yes;
869 break;
870 fi
871 fi
872 done
a0c4f3a0 873 if test -z "${others}" ; then
252b5132
RH
874 target_configdirs=
875 fi
876fi
877
f48556b1
DD
878# Deconfigure all subdirectories, in case we are changing the
879# configuration from one where a subdirectory is supported to one where it
880# is not.
881if test -z "${norecursion}" && test -n "${configdirs}" ; then
882 for i in `echo ${configdirs} | sed -e s/target-//g` ; do
883 rm -f $i/Makefile
884 done
885fi
886if 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
889 done
890fi
891
892# Quietly strip out all directories which aren't configurable in this tree.
893# This relies on all configurable subdirectories being autoconfiscated, which
894# is now the case.
895configdirs_all="$configdirs"
896configdirs=
897for i in ${configdirs_all} ; do
898 if test -f ${srcdir}/$i/configure ; then
899 configdirs="${configdirs} $i"
900 fi
901done
902target_configdirs_all="$target_configdirs"
903target_configdirs=
904for 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"
908 fi
909done
910
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.
915
916if 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
925 appdirs=""
926 break
927 fi
928 if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
929 appdirs=""
930 break
931 fi
932 fi
933 done
934 if test -n "$appdirs" ; then
935 echo "*** This configuration is not supported by this package." 1>&2
936 exit 1
937 fi
938 fi
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
944fi
945
946case "$host" in
947 *msdosdjgpp*)
948 enable_gdbtk=no ;;
949esac
f48556b1
DD
950
951copy_dirs=
952
bdc57bfd
JT
953# Handle --with-headers=XXX. If the value is not "yes", the contents of
954# the named directory are copied to $(tooldir)/sys-include.
f48556b1
DD
955if 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
958 exit 1
959 fi
bdc57bfd
JT
960 if test x"${with_headers}" != xyes ; then
961 case "${exec_prefixoption}" in
962 "") x=${prefix} ;;
963 *) x=${exec_prefix} ;;
964 esac
965 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
966 fi
f48556b1
DD
967fi
968
bdc57bfd
JT
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
971# are permitted.
f48556b1
DD
972if 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
975 exit 1
976 fi
bdc57bfd
JT
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
981 "") x=${prefix} ;;
982 *) x=${exec_prefix} ;;
983 esac
984 for l in ${with_libs}; do
985 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
986 done
987 fi
f48556b1
DD
988fi
989
990# Handle ${copy_dirs}
991set fnord ${copy_dirs}
992shift
993while test $# != 0 ; do
994 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
995 :
996 else
997 echo Copying $1 to $2
998
999 # Use the install script to create the directory and all required
1000 # parent directories.
1001 if test -d $2 ; then
1002 :
1003 else
1004 echo >config.temp
1005 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
1006 fi
1007
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 -)
1011
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.
1015
1016 echo $1 > $2/COPIED
1017 fi
1018 shift; shift
1019done
1020
1021# Work in distributions that contain no compiler tools, like Autoconf.
1022tentative_cc=""
a0da8069 1023host_makefile_frag=/dev/null
f48556b1
DD
1024if test -d ${srcdir}/config ; then
1025case "${host}" in
1026 m68k-hp-hpux*)
1027 # Avoid "too much defining" errors from HPUX compiler.
1028 tentative_cc="cc -Wp,-H256000"
a0da8069
NN
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.
1031 RANLIB="ar ts"
f48556b1
DD
1032 ;;
1033 m68k-apollo-sysv*)
1034 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
f48556b1
DD
1035 ;;
1036 m68k-apollo-bsd*)
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
a0da8069 1043 # Used to have BISON=yacc.
f48556b1 1044 tentative_cc=gcc
f48556b1
DD
1045 ;;
1046 m88k-dg-dgux*)
1047 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1048 host_makefile_frag="config/mh-dgux"
1049 ;;
1050 m88k-harris-cxux*)
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"
1054 ;;
1055 m88k-motorola-sysv*)
f48556b1
DD
1056 ;;
1057 mips*-dec-ultrix*)
1058 tentative_cc="cc -Wf,-XNg1000"
1059 host_makefile_frag="config/mh-decstation"
1060 ;;
1061 mips*-nec-sysv4*)
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"
1065 ;;
f48556b1
DD
1066 mips*-sgi-irix4*)
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"
1071 ;;
f48556b1
DD
1072 mips*-*-sysv4*)
1073 host_makefile_frag="config/mh-sysv4"
1074 ;;
1075 mips*-*-sysv*)
1076 # This is for a MIPS running RISC/os 4.52C.
1077
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.
1085 #
1086 # This is not part of CFLAGS because perhaps not all C compilers have this
1087 # option.
1088 tentative_cc="cc -systype sysv"
f48556b1
DD
1089 ;;
1090 i370-ibm-opened*)
1091 tentative_cc="c89"
f48556b1 1092 ;;
a0da8069 1093 i[[3456]]86-*-sysv5*)
f48556b1
DD
1094 host_makefile_frag="config/mh-sysv5"
1095 ;;
a0da8069 1096 i[[3456]]86-*-dgux*)
f48556b1
DD
1097 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1098 host_makefile_frag="config/mh-dgux386"
1099 ;;
a0da8069 1100 i[[3456]]86-ncr-sysv4.3*)
f48556b1
DD
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"
f48556b1 1104 ;;
a0da8069 1105 i[[3456]]86-ncr-sysv4*)
f48556b1
DD
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"
1113 ;;
a0da8069 1114 i[[3456]]86-*-sco3.2v5*)
f48556b1 1115 ;;
a0da8069 1116 i[[3456]]86-*-sco*)
f48556b1
DD
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"
1121 ;;
a0da8069 1122 i[[3456]]86-*-udk*)
f48556b1
DD
1123 host_makefile_frag="config/mh-sysv5"
1124 ;;
a0da8069 1125 i[[3456]]86-*-solaris2*)
f48556b1
DD
1126 host_makefile_frag="config/mh-sysv4"
1127 ;;
a0da8069 1128 i[[3456]]86-*-msdosdjgpp*)
f48556b1
DD
1129 host_makefile_frag="config/mh-djgpp"
1130 ;;
1131 *-cygwin*)
1132 host_makefile_frag="config/mh-cygwin"
1133 ;;
1134 *-mingw32*)
1135 host_makefile_frag="config/mh-mingw32"
1136 ;;
1137 *-interix*)
1138 host_makefile_frag="config/mh-interix"
1139 ;;
1140 vax-*-ultrix2*)
1141 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1142 tentative_cc=gcc
1143 ;;
1144 *-*-solaris2*)
1145 host_makefile_frag="config/mh-solaris"
1146 ;;
1147 m68k-sun-sunos*)
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"
1151 ;;
f48556b1
DD
1152 *-hp-hpux*)
1153 tentative_cc="cc -Wp,-H256000"
f48556b1
DD
1154 ;;
1155 *-*-hiux*)
1156 tentative_cc="cc -Wp,-H256000"
f48556b1
DD
1157 ;;
1158 rs6000-*-lynxos*)
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"
1162 ;;
1163 *-*-lynxos*)
1164 # /bin/cc is less than useful for our purposes. Always use GCC
1165 tentative_cc="/bin/gcc"
1166 ;;
1167 *-*-sysv4*)
1168 host_makefile_frag="config/mh-sysv4"
1169 ;;
f48556b1
DD
1170esac
1171fi
1172
874e38b4
NN
1173extra_arflags_for_target=
1174extra_nmflags_for_target=
1086bc09 1175extra_ranlibflags_for_target=
a0da8069 1176target_makefile_frag=/dev/null
f48556b1 1177case "${target}" in
a0da8069 1178 i[[3456]]86-*-netware*)
b6f83f2a 1179 target_makefile_frag="config/mt-netware"
f48556b1
DD
1180 ;;
1181 powerpc-*-netware*)
b6f83f2a 1182 target_makefile_frag="config/mt-netware"
f48556b1
DD
1183 ;;
1184 *-*-linux*)
b6f83f2a 1185 target_makefile_frag="config/mt-linux"
f48556b1 1186 ;;
a0da8069 1187 *-*-aix4.[[3456789]]* | *-*-aix[[56789]].*)
874e38b4
NN
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"
f48556b1 1193 ;;
1086bc09
NN
1194 *-*-darwin*)
1195 # ranlib from Darwin requires the -c flag to look at common symbols.
1196 extra_ranlibflags_for_target=" -c"
1197 ;;
f48556b1 1198 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
b6f83f2a
DD
1199 target_makefile_frag="config/mt-wince"
1200 ;;
1201esac
1202
a0da8069 1203alphaieee_frag=/dev/null
b6f83f2a
DD
1204case $target in
1205 alpha*-*-*)
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"
f48556b1
DD
1209 ;;
1210esac
a0a2c6c6 1211
f48556b1
DD
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.
a0da8069 1215ospace_frag=/dev/null
f48556b1
DD
1216case "${enable_target_optspace}:${target}" in
1217 yes:*)
b6f83f2a 1218 ospace_frag="config/mt-ospace"
f48556b1
DD
1219 ;;
1220 :d30v-*)
b6f83f2a 1221 ospace_frag="config/mt-d30v"
f48556b1
DD
1222 ;;
1223 :m32r-* | :d10v-* | :fr30-*)
b6f83f2a 1224 ospace_frag="config/mt-ospace"
f48556b1
DD
1225 ;;
1226 no:* | :*)
1227 ;;
1228 *)
1229 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
1230 ;;
1231esac
252b5132 1232
252b5132
RH
1233# Set with_gnu_as and with_gnu_ld as appropriate.
1234#
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.
1238#
1239# The command line options always override the explicit settings in
1240# configure.in, and the settings in configure.in override this magic.
1241#
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.
1245
f48556b1
DD
1246if test x${use_gnu_as} = x &&
1247 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
1248 with_gnu_as=yes
ae831be5 1249 extra_host_args="$extra_host_args --with-gnu-as"
252b5132
RH
1250fi
1251
f48556b1
DD
1252if test x${use_gnu_ld} = x &&
1253 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
1254 with_gnu_ld=yes
ae831be5 1255 extra_host_args="$extra_host_args --with-gnu-ld"
252b5132
RH
1256fi
1257
ae831be5 1258# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
252b5132
RH
1259# can detect this case.
1260
f48556b1 1261if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
252b5132 1262 with_newlib=yes
ae831be5 1263 extra_host_args="$extra_host_args --with-newlib"
252b5132
RH
1264fi
1265
f48556b1
DD
1266# We default to --with-shared on platforms where -fpic is meaningless.
1267# Well, we don't yet, but we will.
1268if false && test "${host}" = "${target}" && test x${enable_shared} = x ; then
1269 case "${target}" in
1270 alpha*-dec-osf*) enable_shared=yes ;;
1271 alpha*-*-linux*) enable_shared=yes ;;
1272 mips-sgi-irix5*) enable_shared=yes ;;
1273 *) enable_shared=no ;;
1274 esac
252b5132
RH
1275fi
1276
f48556b1
DD
1277case "${enable_shared}" in
1278 yes) shared=yes ;;
1279 no) shared=no ;;
1280 "") shared=no ;;
1281 *) shared=yes ;;
c92a0210 1282esac
f48556b1
DD
1283
1284
1285# Default to using --with-stabs for certain targets.
1286if test x${with_stabs} = x ; then
1287 case "${target}" in
d7cf5d30
DD
1288 mips*-*-irix6*o32)
1289 with_stabs=yes;
ae831be5 1290 extra_host_args="${extra_host_args} --with-stabs"
d7cf5d30 1291 ;;
f48556b1
DD
1292 mips*-*-irix6*)
1293 ;;
1294 mips*-*-* | alpha*-*-osf*)
1295 with_stabs=yes;
ae831be5 1296 extra_host_args="${extra_host_args} --with-stabs"
f48556b1
DD
1297 ;;
1298 esac
1299fi
1300
1301# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
1302# them automatically.
1303case "${host}" in
1304 hppa*64*-*-hpux11*)
ae831be5 1305 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
f48556b1 1306 ;;
c92a0210
DD
1307esac
1308
227d98f5
NN
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.
1312if test -z "${CC}" && test "${build}" = "${host}" ; then
1313 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1314 found=
1315 for dir in $PATH; do
1316 test -z "$dir" && dir=.
1317 if test -f $dir/gcc; then
1318 found=yes
1319 break
1320 fi
1321 done
1322 IFS="$save_ifs"
1323 if test -z "${found}" && test -n "${tentative_cc}" ; then
1324 CC=$tentative_cc
1325 fi
1326fi
1327
a0da8069
NN
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.
1330tooldir='$(exec_prefix)'/${target_alias}
1331build_tooldir=${tooldir}
1332
1333# Generate a default definition for YACC. This is used if the makefile can't
1334# locate bison or byacc in objdir.
1335
1336for prog in 'bison -y' byacc yacc
1337do
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"
1344 break
1345 fi
1346 done
1347 IFS="$save_ifs"
1348
1349 test -n "$DEFAULT_YACC" && break
1350done
1351
1352# Generate a default definition for M4. This is used if the makefile can't
1353# locate m4 in objdir.
1354
1355for prog in gm4 gnum4 m4
1356do
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
1362 DEFAULT_M4="$prog"
1363 break
1364 fi
1365 done
1366 IFS="$save_ifs"
1367
1368 test -n "$DEFAULT_M4" && break
1369done
1370
1371# Generate a default definition for LEX. This is used if the makefile can't
1372# locate flex in objdir.
1373
1374for prog in flex lex
1375do
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
1381 DEFAULT_LEX="$prog"
1382 break
1383 fi
1384 done
1385 IFS="$save_ifs"
1386
1387 test -n "$DEFAULT_LEX" && break
1388done
1389
1390if 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.
1393
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}
1407
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
1413 YACC="bison -y"
1414 break
1415 fi
1416 if test -f $dir/byacc; then
1417 YACC=byacc
1418 break
1419 fi
1420 if test -f $dir/yacc; then
1421 YACC=yacc
1422 break
1423 fi
1424 done
1425 IFS="$save_ifs"
1426 if test -z "${YACC}" ; then
1427 YACC="bison -y"
1428 fi
1429 fi
1430
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
1436 LEX=flex
1437 break
1438 fi
1439 if test -f $dir/lex; then
1440 LEX=lex
1441 break
1442 fi
1443 done
1444 IFS="$save_ifs"
1445 LEX=${LEX-flex}
1446 fi
1447
1448else
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...
1456
1457 BISON="\$(USUAL_BISON)"
1458 CC_FOR_BUILD="\$(CC)"
1459 GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
1460 BUILD_PREFIX=
1461 BUILD_PREFIX_1=loser-
1462 MAKEINFO="\$(USUAL_MAKEINFO)"
1463 LEX="\$(USUAL_LEX)"
1464 YACC="\$(USUAL_YACC)"
1465
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
1472 CC="gcc"
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"}
1477 else
1478 CFLAGS=${CFLAGS-"-O2"}
1479 CXXFLAGS=${CXXFLAGS-"-O2"}
1480 fi
1481 rm -f conftest*
1482 break
1483 fi
1484 done
1485 IFS="$save_ifs"
1486 CC=${CC-cc}
1487 else
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.
1491 case "${CC}" in
1492 *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"}
1497 else
1498 CFLAGS=${CFLAGS-"-O2"}
1499 CXXFLAGS=${CXXFLAGS-"-O2"}
1500 fi
1501 rm -f conftest*
1502 ;;
1503 esac
1504 fi
1505 fi
1506
1507 CXX=${CXX-"c++"}
1508 CFLAGS=${CFLAGS-"-g"}
1509 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1510fi
1511
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.
1515
1516# Make the links.
1517configlinks="${links}"
1518if test -r ./config.status ; then
1519 mv -f ./config.status ./config.back
1520fi
1521while 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=$*
1525
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
1530 exit 1
1531 else
1532 srcfile=${file}
1533 fi
1534 else
1535 srcfile=${srcdir}/${file}
1536 fi
1537
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
1541 true
1542 else
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}
1547 fi
1548 if test ! -r ${link} ; then
1549 echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
1550 exit 1
1551 fi
1552
1553 echo "Linked \"${link}\" to \"${srcfile}\"."
1554done
1555
1556# Create a .gdbinit file which runs the one in srcdir
1557# and tells GDB to look there for source files.
1558
1559if test -r ${srcdir}/.gdbinit ; then
1560 case ${srcdir} in
1561 .) ;;
1562 *) cat > ./.gdbinit <<EOF
1563# ${NO_EDIT}
1564dir ${srcdir}
1565dir .
1566source ${srcdir}/.gdbinit
1567EOF
1568 ;;
1569 esac
1570fi
1571
1572# record if we want runtime library stuff installed in libsubdir.
1573# Blank means no.
1574if test -z "${enable_version_specific_runtime_libs}"; then
1575 enable_version_specific_runtime_libs=no
1576fi
252b5132
RH
1577
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.
a0c4f3a0 1582we_are_ok=no
252b5132
RH
1583echo "int main () { return 0; }" > conftest.c
1584${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
a0c4f3a0
DD
1585if test $? = 0 ; then
1586 if test -s conftest || test -s conftest.exe ; then
1587 we_are_ok=yes
1588 fi
1589fi
1590case $we_are_ok in
1591 no)
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."
1594 rm -f conftest*
1595 exit 1
1596 ;;
1597esac
252b5132
RH
1598rm -f conftest*
1599
1600# The Solaris /usr/ucb/cc compiler does not appear to work.
1601case "${host}" in
1602 sparc-sun-solaris2*)
1603 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
a0da8069 1604 if test "`type $CCBASE | sed 's/^[[^/]]*//'`" = "/usr/ucb/cc" ; then
252b5132 1605 could_use=
a0c4f3a0
DD
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
252b5132
RH
1609 could_use="/opt/cygnus/bin"
1610 else
1611 could_use="$could_use or /opt/cygnus/bin"
1612 fi
1613 fi
a0c4f3a0 1614 if test "$could_use" = "" ; then
252b5132
RH
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."
1618 else
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."
1623 fi
1624 fi
1625 ;;
1626esac
1627
1628# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
1629# binutils tools will find libbfd.so.
a0c4f3a0 1630if test "${shared}" = "yes" ; then
8607b6c9
NN
1631 SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)"
1632else
1633 SET_LIB_PATH=
252b5132 1634fi
8607b6c9
NN
1635
1636
1637case "${host}" in
1638 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
1639 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
1640esac
8607b6c9 1641
3866be5d
NN
1642# Record target_configdirs and the configure arguments for target and
1643# build configuration in Makefile.
1644target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
1645
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.
930314a4
NN
1648
1649all_build_modules=
1650configure_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.
1653if test ${host_alias} != ${build_alias} ; then
1654 all_build_modules=all-build-libiberty
1655 configure_build_modules=configure-build-libiberty
1656fi
1657
3866be5d
NN
1658all_host_modules=
1659check_host_modules=
1660install_host_modules=
930314a4 1661configure_host_modules=
3866be5d
NN
1662for 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}"
930314a4 1666 configure_host_modules="${configure_host_modules} configure-${module}"
3866be5d
NN
1667done
1668install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
1669
1670all_target_modules=
1671check_target_modules=
1672install_target_modules=
930314a4 1673configure_target_modules=
3866be5d
NN
1674for 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}"
930314a4 1678 configure_target_modules="${configure_target_modules} configure-target-${module}"
3866be5d 1679done
252b5132 1680
930314a4
NN
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.
1688case "$enable_gdbtk" in
1689 no)
1690 GDB_TK="" ;;
1691 *)
1692 GDB_TK="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui" ;;
1693esac
1694
1695# Create the 'maybe dependencies'. This uses a temporary file.
1696rm -f maybedep.tmp
1697for 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} \
1700 ; do
1701 echo "maybe-${item}: ${item}" >> maybedep.tmp
1702done
a0da8069
NN
1703maybe_dependencies=maybedep.tmp
1704AC_SUBST_FILE(maybe_dependencies)
930314a4 1705
a2cc058a
NN
1706# Create the serialization dependencies. This uses a temporary file.
1707
1708# These force 'configure's to be done one at a time, to avoid problems
1709# with contention over a shared config.cache.
1710rm -f serdep.tmp
1711olditem=
1712for item in ${build_configdirs} ; do
1713 case ${olditem} in
1714 "") ;;
1715 *) echo "\$(BUILD_SUBDIR)/${item}/Makefile: \$(BUILD_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
1716 esac
1717 olditem=${item}
1718done
1719olditem=
1720for item in ${configdirs} ; do
1721 case ${olditem} in
1722 "") ;;
1723 *) echo "${item}/Makefile: ${olditem}/Makefile" >> serdep.tmp ;;
1724 esac
1725 olditem=${item}
1726done
1727olditem=
1728for item in ${target_configdirs} ; do
1729 case ${olditem} in
1730 "") ;;
1731 *) echo "\$(TARGET_SUBDIR)/${item}/Makefile: \$(TARGET_SUBDIR)/${olditem}/Makefile" >> serdep.tmp ;;
1732 esac
1733 olditem=${item}
1734done
a0da8069
NN
1735serialization_dependencies=serdep.tmp
1736AC_SUBST_FILE(serialization_dependencies)
a2cc058a 1737
91e060aa
DD
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.
a0da8069
NN
1740baseargs=`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-]]*=[[^ ]]*//'`
252b5132 1747
49b7683b
DD
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
1750# desired.
a0da8069 1751build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
91e060aa 1752
ae831be5
NN
1753# For host modules, accept cache file option, or specification as blank.
1754case "${cache_file}" in
1755"") # empty
1756 cache_file_option="" ;;
a0da8069 1757/* | [[A-Za-z]]:[[\\/]]* ) # absolute path
ae831be5
NN
1758 cache_file_option="--cache-file=${cache_file}" ;;
1759*) # relative path
1760 cache_file_option="--cache-file=../${cache_file}" ;;
1761esac
1762
a0da8069 1763host_configargs="${cache_file_option} ${buildopt} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
ae831be5 1764
a0da8069 1765target_configargs=${baseargs}
49b7683b 1766
252b5132
RH
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.
a0c4f3a0 1772if test x${is_cross_compiler} = xyes ; then
a0da8069 1773 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
252b5132
RH
1774fi
1775
1776# Default to --enable-multilib.
a0c4f3a0 1777if test x${enable_multilib} = x ; then
a0da8069 1778 target_configargs="--enable-multilib ${target_configargs}"
252b5132
RH
1779fi
1780
1781# Pass --with-newlib if appropriate. Note that target_configdirs has
1782# changed from the earlier setting of with_newlib.
a0c4f3a0 1783if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
a0da8069 1784 target_configargs="--with-newlib ${target_configargs}"
252b5132
RH
1785fi
1786
49b7683b 1787# Pass the appropriate --host, --build, and --cache-file arguments.
a0da8069 1788target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
49b7683b 1789
252b5132
RH
1790# provide a proper gxx_include_dir.
1791# Note, if you change the default, make sure to fix both here and in
75205f78 1792# the gcc and libstdc++-v3 subdirectories.
252b5132
RH
1793# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
1794gxx_include_dir=
1795if test -n "${with_gxx_include_dir}"; then
1796 case "${with_gxx_include_dir}" in
1797 yes )
1798 echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
1799 exit 1
1800 ;;
1801 no )
1802 ;;
1803 * )
1804 gxx_include_dir=${with_gxx_include_dir}
1805 ;;
1806 esac
1807fi
1808if test x${gxx_include_dir} = x; then
1809 if test x${enable_version_specific_runtime_libs} = xyes; then
edd1b227 1810 gxx_include_dir='${libsubdir}/include/c++'
252b5132 1811 else
4d5fd396 1812 . ${srcdir}/config.if
75205f78 1813 gxx_include_dir='${prefix}/include/${libstdcxx_incdir}'
252b5132
RH
1814 fi
1815else
1816 gxx_include_dir=${gxx_include_dir}
1817fi
1818
9e449d3e 1819FLAGS_FOR_TARGET=
7c1f909c 1820case " $target_configdirs " in
75205f78 1821 *" newlib "*)
a0da8069 1822 case " $target_configargs " in
75205f78 1823 *" --with-newlib "*)
9e449d3e 1824 case "$target" in
63266560 1825 *-cygwin*)
9e449d3e
AO
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' ;;
1827 esac
1828
7450026c 1829 # If we're not building GCC, don't discard standard headers.
4d5fd396 1830 if test -d ${srcdir}/gcc; then
63266560 1831 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
7450026c
AO
1832
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
1838 # them explicitly.
1839 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
1840
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
1848 # files.
1849 fi
63266560
DD
1850 fi
1851
0a0d0041 1852 case "${target}-${is_cross_compiler}" in
a0da8069 1853 i[[3456]]86-*-linux*-no)
0a0d0041
TF
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 / /'`
0a0d0041
TF
1857 ;;
1858 *)
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
1861 # switch).
1862 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
1863 ;;
1864 esac
9e449d3e 1865 ;;
75205f78
DD
1866 esac
1867 ;;
9e449d3e 1868esac
63266560
DD
1869
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.
4d5fd396 1874if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
9e449d3e
AO
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'
1877fi
63266560 1878
7c1f909c 1879if test "x${use_gnu_ld}" = x &&
f48556b1 1880 echo " ${configdirs} " | grep " ld " > /dev/null ; then
9e449d3e
AO
1881 # Arrange for us to find uninstalled linker scripts.
1882 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
1883fi
1884
63266560
DD
1885if test "x${CC_FOR_TARGET+set}" = xset; then
1886 :
4d5fd396 1887elif test -d ${srcdir}/gcc; then
98fbe43f 1888 CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
9e449d3e
AO
1889elif test "$host" = "$target"; then
1890 CC_FOR_TARGET='$(CC)'
1891else
1892 CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
1893fi
a0da8069 1894CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
9e449d3e 1895
75205f78
DD
1896if test "x${GCJ_FOR_TARGET+set}" = xset; then
1897 :
4d5fd396 1898elif test -d ${srcdir}/gcc; then
75205f78
DD
1899 GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
1900elif test "$host" = "$target"; then
1901 GCJ_FOR_TARGET='gcj'
1902else
1903 GCJ_FOR_TARGET=`echo gcj | sed -e 's/x/x/' ${program_transform_name}`
1904fi
a0da8069 1905GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
75205f78 1906
8ee424c0 1907# Don't use libstdc++-v3's flags to configure/build itself.
930314a4
NN
1908libstdcxx_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'
1909raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
8ee424c0 1910
63266560
DD
1911if test "x${CXX_FOR_TARGET+set}" = xset; then
1912 :
4d5fd396 1913elif test -d ${srcdir}/gcc; then
2e8357fc
AO
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.
930314a4
NN
1917 # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
1918 # all other cases.
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
9e449d3e
AO
1921elif test "$host" = "$target"; then
1922 CXX_FOR_TARGET='$(CXX)'
930314a4 1923 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
9e449d3e
AO
1924else
1925 CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}`
930314a4 1926 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
9e449d3e 1927fi
a0da8069
NN
1928CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
1929RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
930314a4 1930
a0da8069
NN
1931qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
1932qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[[&%]],\\\&,g'`
dec0cb0c
AO
1933
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
1939# macros.
a0da8069
NN
1940qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
1941qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[[$]][[$]],$$$$,g'`
1942
1943# Wrap CC_FOR_TARGET and friends, for certain types of builds.
1944CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
1945GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
1946CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
1947RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
1948CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
1949RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
1950
1951# Makefile fragments.
1952host_makefile_frag=${srcdir}/${host_makefile_frag}
1953target_makefile_frag=${srcdir}/${target_makefile_frag}
1954alphaieee_frag=${srcdir}/${alphaieee_frag}
1955ospace_frag=${srcdir}/${ospace_frag}
1956AC_SUBST_FILE(host_makefile_frag)
1957AC_SUBST_FILE(target_makefile_frag)
1958AC_SUBST_FILE(alphaieee_frag)
1959AC_SUBST_FILE(ospace_frag)
1960
1961# Miscellanea: directories, flags, etc.
1962AC_SUBST(SET_LIB_PATH)
1963AC_SUBST(RPATH_ENVVAR)
1964AC_SUBST(BUILD_PREFIX)
1965AC_SUBST(BUILD_PREFIX_1)
1966AC_SUBST(configlinks)
1967AC_SUBST(enable_shared)
1968AC_SUBST(enable_threads)
1969AC_SUBST(enable_version_specific_runtime_libs)
1970AC_SUBST(gcc_version_trigger)
1971AC_SUBST(gcc_version)
1972AC_SUBST(tooldir)
1973AC_SUBST(build_tooldir)
1974AC_SUBST(GDB_TK)
1975AC_SUBST(gxx_include_dir)
1976AC_SUBST(libstdcxx_incdir)
1977
1978# Build module lists & subconfigure args.
1979AC_SUBST(build_subdir)
1980AC_SUBST(build_configargs)
1981AC_SUBST(configure_build_modules)
1982AC_SUBST(all_build_modules)
1983
1984# Host module lists & subconfigure args.
1985AC_SUBST(host_configargs)
1986AC_SUBST(configdirs)
1987AC_SUBST(configure_host_modules)
1988AC_SUBST(all_host_modules)
1989AC_SUBST(check_host_modules)
1990AC_SUBST(install_host_modules)
1991AC_SUBST(install_host_modules_nogcc)
1992
1993# Target module lists & subconfigure args.
1994AC_SUBST(target_subdir)
1995AC_SUBST(target_configargs)
1996AC_SUBST(target_configdirs)
1997AC_SUBST(configure_target_modules)
1998AC_SUBST(all_target_modules)
1999AC_SUBST(check_target_modules)
2000AC_SUBST(install_target_modules)
2001
2002# Build tools.
2003AC_SUBST(BISON)
2004AC_SUBST(CC_FOR_BUILD)
2005AC_SUBST(LEX)
2006AC_SUBST(MAKEINFO)
2007AC_SUBST(YACC)
2008AC_SUBST(config_shell)
2009
2010# Host tools.
2011AC_CHECK_TOOL(AR, ar)
2012AC_CHECK_TOOL(AS, as)
2013AC_CHECK_TOOL(DLLTOOL, dlltool)
2014AC_CHECK_TOOL(LD, ld)
2015AC_CHECK_TOOL(NM, nm)
2016AC_CHECK_TOOL(RANLIB, ranlib, :)
2017AC_CHECK_TOOL(WINDRES, windres)
2018AC_CHECK_TOOL(OBJCOPY, objcopy)
2019AC_CHECK_TOOL(OBJDUMP, objdump)
2020AC_SUBST(CC)
2021AC_SUBST(CXX)
2022AC_SUBST(CFLAGS)
2023AC_SUBST(CXXFLAGS)
2024AC_SUBST(DEFAULT_YACC)
2025AC_SUBST(DEFAULT_LEX)
2026AC_SUBST(DEFAULT_M4)
2027
2028# Target tools.
2029NCN_CHECK_TARGET_TOOL(AR_FOR_TARGET, ar)
2030NCN_CHECK_TARGET_TOOL(AS_FOR_TARGET, as)
2031NCN_CHECK_TARGET_TOOL(DLLTOOL_FOR_TARGET, dlltool)
2032NCN_CHECK_TARGET_TOOL(LD_FOR_TARGET, ld)
2033NCN_CHECK_TARGET_TOOL(NM_FOR_TARGET, nm)
2034NCN_CHECK_TARGET_TOOL(RANLIB_FOR_TARGET, ranlib, :)
2035NCN_CHECK_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
2036
2037AC_SUBST(GCC_FOR_TARGET)
2038AC_SUBST(FLAGS_FOR_TARGET)
2039AC_SUBST(CC_FOR_TARGET)
2040AC_SUBST(GCJ_FOR_TARGET)
2041AC_SUBST(CXX_FOR_TARGET)
2042AC_SUBST(RAW_CXX_FOR_TARGET)
2043AC_SUBST(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
2044AC_SUBST(RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)
2045
2046# Fix up target tools.
2047if 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)"
2061fi
2062# Certain tools may need extra flags.
2063AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
2064RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
2065NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
252b5132 2066
a0da8069 2067AC_OUTPUT(Makefile)
This page took 0.304456 seconds and 4 git commands to generate.