]> git.ipfire.org Git - thirdparty/gcc.git/blame - configure
Makefile.def (host_modules): add libcpp.
[thirdparty/gcc.git] / configure
CommitLineData
671aa708 1#! /bin/sh
79c06341 2
671aa708
NN
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
6de9cd9a
DN
14ac_help="$ac_help
15 --without-libbanshee Don't build with libbanshee"
d9cdb878
AC
16ac_help="$ac_help
17 --enable-libada Builds libada directory"
6de9cd9a
DN
18ac_help="$ac_help
19 --with-gmp-dir=PATH Specify source directory for GMP library"
20ac_help="$ac_help
21 --with-gmp=PATH Specify directory for installed GMP library"
ade82b16 22ac_help="$ac_help
bf1d3e81
NN
23 --enable-serial-[{host,target,build}-]configure
24 Force sequential configuration of
ade82b16 25 sub-packages for the host, target or build
bf1d3e81 26 machine, or all sub-packages"
ee03dc5e
AO
27ac_help="$ac_help
28 --enable-maintainer-mode enable make rules and dependencies not useful
29 (and sometimes confusing) to the casual installer"
2805b53a
NN
30ac_help="$ac_help
31 --enable-werror enable -Werror in bootstrap stage2 and later"
671aa708
NN
32
33# Initialize some variables set by options.
34# The variables have the same names as the options, with
35# dashes changed to underlines.
36build=NONE
37cache_file=./config.cache
38exec_prefix=NONE
39host=NONE
40no_create=
41nonopt=NONE
42no_recursion=
43prefix=NONE
44program_prefix=NONE
45program_suffix=NONE
46program_transform_name=s,x,x,
47silent=
48site=
49srcdir=
50target=NONE
51verbose=
52x_includes=NONE
53x_libraries=NONE
54bindir='${exec_prefix}/bin'
55sbindir='${exec_prefix}/sbin'
56libexecdir='${exec_prefix}/libexec'
57datadir='${prefix}/share'
58sysconfdir='${prefix}/etc'
59sharedstatedir='${prefix}/com'
60localstatedir='${prefix}/var'
61libdir='${exec_prefix}/lib'
62includedir='${prefix}/include'
63oldincludedir='/usr/include'
64infodir='${prefix}/info'
65mandir='${prefix}/man'
79c06341 66
671aa708
NN
67# Initialize some other variables.
68subdirs=
69MFLAGS= MAKEFLAGS=
70SHELL=${CONFIG_SHELL-/bin/sh}
71# Maximum number of lines to put in a shell here document.
72ac_max_here_lines=12
79c06341 73
671aa708
NN
74ac_prev=
75for ac_option
76do
79c06341 77
671aa708
NN
78 # If the previous option needs an argument, assign it.
79 if test -n "$ac_prev"; then
80 eval "$ac_prev=\$ac_option"
81 ac_prev=
82 continue
83 fi
79c06341 84
671aa708
NN
85 case "$ac_option" in
86 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
87 *) ac_optarg= ;;
88 esac
89
90 # Accept the important Cygnus configure options, so we can diagnose typos.
91
92 case "$ac_option" in
93
94 -bindir | --bindir | --bindi | --bind | --bin | --bi)
95 ac_prev=bindir ;;
96 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
97 bindir="$ac_optarg" ;;
98
99 -build | --build | --buil | --bui | --bu)
100 ac_prev=build ;;
101 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
102 build="$ac_optarg" ;;
103
104 -cache-file | --cache-file | --cache-fil | --cache-fi \
105 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
106 ac_prev=cache_file ;;
107 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
108 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
109 cache_file="$ac_optarg" ;;
110
111 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
112 ac_prev=datadir ;;
113 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
114 | --da=*)
115 datadir="$ac_optarg" ;;
116
117 -disable-* | --disable-*)
118 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
119 # Reject names that are not valid shell variable names.
120 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
121 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
122 fi
123 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
124 eval "enable_${ac_feature}=no" ;;
125
126 -enable-* | --enable-*)
127 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
128 # Reject names that are not valid shell variable names.
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 case "$ac_option" in
134 *=*) ;;
135 *) ac_optarg=yes ;;
136 esac
137 eval "enable_${ac_feature}='$ac_optarg'" ;;
138
139 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
140 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
141 | --exec | --exe | --ex)
142 ac_prev=exec_prefix ;;
143 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
144 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
145 | --exec=* | --exe=* | --ex=*)
146 exec_prefix="$ac_optarg" ;;
147
148 -gas | --gas | --ga | --g)
149 # Obsolete; use --with-gas.
150 with_gas=yes ;;
151
152 -help | --help | --hel | --he)
153 # Omit some internal or obsolete options to make the list less imposing.
154 # This message is too long to be a string in the A/UX 3.1 sh.
155 cat << EOF
156Usage: configure [options] [host]
157Options: [defaults in brackets after descriptions]
158Configuration:
159 --cache-file=FILE cache test results in FILE
160 --help print this message
161 --no-create do not create output files
162 --quiet, --silent do not print \`checking...' messages
163 --version print the version of autoconf that created configure
164Directory and file names:
165 --prefix=PREFIX install architecture-independent files in PREFIX
166 [$ac_default_prefix]
167 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
168 [same as prefix]
169 --bindir=DIR user executables in DIR [EPREFIX/bin]
170 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
171 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
172 --datadir=DIR read-only architecture-independent data in DIR
173 [PREFIX/share]
174 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
175 --sharedstatedir=DIR modifiable architecture-independent data in DIR
176 [PREFIX/com]
177 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
178 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
179 --includedir=DIR C header files in DIR [PREFIX/include]
180 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
181 --infodir=DIR info documentation in DIR [PREFIX/info]
182 --mandir=DIR man documentation in DIR [PREFIX/man]
183 --srcdir=DIR find the sources in DIR [configure dir or ..]
184 --program-prefix=PREFIX prepend PREFIX to installed program names
185 --program-suffix=SUFFIX append SUFFIX to installed program names
186 --program-transform-name=PROGRAM
187 run sed PROGRAM on installed program names
188EOF
189 cat << EOF
190Host type:
191 --build=BUILD configure for building on BUILD [BUILD=HOST]
192 --host=HOST configure for HOST [guessed]
193 --target=TARGET configure for TARGET [TARGET=HOST]
194Features and packages:
195 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
196 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
197 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
198 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
199 --x-includes=DIR X include files are in DIR
200 --x-libraries=DIR X library files are in DIR
201EOF
202 if test -n "$ac_help"; then
203 echo "--enable and --with options recognized:$ac_help"
204 fi
205 exit 0 ;;
206
207 -host | --host | --hos | --ho)
208 ac_prev=host ;;
209 -host=* | --host=* | --hos=* | --ho=*)
210 host="$ac_optarg" ;;
211
212 -includedir | --includedir | --includedi | --included | --include \
213 | --includ | --inclu | --incl | --inc)
214 ac_prev=includedir ;;
215 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
216 | --includ=* | --inclu=* | --incl=* | --inc=*)
217 includedir="$ac_optarg" ;;
218
219 -infodir | --infodir | --infodi | --infod | --info | --inf)
220 ac_prev=infodir ;;
221 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
222 infodir="$ac_optarg" ;;
223
224 -libdir | --libdir | --libdi | --libd)
225 ac_prev=libdir ;;
226 -libdir=* | --libdir=* | --libdi=* | --libd=*)
227 libdir="$ac_optarg" ;;
228
229 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
230 | --libexe | --libex | --libe)
231 ac_prev=libexecdir ;;
232 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
233 | --libexe=* | --libex=* | --libe=*)
234 libexecdir="$ac_optarg" ;;
235
236 -localstatedir | --localstatedir | --localstatedi | --localstated \
237 | --localstate | --localstat | --localsta | --localst \
238 | --locals | --local | --loca | --loc | --lo)
239 ac_prev=localstatedir ;;
240 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
241 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
242 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
243 localstatedir="$ac_optarg" ;;
244
245 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
246 ac_prev=mandir ;;
247 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
248 mandir="$ac_optarg" ;;
249
250 -nfp | --nfp | --nf)
251 # Obsolete; use --without-fp.
252 with_fp=no ;;
253
254 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
255 | --no-cr | --no-c)
256 no_create=yes ;;
257
258 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
259 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
260 no_recursion=yes ;;
261
262 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
263 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
264 | --oldin | --oldi | --old | --ol | --o)
265 ac_prev=oldincludedir ;;
266 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
267 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
268 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
269 oldincludedir="$ac_optarg" ;;
270
271 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
272 ac_prev=prefix ;;
273 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
274 prefix="$ac_optarg" ;;
275
276 -program-prefix | --program-prefix | --program-prefi | --program-pref \
277 | --program-pre | --program-pr | --program-p)
278 ac_prev=program_prefix ;;
279 -program-prefix=* | --program-prefix=* | --program-prefi=* \
280 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
281 program_prefix="$ac_optarg" ;;
282
283 -program-suffix | --program-suffix | --program-suffi | --program-suff \
284 | --program-suf | --program-su | --program-s)
285 ac_prev=program_suffix ;;
286 -program-suffix=* | --program-suffix=* | --program-suffi=* \
287 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
288 program_suffix="$ac_optarg" ;;
289
290 -program-transform-name | --program-transform-name \
291 | --program-transform-nam | --program-transform-na \
292 | --program-transform-n | --program-transform- \
293 | --program-transform | --program-transfor \
294 | --program-transfo | --program-transf \
295 | --program-trans | --program-tran \
296 | --progr-tra | --program-tr | --program-t)
297 ac_prev=program_transform_name ;;
298 -program-transform-name=* | --program-transform-name=* \
299 | --program-transform-nam=* | --program-transform-na=* \
300 | --program-transform-n=* | --program-transform-=* \
301 | --program-transform=* | --program-transfor=* \
302 | --program-transfo=* | --program-transf=* \
303 | --program-trans=* | --program-tran=* \
304 | --progr-tra=* | --program-tr=* | --program-t=*)
305 program_transform_name="$ac_optarg" ;;
306
307 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
308 | -silent | --silent | --silen | --sile | --sil)
309 silent=yes ;;
310
311 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
312 ac_prev=sbindir ;;
313 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
314 | --sbi=* | --sb=*)
315 sbindir="$ac_optarg" ;;
316
317 -sharedstatedir | --sharedstatedir | --sharedstatedi \
318 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
319 | --sharedst | --shareds | --shared | --share | --shar \
320 | --sha | --sh)
321 ac_prev=sharedstatedir ;;
322 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
323 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
324 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
325 | --sha=* | --sh=*)
326 sharedstatedir="$ac_optarg" ;;
327
328 -site | --site | --sit)
329 ac_prev=site ;;
330 -site=* | --site=* | --sit=*)
331 site="$ac_optarg" ;;
332
333 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
334 ac_prev=srcdir ;;
335 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
336 srcdir="$ac_optarg" ;;
337
338 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
339 | --syscon | --sysco | --sysc | --sys | --sy)
340 ac_prev=sysconfdir ;;
341 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
342 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
343 sysconfdir="$ac_optarg" ;;
344
345 -target | --target | --targe | --targ | --tar | --ta | --t)
346 ac_prev=target ;;
347 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
348 target="$ac_optarg" ;;
349
350 -v | -verbose | --verbose | --verbos | --verbo | --verb)
351 verbose=yes ;;
352
353 -version | --version | --versio | --versi | --vers)
354 echo "configure generated by autoconf version 2.13"
355 exit 0 ;;
356
357 -with-* | --with-*)
358 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
359 # Reject names that are not valid shell variable names.
360 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
361 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362 fi
363 ac_package=`echo $ac_package| sed 's/-/_/g'`
364 case "$ac_option" in
365 *=*) ;;
366 *) ac_optarg=yes ;;
367 esac
368 eval "with_${ac_package}='$ac_optarg'" ;;
369
370 -without-* | --without-*)
371 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
372 # Reject names that are not valid shell variable names.
373 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
374 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
375 fi
376 ac_package=`echo $ac_package| sed 's/-/_/g'`
377 eval "with_${ac_package}=no" ;;
378
379 --x)
380 # Obsolete; use --with-x.
381 with_x=yes ;;
382
383 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
384 | --x-incl | --x-inc | --x-in | --x-i)
385 ac_prev=x_includes ;;
386 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
387 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
388 x_includes="$ac_optarg" ;;
389
390 -x-libraries | --x-libraries | --x-librarie | --x-librari \
391 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
392 ac_prev=x_libraries ;;
393 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
394 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
395 x_libraries="$ac_optarg" ;;
396
397 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
398 ;;
399
400 *)
401 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
402 echo "configure: warning: $ac_option: invalid host type" 1>&2
403 fi
404 if test "x$nonopt" != xNONE; then
405 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406 fi
407 nonopt="$ac_option"
408 ;;
409
410 esac
411done
412
413if test -n "$ac_prev"; then
414 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
415fi
416
417trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
418
419# File descriptor usage:
420# 0 standard input
421# 1 file creation
422# 2 errors and warnings
423# 3 some systems may open it to /dev/tty
424# 4 used on the Kubota Titan
425# 6 checking for... messages and results
426# 5 compiler messages saved in config.log
427if test "$silent" = yes; then
428 exec 6>/dev/null
429else
430 exec 6>&1
431fi
432exec 5>./config.log
433
434echo "\
435This file contains any messages produced by compilers while
436running configure, to aid debugging if configure makes a mistake.
437" 1>&5
438
439# Strip out --no-create and --no-recursion so they do not pile up.
440# Also quote any args containing shell metacharacters.
441ac_configure_args=
442for ac_arg
443do
444 case "$ac_arg" in
445 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
446 | --no-cr | --no-c) ;;
447 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
448 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
449 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
450 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
451 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
452 esac
453done
454
455# NLS nuisances.
456# Only set these to C if already set. These must not be set unconditionally
457# because not all systems understand e.g. LANG=C (notably SCO).
458# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
459# Non-C LC_CTYPE values break the ctype check.
460if test "${LANG+set}" = set; then LANG=C; export LANG; fi
461if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
462if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
463if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
464
465# confdefs.h avoids OS command line length limits that DEFS can exceed.
466rm -rf conftest* confdefs.h
467# AIX cpp loses on an empty file, so make sure it contains at least a newline.
468echo > confdefs.h
469
470# A filename unique to this package, relative to the directory that
471# configure is in, which we can look for to find out if srcdir is correct.
472ac_unique_file=move-if-change
473
474# Find the source files, if location was not specified.
475if test -z "$srcdir"; then
476 ac_srcdir_defaulted=yes
477 # Try the directory containing this script, then its parent.
478 ac_prog=$0
479 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
480 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
481 srcdir=$ac_confdir
482 if test ! -r $srcdir/$ac_unique_file; then
483 srcdir=..
484 fi
485else
486 ac_srcdir_defaulted=no
487fi
488if test ! -r $srcdir/$ac_unique_file; then
489 if test "$ac_srcdir_defaulted" = yes; then
490 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
491 else
492 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
493 fi
494fi
495srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
496
497# Prefer explicitly selected file to automatically selected ones.
4cf8cbf0
NC
498if test -z "$CONFIG_SITE"; then
499 if test "x$prefix" != xNONE; then
500 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
501 else
502 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
671aa708
NN
503 fi
504fi
505for ac_site_file in $CONFIG_SITE; do
506 if test -r "$ac_site_file"; then
507 echo "loading site script $ac_site_file"
508 . "$ac_site_file"
509 fi
510done
511
512if test -r "$cache_file"; then
513 echo "loading cache $cache_file"
514 . $cache_file
515else
516 echo "creating cache $cache_file"
517 > $cache_file
518fi
519
520ac_ext=c
521# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
522ac_cpp='$CPP $CPPFLAGS'
523ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
524ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
525cross_compiling=$ac_cv_prog_cc_cross
526
527ac_exeext=
528ac_objext=o
529if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
530 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
531 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
532 ac_n= ac_c='
533' ac_t=' '
534 else
535 ac_n=-n ac_c= ac_t=
536 fi
537else
538 ac_n= ac_c='\c' ac_t=
539fi
540
541
d02c69be 542
671aa708
NN
543ac_aux_dir=
544for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
545 if test -f $ac_dir/install-sh; then
546 ac_aux_dir=$ac_dir
547 ac_install_sh="$ac_aux_dir/install-sh -c"
548 break
549 elif test -f $ac_dir/install.sh; then
550 ac_aux_dir=$ac_dir
551 ac_install_sh="$ac_aux_dir/install.sh -c"
552 break
553 fi
554done
555if test -z "$ac_aux_dir"; then
556 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
557fi
558ac_config_guess=$ac_aux_dir/config.guess
559ac_config_sub=$ac_aux_dir/config.sub
560ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
561
562
563# Do some error checking and defaulting for the host and target type.
564# The inputs are:
565# configure --host=HOST --target=TARGET --build=BUILD NONOPT
79c06341 566#
671aa708
NN
567# The rules are:
568# 1. You are not allowed to specify --host, --target, and nonopt at the
569# same time.
570# 2. Host defaults to nonopt.
571# 3. If nonopt is not specified, then host defaults to the current host,
572# as determined by config.guess.
573# 4. Target and build default to nonopt.
574# 5. If nonopt is not specified, then target and build default to host.
575
576# The aliases save the names the user supplied, while $host etc.
577# will get canonicalized.
578case $host---$target---$nonopt in
579NONE---*---* | *---NONE---* | *---*---NONE) ;;
580*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
581esac
582
583
584# Make sure we can run config.sub.
585if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
586else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
587fi
588
589echo $ac_n "checking host system type""... $ac_c" 1>&6
6de9cd9a 590echo "configure:591: checking host system type" >&5
671aa708
NN
591
592host_alias=$host
593case "$host_alias" in
594NONE)
595 case $nonopt in
596 NONE)
597 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
598 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
599 fi ;;
600 *) host_alias=$nonopt ;;
601 esac ;;
602esac
603
604host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
605host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
606host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
607host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
608echo "$ac_t""$host" 1>&6
609
610echo $ac_n "checking target system type""... $ac_c" 1>&6
6de9cd9a 611echo "configure:612: checking target system type" >&5
671aa708
NN
612
613target_alias=$target
614case "$target_alias" in
615NONE)
616 case $nonopt in
617 NONE) target_alias=$host_alias ;;
618 *) target_alias=$nonopt ;;
619 esac ;;
620esac
621
622target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
623target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
624target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
625target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
626echo "$ac_t""$target" 1>&6
627
628echo $ac_n "checking build system type""... $ac_c" 1>&6
6de9cd9a 629echo "configure:630: checking build system type" >&5
671aa708
NN
630
631build_alias=$build
632case "$build_alias" in
633NONE)
634 case $nonopt in
635 NONE) build_alias=$host_alias ;;
636 *) build_alias=$nonopt ;;
637 esac ;;
638esac
639
640build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
641build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
642build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
643build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
644echo "$ac_t""$build" 1>&6
645
646test "$host_alias" != "$target_alias" &&
647 test "$program_prefix$program_suffix$program_transform_name" = \
648 NONENONEs,x,x, &&
649 program_prefix=${target_alias}-
650
651if test "$program_transform_name" = s,x,x,; then
652 program_transform_name=
653else
654 # Double any \ or $. echo might interpret backslashes.
655 cat <<\EOF_SED > conftestsed
656s,\\,\\\\,g; s,\$,$$,g
657EOF_SED
658 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
659 rm -f conftestsed
660fi
661test "$program_prefix" != NONE &&
662 program_transform_name="s,^,${program_prefix},; $program_transform_name"
663# Use a double $ so make ignores it.
664test "$program_suffix" != NONE &&
665 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
666
667# sed with no file args requires a program.
668test "$program_transform_name" = "" && program_transform_name="s,x,x,"
669
670
775956d0
NN
671# Get 'install' or 'install-sh' and its variants.
672# Find a good install program. We prefer a C program (faster),
673# so one script is as good as another. But avoid the broken or
674# incompatible versions:
675# SysV /etc/install, /usr/sbin/install
676# SunOS /usr/etc/install
677# IRIX /sbin/install
678# AIX /bin/install
679# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
680# AFS /usr/afsws/bin/install, which mishandles nonexistent args
681# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
682# ./install, which can be erroneously created by make from ./install.sh.
683echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
6de9cd9a 684echo "configure:685: checking for a BSD compatible install" >&5
775956d0
NN
685if test -z "$INSTALL"; then
686if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
687 echo $ac_n "(cached) $ac_c" 1>&6
688else
689 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
690 for ac_dir in $PATH; do
691 # Account for people who put trailing slashes in PATH elements.
692 case "$ac_dir/" in
693 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
694 *)
695 # OSF1 and SCO ODT 3.0 have their own names for install.
696 # Don't use installbsd from OSF since it installs stuff as root
697 # by default.
698 for ac_prog in ginstall scoinst install; do
699 if test -f $ac_dir/$ac_prog; then
700 if test $ac_prog = install &&
701 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
702 # AIX install. It has an incompatible calling convention.
703 :
704 else
705 ac_cv_path_install="$ac_dir/$ac_prog -c"
706 break 2
707 fi
708 fi
709 done
710 ;;
711 esac
712 done
713 IFS="$ac_save_IFS"
714
715fi
716 if test "${ac_cv_path_install+set}" = set; then
717 INSTALL="$ac_cv_path_install"
718 else
719 # As a last resort, use the slow shell script. We don't cache a
720 # path for INSTALL within a source directory, because that will
721 # break other packages using the cache if that directory is
722 # removed, or if the path is relative.
723 INSTALL="$ac_install_sh"
724 fi
725fi
726echo "$ac_t""$INSTALL" 1>&6
727
728# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
729# It thinks the first close brace ends the variable substitution.
730test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
731
732test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
733
734test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
735
736
ca9f4b81
AO
737# Autoconf M4 include file defining utility macros for complex Canadian
738# cross builds.
671aa708 739
8b87bb96
NN
740
741
742
743
744
ca9f4b81
AO
745####
746# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
747# or AC_INIT.
748# These demand that AC_CANONICAL_SYSTEM be called beforehand.
749
750####
751# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
752# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
753# Code is pretty much lifted from autoconf2.53.
754
755
756
757####
758# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
759# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
760
761
762
763####
764# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
765# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
766
767
6691a79e
ME
768###
769# AC_PROG_CPP_WERROR
770# Used for autoconf 2.5x to force AC_PREPROC_IFELSE to reject code which
771# triggers warnings from the preprocessor. Will be in autoconf 2.58.
772# For now, using this also overrides header checks to use only the
773# preprocessor (matches 2.13 behavior; matching 2.58's behavior is a
774# bit harder from here).
775# Eventually autoconf will default to checking headers with the compiler
776# instead, and we'll have to do this differently.
777
778# AC_PROG_CPP_WERROR
779
55ffb5ed
NN
780# Test for GNAT.
781# We require the gnatbind program, and a compiler driver that
782# understands Ada. We use the user's CC setting, already found.
783#
784# Sets the shell variable have_gnat to yes or no as appropriate, and
785# substitutes GNATBIND.
786
787
79c06341 788
a76494aa
PB
789
790
4f4e53dd
PB
791
792
793
794
795
79c06341 796### we might need to use some other shell than /bin/sh for running subshells
79c06341
JL
797### If we are on Windows, search for the shell. This will permit people
798### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
799### without also having to set CONFIG_SHELL. This code will work when
800### using bash, which sets OSTYPE.
801case "${OSTYPE}" in
802*win32*)
671aa708
NN
803 if test x${CONFIG_SHELL} = x ; then
804 if test ! -f /bin/sh ; then
805 if test x${SHELL} != x && test -f ${SHELL} ; then
79c06341
JL
806 CONFIG_SHELL=${SHELL}
807 export CONFIG_SHELL
808 else
809 for prog in sh sh.exe bash bash.exe; do
810 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
811 for dir in $PATH; do
812 test -z "$dir" && dir=.
813 if test -f $dir/$prog; then
814 CONFIG_SHELL=$dir/$prog
815 export CONFIG_SHELL
816 break
817 fi
818 done
819 IFS="$save_ifs"
820 test -n "${CONFIG_SHELL}" && break
821 done
822 fi
823 fi
824 fi
825 ;;
826esac
827
828config_shell=${CONFIG_SHELL-/bin/sh}
829
79c06341
JL
830progname=$0
831# if PWD already has a value, it is probably wrong.
671aa708 832if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
79c06341 833
b348267b 834# Export original configure arguments for use by sub-configures. These
eeae7b41
DJ
835# will be expanded by make, so quote '$'.
836tmp="$progname $@"
837sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
838$tmp
b348267b 839EOF_SED
eeae7b41
DJ
840TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
841rm -f conftestsed.out
3dfabf63 842
cc1e60ea 843
671aa708 844moveifchange=${srcdir}/move-if-change
79c06341 845
671aa708
NN
846# Set srcdir to "." if that's what it is.
847# This is important for multilib support.
848pwd=`${PWDCMD-pwd}`
849srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
850if test "${pwd}" = "${srcpwd}" ; then
851 srcdir=.
79c06341
JL
852fi
853
671aa708 854topsrcdir=$srcpwd
5d4a5ee6 855
671aa708
NN
856extra_host_args=
857# Define the trigger file to make sure configure will re-run whenever
858# the gcc version number changes.
859if test "${with_gcc_version_trigger+set}" = set ; then
860 gcc_version_trigger="$with_gcc_version_trigger"
861 gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
79c06341 862else
671aa708
NN
863 # If gcc's sources are available, define the trigger file.
864 if test -f ${topsrcdir}/gcc/version.c ; then
865 gcc_version_trigger=${topsrcdir}/gcc/version.c
866 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
867 case "$ac_configure_args" in
868 *--with-gcc-version-trigger=$gcc_version_trigger* )
869 ;;
870 * )
871 # Add to all subconfigure arguments: build, host, and target.
ade82b16 872 ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
671aa708
NN
873 ;;
874 esac
875 fi
79c06341
JL
876fi
877
671aa708
NN
878### To add a new directory to the tree, first choose whether it is a target
879### or a host dependent tool. Then put it into the appropriate list
880### (library or tools, host or target), doing a dependency sort.
79c06341 881
671aa708
NN
882# Subdirs will be configured in the order listed in build_configdirs,
883# configdirs, or target_configdirs; see the serialization section below.
79c06341 884
671aa708
NN
885# Dependency sorting is only needed when *configuration* must be done in
886# a particular order. In all cases a dependency should be specified in
887# the Makefile, whether or not it's implicitly specified here.
79c06341 888
671aa708
NN
889# Double entries in build_configdirs, configdirs, or target_configdirs may
890# cause circular dependencies and break everything horribly.
79c06341 891
671aa708
NN
892# these libraries are used by various programs built for the host environment
893#
4f4e53dd 894host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib libbanshee libcpp"
671aa708 895
671aa708
NN
896# these tools are built for the host environment
897# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
898# know that we are building the simulator.
899# binutils, gas and ld appear in that order because it makes sense to run
900# "make check" in that particular order.
61b56b2e 901host_tools="texinfo byacc flex bison binutils gas ld gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar"
671aa708
NN
902
903# libgcj represents the runtime libraries only used by gcj.
904libgcj="target-libffi \
905 target-boehm-gc \
906 target-zlib \
907 target-qthreads \
908 target-libjava"
909
910# these libraries are built for the target environment, and are built after
911# the host libraries and the host tools (which may be a cross compiler)
912#
4dbda6f0 913target_libraries="target-libiberty \
671aa708
NN
914 target-libgloss \
915 target-newlib \
cb543528 916 target-libstdc++-v3 \
6de9cd9a 917 target-libmudflap \
6de9cd9a 918 target-libgfortran \
77d187bc 919 ${libgcj} \
d9cdb878
AC
920 target-libobjc \
921 target-libada"
671aa708 922
4dbda6f0
NN
923# these tools are built using the target libraries, and are intended to
924# run only in the target environment
671aa708 925#
4dbda6f0 926# note: any program that *uses* libraries that are in the "target_libraries"
671aa708
NN
927# list belongs in this list. those programs are also very likely
928# candidates for the "native_only" list which follows
929#
97286f7f 930target_tools="target-examples target-groff target-gperf target-rda"
79c06341 931
671aa708 932################################################################################
79c06341 933
671aa708
NN
934## All tools belong in one of the four categories, and are assigned above
935## We assign ${configdirs} this way to remove all embedded newlines. This
936## is important because configure will choke if they ever get through.
937## ${configdirs} is directories we build using the host tools.
938## ${target_configdirs} is directories we build using the target tools.
939#
940configdirs=`echo ${host_libs} ${host_tools}`
4dbda6f0 941target_configdirs=`echo ${target_libraries} ${target_tools}`
79c06341 942
8b87bb96
NN
943# Only make build modules if build != host.
944# This should be done more generally, but at the moment it doesn't matter.
945if test ${host_alias} != ${build_alias} ; then
946 # This is the only build module.
947 build_modules=libiberty
948else
949 build_modules=
950fi
951
952
671aa708 953################################################################################
79c06341 954
671aa708 955srcname="gnu development package"
79c06341 956
671aa708
NN
957# This gets set non-empty for some net releases of packages.
958appdirs=""
79c06341 959
671aa708
NN
960# Define is_cross_compiler to save on calls to 'test'.
961is_cross_compiler=
962if test x"${host}" = x"${target}" ; then
963 is_cross_compiler=no
79c06341 964else
671aa708
NN
965 is_cross_compiler=yes
966fi
79c06341 967
b4acb5ef 968# Find the build and target subdir names.
8b87bb96
NN
969 case ${build_alias} in
970 "") build_noncanonical=${build} ;;
971 *) build_noncanonical=${build_alias} ;;
972esac
973
974 case ${host_alias} in
975 "") host_noncanonical=${build_noncanonical} ;;
976 *) host_noncanonical=${host_alias} ;;
977esac
978
979 case ${target_alias} in
980 "") target_noncanonical=${host_noncanonical} ;;
981 *) target_noncanonical=${target_alias} ;;
982esac
983
984 # Prefix 'build-' so this never conflicts with target_subdir.
985build_subdir="build-${build_noncanonical}"
986# Not really a subdirectory, but here for completeness.
987host_subdir=.
988# No prefix.
989target_subdir=${target_noncanonical}
990
79c06341 991
671aa708
NN
992# Skipdirs are removed silently.
993skipdirs=
994# Noconfigdirs are removed loudly.
995noconfigdirs=""
79c06341 996
671aa708
NN
997use_gnu_ld=
998# Make sure we don't let GNU ld be added if we didn't want it.
999if test x$with_gnu_ld = xno ; then
1000 use_gnu_ld=no
1001 noconfigdirs="$noconfigdirs ld"
79c06341
JL
1002fi
1003
671aa708
NN
1004use_gnu_as=
1005# Make sure we don't let GNU as be added if we didn't want it.
1006if test x$with_gnu_as = xno ; then
1007 use_gnu_as=no
1008 noconfigdirs="$noconfigdirs gas"
79c06341
JL
1009fi
1010
671aa708
NN
1011# some tools are so dependent upon X11 that if we're not building with X,
1012# it's not even worth trying to configure, much less build, that tool.
79c06341 1013
671aa708
NN
1014case ${with_x} in
1015 yes | "") ;; # the default value for this tree is that X11 is available
1016 no)
1017 skipdirs="${skipdirs} tk tix itcl libgui"
1018 # We won't be able to build gdbtk without X.
1019 enable_gdbtk=no
1020 ;;
1021 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
1022esac
79c06341 1023
671aa708
NN
1024# Some tools are only suitable for building in a "native" situation.
1025# Remove these if host!=target.
61b56b2e 1026native_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 1027
671aa708
NN
1028# Similarly, some are only suitable for cross toolchains.
1029# Remove these if host=target.
1030cross_only="target-libgloss target-newlib target-opcodes"
1031
1032case $is_cross_compiler in
1033 no) skipdirs="${skipdirs} ${cross_only}" ;;
1034 yes) skipdirs="${skipdirs} ${native_only}" ;;
1035esac
79c06341 1036
671aa708
NN
1037# If both --with-headers and --with-libs are specified, default to
1038# --without-newlib.
078cfb66
GK
1039if test x"${with_headers}" != x && test x"${with_headers} != xno \
1040 && test x"${with_libs}" != x && test x"${with_libs} != xno ; then
671aa708
NN
1041 if test x"${with_newlib}" = x ; then
1042 with_newlib=no
1043 fi
79c06341
JL
1044fi
1045
671aa708
NN
1046# Recognize --with-newlib/--without-newlib.
1047case ${with_newlib} in
1048 no) skipdirs="${skipdirs} target-newlib" ;;
1049 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
1050esac
79c06341 1051
671aa708 1052# Configure extra directories which are host specific
79c06341 1053
671aa708
NN
1054case "${host}" in
1055 *-cygwin*)
1056 configdirs="$configdirs libtermcap" ;;
1057esac
79c06341 1058
671aa708
NN
1059# Remove more programs from consideration, based on the host or
1060# target this usually means that a port of the program doesn't
1061# exist yet.
ec8d6ddc 1062
671aa708
NN
1063case "${host}" in
1064 hppa*64*-*-*)
1065 noconfigdirs="$noconfigdirs byacc"
1066 ;;
f2a0e225 1067 i[3456789]86-*-vsta)
a22c2d8d 1068 noconfigdirs="$noconfigdirs tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
671aa708 1069 ;;
f2a0e225 1070 i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
a22c2d8d 1071 noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
3aa83176 1072 ;;
f2a0e225 1073 i[3456789]86-*-mingw32*)
61b56b2e 1074 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
a22c2d8d 1075 noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
3aa83176 1076 ;;
f2a0e225 1077 i[3456789]86-*-beos*)
3aa83176
NN
1078 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
1079 ;;
671aa708 1080 *-*-cygwin*)
a22c2d8d 1081 noconfigdirs="$noconfigdirs autoconf automake send-pr rcs guile perl"
671aa708
NN
1082 ;;
1083 *-*-netbsd*)
a22c2d8d 1084 noconfigdirs="$noconfigdirs rcs"
671aa708
NN
1085 ;;
1086 ppc*-*-pe)
a22c2d8d 1087 noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
671aa708
NN
1088 ;;
1089 powerpc-*-beos*)
1090 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
1091 ;;
1092 *-*-darwin*)
1093 noconfigdirs="$noconfigdirs tk itcl tix libgui"
1094 ;;
1095esac
ec8d6ddc 1096
6de9cd9a
DN
1097# Check whether --with-libbanshee or --without-libbanshee was given.
1098if test "${with_libbanshee+set}" = set; then
1099 withval="$with_libbanshee"
1100 :
1101fi
1102
1103case ${with_libbanshee} in
1104 no)
1105 noconfigdirs="$noconfigdirs libbanshee" ;;
1106 yes|"")
1107 with_libbanshee=yes
1108 ;;
1109 *)
1110 { echo "configure: error: --with-libbanshee can only be empty, "yes" or "no" (empty defaults to "yes"." 1>&2; exit 1; }
1111esac
1112
d9cdb878
AC
1113# Check whether --enable-libada or --disable-libada was given.
1114if test "${enable_libada+set}" = set; then
1115 enableval="$enable_libada"
1116 ENABLE_LIBADA=$enableval
1117else
1118 ENABLE_LIBADA=yes
1119fi
1120
d9cdb878
AC
1121if test "${ENABLE_LIBADA}" != "yes" ; then
1122 noconfigdirs="$noconfigdirs target-libada"
1123fi
1124
671aa708
NN
1125# Save it here so that, even in case of --enable-libgcj, if the Java
1126# front-end isn't enabled, we still get libgcj disabled.
1127libgcj_saved=$libgcj
1128case $enable_libgcj in
1129yes)
1130 # If we reset it here, it won't get added to noconfigdirs in the
1131 # target-specific build rules, so it will be forcibly enabled
1132 # (unless the Java language itself isn't enabled).
1133 libgcj=
1134 ;;
1135no)
1136 # Make sure we get it printed in the list of not supported target libs.
1137 noconfigdirs="$noconfigdirs ${libgcj}"
1138 ;;
1139esac
ec8d6ddc 1140
6de9cd9a
DN
1141
1142# Allow --disable-libmudflap to exclude target-libmudflap
1143case $enable_libmudflap in
1144yes | "")
1145 # By default it's enabled
1146 ;;
1147no)
1148 noconfigdirs="$noconfigdirs target-libmudflap"
1149 ;;
1150esac
1151
1152
671aa708
NN
1153case "${target}" in
1154 *-*-chorusos)
1155 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1156 ;;
940cde4d 1157 powerpc-*-darwin*)
c8e5d1af 1158 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
8d9b3f2e 1159 noconfigdirs="$noconfigdirs target-libobjc"
c8e5d1af 1160 ;;
940cde4d
GK
1161 *-*-darwin*)
1162 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
1163 noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
1164 ;;
671aa708
NN
1165 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
1166 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1167 ;;
6de9cd9a
DN
1168 *-*-freebsd* | *-*-kfreebsd*-gnu)
1169 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1170 if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
1171 && test -f /usr/local/include/gmp.h; then
1172 with_gmp=/usr/local
1173 fi
1174
1175 # Skip some stuff that's unsupported on some FreeBSD configurations.
1176 case "${target}" in
1177 i*86-*-*) ;;
1178 alpha*-*-*) ;;
1179 *)
1180 noconfigdirs="$noconfigdirs ${libgcj}"
1181 ;;
1182 esac
1183 ;;
ef4e7569
US
1184 *-*-kaos*)
1185 # Remove unsupported stuff on all kaOS configurations.
b4117c30 1186 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-librx"
ef4e7569
US
1187 skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
1188 skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
1189 noconfigdirs="$noconfigdirs target-libgloss"
1190 ;;
671aa708
NN
1191 *-*-netbsd*)
1192 # Skip some stuff on all NetBSD configurations.
1193 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
1194
1195 # Skip some stuff that's unsupported on some NetBSD configurations.
1196 case "${target}" in
1197 i*86-*-netbsdelf*) ;;
0590b963 1198 arm*-*-netbsdelf*) ;;
671aa708
NN
1199 *)
1200 noconfigdirs="$noconfigdirs ${libgcj}"
1201 ;;
1202 esac
1203 ;;
1204 *-*-netware)
cb543528 1205 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
671aa708
NN
1206 ;;
1207 *-*-rtems*)
1208 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708 1209 ;;
5785c0ed
BI
1210 *-*-uclinux*)
1211 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
1212 ;;
671aa708 1213 *-*-vxworks*)
4dd01c5c 1214 noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}"
671aa708
NN
1215 ;;
1216 alpha*-dec-osf*)
1217 # ld works, but does not support shared libraries.
1218 # newlib is not 64 bit ready. I'm not sure about fileutils.
1219 # gas doesn't generate exception information.
1220 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
1221 ;;
1222 alpha*-*-*vms*)
1223 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
1224 ;;
1225 alpha*-*-linux*)
1226 # newlib is not 64 bit ready
1227 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1228 ;;
671aa708
NN
1229 alpha*-*-*)
1230 # newlib is not 64 bit ready
1231 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1232 ;;
33952f6f
AO
1233 am33_2.0-*-linux*)
1234 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1235 ;;
671aa708
NN
1236 sh-*-linux*)
1237 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1238 ;;
1239 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1240 noconfigdirs="$noconfigdirs ${libgcj}"
1241 noconfigdirs="$noconfigdirs target-examples"
1242 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
1243 noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
1244 noconfigdirs="$noconfigdirs expect dejagnu"
1245 # the C++ libraries don't build on top of CE's C libraries
cb543528 1246 noconfigdirs="$noconfigdirs target-libstdc++-v3"
671aa708
NN
1247 noconfigdirs="$noconfigdirs target-newlib"
1248 case "${host}" in
1249 *-*-cygwin*) ;; # keep gdb and readline
aa9c3ab4 1250 *) noconfigdirs="$noconfigdirs gdb readline"
671aa708
NN
1251 ;;
1252 esac
1253 ;;
1254 arc-*-*)
1255 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1256 ;;
1257 arm-*-coff | strongarm-*-coff | xscale-*-coff)
1258 noconfigdirs="$noconfigdirs ${libgcj}"
1259 ;;
1260 arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
1261 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1262 ;;
1263 arm-*-pe*)
1264 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1265 ;;
1266 arm-*-oabi*)
1267 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1268 ;;
1269 thumb-*-coff)
1270 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1271 ;;
1272 thumb-*-elf)
1273 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1274 ;;
1275 thumb-*-oabi)
1276 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1277 ;;
1278 thumb-*-pe)
1279 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1280 ;;
1281 arm-*-riscix*)
1282 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1283 ;;
1284 avr-*-*)
cb543528 1285 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708
NN
1286 ;;
1287 c4x-*-* | tic4x-*-*)
cb543528 1288 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1289 ;;
1290 c54x*-*-* | tic54x-*-*)
cb543528 1291 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
671aa708
NN
1292 ;;
1293 cris-*-*)
fb87ad5d 1294 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
671aa708
NN
1295 ;;
1296 d10v-*-*)
cb543528 1297 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1298 ;;
1299 d30v-*-*)
fb87ad5d 1300 noconfigdirs="$noconfigdirs ${libgcj} gdb"
671aa708
NN
1301 ;;
1302 fr30-*-elf*)
fb87ad5d 1303 noconfigdirs="$noconfigdirs ${libgcj} gdb"
671aa708
NN
1304 ;;
1305 frv-*-*)
1306 noconfigdirs="$noconfigdirs ${libgcj}"
1307 ;;
1308 h8300*-*-*)
b4117c30 1309 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
671aa708
NN
1310 ;;
1311 h8500-*-*)
b4117c30 1312 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708
NN
1313 ;;
1314 hppa*64*-*-linux* | parisc*64*-*-linux*)
1315 # In this case, it's because the hppa64-linux target is for
1316 # the kernel only at this point and has no libc, and thus no
1317 # headers, crt*.o, etc., all of which are needed by these.
1318 noconfigdirs="$noconfigdirs target-zlib"
1319 ;;
1320 hppa*-*-*elf* | \
1321 parisc*-*-linux* | hppa*-*-linux* | \
1322 hppa*-*-lites* | \
1323 hppa*-*-openbsd* | \
1324 hppa*64*-*-*)
1325 noconfigdirs="$noconfigdirs ${libgcj}"
1326 # Do configure ld/binutils/gas for this case.
1327 ;;
1328 hppa*-*-*)
1329 # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
1330 # build on HP-UX 10.20.
1331 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
1332 ;;
fb87ad5d
HPN
1333 i960-*-*)
1334 noconfigdirs="$noconfigdirs ${libgcj} gdb"
1335 ;;
671aa708
NN
1336 ia64*-*-elf*)
1337 # No gdb support yet.
1338 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
1339 ;;
1340 ia64*-**-hpux*)
1341 # No gdb or ld support yet.
07d0a605 1342 noconfigdirs="$noconfigdirs ${libgcj} tix readline mmalloc libgui itcl gdb ld"
671aa708 1343 ;;
f2a0e225 1344 i[3456789]86-*-coff | i[3456789]86-*-elf)
671aa708
NN
1345 noconfigdirs="$noconfigdirs ${libgcj}"
1346 ;;
f2a0e225 1347 i[3456789]86-*-linux*)
671aa708
NN
1348 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1349 # not build java stuff by default.
1350 case "${target}" in
1351 *-*-*libc1*)
1352 noconfigdirs="$noconfigdirs ${libgcj}";;
1353 esac
1354
1355 # This section makes it possible to build newlib natively on linux.
1356 # If we are using a cross compiler then don't configure newlib.
1357 if test x${is_cross_compiler} != xno ; then
3aa83176 1358 noconfigdirs="$noconfigdirs target-newlib"
671aa708
NN
1359 fi
1360 noconfigdirs="$noconfigdirs target-libgloss"
1361 # If we are not using a cross compiler, do configure newlib.
1362 # Note however, that newlib will only be configured in this situation
1363 # if the --with-newlib option has been given, because otherwise
1364 # 'target-newlib' will appear in skipdirs.
1365 ;;
f2a0e225 1366 i[3456789]86-*-mingw32*)
671aa708
NN
1367 target_configdirs="$target_configdirs target-mingw"
1368 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
1369
1370 # Can't build gdb for mingw32 if not native.
1371 case "${host}" in
f2a0e225 1372 i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
61b56b2e 1373 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
671aa708
NN
1374 ;;
1375 esac
1376 ;;
1377 *-*-cygwin*)
1378 target_configdirs="$target_configdirs target-libtermcap target-winsup"
1379 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
1380 # always build newlib.
1381 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1382
1383 # Can't build gdb for Cygwin if not native.
1384 case "${host}" in
1385 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
61b56b2e 1386 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
671aa708
NN
1387 ;;
1388 esac
1389 ;;
f2a0e225 1390 i[3456789]86-*-pe)
cb543528 1391 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
671aa708 1392 ;;
f2a0e225 1393 i[3456789]86-*-sco3.2v5*)
671aa708
NN
1394 # The linker does not yet know about weak symbols in COFF,
1395 # and is not configured to handle mixed ELF and COFF.
1396 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1397 ;;
f2a0e225 1398 i[3456789]86-*-sco*)
671aa708
NN
1399 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1400 ;;
f2a0e225 1401 i[3456789]86-*-solaris2*)
671aa708
NN
1402 noconfigdirs="$noconfigdirs target-libgloss"
1403 ;;
f2a0e225 1404 i[3456789]86-*-sysv4*)
671aa708
NN
1405 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1406 ;;
f2a0e225 1407 i[3456789]86-*-beos*)
3aa83176
NN
1408 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1409 ;;
fb87ad5d 1410 m32r-*-*)
c197e306 1411 noconfigdirs="$noconfigdirs ${libgcj}"
fb87ad5d 1412 ;;
671aa708 1413 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
cb543528 1414 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708
NN
1415 ;;
1416 m68k-*-elf*)
1417 noconfigdirs="$noconfigdirs ${libgcj}"
1418 ;;
1419 m68k-*-coff*)
1420 noconfigdirs="$noconfigdirs ${libgcj}"
1421 ;;
1422 mcore-*-pe*)
1423 # The EPOC C++ environment does not support exceptions or rtti,
1424 # and so building libstdc++-v3 tends not to always work.
1425 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1426 ;;
1427 mmix-*-*)
1428 noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
1429 ;;
1430 mn10200-*-*)
1431 noconfigdirs="$noconfigdirs ${libgcj}"
1432 ;;
1433 mn10300-*-*)
1434 noconfigdirs="$noconfigdirs ${libgcj}"
1435 ;;
1436 powerpc-*-aix*)
1437 # copied from rs6000-*-* entry
bef1d700 1438 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1439 ;;
1440 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1441 target_configdirs="$target_configdirs target-winsup"
61b56b2e 1442 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
671aa708
NN
1443 # always build newlib.
1444 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1445 ;;
1446 # This is temporary until we can link against shared libraries
1447 powerpcle-*-solaris*)
61b56b2e 1448 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
671aa708
NN
1449 ;;
1450 powerpc-*-beos*)
1451 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1452 ;;
671aa708
NN
1453 powerpc-*-eabi)
1454 noconfigdirs="$noconfigdirs ${libgcj}"
1455 ;;
671aa708
NN
1456 rs6000-*-lynxos*)
1457 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
1458 ;;
1459 rs6000-*-aix*)
bef1d700 1460 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1461 ;;
1462 rs6000-*-*)
1463 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1464 ;;
1465 m68k-apollo-*)
1466 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
1467 ;;
1468 mips*-*-irix5*)
1f1d584b 1469 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1470 ;;
1471 mips*-*-irix6*)
671aa708
NN
1472 # Linking libjava exceeds command-line length limits on at least
1473 # IRIX 6.2, but not on IRIX 6.5.
1474 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
1475 # <oldham@codesourcery.com>
7c005a3a 1476 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
671aa708
NN
1477 ;;
1478 mips*-dec-bsd*)
1479 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1480 ;;
1481 mips*-*-bsd*)
1482 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1483 ;;
1484 mipstx39-*-*)
1485 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
3aa83176 1486 ;;
d0fe5ad3
RS
1487 mips64*-*-linux*)
1488 noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
1489 ;;
671aa708
NN
1490 mips*-*-linux*)
1491 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1492 ;;
1493 mips*-*-*)
1494 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1495 ;;
1496 romp-*-*)
1497 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1498 ;;
1499 sh-*-*)
1500 case "${host}" in
f2a0e225
KC
1501 i[3456789]86-*-vsta) ;; # don't add gprof back in
1502 i[3456789]86-*-go32*) ;; # don't add gprof back in
1503 i[3456789]86-*-msdosdjgpp*) ;; # don't add gprof back in
671aa708
NN
1504 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1505 esac
1506 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1507 ;;
1508 sh64-*-*)
1509 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1510 ;;
1511 sparc-*-elf*)
1512 noconfigdirs="$noconfigdirs ${libgcj}"
1513 ;;
1514 sparc64-*-elf*)
1515 noconfigdirs="$noconfigdirs ${libgcj}"
1516 ;;
1517 sparclite-*-*)
1518 noconfigdirs="$noconfigdirs ${libgcj}"
1519 ;;
1520 sparc-*-sunos4*)
1521 noconfigdirs="$noconfigdirs ${libgcj}"
1522 if test x${is_cross_compiler} != xno ; then
1523 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1524 else
1525 use_gnu_ld=no
1526 fi
1527 ;;
1528 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1529 ;;
1530 v810-*-*)
cb543528 1531 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
671aa708
NN
1532 ;;
1533 v850-*-*)
1534 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1535 ;;
1536 v850e-*-*)
1537 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1538 ;;
1539 v850ea-*-*)
1540 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1541 ;;
1542 vax-*-vms)
1543 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
1544 ;;
1545 vax-*-*)
1546 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1547 ;;
0d4f1b4e
BW
1548 xtensa-*-*)
1549 noconfigdirs="$noconfigdirs ${libgcj}"
1550 ;;
671aa708 1551 ip2k-*-*)
cb543528 1552 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
671aa708
NN
1553 ;;
1554 *-*-linux*)
1555 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1556 ;;
1557 *-*-lynxos*)
1558 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1559 ;;
1560 *-*-*)
1561 noconfigdirs="$noconfigdirs ${libgcj}"
1562 ;;
1563esac
79c06341 1564
671aa708
NN
1565# If we aren't building newlib, then don't build libgloss, since libgloss
1566# depends upon some newlib header files.
1567case "${noconfigdirs}" in
1568 *target-libgloss*) ;;
1569 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1570esac
1571
671aa708
NN
1572# Work in distributions that contain no compiler tools, like Autoconf.
1573tentative_cc=""
1574host_makefile_frag=/dev/null
1575if test -d ${srcdir}/config ; then
1576case "${host}" in
1577 m68k-hp-hpux*)
1578 # Avoid "too much defining" errors from HPUX compiler.
1579 tentative_cc="cc -Wp,-H256000"
1580 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1581 # If it's HP/UX ar, this should be harmless.
1582 RANLIB="ar ts"
1583 ;;
1584 m68k-apollo-sysv*)
1585 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1586 ;;
1587 m68k-apollo-bsd*)
1588 #None of the Apollo compilers can compile gas or binutils. The preprocessor
1589 # chokes on bfd, the compiler won't let you assign integers to enums, and
1590 # other problems. Defining CC to gcc is a questionable way to say "don't use
1591 # the apollo compiler" (the preferred version of GCC could be called cc,
1592 # or whatever), but I'm not sure leaving CC as cc is any better...
1593 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1594 # Used to have BISON=yacc.
1595 tentative_cc=gcc
1596 ;;
1597 m88k-dg-dgux*)
1598 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
671aa708
NN
1599 ;;
1600 m88k-harris-cxux*)
1601 # Under CX/UX, we want to tell the compiler to use ANSI mode.
1602 tentative_cc="cc -Xa"
1603 host_makefile_frag="config/mh-cxux"
1604 ;;
1605 m88k-motorola-sysv*)
1606 ;;
1607 mips*-dec-ultrix*)
1608 tentative_cc="cc -Wf,-XNg1000"
1609 host_makefile_frag="config/mh-decstation"
1610 ;;
1611 mips*-nec-sysv4*)
1612 # The C compiler on NEC MIPS SVR4 needs bigger tables.
1613 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1614 host_makefile_frag="config/mh-necv4"
1615 ;;
1616 mips*-sgi-irix4*)
1617 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
1618 # environment. Also bump switch table size so that cp-parse will
1619 # compile. Bump string length limit so linker builds.
1620 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1621 ;;
1622 mips*-*-sysv4*)
1623 host_makefile_frag="config/mh-sysv4"
1624 ;;
1625 mips*-*-sysv*)
1626 # This is for a MIPS running RISC/os 4.52C.
1627
1628 # This is needed for GDB, but needs to be in the top-level make because
1629 # if a library is compiled with the bsd headers and gets linked with the
1630 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1631 # a different size).
1632 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1633 # known except to select the sysv environment. Could we use /proc instead?
1634 # These "sysv environments" and "bsd environments" often end up being a pain.
1635 #
1636 # This is not part of CFLAGS because perhaps not all C compilers have this
1637 # option.
1638 tentative_cc="cc -systype sysv"
1639 ;;
1640 i370-ibm-opened*)
1641 tentative_cc="c89"
1642 ;;
f2a0e225 1643 i[3456789]86-*-sysv5*)
671aa708
NN
1644 host_makefile_frag="config/mh-sysv5"
1645 ;;
f2a0e225 1646 i[3456789]86-*-dgux*)
671aa708
NN
1647 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1648 host_makefile_frag="config/mh-dgux386"
1649 ;;
f2a0e225 1650 i[3456789]86-ncr-sysv4.3*)
671aa708
NN
1651 # The MetaWare compiler will generate a copyright message unless you
1652 # turn it off by adding the -Hnocopyr flag.
1653 tentative_cc="cc -Hnocopyr"
1654 ;;
f2a0e225 1655 i[3456789]86-ncr-sysv4*)
671aa708
NN
1656 # for an NCR 3000 (i486/SVR4) system.
1657 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1658 # This compiler not only emits obnoxious copyright messages every time
1659 # you run it, but it chokes and dies on a whole bunch of GNU source
1660 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1661 tentative_cc="/usr/ccs/ATT/cc"
1662 host_makefile_frag="config/mh-ncr3000"
1663 ;;
f2a0e225 1664 i[3456789]86-*-sco3.2v5*)
671aa708 1665 ;;
f2a0e225 1666 i[3456789]86-*-sco*)
671aa708
NN
1667 # The native C compiler botches some simple uses of const. Unfortunately,
1668 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1669 tentative_cc="cc -Dconst="
1670 host_makefile_frag="config/mh-sco"
1671 ;;
f2a0e225 1672 i[3456789]86-*-udk*)
671aa708
NN
1673 host_makefile_frag="config/mh-sysv5"
1674 ;;
f2a0e225 1675 i[3456789]86-*-solaris2*)
671aa708
NN
1676 host_makefile_frag="config/mh-sysv4"
1677 ;;
f2a0e225 1678 i[3456789]86-*-msdosdjgpp*)
671aa708
NN
1679 host_makefile_frag="config/mh-djgpp"
1680 ;;
1681 *-cygwin*)
1682 host_makefile_frag="config/mh-cygwin"
1683 ;;
1684 *-mingw32*)
1685 host_makefile_frag="config/mh-mingw32"
1686 ;;
1687 *-interix*)
1688 host_makefile_frag="config/mh-interix"
1689 ;;
1690 vax-*-ultrix2*)
1691 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1692 tentative_cc=gcc
1693 ;;
1694 *-*-solaris2*)
1695 host_makefile_frag="config/mh-solaris"
1696 ;;
1697 m68k-sun-sunos*)
1698 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1699 # without overflowing the jump tables (-J says to use a 32 bit table)
1700 tentative_cc="cc -J"
1701 ;;
1702 *-hp-hpux*)
1703 tentative_cc="cc -Wp,-H256000"
1704 ;;
1705 *-*-hiux*)
1706 tentative_cc="cc -Wp,-H256000"
1707 ;;
1708 rs6000-*-lynxos*)
1709 # /bin/cc is less than useful for our purposes. Always use GCC
1710 tentative_cc="/usr/cygnus/progressive/bin/gcc"
1711 host_makefile_frag="config/mh-lynxrs6k"
1712 ;;
1713 *-*-lynxos*)
1714 # /bin/cc is less than useful for our purposes. Always use GCC
1715 tentative_cc="/bin/gcc"
1716 ;;
1717 *-*-sysv4*)
1718 host_makefile_frag="config/mh-sysv4"
1719 ;;
1720esac
1721fi
1722
55ffb5ed
NN
1723# If we aren't going to be using gcc, see if we can extract a definition
1724# of CC from the fragment.
1725# Actually, use the 'pre-extracted' version above.
1726if test -z "${CC}" && test "${build}" = "${host}" ; then
1727 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1728 found=
1729 for dir in $PATH; do
1730 test -z "$dir" && dir=.
1731 if test -f $dir/gcc; then
1732 found=yes
1733 break
1734 fi
1735 done
1736 IFS="$save_ifs"
1737 if test -z "${found}" && test -n "${tentative_cc}" ; then
1738 CC=$tentative_cc
1739 fi
1740fi
1741
1742if test "${build}" != "${host}" ; then
1743 # If we are doing a Canadian Cross, in which the host and build systems
1744 # are not the same, we set reasonable default values for the tools.
1745
1746 BISON=${BISON-bison}
1747 CC=${CC-${host_alias}-gcc}
1748 CFLAGS=${CFLAGS-"-g -O2"}
1749 CXX=${CXX-${host_alias}-c++}
1750 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1751 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
1752 CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
1753 CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
1754 GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
1755 GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
1756 BUILD_PREFIX=${build_alias}-
1757 BUILD_PREFIX_1=${build_alias}-
1758 MAKEINFO=${MAKEINFO-makeinfo}
1759
1760 if test -z "${YACC}" ; then
1761 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1762 for dir in $PATH; do
1763 test -z "$dir" && dir=.
1764 if test -f $dir/bison; then
1765 YACC="bison -y"
1766 break
1767 fi
1768 if test -f $dir/byacc; then
1769 YACC=byacc
1770 break
1771 fi
1772 if test -f $dir/yacc; then
1773 YACC=yacc
1774 break
1775 fi
1776 done
1777 IFS="$save_ifs"
1778 if test -z "${YACC}" ; then
1779 YACC="bison -y"
1780 fi
1781 fi
1782
1783 if test -z "${LEX}" ; then
1784 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1785 for dir in $PATH; do
1786 test -z "$dir" && dir=.
1787 if test -f $dir/flex; then
1788 LEX=flex
1789 break
1790 fi
1791 if test -f $dir/lex; then
1792 LEX=lex
1793 break
1794 fi
1795 done
1796 IFS="$save_ifs"
1797 LEX=${LEX-flex}
1798 fi
1799
1800else
1801 # Set reasonable default values for some tools even if not Canadian.
1802 # Of course, these are different reasonable default values, originally
1803 # specified directly in the Makefile.
1804 # We don't export, so that autoconf can do its job.
1805 # Note that all these settings are above the fragment inclusion point
1806 # in Makefile.in, so can still be overridden by fragments.
1807 # This is all going to change when we autoconfiscate...
1808
1809 BISON="\$(USUAL_BISON)"
1810 CC_FOR_BUILD="\$(CC)"
1811 GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
1812 BUILD_PREFIX=
1813 BUILD_PREFIX_1=loser-
1814 MAKEINFO="\$(USUAL_MAKEINFO)"
1815 LEX="\$(USUAL_LEX)"
1816 YACC="\$(USUAL_YACC)"
1817
1818 # If CC is still not set, try to get gcc.
1819 cc_prog_is_gcc=
1820 if test -z "${CC}" ; then
1821 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
1822 for dir in $PATH; do
1823 test -z "$dir" && dir=.
1824 if test -f $dir/gcc; then
1825 CC="gcc"
1826 cc_prog_is_gcc=yes
1827 echo 'void f(){}' > conftest.c
1828 if test -z "`${CC} -g -c conftest.c 2>&1`"; then
1829 CFLAGS=${CFLAGS-"-g -O2"}
1830 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1831 else
1832 CFLAGS=${CFLAGS-"-O2"}
1833 CXXFLAGS=${CXXFLAGS-"-O2"}
1834 fi
1835 rm -f conftest*
1836 break
1837 fi
1838 done
1839 IFS="$save_ifs"
1840 CC=${CC-cc}
1841 else
1842 # Determine if we are using gcc.
1843 cat > conftest.c <<EOF
1844#ifdef __GNUC__
1845 yes;
1846#endif
1847EOF
1848 if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
1849 cc_prog_is_gcc=yes
1850 fi
1851 rm -f conftest.c
1852 if test -z "${CFLAGS}"; then
1853 # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
1854 # is set to a version of gcc.
1855 if test "$cc_prog_is_gcc" = yes; then
1856 echo 'void f(){}' > conftest.c
1857 if test -z "`${CC} -g -c conftest.c 2>&1`"; then
1858 CFLAGS=${CFLAGS-"-g -O2"}
1859 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1860 else
1861 CFLAGS=${CFLAGS-"-O2"}
1862 CXXFLAGS=${CXXFLAGS-"-O2"}
1863 fi
1864 rm -f conftest*
1865 fi
1866 fi
1867 fi
1868
1869 # We must set the default linker to the linker used by gcc for the correct
1870 # operation of libtool. If LD is not defined and we are using gcc, try to
1871 # set the LD default to the ld used by gcc.
1872 if test -z "$LD"; then
1873 if test "$cc_prog_is_gcc" = yes; then
1874 case $build in
1875 *-*-mingw*)
1876 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
1877 *)
1878 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
1879 esac
1880 case $gcc_prog_ld in
1881 # Accept absolute paths.
1882 [\\/]* | [A-Za-z]:[\\/]*)
1883 LD="$gcc_prog_ld" ;;
1884 esac
1885 fi
1886 fi
1887
1888 CXX=${CXX-"c++"}
1889 CFLAGS=${CFLAGS-"-g"}
1890 CXXFLAGS=${CXXFLAGS-"-g -O2"}
1891fi
1892
1893if test $host != $build; then
1894 ac_tool_prefix=${host_alias}-
1895else
1896 ac_tool_prefix=
1897fi
1898
1899# Extract the first word of "gcc", so it can be a program name with args.
1900set dummy gcc; ac_word=$2
1901echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 1902echo "configure:1903: checking for $ac_word" >&5
55ffb5ed
NN
1903if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1904 echo $ac_n "(cached) $ac_c" 1>&6
1905else
1906 if test -n "$CC"; then
1907 ac_cv_prog_CC="$CC" # Let the user override the test.
1908else
1909 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1910 ac_dummy="$PATH"
1911 for ac_dir in $ac_dummy; do
1912 test -z "$ac_dir" && ac_dir=.
1913 if test -f $ac_dir/$ac_word; then
1914 ac_cv_prog_CC="gcc"
1915 break
1916 fi
1917 done
1918 IFS="$ac_save_ifs"
1919fi
1920fi
1921CC="$ac_cv_prog_CC"
1922if test -n "$CC"; then
1923 echo "$ac_t""$CC" 1>&6
1924else
1925 echo "$ac_t""no" 1>&6
1926fi
1927
1928if test -z "$CC"; then
1929 # Extract the first word of "cc", so it can be a program name with args.
1930set dummy cc; ac_word=$2
1931echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 1932echo "configure:1933: checking for $ac_word" >&5
55ffb5ed
NN
1933if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1934 echo $ac_n "(cached) $ac_c" 1>&6
1935else
1936 if test -n "$CC"; then
1937 ac_cv_prog_CC="$CC" # Let the user override the test.
1938else
1939 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1940 ac_prog_rejected=no
1941 ac_dummy="$PATH"
1942 for ac_dir in $ac_dummy; do
1943 test -z "$ac_dir" && ac_dir=.
1944 if test -f $ac_dir/$ac_word; then
1945 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1946 ac_prog_rejected=yes
1947 continue
1948 fi
1949 ac_cv_prog_CC="cc"
1950 break
1951 fi
1952 done
1953 IFS="$ac_save_ifs"
1954if test $ac_prog_rejected = yes; then
1955 # We found a bogon in the path, so make sure we never use it.
1956 set dummy $ac_cv_prog_CC
1957 shift
1958 if test $# -gt 0; then
1959 # We chose a different compiler from the bogus one.
1960 # However, it has the same basename, so the bogon will be chosen
1961 # first if we set CC to just the basename; use the full file name.
1962 shift
1963 set dummy "$ac_dir/$ac_word" "$@"
1964 shift
1965 ac_cv_prog_CC="$@"
1966 fi
1967fi
1968fi
1969fi
1970CC="$ac_cv_prog_CC"
1971if test -n "$CC"; then
1972 echo "$ac_t""$CC" 1>&6
1973else
1974 echo "$ac_t""no" 1>&6
1975fi
1976
1977 if test -z "$CC"; then
1978 case "`uname -s`" in
1979 *win32* | *WIN32*)
1980 # Extract the first word of "cl", so it can be a program name with args.
1981set dummy cl; ac_word=$2
1982echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 1983echo "configure:1984: checking for $ac_word" >&5
55ffb5ed
NN
1984if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1985 echo $ac_n "(cached) $ac_c" 1>&6
1986else
1987 if test -n "$CC"; then
1988 ac_cv_prog_CC="$CC" # Let the user override the test.
1989else
1990 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1991 ac_dummy="$PATH"
1992 for ac_dir in $ac_dummy; do
1993 test -z "$ac_dir" && ac_dir=.
1994 if test -f $ac_dir/$ac_word; then
1995 ac_cv_prog_CC="cl"
1996 break
1997 fi
1998 done
1999 IFS="$ac_save_ifs"
2000fi
2001fi
2002CC="$ac_cv_prog_CC"
2003if test -n "$CC"; then
2004 echo "$ac_t""$CC" 1>&6
2005else
2006 echo "$ac_t""no" 1>&6
2007fi
2008 ;;
2009 esac
2010 fi
2011 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2012fi
2013
2014echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
4f4e53dd 2015echo "configure:2016: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
55ffb5ed
NN
2016
2017ac_ext=c
2018# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2019ac_cpp='$CPP $CPPFLAGS'
2020ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2021ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2022cross_compiling=$ac_cv_prog_cc_cross
2023
2024cat > conftest.$ac_ext << EOF
2025
4f4e53dd 2026#line 2027 "configure"
55ffb5ed
NN
2027#include "confdefs.h"
2028
2029main(){return(0);}
2030EOF
4f4e53dd 2031if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
55ffb5ed
NN
2032 ac_cv_prog_cc_works=yes
2033 # If we can't run a trivial program, we are probably using a cross compiler.
2034 if (./conftest; exit) 2>/dev/null; then
2035 ac_cv_prog_cc_cross=no
2036 else
2037 ac_cv_prog_cc_cross=yes
2038 fi
2039else
2040 echo "configure: failed program was:" >&5
2041 cat conftest.$ac_ext >&5
2042 ac_cv_prog_cc_works=no
2043fi
2044rm -fr conftest*
2045ac_ext=c
2046# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2047ac_cpp='$CPP $CPPFLAGS'
2048ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2049ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2050cross_compiling=$ac_cv_prog_cc_cross
2051
2052echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2053if test $ac_cv_prog_cc_works = no; then
2054 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2055fi
2056echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
4f4e53dd 2057echo "configure:2058: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
55ffb5ed
NN
2058echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2059cross_compiling=$ac_cv_prog_cc_cross
2060
2061echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
4f4e53dd 2062echo "configure:2063: checking whether we are using GNU C" >&5
55ffb5ed
NN
2063if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2064 echo $ac_n "(cached) $ac_c" 1>&6
2065else
2066 cat > conftest.c <<EOF
2067#ifdef __GNUC__
2068 yes;
2069#endif
2070EOF
4f4e53dd 2071if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
55ffb5ed
NN
2072 ac_cv_prog_gcc=yes
2073else
2074 ac_cv_prog_gcc=no
2075fi
2076fi
2077
2078echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2079
2080if test $ac_cv_prog_gcc = yes; then
2081 GCC=yes
2082else
2083 GCC=
2084fi
2085
2086ac_test_CFLAGS="${CFLAGS+set}"
2087ac_save_CFLAGS="$CFLAGS"
2088CFLAGS=
2089echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
4f4e53dd 2090echo "configure:2091: checking whether ${CC-cc} accepts -g" >&5
55ffb5ed
NN
2091if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2092 echo $ac_n "(cached) $ac_c" 1>&6
2093else
2094 echo 'void f(){}' > conftest.c
2095if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2096 ac_cv_prog_cc_g=yes
2097else
2098 ac_cv_prog_cc_g=no
2099fi
2100rm -f conftest*
2101
2102fi
2103
2104echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2105if test "$ac_test_CFLAGS" = set; then
2106 CFLAGS="$ac_save_CFLAGS"
2107elif test $ac_cv_prog_cc_g = yes; then
2108 if test "$GCC" = yes; then
2109 CFLAGS="-g -O2"
2110 else
2111 CFLAGS="-g"
2112 fi
2113else
2114 if test "$GCC" = yes; then
2115 CFLAGS="-O2"
2116 else
2117 CFLAGS=
2118 fi
2119fi
2120
2121
2122
2123# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
2124set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
2125echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 2126echo "configure:2127: checking for $ac_word" >&5
55ffb5ed
NN
2127if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2128 echo $ac_n "(cached) $ac_c" 1>&6
2129else
2130 if test -n "$GNATBIND"; then
2131 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2132else
2133 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2134 ac_dummy="$PATH"
2135 for ac_dir in $ac_dummy; do
2136 test -z "$ac_dir" && ac_dir=.
2137 if test -f $ac_dir/$ac_word; then
2138 ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
2139 break
2140 fi
2141 done
2142 IFS="$ac_save_ifs"
2143fi
2144fi
2145GNATBIND="$ac_cv_prog_GNATBIND"
2146if test -n "$GNATBIND"; then
2147 echo "$ac_t""$GNATBIND" 1>&6
2148else
2149 echo "$ac_t""no" 1>&6
2150fi
2151
2152
2153if test -z "$ac_cv_prog_GNATBIND"; then
2154if test -n "$ac_tool_prefix"; then
2155 # Extract the first word of "gnatbind", so it can be a program name with args.
2156set dummy gnatbind; ac_word=$2
2157echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 2158echo "configure:2159: checking for $ac_word" >&5
55ffb5ed
NN
2159if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
2160 echo $ac_n "(cached) $ac_c" 1>&6
2161else
2162 if test -n "$GNATBIND"; then
2163 ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
2164else
2165 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2166 ac_dummy="$PATH"
2167 for ac_dir in $ac_dummy; do
2168 test -z "$ac_dir" && ac_dir=.
2169 if test -f $ac_dir/$ac_word; then
2170 ac_cv_prog_GNATBIND="gnatbind"
2171 break
2172 fi
2173 done
2174 IFS="$ac_save_ifs"
2175 test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
2176fi
2177fi
2178GNATBIND="$ac_cv_prog_GNATBIND"
2179if test -n "$GNATBIND"; then
2180 echo "$ac_t""$GNATBIND" 1>&6
2181else
2182 echo "$ac_t""no" 1>&6
2183fi
2184
2185else
2186 GNATBIND="no"
2187fi
2188fi
2189
2190echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
4f4e53dd 2191echo "configure:2192: checking whether compiler driver understands Ada" >&5
55ffb5ed
NN
2192if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194else
2195 cat >conftest.adb <<EOF
2196procedure conftest is begin null; end conftest;
2197EOF
2198acx_cv_cc_gcc_supports_ada=no
2199# There is a bug in old released versions of GCC which causes the
2200# driver to exit successfully when the appropriate language module
2201# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
2202# Therefore we must check for the error message as well as an
2203# unsuccessful exit.
1db673ca
RO
2204# Other compilers, like HP Tru64 UNIX cc, exit successfully when
2205# given a .adb file, but produce no object file. So we must check
2206# if an object file was really produced to guard against this.
55ffb5ed 2207errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
1db673ca 2208if test x"$errors" = x && test -f conftest.$ac_objext; then
55ffb5ed
NN
2209 acx_cv_cc_gcc_supports_ada=yes
2210 break
2211fi
2212rm -f conftest.*
2213fi
2214
2215echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
2216
1db673ca 2217if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
55ffb5ed
NN
2218 have_gnat=yes
2219else
2220 have_gnat=no
2221fi
2222
a76494aa 2223echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
4f4e53dd 2224echo "configure:2225: checking how to compare bootstrapped objects" >&5
a76494aa
PB
2225if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
2226 echo $ac_n "(cached) $ac_c" 1>&6
2227else
2228 echo abfoo >t1
2229 echo cdfoo >t2
2230 gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2'
6cf1ac42
PB
2231 if cmp t1 t2 2 2 > /dev/null 2>&1; then
2232 if cmp t1 t2 1 1 > /dev/null 2>&1; then
2233 :
2234 else
2235 gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16'
2236 fi
2237 fi
a76494aa
PB
2238 if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then
2239 if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then
6cf1ac42 2240 :
a76494aa
PB
2241 else
2242 gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
2243 fi
2244 fi
2245 rm t1 t2
2246
2247fi
2248
2249echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
2250do_compare="$gcc_cv_prog_cmp_skip"
2251
2252
55ffb5ed 2253
6de9cd9a
DN
2254# Check for GMP
2255gmplibs=
2256gmpinc=
2257have_gmp=yes
2258# Specify a location for gmp
2259# Check whether --with-gmp-dir or --without-gmp-dir was given.
2260if test "${with_gmp_dir+set}" = set; then
2261 withval="$with_gmp_dir"
2262 :
2263fi
2264
2265
2266if test "x$with_gmp_dir" != x && test -f "$with_gmp_dir/gmp.h"; then
2267 gmpinc="-I$with_gmp_dir"
2268 if test -f "$with_gmp_dir/.libs/libgmp.a"; then
2269 gmplibs="$with_gmp_dir/.libs/libgmp.a"
2270 elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
2271 gmplibs="$with_gmp_dir/_libs/libgmp.a"
2272 fi
2273 # One of the later tests will catch the error if neither library is present.
2274fi
2275
2276# Check whether --with-gmp or --without-gmp was given.
2277if test "${with_gmp+set}" = set; then
2278 withval="$with_gmp"
2279 :
2280fi
2281
2282
2283if test "x$with_gmp" != x && test -d "$with_gmp"; then
2284 gmplibs="-L$with_gmp/lib -lgmp"
2285 gmpinc="-I$with_gmp/include"
2286fi
2287
2288# Use system gmp if nothing else specified
2289if test "x$gmplibs" = x; then
2290 gmplibs="-lgmp"
2291fi
2292
2293saved_CFLAGS="$CFLAGS"
2294CFLAGS="$CFLAGS $gmpinc"
2295# Check GMP actually works
2296echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
4f4e53dd 2297echo "configure:2298: checking for correct version of gmp.h" >&5
6de9cd9a 2298cat > conftest.$ac_ext <<EOF
4f4e53dd 2299#line 2300 "configure"
6de9cd9a
DN
2300#include "confdefs.h"
2301#include "gmp.h"
2302int main() {
2303
2304#if __GNU_MP_VERSION < 3
2305choke me
2306#endif
2307
2308; return 0; }
2309EOF
4f4e53dd 2310if { (eval echo configure:2311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6de9cd9a
DN
2311 rm -rf conftest*
2312 echo "$ac_t""yes" 1>&6
2313else
2314 echo "configure: failed program was:" >&5
2315 cat conftest.$ac_ext >&5
2316 rm -rf conftest*
2317 echo "$ac_t""no" 1>&6; have_gmp=no
2318fi
2319rm -f conftest*
2320
2321if test x"$have_gmp" = xyes; then
2322 echo $ac_n "checking for mpf_init in -lgmp""... $ac_c" 1>&6
4f4e53dd 2323echo "configure:2324: checking for mpf_init in -lgmp" >&5
6de9cd9a
DN
2324
2325 saved_LIBS="$LIBS"
2326 LIBS="$LIBS $gmplibs"
2327 cat > conftest.$ac_ext <<EOF
4f4e53dd 2328#line 2329 "configure"
6de9cd9a
DN
2329#include "confdefs.h"
2330#include <gmp.h>
2331int main() {
2332mpf_t n; mpf_init(n);
2333; return 0; }
2334EOF
4f4e53dd 2335if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6de9cd9a
DN
2336 rm -rf conftest*
2337 echo "$ac_t""yes" 1>&6
2338else
2339 echo "configure: failed program was:" >&5
2340 cat conftest.$ac_ext >&5
2341 rm -rf conftest*
2342 echo "$ac_t""no" 1>&6; have_gmp=no
2343fi
2344rm -f conftest*
2345 LIBS="$saved_LIBS"
2346 CFLAGS="$saved_CFLAGS"
2347fi
2348
2349
2350
2351
1e0f07d3 2352# By default, C is the only stage 1 language.
2805b53a
NN
2353stage1_languages=c
2354
2355
55ffb5ed
NN
2356# Figure out what language subdirectories are present.
2357# Look if the user specified --enable-languages="..."; if not, use
2358# the environment variable $LANGUAGES if defined. $LANGUAGES might
2359# go away some day.
2360# NB: embedded tabs in this IF block -- do not untabify
2361if test -d ${srcdir}/gcc; then
2362 if test x"${enable_languages+set}" != xset; then
2363 if test x"${LANGUAGES+set}" = xset; then
2364 enable_languages="${LANGUAGES}"
2365 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
2366 else
2367 enable_languages=all
2368 fi
2369 else
2370 if test x"${enable_languages}" = x ||
2371 test x"${enable_languages}" = xyes;
2372 then
2373 echo configure.in: --enable-languages needs at least one language argument 1>&2
2374 exit 1
2375 fi
2376 fi
2377 enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
2378
2379 # First scan to see if an enabled language requires some other language.
2380 # We assume that a given config-lang.in will list all the language
2381 # front ends it requires, even if some are required indirectly.
2382 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2383 case ${lang_frag} in
2384 ..) ;;
2385 # The odd quoting in the next line works around
2386 # an apparent bug in bash 1.12 on linux.
2387 ${srcdir}/gcc/[*]/config-lang.in) ;;
2388 *)
2389 # From the config-lang.in, get $language, $lang_requires
2390 language=
2391 lang_requires=
2392 . ${lang_frag}
2393 for other in ${lang_requires} ; do
2394 case ,${enable_languages}, in
2395 *,$other,*) ;;
2396 *,all,*) ;;
2397 *,$language,*)
2398 echo " \`$other' language required by \`$language'; enabling" 1>&2
2399 enable_languages="${enable_languages},${other}"
2400 ;;
2401 esac
2402 done
2403 ;;
2404 esac
2405 done
2406
2407 new_enable_languages=c
2408 missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
2409
2410 for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
2411 case ${lang_frag} in
2412 ..) ;;
2413 # The odd quoting in the next line works around
2414 # an apparent bug in bash 1.12 on linux.
2415 ${srcdir}/gcc/[*]/config-lang.in) ;;
2416 *)
2417 # From the config-lang.in, get $language, $target_libs,
2805b53a 2418 # $lang_dirs, $boot_language, and $build_by_default
55ffb5ed
NN
2419 language=
2420 target_libs=
2421 lang_dirs=
2805b53a 2422 boot_language=
55ffb5ed 2423 build_by_default=
6de9cd9a 2424 need_gmp=
55ffb5ed
NN
2425 . ${lang_frag}
2426 # This is quite sensitive to the ordering of the case statement arms.
2427 case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
2428 *::*:*)
2429 echo "${lang_frag} doesn't set \$language." 1>&2
2430 exit 1
2431 ;;
2432 *:ada:no:*)
2433 # Ada was requested with no preexisting GNAT. Disable unconditionally.
2434 add_this_lang=no
2435 ;;
2436 *,${language},*:*:*:*)
2437 # Language was explicitly selected; include it.
2438 add_this_lang=yes
2439 ;;
2440 *,all,*:*:*:no)
2441 # 'all' was selected, but this is not a default language
2442 # so do not include it.
2443 add_this_lang=no
2444 ;;
2445 *,all,*:*:*:*)
2446 # 'all' was selected and this is a default language; include it.
2447 add_this_lang=yes
2448 ;;
2449 *)
2450 add_this_lang=no
2451 ;;
2452 esac
6de9cd9a
DN
2453
2454 # Disable language that need GMP if it isn't available.
2455 if test x"$need_gmp" = xyes && test x"$have_gmp" = xno; then
2456 add_this_lang=no
2457 fi
2458
2459 case $add_this_lang in
55ffb5ed
NN
2460 no)
2461 # Remove language-dependent dirs.
2805b53a
NN
2462 eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
2463 ;;
55ffb5ed
NN
2464 *)
2465 new_enable_languages="$new_enable_languages,$language"
2805b53a
NN
2466 missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
2467 case ${boot_language} in
2468 yes)
340de83f
NN
2469 # Add to (comma-separated) list of stage 1 languages.
2470 stage1_languages="${stage1_languages},${language}"
2805b53a
NN
2471 ;;
2472 esac
2473 ;;
55ffb5ed
NN
2474 esac
2475 ;;
2476 esac
2477 done
2478
79b4b7d2 2479 missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
55ffb5ed
NN
2480 if test "x$missing_languages" != x; then
2481 { echo "configure: error:
2482The following requested languages were not found: ${missing_languages}" 1>&2; exit 1; }
2483 fi
2484
2485 if test "x$new_enable_languages" != "x$enable_languages"; then
2486 echo The following languages will be built: ${new_enable_languages}
2487 fi
2488 enable_languages="$new_enable_languages"
6bbec498 2489 ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
55ffb5ed
NN
2490fi
2491
2492# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
2493# $target_configdirs.
2494# If we have the source for $noconfigdirs entries, add them to $notsupp.
2495
2496notsupp=""
2497for dir in . $skipdirs $noconfigdirs ; do
2498 dirname=`echo $dir | sed -e s/target-//g`
2499 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2500 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
2501 if test -r $srcdir/$dirname/configure ; then
2502 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2503 true
2504 else
2505 notsupp="$notsupp $dir"
2506 fi
2507 fi
2508 fi
2509 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2510 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
2511 if test -r $srcdir/$dirname/configure ; then
2512 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2513 true
2514 else
2515 notsupp="$notsupp $dir"
2516 fi
2517 fi
2518 fi
2519done
2520
2521# Sometimes the tools are distributed with libiberty but with no other
2522# libraries. In that case, we don't want to build target-libiberty.
2523if test -n "${target_configdirs}" ; then
2524 others=
2525 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
2526 if test "$i" != "libiberty" ; then
2527 if test -r $srcdir/$i/configure ; then
2528 others=yes;
2529 break;
2530 fi
2531 fi
2532 done
2533 if test -z "${others}" ; then
2534 target_configdirs=
2535 fi
2536fi
2537
2538# Quietly strip out all directories which aren't configurable in this tree.
2539# This relies on all configurable subdirectories being autoconfiscated, which
2540# is now the case.
2541configdirs_all="$configdirs"
2542configdirs=
2543for i in ${configdirs_all} ; do
2544 if test -f ${srcdir}/$i/configure ; then
2545 configdirs="${configdirs} $i"
2546 fi
2547done
2548target_configdirs_all="$target_configdirs"
2549target_configdirs=
2550for i in ${target_configdirs_all} ; do
2551 j=`echo $i | sed -e s/target-//g`
2552 if test -f ${srcdir}/$j/configure ; then
2553 target_configdirs="${target_configdirs} $i"
2554 fi
2555done
2556
2557# Produce a warning message for the subdirs we can't configure.
2558# This isn't especially interesting in the Cygnus tree, but in the individual
2559# FSF releases, it's important to let people know when their machine isn't
2560# supported by the one or two programs in a package.
2561
2562if test -n "${notsupp}" && test -z "${norecursion}" ; then
2563 # If $appdirs is non-empty, at least one of those directories must still
2564 # be configured, or we error out. (E.g., if the gas release supports a
2565 # specified target in some subdirs but not the gas subdir, we shouldn't
2566 # pretend that all is well.)
2567 if test -n "$appdirs" ; then
2568 for dir in $appdirs ; do
2569 if test -r $dir/Makefile.in ; then
2570 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2571 appdirs=""
2572 break
2573 fi
2574 if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
2575 appdirs=""
2576 break
2577 fi
2578 fi
2579 done
2580 if test -n "$appdirs" ; then
2581 echo "*** This configuration is not supported by this package." 1>&2
2582 exit 1
2583 fi
2584 fi
2585 # Okay, some application will build, or we don't care to check. Still
2586 # notify of subdirs not getting built.
2587 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
2588 echo " ${notsupp}" 1>&2
2589 echo " (Any other directories should still work fine.)" 1>&2
2590fi
2591
2592case "$host" in
2593 *msdosdjgpp*)
2594 enable_gdbtk=no ;;
2595esac
2596
2597copy_dirs=
2598
2599# Handle --with-headers=XXX. If the value is not "yes", the contents of
2600# the named directory are copied to $(tooldir)/sys-include.
2601if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
2602 if test x${is_cross_compiler} = xno ; then
2603 echo 1>&2 '***' --with-headers is only supported when cross compiling
2604 exit 1
2605 fi
2606 if test x"${with_headers}" != xyes ; then
2607 case "${exec_prefixoption}" in
2608 "") x=${prefix} ;;
2609 *) x=${exec_prefix} ;;
2610 esac
2611 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
2612 fi
2613fi
2614
2615# Handle --with-libs=XXX. If the value is not "yes", the contents of
2616# the name directories are copied to $(tooldir)/lib. Multiple directories
2617# are permitted.
2618if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
2619 if test x${is_cross_compiler} = xno ; then
2620 echo 1>&2 '***' --with-libs is only supported when cross compiling
2621 exit 1
2622 fi
2623 if test x"${with_libs}" != xyes ; then
2624 # Copy the libraries in reverse order, so that files in the first named
2625 # library override files in subsequent libraries.
2626 case "${exec_prefixoption}" in
2627 "") x=${prefix} ;;
2628 *) x=${exec_prefix} ;;
2629 esac
2630 for l in ${with_libs}; do
2631 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
2632 done
2633 fi
2634fi
2635
2636# Handle ${copy_dirs}
2637set fnord ${copy_dirs}
2638shift
2639while test $# != 0 ; do
2640 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
2641 :
2642 else
2643 echo Copying $1 to $2
2644
2645 # Use the install script to create the directory and all required
2646 # parent directories.
2647 if test -d $2 ; then
2648 :
2649 else
2650 echo >config.temp
2651 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
2652 fi
2653
2654 # Copy the directory, assuming we have tar.
2655 # FIXME: Should we use B in the second tar? Not all systems support it.
2656 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
2657
2658 # It is the responsibility of the user to correctly adjust all
2659 # symlinks. If somebody can figure out how to handle them correctly
2660 # here, feel free to add the code.
2661
2662 echo $1 > $2/COPIED
2663 fi
2664 shift; shift
2665done
2666
671aa708
NN
2667extra_arflags_for_target=
2668extra_nmflags_for_target=
2669extra_ranlibflags_for_target=
2670target_makefile_frag=/dev/null
2671case "${target}" in
f2a0e225 2672 i[3456789]86-*-netware*)
671aa708
NN
2673 target_makefile_frag="config/mt-netware"
2674 ;;
2675 powerpc-*-netware*)
2676 target_makefile_frag="config/mt-netware"
2677 ;;
2678 *-*-linux*)
2679 target_makefile_frag="config/mt-linux"
2680 ;;
2681 *-*-aix4.[3456789]* | *-*-aix[56789].*)
2682 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
2683 # commands to handle both 32-bit and 64-bit objects. These flags are
2684 # harmless if we're using GNU nm or ar.
2685 extra_arflags_for_target=" -X32_64"
2686 extra_nmflags_for_target=" -B -X32_64"
2687 ;;
2688 *-*-darwin*)
2689 # ranlib from Darwin requires the -c flag to look at common symbols.
2690 extra_ranlibflags_for_target=" -c"
2691 ;;
2692 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
2693 target_makefile_frag="config/mt-wince"
2694 ;;
2695esac
2696
2697alphaieee_frag=/dev/null
2698case $target in
2699 alpha*-*-*)
2700 # This just makes sure to use the -mieee option to build target libs.
2701 # This should probably be set individually by each library.
2702 alphaieee_frag="config/mt-alphaieee"
2703 ;;
2704esac
2705
2706# If --enable-target-optspace always use -Os instead of -O2 to build
2707# the target libraries, similarly if it is not specified, use -Os
2708# on selected platforms.
2709ospace_frag=/dev/null
2710case "${enable_target_optspace}:${target}" in
2711 yes:*)
2712 ospace_frag="config/mt-ospace"
2713 ;;
2714 :d30v-*)
2715 ospace_frag="config/mt-d30v"
2716 ;;
2717 :m32r-* | :d10v-* | :fr30-*)
2718 ospace_frag="config/mt-ospace"
2719 ;;
2720 no:* | :*)
2721 ;;
2722 *)
2723 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2724 ;;
2725esac
2726
2727# Set with_gnu_as and with_gnu_ld as appropriate.
2728#
2729# This is done by determining whether or not the appropriate directory
2730# is available, and by checking whether or not specific configurations
2731# have requested that this magic not happen.
2732#
2733# The command line options always override the explicit settings in
2734# configure.in, and the settings in configure.in override this magic.
2735#
2736# If the default for a toolchain is to use GNU as and ld, and you don't
2737# want to do that, then you should use the --without-gnu-as and
2738# --without-gnu-ld options for the configure script.
2739
2740if test x${use_gnu_as} = x &&
2741 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2742 with_gnu_as=yes
2743 extra_host_args="$extra_host_args --with-gnu-as"
2744fi
2745
2746if test x${use_gnu_ld} = x &&
2747 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2748 with_gnu_ld=yes
2749 extra_host_args="$extra_host_args --with-gnu-ld"
2750fi
2751
2752# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2753# can detect this case.
2754
2755if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2756 with_newlib=yes
2757 extra_host_args="$extra_host_args --with-newlib"
2758fi
2759
6de9cd9a
DN
2760if test x${with_libbanshee} = xyes && echo " ${configdirs} " | grep " libbanshee " >/dev/null 2>&1; then
2761 extra_host_args="$extra_host_args --with-libbanshee"
2762fi
671aa708
NN
2763
2764# Default to using --with-stabs for certain targets.
2765if test x${with_stabs} = x ; then
2766 case "${target}" in
89a95129 2767 mips*-*-irix[56]*)
671aa708
NN
2768 ;;
2769 mips*-*-* | alpha*-*-osf*)
2770 with_stabs=yes;
2771 extra_host_args="${extra_host_args} --with-stabs"
2772 ;;
2773 esac
2774fi
2775
2776# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
2777# them automatically.
2778case "${host}" in
2779 hppa*64*-*-hpux11*)
2780 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2781 ;;
2782esac
2783
671aa708
NN
2784# Some systems (e.g., one of the i386-aix systems the gas testers are
2785# using) don't handle "\$" correctly, so don't use it here.
df445104 2786tooldir='${exec_prefix}'/${target_alias}
671aa708
NN
2787build_tooldir=${tooldir}
2788
1e0f07d3
PB
2789# Generate default definitions for YACC, M4, LEX. These are used if the
2790# Makefile can't locate these programs in objdir.
2791MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
2792for ac_prog in 'bison -y' byacc yacc
671aa708 2793do
1e0f07d3
PB
2794# Extract the first word of "$ac_prog", so it can be a program name with args.
2795set dummy $ac_prog; ac_word=$2
2796echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 2797echo "configure:2798: checking for $ac_word" >&5
1e0f07d3
PB
2798if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_YACC'+set}'`\" = set"; then
2799 echo $ac_n "(cached) $ac_c" 1>&6
2800else
2801 if test -n "$DEFAULT_YACC"; then
2802 ac_cv_prog_DEFAULT_YACC="$DEFAULT_YACC" # Let the user override the test.
2803else
2804 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2805 ac_dummy="$PATH"
2806 for ac_dir in $ac_dummy; do
2807 test -z "$ac_dir" && ac_dir=.
2808 if test -f $ac_dir/$ac_word; then
2809 ac_cv_prog_DEFAULT_YACC="$ac_prog"
671aa708
NN
2810 break
2811 fi
2812 done
1e0f07d3
PB
2813 IFS="$ac_save_ifs"
2814fi
2815fi
2816DEFAULT_YACC="$ac_cv_prog_DEFAULT_YACC"
2817if test -n "$DEFAULT_YACC"; then
2818 echo "$ac_t""$DEFAULT_YACC" 1>&6
2819else
2820 echo "$ac_t""no" 1>&6
2821fi
671aa708 2822
1e0f07d3 2823test -n "$DEFAULT_YACC" && break
671aa708 2824done
1e0f07d3 2825test -n "$DEFAULT_YACC" || DEFAULT_YACC="$MISSING bison"
671aa708 2826
1e0f07d3 2827for ac_prog in gm4 gnum4 m4
671aa708 2828do
1e0f07d3
PB
2829# Extract the first word of "$ac_prog", so it can be a program name with args.
2830set dummy $ac_prog; ac_word=$2
2831echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 2832echo "configure:2833: checking for $ac_word" >&5
1e0f07d3
PB
2833if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_M4'+set}'`\" = set"; then
2834 echo $ac_n "(cached) $ac_c" 1>&6
2835else
2836 if test -n "$DEFAULT_M4"; then
2837 ac_cv_prog_DEFAULT_M4="$DEFAULT_M4" # Let the user override the test.
2838else
2839 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2840 ac_dummy="$PATH"
2841 for ac_dir in $ac_dummy; do
2842 test -z "$ac_dir" && ac_dir=.
2843 if test -f $ac_dir/$ac_word; then
2844 ac_cv_prog_DEFAULT_M4="$ac_prog"
671aa708
NN
2845 break
2846 fi
2847 done
1e0f07d3
PB
2848 IFS="$ac_save_ifs"
2849fi
2850fi
2851DEFAULT_M4="$ac_cv_prog_DEFAULT_M4"
2852if test -n "$DEFAULT_M4"; then
2853 echo "$ac_t""$DEFAULT_M4" 1>&6
2854else
2855 echo "$ac_t""no" 1>&6
2856fi
671aa708 2857
1e0f07d3 2858test -n "$DEFAULT_M4" && break
671aa708 2859done
1e0f07d3 2860test -n "$DEFAULT_M4" || DEFAULT_M4="$MISSING m4"
671aa708 2861
1e0f07d3 2862for ac_prog in flex lex
671aa708 2863do
1e0f07d3
PB
2864# Extract the first word of "$ac_prog", so it can be a program name with args.
2865set dummy $ac_prog; ac_word=$2
2866echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 2867echo "configure:2868: checking for $ac_word" >&5
1e0f07d3
PB
2868if eval "test \"`echo '$''{'ac_cv_prog_DEFAULT_LEX'+set}'`\" = set"; then
2869 echo $ac_n "(cached) $ac_c" 1>&6
2870else
2871 if test -n "$DEFAULT_LEX"; then
2872 ac_cv_prog_DEFAULT_LEX="$DEFAULT_LEX" # Let the user override the test.
2873else
2874 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2875 ac_dummy="$PATH"
2876 for ac_dir in $ac_dummy; do
2877 test -z "$ac_dir" && ac_dir=.
2878 if test -f $ac_dir/$ac_word; then
2879 ac_cv_prog_DEFAULT_LEX="$ac_prog"
671aa708
NN
2880 break
2881 fi
2882 done
1e0f07d3
PB
2883 IFS="$ac_save_ifs"
2884fi
2885fi
2886DEFAULT_LEX="$ac_cv_prog_DEFAULT_LEX"
2887if test -n "$DEFAULT_LEX"; then
2888 echo "$ac_t""$DEFAULT_LEX" 1>&6
2889else
2890 echo "$ac_t""no" 1>&6
2891fi
671aa708 2892
1e0f07d3 2893test -n "$DEFAULT_LEX" && break
671aa708 2894done
1e0f07d3
PB
2895test -n "$DEFAULT_LEX" || DEFAULT_LEX="$MISSING flex"
2896
671aa708 2897
671aa708
NN
2898# Create a .gdbinit file which runs the one in srcdir
2899# and tells GDB to look there for source files.
2900
2901if test -r ${srcdir}/.gdbinit ; then
2902 case ${srcdir} in
2903 .) ;;
2904 *) cat > ./.gdbinit <<EOF
2905# ${NO_EDIT}
2906dir ${srcdir}
2907dir .
2908source ${srcdir}/.gdbinit
2909EOF
2910 ;;
2911 esac
2912fi
2913
671aa708
NN
2914# Make sure that the compiler is able to generate an executable. If it
2915# can't, we are probably in trouble. We don't care whether we can run the
2916# executable--we might be using a cross compiler--we only care whether it
2917# can be created. At this point the main configure script has set CC.
2918we_are_ok=no
2919echo "int main () { return 0; }" > conftest.c
2920${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
2921if test $? = 0 ; then
2922 if test -s conftest || test -s conftest.exe ; then
2923 we_are_ok=yes
2924 fi
2925fi
2926case $we_are_ok in
2927 no)
2928 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
2929 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
2930 rm -f conftest*
2931 exit 1
2932 ;;
2933esac
2934rm -f conftest*
2935
2936# The Solaris /usr/ucb/cc compiler does not appear to work.
2937case "${host}" in
2938 sparc-sun-solaris2*)
2939 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
2940 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
2941 could_use=
2942 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
2943 if test -d /opt/cygnus/bin ; then
2944 if test "$could_use" = "" ; then
2945 could_use="/opt/cygnus/bin"
2946 else
2947 could_use="$could_use or /opt/cygnus/bin"
2948 fi
2949 fi
2950 if test "$could_use" = "" ; then
2951 echo "Warning: compilation may fail because you're using"
2952 echo "/usr/ucb/cc. You should change your PATH or CC "
2953 echo "variable and rerun configure."
2954 else
2955 echo "Warning: compilation may fail because you're using"
2956 echo "/usr/ucb/cc, when you should use the C compiler from"
2957 echo "$could_use. You should change your"
2958 echo "PATH or CC variable and rerun configure."
2959 fi
2960 fi
2961 ;;
2962esac
2963
2964# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
2965# binutils tools will find libbfd.so.
aa9c3ab4
NN
2966case "${enable_shared}" in
2967 no | "") SET_LIB_PATH= ;;
2968 *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
2969esac
671aa708
NN
2970
2971case "${host}" in
2972 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
2973 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
2974esac
2975
2976# Record target_configdirs and the configure arguments for target and
2977# build configuration in Makefile.
2978target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
2979
2980# This is the final value for target_configdirs. configdirs already
8b87bb96
NN
2981# has its final value, as does build_modules. It's time to create some
2982# lists of valid targets.
cf53ae10 2983
671aa708
NN
2984all_build_modules=
2985configure_build_modules=
8b87bb96
NN
2986for module in ${build_modules} ; do
2987 all_build_modules=all-build-${module}
2988 configure_build_modules=configure-build-${module}
2989done
671aa708 2990
671aa708
NN
2991# Determine whether gdb needs tk/tcl or not.
2992# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
2993# and in that case we want gdb to be built without tk. Ugh!
2994# In fact I believe gdb is the *only* package directly dependent on tk,
2995# so we should be able to put the 'maybe's in unconditionally and
2996# leave out the maybe dependencies when enable_gdbtk is false. I'm not
2997# 100% sure that that's safe though.
e914a571
AC
2998
2999gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
671aa708
NN
3000case "$enable_gdbtk" in
3001 no)
3002 GDB_TK="" ;;
e914a571
AC
3003 yes)
3004 GDB_TK="${gdb_tk}" ;;
671aa708 3005 *)
e914a571
AC
3006 # Only add the dependency on gdbtk when GDBtk is part of the gdb
3007 # distro. Eventually someone will fix this and move Insight, nee
3008 # gdbtk to a separate directory.
3009 if test -d ${srcdir}/gdb/gdbtk ; then
3010 GDB_TK="${gdb_tk}"
3011 else
3012 GDB_TK=""
3013 fi
3014 ;;
671aa708
NN
3015esac
3016
60975492 3017# Strip out unwanted targets.
8b87bb96
NN
3018
3019# While at that, we remove Makefiles if we were started for recursive
3020# configuration, so that the top-level Makefile reconfigures them,
3021# like we used to do when configure itself was recursive.
8b87bb96 3022
60975492
PB
3023# Loop over modules. $extrasub must be used with care, limiting as
3024# much as possible the usage of range addresses. That's because autoconf
3025# splits the sed script to overcome limits in the number of commands,
3026# and relying on carefully-timed sed passes may turn out to be very hard
3027# to maintain later. In this particular case, you just have to be careful
3028# not to nest @if/@endif pairs, because configure will not warn you at all.
8b87bb96 3029
8b87bb96
NN
3030for module in ${build_modules} ; do
3031 if test -z "${no_recursion}" \
3032 && test -f ${build_subdir}/${module}/Makefile; then
3033 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
3034 rm -f ${build_subdir}/${module}/Makefile
3035 fi
60975492
PB
3036 extrasub="$extrasub
3037/^@if build-$module\$/d
3038/^@endif build-$module\$/d"
8b87bb96
NN
3039done
3040for module in ${configdirs} ; do
3041 if test -z "${no_recursion}" \
3042 && test -f ${module}/Makefile; then
3043 echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
3044 rm -f ${module}/Makefile
3045 fi
60975492
PB
3046 extrasub="$extrasub
3047/^@if $module\$/d
3048/^@endif $module\$/d"
8b87bb96
NN
3049done
3050for module in ${target_configdirs} ; do
3051 if test -z "${no_recursion}" \
3052 && test -f ${target_subdir}/${module}/Makefile; then
3053 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
3054 rm -f ${target_subdir}/${module}/Makefile
3055 fi
60975492
PB
3056 extrasub="$extrasub
3057/^@if target-$module\$/d
3058/^@endif target-$module\$/d"
671aa708 3059done
60975492
PB
3060extrasub="$extrasub
3061/^@if /,/^@endif /d"
671aa708
NN
3062
3063# Create the serialization dependencies. This uses a temporary file.
3064
ade82b16
AO
3065# Check whether --enable-serial-configure or --disable-serial-configure was given.
3066if test "${enable_serial_configure+set}" = set; then
3067 enableval="$enable_serial_configure"
3068 :
3069fi
3070
3071
bf1d3e81
NN
3072case ${enable_serial_configure} in
3073 yes)
3074 enable_serial_build_configure=yes
3075 enable_serial_host_configure=yes
3076 enable_serial_target_configure=yes
3077 ;;
3078esac
3079
671aa708
NN
3080# These force 'configure's to be done one at a time, to avoid problems
3081# with contention over a shared config.cache.
3082rm -f serdep.tmp
ade82b16 3083echo '# serdep.tmp' > serdep.tmp
671aa708 3084olditem=
bf1d3e81 3085test "x${enable_serial_build_configure}" = xyes &&
671aa708
NN
3086for item in ${build_configdirs} ; do
3087 case ${olditem} in
3088 "") ;;
ade82b16 3089 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
671aa708
NN
3090 esac
3091 olditem=${item}
3092done
3093olditem=
bf1d3e81 3094test "x${enable_serial_host_configure}" = xyes &&
671aa708
NN
3095for item in ${configdirs} ; do
3096 case ${olditem} in
3097 "") ;;
ade82b16 3098 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
671aa708
NN
3099 esac
3100 olditem=${item}
3101done
3102olditem=
bf1d3e81 3103test "x${enable_serial_target_configure}" = xyes &&
671aa708
NN
3104for item in ${target_configdirs} ; do
3105 case ${olditem} in
3106 "") ;;
ade82b16 3107 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
671aa708
NN
3108 esac
3109 olditem=${item}
3110done
3111serialization_dependencies=serdep.tmp
3112
3113
ade82b16
AO
3114# Base args. Strip norecursion, cache-file, srcdir, host, build,
3115# target and nonopt. These are the ones we might not want to pass
43bb47c2
DJ
3116# down to subconfigures. Also strip program-prefix, program-suffix,
3117# and program-transform-name, so that we can pass down a consistent
3118# program-transform-name. If autoconf has put single quotes around
3119# any of these arguments (because they contain shell metacharacters)
3120# then this will fail; in practice this only happens for
3121# --program-transform-name, so be sure to override --program-transform-name
3122# at the end of the argument list.
3123# These will be expanded by make, so quote '$'.
b348267b 3124cat <<\EOF_SED > conftestsed
9104315a
NN
3125s/ --no[^ ]*/ /g
3126s/ --c[a-z-]*[= ][^ ]*//g
3127s/ --sr[a-z-]*[= ][^ ]*//g
3128s/ --ho[a-z-]*[= ][^ ]*//g
3129s/ --bu[a-z-]*[= ][^ ]*//g
3130s/ --t[a-z-]*[= ][^ ]*//g
3131s/ --program-[pst][a-z-]*[= ][^ ]*//g
3132s/ -cache-file[= ][^ ]*//g
3133s/ -srcdir[= ][^ ]*//g
3134s/ -host[= ][^ ]*//g
3135s/ -build[= ][^ ]*//g
3136s/ -target[= ][^ ]*//g
3137s/ -program-prefix[= ][^ ]*//g
3138s/ -program-suffix[= ][^ ]*//g
3139s/ -program-transform-name[= ][^ ]*//g
b348267b
GK
3140s/ [^' -][^ ]* / /
3141s/^ *//;s/ *$//
eeae7b41
DJ
3142s,\$,$$,g
3143EOF_SED
3144sed -f conftestsed <<EOF_SED > conftestsed.out
3145 ${ac_configure_args}
b348267b 3146EOF_SED
eeae7b41
DJ
3147baseargs=`cat conftestsed.out`
3148rm -f conftestsed conftestsed.out
671aa708 3149
43bb47c2
DJ
3150# Add in --program-transform-name, after --program-prefix and
3151# --program-suffix have been applied to it. Autoconf has already
3152# doubled dollar signs and backslashes in program_transform_name; we want
3153# the backslashes un-doubled, and then the entire thing wrapped in single
3154# quotes, because this will be expanded first by make and then by the shell.
3155# Also, because we want to override the logic in subdir configure scripts to
3156# choose program_transform_name, replace any s,x,x, with s,y,y,.
3157sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
3158${program_transform_name}
3159EOF_SED
3160gcc_transform_name=`cat conftestsed.out`
3161rm -f conftestsed.out
3162baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
3163
671aa708
NN
3164# For the build-side libraries, we just need to pretend we're native,
3165# and not use the same cache file. Multilibs are neither needed nor
3166# desired.
3167build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
3168
3169# For host modules, accept cache file option, or specification as blank.
3170case "${cache_file}" in
3171"") # empty
3172 cache_file_option="" ;;
3173/* | [A-Za-z]:[\\/]* ) # absolute path
3174 cache_file_option="--cache-file=${cache_file}" ;;
3175*) # relative path
3176 cache_file_option="--cache-file=../${cache_file}" ;;
3177esac
3178
09438bde
NN
3179# Host dirs don't like to share a cache file either, horribly enough.
3180# This seems to be due to autoconf 2.5x stupidity.
2b6c260d 3181host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
671aa708
NN
3182
3183target_configargs=${baseargs}
3184
3185# Passing a --with-cross-host argument lets the target libraries know
3186# whether they are being built with a cross-compiler or being built
3187# native. However, it would be better to use other mechanisms to make the
3188# sorts of decisions they want to make on this basis. Please consider
3189# this option to be deprecated. FIXME.
3190if test x${is_cross_compiler} = xyes ; then
3191 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
3192fi
3193
3194# Default to --enable-multilib.
3195if test x${enable_multilib} = x ; then
3196 target_configargs="--enable-multilib ${target_configargs}"
3197fi
3198
3199# Pass --with-newlib if appropriate. Note that target_configdirs has
3200# changed from the earlier setting of with_newlib.
3201if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
3202 target_configargs="--with-newlib ${target_configargs}"
3203fi
3204
6b9eb62c
NN
3205# Different target subdirs use different values of certain variables
3206# (notably CXX). Worse, multilibs use *lots* of different values.
3207# Worse yet, autoconf 2.5x makes some of these 'precious', meaning that
3208# it doesn't automatically accept command-line overrides of them.
3209# This means it's not safe for target subdirs to share a cache file,
3210# which is disgusting, but there you have it. Hopefully this can be
3211# fixed in future. It's still worthwhile to use a cache file for each
3212# directory. I think.
3213
671aa708 3214# Pass the appropriate --host, --build, and --cache-file arguments.
2b6c260d 3215target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
671aa708
NN
3216
3217# provide a proper gxx_include_dir.
3218# Note, if you change the default, make sure to fix both here and in
3219# the gcc and libstdc++-v3 subdirectories.
3220# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
73458fb7
NN
3221case "${with_gxx_include_dir}" in
3222 yes)
3223 { echo "configure: error: --with-gxx-include-dir=[dir] requires a directory" 1>&2; exit 1; }
3224 ;;
3225 no | "")
3226 case "${enable_version_specific_runtime_libs}" in
3227 yes) gxx_include_dir='${libsubdir}/include/c++' ;;
3228 *)
3229 . ${srcdir}/config.if
3230 gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
3231 esac ;;
3232 *) gxx_include_dir=${with_gxx_include_dir} ;;
3233esac
671aa708
NN
3234
3235FLAGS_FOR_TARGET=
3236case " $target_configdirs " in
3237 *" newlib "*)
3238 case " $target_configargs " in
3239 *" --with-newlib "*)
3240 case "$target" in
3241 *-cygwin*)
aa8f1f57 3242 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
3243 esac
3244
3245 # If we're not building GCC, don't discard standard headers.
3246 if test -d ${srcdir}/gcc; then
3247 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
3248
3249 if test "${build}" != "${host}"; then
3250 # On Canadian crosses, CC_FOR_TARGET will have already been set
3251 # by `configure', so we won't have an opportunity to add -Bgcc/
3252 # to it. This is right: we don't want to search that directory
3253 # for binaries, but we want the header files in there, so add
3254 # them explicitly.
3255 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
3256
3257 # Someone might think of using the pre-installed headers on
3258 # Canadian crosses, in case the installed compiler is not fully
3259 # compatible with the compiler being built. In this case, it
3260 # would be better to flag an error than risking having
3261 # incompatible object files being constructed. We can't
3262 # guarantee that an error will be flagged, but let's hope the
3263 # compiler will do it, when presented with incompatible header
3264 # files.
3265 fi
3266 fi
3267
3268 case "${target}-${is_cross_compiler}" in
f2a0e225 3269 i[3456789]86-*-linux*-no)
671aa708
NN
3270 # Here host == target, so we don't need to build gcc,
3271 # so we don't want to discard standard headers.
3272 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
3273 ;;
3274 *)
3275 # If we're building newlib, use its generic headers last, but search
3276 # for any libc-related directories first (so make it the last -B
3277 # switch).
3278 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
3279 ;;
3280 esac
3281 ;;
3282 esac
3283 ;;
3284esac
3285
6691a79e
ME
3286# Allow the user to override the flags for
3287# our build compiler if desired.
3288CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
3289
671aa708
NN
3290# On Canadian crosses, we'll be searching the right directories for
3291# the previously-installed cross compiler, so don't bother to add
3292# flags for directories within the install tree of the compiler
3293# being built; programs in there won't even run.
3294if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
3295 # Search for pre-installed headers if nothing else fits.
9124bc53 3296 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
3297fi
3298
3299if test "x${use_gnu_ld}" = x &&
3300 echo " ${configdirs} " | grep " ld " > /dev/null ; then
3301 # Arrange for us to find uninstalled linker scripts.
3302 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
3303fi
3304
3305if test "x${CC_FOR_TARGET+set}" = xset; then
3306 :
3307elif test -d ${srcdir}/gcc; then
3308 CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
3309elif test "$host" = "$target"; then
3310 CC_FOR_TARGET='$(CC)'
3311else
3f4f56e2 3312 CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
671aa708
NN
3313fi
3314CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
3315
3316if test "x${GCJ_FOR_TARGET+set}" = xset; then
3317 :
3318elif test -d ${srcdir}/gcc; then
3319 GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
3320elif test "$host" = "$target"; then
3321 GCJ_FOR_TARGET='gcj'
3322else
3f4f56e2 3323 GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
671aa708
NN
3324fi
3325GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
3326
6de9cd9a
DN
3327if test "x${GFORTRAN_FOR_TARGET+set}" = xset; then
3328 :
3329elif test -d ${srcdir}/gcc; then
3330 GFORTRAN_FOR_TARGET='$$r/gcc/gfortran -B$$r/gcc/'
3331elif test "$host" = "$target"; then
3332 GFORTRAN_FOR_TARGET='gfortran'
3333else
3334 GFORTRAN_FOR_TARGET=`echo gfortran | sed -e 's/x/x/' ${program_transform_name}`
3335fi
3336case $GFORTRAN_FOR_TARGET in
3337*' $(FLAGS_FOR_TARGET)') ;;
3338*) GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
3339esac
3340
671aa708 3341# Don't use libstdc++-v3's flags to configure/build itself.
a7956a48 3342libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
9d465b12 3343raw_libstdcxx_flags='-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
671aa708
NN
3344
3345if test "x${CXX_FOR_TARGET+set}" = xset; then
d253f9ba
DJ
3346 if test "x${RAW_CXX_FOR_TARGET+set}" != xset; then
3347 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
3348 fi
671aa708
NN
3349elif test -d ${srcdir}/gcc; then
3350 # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
3351 # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
3352 # default whereas gcc does not.
3353 # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
3354 # all other cases.
3355 CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
3356 RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
3357elif test "$host" = "$target"; then
3358 CXX_FOR_TARGET='$(CXX)'
3359 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
3360else
3f4f56e2 3361 CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
671aa708
NN
3362 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
3363fi
3364CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
3365RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
3366
3367qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
3368qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
3369
3370# We want to defer the evaluation of `cmd`s and shell variables in
3371# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
3372# bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
3373# quotes, but we still have to duplicate `$'s so that shell variables
3374# can be expanded by the nested make as shell variables, not as make
3375# macros.
3376qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
3377qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
3378
3379# Wrap CC_FOR_TARGET and friends, for certain types of builds.
3380CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
3381GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
6de9cd9a 3382GFORTRAN_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GFORTRAN_FOR_TARGET}"
671aa708
NN
3383CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
3384RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
3385CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
3386RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
3387
3388# Makefile fragments.
3389host_makefile_frag=${srcdir}/${host_makefile_frag}
3390target_makefile_frag=${srcdir}/${target_makefile_frag}
3391alphaieee_frag=${srcdir}/${alphaieee_frag}
3392ospace_frag=${srcdir}/${ospace_frag}
3393
3394
3395
3396
3397
3398# Miscellanea: directories, flags, etc.
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
671aa708
NN
3411# Build module lists & subconfigure args.
3412
3413
3414
3415
671aa708
NN
3416# Host module lists & subconfigure args.
3417
3418
3419
671aa708
NN
3420# Target module lists & subconfigure args.
3421
3422
3423
671aa708
NN
3424# Build tools.
3425
3426
3427
3428
3429
3430
3431
3432# Host tools.
ca9f4b81
AO
3433ncn_tool_prefix=
3434test -n "$host_alias" && ncn_tool_prefix=$host_alias-
3435ncn_target_tool_prefix=
3436test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
3437
3438 if test -n "$ncn_tool_prefix"; then
3439 # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
3440set dummy ${ncn_tool_prefix}ar; ac_word=$2
3441echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3442echo "configure:3443: checking for $ac_word" >&5
ca9f4b81
AO
3443if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3444 echo $ac_n "(cached) $ac_c" 1>&6
3445else
3446 if test -n "$AR"; then
3447 ac_cv_prog_AR="$AR" # Let the user override the test.
3448else
3449 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3450 ac_dummy="$PATH"
3451 for ac_dir in $ac_dummy; do
3452 test -z "$ac_dir" && ac_dir=.
3453 if test -f $ac_dir/$ac_word; then
3454 ac_cv_prog_AR="${ncn_tool_prefix}ar"
3455 break
3456 fi
3457 done
3458 IFS="$ac_save_ifs"
3459fi
3460fi
3461AR="$ac_cv_prog_AR"
3462if test -n "$AR"; then
3463 echo "$ac_t""$AR" 1>&6
3464else
3465 echo "$ac_t""no" 1>&6
3466fi
3467
3468fi
3469if test -z "$ac_cv_prog_AR" ; then
3470 if test $build = $host ; then
3471 ncn_cv_AR=$AR
3472 # Extract the first word of "ar", so it can be a program name with args.
3473set dummy ar; ac_word=$2
3474echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3475echo "configure:3476: checking for $ac_word" >&5
ca9f4b81
AO
3476if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
3477 echo $ac_n "(cached) $ac_c" 1>&6
3478else
3479 if test -n "$ncn_cv_AR"; then
3480 ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test.
3481else
3482 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3483 ac_dummy="$PATH"
3484 for ac_dir in $ac_dummy; do
3485 test -z "$ac_dir" && ac_dir=.
3486 if test -f $ac_dir/$ac_word; then
3487 ac_cv_prog_ncn_cv_AR="ar"
3488 break
3489 fi
3490 done
3491 IFS="$ac_save_ifs"
3492 test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar"
3493fi
3494fi
3495ncn_cv_AR="$ac_cv_prog_ncn_cv_AR"
3496if test -n "$ncn_cv_AR"; then
3497 echo "$ac_t""$ncn_cv_AR" 1>&6
3498else
3499 echo "$ac_t""no" 1>&6
3500fi
3501
3502 AR=$ncn_cv_AR
3503 else
3504 AR="${ncn_tool_prefix}ar"
3505 fi
3506else
3507 AR="$ac_cv_prog_AR"
3508fi
3509
3510 if test -n "$ncn_tool_prefix"; then
3511 # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
3512set dummy ${ncn_tool_prefix}as; ac_word=$2
3513echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3514echo "configure:3515: checking for $ac_word" >&5
ca9f4b81
AO
3515if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
3516 echo $ac_n "(cached) $ac_c" 1>&6
3517else
3518 if test -n "$AS"; then
3519 ac_cv_prog_AS="$AS" # Let the user override the test.
3520else
3521 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3522 ac_dummy="$PATH"
3523 for ac_dir in $ac_dummy; do
3524 test -z "$ac_dir" && ac_dir=.
3525 if test -f $ac_dir/$ac_word; then
3526 ac_cv_prog_AS="${ncn_tool_prefix}as"
3527 break
3528 fi
3529 done
3530 IFS="$ac_save_ifs"
3531fi
3532fi
3533AS="$ac_cv_prog_AS"
3534if test -n "$AS"; then
3535 echo "$ac_t""$AS" 1>&6
3536else
3537 echo "$ac_t""no" 1>&6
3538fi
3539
3540fi
3541if test -z "$ac_cv_prog_AS" ; then
3542 if test $build = $host ; then
3543 ncn_cv_AS=$AS
3544 # Extract the first word of "as", so it can be a program name with args.
3545set dummy as; ac_word=$2
3546echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3547echo "configure:3548: checking for $ac_word" >&5
ca9f4b81
AO
3548if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
3549 echo $ac_n "(cached) $ac_c" 1>&6
3550else
3551 if test -n "$ncn_cv_AS"; then
3552 ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test.
3553else
3554 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3555 ac_dummy="$PATH"
3556 for ac_dir in $ac_dummy; do
3557 test -z "$ac_dir" && ac_dir=.
3558 if test -f $ac_dir/$ac_word; then
3559 ac_cv_prog_ncn_cv_AS="as"
3560 break
3561 fi
3562 done
3563 IFS="$ac_save_ifs"
3564 test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as"
3565fi
3566fi
3567ncn_cv_AS="$ac_cv_prog_ncn_cv_AS"
3568if test -n "$ncn_cv_AS"; then
3569 echo "$ac_t""$ncn_cv_AS" 1>&6
3570else
3571 echo "$ac_t""no" 1>&6
3572fi
3573
3574 AS=$ncn_cv_AS
3575 else
3576 AS="${ncn_tool_prefix}as"
3577 fi
3578else
3579 AS="$ac_cv_prog_AS"
3580fi
3581
3582 if test -n "$ncn_tool_prefix"; then
3583 # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
3584set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
3585echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3586echo "configure:3587: checking for $ac_word" >&5
ca9f4b81
AO
3587if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3588 echo $ac_n "(cached) $ac_c" 1>&6
3589else
3590 if test -n "$DLLTOOL"; then
3591 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3592else
3593 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3594 ac_dummy="$PATH"
3595 for ac_dir in $ac_dummy; do
3596 test -z "$ac_dir" && ac_dir=.
3597 if test -f $ac_dir/$ac_word; then
3598 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}dlltool"
3599 break
3600 fi
3601 done
3602 IFS="$ac_save_ifs"
3603fi
3604fi
3605DLLTOOL="$ac_cv_prog_DLLTOOL"
3606if test -n "$DLLTOOL"; then
3607 echo "$ac_t""$DLLTOOL" 1>&6
3608else
3609 echo "$ac_t""no" 1>&6
3610fi
3611
3612fi
3613if test -z "$ac_cv_prog_DLLTOOL" ; then
3614 if test $build = $host ; then
3615 ncn_cv_DLLTOOL=$DLLTOOL
3616 # Extract the first word of "dlltool", so it can be a program name with args.
3617set dummy dlltool; ac_word=$2
3618echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3619echo "configure:3620: checking for $ac_word" >&5
ca9f4b81
AO
3620if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
3621 echo $ac_n "(cached) $ac_c" 1>&6
3622else
3623 if test -n "$ncn_cv_DLLTOOL"; then
3624 ac_cv_prog_ncn_cv_DLLTOOL="$ncn_cv_DLLTOOL" # Let the user override the test.
3625else
3626 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3627 ac_dummy="$PATH"
3628 for ac_dir in $ac_dummy; do
3629 test -z "$ac_dir" && ac_dir=.
3630 if test -f $ac_dir/$ac_word; then
3631 ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
3632 break
3633 fi
3634 done
3635 IFS="$ac_save_ifs"
3636 test -z "$ac_cv_prog_ncn_cv_DLLTOOL" && ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
3637fi
3638fi
3639ncn_cv_DLLTOOL="$ac_cv_prog_ncn_cv_DLLTOOL"
3640if test -n "$ncn_cv_DLLTOOL"; then
3641 echo "$ac_t""$ncn_cv_DLLTOOL" 1>&6
3642else
3643 echo "$ac_t""no" 1>&6
3644fi
3645
3646 DLLTOOL=$ncn_cv_DLLTOOL
3647 else
3648 DLLTOOL="${ncn_tool_prefix}dlltool"
3649 fi
3650else
3651 DLLTOOL="$ac_cv_prog_DLLTOOL"
3652fi
3653
3654 if test -n "$ncn_tool_prefix"; then
3655 # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
3656set dummy ${ncn_tool_prefix}ld; ac_word=$2
3657echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3658echo "configure:3659: checking for $ac_word" >&5
ca9f4b81
AO
3659if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
3660 echo $ac_n "(cached) $ac_c" 1>&6
3661else
3662 if test -n "$LD"; then
3663 ac_cv_prog_LD="$LD" # Let the user override the test.
3664else
3665 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3666 ac_dummy="$PATH"
3667 for ac_dir in $ac_dummy; do
3668 test -z "$ac_dir" && ac_dir=.
3669 if test -f $ac_dir/$ac_word; then
3670 ac_cv_prog_LD="${ncn_tool_prefix}ld"
3671 break
3672 fi
3673 done
3674 IFS="$ac_save_ifs"
3675fi
3676fi
3677LD="$ac_cv_prog_LD"
3678if test -n "$LD"; then
3679 echo "$ac_t""$LD" 1>&6
3680else
3681 echo "$ac_t""no" 1>&6
3682fi
3683
3684fi
3685if test -z "$ac_cv_prog_LD" ; then
3686 if test $build = $host ; then
3687 ncn_cv_LD=$LD
3688 # Extract the first word of "ld", so it can be a program name with args.
3689set dummy ld; ac_word=$2
3690echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3691echo "configure:3692: checking for $ac_word" >&5
ca9f4b81
AO
3692if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
3693 echo $ac_n "(cached) $ac_c" 1>&6
3694else
3695 if test -n "$ncn_cv_LD"; then
3696 ac_cv_prog_ncn_cv_LD="$ncn_cv_LD" # Let the user override the test.
3697else
3698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3699 ac_dummy="$PATH"
3700 for ac_dir in $ac_dummy; do
3701 test -z "$ac_dir" && ac_dir=.
3702 if test -f $ac_dir/$ac_word; then
3703 ac_cv_prog_ncn_cv_LD="ld"
3704 break
3705 fi
3706 done
3707 IFS="$ac_save_ifs"
3708 test -z "$ac_cv_prog_ncn_cv_LD" && ac_cv_prog_ncn_cv_LD="ld"
3709fi
3710fi
3711ncn_cv_LD="$ac_cv_prog_ncn_cv_LD"
3712if test -n "$ncn_cv_LD"; then
3713 echo "$ac_t""$ncn_cv_LD" 1>&6
3714else
3715 echo "$ac_t""no" 1>&6
3716fi
3717
3718 LD=$ncn_cv_LD
3719 else
3720 LD="${ncn_tool_prefix}ld"
3721 fi
3722else
3723 LD="$ac_cv_prog_LD"
3724fi
3725
3726 if test -n "$ncn_tool_prefix"; then
3727 # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
3728set dummy ${ncn_tool_prefix}nm; ac_word=$2
3729echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3730echo "configure:3731: checking for $ac_word" >&5
ca9f4b81
AO
3731if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
3732 echo $ac_n "(cached) $ac_c" 1>&6
3733else
3734 if test -n "$NM"; then
3735 ac_cv_prog_NM="$NM" # Let the user override the test.
3736else
3737 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3738 ac_dummy="$PATH"
3739 for ac_dir in $ac_dummy; do
3740 test -z "$ac_dir" && ac_dir=.
3741 if test -f $ac_dir/$ac_word; then
3742 ac_cv_prog_NM="${ncn_tool_prefix}nm"
3743 break
3744 fi
3745 done
3746 IFS="$ac_save_ifs"
3747fi
3748fi
3749NM="$ac_cv_prog_NM"
3750if test -n "$NM"; then
3751 echo "$ac_t""$NM" 1>&6
3752else
3753 echo "$ac_t""no" 1>&6
3754fi
3755
3756fi
3757if test -z "$ac_cv_prog_NM" ; then
3758 if test $build = $host ; then
3759 ncn_cv_NM=$NM
3760 # Extract the first word of "nm", so it can be a program name with args.
3761set dummy nm; ac_word=$2
3762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3763echo "configure:3764: checking for $ac_word" >&5
ca9f4b81
AO
3764if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM'+set}'`\" = set"; then
3765 echo $ac_n "(cached) $ac_c" 1>&6
3766else
3767 if test -n "$ncn_cv_NM"; then
3768 ac_cv_prog_ncn_cv_NM="$ncn_cv_NM" # Let the user override the test.
3769else
3770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3771 ac_dummy="$PATH"
3772 for ac_dir in $ac_dummy; do
3773 test -z "$ac_dir" && ac_dir=.
3774 if test -f $ac_dir/$ac_word; then
3775 ac_cv_prog_ncn_cv_NM="nm"
3776 break
3777 fi
3778 done
3779 IFS="$ac_save_ifs"
3780 test -z "$ac_cv_prog_ncn_cv_NM" && ac_cv_prog_ncn_cv_NM="nm"
3781fi
3782fi
3783ncn_cv_NM="$ac_cv_prog_ncn_cv_NM"
3784if test -n "$ncn_cv_NM"; then
3785 echo "$ac_t""$ncn_cv_NM" 1>&6
3786else
3787 echo "$ac_t""no" 1>&6
3788fi
3789
3790 NM=$ncn_cv_NM
3791 else
3792 NM="${ncn_tool_prefix}nm"
3793 fi
3794else
3795 NM="$ac_cv_prog_NM"
3796fi
3797
3798 if test -n "$ncn_tool_prefix"; then
3799 # Extract the first word of "${ncn_tool_prefix}ranlib", so it can be a program name with args.
3800set dummy ${ncn_tool_prefix}ranlib; ac_word=$2
3801echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3802echo "configure:3803: checking for $ac_word" >&5
ca9f4b81
AO
3803if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3804 echo $ac_n "(cached) $ac_c" 1>&6
3805else
3806 if test -n "$RANLIB"; then
3807 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3808else
3809 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3810 ac_dummy="$PATH"
3811 for ac_dir in $ac_dummy; do
3812 test -z "$ac_dir" && ac_dir=.
3813 if test -f $ac_dir/$ac_word; then
3814 ac_cv_prog_RANLIB="${ncn_tool_prefix}ranlib"
3815 break
3816 fi
3817 done
3818 IFS="$ac_save_ifs"
3819fi
3820fi
3821RANLIB="$ac_cv_prog_RANLIB"
3822if test -n "$RANLIB"; then
3823 echo "$ac_t""$RANLIB" 1>&6
3824else
3825 echo "$ac_t""no" 1>&6
3826fi
3827
3828fi
3829if test -z "$ac_cv_prog_RANLIB" ; then
3830 if test $build = $host ; then
3831 ncn_cv_RANLIB=$RANLIB
3832 # Extract the first word of "ranlib", so it can be a program name with args.
3833set dummy ranlib; ac_word=$2
3834echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3835echo "configure:3836: checking for $ac_word" >&5
ca9f4b81
AO
3836if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB'+set}'`\" = set"; then
3837 echo $ac_n "(cached) $ac_c" 1>&6
3838else
3839 if test -n "$ncn_cv_RANLIB"; then
3840 ac_cv_prog_ncn_cv_RANLIB="$ncn_cv_RANLIB" # Let the user override the test.
3841else
3842 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3843 ac_dummy="$PATH"
3844 for ac_dir in $ac_dummy; do
3845 test -z "$ac_dir" && ac_dir=.
3846 if test -f $ac_dir/$ac_word; then
3847 ac_cv_prog_ncn_cv_RANLIB="ranlib"
3848 break
3849 fi
3850 done
3851 IFS="$ac_save_ifs"
3852 test -z "$ac_cv_prog_ncn_cv_RANLIB" && ac_cv_prog_ncn_cv_RANLIB=":"
3853fi
3854fi
3855ncn_cv_RANLIB="$ac_cv_prog_ncn_cv_RANLIB"
3856if test -n "$ncn_cv_RANLIB"; then
3857 echo "$ac_t""$ncn_cv_RANLIB" 1>&6
3858else
3859 echo "$ac_t""no" 1>&6
3860fi
3861
3862 RANLIB=$ncn_cv_RANLIB
3863 else
3864 RANLIB=":"
3865 fi
3866else
3867 RANLIB="$ac_cv_prog_RANLIB"
3868fi
3869
3870 if test -n "$ncn_tool_prefix"; then
3871 # Extract the first word of "${ncn_tool_prefix}windres", so it can be a program name with args.
3872set dummy ${ncn_tool_prefix}windres; ac_word=$2
3873echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3874echo "configure:3875: checking for $ac_word" >&5
ca9f4b81
AO
3875if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3876 echo $ac_n "(cached) $ac_c" 1>&6
3877else
3878 if test -n "$WINDRES"; then
3879 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3880else
3881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3882 ac_dummy="$PATH"
3883 for ac_dir in $ac_dummy; do
3884 test -z "$ac_dir" && ac_dir=.
3885 if test -f $ac_dir/$ac_word; then
3886 ac_cv_prog_WINDRES="${ncn_tool_prefix}windres"
3887 break
3888 fi
3889 done
3890 IFS="$ac_save_ifs"
3891fi
3892fi
3893WINDRES="$ac_cv_prog_WINDRES"
3894if test -n "$WINDRES"; then
3895 echo "$ac_t""$WINDRES" 1>&6
3896else
3897 echo "$ac_t""no" 1>&6
3898fi
3899
3900fi
3901if test -z "$ac_cv_prog_WINDRES" ; then
3902 if test $build = $host ; then
3903 ncn_cv_WINDRES=$WINDRES
3904 # Extract the first word of "windres", so it can be a program name with args.
3905set dummy windres; ac_word=$2
3906echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3907echo "configure:3908: checking for $ac_word" >&5
ca9f4b81
AO
3908if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES'+set}'`\" = set"; then
3909 echo $ac_n "(cached) $ac_c" 1>&6
3910else
3911 if test -n "$ncn_cv_WINDRES"; then
3912 ac_cv_prog_ncn_cv_WINDRES="$ncn_cv_WINDRES" # Let the user override the test.
3913else
3914 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3915 ac_dummy="$PATH"
3916 for ac_dir in $ac_dummy; do
3917 test -z "$ac_dir" && ac_dir=.
3918 if test -f $ac_dir/$ac_word; then
3919 ac_cv_prog_ncn_cv_WINDRES="windres"
3920 break
3921 fi
3922 done
3923 IFS="$ac_save_ifs"
3924 test -z "$ac_cv_prog_ncn_cv_WINDRES" && ac_cv_prog_ncn_cv_WINDRES="windres"
3925fi
3926fi
3927ncn_cv_WINDRES="$ac_cv_prog_ncn_cv_WINDRES"
3928if test -n "$ncn_cv_WINDRES"; then
3929 echo "$ac_t""$ncn_cv_WINDRES" 1>&6
3930else
3931 echo "$ac_t""no" 1>&6
3932fi
3933
3934 WINDRES=$ncn_cv_WINDRES
3935 else
3936 WINDRES="${ncn_tool_prefix}windres"
3937 fi
3938else
3939 WINDRES="$ac_cv_prog_WINDRES"
3940fi
3941
3942 if test -n "$ncn_tool_prefix"; then
3943 # Extract the first word of "${ncn_tool_prefix}objcopy", so it can be a program name with args.
3944set dummy ${ncn_tool_prefix}objcopy; ac_word=$2
3945echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3946echo "configure:3947: checking for $ac_word" >&5
ca9f4b81
AO
3947if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
3948 echo $ac_n "(cached) $ac_c" 1>&6
3949else
3950 if test -n "$OBJCOPY"; then
3951 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
3952else
3953 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3954 ac_dummy="$PATH"
3955 for ac_dir in $ac_dummy; do
3956 test -z "$ac_dir" && ac_dir=.
3957 if test -f $ac_dir/$ac_word; then
3958 ac_cv_prog_OBJCOPY="${ncn_tool_prefix}objcopy"
3959 break
3960 fi
3961 done
3962 IFS="$ac_save_ifs"
3963fi
3964fi
3965OBJCOPY="$ac_cv_prog_OBJCOPY"
3966if test -n "$OBJCOPY"; then
3967 echo "$ac_t""$OBJCOPY" 1>&6
3968else
3969 echo "$ac_t""no" 1>&6
3970fi
3971
3972fi
3973if test -z "$ac_cv_prog_OBJCOPY" ; then
3974 if test $build = $host ; then
3975 ncn_cv_OBJCOPY=$OBJCOPY
3976 # Extract the first word of "objcopy", so it can be a program name with args.
3977set dummy objcopy; ac_word=$2
3978echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 3979echo "configure:3980: checking for $ac_word" >&5
ca9f4b81
AO
3980if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJCOPY'+set}'`\" = set"; then
3981 echo $ac_n "(cached) $ac_c" 1>&6
3982else
3983 if test -n "$ncn_cv_OBJCOPY"; then
3984 ac_cv_prog_ncn_cv_OBJCOPY="$ncn_cv_OBJCOPY" # Let the user override the test.
3985else
3986 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3987 ac_dummy="$PATH"
3988 for ac_dir in $ac_dummy; do
3989 test -z "$ac_dir" && ac_dir=.
3990 if test -f $ac_dir/$ac_word; then
3991 ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
3992 break
3993 fi
3994 done
3995 IFS="$ac_save_ifs"
3996 test -z "$ac_cv_prog_ncn_cv_OBJCOPY" && ac_cv_prog_ncn_cv_OBJCOPY="objcopy"
3997fi
3998fi
3999ncn_cv_OBJCOPY="$ac_cv_prog_ncn_cv_OBJCOPY"
4000if test -n "$ncn_cv_OBJCOPY"; then
4001 echo "$ac_t""$ncn_cv_OBJCOPY" 1>&6
4002else
4003 echo "$ac_t""no" 1>&6
4004fi
4005
4006 OBJCOPY=$ncn_cv_OBJCOPY
4007 else
4008 OBJCOPY="${ncn_tool_prefix}objcopy"
4009 fi
4010else
4011 OBJCOPY="$ac_cv_prog_OBJCOPY"
4012fi
4013
4014 if test -n "$ncn_tool_prefix"; then
4015 # Extract the first word of "${ncn_tool_prefix}objdump", so it can be a program name with args.
4016set dummy ${ncn_tool_prefix}objdump; ac_word=$2
4017echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4018echo "configure:4019: checking for $ac_word" >&5
ca9f4b81
AO
4019if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
4020 echo $ac_n "(cached) $ac_c" 1>&6
4021else
4022 if test -n "$OBJDUMP"; then
4023 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4024else
4025 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4026 ac_dummy="$PATH"
4027 for ac_dir in $ac_dummy; do
4028 test -z "$ac_dir" && ac_dir=.
4029 if test -f $ac_dir/$ac_word; then
4030 ac_cv_prog_OBJDUMP="${ncn_tool_prefix}objdump"
4031 break
4032 fi
4033 done
4034 IFS="$ac_save_ifs"
4035fi
4036fi
4037OBJDUMP="$ac_cv_prog_OBJDUMP"
4038if test -n "$OBJDUMP"; then
4039 echo "$ac_t""$OBJDUMP" 1>&6
4040else
4041 echo "$ac_t""no" 1>&6
4042fi
4043
4044fi
4045if test -z "$ac_cv_prog_OBJDUMP" ; then
4046 if test $build = $host ; then
4047 ncn_cv_OBJDUMP=$OBJDUMP
4048 # Extract the first word of "objdump", so it can be a program name with args.
4049set dummy objdump; ac_word=$2
4050echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4051echo "configure:4052: checking for $ac_word" >&5
ca9f4b81
AO
4052if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_OBJDUMP'+set}'`\" = set"; then
4053 echo $ac_n "(cached) $ac_c" 1>&6
4054else
4055 if test -n "$ncn_cv_OBJDUMP"; then
4056 ac_cv_prog_ncn_cv_OBJDUMP="$ncn_cv_OBJDUMP" # Let the user override the test.
4057else
4058 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4059 ac_dummy="$PATH"
4060 for ac_dir in $ac_dummy; do
4061 test -z "$ac_dir" && ac_dir=.
4062 if test -f $ac_dir/$ac_word; then
4063 ac_cv_prog_ncn_cv_OBJDUMP="objdump"
4064 break
4065 fi
4066 done
4067 IFS="$ac_save_ifs"
4068 test -z "$ac_cv_prog_ncn_cv_OBJDUMP" && ac_cv_prog_ncn_cv_OBJDUMP="objdump"
4069fi
4070fi
4071ncn_cv_OBJDUMP="$ac_cv_prog_ncn_cv_OBJDUMP"
4072if test -n "$ncn_cv_OBJDUMP"; then
4073 echo "$ac_t""$ncn_cv_OBJDUMP" 1>&6
4074else
4075 echo "$ac_t""no" 1>&6
4076fi
4077
4078 OBJDUMP=$ncn_cv_OBJDUMP
4079 else
4080 OBJDUMP="${ncn_tool_prefix}objdump"
4081 fi
4082else
4083 OBJDUMP="$ac_cv_prog_OBJDUMP"
4084fi
4085
671aa708
NN
4086
4087
4088
4089
4090
4091
4092
4093
6691a79e 4094
671aa708 4095# Target tools.
ca9f4b81
AO
4096 if test -n "$ncn_target_tool_prefix"; then
4097 # Extract the first word of "${ncn_target_tool_prefix}ar", so it can be a program name with args.
4098set dummy ${ncn_target_tool_prefix}ar; ac_word=$2
4099echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4100echo "configure:4101: checking for $ac_word" >&5
be912515 4101if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4102 echo $ac_n "(cached) $ac_c" 1>&6
4103else
be912515
NN
4104 if test -n "$CONFIGURED_AR_FOR_TARGET"; then
4105 ac_cv_prog_CONFIGURED_AR_FOR_TARGET="$CONFIGURED_AR_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4106else
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
be912515 4112 ac_cv_prog_CONFIGURED_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
ca9f4b81
AO
4113 break
4114 fi
4115 done
4116 IFS="$ac_save_ifs"
4117fi
4118fi
be912515
NN
4119CONFIGURED_AR_FOR_TARGET="$ac_cv_prog_CONFIGURED_AR_FOR_TARGET"
4120if test -n "$CONFIGURED_AR_FOR_TARGET"; then
4121 echo "$ac_t""$CONFIGURED_AR_FOR_TARGET" 1>&6
ca9f4b81
AO
4122else
4123 echo "$ac_t""no" 1>&6
4124fi
4125
4126fi
be912515 4127if test -z "$ac_cv_prog_CONFIGURED_AR_FOR_TARGET" ; then
ca9f4b81 4128 if test $build = $target ; then
be912515 4129 ncn_cv_CONFIGURED_AR_FOR_TARGET=$CONFIGURED_AR_FOR_TARGET
ca9f4b81
AO
4130 # Extract the first word of "ar", so it can be a program name with args.
4131set dummy ar; ac_word=$2
4132echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4133echo "configure:4134: checking for $ac_word" >&5
be912515 4134if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4135 echo $ac_n "(cached) $ac_c" 1>&6
4136else
be912515
NN
4137 if test -n "$ncn_cv_CONFIGURED_AR_FOR_TARGET"; then
4138 ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET="$ncn_cv_CONFIGURED_AR_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4139else
4140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4141 ac_dummy="$PATH"
4142 for ac_dir in $ac_dummy; do
4143 test -z "$ac_dir" && ac_dir=.
4144 if test -f $ac_dir/$ac_word; then
be912515 4145 ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET="ar"
ca9f4b81
AO
4146 break
4147 fi
4148 done
4149 IFS="$ac_save_ifs"
be912515 4150 test -z "$ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET="ar"
ca9f4b81
AO
4151fi
4152fi
be912515
NN
4153ncn_cv_CONFIGURED_AR_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_AR_FOR_TARGET"
4154if test -n "$ncn_cv_CONFIGURED_AR_FOR_TARGET"; then
4155 echo "$ac_t""$ncn_cv_CONFIGURED_AR_FOR_TARGET" 1>&6
ca9f4b81
AO
4156else
4157 echo "$ac_t""no" 1>&6
4158fi
4159
be912515 4160 CONFIGURED_AR_FOR_TARGET=$ncn_cv_CONFIGURED_AR_FOR_TARGET
ca9f4b81 4161 else
be912515 4162 CONFIGURED_AR_FOR_TARGET="${ncn_target_tool_prefix}ar"
ca9f4b81
AO
4163 fi
4164else
be912515 4165 CONFIGURED_AR_FOR_TARGET="$ac_cv_prog_CONFIGURED_AR_FOR_TARGET"
ca9f4b81
AO
4166fi
4167
4168 if test -n "$ncn_target_tool_prefix"; then
4169 # Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
4170set dummy ${ncn_target_tool_prefix}as; ac_word=$2
4171echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4172echo "configure:4173: checking for $ac_word" >&5
be912515 4173if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4174 echo $ac_n "(cached) $ac_c" 1>&6
4175else
be912515
NN
4176 if test -n "$CONFIGURED_AS_FOR_TARGET"; then
4177 ac_cv_prog_CONFIGURED_AS_FOR_TARGET="$CONFIGURED_AS_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4178else
4179 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4180 ac_dummy="$PATH"
4181 for ac_dir in $ac_dummy; do
4182 test -z "$ac_dir" && ac_dir=.
4183 if test -f $ac_dir/$ac_word; then
be912515 4184 ac_cv_prog_CONFIGURED_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
ca9f4b81
AO
4185 break
4186 fi
4187 done
4188 IFS="$ac_save_ifs"
4189fi
4190fi
be912515
NN
4191CONFIGURED_AS_FOR_TARGET="$ac_cv_prog_CONFIGURED_AS_FOR_TARGET"
4192if test -n "$CONFIGURED_AS_FOR_TARGET"; then
4193 echo "$ac_t""$CONFIGURED_AS_FOR_TARGET" 1>&6
ca9f4b81
AO
4194else
4195 echo "$ac_t""no" 1>&6
4196fi
4197
4198fi
be912515 4199if test -z "$ac_cv_prog_CONFIGURED_AS_FOR_TARGET" ; then
ca9f4b81 4200 if test $build = $target ; then
be912515 4201 ncn_cv_CONFIGURED_AS_FOR_TARGET=$CONFIGURED_AS_FOR_TARGET
ca9f4b81
AO
4202 # Extract the first word of "as", so it can be a program name with args.
4203set dummy as; ac_word=$2
4204echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4205echo "configure:4206: checking for $ac_word" >&5
be912515 4206if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4207 echo $ac_n "(cached) $ac_c" 1>&6
4208else
be912515
NN
4209 if test -n "$ncn_cv_CONFIGURED_AS_FOR_TARGET"; then
4210 ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET="$ncn_cv_CONFIGURED_AS_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4211else
4212 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4213 ac_dummy="$PATH"
4214 for ac_dir in $ac_dummy; do
4215 test -z "$ac_dir" && ac_dir=.
4216 if test -f $ac_dir/$ac_word; then
be912515 4217 ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET="as"
ca9f4b81
AO
4218 break
4219 fi
4220 done
4221 IFS="$ac_save_ifs"
be912515 4222 test -z "$ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET="as"
ca9f4b81
AO
4223fi
4224fi
be912515
NN
4225ncn_cv_CONFIGURED_AS_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_AS_FOR_TARGET"
4226if test -n "$ncn_cv_CONFIGURED_AS_FOR_TARGET"; then
4227 echo "$ac_t""$ncn_cv_CONFIGURED_AS_FOR_TARGET" 1>&6
ca9f4b81
AO
4228else
4229 echo "$ac_t""no" 1>&6
4230fi
4231
be912515 4232 CONFIGURED_AS_FOR_TARGET=$ncn_cv_CONFIGURED_AS_FOR_TARGET
ca9f4b81 4233 else
be912515 4234 CONFIGURED_AS_FOR_TARGET="${ncn_target_tool_prefix}as"
ca9f4b81
AO
4235 fi
4236else
be912515 4237 CONFIGURED_AS_FOR_TARGET="$ac_cv_prog_CONFIGURED_AS_FOR_TARGET"
ca9f4b81
AO
4238fi
4239
4240 if test -n "$ncn_target_tool_prefix"; then
4241 # Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
4242set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
4243echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4244echo "configure:4245: checking for $ac_word" >&5
be912515 4245if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4246 echo $ac_n "(cached) $ac_c" 1>&6
4247else
be912515
NN
4248 if test -n "$CONFIGURED_DLLTOOL_FOR_TARGET"; then
4249 ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET="$CONFIGURED_DLLTOOL_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4250else
4251 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4252 ac_dummy="$PATH"
4253 for ac_dir in $ac_dummy; do
4254 test -z "$ac_dir" && ac_dir=.
4255 if test -f $ac_dir/$ac_word; then
be912515 4256 ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
ca9f4b81
AO
4257 break
4258 fi
4259 done
4260 IFS="$ac_save_ifs"
4261fi
4262fi
be912515
NN
4263CONFIGURED_DLLTOOL_FOR_TARGET="$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET"
4264if test -n "$CONFIGURED_DLLTOOL_FOR_TARGET"; then
4265 echo "$ac_t""$CONFIGURED_DLLTOOL_FOR_TARGET" 1>&6
ca9f4b81
AO
4266else
4267 echo "$ac_t""no" 1>&6
4268fi
4269
4270fi
be912515 4271if test -z "$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET" ; then
ca9f4b81 4272 if test $build = $target ; then
be912515 4273 ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET=$CONFIGURED_DLLTOOL_FOR_TARGET
ca9f4b81
AO
4274 # Extract the first word of "dlltool", so it can be a program name with args.
4275set dummy dlltool; ac_word=$2
4276echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4277echo "configure:4278: checking for $ac_word" >&5
be912515 4278if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4279 echo $ac_n "(cached) $ac_c" 1>&6
4280else
be912515
NN
4281 if test -n "$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET"; then
4282 ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET="$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4283else
4284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4285 ac_dummy="$PATH"
4286 for ac_dir in $ac_dummy; do
4287 test -z "$ac_dir" && ac_dir=.
4288 if test -f $ac_dir/$ac_word; then
be912515 4289 ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET="dlltool"
ca9f4b81
AO
4290 break
4291 fi
4292 done
4293 IFS="$ac_save_ifs"
be912515 4294 test -z "$ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET="dlltool"
ca9f4b81
AO
4295fi
4296fi
be912515
NN
4297ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET"
4298if test -n "$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET"; then
4299 echo "$ac_t""$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET" 1>&6
ca9f4b81
AO
4300else
4301 echo "$ac_t""no" 1>&6
4302fi
4303
be912515 4304 CONFIGURED_DLLTOOL_FOR_TARGET=$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET
ca9f4b81 4305 else
be912515 4306 CONFIGURED_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}dlltool"
ca9f4b81
AO
4307 fi
4308else
be912515 4309 CONFIGURED_DLLTOOL_FOR_TARGET="$ac_cv_prog_CONFIGURED_DLLTOOL_FOR_TARGET"
ca9f4b81
AO
4310fi
4311
4312 if test -n "$ncn_target_tool_prefix"; then
4313 # Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
4314set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
4315echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4316echo "configure:4317: checking for $ac_word" >&5
be912515 4317if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4318 echo $ac_n "(cached) $ac_c" 1>&6
4319else
be912515
NN
4320 if test -n "$CONFIGURED_LD_FOR_TARGET"; then
4321 ac_cv_prog_CONFIGURED_LD_FOR_TARGET="$CONFIGURED_LD_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4322else
4323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4324 ac_dummy="$PATH"
4325 for ac_dir in $ac_dummy; do
4326 test -z "$ac_dir" && ac_dir=.
4327 if test -f $ac_dir/$ac_word; then
be912515 4328 ac_cv_prog_CONFIGURED_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
ca9f4b81
AO
4329 break
4330 fi
4331 done
4332 IFS="$ac_save_ifs"
4333fi
4334fi
be912515
NN
4335CONFIGURED_LD_FOR_TARGET="$ac_cv_prog_CONFIGURED_LD_FOR_TARGET"
4336if test -n "$CONFIGURED_LD_FOR_TARGET"; then
4337 echo "$ac_t""$CONFIGURED_LD_FOR_TARGET" 1>&6
ca9f4b81
AO
4338else
4339 echo "$ac_t""no" 1>&6
4340fi
4341
4342fi
be912515 4343if test -z "$ac_cv_prog_CONFIGURED_LD_FOR_TARGET" ; then
ca9f4b81 4344 if test $build = $target ; then
be912515 4345 ncn_cv_CONFIGURED_LD_FOR_TARGET=$CONFIGURED_LD_FOR_TARGET
ca9f4b81
AO
4346 # Extract the first word of "ld", so it can be a program name with args.
4347set dummy ld; ac_word=$2
4348echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4349echo "configure:4350: checking for $ac_word" >&5
be912515 4350if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4351 echo $ac_n "(cached) $ac_c" 1>&6
4352else
be912515
NN
4353 if test -n "$ncn_cv_CONFIGURED_LD_FOR_TARGET"; then
4354 ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET="$ncn_cv_CONFIGURED_LD_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4355else
4356 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4357 ac_dummy="$PATH"
4358 for ac_dir in $ac_dummy; do
4359 test -z "$ac_dir" && ac_dir=.
4360 if test -f $ac_dir/$ac_word; then
be912515 4361 ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET="ld"
ca9f4b81
AO
4362 break
4363 fi
4364 done
4365 IFS="$ac_save_ifs"
be912515 4366 test -z "$ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET="ld"
ca9f4b81
AO
4367fi
4368fi
be912515
NN
4369ncn_cv_CONFIGURED_LD_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_LD_FOR_TARGET"
4370if test -n "$ncn_cv_CONFIGURED_LD_FOR_TARGET"; then
4371 echo "$ac_t""$ncn_cv_CONFIGURED_LD_FOR_TARGET" 1>&6
ca9f4b81
AO
4372else
4373 echo "$ac_t""no" 1>&6
4374fi
4375
be912515 4376 CONFIGURED_LD_FOR_TARGET=$ncn_cv_CONFIGURED_LD_FOR_TARGET
ca9f4b81 4377 else
be912515 4378 CONFIGURED_LD_FOR_TARGET="${ncn_target_tool_prefix}ld"
ca9f4b81
AO
4379 fi
4380else
be912515 4381 CONFIGURED_LD_FOR_TARGET="$ac_cv_prog_CONFIGURED_LD_FOR_TARGET"
ca9f4b81
AO
4382fi
4383
4384 if test -n "$ncn_target_tool_prefix"; then
4385 # Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
4386set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
4387echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4388echo "configure:4389: checking for $ac_word" >&5
be912515 4389if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4390 echo $ac_n "(cached) $ac_c" 1>&6
4391else
be912515
NN
4392 if test -n "$CONFIGURED_NM_FOR_TARGET"; then
4393 ac_cv_prog_CONFIGURED_NM_FOR_TARGET="$CONFIGURED_NM_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4394else
4395 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4396 ac_dummy="$PATH"
4397 for ac_dir in $ac_dummy; do
4398 test -z "$ac_dir" && ac_dir=.
4399 if test -f $ac_dir/$ac_word; then
be912515 4400 ac_cv_prog_CONFIGURED_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
ca9f4b81
AO
4401 break
4402 fi
4403 done
4404 IFS="$ac_save_ifs"
4405fi
4406fi
be912515
NN
4407CONFIGURED_NM_FOR_TARGET="$ac_cv_prog_CONFIGURED_NM_FOR_TARGET"
4408if test -n "$CONFIGURED_NM_FOR_TARGET"; then
4409 echo "$ac_t""$CONFIGURED_NM_FOR_TARGET" 1>&6
ca9f4b81
AO
4410else
4411 echo "$ac_t""no" 1>&6
4412fi
4413
4414fi
be912515 4415if test -z "$ac_cv_prog_CONFIGURED_NM_FOR_TARGET" ; then
ca9f4b81 4416 if test $build = $target ; then
be912515 4417 ncn_cv_CONFIGURED_NM_FOR_TARGET=$CONFIGURED_NM_FOR_TARGET
ca9f4b81
AO
4418 # Extract the first word of "nm", so it can be a program name with args.
4419set dummy nm; ac_word=$2
4420echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4421echo "configure:4422: checking for $ac_word" >&5
be912515 4422if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4423 echo $ac_n "(cached) $ac_c" 1>&6
4424else
be912515
NN
4425 if test -n "$ncn_cv_CONFIGURED_NM_FOR_TARGET"; then
4426 ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET="$ncn_cv_CONFIGURED_NM_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4427else
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
be912515 4433 ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET="nm"
ca9f4b81
AO
4434 break
4435 fi
4436 done
4437 IFS="$ac_save_ifs"
be912515 4438 test -z "$ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET="nm"
ca9f4b81
AO
4439fi
4440fi
be912515
NN
4441ncn_cv_CONFIGURED_NM_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_NM_FOR_TARGET"
4442if test -n "$ncn_cv_CONFIGURED_NM_FOR_TARGET"; then
4443 echo "$ac_t""$ncn_cv_CONFIGURED_NM_FOR_TARGET" 1>&6
ca9f4b81
AO
4444else
4445 echo "$ac_t""no" 1>&6
4446fi
4447
be912515 4448 CONFIGURED_NM_FOR_TARGET=$ncn_cv_CONFIGURED_NM_FOR_TARGET
ca9f4b81 4449 else
be912515 4450 CONFIGURED_NM_FOR_TARGET="${ncn_target_tool_prefix}nm"
ca9f4b81
AO
4451 fi
4452else
be912515 4453 CONFIGURED_NM_FOR_TARGET="$ac_cv_prog_CONFIGURED_NM_FOR_TARGET"
ca9f4b81
AO
4454fi
4455
4456 if test -n "$ncn_target_tool_prefix"; then
4457 # Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
4458set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
4459echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4460echo "configure:4461: checking for $ac_word" >&5
be912515 4461if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4462 echo $ac_n "(cached) $ac_c" 1>&6
4463else
be912515
NN
4464 if test -n "$CONFIGURED_RANLIB_FOR_TARGET"; then
4465 ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET="$CONFIGURED_RANLIB_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4466else
4467 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4468 ac_dummy="$PATH"
4469 for ac_dir in $ac_dummy; do
4470 test -z "$ac_dir" && ac_dir=.
4471 if test -f $ac_dir/$ac_word; then
be912515 4472 ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}ranlib"
ca9f4b81
AO
4473 break
4474 fi
4475 done
4476 IFS="$ac_save_ifs"
4477fi
4478fi
be912515
NN
4479CONFIGURED_RANLIB_FOR_TARGET="$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET"
4480if test -n "$CONFIGURED_RANLIB_FOR_TARGET"; then
4481 echo "$ac_t""$CONFIGURED_RANLIB_FOR_TARGET" 1>&6
ca9f4b81
AO
4482else
4483 echo "$ac_t""no" 1>&6
4484fi
4485
4486fi
be912515 4487if test -z "$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET" ; then
ca9f4b81 4488 if test $build = $target ; then
be912515 4489 ncn_cv_CONFIGURED_RANLIB_FOR_TARGET=$CONFIGURED_RANLIB_FOR_TARGET
ca9f4b81
AO
4490 # Extract the first word of "ranlib", so it can be a program name with args.
4491set dummy ranlib; ac_word=$2
4492echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4493echo "configure:4494: checking for $ac_word" >&5
be912515 4494if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4495 echo $ac_n "(cached) $ac_c" 1>&6
4496else
be912515
NN
4497 if test -n "$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET"; then
4498 ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET="$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4499else
4500 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4501 ac_dummy="$PATH"
4502 for ac_dir in $ac_dummy; do
4503 test -z "$ac_dir" && ac_dir=.
4504 if test -f $ac_dir/$ac_word; then
be912515 4505 ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET="ranlib"
ca9f4b81
AO
4506 break
4507 fi
4508 done
4509 IFS="$ac_save_ifs"
be912515 4510 test -z "$ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET=":"
ca9f4b81
AO
4511fi
4512fi
be912515
NN
4513ncn_cv_CONFIGURED_RANLIB_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_RANLIB_FOR_TARGET"
4514if test -n "$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET"; then
4515 echo "$ac_t""$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET" 1>&6
ca9f4b81
AO
4516else
4517 echo "$ac_t""no" 1>&6
4518fi
4519
be912515 4520 CONFIGURED_RANLIB_FOR_TARGET=$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET
ca9f4b81 4521 else
be912515 4522 CONFIGURED_RANLIB_FOR_TARGET=":"
ca9f4b81
AO
4523 fi
4524else
be912515 4525 CONFIGURED_RANLIB_FOR_TARGET="$ac_cv_prog_CONFIGURED_RANLIB_FOR_TARGET"
ca9f4b81
AO
4526fi
4527
4528 if test -n "$ncn_target_tool_prefix"; then
4529 # Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
4530set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
4531echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4532echo "configure:4533: checking for $ac_word" >&5
be912515 4533if eval "test \"`echo '$''{'ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4534 echo $ac_n "(cached) $ac_c" 1>&6
4535else
be912515
NN
4536 if test -n "$CONFIGURED_WINDRES_FOR_TARGET"; then
4537 ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET="$CONFIGURED_WINDRES_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4538else
4539 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4540 ac_dummy="$PATH"
4541 for ac_dir in $ac_dummy; do
4542 test -z "$ac_dir" && ac_dir=.
4543 if test -f $ac_dir/$ac_word; then
be912515 4544 ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
ca9f4b81
AO
4545 break
4546 fi
4547 done
4548 IFS="$ac_save_ifs"
4549fi
4550fi
be912515
NN
4551CONFIGURED_WINDRES_FOR_TARGET="$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET"
4552if test -n "$CONFIGURED_WINDRES_FOR_TARGET"; then
4553 echo "$ac_t""$CONFIGURED_WINDRES_FOR_TARGET" 1>&6
ca9f4b81
AO
4554else
4555 echo "$ac_t""no" 1>&6
4556fi
4557
4558fi
be912515 4559if test -z "$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET" ; then
ca9f4b81 4560 if test $build = $target ; then
be912515 4561 ncn_cv_CONFIGURED_WINDRES_FOR_TARGET=$CONFIGURED_WINDRES_FOR_TARGET
ca9f4b81
AO
4562 # Extract the first word of "windres", so it can be a program name with args.
4563set dummy windres; ac_word=$2
4564echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4f4e53dd 4565echo "configure:4566: checking for $ac_word" >&5
be912515 4566if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET'+set}'`\" = set"; then
ca9f4b81
AO
4567 echo $ac_n "(cached) $ac_c" 1>&6
4568else
be912515
NN
4569 if test -n "$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET"; then
4570 ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET="$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET" # Let the user override the test.
ca9f4b81
AO
4571else
4572 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4573 ac_dummy="$PATH"
4574 for ac_dir in $ac_dummy; do
4575 test -z "$ac_dir" && ac_dir=.
4576 if test -f $ac_dir/$ac_word; then
be912515 4577 ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET="windres"
ca9f4b81
AO
4578 break
4579 fi
4580 done
4581 IFS="$ac_save_ifs"
be912515 4582 test -z "$ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET" && ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET="windres"
ca9f4b81
AO
4583fi
4584fi
be912515
NN
4585ncn_cv_CONFIGURED_WINDRES_FOR_TARGET="$ac_cv_prog_ncn_cv_CONFIGURED_WINDRES_FOR_TARGET"
4586if test -n "$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET"; then
4587 echo "$ac_t""$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET" 1>&6
ca9f4b81
AO
4588else
4589 echo "$ac_t""no" 1>&6
4590fi
4591
be912515 4592 CONFIGURED_WINDRES_FOR_TARGET=$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET
ca9f4b81 4593 else
be912515 4594 CONFIGURED_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}windres"
ca9f4b81
AO
4595 fi
4596else
be912515 4597 CONFIGURED_WINDRES_FOR_TARGET="$ac_cv_prog_CONFIGURED_WINDRES_FOR_TARGET"
ca9f4b81
AO
4598fi
4599
4977bab6 4600
79c06341 4601
79c06341 4602
e490616e 4603
4977bab6 4604
9e60a678 4605
79c06341 4606
79c06341 4607
79c06341 4608
671aa708 4609
6de9cd9a 4610
671aa708
NN
4611# Fix up target tools.
4612if test "x${build}" = "x${host}" ; then
4613 # In this case, the newly built tools can and should be used,
4614 # so we override the results of the autoconf tests.
4615 # This should really only happen when the tools are actually being built,
4616 # but that's a further refinement. The new build scheme, where
4617 # tools are built into a structure paralleling where they're installed,
4618 # should also eliminate all of this cleanly.
4619 AR_FOR_TARGET="\$(USUAL_AR_FOR_TARGET)"
4620 AS_FOR_TARGET="\$(USUAL_AS_FOR_TARGET)"
4621 DLLTOOL_FOR_TARGET="\$(USUAL_DLLTOOL_FOR_TARGET)"
4622 LD_FOR_TARGET="\$(USUAL_LD_FOR_TARGET)"
4623 NM_FOR_TARGET="\$(USUAL_NM_FOR_TARGET)"
4624 RANLIB_FOR_TARGET="\$(USUAL_RANLIB_FOR_TARGET)"
4625 WINDRES_FOR_TARGET="\$(USUAL_WINDRES_FOR_TARGET)"
be912515
NN
4626else
4627 # Just use the ones we found.
4628 AR_FOR_TARGET="\$(CONFIGURED_AR_FOR_TARGET)"
4629 AS_FOR_TARGET="\$(CONFIGURED_AS_FOR_TARGET)"
4630 DLLTOOL_FOR_TARGET="\$(CONFIGURED_DLLTOOL_FOR_TARGET)"
4631 LD_FOR_TARGET="\$(CONFIGURED_LD_FOR_TARGET)"
4632 NM_FOR_TARGET="\$(CONFIGURED_NM_FOR_TARGET)"
4633 RANLIB_FOR_TARGET="\$(CONFIGURED_RANLIB_FOR_TARGET)"
4634 WINDRES_FOR_TARGET="\$(CONFIGURED_WINDRES_FOR_TARGET)"
671aa708 4635fi
be912515
NN
4636
4637
4638
4639
4640
4641
4642
4643
671aa708
NN
4644# Certain tools may need extra flags.
4645AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
4646RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
4647NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
4648
ee03dc5e 4649echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4f4e53dd 4650echo "configure:4651: checking whether to enable maintainer-specific portions of Makefiles" >&5
ee03dc5e
AO
4651# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4652if test "${enable_maintainer_mode+set}" = set; then
4653 enableval="$enable_maintainer_mode"
4654 USE_MAINTAINER_MODE=$enableval
4655else
4656 USE_MAINTAINER_MODE=no
4657fi
4658
4659echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4660
4661
4662if test "$USE_MAINTAINER_MODE" = yes; then
4663 MAINTAINER_MODE_TRUE=
4664 MAINTAINER_MODE_FALSE='#'
4665else
4666 MAINTAINER_MODE_TRUE='#'
4667 MAINTAINER_MODE_FALSE=
4668fi
4669MAINT=$MAINTAINER_MODE_TRUE
4670
2805b53a
NN
4671# ---------------------
4672# GCC bootstrap support
4673# ---------------------
4674
4675# Stage specific cflags for build.
4676stage1_cflags="-g"
4677case $build in
4678 vax-*-*)
4679 case ${GCC} in
4680 yes) stage1_cflags="-g -Wa,-J" ;;
4681 *) stage1_cflags="-g -J" ;;
4682 esac ;;
4683 powerpc-*-darwin*)
4684 # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
4685 # sources; use -no-cpp-precomp to get to GNU cpp.
4686 # Apple's GCC has bugs in designated initializer handling, so disable
4687 # that too.
4688 stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
4689 ;;
4690esac
4691
4692
4693# Enable -Werror in bootstrap stage2 and later.
4694# Change the default to "no" on release branches.
4695# Check whether --enable-werror or --disable-werror was given.
4696if test "${enable_werror+set}" = set; then
4697 enableval="$enable_werror"
4698 :
4699else
4700 enable_werror=yes
4701fi
4702
09a9c095
NN
4703case ${enable_werror} in
4704 yes) stage2_werror_flag="--enable-werror-always" ;;
4705 *) stage2_werror_flag="" ;;
2805b53a
NN
4706esac
4707
4708
671aa708
NN
4709trap '' 1 2 15
4710cat > confcache <<\EOF
4711# This file is a shell script that caches the results of configure
4712# tests run on this system so they can be shared between configure
4713# scripts and configure runs. It is not useful on other systems.
4714# If it contains results you don't want to keep, you may remove or edit it.
4715#
4716# By default, configure uses ./config.cache as the cache file,
4717# creating it if it does not exist already. You can give configure
4718# the --cache-file=FILE option to use a different cache file; that is
4719# what configure does when it calls configure scripts in
4720# subdirectories, so they share the cache.
4721# Giving --cache-file=/dev/null disables caching, for debugging configure.
4722# config.status only pays attention to the cache file if you give it the
4723# --recheck option to rerun configure.
4724#
79c06341 4725EOF
671aa708
NN
4726# The following way of writing the cache mishandles newlines in values,
4727# but we know of no workaround that is simple, portable, and efficient.
4728# So, don't put newlines in cache variables' values.
4729# Ultrix sh set writes to stderr and can't be redirected directly,
4730# and sets the high bit in the cache file unless we assign to the vars.
4731(set) 2>&1 |
4732 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4733 *ac_space=\ *)
4734 # `set' does not quote correctly, so add quotes (double-quote substitution
4735 # turns \\\\ into \\, and sed turns \\ into \).
4736 sed -n \
4737 -e "s/'/'\\\\''/g" \
4738 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4977bab6 4739 ;;
671aa708
NN
4740 *)
4741 # `set' quotes correctly as required by POSIX, so do not add quotes.
4742 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4743 ;;
4744 esac >> confcache
4745if cmp -s $cache_file confcache; then
4746 :
4747else
4748 if test -w $cache_file; then
4749 echo "updating cache $cache_file"
4750 cat confcache > $cache_file
4751 else
4752 echo "not updating unwritable cache $cache_file"
4753 fi
4977bab6 4754fi
671aa708 4755rm -f confcache
79c06341 4756
671aa708 4757trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
79c06341 4758
671aa708
NN
4759test "x$prefix" = xNONE && prefix=$ac_default_prefix
4760# Let make expand exec_prefix.
4761test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4e77e8f1 4762
671aa708
NN
4763# Any assignment to VPATH causes Sun make to only execute
4764# the first set of double-colon rules, so remove it if not needed.
4765# If there is a colon in the path, we need to keep it.
4766if test "x$srcdir" = x.; then
4767 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4768fi
79c06341 4769
671aa708
NN
4770trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4771
4772# Transform confdefs.h into DEFS.
4773# Protect against shell expansion while executing Makefile rules.
4774# Protect against Makefile macro expansion.
60975492
PB
4775cat > conftest.defs <<\EOF
4776s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
4777s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
4778s%\[%\\&%g
4779s%\]%\\&%g
4780s%\$%$$%g
4781EOF
4782DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
4783rm -f conftest.defs
4977bab6 4784
4977bab6 4785
671aa708
NN
4786# Without the "./", some shells look in PATH for config.status.
4787: ${CONFIG_STATUS=./config.status}
4977bab6 4788
671aa708
NN
4789echo creating $CONFIG_STATUS
4790rm -f $CONFIG_STATUS
4791cat > $CONFIG_STATUS <<EOF
4792#! /bin/sh
4793# Generated automatically by configure.
4794# Run this file to recreate the current configuration.
4795# This directory was configured as follows,
4796# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4797#
4798# $0 $ac_configure_args
4799#
4800# Compiler output produced by configure, useful for debugging
4801# configure, is in ./config.log if it exists.
4977bab6 4802
671aa708
NN
4803ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4804for ac_option
4805do
4806 case "\$ac_option" in
4807 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4808 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4809 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4810 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4811 echo "$CONFIG_STATUS generated by autoconf version 2.13"
4812 exit 0 ;;
4813 -help | --help | --hel | --he | --h)
4814 echo "\$ac_cs_usage"; exit 0 ;;
4815 *) echo "\$ac_cs_usage"; exit 1 ;;
4977bab6 4816 esac
671aa708 4817done
4977bab6 4818
671aa708 4819ac_given_srcdir=$srcdir
775956d0 4820ac_given_INSTALL="$INSTALL"
79c06341 4821
671aa708
NN
4822trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4823EOF
4824cat >> $CONFIG_STATUS <<EOF
4825
4826# Protect against being on the right side of a sed subst in config.status.
4827sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4828 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4829$ac_vpsub
4830$extrasub
4831s%@SHELL@%$SHELL%g
4832s%@CFLAGS@%$CFLAGS%g
4833s%@CPPFLAGS@%$CPPFLAGS%g
4834s%@CXXFLAGS@%$CXXFLAGS%g
4835s%@FFLAGS@%$FFLAGS%g
4836s%@DEFS@%$DEFS%g
4837s%@LDFLAGS@%$LDFLAGS%g
4838s%@LIBS@%$LIBS%g
4839s%@exec_prefix@%$exec_prefix%g
4840s%@prefix@%$prefix%g
4841s%@program_transform_name@%$program_transform_name%g
4842s%@bindir@%$bindir%g
4843s%@sbindir@%$sbindir%g
4844s%@libexecdir@%$libexecdir%g
4845s%@datadir@%$datadir%g
4846s%@sysconfdir@%$sysconfdir%g
4847s%@sharedstatedir@%$sharedstatedir%g
4848s%@localstatedir@%$localstatedir%g
4849s%@libdir@%$libdir%g
4850s%@includedir@%$includedir%g
4851s%@oldincludedir@%$oldincludedir%g
4852s%@infodir@%$infodir%g
4853s%@mandir@%$mandir%g
4854s%@host@%$host%g
4855s%@host_alias@%$host_alias%g
4856s%@host_cpu@%$host_cpu%g
4857s%@host_vendor@%$host_vendor%g
4858s%@host_os@%$host_os%g
4859s%@target@%$target%g
4860s%@target_alias@%$target_alias%g
4861s%@target_cpu@%$target_cpu%g
4862s%@target_vendor@%$target_vendor%g
4863s%@target_os@%$target_os%g
4864s%@build@%$build%g
4865s%@build_alias@%$build_alias%g
4866s%@build_cpu@%$build_cpu%g
4867s%@build_vendor@%$build_vendor%g
4868s%@build_os@%$build_os%g
775956d0
NN
4869s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4870s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4871s%@INSTALL_DATA@%$INSTALL_DATA%g
3dfabf63 4872s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
8b87bb96
NN
4873s%@build_subdir@%$build_subdir%g
4874s%@host_subdir@%$host_subdir%g
4875s%@target_subdir@%$target_subdir%g
55ffb5ed
NN
4876s%@CC@%$CC%g
4877s%@GNATBIND@%$GNATBIND%g
a76494aa 4878s%@do_compare@%$do_compare%g
6de9cd9a
DN
4879s%@gmplibs@%$gmplibs%g
4880s%@gmpinc@%$gmpinc%g
2805b53a 4881s%@stage1_languages@%$stage1_languages%g
1e0f07d3
PB
4882s%@DEFAULT_YACC@%$DEFAULT_YACC%g
4883s%@DEFAULT_M4@%$DEFAULT_M4%g
4884s%@DEFAULT_LEX@%$DEFAULT_LEX%g
671aa708
NN
4885/@serialization_dependencies@/r $serialization_dependencies
4886s%@serialization_dependencies@%%g
4887/@host_makefile_frag@/r $host_makefile_frag
4888s%@host_makefile_frag@%%g
4889/@target_makefile_frag@/r $target_makefile_frag
4890s%@target_makefile_frag@%%g
4891/@alphaieee_frag@/r $alphaieee_frag
4892s%@alphaieee_frag@%%g
4893/@ospace_frag@/r $ospace_frag
4894s%@ospace_frag@%%g
4895s%@SET_LIB_PATH@%$SET_LIB_PATH%g
4896s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
4897s%@BUILD_PREFIX@%$BUILD_PREFIX%g
4898s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g
671aa708
NN
4899s%@gcc_version_trigger@%$gcc_version_trigger%g
4900s%@gcc_version@%$gcc_version%g
4901s%@tooldir@%$tooldir%g
4902s%@build_tooldir@%$build_tooldir%g
4903s%@GDB_TK@%$GDB_TK%g
4904s%@gxx_include_dir@%$gxx_include_dir%g
4905s%@libstdcxx_incdir@%$libstdcxx_incdir%g
671aa708
NN
4906s%@build_configargs@%$build_configargs%g
4907s%@configure_build_modules@%$configure_build_modules%g
4908s%@all_build_modules@%$all_build_modules%g
4909s%@host_configargs@%$host_configargs%g
4910s%@configdirs@%$configdirs%g
671aa708
NN
4911s%@target_configargs@%$target_configargs%g
4912s%@target_configdirs@%$target_configdirs%g
671aa708
NN
4913s%@BISON@%$BISON%g
4914s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
4915s%@LEX@%$LEX%g
4916s%@MAKEINFO@%$MAKEINFO%g
4917s%@YACC@%$YACC%g
4918s%@config_shell@%$config_shell%g
ca9f4b81
AO
4919s%@AR@%$AR%g
4920s%@ncn_cv_AR@%$ncn_cv_AR%g
4921s%@AS@%$AS%g
4922s%@ncn_cv_AS@%$ncn_cv_AS%g
4923s%@DLLTOOL@%$DLLTOOL%g
4924s%@ncn_cv_DLLTOOL@%$ncn_cv_DLLTOOL%g
4925s%@LD@%$LD%g
4926s%@ncn_cv_LD@%$ncn_cv_LD%g
4927s%@NM@%$NM%g
4928s%@ncn_cv_NM@%$ncn_cv_NM%g
4929s%@RANLIB@%$RANLIB%g
4930s%@ncn_cv_RANLIB@%$ncn_cv_RANLIB%g
4931s%@WINDRES@%$WINDRES%g
4932s%@ncn_cv_WINDRES@%$ncn_cv_WINDRES%g
4933s%@OBJCOPY@%$OBJCOPY%g
4934s%@ncn_cv_OBJCOPY@%$ncn_cv_OBJCOPY%g
4935s%@OBJDUMP@%$OBJDUMP%g
4936s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g
671aa708 4937s%@CXX@%$CXX%g
6691a79e 4938s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
be912515
NN
4939s%@CONFIGURED_AR_FOR_TARGET@%$CONFIGURED_AR_FOR_TARGET%g
4940s%@ncn_cv_CONFIGURED_AR_FOR_TARGET@%$ncn_cv_CONFIGURED_AR_FOR_TARGET%g
4941s%@CONFIGURED_AS_FOR_TARGET@%$CONFIGURED_AS_FOR_TARGET%g
4942s%@ncn_cv_CONFIGURED_AS_FOR_TARGET@%$ncn_cv_CONFIGURED_AS_FOR_TARGET%g
4943s%@CONFIGURED_DLLTOOL_FOR_TARGET@%$CONFIGURED_DLLTOOL_FOR_TARGET%g
4944s%@ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET@%$ncn_cv_CONFIGURED_DLLTOOL_FOR_TARGET%g
4945s%@CONFIGURED_LD_FOR_TARGET@%$CONFIGURED_LD_FOR_TARGET%g
4946s%@ncn_cv_CONFIGURED_LD_FOR_TARGET@%$ncn_cv_CONFIGURED_LD_FOR_TARGET%g
4947s%@CONFIGURED_NM_FOR_TARGET@%$CONFIGURED_NM_FOR_TARGET%g
4948s%@ncn_cv_CONFIGURED_NM_FOR_TARGET@%$ncn_cv_CONFIGURED_NM_FOR_TARGET%g
4949s%@CONFIGURED_RANLIB_FOR_TARGET@%$CONFIGURED_RANLIB_FOR_TARGET%g
4950s%@ncn_cv_CONFIGURED_RANLIB_FOR_TARGET@%$ncn_cv_CONFIGURED_RANLIB_FOR_TARGET%g
4951s%@CONFIGURED_WINDRES_FOR_TARGET@%$CONFIGURED_WINDRES_FOR_TARGET%g
4952s%@ncn_cv_CONFIGURED_WINDRES_FOR_TARGET@%$ncn_cv_CONFIGURED_WINDRES_FOR_TARGET%g
671aa708
NN
4953s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
4954s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
4955s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
4956s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
6de9cd9a 4957s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
671aa708
NN
4958s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
4959s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
4960s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
4961s%@RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%$RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE%g
be912515
NN
4962s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
4963s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
4964s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
4965s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
4966s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
4967s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
4968s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
ee03dc5e
AO
4969s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
4970s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
4971s%@MAINT@%$MAINT%g
2805b53a 4972s%@stage1_cflags@%$stage1_cflags%g
09a9c095 4973s%@stage2_werror_flag@%$stage2_werror_flag%g
671aa708
NN
4974
4975CEOF
4976EOF
79c06341 4977
671aa708
NN
4978cat >> $CONFIG_STATUS <<\EOF
4979
4980# Split the substitutions into bite-sized pieces for seds with
4981# small command number limits, like on Digital OSF/1 and HP-UX.
4982ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4983ac_file=1 # Number of current file.
4984ac_beg=1 # First line for current file.
4985ac_end=$ac_max_sed_cmds # Line after last line for current file.
4986ac_more_lines=:
4987ac_sed_cmds=""
4988while $ac_more_lines; do
4989 if test $ac_beg -gt 1; then
4990 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4991 else
4992 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4977bab6 4993 fi
671aa708
NN
4994 if test ! -s conftest.s$ac_file; then
4995 ac_more_lines=false
4996 rm -f conftest.s$ac_file
4997 else
4998 if test -z "$ac_sed_cmds"; then
4999 ac_sed_cmds="sed -f conftest.s$ac_file"
5000 else
5001 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5002 fi
5003 ac_file=`expr $ac_file + 1`
5004 ac_beg=$ac_end
5005 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4977bab6 5006 fi
671aa708
NN
5007done
5008if test -z "$ac_sed_cmds"; then
5009 ac_sed_cmds=cat
4977bab6 5010fi
671aa708 5011EOF
79c06341 5012
671aa708 5013cat >> $CONFIG_STATUS <<EOF
79c06341 5014
671aa708
NN
5015CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
5016EOF
5017cat >> $CONFIG_STATUS <<\EOF
5018for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5019 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5020 case "$ac_file" in
5021 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5022 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5023 *) ac_file_in="${ac_file}.in" ;;
5024 esac
79c06341 5025
671aa708 5026 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
79c06341 5027
671aa708
NN
5028 # Remove last slash and all that follows it. Not all systems have dirname.
5029 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5030 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5031 # The file is in a subdirectory.
5032 test ! -d "$ac_dir" && mkdir "$ac_dir"
5033 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5034 # A "../" for each directory in $ac_dir_suffix.
5035 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5036 else
5037 ac_dir_suffix= ac_dots=
5038 fi
79c06341 5039
671aa708
NN
5040 case "$ac_given_srcdir" in
5041 .) srcdir=.
5042 if test -z "$ac_dots"; then top_srcdir=.
5043 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5044 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5045 *) # Relative path.
5046 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5047 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5048 esac
79c06341 5049
775956d0
NN
5050 case "$ac_given_INSTALL" in
5051 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5052 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5053 esac
79c06341 5054
671aa708
NN
5055 echo creating "$ac_file"
5056 rm -f "$ac_file"
5057 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5058 case "$ac_file" in
5059 *Makefile*) ac_comsub="1i\\
5060# $configure_input" ;;
5061 *) ac_comsub= ;;
5062 esac
79c06341 5063
671aa708
NN
5064 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5065 sed -e "$ac_comsub
5066s%@configure_input@%$configure_input%g
5067s%@srcdir@%$srcdir%g
5068s%@top_srcdir@%$top_srcdir%g
775956d0 5069s%@INSTALL@%$INSTALL%g
671aa708
NN
5070" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5071fi; done
5072rm -f conftest.s*
79c06341 5073
671aa708
NN
5074EOF
5075cat >> $CONFIG_STATUS <<EOF
79c06341 5076
671aa708
NN
5077EOF
5078cat >> $CONFIG_STATUS <<\EOF
79c06341
JL
5079
5080exit 0
671aa708
NN
5081EOF
5082chmod +x $CONFIG_STATUS
5083rm -fr confdefs* $ac_clean_files
5084test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
79c06341 5085