3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 --enable-libada Builds libada directory"
17 --with-mpfr-dir=PATH Specify source directory for MPFR library"
19 --with-mpfr=PATH Specify directory for installed MPFR library"
21 --with-gmp-dir=PATH Specify source directory for GMP library"
23 --with-gmp=PATH Specify directory for installed GMP library"
25 --enable-bootstrap[=lean] Enable bootstrapping [no]"
27 --enable-serial-[{host,target,build}-]configure
28 Force sequential configuration of
29 sub-packages for the host, target or build
30 machine, or all sub-packages"
32 --enable-maintainer-mode enable make rules and dependencies not useful
33 (and sometimes confusing) to the casual installer"
35 --enable-werror enable -Werror in bootstrap stage2 and later"
37 # Initialize some variables set by options.
38 # The variables have the same names as the options, with
39 # dashes changed to underlines.
41 cache_file=./config.cache
50 program_transform_name=s,x,x,
59 bindir='${exec_prefix}/bin'
60 sbindir='${exec_prefix}/sbin'
61 libexecdir='${exec_prefix}/libexec'
62 datadir='${prefix}/share'
63 sysconfdir='${prefix}/etc'
64 sharedstatedir='${prefix}/com'
65 localstatedir='${prefix}/var'
66 libdir='${exec_prefix}/lib'
67 includedir='${prefix}/include'
68 oldincludedir='/usr/include'
69 infodir='${prefix}/info'
70 mandir='${prefix}/man'
72 # Initialize some other variables.
75 SHELL=${CONFIG_SHELL-/bin/sh}
76 # Maximum number of lines to put in a shell here document.
83 # If the previous option needs an argument, assign it.
84 if test -n "$ac_prev"; then
85 eval "$ac_prev=\$ac_option"
91 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
95 # Accept the important Cygnus configure options, so we can diagnose typos.
99 -bindir | --bindir | --bindi | --bind | --bin | --bi)
101 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
102 bindir="$ac_optarg" ;;
104 -build | --build | --buil | --bui | --bu)
106 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
107 build="$ac_optarg" ;;
109 -cache-file | --cache-file | --cache-fil | --cache-fi \
110 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
111 ac_prev=cache_file ;;
112 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
113 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
114 cache_file="$ac_optarg" ;;
116 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
118 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
120 datadir="$ac_optarg" ;;
122 -disable-* | --disable-*)
123 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
124 # Reject names that are not valid shell variable names.
125 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
126 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
128 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
129 eval "enable_${ac_feature}=no" ;;
131 -enable-* | --enable-*)
132 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
133 # Reject names that are not valid shell variable names.
134 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
135 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
137 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142 eval "enable_${ac_feature}='$ac_optarg'" ;;
144 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
145 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
146 | --exec | --exe | --ex)
147 ac_prev=exec_prefix ;;
148 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
149 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
150 | --exec=* | --exe=* | --ex=*)
151 exec_prefix="$ac_optarg" ;;
153 -gas | --gas | --ga | --g)
154 # Obsolete; use --with-gas.
157 -help | --help | --hel | --he)
158 # Omit some internal or obsolete options to make the list less imposing.
159 # This message is too long to be a string in the A/UX 3.1 sh.
161 Usage: configure [options] [host]
162 Options: [defaults in brackets after descriptions]
164 --cache-file=FILE cache test results in FILE
165 --help print this message
166 --no-create do not create output files
167 --quiet, --silent do not print \`checking...' messages
168 --site-file=FILE use FILE as the site file
169 --version print the version of autoconf that created configure
170 Directory and file names:
171 --prefix=PREFIX install architecture-independent files in PREFIX
173 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
175 --bindir=DIR user executables in DIR [EPREFIX/bin]
176 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
177 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
178 --datadir=DIR read-only architecture-independent data in DIR
180 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
181 --sharedstatedir=DIR modifiable architecture-independent data in DIR
183 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
184 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
185 --includedir=DIR C header files in DIR [PREFIX/include]
186 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
187 --infodir=DIR info documentation in DIR [PREFIX/info]
188 --mandir=DIR man documentation in DIR [PREFIX/man]
189 --srcdir=DIR find the sources in DIR [configure dir or ..]
190 --program-prefix=PREFIX prepend PREFIX to installed program names
191 --program-suffix=SUFFIX append SUFFIX to installed program names
192 --program-transform-name=PROGRAM
193 run sed PROGRAM on installed program names
197 --build=BUILD configure for building on BUILD [BUILD=HOST]
198 --host=HOST configure for HOST [guessed]
199 --target=TARGET configure for TARGET [TARGET=HOST]
200 Features and packages:
201 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
202 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
203 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
204 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
205 --x-includes=DIR X include files are in DIR
206 --x-libraries=DIR X library files are in DIR
208 if test -n "$ac_help"; then
209 echo "--enable and --with options recognized:$ac_help"
213 -host | --host | --hos | --ho)
215 -host=* | --host=* | --hos=* | --ho=*)
218 -includedir | --includedir | --includedi | --included | --include \
219 | --includ | --inclu | --incl | --inc)
220 ac_prev=includedir ;;
221 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
222 | --includ=* | --inclu=* | --incl=* | --inc=*)
223 includedir="$ac_optarg" ;;
225 -infodir | --infodir | --infodi | --infod | --info | --inf)
227 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
228 infodir="$ac_optarg" ;;
230 -libdir | --libdir | --libdi | --libd)
232 -libdir=* | --libdir=* | --libdi=* | --libd=*)
233 libdir="$ac_optarg" ;;
235 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
236 | --libexe | --libex | --libe)
237 ac_prev=libexecdir ;;
238 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
239 | --libexe=* | --libex=* | --libe=*)
240 libexecdir="$ac_optarg" ;;
242 -localstatedir | --localstatedir | --localstatedi | --localstated \
243 | --localstate | --localstat | --localsta | --localst \
244 | --locals | --local | --loca | --loc | --lo)
245 ac_prev=localstatedir ;;
246 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
247 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
248 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
249 localstatedir="$ac_optarg" ;;
251 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
254 mandir="$ac_optarg" ;;
257 # Obsolete; use --without-fp.
260 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
264 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
265 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
268 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
269 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
270 | --oldin | --oldi | --old | --ol | --o)
271 ac_prev=oldincludedir ;;
272 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
273 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
274 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
275 oldincludedir="$ac_optarg" ;;
277 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
280 prefix="$ac_optarg" ;;
282 -program-prefix | --program-prefix | --program-prefi | --program-pref \
283 | --program-pre | --program-pr | --program-p)
284 ac_prev=program_prefix ;;
285 -program-prefix=* | --program-prefix=* | --program-prefi=* \
286 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
287 program_prefix="$ac_optarg" ;;
289 -program-suffix | --program-suffix | --program-suffi | --program-suff \
290 | --program-suf | --program-su | --program-s)
291 ac_prev=program_suffix ;;
292 -program-suffix=* | --program-suffix=* | --program-suffi=* \
293 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
294 program_suffix="$ac_optarg" ;;
296 -program-transform-name | --program-transform-name \
297 | --program-transform-nam | --program-transform-na \
298 | --program-transform-n | --program-transform- \
299 | --program-transform | --program-transfor \
300 | --program-transfo | --program-transf \
301 | --program-trans | --program-tran \
302 | --progr-tra | --program-tr | --program-t)
303 ac_prev=program_transform_name ;;
304 -program-transform-name=* | --program-transform-name=* \
305 | --program-transform-nam=* | --program-transform-na=* \
306 | --program-transform-n=* | --program-transform-=* \
307 | --program-transform=* | --program-transfor=* \
308 | --program-transfo=* | --program-transf=* \
309 | --program-trans=* | --program-tran=* \
310 | --progr-tra=* | --program-tr=* | --program-t=*)
311 program_transform_name="$ac_optarg" ;;
313 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
314 | -silent | --silent | --silen | --sile | --sil)
317 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321 sbindir="$ac_optarg" ;;
323 -sharedstatedir | --sharedstatedir | --sharedstatedi \
324 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
325 | --sharedst | --shareds | --shared | --share | --shar \
327 ac_prev=sharedstatedir ;;
328 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
329 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
330 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332 sharedstatedir="$ac_optarg" ;;
334 -site | --site | --sit)
336 -site=* | --site=* | --sit=*)
339 -site-file | --site-file | --site-fil | --site-fi | --site-f)
341 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
342 sitefile="$ac_optarg" ;;
344 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
346 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
347 srcdir="$ac_optarg" ;;
349 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
350 | --syscon | --sysco | --sysc | --sys | --sy)
351 ac_prev=sysconfdir ;;
352 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
353 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
354 sysconfdir="$ac_optarg" ;;
356 -target | --target | --targe | --targ | --tar | --ta | --t)
358 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
359 target="$ac_optarg" ;;
361 -v | -verbose | --verbose | --verbos | --verbo | --verb)
364 -version | --version | --versio | --versi | --vers)
365 echo "configure generated by autoconf version 2.13"
369 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
370 # Reject names that are not valid shell variable names.
371 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
372 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374 ac_package=`echo $ac_package| sed 's/-/_/g'`
379 eval "with_${ac_package}='$ac_optarg'" ;;
381 -without-* | --without-*)
382 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
383 # Reject names that are not valid shell variable names.
384 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
385 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
387 ac_package=`echo $ac_package| sed 's/-/_/g'`
388 eval "with_${ac_package}=no" ;;
391 # Obsolete; use --with-x.
394 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
395 | --x-incl | --x-inc | --x-in | --x-i)
396 ac_prev=x_includes ;;
397 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
398 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
399 x_includes="$ac_optarg" ;;
401 -x-libraries | --x-libraries | --x-librarie | --x-librari \
402 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
403 ac_prev=x_libraries ;;
404 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
405 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
406 x_libraries="$ac_optarg" ;;
408 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
412 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
413 echo "configure: warning: $ac_option: invalid host type" 1>&2
415 if test "x$nonopt" != xNONE; then
416 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
424 if test -n "$ac_prev"; then
425 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
428 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
430 # File descriptor usage:
433 # 2 errors and warnings
434 # 3 some systems may open it to /dev/tty
435 # 4 used on the Kubota Titan
436 # 6 checking for... messages and results
437 # 5 compiler messages saved in config.log
438 if test "$silent" = yes; then
446 This file contains any messages produced by compilers while
447 running configure, to aid debugging if configure makes a mistake.
450 # Strip out --no-create and --no-recursion so they do not pile up.
451 # Also quote any args containing shell metacharacters.
456 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
457 | --no-cr | --no-c) ;;
458 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
459 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
460 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
461 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
462 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
467 # Only set these to C if already set. These must not be set unconditionally
468 # because not all systems understand e.g. LANG=C (notably SCO).
469 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
470 # Non-C LC_CTYPE values break the ctype check.
471 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
472 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
473 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
474 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
476 # confdefs.h avoids OS command line length limits that DEFS can exceed.
477 rm -rf conftest* confdefs.h
478 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
481 # A filename unique to this package, relative to the directory that
482 # configure is in, which we can look for to find out if srcdir is correct.
483 ac_unique_file=move-if-change
485 # Find the source files, if location was not specified.
486 if test -z "$srcdir"; then
487 ac_srcdir_defaulted=yes
488 # Try the directory containing this script, then its parent.
490 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
491 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
493 if test ! -r $srcdir/$ac_unique_file; then
497 ac_srcdir_defaulted=no
499 if test ! -r $srcdir/$ac_unique_file; then
500 if test "$ac_srcdir_defaulted" = yes; then
501 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
503 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
506 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
508 # Prefer explicitly selected file to automatically selected ones.
509 if test -z "$sitefile"; then
510 if test -z "$CONFIG_SITE"; then
511 if test "x$prefix" != xNONE; then
512 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
514 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
518 CONFIG_SITE="$sitefile"
520 for ac_site_file in $CONFIG_SITE; do
521 if test -r "$ac_site_file"; then
522 echo "loading site script $ac_site_file"
527 if test -r "$cache_file"; then
528 echo "loading cache $cache_file"
531 echo "creating cache $cache_file"
536 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
537 ac_cpp='$CPP $CPPFLAGS'
538 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
539 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
540 cross_compiling=$ac_cv_prog_cc_cross
544 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
545 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
546 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
553 ac_n= ac_c='\c' ac_t=
559 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
560 if test -f $ac_dir/install-sh; then
562 ac_install_sh="$ac_aux_dir/install-sh -c"
564 elif test -f $ac_dir/install.sh; then
566 ac_install_sh="$ac_aux_dir/install.sh -c"
570 if test -z "$ac_aux_dir"; then
571 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
573 ac_config_guess=$ac_aux_dir/config.guess
574 ac_config_sub=$ac_aux_dir/config.sub
575 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
578 # Do some error checking and defaulting for the host and target type.
580 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
583 # 1. You are not allowed to specify --host, --target, and nonopt at the
585 # 2. Host defaults to nonopt.
586 # 3. If nonopt is not specified, then host defaults to the current host,
587 # as determined by config.guess.
588 # 4. Target and build default to nonopt.
589 # 5. If nonopt is not specified, then target and build default to host.
591 # The aliases save the names the user supplied, while $host etc.
592 # will get canonicalized.
593 case $host---$target---$nonopt in
594 NONE---*---* | *---NONE---* | *---*---NONE) ;;
595 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
599 # Make sure we can run config.sub.
600 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
601 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
604 echo $ac_n "checking host system type""... $ac_c" 1>&6
605 echo "configure:606: checking host system type" >&5
608 case "$host_alias" in
612 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
613 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
615 *) host_alias=$nonopt ;;
619 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
620 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
621 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
622 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
623 echo "$ac_t""$host" 1>&6
625 echo $ac_n "checking target system type""... $ac_c" 1>&6
626 echo "configure:627: checking target system type" >&5
629 case "$target_alias" in
632 NONE) target_alias=$host_alias ;;
633 *) target_alias=$nonopt ;;
637 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
638 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
639 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
640 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
641 echo "$ac_t""$target" 1>&6
643 echo $ac_n "checking build system type""... $ac_c" 1>&6
644 echo "configure:645: checking build system type" >&5
647 case "$build_alias" in
650 NONE) build_alias=$host_alias ;;
651 *) build_alias=$nonopt ;;
655 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
656 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
657 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
658 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
659 echo "$ac_t""$build" 1>&6
661 test "$host_alias" != "$target_alias" &&
662 test "$program_prefix$program_suffix$program_transform_name" = \
664 program_prefix=${target_alias}-
666 if test "$program_transform_name" = s,x,x,; then
667 program_transform_name=
669 # Double any \ or $. echo might interpret backslashes.
670 cat <<\EOF_SED > conftestsed
671 s,\\,\\\\,g; s,\$,$$,g
673 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
676 test "$program_prefix" != NONE &&
677 program_transform_name="s,^,${program_prefix},; $program_transform_name"
678 # Use a double $ so make ignores it.
679 test "$program_suffix" != NONE &&
680 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
682 # sed with no file args requires a program.
683 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
686 # Get 'install' or 'install-sh' and its variants.
687 # Find a good install program. We prefer a C program (faster),
688 # so one script is as good as another. But avoid the broken or
689 # incompatible versions:
690 # SysV /etc/install, /usr/sbin/install
691 # SunOS /usr/etc/install
694 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
695 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
696 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
697 # ./install, which can be erroneously created by make from ./install.sh.
698 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
699 echo "configure:700: checking for a BSD compatible install" >&5
700 if test -z "$INSTALL"; then
701 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
702 echo $ac_n "(cached) $ac_c" 1>&6
704 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
705 for ac_dir in $PATH; do
706 # Account for people who put trailing slashes in PATH elements.
708 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
710 # OSF1 and SCO ODT 3.0 have their own names for install.
711 # Don't use installbsd from OSF since it installs stuff as root
713 for ac_prog in ginstall scoinst install; do
714 if test -f $ac_dir/$ac_prog; then
715 if test $ac_prog = install &&
716 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
717 # AIX install. It has an incompatible calling convention.
720 ac_cv_path_install="$ac_dir/$ac_prog -c"
731 if test "${ac_cv_path_install+set}" = set; then
732 INSTALL="$ac_cv_path_install"
734 # As a last resort, use the slow shell script. We don't cache a
735 # path for INSTALL within a source directory, because that will
736 # break other packages using the cache if that directory is
737 # removed, or if the path is relative.
738 INSTALL="$ac_install_sh"
741 echo "$ac_t""$INSTALL" 1>&6
743 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
744 # It thinks the first close brace ends the variable substitution.
745 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
747 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
749 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
751 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
752 echo "configure:753: checking whether ln works" >&5
753 if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
758 if ln conftestdata_f conftestdata_t 2>/dev/null
764 rm -f conftestdata_f conftestdata_t
767 if test $acx_cv_prog_LN = no; then
769 echo "$ac_t""no, using $LN" 1>&6
772 echo "$ac_t""yes" 1>&6
775 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
776 echo "configure:777: checking whether ln -s works" >&5
777 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
778 echo $ac_n "(cached) $ac_c" 1>&6
781 if ln -s X conftestdata 2>/dev/null
784 ac_cv_prog_LN_S="ln -s"
789 LN_S="$ac_cv_prog_LN_S"
790 if test "$ac_cv_prog_LN_S" = "ln -s"; then
791 echo "$ac_t""yes" 1>&6
793 echo "$ac_t""no" 1>&6
797 ### we might need to use some other shell than /bin/sh for running subshells
798 ### If we are on Windows, search for the shell. This will permit people
799 ### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
800 ### without also having to set CONFIG_SHELL. This code will work when
801 ### using bash, which sets OSTYPE.
804 if test x${CONFIG_SHELL} = x ; then
805 if test ! -f /bin/sh ; then
806 if test x${SHELL} != x && test -f ${SHELL} ; then
807 CONFIG_SHELL=${SHELL}
810 for prog in sh sh.exe bash bash.exe; do
811 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
813 test -z "$dir" && dir=.
814 if test -f $dir/$prog; then
815 CONFIG_SHELL=$dir/$prog
821 test -n "${CONFIG_SHELL}" && break
829 config_shell=${CONFIG_SHELL-/bin/sh}
832 # if PWD already has a value, it is probably wrong.
833 if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
835 # Export original configure arguments for use by sub-configures. These
836 # will be expanded by make, so quote '$'.
838 sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
841 TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
842 rm -f conftestsed.out
845 moveifchange=${srcdir}/move-if-change
847 srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
849 # We pass INSTALL explicitly to sub-makes. Make sure that it is not
851 if test "$INSTALL" = "${srcdir}/install-sh -c"; then
852 INSTALL="${srcpwd}/install-sh -c"
855 # Set srcdir to "." if that's what it is.
856 # This is important for multilib support.
858 if test "${pwd}" = "${srcpwd}" ; then
866 # Define the trigger file to make sure configure will re-run whenever
867 # the gcc version number changes.
869 if test "${with_gcc_version_trigger+set}" = set; then
870 gcc_version_trigger=$with_gcc_version_trigger
872 gcc_version_trigger=$topsrcdir/gcc/version.c
874 if test -f "${gcc_version_trigger}"; then
875 gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
877 gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
879 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
884 if test -f $gcc_version_trigger ; then
885 case "$ac_configure_args" in
886 *--with-gcc-version-trigger=$gcc_version_trigger* )
889 # Add to all subconfigure arguments: build, host, and target.
890 ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
897 ### To add a new directory to the tree, first choose whether it is a target
898 ### or a host dependent tool. Then put it into the appropriate list
899 ### (library or tools, host or target), doing a dependency sort.
901 # Subdirs will be configured in the order listed in build_configdirs,
902 # configdirs, or target_configdirs; see the serialization section below.
904 # Dependency sorting is only needed when *configuration* must be done in
905 # a particular order. In all cases a dependency should be specified in
906 # the Makefile, whether or not it's implicitly specified here.
908 # Double entries in build_configdirs, configdirs, or target_configdirs may
909 # cause circular dependencies and break everything horribly.
911 # these library is used by various programs built for the build
914 build_libs="build-libiberty"
916 # these tools are built for the build environment
917 build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
919 # these libraries are used by various programs built for the host environment
921 host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp"
923 # these tools are built for the host environment
924 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
925 # know that we are building the simulator.
926 # binutils, gas and ld appear in that order because it makes sense to run
927 # "make check" in that particular order.
928 host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
930 # libgcj represents the runtime libraries only used by gcj.
931 libgcj="target-libffi \
937 # these libraries are built for the target environment, and are built after
938 # the host libraries and the host tools (which may be a cross compiler)
940 target_libraries="target-libiberty \
943 target-libstdc++-v3 \
950 # these tools are built using the target libraries, and are intended to
951 # run only in the target environment
953 # note: any program that *uses* libraries that are in the "target_libraries"
954 # list belongs in this list. those programs are also very likely
955 # candidates for the "native_only" list which follows
957 target_tools="target-examples target-groff target-gperf target-rda"
959 ################################################################################
961 ## All tools belong in one of the four categories, and are assigned above
962 ## We assign ${configdirs} this way to remove all embedded newlines. This
963 ## is important because configure will choke if they ever get through.
964 ## ${configdirs} is directories we build using the host tools.
965 ## ${target_configdirs} is directories we build using the target tools.
966 configdirs=`echo ${host_libs} ${host_tools}`
967 target_configdirs=`echo ${target_libraries} ${target_tools}`
968 build_configdirs=`echo ${build_libs} ${build_tools}`
970 ################################################################################
972 srcname="gnu development package"
974 # This gets set non-empty for some net releases of packages.
977 # Define is_cross_compiler to save on calls to 'test'.
979 if test x"${host}" = x"${target}" ; then
982 is_cross_compiler=yes
985 # Find the build and target subdir names.
986 case ${build_alias} in
987 "") build_noncanonical=${build} ;;
988 *) build_noncanonical=${build_alias} ;;
991 case ${host_alias} in
992 "") host_noncanonical=${build_noncanonical} ;;
993 *) host_noncanonical=${host_alias} ;;
996 case ${target_alias} in
997 "") target_noncanonical=${host_noncanonical} ;;
998 *) target_noncanonical=${target_alias} ;;
1001 # Prefix 'build-' so this never conflicts with target_subdir.
1002 build_subdir="build-${build_noncanonical}"
1003 # Not really a subdirectory, but here for completeness.
1006 target_subdir=${target_noncanonical}
1009 # Skipdirs are removed silently.
1011 # Noconfigdirs are removed loudly.
1015 # Make sure we don't let GNU ld be added if we didn't want it.
1016 if test x$with_gnu_ld = xno ; then
1018 noconfigdirs="$noconfigdirs ld"
1022 # Make sure we don't let GNU as be added if we didn't want it.
1023 if test x$with_gnu_as = xno ; then
1025 noconfigdirs="$noconfigdirs gas"
1028 # some tools are so dependent upon X11 that if we're not building with X,
1029 # it's not even worth trying to configure, much less build, that tool.
1032 yes | "") ;; # the default value for this tree is that X11 is available
1034 skipdirs="${skipdirs} tk itcl libgui"
1035 # We won't be able to build gdbtk without X.
1038 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
1041 # Some tools are only suitable for building in a "native" situation.
1042 # Remove these if host!=target.
1043 native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
1045 # Similarly, some are only suitable for cross toolchains.
1046 # Remove these if host=target.
1047 cross_only="target-libgloss target-newlib target-opcodes"
1049 case $is_cross_compiler in
1050 no) skipdirs="${skipdirs} ${cross_only}" ;;
1051 yes) skipdirs="${skipdirs} ${native_only}" ;;
1054 # If both --with-headers and --with-libs are specified, default to
1056 if test x"${with_headers}" != x && test x"${with_headers}" != xno \
1057 && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
1058 if test x"${with_newlib}" = x ; then
1063 # Recognize --with-newlib/--without-newlib.
1064 case ${with_newlib} in
1065 no) skipdirs="${skipdirs} target-newlib" ;;
1066 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
1069 # Configure extra directories which are host specific
1073 configdirs="$configdirs libtermcap" ;;
1076 # Remove more programs from consideration, based on the host or
1077 # target this usually means that a port of the program doesn't
1082 noconfigdirs="$noconfigdirs byacc"
1084 i[3456789]86-*-vsta)
1085 noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
1087 i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
1088 noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
1090 i[3456789]86-*-mingw32*)
1091 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
1092 noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
1094 i[3456789]86-*-beos*)
1095 noconfigdirs="$noconfigdirs tk itcl libgui gdb"
1098 noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
1101 noconfigdirs="$noconfigdirs rcs"
1104 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
1107 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
1110 noconfigdirs="$noconfigdirs tk itcl libgui"
1115 # Check whether --enable-libada or --disable-libada was given.
1116 if test "${enable_libada+set}" = set; then
1117 enableval="$enable_libada"
1118 ENABLE_LIBADA=$enableval
1123 if test "${ENABLE_LIBADA}" != "yes" ; then
1124 noconfigdirs="$noconfigdirs target-libada"
1127 # Save it here so that, even in case of --enable-libgcj, if the Java
1128 # front-end isn't enabled, we still get libgcj disabled.
1129 libgcj_saved=$libgcj
1130 case $enable_libgcj in
1132 # If we reset it here, it won't get added to noconfigdirs in the
1133 # target-specific build rules, so it will be forcibly enabled
1134 # (unless the Java language itself isn't enabled).
1138 # Make sure we get it printed in the list of not supported target libs.
1139 noconfigdirs="$noconfigdirs ${libgcj}"
1144 # Allow --disable-libmudflap to exclude target-libmudflap
1145 case $enable_libmudflap in
1149 noconfigdirs="$noconfigdirs target-libmudflap"
1153 *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
1154 # Enable libmudflap by default in GNU and friends.
1157 # Enable libmudflap by default in FreeBSD.
1160 # Disable it by default everywhere else.
1161 noconfigdirs="$noconfigdirs target-libmudflap"
1169 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1172 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
1175 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
1176 noconfigdirs="$noconfigdirs ${libgcj}"
1178 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
1179 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1182 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1183 if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
1184 && test -f /usr/local/include/gmp.h; then
1188 # Skip some stuff that's unsupported on some FreeBSD configurations.
1193 noconfigdirs="$noconfigdirs ${libgcj}"
1198 # Remove unsupported stuff on all kaOS configurations.
1199 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
1200 skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
1201 skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
1202 noconfigdirs="$noconfigdirs target-libgloss"
1205 # Skip some stuff on all NetBSD configurations.
1206 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
1208 # Skip some stuff that's unsupported on some NetBSD configurations.
1210 i*86-*-netbsdelf*) ;;
1211 arm*-*-netbsdelf*) ;;
1213 noconfigdirs="$noconfigdirs ${libgcj}"
1218 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
1221 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1224 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
1227 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}"
1230 # ld works, but does not support shared libraries.
1231 # newlib is not 64 bit ready. I'm not sure about fileutils.
1232 # gas doesn't generate exception information.
1233 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
1236 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
1239 # newlib is not 64 bit ready
1240 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1243 # newlib is not 64 bit ready
1244 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1247 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1250 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1252 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1253 noconfigdirs="$noconfigdirs ${libgcj}"
1254 noconfigdirs="$noconfigdirs target-examples"
1255 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
1256 noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
1257 noconfigdirs="$noconfigdirs expect dejagnu"
1258 # the C++ libraries don't build on top of CE's C libraries
1259 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1260 noconfigdirs="$noconfigdirs target-newlib"
1262 *-*-cygwin*) ;; # keep gdb and readline
1263 *) noconfigdirs="$noconfigdirs gdb readline"
1268 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1272 arm-*-coff | strongarm-*-coff | xscale-*-coff)
1273 noconfigdirs="$noconfigdirs ${libgcj}"
1275 arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
1276 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1279 noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
1282 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1285 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1288 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1291 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1294 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1297 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1299 c4x-*-* | tic4x-*-*)
1300 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1302 c54x*-*-* | tic54x-*-*)
1303 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
1305 cris-*-* | crisv32-*-*)
1308 noconfigdirs="$noconfigdirs ${libgcj}";;
1310 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
1314 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
1317 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1320 noconfigdirs="$noconfigdirs ${libgcj} gdb"
1323 noconfigdirs="$noconfigdirs ${libgcj} gdb"
1326 noconfigdirs="$noconfigdirs ${libgcj}"
1329 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1332 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1334 hppa1.1-*-osf* | hppa1.1-*-bsd* )
1336 hppa*64*-*-linux* | parisc*64*-*-linux*)
1337 # In this case, it's because the hppa64-linux target is for
1338 # the kernel only at this point and has no libc, and thus no
1339 # headers, crt*.o, etc., all of which are needed by these.
1340 noconfigdirs="$noconfigdirs target-zlib"
1342 parisc*-*-linux* | hppa*-*-linux*)
1346 hppa*-*-openbsd* | \
1348 noconfigdirs="$noconfigdirs ${libgcj}"
1351 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
1352 # build on HP-UX 10.20.
1353 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
1356 noconfigdirs="$noconfigdirs ${libgcj} gdb"
1359 # No gdb support yet.
1360 noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
1363 # No gdb or ld support yet.
1364 noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
1368 i[3456789]86-*-coff | i[3456789]86-*-elf)
1369 noconfigdirs="$noconfigdirs ${libgcj}"
1371 i[3456789]86-*-linux*)
1372 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1373 # not build java stuff by default.
1376 noconfigdirs="$noconfigdirs ${libgcj}";;
1379 # This section makes it possible to build newlib natively on linux.
1380 # If we are using a cross compiler then don't configure newlib.
1381 if test x${is_cross_compiler} != xno ; then
1382 noconfigdirs="$noconfigdirs target-newlib"
1384 noconfigdirs="$noconfigdirs target-libgloss"
1385 # If we are not using a cross compiler, do configure newlib.
1386 # Note however, that newlib will only be configured in this situation
1387 # if the --with-newlib option has been given, because otherwise
1388 # 'target-newlib' will appear in skipdirs.
1390 i[3456789]86-*-mingw32*)
1391 target_configdirs="$target_configdirs target-mingw"
1392 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
1394 # Can't build gdb for mingw32 if not native.
1396 i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
1397 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
1402 target_configdirs="$target_configdirs target-libtermcap target-winsup"
1403 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
1404 # always build newlib if winsup directory is present.
1405 if test -d "$srcdir/winsup"; then
1406 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1407 elif test -d "$srcdir/newlib"; then
1408 echo "Warning: winsup is missing so newlib can't be built."
1411 # Can't build gdb for Cygwin if not native.
1413 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
1414 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
1418 i[3456789]86-moss-msdos | i[3456789]86-*-moss* | \
1419 i[3456789]86-*-uwin* | i[3456789]86-*-interix* )
1422 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1424 i[3456789]86-*-sco3.2v5*)
1425 # The linker does not yet know about weak symbols in COFF,
1426 # and is not configured to handle mixed ELF and COFF.
1427 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1429 i[3456789]86-*-sco*)
1430 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1432 i[3456789]86-*-solaris2*)
1433 noconfigdirs="$noconfigdirs target-libgloss"
1435 i[3456789]86-*-sysv4*)
1436 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1438 i[3456789]86-*-beos*)
1439 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1442 noconfigdirs="$noconfigdirs ${libgcj}"
1444 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
1445 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1448 noconfigdirs="$noconfigdirs ${libgcj}"
1451 noconfigdirs="$noconfigdirs ${libgcj}"
1454 # The EPOC C++ environment does not support exceptions or rtti,
1455 # and so building libstdc++-v3 tends not to always work.
1456 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1459 noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss target-libgfortran"
1462 noconfigdirs="$noconfigdirs ${libgcj}"
1465 noconfigdirs="$noconfigdirs ${libgcj}"
1468 # copied from rs6000-*-* entry
1469 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1471 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1472 target_configdirs="$target_configdirs target-winsup"
1473 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
1474 # always build newlib.
1475 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1477 # This is temporary until we can link against shared libraries
1478 powerpcle-*-solaris*)
1479 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
1482 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1485 noconfigdirs="$noconfigdirs ${libgcj}"
1487 powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
1490 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
1493 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1496 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1499 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
1502 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1505 # Linking libjava exceeds command-line length limits on at least
1506 # IRIX 6.2, but not on IRIX 6.5.
1507 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
1508 # <oldham@codesourcery.com>
1509 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1512 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1515 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1518 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
1521 noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
1524 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1527 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1530 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1534 i[3456789]86-*-vsta) ;; # don't add gprof back in
1535 i[3456789]86-*-go32*) ;; # don't add gprof back in
1536 i[3456789]86-*-msdosdjgpp*) ;; # don't add gprof back in
1537 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1539 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1542 noconfigdirs="$noconfigdirs ${libgcj}"
1545 noconfigdirs="$noconfigdirs ${libgcj}"
1548 noconfigdirs="$noconfigdirs ${libgcj}"
1551 noconfigdirs="$noconfigdirs ${libgcj}"
1552 if test x${is_cross_compiler} != xno ; then
1553 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1558 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1561 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
1564 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1567 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1570 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1573 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
1576 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1579 noconfigdirs="$noconfigdirs ${libgcj}"
1582 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1584 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
1585 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1588 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1591 noconfigdirs="$noconfigdirs ${libgcj}"
1595 # If we aren't building newlib, then don't build libgloss, since libgloss
1596 # depends upon some newlib header files.
1597 case "${noconfigdirs}" in
1598 *target-libgloss*) ;;
1599 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1602 # Work in distributions that contain no compiler tools, like Autoconf.
1604 host_makefile_frag=/dev/null
1605 if test -d ${srcdir}/config ; then
1608 # Avoid "too much defining" errors from HPUX compiler.
1609 tentative_cc="cc -Wp,-H256000"
1610 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1611 # If it's HP/UX ar, this should be harmless.
1615 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1618 #None of the Apollo compilers can compile gas or binutils. The preprocessor
1619 # chokes on bfd, the compiler won't let you assign integers to enums, and
1620 # other problems. Defining CC to gcc is a questionable way to say "don't use
1621 # the apollo compiler" (the preferred version of GCC could be called cc,
1622 # or whatever), but I'm not sure leaving CC as cc is any better...
1623 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1624 # Used to have BISON=yacc.
1628 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1631 # Under CX/UX, we want to tell the compiler to use ANSI mode.
1632 tentative_cc="cc -Xa"
1633 host_makefile_frag="config/mh-cxux"
1635 m88k-motorola-sysv*)
1638 tentative_cc="cc -Wf,-XNg1000"
1639 host_makefile_frag="config/mh-decstation"
1642 # The C compiler on NEC MIPS SVR4 needs bigger tables.
1643 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1644 host_makefile_frag="config/mh-necv4"
1647 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
1648 # environment. Also bump switch table size so that cp-parse will
1649 # compile. Bump string length limit so linker builds.
1650 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1653 host_makefile_frag="config/mh-sysv4"
1656 # This is for a MIPS running RISC/os 4.52C.
1658 # This is needed for GDB, but needs to be in the top-level make because
1659 # if a library is compiled with the bsd headers and gets linked with the
1660 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1661 # a different size).
1662 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1663 # known except to select the sysv environment. Could we use /proc instead?
1664 # These "sysv environments" and "bsd environments" often end up being a pain.
1666 # This is not part of CFLAGS because perhaps not all C compilers have this
1668 tentative_cc="cc -systype sysv"
1673 i[3456789]86-*-sysv5*)
1674 host_makefile_frag="config/mh-sysv5"
1676 i[3456789]86-*-dgux*)
1677 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1678 host_makefile_frag="config/mh-dgux386"
1680 i[3456789]86-ncr-sysv4.3*)
1681 # The MetaWare compiler will generate a copyright message unless you
1682 # turn it off by adding the -Hnocopyr flag.
1683 tentative_cc="cc -Hnocopyr"
1685 i[3456789]86-ncr-sysv4*)
1686 # for an NCR 3000 (i486/SVR4) system.
1687 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1688 # This compiler not only emits obnoxious copyright messages every time
1689 # you run it, but it chokes and dies on a whole bunch of GNU source
1690 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1691 tentative_cc="/usr/ccs/ATT/cc"
1692 host_makefile_frag="config/mh-ncr3000"
1694 i[3456789]86-*-sco3.2v5*)
1696 i[3456789]86-*-sco*)
1697 # The native C compiler botches some simple uses of const. Unfortunately,
1698 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1699 tentative_cc="cc -Dconst="
1700 host_makefile_frag="config/mh-sco"
1702 i[3456789]86-*-udk*)
1703 host_makefile_frag="config/mh-sysv5"
1705 i[3456789]86-*-solaris2*)
1706 host_makefile_frag="config/mh-sysv4"
1708 i[3456789]86-*-msdosdjgpp*)
1709 host_makefile_frag="config/mh-djgpp"
1712 host_makefile_frag="config/mh-cygwin"
1715 host_makefile_frag="config/mh-mingw32"
1718 host_makefile_frag="config/mh-interix"
1721 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1725 host_makefile_frag="config/mh-solaris"
1728 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1729 # without overflowing the jump tables (-J says to use a 32 bit table)
1730 tentative_cc="cc -J"
1733 tentative_cc="cc -Wp,-H256000"
1736 tentative_cc="cc -Wp,-H256000"
1739 # /bin/cc is less than useful for our purposes. Always use GCC
1740 tentative_cc="/usr/cygnus/progressive/bin/gcc"
1741 host_makefile_frag="config/mh-lynxrs6k"
1744 host_makefile_frag="config/mh-ppc-darwin"
1747 # /bin/cc is less than useful for our purposes. Always use GCC
1748 tentative_cc="/bin/gcc"
1751 host_makefile_frag="config/mh-sysv4"
1753 # This is placed last to prevent interfering with the cases above.
1755 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
1756 host_makefile_frag="config/mh-x86omitfp"
1761 # If we aren't going to be using gcc, see if we can extract a definition
1762 # of CC from the fragment.
1763 # Actually, use the 'pre-extracted' version above.
1764 if test -z "${CC}" && test "${build}" = "${host}" ; then
1765 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1767 for dir in $PATH; do
1768 test -z "$dir" && dir=.
1769 if test -f $dir/gcc; then
1775 if test -z "${found}" && test -n "${tentative_cc}" ; then
1780 if test "${build}" != "${host}" ; then
1781 # If we are doing a Canadian Cross, in which the host and build systems
1782 # are not the same, we set reasonable default values for the tools.
1784 CC=${CC-${host_alias}-gcc}
1785 CFLAGS=${CFLAGS-"-g -O2"}
1786 CXX=${CXX-${host_alias}-c++}
1787 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1788 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
1789 CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
1790 CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
1791 GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
1792 GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
1793 BUILD_PREFIX=${build_alias}-
1794 BUILD_PREFIX_1=${build_alias}-
1797 # Set reasonable default values for some tools even if not Canadian.
1798 # Of course, these are different reasonable default values, originally
1799 # specified directly in the Makefile.
1800 # We don't export, so that autoconf can do its job.
1801 # Note that all these settings are above the fragment inclusion point
1802 # in Makefile.in, so can still be overridden by fragments.
1803 # This is all going to change when we autoconfiscate...
1805 CC_FOR_BUILD="\$(CC)"
1806 GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
1808 BUILD_PREFIX_1=loser-
1810 # Extract the first word of "gcc", so it can be a program name with args.
1811 set dummy gcc; ac_word=$2
1812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1813 echo "configure:1814: checking for $ac_word" >&5
1814 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1815 echo $ac_n "(cached) $ac_c" 1>&6
1817 if test -n "$CC"; then
1818 ac_cv_prog_CC="$CC" # Let the user override the test.
1820 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1822 for ac_dir in $ac_dummy; do
1823 test -z "$ac_dir" && ac_dir=.
1824 if test -f $ac_dir/$ac_word; then
1833 if test -n "$CC"; then
1834 echo "$ac_t""$CC" 1>&6
1836 echo "$ac_t""no" 1>&6
1839 if test -z "$CC"; then
1840 # Extract the first word of "cc", so it can be a program name with args.
1841 set dummy cc; ac_word=$2
1842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1843 echo "configure:1844: checking for $ac_word" >&5
1844 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
1847 if test -n "$CC"; then
1848 ac_cv_prog_CC="$CC" # Let the user override the test.
1850 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1853 for ac_dir in $ac_dummy; do
1854 test -z "$ac_dir" && ac_dir=.
1855 if test -f $ac_dir/$ac_word; then
1856 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1857 ac_prog_rejected=yes
1865 if test $ac_prog_rejected = yes; then
1866 # We found a bogon in the path, so make sure we never use it.
1867 set dummy $ac_cv_prog_CC
1869 if test $# -gt 0; then
1870 # We chose a different compiler from the bogus one.
1871 # However, it has the same basename, so the bogon will be chosen
1872 # first if we set CC to just the basename; use the full file name.
1874 set dummy "$ac_dir/$ac_word" "$@"
1882 if test -n "$CC"; then
1883 echo "$ac_t""$CC" 1>&6
1885 echo "$ac_t""no" 1>&6
1888 if test -z "$CC"; then
1889 case "`uname -s`" in
1891 # Extract the first word of "cl", so it can be a program name with args.
1892 set dummy cl; ac_word=$2
1893 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1894 echo "configure:1895: checking for $ac_word" >&5
1895 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1896 echo $ac_n "(cached) $ac_c" 1>&6
1898 if test -n "$CC"; then
1899 ac_cv_prog_CC="$CC" # Let the user override the test.
1901 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1903 for ac_dir in $ac_dummy; do
1904 test -z "$ac_dir" && ac_dir=.
1905 if test -f $ac_dir/$ac_word; then
1914 if test -n "$CC"; then
1915 echo "$ac_t""$CC" 1>&6
1917 echo "$ac_t""no" 1>&6
1922 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1925 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1926 echo "configure:1927: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1929 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1930 ac_cpp='$CPP $CPPFLAGS'
1931 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1932 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1933 cross_compiling=$ac_cv_prog_cc_cross
1935 cat > conftest.$ac_ext << EOF
1937 #line 1938 "configure"
1938 #include "confdefs.h"
1942 if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1943 ac_cv_prog_cc_works=yes
1944 # If we can't run a trivial program, we are probably using a cross compiler.
1945 if (./conftest; exit) 2>/dev/null; then
1946 ac_cv_prog_cc_cross=no
1948 ac_cv_prog_cc_cross=yes
1951 echo "configure: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
1953 ac_cv_prog_cc_works=no
1957 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1958 ac_cpp='$CPP $CPPFLAGS'
1959 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1960 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1961 cross_compiling=$ac_cv_prog_cc_cross
1963 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1964 if test $ac_cv_prog_cc_works = no; then
1965 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1967 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1968 echo "configure:1969: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1969 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1970 cross_compiling=$ac_cv_prog_cc_cross
1972 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1973 echo "configure:1974: checking whether we are using GNU C" >&5
1974 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1975 echo $ac_n "(cached) $ac_c" 1>&6
1977 cat > conftest.c <<EOF
1982 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1989 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1991 if test $ac_cv_prog_gcc = yes; then
1997 ac_test_CFLAGS="${CFLAGS+set}"
1998 ac_save_CFLAGS="$CFLAGS"
2000 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2001 echo "configure:2002: checking whether ${CC-cc} accepts -g" >&5
2002 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2003 echo $ac_n "(cached) $ac_c" 1>&6
2005 echo 'void f(){}' > conftest.c
2006 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2015 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2016 if test "$ac_test_CFLAGS" = set; then
2017 CFLAGS="$ac_save_CFLAGS"
2018 elif test $ac_cv_prog_cc_g = yes; then
2019 if test "$GCC" = yes; then
2025 if test "$GCC" = yes; then
2033 # We must set the default linker to the linker used by gcc for the correct
2034 # operation of libtool. If LD is not defined and we are using gcc, try to
2035 # set the LD default to the ld used by gcc.
2036 if test -z "$LD"; then
2037 if test "$GCC" = yes; then
2040 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
2042 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
2044 case $gcc_prog_ld in
2045 # Accept absolute paths.
2046 [\\/]* | [A-Za-z]:[\\/]*)
2047 LD="$gcc_prog_ld" ;;
2053 CFLAGS=${CFLAGS-"-g"}
2054 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2057 if test $host != $build; then
2058 ac_tool_prefix=${host_alias}-
2065 # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
2066 set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
2067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2068 echo "configure:2069: checking for $ac_word" >&5
2069 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2070 echo $ac_n "(cached) $ac_c" 1>&6
2072 if test -n "$GNATBIND"; then
2073 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2075 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2077 for ac_dir in $ac_dummy; do
2078 test -z "$ac_dir" && ac_dir=.
2079 if test -f $ac_dir/$ac_word; then
2080 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
2087 GNATBIND="$ac_cv_prog_GNATBIND"
2088 if test -n "$GNATBIND"; then
2089 echo "$ac_t""$GNATBIND" 1>&6
2091 echo "$ac_t""no" 1>&6
2095 if test -z "$ac_cv_prog_GNATBIND"; then
2096 if test -n "$ac_tool_prefix"; then
2097 # Extract the first word of "gnatbind", so it can be a program name with args.
2098 set dummy gnatbind; ac_word=$2
2099 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2100 echo "configure:2101: checking for $ac_word" >&5
2101 if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2102 echo $ac_n "(cached) $ac_c" 1>&6
2104 if test -n "$GNATBIND"; then
2105 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2107 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2109 for ac_dir in $ac_dummy; do
2110 test -z "$ac_dir" && ac_dir=.
2111 if test -f $ac_dir/$ac_word; then
2112 ac_cv_prog_GNATBIND="gnatbind"
2117 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
2120 GNATBIND="$ac_cv_prog_GNATBIND"
2121 if test -n "$GNATBIND"; then
2122 echo "$ac_t""$GNATBIND" 1>&6
2124 echo "$ac_t""no" 1>&6
2132 echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
2133 echo "configure:2134: checking whether compiler driver understands Ada" >&5
2134 if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
2135 echo $ac_n "(cached) $ac_c" 1>&6
2137 cat >conftest.adb <<EOF
2138 procedure conftest is begin null; end conftest;
2140 acx_cv_cc_gcc_supports_ada=no
2141 # There is a bug in old released versions of GCC which causes the
2142 # driver to exit successfully when the appropriate language module
2143 # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
2144 # Therefore we must check for the error message as well as an
2145 # unsuccessful exit.
2146 # Other compilers, like HP Tru64 UNIX cc, exit successfully when
2147 # given a .adb file, but produce no object file. So we must check
2148 # if an object file was really produced to guard against this.
2149 errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
2150 if test x"$errors" = x && test -f conftest.$ac_objext; then
2151 acx_cv_cc_gcc_supports_ada=yes
2157 echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
2159 if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
2165 echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
2166 echo "configure:2167: checking how to compare bootstrapped objects" >&5
2167 if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2168 echo $ac_n "(cached) $ac_c" 1>&6
2172 gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
2173 if cmp t1 t2 2 2 > /dev/null 2>&1; then
2174 if cmp t1 t2 1 1 > /dev/null 2>&1; then
2177 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
2180 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2181 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
2184 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
2191 echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
2192 do_compare="$gcc_cv_prog_cmp_skip"
2196 # Check for GMP and MPFR
2200 # Specify a location for mpfr
2201 # check for this first so it ends up on the link line before gmp.
2202 # Check whether --with-mpfr-dir or --without-mpfr-dir was given.
2203 if test "${with_mpfr_dir+set}" = set; then
2204 withval="$with_mpfr_dir"
2209 if test "x$with_mpfr_dir" != x; then
2210 gmpinc="-I$with_mpfr_dir/mpfr"
2211 gmplibs="$with_mpfr_dir/libmpfr.a"
2216 # Check whether --with-mpfr or --without-mpfr was given.
2217 if test "${with_mpfr+set}" = set; then
2218 withval="$with_mpfr"
2223 if test "x$with_mpfr" != x; then
2224 gmplibs="-L$with_mpfr/lib $gmplibs"
2225 gmpinc="-I$with_mpfr/include"
2228 # Specify a location for gmp
2229 # Check whether --with-gmp-dir or --without-gmp-dir was given.
2230 if test "${with_gmp_dir+set}" = set; then
2231 withval="$with_gmp_dir"
2236 if test "x$with_gmp_dir" != x; then
2237 gmpinc="$gmpinc -I$with_gmp_dir"
2238 if test -f "$with_gmp_dir/.libs/libgmp.a"; then
2239 gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
2240 elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
2241 gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
2243 # One of the later tests will catch the error if neither library is present.
2245 gmplibs="$gmplibs -lgmp"
2248 # Check whether --with-gmp or --without-gmp was given.
2249 if test "${with_gmp+set}" = set; then
2255 if test "x$with_gmp" != x; then
2256 gmplibs="-L$with_gmp/lib $gmplibs"
2257 gmpinc="-I$with_gmp/include $gmpinc"
2260 saved_CFLAGS="$CFLAGS"
2261 CFLAGS="$CFLAGS $gmpinc"
2262 # Check GMP actually works
2263 echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
2264 echo "configure:2265: checking for correct version of gmp.h" >&5
2265 cat > conftest.$ac_ext <<EOF
2266 #line 2267 "configure"
2267 #include "confdefs.h"
2271 #if __GNU_MP_VERSION < 3
2277 if { (eval echo configure:2278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2279 echo "$ac_t""yes" 1>&6
2281 echo "configure: failed program was:" >&5
2282 cat conftest.$ac_ext >&5
2284 echo "$ac_t""no" 1>&6; have_gmp=no
2288 if test x"$have_gmp" = xyes; then
2289 echo $ac_n "checking for MPFR""... $ac_c" 1>&6
2290 echo "configure:2291: checking for MPFR" >&5
2293 LIBS="$LIBS $gmplibs"
2294 cat > conftest.$ac_ext <<EOF
2295 #line 2296 "configure"
2296 #include "confdefs.h"
2300 mpfr_t n; mpfr_init(n);
2303 if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2305 echo "$ac_t""yes" 1>&6
2307 echo "configure: failed program was:" >&5
2308 cat conftest.$ac_ext >&5
2310 echo "$ac_t""no" 1>&6; have_gmp=no
2314 CFLAGS="$saved_CFLAGS"
2317 # Flags needed for both GMP and/or MPFR
2321 # By default, C is the only stage 1 language.
2325 # Figure out what language subdirectories are present.
2326 # Look if the user specified --enable-languages="..."; if not, use
2327 # the environment variable $LANGUAGES if defined. $LANGUAGES might
2329 # NB: embedded tabs in this IF block -- do not untabify
2330 if test -d ${srcdir}/gcc; then
2331 if test x"${enable_languages+set}" != xset; then
2332 if test x"${LANGUAGES+set}" = xset; then
2333 enable_languages="${LANGUAGES}"
2334 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
2336 enable_languages=all
2339 if test x"${enable_languages}" = x ||
2340 test x"${enable_languages}" = xyes;
2342 echo configure.in: --enable-languages needs at least one language argument 1>&2
2346 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
2348 # First scan to see if an enabled language requires some other language.
2349 # We assume that a given config-lang.in will list all the language
2350 # front ends it requires, even if some are required indirectly.
2351 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2352 case ${lang_frag} in
2354 # The odd quoting in the next line works around
2355 # an apparent bug in bash 1.12 on linux.
2356 ${srcdir}/gcc/[*]/config-lang.in) ;;
2358 # From the config-lang.in, get $language, $lang_requires
2362 for other in ${lang_requires} ; do
2363 case ,${enable_languages}, in
2367 echo " \`$other' language required by \`$language'; enabling" 1>&2
2368 enable_languages="${enable_languages},${other}"
2376 new_enable_languages=c
2377 missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
2378 potential_languages=c
2380 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2381 case ${lang_frag} in
2383 # The odd quoting in the next line works around
2384 # an apparent bug in bash 1.12 on linux.
2385 ${srcdir}/gcc/[*]/config-lang.in) ;;
2387 # From the config-lang.in, get $language, $target_libs,
2388 # $lang_dirs, $boot_language, and $build_by_default
2396 potential_languages="${potential_languages},${language}"
2397 # This is quite sensitive to the ordering of the case statement arms.
2398 case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
2400 echo "${lang_frag} doesn't set \$language." 1>&2
2404 # Ada was requested with no preexisting GNAT. Disable unconditionally.
2407 *,${language},*:*:*:*)
2408 # Language was explicitly selected; include it.
2412 # 'all' was selected, but this is not a default language
2413 # so do not include it.
2417 # 'all' was selected and this is a default language; include it.
2425 # Disable languages that need GMP if it isn't available.
2426 case ,${enable_languages},:${have_gmp}:${need_gmp} in
2427 *,${language},*:no:yes)
2428 # Specifically requested language; tell them.
2429 { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
2437 case $add_this_lang in
2439 # Remove language-dependent dirs.
2440 eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
2443 new_enable_languages="$new_enable_languages,$language"
2444 missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
2445 case ${boot_language} in
2447 # Add to (comma-separated) list of stage 1 languages.
2448 stage1_languages="${stage1_languages},${language}"
2457 missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
2458 if test "x$missing_languages" != x; then
2459 { echo "configure: error:
2460 The following requested languages were not found: ${missing_languages}
2461 The available languages are: ${potential_languages}" 1>&2; exit 1; }
2464 if test "x$new_enable_languages" != "x$enable_languages"; then
2465 echo The following languages will be built: ${new_enable_languages}
2467 enable_languages="$new_enable_languages"
2468 ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
2471 # Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
2472 # $build_configdirs and $target_configdirs.
2473 # If we have the source for $noconfigdirs entries, add them to $notsupp.
2476 for dir in . $skipdirs $noconfigdirs ; do
2477 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
2478 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2479 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
2480 if test -r $srcdir/$dirname/configure ; then
2481 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2484 notsupp="$notsupp $dir"
2488 if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2489 build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
2490 if test -r $srcdir/$dirname/configure ; then
2491 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2494 notsupp="$notsupp $dir"
2498 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2499 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
2500 if test -r $srcdir/$dirname/configure ; then
2501 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2504 notsupp="$notsupp $dir"
2510 # Sometimes the tools are distributed with libiberty but with no other
2511 # libraries. In that case, we don't want to build target-libiberty.
2512 if test -n "${target_configdirs}" ; then
2514 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
2515 if test "$i" != "libiberty" ; then
2516 if test -r $srcdir/$i/configure ; then
2522 if test -z "${others}" ; then
2527 # Quietly strip out all directories which aren't configurable in this tree.
2528 # This relies on all configurable subdirectories being autoconfiscated, which
2530 build_configdirs_all="$build_configdirs"
2532 for i in ${build_configdirs_all} ; do
2533 j=`echo $i | sed -e s/build-//g`
2534 if test -f ${srcdir}/$j/configure ; then
2535 build_configdirs="${build_configdirs} $i"
2539 configdirs_all="$configdirs"
2541 for i in ${configdirs_all} ; do
2542 if test -f ${srcdir}/$i/configure ; then
2543 configdirs="${configdirs} $i"
2547 target_configdirs_all="$target_configdirs"
2549 for i in ${target_configdirs_all} ; do
2550 j=`echo $i | sed -e s/target-//g`
2551 if test -f ${srcdir}/$j/configure ; then
2552 target_configdirs="${target_configdirs} $i"
2556 # Produce a warning message for the subdirs we can't configure.
2557 # This isn't especially interesting in the Cygnus tree, but in the individual
2558 # FSF releases, it's important to let people know when their machine isn't
2559 # supported by the one or two programs in a package.
2561 if test -n "${notsupp}" && test -z "${norecursion}" ; then
2562 # If $appdirs is non-empty, at least one of those directories must still
2563 # be configured, or we error out. (E.g., if the gas release supports a
2564 # specified target in some subdirs but not the gas subdir, we shouldn't
2565 # pretend that all is well.)
2566 if test -n "$appdirs" ; then
2567 for dir in $appdirs ; do
2568 if test -r $dir/Makefile.in ; then
2569 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2573 if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
2579 if test -n "$appdirs" ; then
2580 echo "*** This configuration is not supported by this package." 1>&2
2584 # Okay, some application will build, or we don't care to check. Still
2585 # notify of subdirs not getting built.
2586 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
2587 echo " ${notsupp}" 1>&2
2588 echo " (Any other directories should still work fine.)" 1>&2
2598 # Handle --with-headers=XXX. If the value is not "yes", the contents of
2599 # the named directory are copied to $(tooldir)/sys-include.
2600 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
2601 if test x${is_cross_compiler} = xno ; then
2602 echo 1>&2 '***' --with-headers is only supported when cross compiling
2605 if test x"${with_headers}" != xyes ; then
2606 case "${exec_prefixoption}" in
2608 *) x=${exec_prefix} ;;
2610 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
2614 # Handle --with-libs=XXX. If the value is not "yes", the contents of
2615 # the name directories are copied to $(tooldir)/lib. Multiple directories
2617 if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
2618 if test x${is_cross_compiler} = xno ; then
2619 echo 1>&2 '***' --with-libs is only supported when cross compiling
2622 if test x"${with_libs}" != xyes ; then
2623 # Copy the libraries in reverse order, so that files in the first named
2624 # library override files in subsequent libraries.
2625 case "${exec_prefixoption}" in
2627 *) x=${exec_prefix} ;;
2629 for l in ${with_libs}; do
2630 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
2635 # Handle ${copy_dirs}
2636 set fnord ${copy_dirs}
2638 while test $# != 0 ; do
2639 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
2642 echo Copying $1 to $2
2644 # Use the install script to create the directory and all required
2645 # parent directories.
2646 if test -d $2 ; then
2650 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
2653 # Copy the directory, assuming we have tar.
2654 # FIXME: Should we use B in the second tar? Not all systems support it.
2655 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
2657 # It is the responsibility of the user to correctly adjust all
2658 # symlinks. If somebody can figure out how to handle them correctly
2659 # here, feel free to add the code.
2666 extra_arflags_for_target=
2667 extra_nmflags_for_target=
2668 extra_ranlibflags_for_target=
2669 target_makefile_frag=/dev/null
2672 target_makefile_frag="config/mt-netware"
2674 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
2675 target_makefile_frag="config/mt-gnu"
2677 *-*-aix4.[3456789]* | *-*-aix[56789].*)
2678 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
2679 # commands to handle both 32-bit and 64-bit objects. These flags are
2680 # harmless if we're using GNU nm or ar.
2681 extra_arflags_for_target=" -X32_64"
2682 extra_nmflags_for_target=" -B -X32_64"
2685 # ranlib from Darwin requires the -c flag to look at common symbols.
2686 extra_ranlibflags_for_target=" -c"
2688 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
2689 target_makefile_frag="config/mt-wince"
2693 alphaieee_frag=/dev/null
2696 # This just makes sure to use the -mieee option to build target libs.
2697 # This should probably be set individually by each library.
2698 alphaieee_frag="config/mt-alphaieee"
2702 # If --enable-target-optspace always use -Os instead of -O2 to build
2703 # the target libraries, similarly if it is not specified, use -Os
2704 # on selected platforms.
2705 ospace_frag=/dev/null
2706 case "${enable_target_optspace}:${target}" in
2708 ospace_frag="config/mt-ospace"
2711 ospace_frag="config/mt-d30v"
2713 :m32r-* | :d10v-* | :fr30-*)
2714 ospace_frag="config/mt-ospace"
2719 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2723 # Set with_gnu_as and with_gnu_ld as appropriate.
2725 # This is done by determining whether or not the appropriate directory
2726 # is available, and by checking whether or not specific configurations
2727 # have requested that this magic not happen.
2729 # The command line options always override the explicit settings in
2730 # configure.in, and the settings in configure.in override this magic.
2732 # If the default for a toolchain is to use GNU as and ld, and you don't
2733 # want to do that, then you should use the --without-gnu-as and
2734 # --without-gnu-ld options for the configure script.
2736 if test x${use_gnu_as} = x &&
2737 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2739 extra_host_args="$extra_host_args --with-gnu-as"
2742 if test x${use_gnu_ld} = x &&
2743 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2745 extra_host_args="$extra_host_args --with-gnu-ld"
2748 # If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2749 # can detect this case.
2751 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2753 extra_host_args="$extra_host_args --with-newlib"
2756 # Default to using --with-stabs for certain targets.
2757 if test x${with_stabs} = x ; then
2761 mips*-*-* | alpha*-*-osf*)
2763 extra_host_args="${extra_host_args} --with-stabs"
2768 # hpux11 in 64bit mode has libraries in a weird place. Arrange to find
2769 # them automatically.
2772 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2776 # Some systems (e.g., one of the i386-aix systems the gas testers are
2777 # using) don't handle "\$" correctly, so don't use it here.
2778 tooldir='${exec_prefix}'/${target_alias}
2779 build_tooldir=${tooldir}
2781 # Generate default definitions for YACC, M4, LEX and other programs that run
2782 # on the build machine. These are used if the Makefile can't locate these
2783 # programs in objdir.
2784 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
2785 for ac_prog in bison
2787 # Extract the first word of "$ac_prog", so it can be a program name with args.
2788 set dummy $ac_prog; ac_word=$2
2789 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2790 echo "configure:2791: checking for $ac_word" >&5
2791 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_BISON'+set}'`\" = set"; then
2792 echo $ac_n "(cached) $ac_c" 1>&6
2794 if test -n "$CONFIGURED_BISON"; then
2795 ac_cv_prog_CONFIGURED_BISON="$CONFIGURED_BISON" # Let the user override the test.
2797 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2799 for ac_dir in $ac_dummy; do
2800 test -z "$ac_dir" && ac_dir=.
2801 if test -f $ac_dir/$ac_word; then
2802 ac_cv_prog_CONFIGURED_BISON="$ac_prog"
2809 CONFIGURED_BISON="$ac_cv_prog_CONFIGURED_BISON"
2810 if test -n "$CONFIGURED_BISON"; then
2811 echo "$ac_t""$CONFIGURED_BISON" 1>&6
2813 echo "$ac_t""no" 1>&6
2816 test -n "$CONFIGURED_BISON" && break
2818 test -n "$CONFIGURED_BISON" || CONFIGURED_BISON="$MISSING bison"
2820 for ac_prog in 'bison -y' byacc yacc
2822 # Extract the first word of "$ac_prog", so it can be a program name with args.
2823 set dummy $ac_prog; ac_word=$2
2824 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2825 echo "configure:2826: checking for $ac_word" >&5
2826 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_YACC'+set}'`\" = set"; then
2827 echo $ac_n "(cached) $ac_c" 1>&6
2829 if test -n "$CONFIGURED_YACC"; then
2830 ac_cv_prog_CONFIGURED_YACC="$CONFIGURED_YACC" # Let the user override the test.
2832 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2834 for ac_dir in $ac_dummy; do
2835 test -z "$ac_dir" && ac_dir=.
2836 if test -f $ac_dir/$ac_word; then
2837 ac_cv_prog_CONFIGURED_YACC="$ac_prog"
2844 CONFIGURED_YACC="$ac_cv_prog_CONFIGURED_YACC"
2845 if test -n "$CONFIGURED_YACC"; then
2846 echo "$ac_t""$CONFIGURED_YACC" 1>&6
2848 echo "$ac_t""no" 1>&6
2851 test -n "$CONFIGURED_YACC" && break
2853 test -n "$CONFIGURED_YACC" || CONFIGURED_YACC="$MISSING bison -y"
2855 for ac_prog in gm4 gnum4 m4
2857 # Extract the first word of "$ac_prog", so it can be a program name with args.
2858 set dummy $ac_prog; ac_word=$2
2859 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2860 echo "configure:2861: checking for $ac_word" >&5
2861 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_M4'+set}'`\" = set"; then
2862 echo $ac_n "(cached) $ac_c" 1>&6
2864 if test -n "$CONFIGURED_M4"; then
2865 ac_cv_prog_CONFIGURED_M4="$CONFIGURED_M4" # Let the user override the test.
2867 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2869 for ac_dir in $ac_dummy; do
2870 test -z "$ac_dir" && ac_dir=.
2871 if test -f $ac_dir/$ac_word; then
2872 ac_cv_prog_CONFIGURED_M4="$ac_prog"
2879 CONFIGURED_M4="$ac_cv_prog_CONFIGURED_M4"
2880 if test -n "$CONFIGURED_M4"; then
2881 echo "$ac_t""$CONFIGURED_M4" 1>&6
2883 echo "$ac_t""no" 1>&6
2886 test -n "$CONFIGURED_M4" && break
2888 test -n "$CONFIGURED_M4" || CONFIGURED_M4="$MISSING m4"
2892 # Extract the first word of "$ac_prog", so it can be a program name with args.
2893 set dummy $ac_prog; ac_word=$2
2894 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2895 echo "configure:2896: checking for $ac_word" >&5
2896 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_FLEX'+set}'`\" = set"; then
2897 echo $ac_n "(cached) $ac_c" 1>&6
2899 if test -n "$CONFIGURED_FLEX"; then
2900 ac_cv_prog_CONFIGURED_FLEX="$CONFIGURED_FLEX" # Let the user override the test.
2902 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2904 for ac_dir in $ac_dummy; do
2905 test -z "$ac_dir" && ac_dir=.
2906 if test -f $ac_dir/$ac_word; then
2907 ac_cv_prog_CONFIGURED_FLEX="$ac_prog"
2914 CONFIGURED_FLEX="$ac_cv_prog_CONFIGURED_FLEX"
2915 if test -n "$CONFIGURED_FLEX"; then
2916 echo "$ac_t""$CONFIGURED_FLEX" 1>&6
2918 echo "$ac_t""no" 1>&6
2921 test -n "$CONFIGURED_FLEX" && break
2923 test -n "$CONFIGURED_FLEX" || CONFIGURED_FLEX="$MISSING flex"
2925 for ac_prog in flex lex
2927 # Extract the first word of "$ac_prog", so it can be a program name with args.
2928 set dummy $ac_prog; ac_word=$2
2929 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2930 echo "configure:2931: checking for $ac_word" >&5
2931 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LEX'+set}'`\" = set"; then
2932 echo $ac_n "(cached) $ac_c" 1>&6
2934 if test -n "$CONFIGURED_LEX"; then
2935 ac_cv_prog_CONFIGURED_LEX="$CONFIGURED_LEX" # Let the user override the test.
2937 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2939 for ac_dir in $ac_dummy; do
2940 test -z "$ac_dir" && ac_dir=.
2941 if test -f $ac_dir/$ac_word; then
2942 ac_cv_prog_CONFIGURED_LEX="$ac_prog"
2949 CONFIGURED_LEX="$ac_cv_prog_CONFIGURED_LEX"
2950 if test -n "$CONFIGURED_LEX"; then
2951 echo "$ac_t""$CONFIGURED_LEX" 1>&6
2953 echo "$ac_t""no" 1>&6
2956 test -n "$CONFIGURED_LEX" && break
2958 test -n "$CONFIGURED_LEX" || CONFIGURED_LEX="$MISSING flex"
2960 for ac_prog in makeinfo
2962 # Extract the first word of "$ac_prog", so it can be a program name with args.
2963 set dummy $ac_prog; ac_word=$2
2964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2965 echo "configure:2966: checking for $ac_word" >&5
2966 if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_MAKEINFO'+set}'`\" = set"; then
2967 echo $ac_n "(cached) $ac_c" 1>&6
2969 if test -n "$CONFIGURED_MAKEINFO"; then
2970 ac_cv_prog_CONFIGURED_MAKEINFO="$CONFIGURED_MAKEINFO" # Let the user override the test.
2972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2974 for ac_dir in $ac_dummy; do
2975 test -z "$ac_dir" && ac_dir=.
2976 if test -f $ac_dir/$ac_word; then
2977 ac_cv_prog_CONFIGURED_MAKEINFO="$ac_prog"
2984 CONFIGURED_MAKEINFO="$ac_cv_prog_CONFIGURED_MAKEINFO"
2985 if test -n "$CONFIGURED_MAKEINFO"; then
2986 echo "$ac_t""$CONFIGURED_MAKEINFO" 1>&6
2988 echo "$ac_t""no" 1>&6
2991 test -n "$CONFIGURED_MAKEINFO" && break
2993 test -n "$CONFIGURED_MAKEINFO" || CONFIGURED_MAKEINFO="$MISSING makeinfo"
2996 # Create a .gdbinit file which runs the one in srcdir
2997 # and tells GDB to look there for source files.
2999 if test -r ${srcdir}/.gdbinit ; then
3002 *) cat > ./.gdbinit <<EOF
3006 source ${srcdir}/.gdbinit
3012 # Make sure that the compiler is able to generate an executable. If it
3013 # can't, we are probably in trouble. We don't care whether we can run the
3014 # executable--we might be using a cross compiler--we only care whether it
3015 # can be created. At this point the main configure script has set CC.
3017 echo "int main () { return 0; }" > conftest.c
3018 ${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
3019 if test $? = 0 ; then
3020 if test -s conftest || test -s conftest.exe ; then
3026 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
3027 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
3034 # The Solaris /usr/ucb/cc compiler does not appear to work.
3036 sparc-sun-solaris2*)
3037 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
3038 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
3040 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
3041 if test -d /opt/cygnus/bin ; then
3042 if test "$could_use" = "" ; then
3043 could_use="/opt/cygnus/bin"
3045 could_use="$could_use or /opt/cygnus/bin"
3048 if test "$could_use" = "" ; then
3049 echo "Warning: compilation may fail because you're using"
3050 echo "/usr/ucb/cc. You should change your PATH or CC "
3051 echo "variable and rerun configure."
3053 echo "Warning: compilation may fail because you're using"
3054 echo "/usr/ucb/cc, when you should use the C compiler from"
3055 echo "$could_use. You should change your"
3056 echo "PATH or CC variable and rerun configure."
3062 # If no --enable-shared nor --disable-shared is specified, we set up
3063 # LD_LIBRARY_PATH when we build for gcc.
3064 case $enable_shared in
3066 if test -d ${srcdir}/gcc; then
3073 set_lib_path=$enable_shared
3077 # If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
3078 # binutils tools will find libbfd.so.
3079 case "${set_lib_path}" in
3080 no) SET_LIB_PATH= ;;
3081 *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
3085 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
3086 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
3089 # Record target_configdirs and the configure arguments for target and
3090 # build configuration in Makefile.
3091 target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
3092 build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
3094 # Determine whether gdb needs tk/tcl or not.
3095 # Use 'maybe' since enable_gdbtk might be true even if tk isn't available
3096 # and in that case we want gdb to be built without tk. Ugh!
3097 # In fact I believe gdb is the *only* package directly dependent on tk,
3098 # so we should be able to put the 'maybe's in unconditionally and
3099 # leave out the maybe dependencies when enable_gdbtk is false. I'm not
3100 # 100% sure that that's safe though.
3102 gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
3103 case "$enable_gdbtk" in
3107 GDB_TK="${gdb_tk}" ;;
3109 # Only add the dependency on gdbtk when GDBtk is part of the gdb
3110 # distro. Eventually someone will fix this and move Insight, nee
3111 # gdbtk to a separate directory.
3112 if test -d ${srcdir}/gdb/gdbtk ; then
3120 # Strip out unwanted targets.
3122 # While at that, we remove Makefiles if we were started for recursive
3123 # configuration, so that the top-level Makefile reconfigures them,
3124 # like we used to do when configure itself was recursive.
3126 # Loop over modules. $extrasub must be used with care, limiting as
3127 # much as possible the usage of range addresses. That's because autoconf
3128 # splits the sed script to overcome limits in the number of commands,
3129 # and relying on carefully-timed sed passes may turn out to be very hard
3130 # to maintain later. In this particular case, you just have to be careful
3131 # not to nest @if/@endif pairs, because configure will not warn you at all.
3133 # Check whether --enable-bootstrap or --disable-bootstrap was given.
3134 if test "${enable_bootstrap+set}" = set; then
3135 enableval="$enable_bootstrap"
3138 enable_bootstrap=default
3142 # Issue errors and warnings for invalid/strange bootstrap combinations.
3143 case "$configdirs" in
3144 *gcc*) have_compiler=yes ;;
3145 *) have_compiler=no ;;
3148 case "$have_compiler:$host:$target:$enable_bootstrap" in
3151 # Default behavior. (We'll) enable bootstrap if we have a compiler
3152 # and we are in a native configuration.
3153 yes:$build:$build:default)
3154 # This will become 'yes'
3155 enable_bootstrap=no ;;
3158 enable_bootstrap=no ;;
3160 # We have a compiler and we are in a native configuration, bootstrap is ok
3161 yes:$build:$build:yes | yes:$build:$build:lean)
3164 # Other configurations, but we have a compiler. Assume the user knows
3166 yes:*:*:yes | yes:*:*:lean)
3167 echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
3170 # No compiler: if they passed --enable-bootstrap explicitly, fail
3171 no:*:*:yes | no:*:*:lean)
3172 { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
3174 # Fail if wrong command line
3176 { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
3180 # Adjust the toplevel makefile according to whether bootstrap was selected.
3181 case "$enable_bootstrap" in
3184 default_target=bootstrap
3185 bootstrap_suffix=bootstrap ;;
3188 default_target=bootstrap
3189 bootstrap_suffix=bootstrap ;;
3192 bootstrap_suffix=no-bootstrap ;;
3197 for module in ${build_configdirs} ; do
3198 if test -z "${no_recursion}" \
3199 && test -f ${build_subdir}/${module}/Makefile; then
3200 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
3201 rm -f ${build_subdir}/${module}/Makefile
3204 /^@if build-$module\$/d
3205 /^@endif build-$module\$/d
3206 /^@if build-$module-$bootstrap_suffix\$/d
3207 /^@endif build-$module-$bootstrap_suffix\$/d"
3209 for module in ${configdirs} ; do
3210 if test -z "${no_recursion}" \
3211 && test -f ${module}/Makefile; then
3212 echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
3213 rm -f ${module}/Makefile
3217 /^@endif $module\$/d
3218 /^@if $module-$bootstrap_suffix\$/d
3219 /^@endif $module-$bootstrap_suffix\$/d"
3221 for module in ${target_configdirs} ; do
3222 if test -z "${no_recursion}" \
3223 && test -f ${target_subdir}/${module}/Makefile; then
3224 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
3225 rm -f ${target_subdir}/${module}/Makefile
3228 /^@if target-$module\$/d
3229 /^@endif target-$module\$/d
3230 /^@if target-$module-$bootstrap_suffix\$/d
3231 /^@endif target-$module-$bootstrap_suffix\$/d"
3235 /^@if /,/^@endif /d"
3237 # Create the serialization dependencies. This uses a temporary file.
3239 # Check whether --enable-serial-configure or --disable-serial-configure was given.
3240 if test "${enable_serial_configure+set}" = set; then
3241 enableval="$enable_serial_configure"
3246 case ${enable_serial_configure} in
3248 enable_serial_build_configure=yes
3249 enable_serial_host_configure=yes
3250 enable_serial_target_configure=yes
3254 # These force 'configure's to be done one at a time, to avoid problems
3255 # with contention over a shared config.cache.
3257 echo '# serdep.tmp' > serdep.tmp
3259 test "x${enable_serial_build_configure}" = xyes &&
3260 for item in ${build_configdirs} ; do
3263 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
3268 test "x${enable_serial_host_configure}" = xyes &&
3269 for item in ${configdirs} ; do
3272 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
3277 test "x${enable_serial_target_configure}" = xyes &&
3278 for item in ${target_configdirs} ; do
3281 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
3285 serialization_dependencies=serdep.tmp
3288 # Base args. Strip norecursion, cache-file, srcdir, host, build,
3289 # target and nonopt. These are the ones we might not want to pass
3290 # down to subconfigures. Also strip program-prefix, program-suffix,
3291 # and program-transform-name, so that we can pass down a consistent
3292 # program-transform-name. If autoconf has put single quotes around
3293 # any of these arguments (because they contain shell metacharacters)
3294 # then this will fail; in practice this only happens for
3295 # --program-transform-name, so be sure to override --program-transform-name
3296 # at the end of the argument list.
3297 # These will be expanded by make, so quote '$'.
3298 cat <<\EOF_SED > conftestsed
3300 s/ --c[a-z-]*[= ][^ ]*//g
3301 s/ --sr[a-z-]*[= ][^ ]*//g
3302 s/ --ho[a-z-]*[= ][^ ]*//g
3303 s/ --bu[a-z-]*[= ][^ ]*//g
3304 s/ --t[a-z-]*[= ][^ ]*//g
3305 s/ --program-[pst][a-z-]*[= ][^ ]*//g
3306 s/ -cache-file[= ][^ ]*//g
3307 s/ -srcdir[= ][^ ]*//g
3308 s/ -host[= ][^ ]*//g
3309 s/ -build[= ][^ ]*//g
3310 s/ -target[= ][^ ]*//g
3311 s/ -program-prefix[= ][^ ]*//g
3312 s/ -program-suffix[= ][^ ]*//g
3313 s/ -program-transform-name[= ][^ ]*//g
3318 sed -f conftestsed <<EOF_SED > conftestsed.out
3319 ${ac_configure_args}
3321 baseargs=`cat conftestsed.out`
3322 rm -f conftestsed conftestsed.out
3324 # Add in --program-transform-name, after --program-prefix and
3325 # --program-suffix have been applied to it. Autoconf has already
3326 # doubled dollar signs and backslashes in program_transform_name; we want
3327 # the backslashes un-doubled, and then the entire thing wrapped in single
3328 # quotes, because this will be expanded first by make and then by the shell.
3329 # Also, because we want to override the logic in subdir configure scripts to
3330 # choose program_transform_name, replace any s,x,x, with s,y,y,.
3331 sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
3332 ${program_transform_name}
3334 gcc_transform_name=`cat conftestsed.out`
3335 rm -f conftestsed.out
3336 baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
3338 # For the build-side libraries, we just need to pretend we're native,
3339 # and not use the same cache file. Multilibs are neither needed nor
3341 build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
3343 # For host modules, accept cache file option, or specification as blank.
3344 case "${cache_file}" in
3346 cache_file_option="" ;;
3347 /* | [A-Za-z]:[\\/]* ) # absolute path
3348 cache_file_option="--cache-file=${cache_file}" ;;
3350 cache_file_option="--cache-file=../${cache_file}" ;;
3353 # Host dirs don't like to share a cache file either, horribly enough.
3354 # This seems to be due to autoconf 2.5x stupidity.
3355 host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
3357 target_configargs=${baseargs}
3359 # Passing a --with-cross-host argument lets the target libraries know
3360 # whether they are being built with a cross-compiler or being built
3361 # native. However, it would be better to use other mechanisms to make the
3362 # sorts of decisions they want to make on this basis. Please consider
3363 # this option to be deprecated. FIXME.
3364 if test x${is_cross_compiler} = xyes ; then
3365 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
3368 # Default to --enable-multilib.
3369 if test x${enable_multilib} = x ; then
3370 target_configargs="--enable-multilib ${target_configargs}"
3373 # Pass --with-newlib if appropriate. Note that target_configdirs has
3374 # changed from the earlier setting of with_newlib.
3375 if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
3376 target_configargs="--with-newlib ${target_configargs}"
3379 # Different target subdirs use different values of certain variables
3380 # (notably CXX). Worse, multilibs use *lots* of different values.
3381 # Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
3382 # it doesn't automatically accept command-line overrides of them.
3383 # This means it's not safe for target subdirs to share a cache file,
3384 # which is disgusting, but there you have it. Hopefully this can be
3385 # fixed in future. It's still worthwhile to use a cache file for each
3386 # directory. I think.
3388 # Pass the appropriate --host, --build, and --cache-file arguments.
3389 target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
3391 # provide a proper gxx_include_dir.
3393 case "${with_gxx_include_dir}" in
3395 { echo "configure: error: --with-gxx-include-dir=[dir] requires a directory" 1>&2; exit 1; }
3398 case "${enable_version_specific_runtime_libs}" in
3399 yes) gxx_include_dir='${libsubdir}/include/c++' ;;
3401 libstdcxx_incdir=c++/${gcc_version}
3402 gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
3404 *) gxx_include_dir=${with_gxx_include_dir} ;;
3411 case " $target_configdirs " in
3413 case " $target_configargs " in
3414 *" --with-newlib "*)
3417 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' ;;
3420 # If we're not building GCC, don't discard standard headers.
3421 if test -d ${srcdir}/gcc; then
3422 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
3424 if test "${build}" != "${host}"; then
3425 # On Canadian crosses, CC_FOR_TARGET will have already been set
3426 # by `configure', so we won't have an opportunity to add -Bgcc/
3427 # to it. This is right: we don't want to search that directory
3428 # for binaries, but we want the header files in there, so add
3430 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
3432 # Someone might think of using the pre-installed headers on
3433 # Canadian crosses, in case the installed compiler is not fully
3434 # compatible with the compiler being built. In this case, it
3435 # would be better to flag an error than risking having
3436 # incompatible object files being constructed. We can't
3437 # guarantee that an error will be flagged, but let's hope the
3438 # compiler will do it, when presented with incompatible header
3443 case "${target}-${is_cross_compiler}" in
3444 i[3456789]86-*-linux*-no)
3445 # Here host == target, so we don't need to build gcc,
3446 # so we don't want to discard standard headers.
3447 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
3450 # If we're building newlib, use its generic headers last, but search
3451 # for any libc-related directories first (so make it the last -B
3453 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
3461 # Allow the user to override the flags for
3462 # our build compiler if desired.
3463 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3465 # On Canadian crosses, we'll be searching the right directories for
3466 # the previously-installed cross compiler, so don't bother to add
3467 # flags for directories within the install tree of the compiler
3468 # being built; programs in there won't even run.
3469 if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
3470 # Search for pre-installed headers if nothing else fits.
3471 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
3474 if test "x${use_gnu_ld}" = x &&
3475 echo " ${configdirs} " | grep " ld " > /dev/null ; then
3476 # Arrange for us to find uninstalled linker scripts.
3477 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
3480 if test "x${CC_FOR_TARGET+set}" = xset; then
3482 elif test -d ${srcdir}/gcc; then
3483 CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
3484 elif test "$host" = "$target"; then
3485 CC_FOR_TARGET='$(CC)'
3487 CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
3489 CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
3491 if test "x${GCJ_FOR_TARGET+set}" = xset; then
3493 elif test -d ${srcdir}/gcc; then
3494 GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
3495 elif test "$host" = "$target"; then
3496 GCJ_FOR_TARGET='gcj'
3498 GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
3500 GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
3502 if test "x${GFORTRAN_FOR_TARGET+set}" = xset; then
3504 elif test -d ${srcdir}/gcc; then
3505 GFORTRAN_FOR_TARGET='$$r/gcc/gfortran -B$$r/gcc/'
3506 elif test "$host" = "$target"; then
3507 GFORTRAN_FOR_TARGET='gfortran'
3509 GFORTRAN_FOR_TARGET=`echo gfortran | sed "${program_transform_name}"`
3511 case $GFORTRAN_FOR_TARGET in
3512 *' $(FLAGS_FOR_TARGET)') ;;
3513 *) GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
3516 # Don't use libstdc++-v3's flags to configure/build itself.
3517 libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
3518 raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
3520 if test "x${CXX_FOR_TARGET+set}" = xset; then
3521 if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then
3522 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
3524 elif test -d ${srcdir}/gcc; then
3525 # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
3526 # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
3527 # default whereas gcc does not.
3528 # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
3530 CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
3531 RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
3532 elif test "$host" = "$target"; then
3533 CXX_FOR_TARGET='$(CXX)'
3534 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
3536 CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
3537 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
3539 CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
3540 RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
3542 qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
3543 qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
3545 # We want to defer the evaluation of `cmd`s and shell variables in
3546 # CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
3547 # bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
3548 # quotes, but we still have to duplicate `$'s so that shell variables
3549 # can be expanded by the nested make as shell variables, not as make
3551 qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
3552 qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
3554 # Wrap CC_FOR_TARGET and friends, for certain types of builds.
3555 CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
3556 GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
3557 GFORTRAN_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GFORTRAN_FOR_TARGET}"
3558 CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
3559 RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
3560 CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
3561 RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
3563 # Makefile fragments.
3564 for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
3566 eval fragval=\$$frag
3567 if test $fragval != /dev/null; then
3568 eval $frag=${srcdir}/$fragval
3576 # Miscellanea: directories, flags, etc.
3585 # Build module lists & subconfigure args.
3589 # Host module lists & subconfigure args.
3593 # Target module lists & subconfigure args.
3603 test -n "$host_alias" && ncn_tool_prefix=$host_alias-
3604 ncn_target_tool_prefix=
3605 test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
3607 if test -n "$ncn_tool_prefix"; then
3608 # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
3609 set dummy ${ncn_tool_prefix}ar; ac_word=$2
3610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3611 echo "configure:3612: checking for $ac_word" >&5
3612 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3613 echo $ac_n "(cached) $ac_c" 1>&6
3615 if test -n "$AR"; then
3616 ac_cv_prog_AR="$AR" # Let the user override the test.
3618 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3620 for ac_dir in $ac_dummy; do
3621 test -z "$ac_dir" && ac_dir=.
3622 if test -f $ac_dir/$ac_word; then
3623 ac_cv_prog_AR="${ncn_tool_prefix}ar"
3631 if test -n "$AR"; then
3632 echo "$ac_t""$AR" 1>&6
3634 echo "$ac_t""no" 1>&6
3638 if test -z "$ac_cv_prog_AR" ; then
3639 if test $build = $host ; then
3641 # Extract the first word of "ar", so it can be a program name with args.
3642 set dummy ar; ac_word=$2
3643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3644 echo "configure:3645: checking for $ac_word" >&5
3645 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
3646 echo $ac_n "(cached) $ac_c" 1>&6
3648 if test -n "$ncn_cv_AR"; then
3649 ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test.
3651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3653 for ac_dir in $ac_dummy; do
3654 test -z "$ac_dir" && ac_dir=.
3655 if test -f $ac_dir/$ac_word; then
3656 ac_cv_prog_ncn_cv_AR="ar"
3661 test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar"
3664 ncn_cv_AR="$ac_cv_prog_ncn_cv_AR"
3665 if test -n "$ncn_cv_AR"; then
3666 echo "$ac_t""$ncn_cv_AR" 1>&6
3668 echo "$ac_t""no" 1>&6
3673 AR="${ncn_tool_prefix}ar"
3679 if test -n "$ncn_tool_prefix"; then
3680 # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
3681 set dummy ${ncn_tool_prefix}as; ac_word=$2
3682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3683 echo "configure:3684: checking for $ac_word" >&5
3684 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3685 echo $ac_n "(cached) $ac_c" 1>&6
3687 if test -n "$AS"; then
3688 ac_cv_prog_AS="$AS" # Let the user override the test.
3690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3692 for ac_dir in $ac_dummy; do
3693 test -z "$ac_dir" && ac_dir=.
3694 if test -f $ac_dir/$ac_word; then
3695 ac_cv_prog_AS="${ncn_tool_prefix}as"
3703 if test -n "$AS"; then
3704 echo "$ac_t""$AS" 1>&6
3706 echo "$ac_t""no" 1>&6
3710 if test -z "$ac_cv_prog_AS" ; then
3711 if test $build = $host ; then
3713 # Extract the first word of "as", so it can be a program name with args.
3714 set dummy as; ac_word=$2
3715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3716 echo "configure:3717: checking for $ac_word" >&5
3717 if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
3718 echo $ac_n "(cached) $ac_c" 1>&6
3720 if test -n "$ncn_cv_AS"; then
3721 ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test.
3723 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3725 for ac_dir in $ac_dummy; do
3726 test -z "$ac_dir" && ac_dir=.
3727 if test -f $ac_dir/$ac_word; then
3728 ac_cv_prog_ncn_cv_AS="as"
3733 test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as"
3736 ncn_cv_AS="$ac_cv_prog_ncn_cv_AS"
3737 if test -n "$ncn_cv_AS"; then
3738 echo "$ac_t""$ncn_cv_AS" 1>&6
3740 echo "$ac_t""no" 1>&6
3745 AS="${ncn_tool_prefix}as"
3751 if test -n "$ncn_tool_prefix"; then
3752 # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
3753 set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
3754 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3755 echo "configure:3756: checking for $ac_word" >&5
3756 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3757 echo $ac_n "(cached) $ac_c" 1>&6
3759 if test -n "$DLLTOOL"; then
3760 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3762 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3764 for ac_dir in $ac_dummy; do
3765 test -z "$ac_dir" && ac_dir=.
3766 if test -f $ac_dir/$ac_word; then
3767 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}dlltool"