]> git.ipfire.org Git - thirdparty/gcc.git/blame - configure
* decl2.c (mark_used): Fix typo in comment.
[thirdparty/gcc.git] / configure
CommitLineData
671aa708 1#! /bin/sh
72a7ab82 2
671aa708 3# Guess values for system-dependent variables and create Makefiles.
72a7ab82
AP
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
671aa708
NN
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
72a7ab82
AP
10# Defaults:
11ac_help=
671aa708 12ac_default_prefix=/usr/local
72a7ab82
AP
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-libada Builds libada directory"
16ac_help="$ac_help
17 --enable-libssp Builds libssp directory"
18ac_help="$ac_help
19 --with-mpfr-dir=PATH Specify source directory for MPFR library"
20ac_help="$ac_help
21 --with-mpfr=PATH Specify directory for installed MPFR library"
22ac_help="$ac_help
23 --with-gmp-dir=PATH Specify source directory for GMP library"
24ac_help="$ac_help
25 --with-gmp=PATH Specify directory for installed GMP library"
26ac_help="$ac_help
27 --with-build-sysroot=sysroot
28 use sysroot as the system root during the build"
29ac_help="$ac_help
30 --enable-bootstrap[=lean] Enable bootstrapping [no]"
31ac_help="$ac_help
32 --enable-serial-[{host,target,build}-]configure
33 Force sequential configuration of
34 sub-packages for the host, target or build
35 machine, or all sub-packages"
36ac_help="$ac_help
37 --enable-maintainer-mode enable make rules and dependencies not useful
38 (and sometimes confusing) to the casual installer"
39ac_help="$ac_help
40 --enable-werror enable -Werror in bootstrap stage2 and later"
671aa708
NN
41
42# Initialize some variables set by options.
43# The variables have the same names as the options, with
44# dashes changed to underlines.
72a7ab82
AP
45build=NONE
46cache_file=./config.cache
671aa708 47exec_prefix=NONE
72a7ab82 48host=NONE
671aa708 49no_create=
72a7ab82 50nonopt=NONE
671aa708
NN
51no_recursion=
52prefix=NONE
53program_prefix=NONE
54program_suffix=NONE
55program_transform_name=s,x,x,
56silent=
57site=
58srcdir=
72a7ab82 59target=NONE
671aa708
NN
60verbose=
61x_includes=NONE
62x_libraries=NONE
63bindir='${exec_prefix}/bin'
64sbindir='${exec_prefix}/sbin'
65libexecdir='${exec_prefix}/libexec'
66datadir='${prefix}/share'
67sysconfdir='${prefix}/etc'
68sharedstatedir='${prefix}/com'
69localstatedir='${prefix}/var'
70libdir='${exec_prefix}/lib'
71includedir='${prefix}/include'
72oldincludedir='/usr/include'
73infodir='${prefix}/info'
74mandir='${prefix}/man'
79c06341 75
72a7ab82
AP
76# Initialize some other variables.
77subdirs=
78MFLAGS= MAKEFLAGS=
79SHELL=${CONFIG_SHELL-/bin/sh}
80# Maximum number of lines to put in a shell here document.
81ac_max_here_lines=12
82
671aa708
NN
83ac_prev=
84for ac_option
85do
72a7ab82 86
671aa708
NN
87 # If the previous option needs an argument, assign it.
88 if test -n "$ac_prev"; then
89 eval "$ac_prev=\$ac_option"
90 ac_prev=
91 continue
92 fi
79c06341 93
72a7ab82
AP
94 case "$ac_option" in
95 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
96 *) ac_optarg= ;;
97 esac
671aa708
NN
98
99 # Accept the important Cygnus configure options, so we can diagnose typos.
100
72a7ab82 101 case "$ac_option" in
671aa708
NN
102
103 -bindir | --bindir | --bindi | --bind | --bin | --bi)
104 ac_prev=bindir ;;
105 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
72a7ab82 106 bindir="$ac_optarg" ;;
671aa708
NN
107
108 -build | --build | --buil | --bui | --bu)
72a7ab82 109 ac_prev=build ;;
671aa708 110 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
72a7ab82 111 build="$ac_optarg" ;;
671aa708
NN
112
113 -cache-file | --cache-file | --cache-fil | --cache-fi \
114 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
115 ac_prev=cache_file ;;
116 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
117 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
72a7ab82 118 cache_file="$ac_optarg" ;;
671aa708
NN
119
120 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
121 ac_prev=datadir ;;
122 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
123 | --da=*)
72a7ab82 124 datadir="$ac_optarg" ;;
671aa708
NN
125
126 -disable-* | --disable-*)
72a7ab82 127 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
671aa708 128 # Reject names that are not valid shell variable names.
72a7ab82
AP
129 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
130 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
131 fi
132 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
133 eval "enable_${ac_feature}=no" ;;
671aa708
NN
134
135 -enable-* | --enable-*)
72a7ab82 136 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
671aa708 137 # Reject names that are not valid shell variable names.
72a7ab82
AP
138 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
139 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
140 fi
141 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
142 case "$ac_option" in
143 *=*) ;;
671aa708
NN
144 *) ac_optarg=yes ;;
145 esac
72a7ab82 146 eval "enable_${ac_feature}='$ac_optarg'" ;;
671aa708
NN
147
148 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
149 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
150 | --exec | --exe | --ex)
151 ac_prev=exec_prefix ;;
152 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
153 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
154 | --exec=* | --exe=* | --ex=*)
72a7ab82 155 exec_prefix="$ac_optarg" ;;
671aa708
NN
156
157 -gas | --gas | --ga | --g)
158 # Obsolete; use --with-gas.
159 with_gas=yes ;;
160
72a7ab82
AP
161 -help | --help | --hel | --he)
162 # Omit some internal or obsolete options to make the list less imposing.
163 # This message is too long to be a string in the A/UX 3.1 sh.
164 cat << EOF
165Usage: configure [options] [host]
166Options: [defaults in brackets after descriptions]
167Configuration:
168 --cache-file=FILE cache test results in FILE
169 --help print this message
170 --no-create do not create output files
171 --quiet, --silent do not print \`checking...' messages
172 --version print the version of autoconf that created configure
173Directory and file names:
174 --prefix=PREFIX install architecture-independent files in PREFIX
175 [$ac_default_prefix]
176 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
177 [same as prefix]
178 --bindir=DIR user executables in DIR [EPREFIX/bin]
179 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
180 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
181 --datadir=DIR read-only architecture-independent data in DIR
182 [PREFIX/share]
183 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
184 --sharedstatedir=DIR modifiable architecture-independent data in DIR
185 [PREFIX/com]
186 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
187 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
188 --includedir=DIR C header files in DIR [PREFIX/include]
189 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
190 --infodir=DIR info documentation in DIR [PREFIX/info]
191 --mandir=DIR man documentation in DIR [PREFIX/man]
192 --srcdir=DIR find the sources in DIR [configure dir or ..]
193 --program-prefix=PREFIX prepend PREFIX to installed program names
194 --program-suffix=SUFFIX append SUFFIX to installed program names
195 --program-transform-name=PROGRAM
196 run sed PROGRAM on installed program names
197EOF
198 cat << EOF
199Host type:
200 --build=BUILD configure for building on BUILD [BUILD=HOST]
201 --host=HOST configure for HOST [guessed]
202 --target=TARGET configure for TARGET [TARGET=HOST]
203Features and packages:
204 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
205 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
206 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
207 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
208 --x-includes=DIR X include files are in DIR
209 --x-libraries=DIR X library files are in DIR
210EOF
211 if test -n "$ac_help"; then
212 echo "--enable and --with options recognized:$ac_help"
213 fi
214 exit 0 ;;
671aa708
NN
215
216 -host | --host | --hos | --ho)
72a7ab82 217 ac_prev=host ;;
671aa708 218 -host=* | --host=* | --hos=* | --ho=*)
72a7ab82 219 host="$ac_optarg" ;;
671aa708
NN
220
221 -includedir | --includedir | --includedi | --included | --include \
222 | --includ | --inclu | --incl | --inc)
223 ac_prev=includedir ;;
224 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
225 | --includ=* | --inclu=* | --incl=* | --inc=*)
72a7ab82 226 includedir="$ac_optarg" ;;
671aa708
NN
227
228 -infodir | --infodir | --infodi | --infod | --info | --inf)
229 ac_prev=infodir ;;
230 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
72a7ab82 231 infodir="$ac_optarg" ;;
671aa708
NN
232
233 -libdir | --libdir | --libdi | --libd)
234 ac_prev=libdir ;;
235 -libdir=* | --libdir=* | --libdi=* | --libd=*)
72a7ab82 236 libdir="$ac_optarg" ;;
671aa708
NN
237
238 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
239 | --libexe | --libex | --libe)
240 ac_prev=libexecdir ;;
241 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
242 | --libexe=* | --libex=* | --libe=*)
72a7ab82 243 libexecdir="$ac_optarg" ;;
671aa708
NN
244
245 -localstatedir | --localstatedir | --localstatedi | --localstated \
246 | --localstate | --localstat | --localsta | --localst \
247 | --locals | --local | --loca | --loc | --lo)
248 ac_prev=localstatedir ;;
249 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
250 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
251 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
72a7ab82 252 localstatedir="$ac_optarg" ;;
671aa708
NN
253
254 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
255 ac_prev=mandir ;;
256 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
72a7ab82 257 mandir="$ac_optarg" ;;
671aa708
NN
258
259 -nfp | --nfp | --nf)
260 # Obsolete; use --without-fp.
261 with_fp=no ;;
262
263 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
72a7ab82 264 | --no-cr | --no-c)
671aa708
NN
265 no_create=yes ;;
266
267 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
268 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
269 no_recursion=yes ;;
270
271 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
272 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
273 | --oldin | --oldi | --old | --ol | --o)
274 ac_prev=oldincludedir ;;
275 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
276 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
277 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
72a7ab82 278 oldincludedir="$ac_optarg" ;;
671aa708
NN
279
280 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
281 ac_prev=prefix ;;
282 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
72a7ab82 283 prefix="$ac_optarg" ;;
671aa708
NN
284
285 -program-prefix | --program-prefix | --program-prefi | --program-pref \
286 | --program-pre | --program-pr | --program-p)
287 ac_prev=program_prefix ;;
288 -program-prefix=* | --program-prefix=* | --program-prefi=* \
289 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
72a7ab82 290 program_prefix="$ac_optarg" ;;
671aa708
NN
291
292 -program-suffix | --program-suffix | --program-suffi | --program-suff \
293 | --program-suf | --program-su | --program-s)
294 ac_prev=program_suffix ;;
295 -program-suffix=* | --program-suffix=* | --program-suffi=* \
296 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
72a7ab82 297 program_suffix="$ac_optarg" ;;
671aa708
NN
298
299 -program-transform-name | --program-transform-name \
300 | --program-transform-nam | --program-transform-na \
301 | --program-transform-n | --program-transform- \
302 | --program-transform | --program-transfor \
303 | --program-transfo | --program-transf \
304 | --program-trans | --program-tran \
305 | --progr-tra | --program-tr | --program-t)
306 ac_prev=program_transform_name ;;
307 -program-transform-name=* | --program-transform-name=* \
308 | --program-transform-nam=* | --program-transform-na=* \
309 | --program-transform-n=* | --program-transform-=* \
310 | --program-transform=* | --program-transfor=* \
311 | --program-transfo=* | --program-transf=* \
312 | --program-trans=* | --program-tran=* \
313 | --progr-tra=* | --program-tr=* | --program-t=*)
72a7ab82 314 program_transform_name="$ac_optarg" ;;
671aa708
NN
315
316 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
317 | -silent | --silent | --silen | --sile | --sil)
318 silent=yes ;;
319
320 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
321 ac_prev=sbindir ;;
322 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
323 | --sbi=* | --sb=*)
72a7ab82 324 sbindir="$ac_optarg" ;;
671aa708
NN
325
326 -sharedstatedir | --sharedstatedir | --sharedstatedi \
327 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
328 | --sharedst | --shareds | --shared | --share | --shar \
329 | --sha | --sh)
330 ac_prev=sharedstatedir ;;
331 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
332 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
333 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
334 | --sha=* | --sh=*)
72a7ab82 335 sharedstatedir="$ac_optarg" ;;
671aa708
NN
336
337 -site | --site | --sit)
338 ac_prev=site ;;
339 -site=* | --site=* | --sit=*)
72a7ab82 340 site="$ac_optarg" ;;
671aa708
NN
341
342 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
343 ac_prev=srcdir ;;
344 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
72a7ab82 345 srcdir="$ac_optarg" ;;
671aa708
NN
346
347 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
348 | --syscon | --sysco | --sysc | --sys | --sy)
349 ac_prev=sysconfdir ;;
350 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
351 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
72a7ab82 352 sysconfdir="$ac_optarg" ;;
671aa708
NN
353
354 -target | --target | --targe | --targ | --tar | --ta | --t)
72a7ab82 355 ac_prev=target ;;
671aa708 356 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
72a7ab82 357 target="$ac_optarg" ;;
671aa708
NN
358
359 -v | -verbose | --verbose | --verbos | --verbo | --verb)
360 verbose=yes ;;
361
72a7ab82
AP
362 -version | --version | --versio | --versi | --vers)
363 echo "configure generated by autoconf version 2.13"
364 exit 0 ;;
671aa708
NN
365
366 -with-* | --with-*)
72a7ab82 367 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
671aa708 368 # Reject names that are not valid shell variable names.
72a7ab82
AP
369 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
370 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371 fi
671aa708 372 ac_package=`echo $ac_package| sed 's/-/_/g'`
72a7ab82
AP
373 case "$ac_option" in
374 *=*) ;;
671aa708
NN
375 *) ac_optarg=yes ;;
376 esac
72a7ab82 377 eval "with_${ac_package}='$ac_optarg'" ;;
671aa708
NN
378
379 -without-* | --without-*)
72a7ab82 380 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
671aa708 381 # Reject names that are not valid shell variable names.
72a7ab82
AP
382 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
383 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
384 fi
385 ac_package=`echo $ac_package| sed 's/-/_/g'`
386 eval "with_${ac_package}=no" ;;
671aa708
NN
387
388 --x)
389 # Obsolete; use --with-x.
390 with_x=yes ;;
391
392 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
393 | --x-incl | --x-inc | --x-in | --x-i)
394 ac_prev=x_includes ;;
395 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
396 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
72a7ab82 397 x_includes="$ac_optarg" ;;
671aa708
NN
398
399 -x-libraries | --x-libraries | --x-librarie | --x-librari \
400 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
401 ac_prev=x_libraries ;;
402 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
403 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
72a7ab82 404 x_libraries="$ac_optarg" ;;
671aa708 405
72a7ab82 406 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
671aa708
NN
407 ;;
408
409 *)
72a7ab82
AP
410 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
411 echo "configure: warning: $ac_option: invalid host type" 1>&2
412 fi
413 if test "x$nonopt" != xNONE; then
414 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
415 fi
416 nonopt="$ac_option"
671aa708
NN
417 ;;
418
419 esac
420done
421
422if test -n "$ac_prev"; then
72a7ab82 423 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
671aa708 424fi
671aa708 425
72a7ab82
AP
426trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
427
428# File descriptor usage:
429# 0 standard input
430# 1 file creation
431# 2 errors and warnings
432# 3 some systems may open it to /dev/tty
433# 4 used on the Kubota Titan
434# 6 checking for... messages and results
435# 5 compiler messages saved in config.log
436if test "$silent" = yes; then
437 exec 6>/dev/null
438else
439 exec 6>&1
440fi
441exec 5>./config.log
442
443echo "\
444This file contains any messages produced by compilers while
445running configure, to aid debugging if configure makes a mistake.
446" 1>&5
671aa708 447
72a7ab82
AP
448# Strip out --no-create and --no-recursion so they do not pile up.
449# Also quote any args containing shell metacharacters.
450ac_configure_args=
451for ac_arg
671aa708 452do
72a7ab82
AP
453 case "$ac_arg" in
454 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
455 | --no-cr | --no-c) ;;
456 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
457 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
458 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
459 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
460 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
671aa708
NN
461 esac
462done
463
72a7ab82
AP
464# NLS nuisances.
465# Only set these to C if already set. These must not be set unconditionally
466# because not all systems understand e.g. LANG=C (notably SCO).
467# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
468# Non-C LC_CTYPE values break the ctype check.
469if test "${LANG+set}" = set; then LANG=C; export LANG; fi
470if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
471if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
472if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
6b65a26d 473
72a7ab82
AP
474# confdefs.h avoids OS command line length limits that DEFS can exceed.
475rm -rf conftest* confdefs.h
476# AIX cpp loses on an empty file, so make sure it contains at least a newline.
477echo > confdefs.h
671aa708 478
72a7ab82
AP
479# A filename unique to this package, relative to the directory that
480# configure is in, which we can look for to find out if srcdir is correct.
481ac_unique_file=move-if-change
671aa708
NN
482
483# Find the source files, if location was not specified.
484if test -z "$srcdir"; then
485 ac_srcdir_defaulted=yes
486 # Try the directory containing this script, then its parent.
72a7ab82
AP
487 ac_prog=$0
488 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
489 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
671aa708
NN
490 srcdir=$ac_confdir
491 if test ! -r $srcdir/$ac_unique_file; then
492 srcdir=..
493 fi
494else
495 ac_srcdir_defaulted=no
496fi
497if test ! -r $srcdir/$ac_unique_file; then
498 if test "$ac_srcdir_defaulted" = yes; then
72a7ab82 499 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
671aa708 500 else
72a7ab82 501 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
671aa708
NN
502 fi
503fi
72a7ab82 504srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
671aa708
NN
505
506# Prefer explicitly selected file to automatically selected ones.
bba5e0ca
EB
507if test -z "$CONFIG_SITE"; then
508 if test "x$prefix" != xNONE; then
509 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
510 else
511 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
671aa708
NN
512 fi
513fi
514for ac_site_file in $CONFIG_SITE; do
515 if test -r "$ac_site_file"; then
72a7ab82 516 echo "loading site script $ac_site_file"
671aa708
NN
517 . "$ac_site_file"
518 fi
519done
520
521if test -r "$cache_file"; then
72a7ab82
AP
522 echo "loading cache $cache_file"
523 . $cache_file
671aa708 524else
72a7ab82
AP
525 echo "creating cache $cache_file"
526 > $cache_file
671aa708
NN
527fi
528
529ac_ext=c
72a7ab82 530# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
671aa708 531ac_cpp='$CPP $CPPFLAGS'
72a7ab82
AP
532ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
533ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
534cross_compiling=$ac_cv_prog_cc_cross
535
536ac_exeext=
537ac_objext=o
538if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
539 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
540 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
541 ac_n= ac_c='
542' ac_t=' '
543 else
544 ac_n=-n ac_c= ac_t=
545 fi
546else
547 ac_n= ac_c='\c' ac_t=
548fi
671aa708
NN
549
550
d02c69be 551
671aa708 552ac_aux_dir=
4c4a5bbc 553for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
671aa708
NN
554 if test -f $ac_dir/install-sh; then
555 ac_aux_dir=$ac_dir
556 ac_install_sh="$ac_aux_dir/install-sh -c"
557 break
558 elif test -f $ac_dir/install.sh; then
559 ac_aux_dir=$ac_dir
560 ac_install_sh="$ac_aux_dir/install.sh -c"
561 break
562 fi
563done
564if test -z "$ac_aux_dir"; then
72a7ab82 565 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
671aa708 566fi
72a7ab82
AP
567ac_config_guess=$ac_aux_dir/config.guess
568ac_config_sub=$ac_aux_dir/config.sub
569ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
671aa708
NN
570
571
72a7ab82
AP
572# Do some error checking and defaulting for the host and target type.
573# The inputs are:
574# configure --host=HOST --target=TARGET --build=BUILD NONOPT
575#
576# The rules are:
577# 1. You are not allowed to specify --host, --target, and nonopt at the
578# same time.
579# 2. Host defaults to nonopt.
580# 3. If nonopt is not specified, then host defaults to the current host,
581# as determined by config.guess.
582# 4. Target and build default to nonopt.
583# 5. If nonopt is not specified, then target and build default to host.
671aa708
NN
584
585# The aliases save the names the user supplied, while $host etc.
586# will get canonicalized.
72a7ab82
AP
587case $host---$target---$nonopt in
588NONE---*---* | *---NONE---* | *---*---NONE) ;;
589*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
590esac
591
592
593# Make sure we can run config.sub.
594if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
595else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
596fi
597
598echo $ac_n "checking host system type""... $ac_c" 1>&6
599echo "configure:600: checking host system type" >&5
600
601host_alias=$host
602case "$host_alias" in
603NONE)
604 case $nonopt in
605 NONE)
606 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
607 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
608 fi ;;
609 *) host_alias=$nonopt ;;
610 esac ;;
611esac
612
613host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
614host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
615host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
616host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
617echo "$ac_t""$host" 1>&6
618
619echo $ac_n "checking target system type""... $ac_c" 1>&6
620echo "configure:621: checking target system type" >&5
621
622target_alias=$target
623case "$target_alias" in
624NONE)
625 case $nonopt in
626 NONE) target_alias=$host_alias ;;
627 *) target_alias=$nonopt ;;
628 esac ;;
629esac
630
631target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
632target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
633target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
634target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
635echo "$ac_t""$target" 1>&6
636
637echo $ac_n "checking build system type""... $ac_c" 1>&6
638echo "configure:639: checking build system type" >&5
639
640build_alias=$build
641case "$build_alias" in
642NONE)
643 case $nonopt in
644 NONE) build_alias=$host_alias ;;
645 *) build_alias=$nonopt ;;
646 esac ;;
647esac
648
649build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
650build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
651build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
652build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
653echo "$ac_t""$build" 1>&6
654
655test "$host_alias" != "$target_alias" &&
671aa708
NN
656 test "$program_prefix$program_suffix$program_transform_name" = \
657 NONENONEs,x,x, &&
658 program_prefix=${target_alias}-
72a7ab82
AP
659
660if test "$program_transform_name" = s,x,x,; then
661 program_transform_name=
662else
663 # Double any \ or $. echo might interpret backslashes.
664 cat <<\EOF_SED > conftestsed
665s,\\,\\\\,g; s,\$,$$,g
666EOF_SED
667 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
668 rm -f conftestsed
669fi
671aa708 670test "$program_prefix" != NONE &&
72a7ab82 671 program_transform_name="s,^,${program_prefix},; $program_transform_name"
671aa708
NN
672# Use a double $ so make ignores it.
673test "$program_suffix" != NONE &&
72a7ab82
AP
674 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
675
676# sed with no file args requires a program.
677test "$program_transform_name" = "" && program_transform_name="s,x,x,"
671aa708
NN
678
679
775956d0
NN
680# Get 'install' or 'install-sh' and its variants.
681# Find a good install program. We prefer a C program (faster),
682# so one script is as good as another. But avoid the broken or
683# incompatible versions:
684# SysV /etc/install, /usr/sbin/install
685# SunOS /usr/etc/install
686# IRIX /sbin/install
687# AIX /bin/install
688# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
689# AFS /usr/afsws/bin/install, which mishandles nonexistent args
690# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
691# ./install, which can be erroneously created by make from ./install.sh.
72a7ab82
AP
692echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
693echo "configure:694: checking for a BSD compatible install" >&5
775956d0 694if test -z "$INSTALL"; then
72a7ab82
AP
695if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
696 echo $ac_n "(cached) $ac_c" 1>&6
697else
698 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
699 for ac_dir in $PATH; do
700 # Account for people who put trailing slashes in PATH elements.
701 case "$ac_dir/" in
702 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
703 *)
704 # OSF1 and SCO ODT 3.0 have their own names for install.
705 # Don't use installbsd from OSF since it installs stuff as root
706 # by default.
707 for ac_prog in ginstall scoinst install; do
708 if test -f $ac_dir/$ac_prog; then
775956d0 709 if test $ac_prog = install &&
72a7ab82 710 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
775956d0
NN
711 # AIX install. It has an incompatible calling convention.
712 :
713 else
72a7ab82
AP
714 ac_cv_path_install="$ac_dir/$ac_prog -c"
715 break 2
775956d0
NN
716 fi
717 fi
718 done
72a7ab82
AP
719 ;;
720 esac
721 done
722 IFS="$ac_save_IFS"
775956d0
NN
723
724fi
725 if test "${ac_cv_path_install+set}" = set; then
72a7ab82 726 INSTALL="$ac_cv_path_install"
775956d0
NN
727 else
728 # As a last resort, use the slow shell script. We don't cache a
729 # path for INSTALL within a source directory, because that will
730 # break other packages using the cache if that directory is
731 # removed, or if the path is relative.
72a7ab82 732 INSTALL="$ac_install_sh"
775956d0
NN
733 fi
734fi
72a7ab82 735echo "$ac_t""$INSTALL" 1>&6
775956d0
NN
736
737# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
738# It thinks the first close brace ends the variable substitution.
739test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
740
72a7ab82 741test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
775956d0
NN
742
743test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
744
72a7ab82
AP
745echo $ac_n "checking whether ln works""... $ac_c" 1>&6
746echo "configure:747: checking whether ln works" >&5
747if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
748 echo $ac_n "(cached) $ac_c" 1>&6
ad6717df
PB
749else
750 rm -f conftestdata_t
751echo >conftestdata_f
752if ln conftestdata_f conftestdata_t 2>/dev/null
753then
754 acx_cv_prog_LN=ln
755else
756 acx_cv_prog_LN=no
757fi
758rm -f conftestdata_f conftestdata_t
759
760fi
761if test $acx_cv_prog_LN = no; then
762 LN="cp"
72a7ab82 763 echo "$ac_t""no, using $LN" 1>&6
ad6717df
PB
764else
765 LN="$acx_cv_prog_LN"
72a7ab82 766 echo "$ac_t""yes" 1>&6
ad6717df
PB
767fi
768
72a7ab82
AP
769echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
770echo "configure:771: checking whether ln -s works" >&5
771if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
772 echo $ac_n "(cached) $ac_c" 1>&6
773else
774 rm -f conftestdata
775if ln -s X conftestdata 2>/dev/null
776then
777 rm -f conftestdata
778 ac_cv_prog_LN_S="ln -s"
779else
780 ac_cv_prog_LN_S=ln
781fi
782fi
783LN_S="$ac_cv_prog_LN_S"
784if test "$ac_cv_prog_LN_S" = "ln -s"; then
785 echo "$ac_t""yes" 1>&6
148907ea 786else
72a7ab82 787 echo "$ac_t""no" 1>&6
148907ea
PB
788fi
789
775956d0 790
79c06341 791### we might need to use some other shell than /bin/sh for running subshells
79c06341
JL
792### If we are on Windows, search for the shell. This will permit people
793### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
794### without also having to set CONFIG_SHELL. This code will work when
795### using bash, which sets OSTYPE.
796case "${OSTYPE}" in
797*win32*)
671aa708
NN
798 if test x${CONFIG_SHELL} = x ; then
799 if test ! -f /bin/sh ; then
800 if test x${SHELL} != x && test -f ${SHELL} ; then
79c06341
JL
801 CONFIG_SHELL=${SHELL}
802 export CONFIG_SHELL
803 else
804 for prog in sh sh.exe bash bash.exe; do
805 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
806 for dir in $PATH; do
807 test -z "$dir" && dir=.
808 if test -f $dir/$prog; then
809 CONFIG_SHELL=$dir/$prog
810 export CONFIG_SHELL
811 break
812 fi
813 done
814 IFS="$save_ifs"
815 test -n "${CONFIG_SHELL}" && break
816 done
817 fi
818 fi
819 fi
820 ;;
821esac
822
823config_shell=${CONFIG_SHELL-/bin/sh}
824
79c06341
JL
825progname=$0
826# if PWD already has a value, it is probably wrong.
671aa708 827if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
79c06341 828
b348267b 829# Export original configure arguments for use by sub-configures. These
eeae7b41
DJ
830# will be expanded by make, so quote '$'.
831tmp="$progname $@"
832sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
833$tmp
b348267b 834EOF_SED
eeae7b41
DJ
835TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
836rm -f conftestsed.out
3dfabf63 837
cc1e60ea 838
671aa708 839moveifchange=${srcdir}/move-if-change
79c06341 840
ee6a22df
L
841srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
842
843# We pass INSTALL explicitly to sub-makes. Make sure that it is not
844# a relative path.
845if test "$INSTALL" = "${srcdir}/install-sh -c"; then
846 INSTALL="${srcpwd}/install-sh -c"
847fi
848
671aa708
NN
849# Set srcdir to "." if that's what it is.
850# This is important for multilib support.
851pwd=`${PWDCMD-pwd}`
671aa708
NN
852if test "${pwd}" = "${srcpwd}" ; then
853 srcdir=.
79c06341
JL
854fi
855
671aa708 856topsrcdir=$srcpwd
5d4a5ee6 857
671aa708 858extra_host_args=
afabd8e6 859
671aa708
NN
860### To add a new directory to the tree, first choose whether it is a target
861### or a host dependent tool. Then put it into the appropriate list
862### (library or tools, host or target), doing a dependency sort.
79c06341 863
72a7ab82 864# Subdirs will be configured in the order listed in build_configdirs,
671aa708 865# configdirs, or target_configdirs; see the serialization section below.
79c06341 866
72a7ab82
AP
867# Dependency sorting is only needed when *configuration* must be done in
868# a particular order. In all cases a dependency should be specified in
671aa708 869# the Makefile, whether or not it's implicitly specified here.
79c06341 870
671aa708
NN
871# Double entries in build_configdirs, configdirs, or target_configdirs may
872# cause circular dependencies and break everything horribly.
79c06341 873
23f6b2f9
PB
874# these library is used by various programs built for the build
875# environment
876#
877build_libs="build-libiberty"
878
879# these tools are built for the build environment
71b5d516 880build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fixincludes"
23f6b2f9 881
671aa708
NN
882# these libraries are used by various programs built for the host environment
883#
a4b6c45a 884host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
671aa708 885
671aa708
NN
886# these tools are built for the host environment
887# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
888# know that we are building the simulator.
889# binutils, gas and ld appear in that order because it makes sense to run
890# "make check" in that particular order.
5395b47b 891host_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 gnattools"
671aa708
NN
892
893# libgcj represents the runtime libraries only used by gcj.
894libgcj="target-libffi \
895 target-boehm-gc \
896 target-zlib \
897 target-qthreads \
898 target-libjava"
899
900# these libraries are built for the target environment, and are built after
901# the host libraries and the host tools (which may be a cross compiler)
902#
4dbda6f0 903target_libraries="target-libiberty \
671aa708
NN
904 target-libgloss \
905 target-newlib \
cb543528 906 target-libstdc++-v3 \
6de9cd9a 907 target-libmudflap \
77008252 908 target-libssp \
6de9cd9a 909 target-libgfortran \
77d187bc 910 ${libgcj} \
d9cdb878
AC
911 target-libobjc \
912 target-libada"
671aa708 913
4dbda6f0
NN
914# these tools are built using the target libraries, and are intended to
915# run only in the target environment
671aa708 916#
4dbda6f0 917# note: any program that *uses* libraries that are in the "target_libraries"
671aa708
NN
918# list belongs in this list. those programs are also very likely
919# candidates for the "native_only" list which follows
920#
97286f7f 921target_tools="target-examples target-groff target-gperf target-rda"
79c06341 922
671aa708 923################################################################################
79c06341 924
671aa708
NN
925## All tools belong in one of the four categories, and are assigned above
926## We assign ${configdirs} this way to remove all embedded newlines. This
927## is important because configure will choke if they ever get through.
928## ${configdirs} is directories we build using the host tools.
929## ${target_configdirs} is directories we build using the target tools.
671aa708 930configdirs=`echo ${host_libs} ${host_tools}`
4dbda6f0 931target_configdirs=`echo ${target_libraries} ${target_tools}`
71b5d516 932build_configdirs=`echo ${build_libs} ${build_tools}`
8b87bb96 933
671aa708 934################################################################################
79c06341 935
671aa708 936srcname="gnu development package"
79c06341 937
671aa708
NN
938# This gets set non-empty for some net releases of packages.
939appdirs=""
79c06341 940
671aa708
NN
941# Define is_cross_compiler to save on calls to 'test'.
942is_cross_compiler=
943if test x"${host}" = x"${target}" ; then
944 is_cross_compiler=no
79c06341 945else
671aa708 946 is_cross_compiler=yes
72a7ab82 947fi
79c06341 948
b4acb5ef 949# Find the build and target subdir names.
8b87bb96
NN
950 case ${build_alias} in
951 "") build_noncanonical=${build} ;;
952 *) build_noncanonical=${build_alias} ;;
953esac
954
955 case ${host_alias} in
956 "") host_noncanonical=${build_noncanonical} ;;
957 *) host_noncanonical=${host_alias} ;;
958esac
959
960 case ${target_alias} in
961 "") target_noncanonical=${host_noncanonical} ;;
962 *) target_noncanonical=${target_alias} ;;
963esac
964
965 # Prefix 'build-' so this never conflicts with target_subdir.
966build_subdir="build-${build_noncanonical}"
215c351a
PB
967# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
968if ( test $srcdir = . && test -d gcc ) \
969 || test -d $srcdir/../host-${host_noncanonical}; then
970 host_subdir="host-${host_noncanonical}"
971else
972 host_subdir=.
973fi
8b87bb96
NN
974# No prefix.
975target_subdir=${target_noncanonical}
72a7ab82 976
79c06341 977
671aa708
NN
978# Skipdirs are removed silently.
979skipdirs=
980# Noconfigdirs are removed loudly.
981noconfigdirs=""
79c06341 982
671aa708
NN
983use_gnu_ld=
984# Make sure we don't let GNU ld be added if we didn't want it.
985if test x$with_gnu_ld = xno ; then
986 use_gnu_ld=no
987 noconfigdirs="$noconfigdirs ld"
79c06341
JL
988fi
989
671aa708
NN
990use_gnu_as=
991# Make sure we don't let GNU as be added if we didn't want it.
992if test x$with_gnu_as = xno ; then
993 use_gnu_as=no
994 noconfigdirs="$noconfigdirs gas"
79c06341
JL
995fi
996
72a7ab82 997# some tools are so dependent upon X11 that if we're not building with X,
671aa708 998# it's not even worth trying to configure, much less build, that tool.
79c06341 999
671aa708
NN
1000case ${with_x} in
1001 yes | "") ;; # the default value for this tree is that X11 is available
1002 no)
b4f96efe 1003 skipdirs="${skipdirs} tk itcl libgui"
671aa708 1004 # We won't be able to build gdbtk without X.
72a7ab82 1005 enable_gdbtk=no
671aa708
NN
1006 ;;
1007 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
1008esac
79c06341 1009
671aa708 1010# Some tools are only suitable for building in a "native" situation.
72a7ab82 1011# Remove these if host!=target.
61b56b2e 1012native_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"
79c06341 1013
671aa708
NN
1014# Similarly, some are only suitable for cross toolchains.
1015# Remove these if host=target.
1016cross_only="target-libgloss target-newlib target-opcodes"
1017
1018case $is_cross_compiler in
1019 no) skipdirs="${skipdirs} ${cross_only}" ;;
1020 yes) skipdirs="${skipdirs} ${native_only}" ;;
1021esac
79c06341 1022
671aa708
NN
1023# If both --with-headers and --with-libs are specified, default to
1024# --without-newlib.
ee6a22df
L
1025if test x"${with_headers}" != x && test x"${with_headers}" != xno \
1026 && test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
671aa708
NN
1027 if test x"${with_newlib}" = x ; then
1028 with_newlib=no
1029 fi
79c06341
JL
1030fi
1031
671aa708
NN
1032# Recognize --with-newlib/--without-newlib.
1033case ${with_newlib} in
1034 no) skipdirs="${skipdirs} target-newlib" ;;
1035 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
1036esac
79c06341 1037
671aa708 1038# Configure extra directories which are host specific
79c06341 1039
671aa708
NN
1040case "${host}" in
1041 *-cygwin*)
1042 configdirs="$configdirs libtermcap" ;;
1043esac
79c06341 1044
4fab7234
HPN
1045# A target can indicate whether a language isn't supported for some reason.
1046# Only spaces may be used in this macro; not newlines or tabs.
1047unsupported_languages=
1048
72a7ab82 1049# Remove more programs from consideration, based on the host or
671aa708
NN
1050# target this usually means that a port of the program doesn't
1051# exist yet.
ec8d6ddc 1052
671aa708
NN
1053case "${host}" in
1054 hppa*64*-*-*)
1055 noconfigdirs="$noconfigdirs byacc"
1056 ;;
f2a0e225 1057 i[3456789]86-*-vsta)
b4f96efe 1058 noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl gnuserv gettext"
671aa708 1059 ;;
f2a0e225 1060 i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
b4f96efe 1061 noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
3aa83176 1062 ;;
f2a0e225 1063 i[3456789]86-*-mingw32*)
b4f96efe 1064 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
a22c2d8d 1065 noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
3aa83176 1066 ;;
f2a0e225 1067 i[3456789]86-*-beos*)
b4f96efe 1068 noconfigdirs="$noconfigdirs tk itcl libgui gdb"
3aa83176 1069 ;;
671aa708 1070 *-*-cygwin*)
a22c2d8d 1071 noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
671aa708
NN
1072 ;;
1073 *-*-netbsd*)
a22c2d8d 1074 noconfigdirs="$noconfigdirs rcs"
671aa708
NN
1075 ;;
1076 ppc*-*-pe)
b4f96efe 1077 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
671aa708
NN
1078 ;;
1079 powerpc-*-beos*)
b4f96efe 1080 noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
671aa708 1081 ;;
671aa708 1082esac
ec8d6ddc 1083
6de9cd9a 1084
d9cdb878
AC
1085# Check whether --enable-libada or --disable-libada was given.
1086if test "${enable_libada+set}" = set; then
1087 enableval="$enable_libada"
1088 ENABLE_LIBADA=$enableval
1089else
1090 ENABLE_LIBADA=yes
72a7ab82
AP
1091fi
1092
d9cdb878
AC
1093if test "${ENABLE_LIBADA}" != "yes" ; then
1094 noconfigdirs="$noconfigdirs target-libada"
5395b47b 1095 noconfigdirs="$noconfigdirs gnattools"
d9cdb878
AC
1096fi
1097
ef0087a7
KH
1098# Check whether --enable-libssp or --disable-libssp was given.
1099if test "${enable_libssp+set}" = set; then
1100 enableval="$enable_libssp"
1101 ENABLE_LIBSSP=$enableval
1102else
1103 ENABLE_LIBSSP=yes
72a7ab82
AP
1104fi
1105
ef0087a7
KH
1106if test "${ENABLE_LIBSSP}" != "yes" ; then
1107 noconfigdirs="$noconfigdirs target-libssp"
1108fi
1109
671aa708
NN
1110# Save it here so that, even in case of --enable-libgcj, if the Java
1111# front-end isn't enabled, we still get libgcj disabled.
1112libgcj_saved=$libgcj
1113case $enable_libgcj in
1114yes)
1115 # If we reset it here, it won't get added to noconfigdirs in the
1116 # target-specific build rules, so it will be forcibly enabled
1117 # (unless the Java language itself isn't enabled).
1118 libgcj=
1119 ;;
1120no)
1121 # Make sure we get it printed in the list of not supported target libs.
1122 noconfigdirs="$noconfigdirs ${libgcj}"
1123 ;;
1124esac
ec8d6ddc 1125
6de9cd9a
DN
1126
1127# Allow --disable-libmudflap to exclude target-libmudflap
1128case $enable_libmudflap in
dfcada9a 1129yes)
6de9cd9a
DN
1130 ;;
1131no)
1132 noconfigdirs="$noconfigdirs target-libmudflap"
1133 ;;
dfcada9a
MM
1134"")
1135 case "${target}" in
98a5bb3b
RM
1136 *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
1137 # Enable libmudflap by default in GNU and friends.
dfcada9a 1138 ;;
a3e8d8b4
LR
1139 *-*-freebsd*)
1140 # Enable libmudflap by default in FreeBSD.
1141 ;;
dfcada9a
MM
1142 *)
1143 # Disable it by default everywhere else.
1144 noconfigdirs="$noconfigdirs target-libmudflap"
1145 ;;
1146 esac
6de9cd9a
DN
1147esac
1148
1149
671aa708
NN
1150case "${target}" in
1151 *-*-chorusos)
1152 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1153 ;;
940cde4d 1154 powerpc-*-darwin*)
c8e5d1af 1155 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
9c8f9ec2 1156 noconfigdirs="$noconfigdirs sim target-rda"
c8e5d1af 1157 ;;
940cde4d 1158 *-*-darwin*)
39d16468 1159 noconfigdirs="$noconfigdirs ld gas gdb gprof"
9c8f9ec2 1160 noconfigdirs="$noconfigdirs sim target-rda"
0a1c093b 1161 noconfigdirs="$noconfigdirs ${libgcj}"
940cde4d 1162 ;;
671aa708
NN
1163 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
1164 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1165 ;;
c3f84f61 1166 *-*-freebsd*)
6de9cd9a
DN
1167 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1168 if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
1169 && test -f /usr/local/include/gmp.h; then
1170 with_gmp=/usr/local
1171 fi
1172
1173 # Skip some stuff that's unsupported on some FreeBSD configurations.
1174 case "${target}" in
1175 i*86-*-*) ;;
1176 alpha*-*-*) ;;
1177 *)
1178 noconfigdirs="$noconfigdirs ${libgcj}"
1179 ;;
1180 esac
1181 ;;
ef4e7569
US
1182 *-*-kaos*)
1183 # Remove unsupported stuff on all kaOS configurations.
b4117c30 1184 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
ef4e7569
US
1185 skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
1186 skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
1187 noconfigdirs="$noconfigdirs target-libgloss"
1188 ;;
671aa708
NN
1189 *-*-netbsd*)
1190 # Skip some stuff on all NetBSD configurations.
1191 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
1192
1193 # Skip some stuff that's unsupported on some NetBSD configurations.
1194 case "${target}" in
1195 i*86-*-netbsdelf*) ;;
0590b963 1196 arm*-*-netbsdelf*) ;;
671aa708
NN
1197 *)
1198 noconfigdirs="$noconfigdirs ${libgcj}"
1199 ;;
1200 esac
1201 ;;
61fec9ff
JB
1202 *-*-netware*)
1203 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss ${libgcj} target-libmudflap"
671aa708
NN
1204 ;;
1205 *-*-rtems*)
1206 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1207 ;;
a8ba31f2
EC
1208 # The tpf target doesn't support gdb yet.
1209 *-*-tpf*)
1210 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj} target-libmudflap gdb tcl tk libgui itcl"
1211 ;;
5785c0ed
BI
1212 *-*-uclinux*)
1213 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
1214 ;;
671aa708 1215 *-*-vxworks*)
d8852c4f 1216 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708 1217 ;;
fd7ea4ab
JB
1218 m32c-*-*)
1219 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1220 ;;
671aa708
NN
1221 alpha*-dec-osf*)
1222 # ld works, but does not support shared libraries.
1223 # newlib is not 64 bit ready. I'm not sure about fileutils.
1224 # gas doesn't generate exception information.
1225 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
1226 ;;
1227 alpha*-*-*vms*)
556f03c4 1228 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
671aa708
NN
1229 ;;
1230 alpha*-*-linux*)
1231 # newlib is not 64 bit ready
1232 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1233 ;;
671aa708
NN
1234 alpha*-*-*)
1235 # newlib is not 64 bit ready
1236 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1237 ;;
33952f6f
AO
1238 am33_2.0-*-linux*)
1239 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1240 ;;
671aa708
NN
1241 sh-*-linux*)
1242 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
72a7ab82 1243 ;;
671aa708
NN
1244 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1245 noconfigdirs="$noconfigdirs ${libgcj}"
1246 noconfigdirs="$noconfigdirs target-examples"
1247 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
b4f96efe 1248 noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
671aa708
NN
1249 noconfigdirs="$noconfigdirs expect dejagnu"
1250 # the C++ libraries don't build on top of CE's C libraries
cb543528 1251 noconfigdirs="$noconfigdirs target-libstdc++-v3"
671aa708
NN
1252 noconfigdirs="$noconfigdirs target-newlib"
1253 case "${host}" in
1254 *-*-cygwin*) ;; # keep gdb and readline
aa9c3ab4 1255 *) noconfigdirs="$noconfigdirs gdb readline"
671aa708
NN
1256 ;;
1257 esac
1258 ;;
1259 arc-*-*)
1260 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1261 ;;
ee6a22df 1262 arm-semi-aof )
ee6a22df 1263 ;;
671aa708
NN
1264 arm-*-coff | strongarm-*-coff | xscale-*-coff)
1265 noconfigdirs="$noconfigdirs ${libgcj}"
1266 ;;
b3f8d95d 1267 arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
671aa708
NN
1268 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1269 ;;
077fc835
KH
1270 arm*-*-linux-gnueabi)
1271 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1272 noconfigdirs="$noconfigdirs target-libjava target-libobjc"
1273 ;;
972974fc
MM
1274 arm*-*-symbianelf*)
1275 noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
1276 ;;
671aa708
NN
1277 arm-*-pe*)
1278 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1279 ;;
671aa708
NN
1280 thumb-*-coff)
1281 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1282 ;;
1283 thumb-*-elf)
1284 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1285 ;;
671aa708
NN
1286 thumb-*-pe)
1287 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1288 ;;
1289 arm-*-riscix*)
1290 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1291 ;;
1292 avr-*-*)
556f03c4 1293 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708 1294 ;;
6b65a26d
CM
1295 bfin-*-*)
1296 noconfigdirs="$noconfigdirs target-libgloss gdb"
61efc800 1297 if test x${is_cross_compiler} != xno ; then
6b65a26d
CM
1298 target_configdirs="${target_configdirs} target-bsp target-cygmon"
1299 fi
1300 ;;
671aa708 1301 c4x-*-* | tic4x-*-*)
cb543528 1302 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1303 ;;
1304 c54x*-*-* | tic54x-*-*)
cb543528 1305 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
671aa708 1306 ;;
40d64b5a 1307 cris-*-* | crisv32-*-*)
4fab7234 1308 unsupported_languages="$unsupported_languages java"
40d64b5a 1309 case "${target}" in
c2e0d3a9 1310 *-*-aout)
7f26dfa3 1311 unsupported_languages="$unsupported_languages fortran"
4fab7234 1312 noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
c2e0d3a9 1313 *-*-elf)
7f26dfa3 1314 unsupported_languages="$unsupported_languages fortran"
789ec619 1315 noconfigdirs="$noconfigdirs target-boehm-gc";;
c2e0d3a9 1316 *-*-linux*)
789ec619 1317 noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
40d64b5a 1318 *)
7f26dfa3 1319 unsupported_languages="$unsupported_languages fortran"
40d64b5a
HPN
1320 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
1321 esac
671aa708 1322 ;;
25b656e7 1323 crx-*-*)
ee6a22df 1324 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
25b656e7 1325 ;;
671aa708 1326 d10v-*-*)
cb543528 1327 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1328 ;;
1329 d30v-*-*)
fb87ad5d 1330 noconfigdirs="$noconfigdirs ${libgcj} gdb"
671aa708
NN
1331 ;;
1332 fr30-*-elf*)
fb87ad5d 1333 noconfigdirs="$noconfigdirs ${libgcj} gdb"
671aa708
NN
1334 ;;
1335 frv-*-*)
1336 noconfigdirs="$noconfigdirs ${libgcj}"
1337 ;;
1338 h8300*-*-*)
b4117c30 1339 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1340 ;;
1341 h8500-*-*)
b4117c30 1342 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708 1343 ;;
ee6a22df 1344 hppa1.1-*-osf* | hppa1.1-*-bsd* )
ee6a22df 1345 ;;
671aa708
NN
1346 hppa*64*-*-linux* | parisc*64*-*-linux*)
1347 # In this case, it's because the hppa64-linux target is for
1348 # the kernel only at this point and has no libc, and thus no
1349 # headers, crt*.o, etc., all of which are needed by these.
1350 noconfigdirs="$noconfigdirs target-zlib"
1351 ;;
3e732ba0
JDA
1352 parisc*-*-linux* | hppa*-*-linux*)
1353 ;;
671aa708 1354 hppa*-*-*elf* | \
671aa708
NN
1355 hppa*-*-lites* | \
1356 hppa*-*-openbsd* | \
1357 hppa*64*-*-*)
1358 noconfigdirs="$noconfigdirs ${libgcj}"
671aa708
NN
1359 ;;
1360 hppa*-*-*)
1361 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
1362 # build on HP-UX 10.20.
1363 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
1364 ;;
fb87ad5d
HPN
1365 i960-*-*)
1366 noconfigdirs="$noconfigdirs ${libgcj} gdb"
1367 ;;
671aa708
NN
1368 ia64*-*-elf*)
1369 # No gdb support yet.
b4f96efe 1370 noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
671aa708
NN
1371 ;;
1372 ia64*-**-hpux*)
1373 # No gdb or ld support yet.
b4f96efe 1374 noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
671aa708 1375 ;;
ee6a22df 1376 i370-*-opened*)
ee6a22df 1377 ;;
f2a0e225 1378 i[3456789]86-*-coff | i[3456789]86-*-elf)
671aa708
NN
1379 noconfigdirs="$noconfigdirs ${libgcj}"
1380 ;;
f2a0e225 1381 i[3456789]86-*-linux*)
671aa708
NN
1382 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1383 # not build java stuff by default.
1384 case "${target}" in
1385 *-*-*libc1*)
1386 noconfigdirs="$noconfigdirs ${libgcj}";;
1387 esac
1388
1389 # This section makes it possible to build newlib natively on linux.
1390 # If we are using a cross compiler then don't configure newlib.
1391 if test x${is_cross_compiler} != xno ; then
3aa83176 1392 noconfigdirs="$noconfigdirs target-newlib"
671aa708
NN
1393 fi
1394 noconfigdirs="$noconfigdirs target-libgloss"
1395 # If we are not using a cross compiler, do configure newlib.
1396 # Note however, that newlib will only be configured in this situation
1397 # if the --with-newlib option has been given, because otherwise
1398 # 'target-newlib' will appear in skipdirs.
1399 ;;
f2a0e225 1400 i[3456789]86-*-mingw32*)
671aa708 1401 target_configdirs="$target_configdirs target-mingw"
556f03c4 1402 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
671aa708
NN
1403
1404 # Can't build gdb for mingw32 if not native.
1405 case "${host}" in
f2a0e225 1406 i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
b4f96efe 1407 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
671aa708
NN
1408 ;;
1409 esac
72a7ab82 1410 ;;
671aa708
NN
1411 *-*-cygwin*)
1412 target_configdirs="$target_configdirs target-libtermcap target-winsup"
556f03c4 1413 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
801e2270 1414 # always build newlib if winsup directory is present.
ee6a22df 1415 if test -d "$srcdir/winsup"; then
801e2270 1416 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
ee6a22df 1417 elif test -d "$srcdir/newlib"; then
801e2270
CV
1418 echo "Warning: winsup is missing so newlib can't be built."
1419 fi
671aa708
NN
1420
1421 # Can't build gdb for Cygwin if not native.
1422 case "${host}" in
1423 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
b4f96efe 1424 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
671aa708
NN
1425 ;;
1426 esac
72a7ab82 1427 ;;
ee6a22df
L
1428 i[3456789]86-moss-msdos | i[3456789]86-*-moss* | \
1429 i[3456789]86-*-uwin* | i[3456789]86-*-interix* )
ee6a22df 1430 ;;
f2a0e225 1431 i[3456789]86-*-pe)
556f03c4 1432 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708 1433 ;;
f2a0e225 1434 i[3456789]86-*-sco3.2v5*)
671aa708
NN
1435 # The linker does not yet know about weak symbols in COFF,
1436 # and is not configured to handle mixed ELF and COFF.
1437 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1438 ;;
f2a0e225 1439 i[3456789]86-*-sco*)
671aa708
NN
1440 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1441 ;;
f2a0e225 1442 i[3456789]86-*-solaris2*)
671aa708
NN
1443 noconfigdirs="$noconfigdirs target-libgloss"
1444 ;;
f2a0e225 1445 i[3456789]86-*-sysv4*)
671aa708
NN
1446 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1447 ;;
f2a0e225 1448 i[3456789]86-*-beos*)
3aa83176
NN
1449 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1450 ;;
fb87ad5d 1451 m32r-*-*)
c197e306 1452 noconfigdirs="$noconfigdirs ${libgcj}"
fb87ad5d 1453 ;;
671aa708 1454 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
cb543528 1455 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708
NN
1456 ;;
1457 m68k-*-elf*)
1458 noconfigdirs="$noconfigdirs ${libgcj}"
1459 ;;
1460 m68k-*-coff*)
1461 noconfigdirs="$noconfigdirs ${libgcj}"
1462 ;;
1463 mcore-*-pe*)
1464 # The EPOC C++ environment does not support exceptions or rtti,
1465 # and so building libstdc++-v3 tends not to always work.
1466 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1467 ;;
1468 mmix-*-*)
4fab7234 1469 noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb libgloss"
7f26dfa3 1470 unsupported_languages="$unsupported_languages fortran java"
671aa708
NN
1471 ;;
1472 mn10200-*-*)
1473 noconfigdirs="$noconfigdirs ${libgcj}"
1474 ;;
1475 mn10300-*-*)
1476 noconfigdirs="$noconfigdirs ${libgcj}"
1477 ;;
ab34901f 1478 mt-*-*)
79dd769c
AH
1479 noconfigdirs="$noconfigdirs sim"
1480 ;;
671aa708
NN
1481 powerpc-*-aix*)
1482 # copied from rs6000-*-* entry
3a3c28db 1483 noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
671aa708
NN
1484 ;;
1485 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1486 target_configdirs="$target_configdirs target-winsup"
b4f96efe 1487 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl gnuserv ${libgcj}"
671aa708
NN
1488 # always build newlib.
1489 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1490 ;;
1491 # This is temporary until we can link against shared libraries
1492 powerpcle-*-solaris*)
b4f96efe 1493 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
671aa708
NN
1494 ;;
1495 powerpc-*-beos*)
1496 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1497 ;;
671aa708 1498 powerpc-*-eabi)
556f03c4 1499 noconfigdirs="$noconfigdirs ${libgcj}"
ee6a22df
L
1500 ;;
1501 powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
671aa708 1502 ;;
671aa708
NN
1503 rs6000-*-lynxos*)
1504 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
1505 ;;
1506 rs6000-*-aix*)
3a3c28db 1507 noconfigdirs="$noconfigdirs gprof target-libgloss target-libssp ${libgcj}"
671aa708
NN
1508 ;;
1509 rs6000-*-*)
1510 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1511 ;;
1512 m68k-apollo-*)
1513 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
1514 ;;
1515 mips*-*-irix5*)
1f1d584b 1516 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1517 ;;
1518 mips*-*-irix6*)
671aa708
NN
1519 # Linking libjava exceeds command-line length limits on at least
1520 # IRIX 6.2, but not on IRIX 6.5.
1521 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
1522 # <oldham@codesourcery.com>
7c005a3a 1523 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1524 ;;
1525 mips*-dec-bsd*)
1526 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1527 ;;
1528 mips*-*-bsd*)
1529 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1530 ;;
1531 mipstx39-*-*)
1532 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
3aa83176 1533 ;;
d0fe5ad3
RS
1534 mips64*-*-linux*)
1535 noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
1536 ;;
671aa708
NN
1537 mips*-*-linux*)
1538 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1539 ;;
1540 mips*-*-*)
1541 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1542 ;;
1543 romp-*-*)
1544 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1545 ;;
669f01d8 1546 sh-*-* | sh64-*-*)
671aa708 1547 case "${host}" in
f2a0e225
KC
1548 i[3456789]86-*-vsta) ;; # don't add gprof back in
1549 i[3456789]86-*-go32*) ;; # don't add gprof back in
1550 i[3456789]86-*-msdosdjgpp*) ;; # don't add gprof back in
671aa708
NN
1551 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1552 esac
1553 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1554 ;;
671aa708
NN
1555 sparc-*-elf*)
1556 noconfigdirs="$noconfigdirs ${libgcj}"
1557 ;;
1558 sparc64-*-elf*)
1559 noconfigdirs="$noconfigdirs ${libgcj}"
1560 ;;
1561 sparclite-*-*)
1562 noconfigdirs="$noconfigdirs ${libgcj}"
1563 ;;
1564 sparc-*-sunos4*)
1565 noconfigdirs="$noconfigdirs ${libgcj}"
1566 if test x${is_cross_compiler} != xno ; then
1567 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1568 else
1569 use_gnu_ld=no
1570 fi
1571 ;;
bba5e0ca
EB
1572 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
1573 noconfigdirs="$noconfigdirs ${libgcj}"
1574 ;;
671aa708
NN
1575 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1576 ;;
1577 v810-*-*)
cb543528 1578 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
671aa708
NN
1579 ;;
1580 v850-*-*)
1581 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1582 ;;
1583 v850e-*-*)
1584 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1585 ;;
1586 v850ea-*-*)
1587 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1588 ;;
1589 vax-*-vms)
1590 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
1591 ;;
1592 vax-*-*)
1593 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1594 ;;
0d4f1b4e
BW
1595 xtensa-*-*)
1596 noconfigdirs="$noconfigdirs ${libgcj}"
1597 ;;
671aa708 1598 ip2k-*-*)
cb543528 1599 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708 1600 ;;
c3f84f61 1601 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
671aa708
NN
1602 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1603 ;;
1604 *-*-lynxos*)
1605 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
72a7ab82 1606 ;;
671aa708
NN
1607 *-*-*)
1608 noconfigdirs="$noconfigdirs ${libgcj}"
1609 ;;
1610esac
79c06341 1611
671aa708
NN
1612# If we aren't building newlib, then don't build libgloss, since libgloss
1613# depends upon some newlib header files.
1614case "${noconfigdirs}" in
1615 *target-libgloss*) ;;
1616 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1617esac
1618
671aa708
NN
1619# Work in distributions that contain no compiler tools, like Autoconf.
1620tentative_cc=""
1621host_makefile_frag=/dev/null
1622if test -d ${srcdir}/config ; then
1623case "${host}" in
1624 m68k-hp-hpux*)
1625 # Avoid "too much defining" errors from HPUX compiler.
1626 tentative_cc="cc -Wp,-H256000"
1627 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1628 # If it's HP/UX ar, this should be harmless.
1629 RANLIB="ar ts"
1630 ;;
1631 m68k-apollo-sysv*)
1632 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1633 ;;
1634 m68k-apollo-bsd*)
1635 #None of the Apollo compilers can compile gas or binutils. The preprocessor
1636 # chokes on bfd, the compiler won't let you assign integers to enums, and
1637 # other problems. Defining CC to gcc is a questionable way to say "don't use
1638 # the apollo compiler" (the preferred version of GCC could be called cc,
1639 # or whatever), but I'm not sure leaving CC as cc is any better...
1640 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1641 # Used to have BISON=yacc.
1642 tentative_cc=gcc
1643 ;;
1644 m88k-dg-dgux*)
1645 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
671aa708
NN
1646 ;;
1647 m88k-harris-cxux*)
1648 # Under CX/UX, we want to tell the compiler to use ANSI mode.
1649 tentative_cc="cc -Xa"
1650 host_makefile_frag="config/mh-cxux"
1651 ;;
1652 m88k-motorola-sysv*)
1653 ;;
1654 mips*-dec-ultrix*)
1655 tentative_cc="cc -Wf,-XNg1000"
1656 host_makefile_frag="config/mh-decstation"
1657 ;;
1658 mips*-nec-sysv4*)
1659 # The C compiler on NEC MIPS SVR4 needs bigger tables.
1660 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1661 host_makefile_frag="config/mh-necv4"
1662 ;;
1663 mips*-sgi-irix4*)
1664 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
1665 # environment. Also bump switch table size so that cp-parse will
1666 # compile. Bump string length limit so linker builds.
1667 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1668 ;;
1669 mips*-*-sysv4*)
1670 host_makefile_frag="config/mh-sysv4"
1671 ;;
1672 mips*-*-sysv*)
1673 # This is for a MIPS running RISC/os 4.52C.
1674
1675 # This is needed for GDB, but needs to be in the top-level make because
1676 # if a library is compiled with the bsd headers and gets linked with the
1677 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1678 # a different size).
1679 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1680 # known except to select the sysv environment. Could we use /proc instead?
1681 # These "sysv environments" and "bsd environments" often end up being a pain.
1682 #
1683 # This is not part of CFLAGS because perhaps not all C compilers have this
1684 # option.
1685 tentative_cc="cc -systype sysv"
1686 ;;
1687 i370-ibm-opened*)
1688 tentative_cc="c89"
1689 ;;
f2a0e225 1690 i[3456789]86-*-sysv5*)
671aa708
NN
1691 host_makefile_frag="config/mh-sysv5"
1692 ;;
f2a0e225 1693 i[3456789]86-*-dgux*)
671aa708
NN
1694 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1695 host_makefile_frag="config/mh-dgux386"
1696 ;;
f2a0e225 1697 i[3456789]86-ncr-sysv4.3*)
671aa708
NN
1698 # The MetaWare compiler will generate a copyright message unless you
1699 # turn it off by adding the -Hnocopyr flag.
1700 tentative_cc="cc -Hnocopyr"
1701 ;;
f2a0e225 1702 i[3456789]86-ncr-sysv4*)
671aa708
NN
1703 # for an NCR 3000 (i486/SVR4) system.
1704 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1705 # This compiler not only emits obnoxious copyright messages every time
1706 # you run it, but it chokes and dies on a whole bunch of GNU source
1707 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1708 tentative_cc="/usr/ccs/ATT/cc"
1709 host_makefile_frag="config/mh-ncr3000"
1710 ;;
f2a0e225 1711 i[3456789]86-*-sco3.2v5*)
671aa708 1712 ;;
f2a0e225 1713 i[3456789]86-*-sco*)
671aa708
NN
1714 # The native C compiler botches some simple uses of const. Unfortunately,
1715 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1716 tentative_cc="cc -Dconst="
1717 host_makefile_frag="config/mh-sco"
1718 ;;
f2a0e225 1719 i[3456789]86-*-udk*)
671aa708
NN
1720 host_makefile_frag="config/mh-sysv5"
1721 ;;
f2a0e225 1722 i[3456789]86-*-solaris2*)
671aa708
NN
1723 host_makefile_frag="config/mh-sysv4"
1724 ;;
f2a0e225 1725 i[3456789]86-*-msdosdjgpp*)
671aa708
NN
1726 host_makefile_frag="config/mh-djgpp"
1727 ;;
1728 *-cygwin*)
1729 host_makefile_frag="config/mh-cygwin"
1730 ;;
1731 *-mingw32*)
671aa708
NN
1732 ;;
1733 *-interix*)
1734 host_makefile_frag="config/mh-interix"
1735 ;;
1736 vax-*-ultrix2*)
1737 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1738 tentative_cc=gcc
1739 ;;
1740 *-*-solaris2*)
1741 host_makefile_frag="config/mh-solaris"
1742 ;;
1743 m68k-sun-sunos*)
1744 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1745 # without overflowing the jump tables (-J says to use a 32 bit table)
1746 tentative_cc="cc -J"
1747 ;;
1748 *-hp-hpux*)
1749 tentative_cc="cc -Wp,-H256000"
1750 ;;
1751 *-*-hiux*)
1752 tentative_cc="cc -Wp,-H256000"
1753 ;;
1754 rs6000-*-lynxos*)
1755 # /bin/cc is less than useful for our purposes. Always use GCC
1756 tentative_cc="/usr/cygnus/progressive/bin/gcc"
1757 host_makefile_frag="config/mh-lynxrs6k"
1758 ;;
45f366ab 1759 powerpc-*-darwin*)
be8fff81
RB
1760 host_makefile_frag="config/mh-ppc-darwin"
1761 ;;
d19bca38
PB
1762 powerpc-*-aix*)
1763 host_makefile_frag="config/mh-ppc-aix"
1764 ;;
1765 rs6000-*-aix*)
1766 host_makefile_frag="config/mh-ppc-aix"
1767 ;;
671aa708
NN
1768 *-*-lynxos*)
1769 # /bin/cc is less than useful for our purposes. Always use GCC
1770 tentative_cc="/bin/gcc"
1771 ;;
1772 *-*-sysv4*)
1773 host_makefile_frag="config/mh-sysv4"
1774 ;;
95c53c62
RS
1775 # This is placed last to prevent interfering with the cases above.
1776 i[3456789]86-*-*)
1777 # Build the stage2 and stage3 compilers with -fomit-frame-pointer.
1778 host_makefile_frag="config/mh-x86omitfp"
1779 ;;
671aa708
NN
1780esac
1781fi
1782
55ffb5ed
NN
1783# If we aren't going to be using gcc, see if we can extract a definition
1784# of CC from the fragment.
1785# Actually, use the 'pre-extracted' version above.
1786if test -z "${CC}" && test "${build}" = "${host}" ; then
1787 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1788 found=
1789 for dir in $PATH; do
1790 test -z "$dir" && dir=.
1791 if test -f $dir/gcc; then
1792 found=yes
1793 break
1794 fi
1795 done
1796 IFS="$save_ifs"
1797 if test -z "${found}" && test -n "${tentative_cc}" ; then
1798 CC=$tentative_cc
1799 fi
1800fi
1801
1802if test "${build}" != "${host}" ; then
1803 # If we are doing a Canadian Cross, in which the host and build systems
1804 # are not the same, we set reasonable default values for the tools.
1805
55ffb5ed
NN
1806 CC=${CC-${host_alias}-gcc}
1807 CFLAGS=${CFLAGS-"-g -O2"}
1808 CXX=${CXX-${host_alias}-c++}
1809 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1810 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
55ffb5ed
NN
1811 BUILD_PREFIX=${build_alias}-
1812 BUILD_PREFIX_1=${build_alias}-
55ffb5ed
NN
1813
1814else
1815 # Set reasonable default values for some tools even if not Canadian.
1816 # Of course, these are different reasonable default values, originally
1817 # specified directly in the Makefile.
1818 # We don't export, so that autoconf can do its job.
1819 # Note that all these settings are above the fragment inclusion point
1820 # in Makefile.in, so can still be overridden by fragments.
1821 # This is all going to change when we autoconfiscate...
1822
55ffb5ed 1823 CC_FOR_BUILD="\$(CC)"
55ffb5ed
NN
1824 BUILD_PREFIX=
1825 BUILD_PREFIX_1=loser-
55ffb5ed 1826
23f6b2f9 1827 # Extract the first word of "gcc", so it can be a program name with args.
55ffb5ed 1828set dummy gcc; ac_word=$2
72a7ab82 1829echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d19bca38 1830echo "configure:1831: checking for $ac_word" >&5
72a7ab82
AP
1831if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1832 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1833else
1834 if test -n "$CC"; then
1835 ac_cv_prog_CC="$CC" # Let the user override the test.
1836else
72a7ab82
AP
1837 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1838 ac_dummy="$PATH"
1839 for ac_dir in $ac_dummy; do
1840 test -z "$ac_dir" && ac_dir=.
1841 if test -f $ac_dir/$ac_word; then
1842 ac_cv_prog_CC="gcc"
1843 break
1844 fi
1845 done
1846 IFS="$ac_save_ifs"
55ffb5ed
NN
1847fi
1848fi
72a7ab82 1849CC="$ac_cv_prog_CC"
55ffb5ed 1850if test -n "$CC"; then
72a7ab82 1851 echo "$ac_t""$CC" 1>&6
55ffb5ed 1852else
72a7ab82 1853 echo "$ac_t""no" 1>&6
55ffb5ed
NN
1854fi
1855
1856if test -z "$CC"; then
1857 # Extract the first word of "cc", so it can be a program name with args.
1858set dummy cc; ac_word=$2
72a7ab82 1859echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d19bca38 1860echo "configure:1861: checking for $ac_word" >&5
72a7ab82
AP
1861if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1862 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1863else
1864 if test -n "$CC"; then
1865 ac_cv_prog_CC="$CC" # Let the user override the test.
1866else
72a7ab82 1867 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
55ffb5ed 1868 ac_prog_rejected=no
72a7ab82
AP
1869 ac_dummy="$PATH"
1870 for ac_dir in $ac_dummy; do
1871 test -z "$ac_dir" && ac_dir=.
1872 if test -f $ac_dir/$ac_word; then
1873 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1874 ac_prog_rejected=yes
1875 continue
1876 fi
1877 ac_cv_prog_CC="cc"
1878 break
1879 fi
1880 done
1881 IFS="$ac_save_ifs"
55ffb5ed
NN
1882if test $ac_prog_rejected = yes; then
1883 # We found a bogon in the path, so make sure we never use it.
1884 set dummy $ac_cv_prog_CC
1885 shift
72a7ab82 1886 if test $# -gt 0; then
55ffb5ed
NN
1887 # We chose a different compiler from the bogus one.
1888 # However, it has the same basename, so the bogon will be chosen
1889 # first if we set CC to just the basename; use the full file name.
1890 shift
72a7ab82
AP
1891 set dummy "$ac_dir/$ac_word" "$@"
1892 shift
1893 ac_cv_prog_CC="$@"
55ffb5ed
NN
1894 fi
1895fi
1896fi
1897fi
72a7ab82 1898CC="$ac_cv_prog_CC"
55ffb5ed 1899if test -n "$CC"; then
72a7ab82 1900 echo "$ac_t""$CC" 1>&6
55ffb5ed 1901else
72a7ab82 1902 echo "$ac_t""no" 1>&6
55ffb5ed
NN
1903fi
1904
72a7ab82
AP
1905 if test -z "$CC"; then
1906 case "`uname -s`" in
1907 *win32* | *WIN32*)
1908 # Extract the first word of "cl", so it can be a program name with args.
1909set dummy cl; ac_word=$2
1910echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d19bca38 1911echo "configure:1912: checking for $ac_word" >&5
72a7ab82
AP
1912if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1913 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
1914else
1915 if test -n "$CC"; then
1916 ac_cv_prog_CC="$CC" # Let the user override the test.
1917else
72a7ab82
AP
1918 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1919 ac_dummy="$PATH"
1920 for ac_dir in $ac_dummy; do
1921 test -z "$ac_dir" && ac_dir=.
1922 if test -f $ac_dir/$ac_word; then
1923 ac_cv_prog_CC="cl"
1924 break
1925 fi
1926 done
1927 IFS="$ac_save_ifs"
55ffb5ed
NN
1928fi
1929fi
72a7ab82 1930CC="$ac_cv_prog_CC"
55ffb5ed 1931if test -n "$CC"; then
72a7ab82 1932 echo "$ac_t""$CC" 1>&6
55ffb5ed 1933else
72a7ab82 1934 echo "$ac_t""no" 1>&6
55ffb5ed 1935fi
72a7ab82
AP
1936 ;;
1937 esac
6b65a26d 1938 fi
72a7ab82 1939 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
55ffb5ed
NN
1940fi
1941
72a7ab82 1942echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d19bca38 1943echo "configure:1944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
55ffb5ed 1944
72a7ab82
AP
1945ac_ext=c
1946# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1947ac_cpp='$CPP $CPPFLAGS'
1948ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1949ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1950cross_compiling=$ac_cv_prog_cc_cross
1951
1952cat > conftest.$ac_ext << EOF
1953
d19bca38 1954#line 1955 "configure"
72a7ab82
AP
1955#include "confdefs.h"
1956
1957main(){return(0);}
1958EOF
d19bca38 1959if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
72a7ab82
AP
1960 ac_cv_prog_cc_works=yes
1961 # If we can't run a trivial program, we are probably using a cross compiler.
1962 if (./conftest; exit) 2>/dev/null; then
1963 ac_cv_prog_cc_cross=no
6b65a26d 1964 else
72a7ab82 1965 ac_cv_prog_cc_cross=yes
6b65a26d 1966 fi
72a7ab82
AP
1967else
1968 echo "configure: failed program was:" >&5
1969 cat conftest.$ac_ext >&5
1970 ac_cv_prog_cc_works=no
55ffb5ed 1971fi
72a7ab82
AP
1972rm -fr conftest*
1973ac_ext=c
1974# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1975ac_cpp='$CPP $CPPFLAGS'
1976ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1977ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1978cross_compiling=$ac_cv_prog_cc_cross
1979
1980echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1981if test $ac_cv_prog_cc_works = no; then
1982 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1983fi
1984echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d19bca38 1985echo "configure:1986: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
72a7ab82
AP
1986echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1987cross_compiling=$ac_cv_prog_cc_cross
1988
1989echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d19bca38 1990echo "configure:1991: checking whether we are using GNU C" >&5
72a7ab82
AP
1991if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1992 echo $ac_n "(cached) $ac_c" 1>&6
1993else
1994 cat > conftest.c <<EOF
1995#ifdef __GNUC__
1996 yes;
1997#endif
1998EOF
d19bca38 1999if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
72a7ab82 2000 ac_cv_prog_gcc=yes
6b65a26d 2001else
72a7ab82
AP
2002 ac_cv_prog_gcc=no
2003fi
2004fi
2005
2006echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2007
2008if test $ac_cv_prog_gcc = yes; then
2009 GCC=yes
55ffb5ed 2010else
72a7ab82
AP
2011 GCC=
2012fi
6b65a26d 2013
72a7ab82
AP
2014ac_test_CFLAGS="${CFLAGS+set}"
2015ac_save_CFLAGS="$CFLAGS"
2016CFLAGS=
2017echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
d19bca38 2018echo "configure:2019: checking whether ${CC-cc} accepts -g" >&5
72a7ab82
AP
2019if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2020 echo $ac_n "(cached) $ac_c" 1>&6
2021else
2022 echo 'void f(){}' > conftest.c
2023if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
55ffb5ed
NN
2024 ac_cv_prog_cc_g=yes
2025else
72a7ab82 2026 ac_cv_prog_cc_g=no
55ffb5ed 2027fi
72a7ab82
AP
2028rm -f conftest*
2029
6b65a26d 2030fi
72a7ab82
AP
2031
2032echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
55ffb5ed 2033if test "$ac_test_CFLAGS" = set; then
72a7ab82 2034 CFLAGS="$ac_save_CFLAGS"
55ffb5ed
NN
2035elif test $ac_cv_prog_cc_g = yes; then
2036 if test "$GCC" = yes; then
2037 CFLAGS="-g -O2"
2038 else
2039 CFLAGS="-g"
2040 fi
2041else
2042 if test "$GCC" = yes; then
2043 CFLAGS="-O2"
2044 else
2045 CFLAGS=
2046 fi
2047fi
2048
2049
23f6b2f9
PB
2050 # We must set the default linker to the linker used by gcc for the correct
2051 # operation of libtool. If LD is not defined and we are using gcc, try to
2052 # set the LD default to the ld used by gcc.
2053 if test -z "$LD"; then
2054 if test "$GCC" = yes; then
2055 case $build in
2056 *-*-mingw*)
2057 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
2058 *)
2059 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
2060 esac
2061 case $gcc_prog_ld in
2062 # Accept absolute paths.
2063 [\\/]* | [A-Za-z]:[\\/]*)
2064 LD="$gcc_prog_ld" ;;
2065 esac
2066 fi
2067 fi
2068
2069 CXX=${CXX-"c++"}
2070 CFLAGS=${CFLAGS-"-g"}
2071 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2072fi
2073
72a7ab82
AP
2074if test $host != $build; then
2075 ac_tool_prefix=${host_alias}-
2076else
2077 ac_tool_prefix=
2078fi
23f6b2f9
PB
2079
2080
55ffb5ed 2081
72a7ab82 2082# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
55ffb5ed 2083set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
72a7ab82 2084echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d19bca38 2085echo "configure:2086: checking for $ac_word" >&5
72a7ab82
AP
2086if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2087 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
2088else
2089 if test -n "$GNATBIND"; then
2090 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2091else
72a7ab82
AP
2092 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2093 ac_dummy="$PATH"
2094 for ac_dir in $ac_dummy; do
2095 test -z "$ac_dir" && ac_dir=.
2096 if test -f $ac_dir/$ac_word; then
2097 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
2098 break
2099 fi
2100 done
2101 IFS="$ac_save_ifs"
55ffb5ed
NN
2102fi
2103fi
72a7ab82 2104GNATBIND="$ac_cv_prog_GNATBIND"
55ffb5ed 2105if test -n "$GNATBIND"; then
72a7ab82 2106 echo "$ac_t""$GNATBIND" 1>&6
55ffb5ed 2107else
72a7ab82 2108 echo "$ac_t""no" 1>&6
55ffb5ed
NN
2109fi
2110
72a7ab82 2111
55ffb5ed 2112if test -z "$ac_cv_prog_GNATBIND"; then
72a7ab82 2113if test -n "$ac_tool_prefix"; then
55ffb5ed
NN
2114 # Extract the first word of "gnatbind", so it can be a program name with args.
2115set dummy gnatbind; ac_word=$2
72a7ab82 2116echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d19bca38 2117echo "configure:2118: checking for $ac_word" >&5
72a7ab82
AP
2118if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2119 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed 2120else
72a7ab82
AP
2121 if test -n "$GNATBIND"; then
2122 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
55ffb5ed 2123else
72a7ab82
AP
2124 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2125 ac_dummy="$PATH"
2126 for ac_dir in $ac_dummy; do
2127 test -z "$ac_dir" && ac_dir=.
2128 if test -f $ac_dir/$ac_word; then
2129 ac_cv_prog_GNATBIND="gnatbind"
2130 break
2131 fi
2132 done
2133 IFS="$ac_save_ifs"
2134 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
55ffb5ed
NN
2135fi
2136fi
72a7ab82
AP
2137GNATBIND="$ac_cv_prog_GNATBIND"
2138if test -n "$GNATBIND"; then
2139 echo "$ac_t""$GNATBIND" 1>&6
55ffb5ed 2140else
72a7ab82 2141 echo "$ac_t""no" 1>&6
55ffb5ed
NN
2142fi
2143
2144else
72a7ab82
AP
2145 GNATBIND="no"
2146fi
55ffb5ed
NN
2147fi
2148
72a7ab82 2149echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
d19bca38 2150echo "configure:2151: checking whether compiler driver understands Ada" >&5
72a7ab82
AP
2151if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
2152 echo $ac_n "(cached) $ac_c" 1>&6
55ffb5ed
NN
2153else
2154 cat >conftest.adb <<EOF
2155procedure conftest is begin null; end conftest;
2156EOF
2157acx_cv_cc_gcc_supports_ada=no
2158# There is a bug in old released versions of GCC which causes the
2159# driver to exit successfully when the appropriate language module
2160# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
2161# Therefore we must check for the error message as well as an
2162# unsuccessful exit.
1db673ca
RO
2163# Other compilers, like HP Tru64 UNIX cc, exit successfully when
2164# given a .adb file, but produce no object file. So we must check
2165# if an object file was really produced to guard against this.
55ffb5ed 2166errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
1db673ca 2167if test x"$errors" = x && test -f conftest.$ac_objext; then
55ffb5ed 2168 acx_cv_cc_gcc_supports_ada=yes
55ffb5ed
NN
2169fi
2170rm -f conftest.*
2171fi
72a7ab82
AP
2172
2173echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
55ffb5ed 2174
1db673ca 2175if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
55ffb5ed
NN
2176 have_gnat=yes
2177else
2178 have_gnat=no
2179fi
2180
72a7ab82 2181echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
d19bca38 2182echo "configure:2183: checking how to compare bootstrapped objects" >&5
72a7ab82
AP
2183if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
a76494aa
PB
2185else
2186 echo abfoo >t1
2187 echo cdfoo >t2
2188 gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
6cf1ac42
PB
2189 if cmp t1 t2 2 2 > /dev/null 2>&1; then
2190 if cmp t1 t2 1 1 > /dev/null 2>&1; then
2191 :
2192 else
2193 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
2194 fi
2195 fi
a76494aa
PB
2196 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2197 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
6cf1ac42 2198 :
a76494aa
PB
2199 else
2200 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
2201 fi
2202 fi
2203 rm t1 t2
2204
2205fi
72a7ab82
AP
2206
2207echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
a76494aa
PB
2208do_compare="$gcc_cv_prog_cmp_skip"
2209
2210
55ffb5ed 2211
bebf829d 2212# Check for GMP and MPFR
6de9cd9a
DN
2213gmplibs=
2214gmpinc=
2215have_gmp=yes
bebf829d
PB
2216# Specify a location for mpfr
2217# check for this first so it ends up on the link line before gmp.
2218# Check whether --with-mpfr-dir or --without-mpfr-dir was given.
2219if test "${with_mpfr_dir+set}" = set; then
2220 withval="$with_mpfr_dir"
72a7ab82
AP
2221 :
2222fi
bebf829d
PB
2223
2224
2225if test "x$with_mpfr_dir" != x; then
68193f9b 2226 gmpinc="-I$with_mpfr_dir"
bebf829d
PB
2227 gmplibs="$with_mpfr_dir/libmpfr.a"
2228else
2229 gmplibs="-lmpfr"
2230fi
2231
2232# Check whether --with-mpfr or --without-mpfr was given.
2233if test "${with_mpfr+set}" = set; then
2234 withval="$with_mpfr"
72a7ab82
AP
2235 :
2236fi
bebf829d
PB
2237
2238
2239if test "x$with_mpfr" != x; then
2240 gmplibs="-L$with_mpfr/lib $gmplibs"
2241 gmpinc="-I$with_mpfr/include"
2242fi
2243
6de9cd9a
DN
2244# Specify a location for gmp
2245# Check whether --with-gmp-dir or --without-gmp-dir was given.
2246if test "${with_gmp_dir+set}" = set; then
2247 withval="$with_gmp_dir"
72a7ab82
AP
2248 :
2249fi
6de9cd9a
DN
2250
2251
bebf829d
PB
2252if test "x$with_gmp_dir" != x; then
2253 gmpinc="$gmpinc -I$with_gmp_dir"
6de9cd9a 2254 if test -f "$with_gmp_dir/.libs/libgmp.a"; then
bebf829d 2255 gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
6de9cd9a 2256 elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
bebf829d 2257 gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
6de9cd9a
DN
2258 fi
2259 # One of the later tests will catch the error if neither library is present.
bebf829d
PB
2260else
2261 gmplibs="$gmplibs -lgmp"
6de9cd9a
DN
2262fi
2263
2264# Check whether --with-gmp or --without-gmp was given.
2265if test "${with_gmp+set}" = set; then
2266 withval="$with_gmp"
72a7ab82
AP
2267 :
2268fi
6de9cd9a
DN
2269
2270
bebf829d
PB
2271if test "x$with_gmp" != x; then
2272 gmplibs="-L$with_gmp/lib $gmplibs"
2273 gmpinc="-I$with_gmp/include $gmpinc"
6de9cd9a
DN
2274fi
2275
2276saved_CFLAGS="$CFLAGS"
2277CFLAGS="$CFLAGS $gmpinc"
2278# Check GMP actually works
72a7ab82 2279echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
d19bca38 2280echo "configure:2281: checking for correct version of gmp.h" >&5
72a7ab82 2281cat > conftest.$ac_ext <<EOF
d19bca38 2282#line 2283 "configure"
72a7ab82 2283#include "confdefs.h"
6de9cd9a 2284#include "gmp.h"
72a7ab82 2285int main() {
6de9cd9a
DN
2286
2287#if __GNU_MP_VERSION < 3
2288choke me
2289#endif
2290
72a7ab82
AP
2291; return 0; }
2292EOF
d19bca38 2293if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
72a7ab82
AP
2294 rm -rf conftest*
2295 echo "$ac_t""yes" 1>&6
2296else
2297 echo "configure: failed program was:" >&5
2298 cat conftest.$ac_ext >&5
2299 rm -rf conftest*
2300 echo "$ac_t""no" 1>&6; have_gmp=no
2301fi
2302rm -f conftest*
6de9cd9a
DN
2303
2304if test x"$have_gmp" = xyes; then
72a7ab82 2305 echo $ac_n "checking for MPFR""... $ac_c" 1>&6
d19bca38 2306echo "configure:2307: checking for MPFR" >&5
6de9cd9a
DN
2307
2308 saved_LIBS="$LIBS"
2309 LIBS="$LIBS $gmplibs"
72a7ab82 2310 cat > conftest.$ac_ext <<EOF
d19bca38 2311#line 2312 "configure"
72a7ab82 2312#include "confdefs.h"
6de9cd9a 2313#include <gmp.h>
bebf829d 2314#include <mpfr.h>
72a7ab82 2315int main() {
bebf829d 2316mpfr_t n; mpfr_init(n);
72a7ab82
AP
2317; return 0; }
2318EOF
d19bca38 2319if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
72a7ab82
AP
2320 rm -rf conftest*
2321 echo "$ac_t""yes" 1>&6
2322else
2323 echo "configure: failed program was:" >&5
2324 cat conftest.$ac_ext >&5
2325 rm -rf conftest*
2326 echo "$ac_t""no" 1>&6; have_gmp=no
2327fi
2328rm -f conftest*
6de9cd9a
DN
2329 LIBS="$saved_LIBS"
2330 CFLAGS="$saved_CFLAGS"
2331fi
2332
bebf829d 2333# Flags needed for both GMP and/or MPFR
6de9cd9a
DN
2334
2335
2336
1e0f07d3 2337# By default, C is the only stage 1 language.
2805b53a
NN
2338stage1_languages=c
2339
2340
55ffb5ed
NN
2341# Figure out what language subdirectories are present.
2342# Look if the user specified --enable-languages="..."; if not, use
2343# the environment variable $LANGUAGES if defined. $LANGUAGES might
2344# go away some day.
2345# NB: embedded tabs in this IF block -- do not untabify
2346if test -d ${srcdir}/gcc; then
2347 if test x"${enable_languages+set}" != xset; then
2348 if test x"${LANGUAGES+set}" = xset; then
2349 enable_languages="${LANGUAGES}"
2350 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
2351 else
2352 enable_languages=all
2353 fi
2354 else
2355 if test x"${enable_languages}" = x ||
2356 test x"${enable_languages}" = xyes;
2357 then
2358 echo configure.in: --enable-languages needs at least one language argument 1>&2
2359 exit 1
2360 fi
2361 fi
2362 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
2363
7f26dfa3
FXC
2364 # 'f95' is the old name for the 'fortran' language. We issue a warning
2365 # and make the substitution.
2366 case ,${enable_languages}, in
2367 *,f95,*)
2368 echo configure.in: warning: 'f95' as language name is deprecated, use 'fortran' instead 1>&2
2369 enable_languages=`echo "${enable_languages}" | sed -e 's/f95/fortran/g'`
2370 ;;
2371 esac
2372
55ffb5ed
NN
2373 # First scan to see if an enabled language requires some other language.
2374 # We assume that a given config-lang.in will list all the language
2375 # front ends it requires, even if some are required indirectly.
2376 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2377 case ${lang_frag} in
2378 ..) ;;
2379 # The odd quoting in the next line works around
2380 # an apparent bug in bash 1.12 on linux.
2381 ${srcdir}/gcc/[*]/config-lang.in) ;;
2382 *)
2383 # From the config-lang.in, get $language, $lang_requires
2384 language=
2385 lang_requires=
2386 . ${lang_frag}
2387 for other in ${lang_requires} ; do
2388 case ,${enable_languages}, in
2389 *,$other,*) ;;
2390 *,all,*) ;;
2391 *,$language,*)
2392 echo " \`$other' language required by \`$language'; enabling" 1>&2
2393 enable_languages="${enable_languages},${other}"
2394 ;;
2395 esac
2396 done
2397 ;;
2398 esac
2399 done
2400
2401 new_enable_languages=c
2402 missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
9c71a529 2403 potential_languages=c
55ffb5ed
NN
2404
2405 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2406 case ${lang_frag} in
2407 ..) ;;
2408 # The odd quoting in the next line works around
2409 # an apparent bug in bash 1.12 on linux.
2410 ${srcdir}/gcc/[*]/config-lang.in) ;;
2411 *)
72a7ab82 2412 # From the config-lang.in, get $language, $target_libs,
2805b53a 2413 # $lang_dirs, $boot_language, and $build_by_default
55ffb5ed
NN
2414 language=
2415 target_libs=
2416 lang_dirs=
2805b53a 2417 boot_language=
55ffb5ed 2418 build_by_default=
9c71a529 2419 need_gmp=
55ffb5ed 2420 . ${lang_frag}
9c71a529 2421 potential_languages="${potential_languages},${language}"
55ffb5ed
NN
2422 # This is quite sensitive to the ordering of the case statement arms.
2423 case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
2424 *::*:*)
2425 echo "${lang_frag} doesn't set \$language." 1>&2
2426 exit 1
9c71a529 2427 ;;
55ffb5ed
NN
2428 *:ada:no:*)
2429 # Ada was requested with no preexisting GNAT. Disable unconditionally.
2430 add_this_lang=no
2431 ;;
2432 *,${language},*:*:*:*)
2433 # Language was explicitly selected; include it.
2434 add_this_lang=yes
2435 ;;
2436 *,all,*:*:*:no)
2437 # 'all' was selected, but this is not a default language
9c71a529 2438 # so do not include it.
55ffb5ed 2439 add_this_lang=no
9c71a529 2440 ;;
55ffb5ed
NN
2441 *,all,*:*:*:*)
2442 # 'all' was selected and this is a default language; include it.
2443 add_this_lang=yes
2444 ;;
2445 *)
2446 add_this_lang=no
2447 ;;
2448 esac
6de9cd9a 2449
ce7cbbb0
PE
2450 # Disable languages that need GMP if it isn't available.
2451 case ,${enable_languages},:${have_gmp}:${need_gmp} in
2452 *,${language},*:no:yes)
2453 # Specifically requested language; tell them.
72a7ab82 2454 { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
ce7cbbb0
PE
2455 ;;
2456 *:no:yes)
2457 # Silently disable.
2458 add_this_lang=no
2459 ;;
2460 esac
4fab7234
HPN
2461
2462 # Disable a language that is unsupported by the target.
2463 case " $unsupported_languages " in
2464 *" $language "*)
2465 add_this_lang=no
2466 ;;
2467 esac
2468
6de9cd9a 2469 case $add_this_lang in
55ffb5ed
NN
2470 no)
2471 # Remove language-dependent dirs.
2805b53a
NN
2472 eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
2473 ;;
55ffb5ed
NN
2474 *)
2475 new_enable_languages="$new_enable_languages,$language"
2805b53a
NN
2476 missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
2477 case ${boot_language} in
2478 yes)
340de83f
NN
2479 # Add to (comma-separated) list of stage 1 languages.
2480 stage1_languages="${stage1_languages},${language}"
2805b53a
NN
2481 ;;
2482 esac
2483 ;;
55ffb5ed
NN
2484 esac
2485 ;;
2486 esac
2487 done
2488
79b4b7d2 2489 missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
55ffb5ed 2490 if test "x$missing_languages" != x; then
72a7ab82 2491 { echo "configure: error:
0cf085e4 2492The following requested languages could not be built: ${missing_languages}
72a7ab82 2493Recognised languages are: ${potential_languages}" 1>&2; exit 1; }
55ffb5ed
NN
2494 fi
2495
2496 if test "x$new_enable_languages" != "x$enable_languages"; then
2497 echo The following languages will be built: ${new_enable_languages}
2498 fi
2499 enable_languages="$new_enable_languages"
6bbec498 2500 ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
55ffb5ed
NN
2501fi
2502
ee6a22df
L
2503# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
2504# $build_configdirs and $target_configdirs.
55ffb5ed
NN
2505# If we have the source for $noconfigdirs entries, add them to $notsupp.
2506
2507notsupp=""
2508for dir in . $skipdirs $noconfigdirs ; do
ee6a22df 2509 dirname=`echo $dir | sed -e s/target-//g -e s/build-//g`
55ffb5ed
NN
2510 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2511 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
2512 if test -r $srcdir/$dirname/configure ; then
2513 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2514 true
2515 else
2516 notsupp="$notsupp $dir"
2517 fi
2518 fi
2519 fi
ee6a22df
L
2520 if test $dir != . && echo " ${build_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2521 build_configdirs=`echo " ${build_configdirs} " | sed -e "s/ ${dir} / /"`
2522 if test -r $srcdir/$dirname/configure ; then
2523 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2524 true
2525 else
2526 notsupp="$notsupp $dir"
2527 fi
2528 fi
2529 fi
55ffb5ed
NN
2530 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2531 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
2532 if test -r $srcdir/$dirname/configure ; then
2533 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2534 true
2535 else
2536 notsupp="$notsupp $dir"
2537 fi
2538 fi
2539 fi
2540done
2541
2542# Sometimes the tools are distributed with libiberty but with no other
2543# libraries. In that case, we don't want to build target-libiberty.
2544if test -n "${target_configdirs}" ; then
2545 others=
2546 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
2547 if test "$i" != "libiberty" ; then
2548 if test -r $srcdir/$i/configure ; then
2549 others=yes;
2550 break;
2551 fi
2552 fi
2553 done
2554 if test -z "${others}" ; then
2555 target_configdirs=
2556 fi
2557fi
2558
2559# Quietly strip out all directories which aren't configurable in this tree.
2560# This relies on all configurable subdirectories being autoconfiscated, which
2561# is now the case.
23f6b2f9
PB
2562build_configdirs_all="$build_configdirs"
2563build_configdirs=
2564for i in ${build_configdirs_all} ; do
72a7ab82 2565 j=`echo $i | sed -e s/build-//g`
23f6b2f9
PB
2566 if test -f ${srcdir}/$j/configure ; then
2567 build_configdirs="${build_configdirs} $i"
2568 fi
2569done
2570
55ffb5ed
NN
2571configdirs_all="$configdirs"
2572configdirs=
2573for i in ${configdirs_all} ; do
2574 if test -f ${srcdir}/$i/configure ; then
2575 configdirs="${configdirs} $i"
2576 fi
2577done
23f6b2f9 2578
55ffb5ed
NN
2579target_configdirs_all="$target_configdirs"
2580target_configdirs=
2581for i in ${target_configdirs_all} ; do
72a7ab82 2582 j=`echo $i | sed -e s/target-//g`
55ffb5ed
NN
2583 if test -f ${srcdir}/$j/configure ; then
2584 target_configdirs="${target_configdirs} $i"
2585 fi
2586done
2587
2588# Produce a warning message for the subdirs we can't configure.
2589# This isn't especially interesting in the Cygnus tree, but in the individual
2590# FSF releases, it's important to let people know when their machine isn't
2591# supported by the one or two programs in a package.
2592
2593if test -n "${notsupp}" && test -z "${norecursion}" ; then
2594 # If $appdirs is non-empty, at least one of those directories must still
2595 # be configured, or we error out. (E.g., if the gas release supports a
2596 # specified target in some subdirs but not the gas subdir, we shouldn't
2597 # pretend that all is well.)
2598 if test -n "$appdirs" ; then
2599 for dir in $appdirs ; do
2600 if test -r $dir/Makefile.in ; then
2601 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2602 appdirs=""
2603 break
2604 fi
23f6b2f9 2605 if echo " ${target_configdirs} " | grep " target-${dir} " >/dev/null 2>&1; then
55ffb5ed
NN
2606 appdirs=""
2607 break
2608 fi
2609 fi
2610 done
2611 if test -n "$appdirs" ; then
2612 echo "*** This configuration is not supported by this package." 1>&2
2613 exit 1
2614 fi
2615 fi
2616 # Okay, some application will build, or we don't care to check. Still
2617 # notify of subdirs not getting built.
2618 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
2619 echo " ${notsupp}" 1>&2
2620 echo " (Any other directories should still work fine.)" 1>&2
2621fi
2622
2623case "$host" in
2624 *msdosdjgpp*)
2625 enable_gdbtk=no ;;
2626esac
2627
2628copy_dirs=
2629
526635cb
MM
2630# Check whether --with-build-sysroot or --without-build-sysroot was given.
2631if test "${with_build_sysroot+set}" = set; then
2632 withval="$with_build_sysroot"
2633 if test x"$withval" != x ; then
2634 SYSROOT_CFLAGS_FOR_TARGET="--sysroot=$withval"
2635 fi
2636else
2637 SYSROOT_CFLAGS_FOR_TARGET=
72a7ab82
AP
2638fi
2639
526635cb
MM
2640
2641
55ffb5ed
NN
2642# Handle --with-headers=XXX. If the value is not "yes", the contents of
2643# the named directory are copied to $(tooldir)/sys-include.
2644if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
2645 if test x${is_cross_compiler} = xno ; then
2646 echo 1>&2 '***' --with-headers is only supported when cross compiling
2647 exit 1
2648 fi
2649 if test x"${with_headers}" != xyes ; then
2650 case "${exec_prefixoption}" in
2651 "") x=${prefix} ;;
2652 *) x=${exec_prefix} ;;
2653 esac
2654 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
2655 fi
2656fi
2657
2658# Handle --with-libs=XXX. If the value is not "yes", the contents of
2659# the name directories are copied to $(tooldir)/lib. Multiple directories
2660# are permitted.
2661if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
2662 if test x${is_cross_compiler} = xno ; then
2663 echo 1>&2 '***' --with-libs is only supported when cross compiling
2664 exit 1
2665 fi
2666 if test x"${with_libs}" != xyes ; then
2667 # Copy the libraries in reverse order, so that files in the first named
2668 # library override files in subsequent libraries.
2669 case "${exec_prefixoption}" in
2670 "") x=${prefix} ;;
2671 *) x=${exec_prefix} ;;
2672 esac
2673 for l in ${with_libs}; do
2674 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
2675 done
2676 fi
2677fi
2678
2679# Handle ${copy_dirs}
2680set fnord ${copy_dirs}
2681shift
2682while test $# != 0 ; do
2683 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
2684 :
2685 else
2686 echo Copying $1 to $2
2687
2688 # Use the install script to create the directory and all required
2689 # parent directories.
2690 if test -d $2 ; then
2691 :
2692 else
2693 echo >config.temp
2694 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
2695 fi
2696
2697 # Copy the directory, assuming we have tar.
2698 # FIXME: Should we use B in the second tar? Not all systems support it.
2699 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
2700
2701 # It is the responsibility of the user to correctly adjust all
2702 # symlinks. If somebody can figure out how to handle them correctly
2703 # here, feel free to add the code.
2704
2705 echo $1 > $2/COPIED
2706 fi
2707 shift; shift
2708done
2709
671aa708
NN
2710extra_arflags_for_target=
2711extra_nmflags_for_target=
2712extra_ranlibflags_for_target=
2713target_makefile_frag=/dev/null
2714case "${target}" in
61fec9ff 2715 *-*-netware*)
671aa708
NN
2716 target_makefile_frag="config/mt-netware"
2717 ;;
98a5bb3b
RM
2718 *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
2719 target_makefile_frag="config/mt-gnu"
671aa708
NN
2720 ;;
2721 *-*-aix4.[3456789]* | *-*-aix[56789].*)
72a7ab82 2722 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
671aa708
NN
2723 # commands to handle both 32-bit and 64-bit objects. These flags are
2724 # harmless if we're using GNU nm or ar.
2725 extra_arflags_for_target=" -X32_64"
2726 extra_nmflags_for_target=" -B -X32_64"
2727 ;;
2728 *-*-darwin*)
2729 # ranlib from Darwin requires the -c flag to look at common symbols.
2730 extra_ranlibflags_for_target=" -c"
2731 ;;
2732 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
2733 target_makefile_frag="config/mt-wince"
2734 ;;
2735esac
2736
2737alphaieee_frag=/dev/null
2738case $target in
2739 alpha*-*-*)
2740 # This just makes sure to use the -mieee option to build target libs.
2741 # This should probably be set individually by each library.
2742 alphaieee_frag="config/mt-alphaieee"
2743 ;;
2744esac
2745
2746# If --enable-target-optspace always use -Os instead of -O2 to build
2747# the target libraries, similarly if it is not specified, use -Os
2748# on selected platforms.
2749ospace_frag=/dev/null
2750case "${enable_target_optspace}:${target}" in
2751 yes:*)
2752 ospace_frag="config/mt-ospace"
2753 ;;
2754 :d30v-*)
2755 ospace_frag="config/mt-d30v"
2756 ;;
2757 :m32r-* | :d10v-* | :fr30-*)
2758 ospace_frag="config/mt-ospace"
2759 ;;
2760 no:* | :*)
2761 ;;
2762 *)
2763 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2764 ;;
2765esac
2766
2767# Set with_gnu_as and with_gnu_ld as appropriate.
2768#
2769# This is done by determining whether or not the appropriate directory
2770# is available, and by checking whether or not specific configurations
2771# have requested that this magic not happen.
72a7ab82
AP
2772#
2773# The command line options always override the explicit settings in
671aa708
NN
2774# configure.in, and the settings in configure.in override this magic.
2775#
72a7ab82 2776# If the default for a toolchain is to use GNU as and ld, and you don't
671aa708
NN
2777# want to do that, then you should use the --without-gnu-as and
2778# --without-gnu-ld options for the configure script.
2779
2780if test x${use_gnu_as} = x &&
2781 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2782 with_gnu_as=yes
2783 extra_host_args="$extra_host_args --with-gnu-as"
2784fi
2785
2786if test x${use_gnu_ld} = x &&
2787 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2788 with_gnu_ld=yes
2789 extra_host_args="$extra_host_args --with-gnu-ld"
2790fi
2791
2792# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2793# can detect this case.
2794
2795if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2796 with_newlib=yes
2797 extra_host_args="$extra_host_args --with-newlib"
2798fi
2799
671aa708
NN
2800# Default to using --with-stabs for certain targets.
2801if test x${with_stabs} = x ; then
2802 case "${target}" in
89a95129 2803 mips*-*-irix[56]*)
671aa708
NN
2804 ;;
2805 mips*-*-* | alpha*-*-osf*)
2806 with_stabs=yes;
2807 extra_host_args="${extra_host_args} --with-stabs"
2808 ;;
2809 esac
2810fi
2811
2812# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
2813# them automatically.
2814case "${host}" in
72a7ab82 2815 hppa*64*-*-hpux11*)
671aa708
NN
2816 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2817 ;;
2818esac
2819
671aa708
NN
2820# Some systems (e.g., one of the i386-aix systems the gas testers are
2821# using) don't handle "\$" correctly, so don't use it here.
df445104 2822tooldir='${exec_prefix}'/${target_alias}
671aa708
NN
2823build_tooldir=${tooldir}
2824
671aa708
NN
2825# Create a .gdbinit file which runs the one in srcdir
2826# and tells GDB to look there for source files.
2827
2828if test -r ${srcdir}/.gdbinit ; then
2829 case ${srcdir} in
2830 .) ;;
2831 *) cat > ./.gdbinit <<EOF
2832# ${NO_EDIT}
2833dir ${srcdir}
2834dir .
2835source ${srcdir}/.gdbinit
2836EOF
2837 ;;
2838 esac
2839fi
2840
671aa708
NN
2841# Make sure that the compiler is able to generate an executable. If it
2842# can't, we are probably in trouble. We don't care whether we can run the
2843# executable--we might be using a cross compiler--we only care whether it
2844# can be created. At this point the main configure script has set CC.
2845we_are_ok=no
2846echo "int main () { return 0; }" > conftest.c
2847${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
2848if test $? = 0 ; then
2849 if test -s conftest || test -s conftest.exe ; then
2850 we_are_ok=yes
2851 fi
72a7ab82 2852fi
671aa708
NN
2853case $we_are_ok in
2854 no)
2855 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
2856 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
2857 rm -f conftest*
2858 exit 1
2859 ;;
2860esac
2861rm -f conftest*
2862
2863# The Solaris /usr/ucb/cc compiler does not appear to work.
2864case "${host}" in
2865 sparc-sun-solaris2*)
2866 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
2867 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
2868 could_use=
2869 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
2870 if test -d /opt/cygnus/bin ; then
2871 if test "$could_use" = "" ; then
2872 could_use="/opt/cygnus/bin"
2873 else
2874 could_use="$could_use or /opt/cygnus/bin"
2875 fi
2876 fi
2877 if test "$could_use" = "" ; then
2878 echo "Warning: compilation may fail because you're using"
2879 echo "/usr/ucb/cc. You should change your PATH or CC "
2880 echo "variable and rerun configure."
2881 else
2882 echo "Warning: compilation may fail because you're using"
2883 echo "/usr/ucb/cc, when you should use the C compiler from"
2884 echo "$could_use. You should change your"
2885 echo "PATH or CC variable and rerun configure."
2886 fi
2887 fi
2888 ;;
2889esac
2890
671aa708
NN
2891case "${host}" in
2892 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
256f7136 2893 *-*-darwin* | *-*-rhapsody* ) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
671aa708
NN
2894 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
2895esac
2896
2897# Record target_configdirs and the configure arguments for target and
2898# build configuration in Makefile.
2899target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
23f6b2f9 2900build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'`
671aa708 2901
671aa708
NN
2902# Determine whether gdb needs tk/tcl or not.
2903# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
2904# and in that case we want gdb to be built without tk. Ugh!
2905# In fact I believe gdb is the *only* package directly dependent on tk,
2906# so we should be able to put the 'maybe's in unconditionally and
2907# leave out the maybe dependencies when enable_gdbtk is false. I'm not
2908# 100% sure that that's safe though.
e914a571 2909
b4f96efe 2910gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-libgui"
671aa708
NN
2911case "$enable_gdbtk" in
2912 no)
2913 GDB_TK="" ;;
e914a571
AC
2914 yes)
2915 GDB_TK="${gdb_tk}" ;;
671aa708 2916 *)
e914a571
AC
2917 # Only add the dependency on gdbtk when GDBtk is part of the gdb
2918 # distro. Eventually someone will fix this and move Insight, nee
2919 # gdbtk to a separate directory.
2920 if test -d ${srcdir}/gdb/gdbtk ; then
2921 GDB_TK="${gdb_tk}"
2922 else
2923 GDB_TK=""
2924 fi
2925 ;;
671aa708 2926esac
ef9db8d5
DJ
2927CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g`
2928INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
671aa708 2929
60975492 2930# Strip out unwanted targets.
8b87bb96
NN
2931
2932# While at that, we remove Makefiles if we were started for recursive
2933# configuration, so that the top-level Makefile reconfigures them,
2934# like we used to do when configure itself was recursive.
8b87bb96 2935
60975492
PB
2936# Loop over modules. $extrasub must be used with care, limiting as
2937# much as possible the usage of range addresses. That's because autoconf
2938# splits the sed script to overcome limits in the number of commands,
2939# and relying on carefully-timed sed passes may turn out to be very hard
2940# to maintain later. In this particular case, you just have to be careful
2941# not to nest @if/@endif pairs, because configure will not warn you at all.
8b87bb96 2942
f516a7da
PB
2943# Check whether --enable-bootstrap or --disable-bootstrap was given.
2944if test "${enable_bootstrap+set}" = set; then
2945 enableval="$enable_bootstrap"
72a7ab82 2946 :
f516a7da 2947else
ce521a9c 2948 enable_bootstrap=default
72a7ab82
AP
2949fi
2950
f516a7da 2951
ce521a9c
PB
2952# Issue errors and warnings for invalid/strange bootstrap combinations.
2953case "$configdirs" in
2954 *gcc*) have_compiler=yes ;;
2955 *) have_compiler=no ;;
2956esac
2957
2958case "$have_compiler:$host:$target:$enable_bootstrap" in
2959 *:*:*:no) ;;
2960
1ca26cd2 2961 # Default behavior. Enable bootstrap if we have a compiler
ce521a9c
PB
2962 # and we are in a native configuration.
2963 yes:$build:$build:default)
1ca26cd2 2964 enable_bootstrap=yes ;;
ce521a9c
PB
2965
2966 *:*:*:default)
2967 enable_bootstrap=no ;;
2968
2969 # We have a compiler and we are in a native configuration, bootstrap is ok
2970 yes:$build:$build:yes | yes:$build:$build:lean)
2971 ;;
2972
2973 # Other configurations, but we have a compiler. Assume the user knows
2974 # what he's doing.
2975 yes:*:*:yes | yes:*:*:lean)
72a7ab82 2976 echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
ce521a9c
PB
2977 ;;
2978
2979 # No compiler: if they passed --enable-bootstrap explicitly, fail
2980 no:*:*:yes | no:*:*:lean)
72a7ab82 2981 { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
ce521a9c
PB
2982
2983 # Fail if wrong command line
2984 *)
72a7ab82 2985 { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
ce521a9c
PB
2986 ;;
2987esac
2988
2989# Adjust the toplevel makefile according to whether bootstrap was selected.
f516a7da
PB
2990case "$enable_bootstrap" in
2991 yes)
ce521a9c 2992 bootstrap_lean='#'
ce521a9c
PB
2993 bootstrap_suffix=bootstrap ;;
2994 lean)
2995 bootstrap_lean=''
5607edfd 2996 bootstrap_suffix=bootstrap ;;
f516a7da 2997 no)
5607edfd 2998 bootstrap_suffix=no-bootstrap ;;
f516a7da
PB
2999esac
3000
3001
23f6b2f9 3002for module in ${build_configdirs} ; do
5607edfd
PB
3003 if test -z "${no_recursion}" \
3004 && test -f ${build_subdir}/${module}/Makefile; then
3005 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
3006 rm -f ${build_subdir}/${module}/Makefile
3007 fi
3008 extrasub="$extrasub
3009/^@if build-$module\$/d
3010/^@endif build-$module\$/d
3011/^@if build-$module-$bootstrap_suffix\$/d
3012/^@endif build-$module-$bootstrap_suffix\$/d"
3013done
3014for module in ${configdirs} ; do
3015 if test -z "${no_recursion}" \
3016 && test -f ${module}/Makefile; then
3017 echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
3018 rm -f ${module}/Makefile
3019 fi
3020 extrasub="$extrasub
3021/^@if $module\$/d
3022/^@endif $module\$/d
3023/^@if $module-$bootstrap_suffix\$/d
3024/^@endif $module-$bootstrap_suffix\$/d"
3025done
3026for module in ${target_configdirs} ; do
3027 if test -z "${no_recursion}" \
3028 && test -f ${target_subdir}/${module}/Makefile; then
3029 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
3030 rm -f ${target_subdir}/${module}/Makefile
3031 fi
3032 extrasub="$extrasub
3033/^@if target-$module\$/d
3034/^@endif target-$module\$/d
3035/^@if target-$module-$bootstrap_suffix\$/d
3036/^@endif target-$module-$bootstrap_suffix\$/d"
3037done
3038
60975492
PB
3039extrasub="$extrasub
3040/^@if /,/^@endif /d"
671aa708
NN
3041
3042# Create the serialization dependencies. This uses a temporary file.
3043
ade82b16
AO
3044# Check whether --enable-serial-configure or --disable-serial-configure was given.
3045if test "${enable_serial_configure+set}" = set; then
3046 enableval="$enable_serial_configure"
72a7ab82
AP
3047 :
3048fi
ade82b16
AO
3049
3050
bf1d3e81
NN
3051case ${enable_serial_configure} in
3052 yes)
3053 enable_serial_build_configure=yes
3054 enable_serial_host_configure=yes
3055 enable_serial_target_configure=yes
3056 ;;
3057esac
3058
671aa708
NN
3059# These force 'configure's to be done one at a time, to avoid problems
3060# with contention over a shared config.cache.
3061rm -f serdep.tmp
ade82b16 3062echo '# serdep.tmp' > serdep.tmp
671aa708 3063olditem=
bf1d3e81 3064test "x${enable_serial_build_configure}" = xyes &&
671aa708
NN
3065for item in ${build_configdirs} ; do
3066 case ${olditem} in
3067 "") ;;
ade82b16 3068 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
671aa708
NN
3069 esac
3070 olditem=${item}
3071done
3072olditem=
bf1d3e81 3073test "x${enable_serial_host_configure}" = xyes &&
671aa708
NN
3074for item in ${configdirs} ; do
3075 case ${olditem} in
3076 "") ;;
ade82b16 3077 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
671aa708
NN
3078 esac
3079 olditem=${item}
3080done
3081olditem=
bf1d3e81 3082test "x${enable_serial_target_configure}" = xyes &&
671aa708
NN
3083for item in ${target_configdirs} ; do
3084 case ${olditem} in
3085 "") ;;
ade82b16 3086 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
671aa708
NN
3087 esac
3088 olditem=${item}
3089done
3090serialization_dependencies=serdep.tmp
3091
3092
ade82b16
AO
3093# Base args. Strip norecursion, cache-file, srcdir, host, build,
3094# target and nonopt. These are the ones we might not want to pass
43bb47c2
DJ
3095# down to subconfigures. Also strip program-prefix, program-suffix,
3096# and program-transform-name, so that we can pass down a consistent
3097# program-transform-name. If autoconf has put single quotes around
3098# any of these arguments (because they contain shell metacharacters)
3099# then this will fail; in practice this only happens for
3100# --program-transform-name, so be sure to override --program-transform-name
3101# at the end of the argument list.
3102# These will be expanded by make, so quote '$'.
b348267b 3103cat <<\EOF_SED > conftestsed
9104315a
NN
3104s/ --no[^ ]*/ /g
3105s/ --c[a-z-]*[= ][^ ]*//g
3106s/ --sr[a-z-]*[= ][^ ]*//g
3107s/ --ho[a-z-]*[= ][^ ]*//g
3108s/ --bu[a-z-]*[= ][^ ]*//g
3109s/ --t[a-z-]*[= ][^ ]*//g
3110s/ --program-[pst][a-z-]*[= ][^ ]*//g
3111s/ -cache-file[= ][^ ]*//g
3112s/ -srcdir[= ][^ ]*//g
3113s/ -host[= ][^ ]*//g
3114s/ -build[= ][^ ]*//g
3115s/ -target[= ][^ ]*//g
3116s/ -program-prefix[= ][^ ]*//g
3117s/ -program-suffix[= ][^ ]*//g
3118s/ -program-transform-name[= ][^ ]*//g
b348267b
GK
3119s/ [^' -][^ ]* / /
3120s/^ *//;s/ *$//
eeae7b41
DJ
3121s,\$,$$,g
3122EOF_SED
3123sed -f conftestsed <<EOF_SED > conftestsed.out
72a7ab82 3124 ${ac_configure_args}
b348267b 3125EOF_SED
eeae7b41
DJ
3126baseargs=`cat conftestsed.out`
3127rm -f conftestsed conftestsed.out
671aa708 3128
43bb47c2
DJ
3129# Add in --program-transform-name, after --program-prefix and
3130# --program-suffix have been applied to it. Autoconf has already
3131# doubled dollar signs and backslashes in program_transform_name; we want
3132# the backslashes un-doubled, and then the entire thing wrapped in single
72a7ab82 3133# quotes, because this will be expanded first by make and then by the shell.
43bb47c2
DJ
3134# Also, because we want to override the logic in subdir configure scripts to
3135# choose program_transform_name, replace any s,x,x, with s,y,y,.
3136sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
3137${program_transform_name}
3138EOF_SED
3139gcc_transform_name=`cat conftestsed.out`
3140rm -f conftestsed.out
3141baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
3142
671aa708
NN
3143# For the build-side libraries, we just need to pretend we're native,
3144# and not use the same cache file. Multilibs are neither needed nor
3145# desired.
556f03c4 3146build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
671aa708
NN
3147
3148# For host modules, accept cache file option, or specification as blank.
3149case "${cache_file}" in
3150"") # empty
3151 cache_file_option="" ;;
3152/* | [A-Za-z]:[\\/]* ) # absolute path
3153 cache_file_option="--cache-file=${cache_file}" ;;
3154*) # relative path
3155 cache_file_option="--cache-file=../${cache_file}" ;;
3156esac
3157
09438bde
NN
3158# Host dirs don't like to share a cache file either, horribly enough.
3159# This seems to be due to autoconf 2.5x stupidity.
2b6c260d 3160host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
671aa708
NN
3161
3162target_configargs=${baseargs}
3163
3164# Passing a --with-cross-host argument lets the target libraries know
3165# whether they are being built with a cross-compiler or being built
3166# native. However, it would be better to use other mechanisms to make the
3167# sorts of decisions they want to make on this basis. Please consider
3168# this option to be deprecated. FIXME.
3169if test x${is_cross_compiler} = xyes ; then
3170 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
3171fi
3172
3173# Default to --enable-multilib.
3174if test x${enable_multilib} = x ; then
3175 target_configargs="--enable-multilib ${target_configargs}"
3176fi
3177
3178# Pass --with-newlib if appropriate. Note that target_configdirs has
3179# changed from the earlier setting of with_newlib.
3180if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
3181 target_configargs="--with-newlib ${target_configargs}"
3182fi
3183
6b9eb62c
NN
3184# Different target subdirs use different values of certain variables
3185# (notably CXX). Worse, multilibs use *lots* of different values.
3186# Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
3187# it doesn't automatically accept command-line overrides of them.
3188# This means it's not safe for target subdirs to share a cache file,
3189# which is disgusting, but there you have it. Hopefully this can be
3190# fixed in future. It's still worthwhile to use a cache file for each
3191# directory. I think.
3192
bebcd931
MS
3193# Pass the appropriate --build, --host, --target and --cache-file arguments.
3194# We need to pass --target, as newer autoconf's requires consistency
3195# for target_alias and gcc doesn't manage it consistently.
3196target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
671aa708 3197
671aa708
NN
3198FLAGS_FOR_TARGET=
3199case " $target_configdirs " in
3200 *" newlib "*)
3201 case " $target_configargs " in
3202 *" --with-newlib "*)
3203 case "$target" in
3204 *-cygwin*)
aa8f1f57 3205 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' ;;
671aa708
NN
3206 esac
3207
3208 # If we're not building GCC, don't discard standard headers.
3209 if test -d ${srcdir}/gcc; then
3210 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
3211
3212 if test "${build}" != "${host}"; then
3213 # On Canadian crosses, CC_FOR_TARGET will have already been set
3214 # by `configure', so we won't have an opportunity to add -Bgcc/
3215 # to it. This is right: we don't want to search that directory
3216 # for binaries, but we want the header files in there, so add
3217 # them explicitly.
215c351a 3218 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/$(HOST_SUBDIR)/gcc/include'
671aa708
NN
3219
3220 # Someone might think of using the pre-installed headers on
3221 # Canadian crosses, in case the installed compiler is not fully
3222 # compatible with the compiler being built. In this case, it
3223 # would be better to flag an error than risking having
3224 # incompatible object files being constructed. We can't
3225 # guarantee that an error will be flagged, but let's hope the
3226 # compiler will do it, when presented with incompatible header
3227 # files.
3228 fi
3229 fi
3230
3231 case "${target}-${is_cross_compiler}" in
f2a0e225 3232 i[3456789]86-*-linux*-no)
671aa708
NN
3233 # Here host == target, so we don't need to build gcc,
3234 # so we don't want to discard standard headers.
3235 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
3236 ;;
3237 *)
3238 # If we're building newlib, use its generic headers last, but search
3239 # for any libc-related directories first (so make it the last -B
3240 # switch).
3241 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
3242 ;;
3243 esac
3244 ;;
3245 esac
3246 ;;
3247esac
3248
6691a79e
ME
3249# Allow the user to override the flags for
3250# our build compiler if desired.
3251CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3252
671aa708
NN
3253# On Canadian crosses, we'll be searching the right directories for
3254# the previously-installed cross compiler, so don't bother to add
3255# flags for directories within the install tree of the compiler
3256# being built; programs in there won't even run.
3257if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
3258 # Search for pre-installed headers if nothing else fits.
9124bc53 3259 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
671aa708
NN
3260fi
3261
3262if test "x${use_gnu_ld}" = x &&
3263 echo " ${configdirs} " | grep " ld " > /dev/null ; then
3264 # Arrange for us to find uninstalled linker scripts.
215c351a 3265 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
671aa708
NN
3266fi
3267
671aa708 3268# Makefile fragments.
7b61653a
PE
3269for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
3270do
3271 eval fragval=\$$frag
3272 if test $fragval != /dev/null; then
3273 eval $frag=${srcdir}/$fragval
3274 fi
3275done
671aa708
NN
3276
3277
3278
3279
3280
3281# Miscellanea: directories, flags, etc.
3282
3283
3284
3285
3286
3287
3288
ef9db8d5
DJ
3289
3290
23f6b2f9 3291# Build module lists & subconfigure args.
671aa708
NN
3292
3293
3294
2abefe3d
PB
3295# Host module lists & subconfigure args.
3296
3297
3298
3299# Target module lists & subconfigure args.
3300
3301
3302
3303# Build tools.
3304
3305
3306
3307# Generate default definitions for YACC, M4, LEX and other programs that run
3308# on the build machine. These are used if the Makefile can't locate these
3309# programs in objdir.
3310MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
3311
3312for ac_prog in 'bison -y' byacc yacc
3313do
3314# Extract the first word of "$ac_prog", so it can be a program name with args.
3315set dummy $ac_prog; ac_word=$2
3316echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3317echo "configure:3318: checking for $ac_word" >&5
2abefe3d
PB
3318if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3319 echo $ac_n "(cached) $ac_c" 1>&6
3320else
3321 if test -n "$YACC"; then
3322 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3323else
3324 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3325 ac_dummy="$PATH"
3326 for ac_dir in $ac_dummy; do
3327 test -z "$ac_dir" && ac_dir=.
3328 if test -f $ac_dir/$ac_word; then
3329 ac_cv_prog_YACC="$ac_prog"
3330 break
3331 fi
3332 done
3333 IFS="$ac_save_ifs"
3334fi
3335fi
3336YACC="$ac_cv_prog_YACC"
3337if test -n "$YACC"; then
3338 echo "$ac_t""$YACC" 1>&6
3339else
3340 echo "$ac_t""no" 1>&6
3341fi
3342
3343test -n "$YACC" && break
3344done
3345test -n "$YACC" || YACC="$MISSING bison -y"
3346
3347case " $build_configdirs " in
3348 *" bison "*) YACC='$$r/$(BUILD_SUBDIR)/bison/tests/bison -y' ;;
3349 *" byacc "*) YACC='$$r/$(BUILD_SUBDIR)/byacc/byacc' ;;
3350esac
3351
3352for ac_prog in bison
3353do
3354# Extract the first word of "$ac_prog", so it can be a program name with args.
3355set dummy $ac_prog; ac_word=$2
3356echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3357echo "configure:3358: checking for $ac_word" >&5
2abefe3d
PB
3358if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
3359 echo $ac_n "(cached) $ac_c" 1>&6
3360else
3361 if test -n "$BISON"; then
3362 ac_cv_prog_BISON="$BISON" # Let the user override the test.
3363else
3364 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3365 ac_dummy="$PATH"
3366 for ac_dir in $ac_dummy; do
3367 test -z "$ac_dir" && ac_dir=.
3368 if test -f $ac_dir/$ac_word; then
3369 ac_cv_prog_BISON="$ac_prog"
3370 break
3371 fi
3372 done
3373 IFS="$ac_save_ifs"
3374fi
3375fi
3376BISON="$ac_cv_prog_BISON"
3377if test -n "$BISON"; then
3378 echo "$ac_t""$BISON" 1>&6
3379else
3380 echo "$ac_t""no" 1>&6
3381fi
3382
3383test -n "$BISON" && break
3384done
3385test -n "$BISON" || BISON="$MISSING bison"
3386
3387case " $build_configdirs " in
3388 *" bison "*) BISON='$$r/$(BUILD_SUBDIR)/bison/tests/bison' ;;
3389esac
3390
3391for ac_prog in gm4 gnum4 m4
3392do
3393# Extract the first word of "$ac_prog", so it can be a program name with args.
3394set dummy $ac_prog; ac_word=$2
3395echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3396echo "configure:3397: checking for $ac_word" >&5
2abefe3d
PB
3397if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
3398 echo $ac_n "(cached) $ac_c" 1>&6
3399else
3400 if test -n "$M4"; then
3401 ac_cv_prog_M4="$M4" # Let the user override the test.
3402else
3403 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3404 ac_dummy="$PATH"
3405 for ac_dir in $ac_dummy; do
3406 test -z "$ac_dir" && ac_dir=.
3407 if test -f $ac_dir/$ac_word; then
3408 ac_cv_prog_M4="$ac_prog"
3409 break
3410 fi
3411 done
3412 IFS="$ac_save_ifs"
3413fi
3414fi
3415M4="$ac_cv_prog_M4"
3416if test -n "$M4"; then
3417 echo "$ac_t""$M4" 1>&6
3418else
3419 echo "$ac_t""no" 1>&6
3420fi
3421
3422test -n "$M4" && break
3423done
3424test -n "$M4" || M4="$MISSING m4"
3425
3426case " $build_configdirs " in
3427 *" m4 "*) M4='$$r/$(BUILD_SUBDIR)/m4/m4' ;;
3428esac
3429
3430for ac_prog in flex lex
3431do
3432# Extract the first word of "$ac_prog", so it can be a program name with args.
3433set dummy $ac_prog; ac_word=$2
3434echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3435echo "configure:3436: checking for $ac_word" >&5
2abefe3d
PB
3436if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
3437 echo $ac_n "(cached) $ac_c" 1>&6
3438else
3439 if test -n "$LEX"; then
3440 ac_cv_prog_LEX="$LEX" # Let the user override the test.
3441else
3442 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3443 ac_dummy="$PATH"
3444 for ac_dir in $ac_dummy; do
3445 test -z "$ac_dir" && ac_dir=.
3446 if test -f $ac_dir/$ac_word; then
3447 ac_cv_prog_LEX="$ac_prog"
3448 break
3449 fi
3450 done
3451 IFS="$ac_save_ifs"
3452fi
3453fi
3454LEX="$ac_cv_prog_LEX"
3455if test -n "$LEX"; then
3456 echo "$ac_t""$LEX" 1>&6
3457else
3458 echo "$ac_t""no" 1>&6
3459fi
3460
3461test -n "$LEX" && break
3462done
3463test -n "$LEX" || LEX="$MISSING flex"
3464
3465case " $build_configdirs " in
3466 *" flex "*) LEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3467 *" lex "*) LEX='$$r/$(BUILD_SUBDIR)/lex/lex' ;;
3468esac
3469
3470for ac_prog in flex
3471do
3472# Extract the first word of "$ac_prog", so it can be a program name with args.
3473set dummy $ac_prog; ac_word=$2
3474echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3475echo "configure:3476: checking for $ac_word" >&5
2abefe3d
PB
3476if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
3477 echo $ac_n "(cached) $ac_c" 1>&6
3478else
3479 if test -n "$FLEX"; then
3480 ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
3481else
3482 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3483 ac_dummy="$PATH"
3484 for ac_dir in $ac_dummy; do
3485 test -z "$ac_dir" && ac_dir=.
3486 if test -f $ac_dir/$ac_word; then
3487 ac_cv_prog_FLEX="$ac_prog"
3488 break
3489 fi
3490 done
3491 IFS="$ac_save_ifs"
3492fi
3493fi
3494FLEX="$ac_cv_prog_FLEX"
3495if test -n "$FLEX"; then
3496 echo "$ac_t""$FLEX" 1>&6
3497else
3498 echo "$ac_t""no" 1>&6
3499fi
3500
3501test -n "$FLEX" && break
3502done
3503test -n "$FLEX" || FLEX="$MISSING flex"
3504
3505case " $build_configdirs " in
3506 *" flex "*) FLEX='$$r/$(BUILD_SUBDIR)/flex/flex' ;;
3507esac
3508
3509for ac_prog in makeinfo
3510do
3511# Extract the first word of "$ac_prog", so it can be a program name with args.
3512set dummy $ac_prog; ac_word=$2
3513echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3514echo "configure:3515: checking for $ac_word" >&5
2abefe3d
PB
3515if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3516 echo $ac_n "(cached) $ac_c" 1>&6
3517else
3518 if test -n "$MAKEINFO"; then
3519 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3520else
3521 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3522 ac_dummy="$PATH"
3523 for ac_dir in $ac_dummy; do
3524 test -z "$ac_dir" && ac_dir=.
3525 if test -f $ac_dir/$ac_word; then
3526 ac_cv_prog_MAKEINFO="$ac_prog"
3527 break
3528 fi
3529 done
3530 IFS="$ac_save_ifs"
3531fi
3532fi
3533MAKEINFO="$ac_cv_prog_MAKEINFO"
3534if test -n "$MAKEINFO"; then
3535 echo "$ac_t""$MAKEINFO" 1>&6
3536else
3537 echo "$ac_t""no" 1>&6
3538fi
3539
3540test -n "$MAKEINFO" && break
3541done
3542test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
3543
3544case " $build_configdirs " in
3545 *" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
3546 *)
3547
3548 # For an installed makeinfo, we require it to be from texinfo 4.2 or
3549 # higher, else we use the "missing" dummy.
3550 if ${MAKEINFO} --version \
3551 | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
3552 :
3553 else
3554 MAKEINFO="$MISSING makeinfo"
3555 fi
3556 ;;
3557
3558esac
671aa708 3559
2abefe3d 3560# FIXME: expect and dejagnu may become build tools?
671aa708 3561
2abefe3d
PB
3562for ac_prog in expect
3563do
3564# Extract the first word of "$ac_prog", so it can be a program name with args.
3565set dummy $ac_prog; ac_word=$2
3566echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3567echo "configure:3568: checking for $ac_word" >&5
2abefe3d
PB
3568if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
3569 echo $ac_n "(cached) $ac_c" 1>&6
3570else
3571 if test -n "$EXPECT"; then
3572 ac_cv_prog_EXPECT="$EXPECT" # Let the user override the test.
3573else
3574 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3575 ac_dummy="$PATH"
3576 for ac_dir in $ac_dummy; do
3577 test -z "$ac_dir" && ac_dir=.
3578 if test -f $ac_dir/$ac_word; then
3579 ac_cv_prog_EXPECT="$ac_prog"
3580 break
3581 fi
3582 done
3583 IFS="$ac_save_ifs"
3584fi
3585fi
3586EXPECT="$ac_cv_prog_EXPECT"
3587if test -n "$EXPECT"; then
3588 echo "$ac_t""$EXPECT" 1>&6
3589else
3590 echo "$ac_t""no" 1>&6
3591fi
671aa708 3592
2abefe3d
PB
3593test -n "$EXPECT" && break
3594done
3595test -n "$EXPECT" || EXPECT="expect"
671aa708 3596
2abefe3d
PB
3597case " $configdirs " in
3598 *" expect "*)
3599 test $host = $build && EXPECT='$$r/$(HOST_SUBDIR)/expect/expect'
3600 ;;
3601esac
671aa708 3602
2abefe3d
PB
3603for ac_prog in runtest
3604do
3605# Extract the first word of "$ac_prog", so it can be a program name with args.
3606set dummy $ac_prog; ac_word=$2
3607echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3608echo "configure:3609: checking for $ac_word" >&5
2abefe3d
PB
3609if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
3610 echo $ac_n "(cached) $ac_c" 1>&6
3611else
3612 if test -n "$RUNTEST"; then
3613 ac_cv_prog_RUNTEST="$RUNTEST" # Let the user override the test.
3614else
3615 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3616 ac_dummy="$PATH"
3617 for ac_dir in $ac_dummy; do
3618 test -z "$ac_dir" && ac_dir=.
3619 if test -f $ac_dir/$ac_word; then
3620 ac_cv_prog_RUNTEST="$ac_prog"
3621 break
3622 fi
3623 done
3624 IFS="$ac_save_ifs"
3625fi
3626fi
3627RUNTEST="$ac_cv_prog_RUNTEST"
3628if test -n "$RUNTEST"; then
3629 echo "$ac_t""$RUNTEST" 1>&6
3630else
3631 echo "$ac_t""no" 1>&6
3632fi
671aa708 3633
2abefe3d
PB
3634test -n "$RUNTEST" && break
3635done
3636test -n "$RUNTEST" || RUNTEST="runtest"
671aa708 3637
2abefe3d
PB
3638case " $configdirs " in
3639 *" dejagnu "*)
3640 test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
3641 ;;
3642esac
671aa708
NN
3643
3644
671aa708 3645# Host tools.
ca9f4b81
AO
3646ncn_tool_prefix=
3647test -n "$host_alias" && ncn_tool_prefix=$host_alias-
3648ncn_target_tool_prefix=
3649test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
3650
2693c0b0
PB
3651 for ncn_progname in ar; do
3652 if test -n "$ncn_tool_prefix"; then
3653 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3654set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 3655echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3656echo "configure:3657: checking for $ac_word" >&5
72a7ab82
AP
3657if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3658 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3659else
3660 if test -n "$AR"; then
3661 ac_cv_prog_AR="$AR" # Let the user override the test.
3662else
72a7ab82
AP
3663 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3664 ac_dummy="$PATH"
3665 for ac_dir in $ac_dummy; do
3666 test -z "$ac_dir" && ac_dir=.
3667 if test -f $ac_dir/$ac_word; then
3668 ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
3669 break
3670 fi
3671 done
3672 IFS="$ac_save_ifs"
ca9f4b81
AO
3673fi
3674fi
72a7ab82 3675AR="$ac_cv_prog_AR"
ca9f4b81 3676if test -n "$AR"; then
72a7ab82 3677 echo "$ac_t""$AR" 1>&6
ca9f4b81 3678else
72a7ab82 3679 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3680fi
3681
2693c0b0
PB
3682 fi
3683 if test -z "$ac_cv_prog_AR" && test $build = $host ; then
3684 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3685set dummy ${ncn_progname}; ac_word=$2
72a7ab82 3686echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3687echo "configure:3688: checking for $ac_word" >&5
72a7ab82
AP
3688if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3689 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3690else
2693c0b0
PB
3691 if test -n "$AR"; then
3692 ac_cv_prog_AR="$AR" # Let the user override the test.
ca9f4b81 3693else
72a7ab82
AP
3694 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3695 ac_dummy="$PATH"
3696 for ac_dir in $ac_dummy; do
3697 test -z "$ac_dir" && ac_dir=.
3698 if test -f $ac_dir/$ac_word; then
3699 ac_cv_prog_AR="${ncn_progname}"
3700 break
3701 fi
3702 done
3703 IFS="$ac_save_ifs"
ca9f4b81
AO
3704fi
3705fi
72a7ab82 3706AR="$ac_cv_prog_AR"
2693c0b0 3707if test -n "$AR"; then
72a7ab82 3708 echo "$ac_t""$AR" 1>&6
ca9f4b81 3709else
72a7ab82 3710 echo "$ac_t""no" 1>&6
ca9f4b81 3711fi
72a7ab82 3712
2693c0b0
PB
3713 fi
3714 test -n "$ac_cv_prog_AR" && break
3715done
3716
3717if test -z "$ac_cv_prog_AR" ; then
3718 set dummy ar
3719 if test $build = $host ; then
3720 AR="$2"
ca9f4b81 3721 else
2693c0b0 3722 AR="${ncn_tool_prefix}$2"
ca9f4b81 3723 fi
ca9f4b81
AO
3724fi
3725
2693c0b0
PB
3726 for ncn_progname in as; do
3727 if test -n "$ncn_tool_prefix"; then
3728 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3729set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 3730echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3731echo "configure:3732: checking for $ac_word" >&5
72a7ab82
AP
3732if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3733 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3734else
3735 if test -n "$AS"; then
3736 ac_cv_prog_AS="$AS" # Let the user override the test.
3737else
72a7ab82
AP
3738 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3739 ac_dummy="$PATH"
3740 for ac_dir in $ac_dummy; do
3741 test -z "$ac_dir" && ac_dir=.
3742 if test -f $ac_dir/$ac_word; then
3743 ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
3744 break
3745 fi
3746 done
3747 IFS="$ac_save_ifs"
ca9f4b81
AO
3748fi
3749fi
72a7ab82 3750AS="$ac_cv_prog_AS"
ca9f4b81 3751if test -n "$AS"; then
72a7ab82 3752 echo "$ac_t""$AS" 1>&6
ca9f4b81 3753else
72a7ab82 3754 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3755fi
3756
2693c0b0
PB
3757 fi
3758 if test -z "$ac_cv_prog_AS" && test $build = $host ; then
3759 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3760set dummy ${ncn_progname}; ac_word=$2
72a7ab82 3761echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3762echo "configure:3763: checking for $ac_word" >&5
72a7ab82
AP
3763if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3764 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3765else
2693c0b0
PB
3766 if test -n "$AS"; then
3767 ac_cv_prog_AS="$AS" # Let the user override the test.
ca9f4b81 3768else
72a7ab82
AP
3769 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3770 ac_dummy="$PATH"
3771 for ac_dir in $ac_dummy; do
3772 test -z "$ac_dir" && ac_dir=.
3773 if test -f $ac_dir/$ac_word; then
3774 ac_cv_prog_AS="${ncn_progname}"
3775 break
3776 fi
3777 done
3778 IFS="$ac_save_ifs"
ca9f4b81
AO
3779fi
3780fi
72a7ab82 3781AS="$ac_cv_prog_AS"
2693c0b0 3782if test -n "$AS"; then
72a7ab82 3783 echo "$ac_t""$AS" 1>&6
ca9f4b81 3784else
72a7ab82 3785 echo "$ac_t""no" 1>&6
ca9f4b81 3786fi
72a7ab82 3787
2693c0b0
PB
3788 fi
3789 test -n "$ac_cv_prog_AS" && break
3790done
3791
3792if test -z "$ac_cv_prog_AS" ; then
3793 set dummy as
3794 if test $build = $host ; then
3795 AS="$2"
ca9f4b81 3796 else
2693c0b0 3797 AS="${ncn_tool_prefix}$2"
ca9f4b81 3798 fi
ca9f4b81
AO
3799fi
3800
2693c0b0
PB
3801 for ncn_progname in dlltool; do
3802 if test -n "$ncn_tool_prefix"; then
3803 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3804set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 3805echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3806echo "configure:3807: checking for $ac_word" >&5
72a7ab82
AP
3807if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3808 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3809else
3810 if test -n "$DLLTOOL"; then
3811 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3812else
72a7ab82
AP
3813 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3814 ac_dummy="$PATH"
3815 for ac_dir in $ac_dummy; do
3816 test -z "$ac_dir" && ac_dir=.
3817 if test -f $ac_dir/$ac_word; then
3818 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
3819 break
3820 fi
3821 done
3822 IFS="$ac_save_ifs"
ca9f4b81
AO
3823fi
3824fi
72a7ab82 3825DLLTOOL="$ac_cv_prog_DLLTOOL"
ca9f4b81 3826if test -n "$DLLTOOL"; then
72a7ab82 3827 echo "$ac_t""$DLLTOOL" 1>&6
ca9f4b81 3828else
72a7ab82 3829 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3830fi
3831
2693c0b0
PB
3832 fi
3833 if test -z "$ac_cv_prog_DLLTOOL" && test $build = $host ; then
3834 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3835set dummy ${ncn_progname}; ac_word=$2
72a7ab82 3836echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3837echo "configure:3838: checking for $ac_word" >&5
72a7ab82
AP
3838if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3839 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3840else
2693c0b0
PB
3841 if test -n "$DLLTOOL"; then
3842 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
ca9f4b81 3843else
72a7ab82
AP
3844 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3845 ac_dummy="$PATH"
3846 for ac_dir in $ac_dummy; do
3847 test -z "$ac_dir" && ac_dir=.
3848 if test -f $ac_dir/$ac_word; then
3849 ac_cv_prog_DLLTOOL="${ncn_progname}"
3850 break
3851 fi
3852 done
3853 IFS="$ac_save_ifs"
ca9f4b81
AO
3854fi
3855fi
72a7ab82 3856DLLTOOL="$ac_cv_prog_DLLTOOL"
2693c0b0 3857if test -n "$DLLTOOL"; then
72a7ab82 3858 echo "$ac_t""$DLLTOOL" 1>&6
ca9f4b81 3859else
72a7ab82 3860 echo "$ac_t""no" 1>&6
ca9f4b81 3861fi
72a7ab82 3862
2693c0b0
PB
3863 fi
3864 test -n "$ac_cv_prog_DLLTOOL" && break
3865done
3866
3867if test -z "$ac_cv_prog_DLLTOOL" ; then
3868 set dummy dlltool
3869 if test $build = $host ; then
3870 DLLTOOL="$2"
ca9f4b81 3871 else
2693c0b0 3872 DLLTOOL="${ncn_tool_prefix}$2"
ca9f4b81 3873 fi
ca9f4b81
AO
3874fi
3875
2693c0b0
PB
3876 for ncn_progname in ld; do
3877 if test -n "$ncn_tool_prefix"; then
3878 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3879set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 3880echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3881echo "configure:3882: checking for $ac_word" >&5
72a7ab82
AP
3882if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
3883 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
3884else
3885 if test -n "$LD"; then
3886 ac_cv_prog_LD="$LD" # Let the user override the test.
3887else
72a7ab82
AP
3888 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3889 ac_dummy="$PATH"
3890 for ac_dir in $ac_dummy; do
3891 test -z "$ac_dir" && ac_dir=.
3892 if test -f $ac_dir/$ac_word; then
3893 ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
3894 break
3895 fi
3896 done
3897 IFS="$ac_save_ifs"
ca9f4b81
AO
3898fi
3899fi
72a7ab82 3900LD="$ac_cv_prog_LD"
ca9f4b81 3901if test -n "$LD"; then
72a7ab82 3902 echo "$ac_t""$LD" 1>&6
ca9f4b81 3903else
72a7ab82 3904 echo "$ac_t""no" 1>&6
ca9f4b81
AO
3905fi
3906
2693c0b0
PB
3907 fi
3908 if test -z "$ac_cv_prog_LD" && test $build = $host ; then
3909 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3910set dummy ${ncn_progname}; ac_word=$2
72a7ab82 3911echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3912echo "configure:3913: checking for $ac_word" >&5
72a7ab82
AP
3913if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
3914 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 3915else
2693c0b0
PB
3916 if test -n "$LD"; then
3917 ac_cv_prog_LD="$LD" # Let the user override the test.
6b65a26d 3918else
72a7ab82
AP
3919 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3920 ac_dummy="$PATH"
3921 for ac_dir in $ac_dummy; do
3922 test -z "$ac_dir" && ac_dir=.
3923 if test -f $ac_dir/$ac_word; then
3924 ac_cv_prog_LD="${ncn_progname}"
3925 break
3926 fi
3927 done
3928 IFS="$ac_save_ifs"
ca9f4b81
AO
3929fi
3930fi
72a7ab82 3931LD="$ac_cv_prog_LD"
2693c0b0 3932if test -n "$LD"; then
72a7ab82 3933 echo "$ac_t""$LD" 1>&6
ca9f4b81 3934else
72a7ab82 3935 echo "$ac_t""no" 1>&6
ca9f4b81 3936fi
72a7ab82 3937
2693c0b0
PB
3938 fi
3939 test -n "$ac_cv_prog_LD" && break
3940done
3941
3942if test -z "$ac_cv_prog_LD" ; then
3943 set dummy ld
3944 if test $build = $host ; then
3945 LD="$2"
ca9f4b81 3946 else
2693c0b0 3947 LD="${ncn_tool_prefix}$2"
ca9f4b81 3948 fi
ca9f4b81
AO
3949fi
3950
2abefe3d
PB
3951 for ncn_progname in lipo; do
3952 if test -n "$ncn_tool_prefix"; then
3953 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
3954set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
3955echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3956echo "configure:3957: checking for $ac_word" >&5
2abefe3d
PB
3957if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
3958 echo $ac_n "(cached) $ac_c" 1>&6
3959else
3960 if test -n "$LIPO"; then
3961 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
3962else
3963 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3964 ac_dummy="$PATH"
3965 for ac_dir in $ac_dummy; do
3966 test -z "$ac_dir" && ac_dir=.
3967 if test -f $ac_dir/$ac_word; then
3968 ac_cv_prog_LIPO="${ncn_tool_prefix}${ncn_progname}"
3969 break
3970 fi
3971 done
3972 IFS="$ac_save_ifs"
3973fi
3974fi
3975LIPO="$ac_cv_prog_LIPO"
3976if test -n "$LIPO"; then
3977 echo "$ac_t""$LIPO" 1>&6
3978else
3979 echo "$ac_t""no" 1>&6
3980fi
3981
3982 fi
3983 if test -z "$ac_cv_prog_LIPO" && test $build = $host ; then
3984 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
3985set dummy ${ncn_progname}; ac_word=$2
3986echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 3987echo "configure:3988: checking for $ac_word" >&5
2abefe3d
PB
3988if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
3989 echo $ac_n "(cached) $ac_c" 1>&6
3990else
3991 if test -n "$LIPO"; then
3992 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
3993else
3994 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3995 ac_dummy="$PATH"
3996 for ac_dir in $ac_dummy; do
3997 test -z "$ac_dir" && ac_dir=.
3998 if test -f $ac_dir/$ac_word; then
3999 ac_cv_prog_LIPO="${ncn_progname}"
4000 break
4001 fi
4002 done
4003 IFS="$ac_save_ifs"
4004fi
4005fi
4006LIPO="$ac_cv_prog_LIPO"
4007if test -n "$LIPO"; then
4008 echo "$ac_t""$LIPO" 1>&6
4009else
4010 echo "$ac_t""no" 1>&6
4011fi
4012
4013 fi
4014 test -n "$ac_cv_prog_LIPO" && break
4015done
4016
4017if test -z "$ac_cv_prog_LIPO" ; then
4018 set dummy lipo
4019 if test $build = $host ; then
4020 LIPO="$2"
4021 else
4022 LIPO="${ncn_tool_prefix}$2"
4023 fi
4024fi
4025
2693c0b0
PB
4026 for ncn_progname in nm; do
4027 if test -n "$ncn_tool_prefix"; then
4028 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4029set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4030echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4031echo "configure:4032: checking for $ac_word" >&5
72a7ab82
AP
4032if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4033 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4034else
4035 if test -n "$NM"; then
4036 ac_cv_prog_NM="$NM" # Let the user override the test.
4037else
72a7ab82
AP
4038 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4039 ac_dummy="$PATH"
4040 for ac_dir in $ac_dummy; do
4041 test -z "$ac_dir" && ac_dir=.
4042 if test -f $ac_dir/$ac_word; then
4043 ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
4044 break
4045 fi
4046 done
4047 IFS="$ac_save_ifs"
ca9f4b81
AO
4048fi
4049fi
72a7ab82 4050NM="$ac_cv_prog_NM"
ca9f4b81 4051if test -n "$NM"; then
72a7ab82 4052 echo "$ac_t""$NM" 1>&6
ca9f4b81 4053else
72a7ab82 4054 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4055fi
4056
2693c0b0
PB
4057 fi
4058 if test -z "$ac_cv_prog_NM" && test $build = $host ; then
4059 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4060set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4061echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4062echo "configure:4063: checking for $ac_word" >&5
72a7ab82
AP
4063if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
4064 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4065else
2693c0b0
PB
4066 if test -n "$NM"; then
4067 ac_cv_prog_NM="$NM" # Let the user override the test.
ca9f4b81 4068else
72a7ab82
AP
4069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4070 ac_dummy="$PATH"
4071 for ac_dir in $ac_dummy; do
4072 test -z "$ac_dir" && ac_dir=.
4073 if test -f $ac_dir/$ac_word; then
4074 ac_cv_prog_NM="${ncn_progname}"
4075 break
4076 fi
4077 done
4078 IFS="$ac_save_ifs"
ca9f4b81
AO
4079fi
4080fi
72a7ab82 4081NM="$ac_cv_prog_NM"
2693c0b0 4082if test -n "$NM"; then
72a7ab82 4083 echo "$ac_t""$NM" 1>&6
ca9f4b81 4084else
72a7ab82 4085 echo "$ac_t""no" 1>&6
ca9f4b81 4086fi
72a7ab82 4087
2693c0b0
PB
4088 fi
4089 test -n "$ac_cv_prog_NM" && break
4090done
4091
4092if test -z "$ac_cv_prog_NM" ; then
4093 set dummy nm
4094 if test $build = $host ; then
4095 NM="$2"
ca9f4b81 4096 else
2693c0b0 4097 NM="${ncn_tool_prefix}$2"
ca9f4b81 4098 fi
ca9f4b81
AO
4099fi
4100
2693c0b0
PB
4101 for ncn_progname in ranlib; do
4102 if test -n "$ncn_tool_prefix"; then
4103 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4104set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4105echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4106echo "configure:4107: checking for $ac_word" >&5
72a7ab82
AP
4107if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4108 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4109else
4110 if test -n "$RANLIB"; then
4111 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4112else
72a7ab82
AP
4113 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4114 ac_dummy="$PATH"
4115 for ac_dir in $ac_dummy; do
4116 test -z "$ac_dir" && ac_dir=.
4117 if test -f $ac_dir/$ac_word; then
4118 ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
4119 break
4120 fi
4121 done
4122 IFS="$ac_save_ifs"
ca9f4b81
AO
4123fi
4124fi
72a7ab82 4125RANLIB="$ac_cv_prog_RANLIB"
ca9f4b81 4126if test -n "$RANLIB"; then
72a7ab82 4127 echo "$ac_t""$RANLIB" 1>&6
ca9f4b81 4128else
72a7ab82 4129 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4130fi
4131
2693c0b0
PB
4132 fi
4133 if test -z "$ac_cv_prog_RANLIB" && test $build = $host ; then
4134 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4135set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4136echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4137echo "configure:4138: checking for $ac_word" >&5
72a7ab82
AP
4138if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4139 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4140else
2693c0b0
PB
4141 if test -n "$RANLIB"; then
4142 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
ca9f4b81 4143else
72a7ab82
AP
4144 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4145 ac_dummy="$PATH"
4146 for ac_dir in $ac_dummy; do
4147 test -z "$ac_dir" && ac_dir=.
4148 if test -f $ac_dir/$ac_word; then
4149 ac_cv_prog_RANLIB="${ncn_progname}"
4150 break
4151 fi
4152 done
4153 IFS="$ac_save_ifs"
ca9f4b81
AO
4154fi
4155fi
72a7ab82 4156RANLIB="$ac_cv_prog_RANLIB"
2693c0b0 4157if test -n "$RANLIB"; then
72a7ab82 4158 echo "$ac_t""$RANLIB" 1>&6
ca9f4b81 4159else
72a7ab82 4160 echo "$ac_t""no" 1>&6
ca9f4b81 4161fi
72a7ab82 4162
ca9f4b81 4163 fi
2693c0b0
PB
4164 test -n "$ac_cv_prog_RANLIB" && break
4165done
4166
4167if test -z "$ac_cv_prog_RANLIB" ; then
4168 RANLIB=":"
ca9f4b81
AO
4169fi
4170
2abefe3d
PB
4171 for ncn_progname in strip; do
4172 if test -n "$ncn_tool_prefix"; then
4173 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4174set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
4175echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4176echo "configure:4177: checking for $ac_word" >&5
2abefe3d
PB
4177if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4178 echo $ac_n "(cached) $ac_c" 1>&6
4179else
4180 if test -n "$STRIP"; then
4181 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4182else
4183 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4184 ac_dummy="$PATH"
4185 for ac_dir in $ac_dummy; do
4186 test -z "$ac_dir" && ac_dir=.
4187 if test -f $ac_dir/$ac_word; then
4188 ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
4189 break
4190 fi
4191 done
4192 IFS="$ac_save_ifs"
4193fi
4194fi
4195STRIP="$ac_cv_prog_STRIP"
4196if test -n "$STRIP"; then
4197 echo "$ac_t""$STRIP" 1>&6
4198else
4199 echo "$ac_t""no" 1>&6
4200fi
4201
4202 fi
4203 if test -z "$ac_cv_prog_STRIP" && test $build = $host ; then
4204 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4205set dummy ${ncn_progname}; ac_word=$2
4206echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4207echo "configure:4208: checking for $ac_word" >&5
2abefe3d
PB
4208if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
4209 echo $ac_n "(cached) $ac_c" 1>&6
4210else
4211 if test -n "$STRIP"; then
4212 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4213else
4214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4215 ac_dummy="$PATH"
4216 for ac_dir in $ac_dummy; do
4217 test -z "$ac_dir" && ac_dir=.
4218 if test -f $ac_dir/$ac_word; then
4219 ac_cv_prog_STRIP="${ncn_progname}"
4220 break
4221 fi
4222 done
4223 IFS="$ac_save_ifs"
4224fi
4225fi
4226STRIP="$ac_cv_prog_STRIP"
4227if test -n "$STRIP"; then
4228 echo "$ac_t""$STRIP" 1>&6
4229else
4230 echo "$ac_t""no" 1>&6
4231fi
4232
4233 fi
4234 test -n "$ac_cv_prog_STRIP" && break
4235done
4236
4237if test -z "$ac_cv_prog_STRIP" ; then
4238 STRIP=":"
4239fi
4240
2693c0b0
PB
4241 for ncn_progname in windres; do
4242 if test -n "$ncn_tool_prefix"; then
4243 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4244set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4245echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4246echo "configure:4247: checking for $ac_word" >&5
72a7ab82
AP
4247if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4248 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4249else
4250 if test -n "$WINDRES"; then
4251 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
4252else
72a7ab82
AP
4253 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4254 ac_dummy="$PATH"
4255 for ac_dir in $ac_dummy; do
4256 test -z "$ac_dir" && ac_dir=.
4257 if test -f $ac_dir/$ac_word; then
4258 ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
4259 break
4260 fi
4261 done
4262 IFS="$ac_save_ifs"
ca9f4b81
AO
4263fi
4264fi
72a7ab82 4265WINDRES="$ac_cv_prog_WINDRES"
ca9f4b81 4266if test -n "$WINDRES"; then
72a7ab82 4267 echo "$ac_t""$WINDRES" 1>&6
ca9f4b81 4268else
72a7ab82 4269 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4270fi
4271
2693c0b0
PB
4272 fi
4273 if test -z "$ac_cv_prog_WINDRES" && test $build = $host ; then
4274 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4275set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4276echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4277echo "configure:4278: checking for $ac_word" >&5
72a7ab82
AP
4278if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
4279 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4280else
2693c0b0
PB
4281 if test -n "$WINDRES"; then
4282 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
ca9f4b81 4283else
72a7ab82
AP
4284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4285 ac_dummy="$PATH"
4286 for ac_dir in $ac_dummy; do
4287 test -z "$ac_dir" && ac_dir=.
4288 if test -f $ac_dir/$ac_word; then
4289 ac_cv_prog_WINDRES="${ncn_progname}"
4290 break
4291 fi
4292 done
4293 IFS="$ac_save_ifs"
ca9f4b81
AO
4294fi
4295fi
72a7ab82 4296WINDRES="$ac_cv_prog_WINDRES"
2693c0b0 4297if test -n "$WINDRES"; then
72a7ab82 4298 echo "$ac_t""$WINDRES" 1>&6
ca9f4b81 4299else
72a7ab82 4300 echo "$ac_t""no" 1>&6
ca9f4b81 4301fi
72a7ab82 4302
2693c0b0
PB
4303 fi
4304 test -n "$ac_cv_prog_WINDRES" && break
4305done
4306
4307if test -z "$ac_cv_prog_WINDRES" ; then
4308 set dummy windres
4309 if test $build = $host ; then
4310 WINDRES="$2"
ca9f4b81 4311 else
2693c0b0 4312 WINDRES="${ncn_tool_prefix}$2"
ca9f4b81 4313 fi
ca9f4b81
AO
4314fi
4315
2693c0b0
PB
4316 for ncn_progname in objcopy; do
4317 if test -n "$ncn_tool_prefix"; then
4318 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4319set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4320echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4321echo "configure:4322: checking for $ac_word" >&5
72a7ab82
AP
4322if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4323 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4324else
4325 if test -n "$OBJCOPY"; then
4326 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
4327else
72a7ab82
AP
4328 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4329 ac_dummy="$PATH"
4330 for ac_dir in $ac_dummy; do
4331 test -z "$ac_dir" && ac_dir=.
4332 if test -f $ac_dir/$ac_word; then
4333 ac_cv_prog_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
4334 break
4335 fi
4336 done
4337 IFS="$ac_save_ifs"
ca9f4b81
AO
4338fi
4339fi
72a7ab82 4340OBJCOPY="$ac_cv_prog_OBJCOPY"
ca9f4b81 4341if test -n "$OBJCOPY"; then
72a7ab82 4342 echo "$ac_t""$OBJCOPY" 1>&6
ca9f4b81 4343else
72a7ab82 4344 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4345fi
4346
2693c0b0
PB
4347 fi
4348 if test -z "$ac_cv_prog_OBJCOPY" && test $build = $host ; then
4349 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4350set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4351echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4352echo "configure:4353: checking for $ac_word" >&5
72a7ab82
AP
4353if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
4354 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4355else
2693c0b0
PB
4356 if test -n "$OBJCOPY"; then
4357 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
ca9f4b81 4358else
72a7ab82
AP
4359 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4360 ac_dummy="$PATH"
4361 for ac_dir in $ac_dummy; do
4362 test -z "$ac_dir" && ac_dir=.
4363 if test -f $ac_dir/$ac_word; then
4364 ac_cv_prog_OBJCOPY="${ncn_progname}"
4365 break
4366 fi
4367 done
4368 IFS="$ac_save_ifs"
ca9f4b81
AO
4369fi
4370fi
72a7ab82 4371OBJCOPY="$ac_cv_prog_OBJCOPY"
2693c0b0 4372if test -n "$OBJCOPY"; then
72a7ab82 4373 echo "$ac_t""$OBJCOPY" 1>&6
ca9f4b81 4374else
72a7ab82 4375 echo "$ac_t""no" 1>&6
ca9f4b81 4376fi
72a7ab82 4377
2693c0b0
PB
4378 fi
4379 test -n "$ac_cv_prog_OBJCOPY" && break
4380done
4381
4382if test -z "$ac_cv_prog_OBJCOPY" ; then
4383 set dummy objcopy
4384 if test $build = $host ; then
4385 OBJCOPY="$2"
ca9f4b81 4386 else
2693c0b0 4387 OBJCOPY="${ncn_tool_prefix}$2"
ca9f4b81 4388 fi
ca9f4b81
AO
4389fi
4390
2693c0b0
PB
4391 for ncn_progname in objdump; do
4392 if test -n "$ncn_tool_prefix"; then
4393 # Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
4394set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4395echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4396echo "configure:4397: checking for $ac_word" >&5
72a7ab82
AP
4397if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4398 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81
AO
4399else
4400 if test -n "$OBJDUMP"; then
4401 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4402else
72a7ab82
AP
4403 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4404 ac_dummy="$PATH"
4405 for ac_dir in $ac_dummy; do
4406 test -z "$ac_dir" && ac_dir=.
4407 if test -f $ac_dir/$ac_word; then
4408 ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
4409 break
4410 fi
4411 done
4412 IFS="$ac_save_ifs"
ca9f4b81
AO
4413fi
4414fi
72a7ab82 4415OBJDUMP="$ac_cv_prog_OBJDUMP"
ca9f4b81 4416if test -n "$OBJDUMP"; then
72a7ab82 4417 echo "$ac_t""$OBJDUMP" 1>&6
ca9f4b81 4418else
72a7ab82 4419 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4420fi
4421
2693c0b0
PB
4422 fi
4423 if test -z "$ac_cv_prog_OBJDUMP" && test $build = $host ; then
4424 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4425set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4426echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4427echo "configure:4428: checking for $ac_word" >&5
72a7ab82
AP
4428if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4429 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4430else
2693c0b0
PB
4431 if test -n "$OBJDUMP"; then
4432 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
ca9f4b81 4433else
72a7ab82
AP
4434 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4435 ac_dummy="$PATH"
4436 for ac_dir in $ac_dummy; do
4437 test -z "$ac_dir" && ac_dir=.
4438 if test -f $ac_dir/$ac_word; then
4439 ac_cv_prog_OBJDUMP="${ncn_progname}"
4440 break
4441 fi
4442 done
4443 IFS="$ac_save_ifs"
ca9f4b81
AO
4444fi
4445fi
72a7ab82 4446OBJDUMP="$ac_cv_prog_OBJDUMP"
2693c0b0 4447if test -n "$OBJDUMP"; then
72a7ab82 4448 echo "$ac_t""$OBJDUMP" 1>&6
ca9f4b81 4449else
72a7ab82 4450 echo "$ac_t""no" 1>&6
ca9f4b81 4451fi
72a7ab82 4452
2693c0b0
PB
4453 fi
4454 test -n "$ac_cv_prog_OBJDUMP" && break
4455done
4456
4457if test -z "$ac_cv_prog_OBJDUMP" ; then
4458 set dummy objdump
4459 if test $build = $host ; then
4460 OBJDUMP="$2"
ca9f4b81 4461 else
2693c0b0 4462 OBJDUMP="${ncn_tool_prefix}$2"
ca9f4b81 4463 fi
ca9f4b81
AO
4464fi
4465
671aa708
NN
4466
4467
4468
4469
4470
4471
2abefe3d 4472# Target tools.
2693c0b0
PB
4473 for ncn_progname in ar; do
4474 if test -n "$ncn_target_tool_prefix"; then
4475 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4476set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4477echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4478echo "configure:4479: checking for $ac_word" >&5
72a7ab82
AP
4479if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
4480 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4481else
4de997d1
PB
4482 if test -n "$AR_FOR_TARGET"; then
4483 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
ca9f4b81 4484else
72a7ab82
AP
4485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4486 ac_dummy="$PATH"
4487 for ac_dir in $ac_dummy; do
4488 test -z "$ac_dir" && ac_dir=.
4489 if test -f $ac_dir/$ac_word; then
4490 ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4491 break
4492 fi
4493 done
4494 IFS="$ac_save_ifs"
ca9f4b81
AO
4495fi
4496fi
72a7ab82 4497AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
4de997d1 4498if test -n "$AR_FOR_TARGET"; then
72a7ab82 4499 echo "$ac_t""$AR_FOR_TARGET" 1>&6
ca9f4b81 4500else
72a7ab82 4501 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4502fi
4503
2693c0b0
PB
4504 fi
4505 if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then
4506 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4507set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4508echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4509echo "configure:4510: checking for $ac_word" >&5
72a7ab82
AP
4510if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
4511 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4512else
2693c0b0
PB
4513 if test -n "$AR_FOR_TARGET"; then
4514 ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
ca9f4b81 4515else
72a7ab82
AP
4516 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4517 ac_dummy="$PATH"
4518 for ac_dir in $ac_dummy; do
4519 test -z "$ac_dir" && ac_dir=.
4520 if test -f $ac_dir/$ac_word; then
4521 ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
4522 break
4523 fi
4524 done
4525 IFS="$ac_save_ifs"
ca9f4b81
AO
4526fi
4527fi
72a7ab82 4528AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
2693c0b0 4529if test -n "$AR_FOR_TARGET"; then
72a7ab82 4530 echo "$ac_t""$AR_FOR_TARGET" 1>&6
ca9f4b81 4531else
72a7ab82 4532 echo "$ac_t""no" 1>&6
ca9f4b81 4533fi
72a7ab82 4534
2693c0b0
PB
4535 fi
4536 test -n "$ac_cv_prog_AR_FOR_TARGET" && break
4537done
4538
4539if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
4540 set dummy ar
4541 if test $build = $target ; then
4542 AR_FOR_TARGET="$2"
ca9f4b81 4543 else
2693c0b0 4544 AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 4545 fi
ca9f4b81
AO
4546fi
4547
2693c0b0
PB
4548 for ncn_progname in as; do
4549 if test -n "$ncn_target_tool_prefix"; then
4550 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4551set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4552echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4553echo "configure:4554: checking for $ac_word" >&5
72a7ab82
AP
4554if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
4555 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4556else
4de997d1
PB
4557 if test -n "$AS_FOR_TARGET"; then
4558 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
ca9f4b81 4559else
72a7ab82
AP
4560 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4561 ac_dummy="$PATH"
4562 for ac_dir in $ac_dummy; do
4563 test -z "$ac_dir" && ac_dir=.
4564 if test -f $ac_dir/$ac_word; then
4565 ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4566 break
4567 fi
4568 done
4569 IFS="$ac_save_ifs"
ca9f4b81
AO
4570fi
4571fi
72a7ab82 4572AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
4de997d1 4573if test -n "$AS_FOR_TARGET"; then
72a7ab82 4574 echo "$ac_t""$AS_FOR_TARGET" 1>&6
ca9f4b81 4575else
72a7ab82 4576 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4577fi
4578
2693c0b0
PB
4579 fi
4580 if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then
4581 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4582set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4583echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4584echo "configure:4585: checking for $ac_word" >&5
72a7ab82
AP
4585if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
4586 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4587else
2693c0b0
PB
4588 if test -n "$AS_FOR_TARGET"; then
4589 ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
ca9f4b81 4590else
72a7ab82
AP
4591 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4592 ac_dummy="$PATH"
4593 for ac_dir in $ac_dummy; do
4594 test -z "$ac_dir" && ac_dir=.
4595 if test -f $ac_dir/$ac_word; then
4596 ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
4597 break
4598 fi
4599 done
4600 IFS="$ac_save_ifs"
ca9f4b81
AO
4601fi
4602fi
72a7ab82 4603AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
2693c0b0 4604if test -n "$AS_FOR_TARGET"; then
72a7ab82 4605 echo "$ac_t""$AS_FOR_TARGET" 1>&6
ca9f4b81 4606else
72a7ab82 4607 echo "$ac_t""no" 1>&6
ca9f4b81 4608fi
72a7ab82 4609
2693c0b0
PB
4610 fi
4611 test -n "$ac_cv_prog_AS_FOR_TARGET" && break
4612done
4613
4614if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
4615 set dummy as
4616 if test $build = $target ; then
4617 AS_FOR_TARGET="$2"
ca9f4b81 4618 else
2693c0b0 4619 AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 4620 fi
4de997d1
PB
4621fi
4622
2693c0b0
PB
4623 for ncn_progname in cc gcc; do
4624 if test -n "$ncn_target_tool_prefix"; then
4625 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4626set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4627echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4628echo "configure:4629: checking for $ac_word" >&5
72a7ab82
AP
4629if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4630 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
PB
4631else
4632 if test -n "$CC_FOR_TARGET"; then
4633 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4634else
72a7ab82
AP
4635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4636 ac_dummy="$PATH"
4637 for ac_dir in $ac_dummy; do
4638 test -z "$ac_dir" && ac_dir=.
4639 if test -f $ac_dir/$ac_word; then
4640 ac_cv_prog_CC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4641 break
4642 fi
4643 done
4644 IFS="$ac_save_ifs"
4de997d1
PB
4645fi
4646fi
72a7ab82 4647CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
4de997d1 4648if test -n "$CC_FOR_TARGET"; then
72a7ab82 4649 echo "$ac_t""$CC_FOR_TARGET" 1>&6
4de997d1 4650else
72a7ab82 4651 echo "$ac_t""no" 1>&6
4de997d1
PB
4652fi
4653
2693c0b0
PB
4654 fi
4655 if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then
4656 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4657set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4658echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4659echo "configure:4660: checking for $ac_word" >&5
72a7ab82
AP
4660if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
4661 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 4662else
2693c0b0
PB
4663 if test -n "$CC_FOR_TARGET"; then
4664 ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
4de997d1 4665else
72a7ab82
AP
4666 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4667 ac_dummy="$PATH"
4668 for ac_dir in $ac_dummy; do
4669 test -z "$ac_dir" && ac_dir=.
4670 if test -f $ac_dir/$ac_word; then
4671 ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
4672 break
4673 fi
4674 done
4675 IFS="$ac_save_ifs"
4de997d1
PB
4676fi
4677fi
72a7ab82 4678CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
2693c0b0 4679if test -n "$CC_FOR_TARGET"; then
72a7ab82 4680 echo "$ac_t""$CC_FOR_TARGET" 1>&6
4de997d1 4681else
72a7ab82 4682 echo "$ac_t""no" 1>&6
4de997d1 4683fi
72a7ab82 4684
2693c0b0
PB
4685 fi
4686 test -n "$ac_cv_prog_CC_FOR_TARGET" && break
4687done
4688
4689if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
4690 set dummy cc gcc
4691 if test $build = $target ; then
4692 CC_FOR_TARGET="$2"
4de997d1 4693 else
2693c0b0 4694 CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 4695 fi
4de997d1
PB
4696fi
4697
2693c0b0
PB
4698 for ncn_progname in c++ g++ cxx gxx; do
4699 if test -n "$ncn_target_tool_prefix"; then
4700 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4701set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4702echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4703echo "configure:4704: checking for $ac_word" >&5
72a7ab82
AP
4704if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4705 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
PB
4706else
4707 if test -n "$CXX_FOR_TARGET"; then
4708 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4709else
72a7ab82
AP
4710 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4711 ac_dummy="$PATH"
4712 for ac_dir in $ac_dummy; do
4713 test -z "$ac_dir" && ac_dir=.
4714 if test -f $ac_dir/$ac_word; then
4715 ac_cv_prog_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4716 break
4717 fi
4718 done
4719 IFS="$ac_save_ifs"
4de997d1
PB
4720fi
4721fi
72a7ab82 4722CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
4de997d1 4723if test -n "$CXX_FOR_TARGET"; then
72a7ab82 4724 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4de997d1 4725else
72a7ab82 4726 echo "$ac_t""no" 1>&6
4de997d1
PB
4727fi
4728
2693c0b0
PB
4729 fi
4730 if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then
4731 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4732set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4733echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4734echo "configure:4735: checking for $ac_word" >&5
72a7ab82
AP
4735if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
4736 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 4737else
2693c0b0
PB
4738 if test -n "$CXX_FOR_TARGET"; then
4739 ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
4de997d1 4740else
72a7ab82
AP
4741 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4742 ac_dummy="$PATH"
4743 for ac_dir in $ac_dummy; do
4744 test -z "$ac_dir" && ac_dir=.
4745 if test -f $ac_dir/$ac_word; then
4746 ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
4747 break
4748 fi
4749 done
4750 IFS="$ac_save_ifs"
4de997d1
PB
4751fi
4752fi
72a7ab82 4753CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
2693c0b0 4754if test -n "$CXX_FOR_TARGET"; then
72a7ab82 4755 echo "$ac_t""$CXX_FOR_TARGET" 1>&6
4de997d1 4756else
72a7ab82 4757 echo "$ac_t""no" 1>&6
4de997d1 4758fi
72a7ab82 4759
2693c0b0
PB
4760 fi
4761 test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
4762done
4763
4764if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
4765 set dummy c++ g++ cxx gxx
4766 if test $build = $target ; then
4767 CXX_FOR_TARGET="$2"
4de997d1 4768 else
2693c0b0 4769 CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 4770 fi
ca9f4b81
AO
4771fi
4772
2693c0b0
PB
4773 for ncn_progname in dlltool; do
4774 if test -n "$ncn_target_tool_prefix"; then
4775 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4776set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4777echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4778echo "configure:4779: checking for $ac_word" >&5
72a7ab82
AP
4779if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
4780 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4781else
4de997d1
PB
4782 if test -n "$DLLTOOL_FOR_TARGET"; then
4783 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
ca9f4b81 4784else
72a7ab82
AP
4785 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4786 ac_dummy="$PATH"
4787 for ac_dir in $ac_dummy; do
4788 test -z "$ac_dir" && ac_dir=.
4789 if test -f $ac_dir/$ac_word; then
4790 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4791 break
4792 fi
4793 done
4794 IFS="$ac_save_ifs"
ca9f4b81
AO
4795fi
4796fi
72a7ab82 4797DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
4de997d1 4798if test -n "$DLLTOOL_FOR_TARGET"; then
72a7ab82 4799 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
ca9f4b81 4800else
72a7ab82 4801 echo "$ac_t""no" 1>&6
ca9f4b81
AO
4802fi
4803
2693c0b0
PB
4804 fi
4805 if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then
4806 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4807set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4808echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4809echo "configure:4810: checking for $ac_word" >&5
72a7ab82
AP
4810if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
4811 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 4812else
2693c0b0
PB
4813 if test -n "$DLLTOOL_FOR_TARGET"; then
4814 ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
ca9f4b81 4815else
72a7ab82
AP
4816 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4817 ac_dummy="$PATH"
4818 for ac_dir in $ac_dummy; do
4819 test -z "$ac_dir" && ac_dir=.
4820 if test -f $ac_dir/$ac_word; then
4821 ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
4822 break
4823 fi
4824 done
4825 IFS="$ac_save_ifs"
ca9f4b81
AO
4826fi
4827fi
72a7ab82 4828DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
2693c0b0 4829if test -n "$DLLTOOL_FOR_TARGET"; then
72a7ab82 4830 echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
ca9f4b81 4831else
72a7ab82 4832 echo "$ac_t""no" 1>&6
ca9f4b81 4833fi
72a7ab82 4834
2693c0b0
PB
4835 fi
4836 test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
4837done
4838
4839if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
4840 set dummy dlltool
4841 if test $build = $target ; then
4842 DLLTOOL_FOR_TARGET="$2"
ca9f4b81 4843 else
2693c0b0 4844 DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 4845 fi
4de997d1
PB
4846fi
4847
2693c0b0
PB
4848 for ncn_progname in gcc; do
4849 if test -n "$ncn_target_tool_prefix"; then
4850 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4851set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4852echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4853echo "configure:4854: checking for $ac_word" >&5
72a7ab82
AP
4854if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4855 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
PB
4856else
4857 if test -n "$GCC_FOR_TARGET"; then
4858 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
4859else
72a7ab82
AP
4860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4861 ac_dummy="$PATH"
4862 for ac_dir in $ac_dummy; do
4863 test -z "$ac_dir" && ac_dir=.
4864 if test -f $ac_dir/$ac_word; then
4865 ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4866 break
4867 fi
4868 done
4869 IFS="$ac_save_ifs"
4de997d1
PB
4870fi
4871fi
72a7ab82 4872GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
4de997d1 4873if test -n "$GCC_FOR_TARGET"; then
72a7ab82 4874 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
4de997d1 4875else
72a7ab82 4876 echo "$ac_t""no" 1>&6
4de997d1
PB
4877fi
4878
2693c0b0
PB
4879 fi
4880 if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then
4881 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4882set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4883echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4884echo "configure:4885: checking for $ac_word" >&5
72a7ab82
AP
4885if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
4886 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 4887else
2693c0b0
PB
4888 if test -n "$GCC_FOR_TARGET"; then
4889 ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
4de997d1 4890else
72a7ab82
AP
4891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4892 ac_dummy="$PATH"
4893 for ac_dir in $ac_dummy; do
4894 test -z "$ac_dir" && ac_dir=.
4895 if test -f $ac_dir/$ac_word; then
4896 ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
4897 break
4898 fi
4899 done
4900 IFS="$ac_save_ifs"
4de997d1
PB
4901fi
4902fi
72a7ab82 4903GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
2693c0b0 4904if test -n "$GCC_FOR_TARGET"; then
72a7ab82 4905 echo "$ac_t""$GCC_FOR_TARGET" 1>&6
4de997d1 4906else
72a7ab82 4907 echo "$ac_t""no" 1>&6
4de997d1 4908fi
72a7ab82 4909
4de997d1 4910 fi
2693c0b0
PB
4911 test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
4912done
4913
4914if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
4915 GCC_FOR_TARGET="${CC_FOR_TARGET}"
4de997d1
PB
4916fi
4917
2693c0b0
PB
4918 for ncn_progname in gcj; do
4919 if test -n "$ncn_target_tool_prefix"; then
4920 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4921set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4922echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4923echo "configure:4924: checking for $ac_word" >&5
72a7ab82
AP
4924if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4925 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
PB
4926else
4927 if test -n "$GCJ_FOR_TARGET"; then
4928 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4929else
72a7ab82
AP
4930 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4931 ac_dummy="$PATH"
4932 for ac_dir in $ac_dummy; do
4933 test -z "$ac_dir" && ac_dir=.
4934 if test -f $ac_dir/$ac_word; then
4935 ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
4936 break
4937 fi
4938 done
4939 IFS="$ac_save_ifs"
4de997d1
PB
4940fi
4941fi
72a7ab82 4942GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
4de997d1 4943if test -n "$GCJ_FOR_TARGET"; then
72a7ab82 4944 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
4de997d1 4945else
72a7ab82 4946 echo "$ac_t""no" 1>&6
4de997d1
PB
4947fi
4948
2693c0b0
PB
4949 fi
4950 if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then
4951 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
4952set dummy ${ncn_progname}; ac_word=$2
72a7ab82 4953echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4954echo "configure:4955: checking for $ac_word" >&5
72a7ab82
AP
4955if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
4956 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 4957else
2693c0b0
PB
4958 if test -n "$GCJ_FOR_TARGET"; then
4959 ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
4de997d1 4960else
72a7ab82
AP
4961 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4962 ac_dummy="$PATH"
4963 for ac_dir in $ac_dummy; do
4964 test -z "$ac_dir" && ac_dir=.
4965 if test -f $ac_dir/$ac_word; then
4966 ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
4967 break
4968 fi
4969 done
4970 IFS="$ac_save_ifs"
4de997d1
PB
4971fi
4972fi
72a7ab82 4973GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
2693c0b0 4974if test -n "$GCJ_FOR_TARGET"; then
72a7ab82 4975 echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
4de997d1 4976else
72a7ab82 4977 echo "$ac_t""no" 1>&6
4de997d1 4978fi
72a7ab82 4979
2693c0b0
PB
4980 fi
4981 test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
4982done
4983
4984if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
4985 set dummy gcj
4986 if test $build = $target ; then
4987 GCJ_FOR_TARGET="$2"
4de997d1 4988 else
2693c0b0 4989 GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 4990 fi
4de997d1
PB
4991fi
4992
2693c0b0
PB
4993 for ncn_progname in gfortran; do
4994 if test -n "$ncn_target_tool_prefix"; then
4995 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
4996set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 4997echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 4998echo "configure:4999: checking for $ac_word" >&5
72a7ab82
AP
4999if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5000 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1
PB
5001else
5002 if test -n "$GFORTRAN_FOR_TARGET"; then
5003 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
5004else
72a7ab82
AP
5005 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5006 ac_dummy="$PATH"
5007 for ac_dir in $ac_dummy; do
5008 test -z "$ac_dir" && ac_dir=.
5009 if test -f $ac_dir/$ac_word; then
5010 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5011 break
5012 fi
5013 done
5014 IFS="$ac_save_ifs"
4de997d1
PB
5015fi
5016fi
72a7ab82 5017GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
4de997d1 5018if test -n "$GFORTRAN_FOR_TARGET"; then
72a7ab82 5019 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
4de997d1 5020else
72a7ab82 5021 echo "$ac_t""no" 1>&6
4de997d1
PB
5022fi
5023
2693c0b0
PB
5024 fi
5025 if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
5026 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5027set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5028echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5029echo "configure:5030: checking for $ac_word" >&5
72a7ab82
AP
5030if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
5031 echo $ac_n "(cached) $ac_c" 1>&6
4de997d1 5032else
2693c0b0
PB
5033 if test -n "$GFORTRAN_FOR_TARGET"; then
5034 ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
4de997d1 5035else
72a7ab82
AP
5036 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5037 ac_dummy="$PATH"
5038 for ac_dir in $ac_dummy; do
5039 test -z "$ac_dir" && ac_dir=.
5040 if test -f $ac_dir/$ac_word; then
5041 ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
5042 break
5043 fi
5044 done
5045 IFS="$ac_save_ifs"
4de997d1
PB
5046fi
5047fi
72a7ab82 5048GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
2693c0b0 5049if test -n "$GFORTRAN_FOR_TARGET"; then
72a7ab82 5050 echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
4de997d1 5051else
72a7ab82 5052 echo "$ac_t""no" 1>&6
4de997d1 5053fi
72a7ab82 5054
2693c0b0
PB
5055 fi
5056 test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
5057done
5058
5059if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
5060 set dummy gfortran
5061 if test $build = $target ; then
5062 GFORTRAN_FOR_TARGET="$2"
4de997d1 5063 else
2693c0b0 5064 GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
4de997d1 5065 fi
ca9f4b81
AO
5066fi
5067
2693c0b0
PB
5068 for ncn_progname in ld; do
5069 if test -n "$ncn_target_tool_prefix"; then
5070 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5071set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5072echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5073echo "configure:5074: checking for $ac_word" >&5
72a7ab82
AP
5074if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5075 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5076else
4de997d1
PB
5077 if test -n "$LD_FOR_TARGET"; then
5078 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
ca9f4b81 5079else
72a7ab82
AP
5080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5081 ac_dummy="$PATH"
5082 for ac_dir in $ac_dummy; do
5083 test -z "$ac_dir" && ac_dir=.
5084 if test -f $ac_dir/$ac_word; then
5085 ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5086 break
5087 fi
5088 done
5089 IFS="$ac_save_ifs"
ca9f4b81
AO
5090fi
5091fi
72a7ab82 5092LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
4de997d1 5093if test -n "$LD_FOR_TARGET"; then
72a7ab82 5094 echo "$ac_t""$LD_FOR_TARGET" 1>&6
ca9f4b81 5095else
72a7ab82 5096 echo "$ac_t""no" 1>&6
ca9f4b81
AO
5097fi
5098
2693c0b0
PB
5099 fi
5100 if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then
5101 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5102set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5103echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5104echo "configure:5105: checking for $ac_word" >&5
72a7ab82
AP
5105if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
5106 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5107else
2693c0b0
PB
5108 if test -n "$LD_FOR_TARGET"; then
5109 ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
ca9f4b81 5110else
72a7ab82
AP
5111 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5112 ac_dummy="$PATH"
5113 for ac_dir in $ac_dummy; do
5114 test -z "$ac_dir" && ac_dir=.
5115 if test -f $ac_dir/$ac_word; then
5116 ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
5117 break
5118 fi
5119 done
5120 IFS="$ac_save_ifs"
ca9f4b81
AO
5121fi
5122fi
72a7ab82 5123LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
2693c0b0 5124if test -n "$LD_FOR_TARGET"; then
72a7ab82 5125 echo "$ac_t""$LD_FOR_TARGET" 1>&6
ca9f4b81 5126else
72a7ab82 5127 echo "$ac_t""no" 1>&6
ca9f4b81 5128fi
72a7ab82 5129
2693c0b0
PB
5130 fi
5131 test -n "$ac_cv_prog_LD_FOR_TARGET" && break
5132done
5133
5134if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
5135 set dummy ld
5136 if test $build = $target ; then
5137 LD_FOR_TARGET="$2"
ca9f4b81 5138 else
2693c0b0 5139 LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 5140 fi
ca9f4b81
AO
5141fi
5142
040b1c5a 5143 for ncn_progname in lipo; do
2693c0b0
PB
5144 if test -n "$ncn_target_tool_prefix"; then
5145 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5146set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5147echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5148echo "configure:5149: checking for $ac_word" >&5
72a7ab82
AP
5149if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5150 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
5151else
5152 if test -n "$LIPO_FOR_TARGET"; then
5153 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5154else
72a7ab82
AP
5155 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5156 ac_dummy="$PATH"
5157 for ac_dir in $ac_dummy; do
5158 test -z "$ac_dir" && ac_dir=.
5159 if test -f $ac_dir/$ac_word; then
5160 ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5161 break
5162 fi
5163 done
5164 IFS="$ac_save_ifs"
040b1c5a
GK
5165fi
5166fi
72a7ab82 5167LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
040b1c5a 5168if test -n "$LIPO_FOR_TARGET"; then
72a7ab82 5169 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
040b1c5a 5170else
72a7ab82 5171 echo "$ac_t""no" 1>&6
040b1c5a
GK
5172fi
5173
5174 fi
5175 if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then
5176 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5177set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5178echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5179echo "configure:5180: checking for $ac_word" >&5
72a7ab82
AP
5180if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
5181 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
5182else
5183 if test -n "$LIPO_FOR_TARGET"; then
72a7ab82
AP
5184 ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
5185else
5186 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5187 ac_dummy="$PATH"
5188 for ac_dir in $ac_dummy; do
5189 test -z "$ac_dir" && ac_dir=.
5190 if test -f $ac_dir/$ac_word; then
5191 ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
5192 break
5193 fi
5194 done
5195 IFS="$ac_save_ifs"
040b1c5a
GK
5196fi
5197fi
72a7ab82 5198LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
040b1c5a 5199if test -n "$LIPO_FOR_TARGET"; then
72a7ab82 5200 echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
040b1c5a 5201else
72a7ab82 5202 echo "$ac_t""no" 1>&6
040b1c5a 5203fi
72a7ab82 5204
040b1c5a
GK
5205 fi
5206 test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
5207done
5208
5209if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
5210 set dummy lipo
5211 if test $build = $target ; then
5212 LIPO_FOR_TARGET="$2"
5213 else
5214 LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
5215 fi
5216fi
5217
5218 for ncn_progname in nm; do
5219 if test -n "$ncn_target_tool_prefix"; then
5220 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5221set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5222echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5223echo "configure:5224: checking for $ac_word" >&5
72a7ab82
AP
5224if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
5225 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5226else
4de997d1
PB
5227 if test -n "$NM_FOR_TARGET"; then
5228 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
ca9f4b81 5229else
72a7ab82
AP
5230 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5231 ac_dummy="$PATH"
5232 for ac_dir in $ac_dummy; do
5233 test -z "$ac_dir" && ac_dir=.
5234 if test -f $ac_dir/$ac_word; then
5235 ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5236 break
5237 fi
5238 done
5239 IFS="$ac_save_ifs"
ca9f4b81
AO
5240fi
5241fi
72a7ab82 5242NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
4de997d1 5243if test -n "$NM_FOR_TARGET"; then
72a7ab82 5244 echo "$ac_t""$NM_FOR_TARGET" 1>&6
ca9f4b81 5245else
72a7ab82 5246 echo "$ac_t""no" 1>&6
ca9f4b81
AO
5247fi
5248
2693c0b0
PB
5249 fi
5250 if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then
5251 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5252set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5253echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5254echo "configure:5255: checking for $ac_word" >&5
72a7ab82
AP
5255if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
5256 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5257else
2693c0b0
PB
5258 if test -n "$NM_FOR_TARGET"; then
5259 ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
ca9f4b81 5260else
72a7ab82
AP
5261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5262 ac_dummy="$PATH"
5263 for ac_dir in $ac_dummy; do
5264 test -z "$ac_dir" && ac_dir=.
5265 if test -f $ac_dir/$ac_word; then
5266 ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
5267 break
5268 fi
5269 done
5270 IFS="$ac_save_ifs"
ca9f4b81
AO
5271fi
5272fi
72a7ab82 5273NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
2693c0b0 5274if test -n "$NM_FOR_TARGET"; then
72a7ab82 5275 echo "$ac_t""$NM_FOR_TARGET" 1>&6
ca9f4b81 5276else
72a7ab82 5277 echo "$ac_t""no" 1>&6
ca9f4b81 5278fi
72a7ab82 5279
2693c0b0
PB
5280 fi
5281 test -n "$ac_cv_prog_NM_FOR_TARGET" && break
5282done
5283
5284if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
5285 set dummy nm
5286 if test $build = $target ; then
5287 NM_FOR_TARGET="$2"
ca9f4b81 5288 else
2693c0b0 5289 NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 5290 fi
ca9f4b81
AO
5291fi
5292
d739199a 5293 for ncn_progname in objdump; do
2693c0b0
PB
5294 if test -n "$ncn_target_tool_prefix"; then
5295 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5296set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5297echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5298echo "configure:5299: checking for $ac_word" >&5
d739199a
DJ
5299if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
5300 echo $ac_n "(cached) $ac_c" 1>&6
5301else
5302 if test -n "$OBJDUMP_FOR_TARGET"; then
5303 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
5304else
5305 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5306 ac_dummy="$PATH"
5307 for ac_dir in $ac_dummy; do
5308 test -z "$ac_dir" && ac_dir=.
5309 if test -f $ac_dir/$ac_word; then
5310 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5311 break
5312 fi
5313 done
5314 IFS="$ac_save_ifs"
5315fi
5316fi
5317OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
5318if test -n "$OBJDUMP_FOR_TARGET"; then
5319 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
5320else
5321 echo "$ac_t""no" 1>&6
5322fi
5323
5324 fi
5325 if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then
5326 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5327set dummy ${ncn_progname}; ac_word=$2
5328echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5329echo "configure:5330: checking for $ac_word" >&5
d739199a
DJ
5330if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
5331 echo $ac_n "(cached) $ac_c" 1>&6
5332else
5333 if test -n "$OBJDUMP_FOR_TARGET"; then
5334 ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
5335else
5336 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5337 ac_dummy="$PATH"
5338 for ac_dir in $ac_dummy; do
5339 test -z "$ac_dir" && ac_dir=.
5340 if test -f $ac_dir/$ac_word; then
5341 ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
5342 break
5343 fi
5344 done
5345 IFS="$ac_save_ifs"
5346fi
5347fi
5348OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
5349if test -n "$OBJDUMP_FOR_TARGET"; then
5350 echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
5351else
5352 echo "$ac_t""no" 1>&6
5353fi
5354
5355 fi
5356 test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break
5357done
5358
5359if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then
5360 set dummy objdump
5361 if test $build = $target ; then
5362 OBJDUMP_FOR_TARGET="$2"
5363 else
5364 OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
5365 fi
5366fi
5367
5368 for ncn_progname in ranlib; do
5369 if test -n "$ncn_target_tool_prefix"; then
5370 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5371set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
5372echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5373echo "configure:5374: checking for $ac_word" >&5
72a7ab82
AP
5374if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
5375 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5376else
4de997d1
PB
5377 if test -n "$RANLIB_FOR_TARGET"; then
5378 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
ca9f4b81 5379else
72a7ab82
AP
5380 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5381 ac_dummy="$PATH"
5382 for ac_dir in $ac_dummy; do
5383 test -z "$ac_dir" && ac_dir=.
5384 if test -f $ac_dir/$ac_word; then
5385 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5386 break
5387 fi
5388 done
5389 IFS="$ac_save_ifs"
ca9f4b81
AO
5390fi
5391fi
72a7ab82 5392RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
4de997d1 5393if test -n "$RANLIB_FOR_TARGET"; then
72a7ab82 5394 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
ca9f4b81 5395else
72a7ab82 5396 echo "$ac_t""no" 1>&6
ca9f4b81
AO
5397fi
5398
2693c0b0
PB
5399 fi
5400 if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then
5401 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5402set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5403echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5404echo "configure:5405: checking for $ac_word" >&5
72a7ab82
AP
5405if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
5406 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5407else
2693c0b0
PB
5408 if test -n "$RANLIB_FOR_TARGET"; then
5409 ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
ca9f4b81 5410else
72a7ab82
AP
5411 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5412 ac_dummy="$PATH"
5413 for ac_dir in $ac_dummy; do
5414 test -z "$ac_dir" && ac_dir=.
5415 if test -f $ac_dir/$ac_word; then
5416 ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
5417 break
5418 fi
5419 done
5420 IFS="$ac_save_ifs"
ca9f4b81
AO
5421fi
5422fi
72a7ab82 5423RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
2693c0b0 5424if test -n "$RANLIB_FOR_TARGET"; then
72a7ab82 5425 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
ca9f4b81 5426else
72a7ab82 5427 echo "$ac_t""no" 1>&6
ca9f4b81 5428fi
72a7ab82 5429
ca9f4b81 5430 fi
2693c0b0
PB
5431 test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
5432done
5433
5434if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
5435 RANLIB_FOR_TARGET=":"
ca9f4b81
AO
5436fi
5437
040b1c5a
GK
5438 for ncn_progname in strip; do
5439 if test -n "$ncn_target_tool_prefix"; then
5440 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5441set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5442echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5443echo "configure:5444: checking for $ac_word" >&5
72a7ab82
AP
5444if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
5445 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
5446else
5447 if test -n "$STRIP_FOR_TARGET"; then
5448 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
5449else
72a7ab82
AP
5450 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5451 ac_dummy="$PATH"
5452 for ac_dir in $ac_dummy; do
5453 test -z "$ac_dir" && ac_dir=.
5454 if test -f $ac_dir/$ac_word; then
5455 ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5456 break
5457 fi
5458 done
5459 IFS="$ac_save_ifs"
040b1c5a
GK
5460fi
5461fi
72a7ab82 5462STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
040b1c5a 5463if test -n "$STRIP_FOR_TARGET"; then
72a7ab82 5464 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
040b1c5a 5465else
72a7ab82 5466 echo "$ac_t""no" 1>&6
040b1c5a
GK
5467fi
5468
5469 fi
5470 if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then
5471 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5472set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5473echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5474echo "configure:5475: checking for $ac_word" >&5
72a7ab82
AP
5475if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
5476 echo $ac_n "(cached) $ac_c" 1>&6
040b1c5a
GK
5477else
5478 if test -n "$STRIP_FOR_TARGET"; then
5479 ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
5480else
72a7ab82
AP
5481 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5482 ac_dummy="$PATH"
5483 for ac_dir in $ac_dummy; do
5484 test -z "$ac_dir" && ac_dir=.
5485 if test -f $ac_dir/$ac_word; then
5486 ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
5487 break
5488 fi
5489 done
5490 IFS="$ac_save_ifs"
040b1c5a
GK
5491fi
5492fi
72a7ab82 5493STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
040b1c5a 5494if test -n "$STRIP_FOR_TARGET"; then
72a7ab82 5495 echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
040b1c5a 5496else
72a7ab82 5497 echo "$ac_t""no" 1>&6
040b1c5a 5498fi
72a7ab82 5499
040b1c5a
GK
5500 fi
5501 test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
5502done
5503
5504if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
5505 set dummy strip
5506 if test $build = $target ; then
5507 STRIP_FOR_TARGET="$2"
5508 else
5509 STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
5510 fi
5511fi
5512
2693c0b0
PB
5513 for ncn_progname in windres; do
5514 if test -n "$ncn_target_tool_prefix"; then
5515 # Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
5516set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
72a7ab82 5517echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5518echo "configure:5519: checking for $ac_word" >&5
72a7ab82
AP
5519if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
5520 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5521else
4de997d1
PB
5522 if test -n "$WINDRES_FOR_TARGET"; then
5523 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
ca9f4b81 5524else
72a7ab82
AP
5525 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5526 ac_dummy="$PATH"
5527 for ac_dir in $ac_dummy; do
5528 test -z "$ac_dir" && ac_dir=.
5529 if test -f $ac_dir/$ac_word; then
5530 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
5531 break
5532 fi
5533 done
5534 IFS="$ac_save_ifs"
ca9f4b81
AO
5535fi
5536fi
72a7ab82 5537WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
4de997d1 5538if test -n "$WINDRES_FOR_TARGET"; then
72a7ab82 5539 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
ca9f4b81 5540else
72a7ab82 5541 echo "$ac_t""no" 1>&6
ca9f4b81
AO
5542fi
5543
2693c0b0
PB
5544 fi
5545 if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then
5546 # Extract the first word of "${ncn_progname}", so it can be a program name with args.
5547set dummy ${ncn_progname}; ac_word=$2
72a7ab82 5548echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
212f829c 5549echo "configure:5550: checking for $ac_word" >&5
72a7ab82
AP
5550if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
5551 echo $ac_n "(cached) $ac_c" 1>&6
ca9f4b81 5552else
2693c0b0
PB
5553 if test -n "$WINDRES_FOR_TARGET"; then
5554 ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
ca9f4b81 5555else
72a7ab82
AP
5556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5557 ac_dummy="$PATH"
5558 for ac_dir in $ac_dummy; do
5559 test -z "$ac_dir" && ac_dir=.
5560 if test -f $ac_dir/$ac_word; then
5561 ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
5562 break
5563 fi
5564 done
5565 IFS="$ac_save_ifs"
ca9f4b81
AO
5566fi
5567fi
72a7ab82 5568WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
2693c0b0 5569if test -n "$WINDRES_FOR_TARGET"; then
72a7ab82 5570 echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
ca9f4b81 5571else
72a7ab82 5572 echo "$ac_t""no" 1>&6
ca9f4b81 5573fi
72a7ab82 5574
2693c0b0
PB
5575 fi
5576 test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
5577done
5578
5579if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
5580 set dummy windres
5581 if test $build = $target ; then
5582 WINDRES_FOR_TARGET="$2"
ca9f4b81 5583 else
2693c0b0 5584 WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
ca9f4b81 5585 fi
ca9f4b81
AO
5586fi
5587
4977bab6 5588
2abefe3d
PB
5589RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
5590
5591echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
212f829c 5592echo "configure:5593: checking where to find the target ar" >&5
2abefe3d
PB
5593if test "x${build}" != "x${host}" ; then
5594 # Canadian cross, just use what we found
5595 echo "$ac_t""pre-installed" 1>&6
5596else
5597 ok=yes
5598 case " ${configdirs} " in
5599 *" binutils "*) ;;
5600 *) ok=no ;;
5601 esac
5602
5603 if test $ok = yes; then
5604 # An in-tree tool is available and we can use it
5605 AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar'
5606 echo "$ac_t""just compiled" 1>&6
5607 elif test "x$target" = "x$host"; then
5608 # We can use an host tool
5609 AR_FOR_TARGET='$(AR)'
5610 echo "$ac_t""host tool" 1>&6
5611 else
5612 # We need a cross tool
5613 echo "$ac_t""pre-installed" 1>&6
5614 fi
5615fi
5616echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
212f829c 5617echo "configure:5618: checking where to find the target as" >&5
2abefe3d
PB
5618if test "x${build}" != "x${host}" ; then
5619 # Canadian cross, just use what we found
5620 echo "$ac_t""pre-installed" 1>&6
5621else
5622 ok=yes
5623 case " ${configdirs} " in
5624 *" gas "*) ;;
5625 *) ok=no ;;
5626 esac
5627
5628 if test $ok = yes; then
5629 # An in-tree tool is available and we can use it
5630 AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new'
5631 echo "$ac_t""just compiled" 1>&6
5632 elif test "x$target" = "x$host"; then
5633 # We can use an host tool
5634 AS_FOR_TARGET='$(AS)'
5635 echo "$ac_t""host tool" 1>&6
5636 else
5637 # We need a cross tool
5638 echo "$ac_t""pre-installed" 1>&6
5639 fi
5640fi
5641echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
212f829c 5642echo "configure:5643: checking where to find the target cc" >&5
2abefe3d
PB
5643if test "x${build}" != "x${host}" ; then
5644 # Canadian cross, just use what we found
5645 echo "$ac_t""pre-installed" 1>&6
5646else
5647 ok=yes
5648 case " ${configdirs} " in
5649 *" gcc "*) ;;
5650 *) ok=no ;;
5651 esac
5652
5653 if test $ok = yes; then
5654 # An in-tree tool is available and we can use it
5655 CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
5656 echo "$ac_t""just compiled" 1>&6
5657 elif test "x$target" = "x$host"; then
5658 # We can use an host tool
5659 CC_FOR_TARGET='$(CC)'
5660 echo "$ac_t""host tool" 1>&6
5661 else
5662 # We need a cross tool
5663 echo "$ac_t""pre-installed" 1>&6
5664 fi
5665fi
5666echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
212f829c 5667echo "configure:5668: checking where to find the target c++" >&5
2abefe3d
PB
5668if test "x${build}" != "x${host}" ; then
5669 # Canadian cross, just use what we found
5670 echo "$ac_t""pre-installed" 1>&6
5671else
5672 ok=yes
5673 case " ${configdirs} " in
5674 *" gcc "*) ;;
5675 *) ok=no ;;
5676 esac
5677 case ,${enable_languages}, in
5678 *,c++,*) ;;
5679 *) ok=no ;;
5680 esac
5681 if test $ok = yes; then
5682 # An in-tree tool is available and we can use it
5683 CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `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'
5684 echo "$ac_t""just compiled" 1>&6
5685 elif test "x$target" = "x$host"; then
5686 # We can use an host tool
5687 CXX_FOR_TARGET='$(CXX)'
5688 echo "$ac_t""host tool" 1>&6
5689 else
5690 # We need a cross tool
5691 echo "$ac_t""pre-installed" 1>&6
5692 fi
5693fi
5694echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
212f829c 5695echo "configure:5696: checking where to find the target c++ for libstdc++" >&5
2abefe3d
PB
5696if test "x${build}" != "x${host}" ; then
5697 # Canadian cross, just use what we found
5698 echo "$ac_t""pre-installed" 1>&6
5699else
5700 ok=yes
5701 case " ${configdirs} " in
5702 *" gcc "*) ;;
5703 *) ok=no ;;
5704 esac
5705 case ,${enable_languages}, in
5706 *,c++,*) ;;
5707 *) ok=no ;;
5708 esac
5709 if test $ok = yes; then
5710 # An in-tree tool is available and we can use it
5711 RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
5712 echo "$ac_t""just compiled" 1>&6
5713 elif test "x$target" = "x$host"; then
5714 # We can use an host tool
5715 RAW_CXX_FOR_TARGET='$(CXX)'
5716 echo "$ac_t""host tool" 1>&6
5717 else
5718 # We need a cross tool
5719 echo "$ac_t""pre-installed" 1>&6
5720 fi
5721fi
5722echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
212f829c 5723echo "configure:5724: checking where to find the target dlltool" >&5
2abefe3d
PB
5724if test "x${build}" != "x${host}" ; then
5725 # Canadian cross, just use what we found
5726 echo "$ac_t""pre-installed" 1>&6
5727else
5728 ok=yes
5729 case " ${configdirs} " in
5730 *" binutils "*) ;;
5731 *) ok=no ;;
5732 esac
5733
5734 if test $ok = yes; then
5735 # An in-tree tool is available and we can use it
5736 DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool'
5737 echo "$ac_t""just compiled" 1>&6
5738 elif test "x$target" = "x$host"; then
5739 # We can use an host tool
5740 DLLTOOL_FOR_TARGET='$(DLLTOOL)'
5741 echo "$ac_t""host tool" 1>&6
5742 else
5743 # We need a cross tool
5744 echo "$ac_t""pre-installed" 1>&6
5745 fi
5746fi
5747echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
212f829c 5748echo "configure:5749: checking where to find the target gcc" >&5
2abefe3d
PB
5749if test "x${build}" != "x${host}" ; then
5750 # Canadian cross, just use what we found
5751 echo "$ac_t""pre-installed" 1>&6
5752else
5753 ok=yes
5754 case " ${configdirs} " in
5755 *" gcc "*) ;;
5756 *) ok=no ;;
5757 esac
5758
5759 if test $ok = yes; then
5760 # An in-tree tool is available and we can use it
5761 GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
5762 echo "$ac_t""just compiled" 1>&6
5763 elif test "x$target" = "x$host"; then
5764 # We can use an host tool
5765 GCC_FOR_TARGET='$()'
5766 echo "$ac_t""host tool" 1>&6
5767 else
5768 # We need a cross tool
5769 echo "$ac_t""pre-installed" 1>&6
5770 fi
5771fi
5772echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
212f829c 5773echo "configure:5774: checking where to find the target gcj" >&5
2abefe3d
PB
5774if test "x${build}" != "x${host}" ; then
5775 # Canadian cross, just use what we found
5776 echo "$ac_t""pre-installed" 1>&6
5777else
5778 ok=yes
5779 case " ${configdirs} " in
5780 *" gcc "*) ;;
5781 *) ok=no ;;
5782 esac
5783 case ,${enable_languages}, in
5784 *,java,*) ;;
5785 *) ok=no ;;
5786 esac
5787 if test $ok = yes; then
5788 # An in-tree tool is available and we can use it
5789 GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
5790 echo "$ac_t""just compiled" 1>&6
5791 elif test "x$target" = "x$host"; then
5792 # We can use an host tool
5793 GCJ_FOR_TARGET='$(GCJ)'
5794 echo "$ac_t""host tool" 1>&6
5795 else
5796 # We need a cross tool
5797 echo "$ac_t""pre-installed" 1>&6
5798 fi
5799fi
5800echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
212f829c 5801echo "configure:5802: checking where to find the target gfortran" >&5
2abefe3d
PB
5802if test "x${build}" != "x${host}" ; then
5803 # Canadian cross, just use what we found
5804 echo "$ac_t""pre-installed" 1>&6
5805else
5806 ok=yes
5807 case " ${configdirs} " in
5808 *" gcc "*) ;;
5809 *) ok=no ;;
5810 esac
5811 case ,${enable_languages}, in
5812 *,fortran,*) ;;
5813 *) ok=no ;;
5814 esac
5815 if test $ok = yes; then
5816 # An in-tree tool is available and we can use it
5817 GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
5818 echo "$ac_t""just compiled" 1>&6
5819 elif test "x$target" = "x$host"; then
5820 # We can use an host tool
5821 GFORTRAN_FOR_TARGET='$(GFORTRAN)'
5822 echo "$ac_t""host tool" 1>&6
5823 else
5824 # We need a cross tool
5825 echo "$ac_t""pre-installed" 1>&6
5826 fi
5827fi
5828echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
212f829c 5829echo "configure:5830: checking where to find the target ld" >&5
2abefe3d
PB
5830if test "x${build}" != "x${host}" ; then
5831 # Canadian cross, just use what we found
5832 echo "$ac_t""pre-installed" 1>&6
5833else
5834 ok=yes
5835 case " ${configdirs} " in
5836 *" ld "*) ;;
5837 *) ok=no ;;
5838 esac
5839
5840 if test $ok = yes; then
5841 # An in-tree tool is available and we can use it
5842 LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new'
5843 echo "$ac_t""just compiled" 1>&6
5844 elif test "x$target" = "x$host"; then
5845 # We can use an host tool
5846 LD_FOR_TARGET='$(LD)'
5847 echo "$ac_t""host tool" 1>&6
5848 else
5849 # We need a cross tool
5850 echo "$ac_t""pre-installed" 1>&6
5851 fi
5852fi
5853echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
212f829c 5854echo "configure:5855: checking where to find the target lipo" >&5
2abefe3d
PB
5855if test "x${build}" != "x${host}" ; then
5856 # Canadian cross, just use what we found
5857 echo "$ac_t""pre-installed" 1>&6
5858else
5859 if test "x$target" = "x$host"; then
5860 # We can use an host tool
5861 LIPO_FOR_TARGET='$(LIPO)'
5862 echo "$ac_t""host tool" 1>&6
5863 else
5864 # We need a cross tool
5865 echo "$ac_t""pre-installed" 1>&6
5866 fi
5867fi
5868echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
212f829c 5869echo "configure:5870: checking where to find the target nm" >&5
2abefe3d
PB
5870if test "x${build}" != "x${host}" ; then
5871 # Canadian cross, just use what we found
5872 echo "$ac_t""pre-installed" 1>&6
5873else
5874 ok=yes
5875 case " ${configdirs} " in
5876 *" binutils "*) ;;
5877 *) ok=no ;;
5878 esac
5879
5880 if test $ok = yes; then
5881 # An in-tree tool is available and we can use it
5882 NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new'
5883 echo "$ac_t""just compiled" 1>&6
5884 elif test "x$target" = "x$host"; then
5885 # We can use an host tool
5886 NM_FOR_TARGET='$(NM)'
5887 echo "$ac_t""host tool" 1>&6
5888 else
5889 # We need a cross tool
5890 echo "$ac_t""pre-installed" 1>&6
5891 fi
5892fi
5893echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
212f829c 5894echo "configure:5895: checking where to find the target objdump" >&5
2abefe3d
PB
5895if test "x${build}" != "x${host}" ; then
5896 # Canadian cross, just use what we found
5897 echo "$ac_t""pre-installed" 1>&6
5898else
5899 ok=yes
5900 case " ${configdirs} " in
5901 *" binutils "*) ;;
5902 *) ok=no ;;
5903 esac
5904
5905 if test $ok = yes; then
5906 # An in-tree tool is available and we can use it
5907 OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump'
5908 echo "$ac_t""just compiled" 1>&6
5909 elif test "x$target" = "x$host"; then
5910 # We can use an host tool
5911 OBJDUMP_FOR_TARGET='$(OBJDUMP)'
5912 echo "$ac_t""host tool" 1>&6
5913 else
5914 # We need a cross tool
5915 echo "$ac_t""pre-installed" 1>&6
5916 fi
5917fi
5918echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
212f829c 5919echo "configure:5920: checking where to find the target ranlib" >&5
2abefe3d
PB
5920if test "x${build}" != "x${host}" ; then
5921 # Canadian cross, just use what we found
5922 echo "$ac_t""pre-installed" 1>&6
5923else
5924 ok=yes
5925 case " ${configdirs} " in
5926 *" binutils "*) ;;
5927 *) ok=no ;;
5928 esac
5929
5930 if test $ok = yes; then
5931 # An in-tree tool is available and we can use it
5932 RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib'
5933 echo "$ac_t""just compiled" 1>&6
5934 elif test "x$target" = "x$host"; then
5935 # We can use an host tool
5936 RANLIB_FOR_TARGET='$(RANLIB)'
5937 echo "$ac_t""host tool" 1>&6
5938 else
5939 # We need a cross tool
5940 echo "$ac_t""pre-installed" 1>&6
5941 fi
5942fi
5943echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
212f829c 5944echo "configure:5945: checking where to find the target strip" >&5
2abefe3d
PB
5945if test "x${build}" != "x${host}" ; then
5946 # Canadian cross, just use what we found
5947 echo "$ac_t""pre-installed" 1>&6
5948else
5949 ok=yes
5950 case " ${configdirs} " in
5951 *" binutils "*) ;;
5952 *) ok=no ;;
5953 esac
5954
5955 if test $ok = yes; then
5956 # An in-tree tool is available and we can use it
5957 STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip'
5958 echo "$ac_t""just compiled" 1>&6
5959 elif test "x$target" = "x$host"; then
5960 # We can use an host tool
5961 STRIP_FOR_TARGET='$(STRIP)'
5962 echo "$ac_t""host tool" 1>&6
5963 else
5964 # We need a cross tool
5965 echo "$ac_t""pre-installed" 1>&6
5966 fi
5967fi
5968echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
212f829c 5969echo "configure:5970: checking where to find the target windres" >&5
2abefe3d
PB
5970if test "x${build}" != "x${host}" ; then
5971 # Canadian cross, just use what we found
5972 echo "$ac_t""pre-installed" 1>&6
5973else
5974 ok=yes
5975 case " ${configdirs} " in
5976 *" binutils "*) ;;
5977 *) ok=no ;;
5978 esac
5979
5980 if test $ok = yes; then
5981 # An in-tree tool is available and we can use it
5982 WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres'
5983 echo "$ac_t""just compiled" 1>&6
5984 elif test "x$target" = "x$host"; then
5985 # We can use an host tool
5986 WINDRES_FOR_TARGET='$(WINDRES)'
5987 echo "$ac_t""host tool" 1>&6
5988 else
5989 # We need a cross tool
5990 echo "$ac_t""pre-installed" 1>&6
5991 fi
671aa708 5992fi
be912515
NN
5993
5994
5995
2abefe3d 5996
671aa708
NN
5997# Certain tools may need extra flags.
5998AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
5999RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
6000NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
6001
2abefe3d
PB
6002# When building target libraries, except in a Canadian cross, we use
6003# the same toolchain as the compiler we just built.
6004COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
6005COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
6006COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
6007if test $host = $build; then
6008 case " $configdirs " in
6009 *" gcc "*)
6010 COMPILER_AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/as'
6011 COMPILER_LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/collect-ld'
6012 COMPILER_NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/nm'${extra_nmflags_for_target}
6013 ;;
6014 esac
6015fi
6016
6017
6018
6019
6020
72a7ab82 6021echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
212f829c 6022echo "configure:6023: checking whether to enable maintainer-specific portions of Makefiles" >&5
ee03dc5e
AO
6023# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
6024if test "${enable_maintainer_mode+set}" = set; then
6025 enableval="$enable_maintainer_mode"
6026 USE_MAINTAINER_MODE=$enableval
6027else
6028 USE_MAINTAINER_MODE=no
72a7ab82
AP
6029fi
6030
6031echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
ee03dc5e
AO
6032
6033
6034if test "$USE_MAINTAINER_MODE" = yes; then
6035 MAINTAINER_MODE_TRUE=
6036 MAINTAINER_MODE_FALSE='#'
6037else
6038 MAINTAINER_MODE_TRUE='#'
6039 MAINTAINER_MODE_FALSE=
72a7ab82 6040fi
ee03dc5e
AO
6041MAINT=$MAINTAINER_MODE_TRUE
6042
2805b53a
NN
6043# ---------------------
6044# GCC bootstrap support
6045# ---------------------
6046
6047# Stage specific cflags for build.
6048stage1_cflags="-g"
6049case $build in
6050 vax-*-*)
6051 case ${GCC} in
6052 yes) stage1_cflags="-g -Wa,-J" ;;
6053 *) stage1_cflags="-g -J" ;;
6054 esac ;;
6055 powerpc-*-darwin*)
6056 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
6057 # sources; use -no-cpp-precomp to get to GNU cpp.
6058 # Apple's GCC has bugs in designated initializer handling, so disable
6059 # that too.
6060 stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
6061 ;;
6062esac
6063
6064
148907ea 6065# It makes debugging easier if we create as symlinks the stage directories
ce521a9c 6066# gcc for stageN-gcc and stagePREV-gcc for stage(N-1). In case this is not
148907ea 6067# possible, however, we can resort to mv.
72a7ab82 6068echo $ac_n "checking if symbolic links between directories work""... $ac_c" 1>&6
212f829c 6069echo "configure:6070: checking if symbolic links between directories work" >&5
72a7ab82
AP
6070if eval "test \"`echo '$''{'gcc_cv_prog_ln_s_dir'+set}'`\" = set"; then
6071 echo $ac_n "(cached) $ac_c" 1>&6
148907ea
PB
6072else
6073 if test "${LN_S}" = "ln -s" \
6074 && mkdir confdir.s1 \
6075 && ln -s confdir.s1 confdir.s2 \
6076 && echo timestamp1 > confdir.s1/conftest.1 \
6077 && cmp confdir.s1/conftest.1 confdir.s2/conftest.1 \
6078 && echo timestamp2 > confdir.s2/conftest.2 \
6079 && cmp confdir.s1/conftest.2 confdir.s1/conftest.2 \
6080 && rm -f confdir.s2; then
6081 gcc_cv_prog_ln_s_dir=yes
6082else
215c351a 6083 gcc_cv_prog_ln_s_dir=no
148907ea
PB
6084fi
6085rm -rf confdir.s1 confdir.s2
6086fi
72a7ab82
AP
6087
6088echo "$ac_t""$gcc_cv_prog_ln_s_dir" 1>&6
148907ea
PB
6089
6090case ${gcc_cv_prog_ln_s_dir} in
6091 yes)
6092 CREATE_LINK_TO_DIR='ln -s $$1 $$2'
6093 UNDO_LINK_TO_DIR='rm -f $$1' ;;
6094 *)
6095 CREATE_LINK_TO_DIR='mv $$1 $$2'
6096 UNDO_LINK_TO_DIR='mv $$1 $$2' ;;
6097esac
6098
6099
6100
2805b53a
NN
6101# Enable -Werror in bootstrap stage2 and later.
6102# Change the default to "no" on release branches.
6103# Check whether --enable-werror or --disable-werror was given.
6104if test "${enable_werror+set}" = set; then
6105 enableval="$enable_werror"
72a7ab82 6106 :
2805b53a
NN
6107else
6108 enable_werror=yes
72a7ab82
AP
6109fi
6110
09a9c095
NN
6111case ${enable_werror} in
6112 yes) stage2_werror_flag="--enable-werror-always" ;;
6113 *) stage2_werror_flag="" ;;
2805b53a
NN
6114esac
6115
6116
72a7ab82
AP
6117trap '' 1 2 15
6118cat > confcache <<\EOF
671aa708
NN
6119# This file is a shell script that caches the results of configure
6120# tests run on this system so they can be shared between configure
72a7ab82
AP
6121# scripts and configure runs. It is not useful on other systems.
6122# If it contains results you don't want to keep, you may remove or edit it.
671aa708 6123#
72a7ab82
AP
6124# By default, configure uses ./config.cache as the cache file,
6125# creating it if it does not exist already. You can give configure
6126# the --cache-file=FILE option to use a different cache file; that is
6127# what configure does when it calls configure scripts in
6128# subdirectories, so they share the cache.
6129# Giving --cache-file=/dev/null disables caching, for debugging configure.
6130# config.status only pays attention to the cache file if you give it the
6131# --recheck option to rerun configure.
671aa708 6132#
72a7ab82 6133EOF
671aa708
NN
6134# The following way of writing the cache mishandles newlines in values,
6135# but we know of no workaround that is simple, portable, and efficient.
6136# So, don't put newlines in cache variables' values.
6137# Ultrix sh set writes to stderr and can't be redirected directly,
6138# and sets the high bit in the cache file unless we assign to the vars.
72a7ab82
AP
6139(set) 2>&1 |
6140 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6141 *ac_space=\ *)
6142 # `set' does not quote correctly, so add quotes (double-quote substitution
6143 # turns \\\\ into \\, and sed turns \\ into \).
6144 sed -n \
6145 -e "s/'/'\\\\''/g" \
6146 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6147 ;;
6148 *)
6149 # `set' quotes correctly as required by POSIX, so do not add quotes.
6150 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6151 ;;
6152 esac >> confcache
6153if cmp -s $cache_file confcache; then
6154 :
6155else
671aa708 6156 if test -w $cache_file; then
72a7ab82
AP
6157 echo "updating cache $cache_file"
6158 cat confcache > $cache_file
671aa708
NN
6159 else
6160 echo "not updating unwritable cache $cache_file"
6161 fi
4977bab6 6162fi
671aa708 6163rm -f confcache
79c06341 6164
72a7ab82
AP
6165trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6166
671aa708
NN
6167test "x$prefix" = xNONE && prefix=$ac_default_prefix
6168# Let make expand exec_prefix.
6169test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4e77e8f1 6170
72a7ab82
AP
6171# Any assignment to VPATH causes Sun make to only execute
6172# the first set of double-colon rules, so remove it if not needed.
6173# If there is a colon in the path, we need to keep it.
671aa708 6174if test "x$srcdir" = x.; then
72a7ab82 6175 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
671aa708 6176fi
79c06341 6177
72a7ab82
AP
6178trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6179
671aa708
NN
6180# Transform confdefs.h into DEFS.
6181# Protect against shell expansion while executing Makefile rules.
6182# Protect against Makefile macro expansion.
72a7ab82
AP
6183cat > conftest.defs <<\EOF
6184s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
6185s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
6186s%\[%\\&%g
6187s%\]%\\&%g
6188s%\$%$$%g
6189EOF
6190DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
6191rm -f conftest.defs
4977bab6 6192
6b65a26d 6193
72a7ab82 6194# Without the "./", some shells look in PATH for config.status.
6b65a26d 6195: ${CONFIG_STATUS=./config.status}
72a7ab82
AP
6196
6197echo creating $CONFIG_STATUS
6198rm -f $CONFIG_STATUS
6199cat > $CONFIG_STATUS <<EOF
6200#! /bin/sh
6201# Generated automatically by configure.
671aa708 6202# Run this file to recreate the current configuration.
72a7ab82
AP
6203# This directory was configured as follows,
6204# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6205#
6206# $0 $ac_configure_args
6207#
671aa708 6208# Compiler output produced by configure, useful for debugging
72a7ab82 6209# configure, is in ./config.log if it exists.
6b65a26d 6210
72a7ab82
AP
6211ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6212for ac_option
671aa708 6213do
72a7ab82 6214 case "\$ac_option" in
671aa708 6215 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
72a7ab82
AP
6216 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6217 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6218 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6219 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6220 exit 0 ;;
6221 -help | --help | --hel | --he | --h)
6222 echo "\$ac_cs_usage"; exit 0 ;;
6223 *) echo "\$ac_cs_usage"; exit 1 ;;
6b65a26d
CM
6224 esac
6225done
6226
72a7ab82
AP
6227ac_given_srcdir=$srcdir
6228ac_given_INSTALL="$INSTALL"
6b65a26d 6229
72a7ab82
AP
6230trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6231EOF
6232cat >> $CONFIG_STATUS <<EOF
6b65a26d 6233
72a7ab82
AP
6234# Protect against being on the right side of a sed subst in config.status.
6235sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6236 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6237$ac_vpsub
6238$extrasub
6239s%@SHELL@%$SHELL%g
6240s%@CFLAGS@%$CFLAGS%g
6241s%@CPPFLAGS@%$CPPFLAGS%g
6242s%@CXXFLAGS@%$CXXFLAGS%g
6243s%@FFLAGS@%$FFLAGS%g
6244s%@DEFS@%$DEFS%g
6245s%@LDFLAGS@%$LDFLAGS%g
6246s%@LIBS@%$LIBS%g
6247s%@exec_prefix@%$exec_prefix%g
6248s%@prefix@%$prefix%g
6249s%@program_transform_name@%$program_transform_name%g
6250s%@bindir@%$bindir%g
6251s%@sbindir@%$sbindir%g
6252s%@libexecdir@%$libexecdir%g
6253s%@datadir@%$datadir%g
6254s%@sysconfdir@%$sysconfdir%g
6255s%@sharedstatedir@%$sharedstatedir%g
6256s%@localstatedir@%$localstatedir%g
6257s%@libdir@%$libdir%g
6258s%@includedir@%$includedir%g
6259s%@oldincludedir@%$oldincludedir%g
6260s%@infodir@%$infodir%g
6261s%@mandir@%$mandir%g
6262s%@host@%$host%g
6263s%@host_alias@%$host_alias%g
6264s%@host_cpu@%$host_cpu%g
6265s%@host_vendor@%$host_vendor%g
6266s%@host_os@%$host_os%g
6267s%@target@%$target%g
6268s%@target_alias@%$target_alias%g
6269s%@target_cpu@%$target_cpu%g
6270s%@target_vendor@%$target_vendor%g
6271s%@target_os@%$target_os%g
6272s%@build@%$build%g
6273s%@build_alias@%$build_alias%g
6274s%@build_cpu@%$build_cpu%g
6275s%@build_vendor@%$build_vendor%g
6276s%@build_os@%$build_os%g
6277s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6278s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6279s%@INSTALL_DATA@%$INSTALL_DATA%g
6280s%@LN@%$LN%g
6281s%@LN_S@%$LN_S%g
6282s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
6283s%@build_subdir@%$build_subdir%g
6284s%@host_subdir@%$host_subdir%g
6285s%@target_subdir@%$target_subdir%g
6286s%@CC@%$CC%g
6287s%@GNATBIND@%$GNATBIND%g
6288s%@do_compare@%$do_compare%g
6289s%@gmplibs@%$gmplibs%g
6290s%@gmpinc@%$gmpinc%g
6291s%@stage1_languages@%$stage1_languages%g
6292s%@SYSROOT_CFLAGS_FOR_TARGET@%$SYSROOT_CFLAGS_FOR_TARGET%g
72a7ab82 6293s%@bootstrap_lean@%$bootstrap_lean%g
671aa708 6294/@serialization_dependencies@/r $serialization_dependencies
72a7ab82 6295s%@serialization_dependencies@%%g
671aa708 6296/@host_makefile_frag@/r $host_makefile_frag
72a7ab82 6297s%@host_makefile_frag@%%g
671aa708 6298/@target_makefile_frag@/r $target_makefile_frag
72a7ab82 6299s%@target_makefile_frag@%%g
671aa708 6300/@alphaieee_frag@/r $alphaieee_frag
72a7ab82 6301s%@alphaieee_frag@%%g
671aa708 6302/@ospace_frag@/r $ospace_frag
72a7ab82
AP
6303s%@ospace_frag@%%g
6304s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
6305s%@BUILD_PREFIX@%$BUILD_PREFIX%g
6306s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
6307s%@tooldir@%$tooldir%g
6308s%@build_tooldir@%$build_tooldir%g
ef9db8d5 6309s%@CONFIGURE_GDB_TK@%$CONFIGURE_GDB_TK%g
72a7ab82 6310s%@GDB_TK@%$GDB_TK%g
ef9db8d5 6311s%@INSTALL_GDB_TK@%$INSTALL_GDB_TK%g
72a7ab82
AP
6312s%@build_configargs@%$build_configargs%g
6313s%@build_configdirs@%$build_configdirs%g
6314s%@host_configargs@%$host_configargs%g
6315s%@configdirs@%$configdirs%g
6316s%@target_configargs@%$target_configargs%g
6317s%@target_configdirs@%$target_configdirs%g
6318s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
6319s%@config_shell@%$config_shell%g
2abefe3d
PB
6320s%@YACC@%$YACC%g
6321s%@BISON@%$BISON%g
6322s%@M4@%$M4%g
6323s%@LEX@%$LEX%g
6324s%@FLEX@%$FLEX%g
6325s%@MAKEINFO@%$MAKEINFO%g
6326s%@EXPECT@%$EXPECT%g
6327s%@RUNTEST@%$RUNTEST%g
72a7ab82
AP
6328s%@AR@%$AR%g
6329s%@AS@%$AS%g
6330s%@DLLTOOL@%$DLLTOOL%g
6331s%@LD@%$LD%g
2abefe3d 6332s%@LIPO@%$LIPO%g
72a7ab82
AP
6333s%@NM@%$NM%g
6334s%@RANLIB@%$RANLIB%g
2abefe3d 6335s%@STRIP@%$STRIP%g
72a7ab82
AP
6336s%@WINDRES@%$WINDRES%g
6337s%@OBJCOPY@%$OBJCOPY%g
6338s%@OBJDUMP@%$OBJDUMP%g
6339s%@CXX@%$CXX%g
6340s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
6341s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
6342s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
6343s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
6344s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
6345s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
6346s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
6347s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
6348s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
6349s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
6350s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
6351s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
d739199a 6352s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g
72a7ab82
AP
6353s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
6354s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
6355s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
72a7ab82
AP
6356s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
6357s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
2abefe3d
PB
6358s%@COMPILER_AS_FOR_TARGET@%$COMPILER_AS_FOR_TARGET%g
6359s%@COMPILER_LD_FOR_TARGET@%$COMPILER_LD_FOR_TARGET%g
6360s%@COMPILER_NM_FOR_TARGET@%$COMPILER_NM_FOR_TARGET%g
72a7ab82
AP
6361s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6362s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6363s%@MAINT@%$MAINT%g
6364s%@stage1_cflags@%$stage1_cflags%g
6365s%@CREATE_LINK_TO_DIR@%$CREATE_LINK_TO_DIR%g
6366s%@UNDO_LINK_TO_DIR@%$UNDO_LINK_TO_DIR%g
6367s%@stage2_werror_flag@%$stage2_werror_flag%g
6368
671aa708 6369CEOF
72a7ab82 6370EOF
79c06341 6371
72a7ab82
AP
6372cat >> $CONFIG_STATUS <<\EOF
6373
6374# Split the substitutions into bite-sized pieces for seds with
6375# small command number limits, like on Digital OSF/1 and HP-UX.
6376ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6377ac_file=1 # Number of current file.
6378ac_beg=1 # First line for current file.
6379ac_end=$ac_max_sed_cmds # Line after last line for current file.
6380ac_more_lines=:
6381ac_sed_cmds=""
6382while $ac_more_lines; do
6383 if test $ac_beg -gt 1; then
6384 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6385 else
6386 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6387 fi
6388 if test ! -s conftest.s$ac_file; then
6389 ac_more_lines=false
6390 rm -f conftest.s$ac_file
6391 else
6392 if test -z "$ac_sed_cmds"; then
6393 ac_sed_cmds="sed -f conftest.s$ac_file"
671aa708 6394 else
72a7ab82 6395 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
671aa708 6396 fi
72a7ab82
AP
6397 ac_file=`expr $ac_file + 1`
6398 ac_beg=$ac_end
6399 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4977bab6 6400 fi
72a7ab82
AP
6401done
6402if test -z "$ac_sed_cmds"; then
6403 ac_sed_cmds=cat
6404fi
6405EOF
6406
6407cat >> $CONFIG_STATUS <<EOF
79c06341 6408
72a7ab82
AP
6409CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
6410EOF
6411cat >> $CONFIG_STATUS <<\EOF
6412for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
671aa708 6413 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
72a7ab82
AP
6414 case "$ac_file" in
6415 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6416 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6417 *) ac_file_in="${ac_file}.in" ;;
671aa708 6418 esac
79c06341 6419
72a7ab82 6420 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6b65a26d 6421
72a7ab82
AP
6422 # Remove last slash and all that follows it. Not all systems have dirname.
6423 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6424 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6425 # The file is in a subdirectory.
6426 test ! -d "$ac_dir" && mkdir "$ac_dir"
6427 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6428 # A "../" for each directory in $ac_dir_suffix.
6429 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6430 else
6431 ac_dir_suffix= ac_dots=
6432 fi
79c06341 6433
72a7ab82
AP
6434 case "$ac_given_srcdir" in
6435 .) srcdir=.
6436 if test -z "$ac_dots"; then top_srcdir=.
6437 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6438 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
671aa708 6439 *) # Relative path.
72a7ab82
AP
6440 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6441 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6442 esac
79c06341 6443
72a7ab82
AP
6444 case "$ac_given_INSTALL" in
6445 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6446 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6447 esac
79c06341 6448
72a7ab82
AP
6449 echo creating "$ac_file"
6450 rm -f "$ac_file"
6451 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6452 case "$ac_file" in
6453 *Makefile*) ac_comsub="1i\\
6454# $configure_input" ;;
6455 *) ac_comsub= ;;
671aa708 6456 esac
79c06341 6457
72a7ab82
AP
6458 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6459 sed -e "$ac_comsub
6460s%@configure_input@%$configure_input%g
6461s%@srcdir@%$srcdir%g
6462s%@top_srcdir@%$top_srcdir%g
6463s%@INSTALL@%$INSTALL%g
6464" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6465fi; done
6466rm -f conftest.s*
79c06341 6467
72a7ab82
AP
6468EOF
6469cat >> $CONFIG_STATUS <<EOF
79c06341 6470
72a7ab82
AP
6471EOF
6472cat >> $CONFIG_STATUS <<\EOF
79c06341 6473
72a7ab82
AP
6474exit 0
6475EOF
671aa708 6476chmod +x $CONFIG_STATUS
72a7ab82
AP
6477rm -fr confdefs* $ac_clean_files
6478test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
79c06341 6479