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