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