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