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