source: trunk/binutils/configure@ 3022

Last change on this file since 3022 was 1113, checked in by bird, 22 years ago

Regenerated.

  • Property cvs2svn:cvs-rev set to 1.4
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 139.0 KB
Line 
1#! /bin/sh
2
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:
14ac_help="$ac_help
15 --disable-serial-[{host,target,build}-]configure
16 Don't force sequential configuration of
17 sub-packages for the host, target or build
18 machine, or of any sub-packages at all"
19ac_help="$ac_help
20 --enable-maintainer-mode enable make rules and dependencies not useful
21 (and sometimes confusing) to the casual installer"
22
23# Initialize some variables set by options.
24# The variables have the same names as the options, with
25# dashes changed to underlines.
26build=NONE
27cache_file=./config.cache
28exec_prefix=NONE
29host=NONE
30no_create=
31nonopt=NONE
32no_recursion=
33prefix=NONE
34program_prefix=NONE
35program_suffix=NONE
36program_transform_name=s,x,x,
37silent=
38site=
39srcdir=
40target=NONE
41verbose=
42x_includes=NONE
43x_libraries=NONE
44bindir='${exec_prefix}/bin'
45sbindir='${exec_prefix}/sbin'
46libexecdir='${exec_prefix}/libexec'
47datadir='${prefix}/share'
48sysconfdir='${prefix}/etc'
49sharedstatedir='${prefix}/com'
50localstatedir='${prefix}/var'
51libdir='${exec_prefix}/lib'
52includedir='${prefix}/include'
53oldincludedir='/usr/include'
54infodir='${prefix}/info'
55mandir='${prefix}/man'
56
57# Initialize some other variables.
58subdirs=
59MFLAGS= MAKEFLAGS=
60SHELL=${CONFIG_SHELL-/bin/sh}
61# Maximum number of lines to put in a shell here document.
62ac_max_here_lines=12
63
64ac_prev=
65for ac_option
66do
67
68 # If the previous option needs an argument, assign it.
69 if test -n "$ac_prev"; then
70 eval "$ac_prev=\$ac_option"
71 ac_prev=
72 continue
73 fi
74
75 case "$ac_option" in
76 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
77 *) ac_optarg= ;;
78 esac
79
80 # Accept the important Cygnus configure options, so we can diagnose typos.
81
82 case "$ac_option" in
83
84 -bindir | --bindir | --bindi | --bind | --bin | --bi)
85 ac_prev=bindir ;;
86 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
87 bindir="$ac_optarg" ;;
88
89 -build | --build | --buil | --bui | --bu)
90 ac_prev=build ;;
91 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
92 build="$ac_optarg" ;;
93
94 -cache-file | --cache-file | --cache-fil | --cache-fi \
95 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
96 ac_prev=cache_file ;;
97 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
98 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
99 cache_file="$ac_optarg" ;;
100
101 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
102 ac_prev=datadir ;;
103 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
104 | --da=*)
105 datadir="$ac_optarg" ;;
106
107 -disable-* | --disable-*)
108 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
109 # Reject names that are not valid shell variable names.
110 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
111 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
112 fi
113 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114 eval "enable_${ac_feature}=no" ;;
115
116 -enable-* | --enable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
118 # Reject names that are not valid shell variable names.
119 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121 fi
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 case "$ac_option" in
124 *=*) ;;
125 *) ac_optarg=yes ;;
126 esac
127 eval "enable_${ac_feature}='$ac_optarg'" ;;
128
129 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
130 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
131 | --exec | --exe | --ex)
132 ac_prev=exec_prefix ;;
133 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
134 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
135 | --exec=* | --exe=* | --ex=*)
136 exec_prefix="$ac_optarg" ;;
137
138 -gas | --gas | --ga | --g)
139 # Obsolete; use --with-gas.
140 with_gas=yes ;;
141
142 -help | --help | --hel | --he)
143 # Omit some internal or obsolete options to make the list less imposing.
144 # This message is too long to be a string in the A/UX 3.1 sh.
145 cat << EOF
146Usage: configure [options] [host]
147Options: [defaults in brackets after descriptions]
148Configuration:
149 --cache-file=FILE cache test results in FILE
150 --help print this message
151 --no-create do not create output files
152 --quiet, --silent do not print \`checking...' messages
153 --version print the version of autoconf that created configure
154Directory and file names:
155 --prefix=PREFIX install architecture-independent files in PREFIX
156 [$ac_default_prefix]
157 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
158 [same as prefix]
159 --bindir=DIR user executables in DIR [EPREFIX/bin]
160 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
161 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
162 --datadir=DIR read-only architecture-independent data in DIR
163 [PREFIX/share]
164 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
165 --sharedstatedir=DIR modifiable architecture-independent data in DIR
166 [PREFIX/com]
167 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
168 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
169 --includedir=DIR C header files in DIR [PREFIX/include]
170 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
171 --infodir=DIR info documentation in DIR [PREFIX/info]
172 --mandir=DIR man documentation in DIR [PREFIX/man]
173 --srcdir=DIR find the sources in DIR [configure dir or ..]
174 --program-prefix=PREFIX prepend PREFIX to installed program names
175 --program-suffix=SUFFIX append SUFFIX to installed program names
176 --program-transform-name=PROGRAM
177 run sed PROGRAM on installed program names
178EOF
179 cat << EOF
180Host type:
181 --build=BUILD configure for building on BUILD [BUILD=HOST]
182 --host=HOST configure for HOST [guessed]
183 --target=TARGET configure for TARGET [TARGET=HOST]
184Features and packages:
185 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
186 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
187 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
188 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
189 --x-includes=DIR X include files are in DIR
190 --x-libraries=DIR X library files are in DIR
191EOF
192 if test -n "$ac_help"; then
193 echo "--enable and --with options recognized:$ac_help"
194 fi
195 exit 0 ;;
196
197 -host | --host | --hos | --ho)
198 ac_prev=host ;;
199 -host=* | --host=* | --hos=* | --ho=*)
200 host="$ac_optarg" ;;
201
202 -includedir | --includedir | --includedi | --included | --include \
203 | --includ | --inclu | --incl | --inc)
204 ac_prev=includedir ;;
205 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
206 | --includ=* | --inclu=* | --incl=* | --inc=*)
207 includedir="$ac_optarg" ;;
208
209 -infodir | --infodir | --infodi | --infod | --info | --inf)
210 ac_prev=infodir ;;
211 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
212 infodir="$ac_optarg" ;;
213
214 -libdir | --libdir | --libdi | --libd)
215 ac_prev=libdir ;;
216 -libdir=* | --libdir=* | --libdi=* | --libd=*)
217 libdir="$ac_optarg" ;;
218
219 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
220 | --libexe | --libex | --libe)
221 ac_prev=libexecdir ;;
222 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
223 | --libexe=* | --libex=* | --libe=*)
224 libexecdir="$ac_optarg" ;;
225
226 -localstatedir | --localstatedir | --localstatedi | --localstated \
227 | --localstate | --localstat | --localsta | --localst \
228 | --locals | --local | --loca | --loc | --lo)
229 ac_prev=localstatedir ;;
230 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
231 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
232 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
233 localstatedir="$ac_optarg" ;;
234
235 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
236 ac_prev=mandir ;;
237 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238 mandir="$ac_optarg" ;;
239
240 -nfp | --nfp | --nf)
241 # Obsolete; use --without-fp.
242 with_fp=no ;;
243
244 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
245 | --no-cr | --no-c)
246 no_create=yes ;;
247
248 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
249 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
250 no_recursion=yes ;;
251
252 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
253 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
254 | --oldin | --oldi | --old | --ol | --o)
255 ac_prev=oldincludedir ;;
256 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
257 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
258 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
259 oldincludedir="$ac_optarg" ;;
260
261 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
262 ac_prev=prefix ;;
263 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
264 prefix="$ac_optarg" ;;
265
266 -program-prefix | --program-prefix | --program-prefi | --program-pref \
267 | --program-pre | --program-pr | --program-p)
268 ac_prev=program_prefix ;;
269 -program-prefix=* | --program-prefix=* | --program-prefi=* \
270 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
271 program_prefix="$ac_optarg" ;;
272
273 -program-suffix | --program-suffix | --program-suffi | --program-suff \
274 | --program-suf | --program-su | --program-s)
275 ac_prev=program_suffix ;;
276 -program-suffix=* | --program-suffix=* | --program-suffi=* \
277 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
278 program_suffix="$ac_optarg" ;;
279
280 -program-transform-name | --program-transform-name \
281 | --program-transform-nam | --program-transform-na \
282 | --program-transform-n | --program-transform- \
283 | --program-transform | --program-transfor \
284 | --program-transfo | --program-transf \
285 | --program-trans | --program-tran \
286 | --progr-tra | --program-tr | --program-t)
287 ac_prev=program_transform_name ;;
288 -program-transform-name=* | --program-transform-name=* \
289 | --program-transform-nam=* | --program-transform-na=* \
290 | --program-transform-n=* | --program-transform-=* \
291 | --program-transform=* | --program-transfor=* \
292 | --program-transfo=* | --program-transf=* \
293 | --program-trans=* | --program-tran=* \
294 | --progr-tra=* | --program-tr=* | --program-t=*)
295 program_transform_name="$ac_optarg" ;;
296
297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
298 | -silent | --silent | --silen | --sile | --sil)
299 silent=yes ;;
300
301 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
302 ac_prev=sbindir ;;
303 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
304 | --sbi=* | --sb=*)
305 sbindir="$ac_optarg" ;;
306
307 -sharedstatedir | --sharedstatedir | --sharedstatedi \
308 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
309 | --sharedst | --shareds | --shared | --share | --shar \
310 | --sha | --sh)
311 ac_prev=sharedstatedir ;;
312 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
313 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
314 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
315 | --sha=* | --sh=*)
316 sharedstatedir="$ac_optarg" ;;
317
318 -site | --site | --sit)
319 ac_prev=site ;;
320 -site=* | --site=* | --sit=*)
321 site="$ac_optarg" ;;
322
323 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
324 ac_prev=srcdir ;;
325 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
326 srcdir="$ac_optarg" ;;
327
328 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
329 | --syscon | --sysco | --sysc | --sys | --sy)
330 ac_prev=sysconfdir ;;
331 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
332 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
333 sysconfdir="$ac_optarg" ;;
334
335 -target | --target | --targe | --targ | --tar | --ta | --t)
336 ac_prev=target ;;
337 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
338 target="$ac_optarg" ;;
339
340 -v | -verbose | --verbose | --verbos | --verbo | --verb)
341 verbose=yes ;;
342
343 -version | --version | --versio | --versi | --vers)
344 echo "configure generated by autoconf version 2.13"
345 exit 0 ;;
346
347 -with-* | --with-*)
348 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
349 # Reject names that are not valid shell variable names.
350 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
351 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
352 fi
353 ac_package=`echo $ac_package| sed 's/-/_/g'`
354 case "$ac_option" in
355 *=*) ;;
356 *) ac_optarg=yes ;;
357 esac
358 eval "with_${ac_package}='$ac_optarg'" ;;
359
360 -without-* | --without-*)
361 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
362 # Reject names that are not valid shell variable names.
363 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
365 fi
366 ac_package=`echo $ac_package| sed 's/-/_/g'`
367 eval "with_${ac_package}=no" ;;
368
369 --x)
370 # Obsolete; use --with-x.
371 with_x=yes ;;
372
373 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
374 | --x-incl | --x-inc | --x-in | --x-i)
375 ac_prev=x_includes ;;
376 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
377 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
378 x_includes="$ac_optarg" ;;
379
380 -x-libraries | --x-libraries | --x-librarie | --x-librari \
381 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
382 ac_prev=x_libraries ;;
383 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
384 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
385 x_libraries="$ac_optarg" ;;
386
387 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
388 ;;
389
390 *)
391 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
392 echo "configure: warning: $ac_option: invalid host type" 1>&2
393 fi
394 if test "x$nonopt" != xNONE; then
395 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
396 fi
397 nonopt="$ac_option"
398 ;;
399
400 esac
401done
402
403if test -n "$ac_prev"; then
404 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
405fi
406
407trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
408
409# File descriptor usage:
410# 0 standard input
411# 1 file creation
412# 2 errors and warnings
413# 3 some systems may open it to /dev/tty
414# 4 used on the Kubota Titan
415# 6 checking for... messages and results
416# 5 compiler messages saved in config.log
417if test "$silent" = yes; then
418 exec 6>/dev/null
419else
420 exec 6>&1
421fi
422exec 5>./config.log
423
424echo "\
425This file contains any messages produced by compilers while
426running configure, to aid debugging if configure makes a mistake.
427" 1>&5
428
429# Strip out --no-create and --no-recursion so they do not pile up.
430# Also quote any args containing shell metacharacters.
431ac_configure_args=
432for ac_arg
433do
434 case "$ac_arg" in
435 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
436 | --no-cr | --no-c) ;;
437 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
438 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
439 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
440 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
441 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
442 esac
443done
444
445# NLS nuisances.
446# Only set these to C if already set. These must not be set unconditionally
447# because not all systems understand e.g. LANG=C (notably SCO).
448# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
449# Non-C LC_CTYPE values break the ctype check.
450if test "${LANG+set}" = set; then LANG=C; export LANG; fi
451if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
452if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
453if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
454
455# confdefs.h avoids OS command line length limits that DEFS can exceed.
456rm -rf conftest* confdefs.h
457# AIX cpp loses on an empty file, so make sure it contains at least a newline.
458echo > confdefs.h
459
460# A filename unique to this package, relative to the directory that
461# configure is in, which we can look for to find out if srcdir is correct.
462ac_unique_file=move-if-change
463
464# Find the source files, if location was not specified.
465if test -z "$srcdir"; then
466 ac_srcdir_defaulted=yes
467 # Try the directory containing this script, then its parent.
468 ac_prog=$0
469 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
470 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
471 srcdir=$ac_confdir
472 if test ! -r $srcdir/$ac_unique_file; then
473 srcdir=..
474 fi
475else
476 ac_srcdir_defaulted=no
477fi
478if test ! -r $srcdir/$ac_unique_file; then
479 if test "$ac_srcdir_defaulted" = yes; then
480 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
481 else
482 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
483 fi
484fi
485srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
486
487# Prefer explicitly selected file to automatically selected ones.
488if test -z "$CONFIG_SITE"; then
489 if test "x$prefix" != xNONE; then
490 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
491 else
492 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
493 fi
494fi
495for ac_site_file in $CONFIG_SITE; do
496 if test -r "$ac_site_file"; then
497 echo "loading site script $ac_site_file"
498 . "$ac_site_file"
499 fi
500done
501
502if test -r "$cache_file"; then
503 echo "loading cache $cache_file"
504 . $cache_file
505else
506 echo "creating cache $cache_file"
507 > $cache_file
508fi
509
510ac_ext=c
511# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
512ac_cpp='$CPP $CPPFLAGS'
513ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
514ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
515cross_compiling=$ac_cv_prog_cc_cross
516
517ac_exeext=
518ac_objext=o
519if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
520 # Stardent Vistra SVR4 grep lacks -e, says [email protected].
521 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
522 ac_n= ac_c='
523' ac_t=' '
524 else
525 ac_n=-n ac_c= ac_t=
526 fi
527else
528 ac_n= ac_c='\c' ac_t=
529fi
530
531echo $ac_n "checking for path separator""... $ac_c" 1>&6
532echo "configure:533: checking for path separator" >&5
533# Filter path to get backslahes into forwardslashes
534case "`uname -s 2> /dev/null`" in
535OS/2)
536 PATH=`echo -E "$PATH" | sed 's+\\\\+/+g'`
537 PATH_IFS=';'
538 ;;
539*)
540 PATH_IFS=':'
541 ;;
542esac
543echo "$ac_t""${PATH_IFS}" 1>&6
544
545echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
546echo "configure:547: checking for Cygwin environment" >&5
547if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
548 echo $ac_n "(cached) $ac_c" 1>&6
549else
550 cat > conftest.$ac_ext <<EOF
551#line 552 "configure"
552#include "confdefs.h"
553
554int main() {
555
556#ifndef __CYGWIN__
557#define __CYGWIN__ __CYGWIN32__
558#endif
559return __CYGWIN__;
560; return 0; }
561EOF
562if { (eval echo configure:563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
563 rm -rf conftest*
564 ac_cv_cygwin=yes
565else
566 echo "configure: failed program was:" >&5
567 cat conftest.$ac_ext >&5
568 rm -rf conftest*
569 ac_cv_cygwin=no
570fi
571rm -f conftest*
572rm -f conftest*
573fi
574
575echo "$ac_t""$ac_cv_cygwin" 1>&6
576CYGWIN=
577test "$ac_cv_cygwin" = yes && CYGWIN=yes
578echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
579echo "configure:580: checking for mingw32 environment" >&5
580if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
581 echo $ac_n "(cached) $ac_c" 1>&6
582else
583 cat > conftest.$ac_ext <<EOF
584#line 585 "configure"
585#include "confdefs.h"
586
587int main() {
588return __MINGW32__;
589; return 0; }
590EOF
591if { (eval echo configure:592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
592 rm -rf conftest*
593 ac_cv_mingw32=yes
594else
595 echo "configure: failed program was:" >&5
596 cat conftest.$ac_ext >&5
597 rm -rf conftest*
598 ac_cv_mingw32=no
599fi
600rm -f conftest*
601rm -f conftest*
602fi
603
604echo "$ac_t""$ac_cv_mingw32" 1>&6
605MINGW32=
606test "$ac_cv_mingw32" = yes && MINGW32=yes
607echo $ac_n "checking for EMX/OS2 environment""... $ac_c" 1>&6
608echo "configure:609: checking for EMX/OS2 environment" >&5
609if eval "test \"`echo '$''{'ac_cv_emxos2'+set}'`\" = set"; then
610 echo $ac_n "(cached) $ac_c" 1>&6
611else
612 : ${CC=gcc.exe}
613cat > conftest.$ac_ext <<EOF
614#line 615 "configure"
615#include "confdefs.h"
616
617int main() {
618return __EMX__;
619; return 0; }
620EOF
621if { (eval echo configure:622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
622 rm -rf conftest*
623 ac_cv_emxos2=yes
624else
625 echo "configure: failed program was:" >&5
626 cat conftest.$ac_ext >&5
627 rm -rf conftest*
628 ac_cv_emxos2=no
629fi
630rm -f conftest*
631rm -f conftest*
632fi
633
634echo "$ac_t""$ac_cv_emxos2" 1>&6
635if eval "test \"`echo '$''{'ac_cv_libpre'+set}'`\" = set"; then
636 echo $ac_n "(cached) $ac_c" 1>&6
637else
638 if test "$ac_cv_emxos2" = yes ; then
639 ac_cv_libpre=
640else
641 ac_cv_libpre=lib
642fi
643
644fi
645
646EMXOS2=
647test "$ac_cv_emxos2" = yes && EMXOS2=yes
648
649
650
651echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
652echo "configure:653: checking for executable suffix" >&5
653if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
654 echo $ac_n "(cached) $ac_c" 1>&6
655else
656 if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
657 ac_cv_exeext=.exe
658else
659 rm -f conftest*
660 echo 'int main () { return 0; }' > conftest.$ac_ext
661 ac_cv_exeext=
662 if { (eval echo configure:663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
663 for file in conftest.*; do
664 case $file in
665 *.c | *.o | *.obj) ;;
666 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
667 esac
668 done
669 else
670 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
671 fi
672 rm -f conftest*
673 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
674fi
675fi
676
677EXEEXT=""
678test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
679echo "$ac_t""${ac_cv_exeext}" 1>&6
680ac_exeext=$EXEEXT
681
682
683
684ac_aux_dir=
685for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
686 if test -f $ac_dir/install-sh; then
687 ac_aux_dir=$ac_dir
688 ac_install_sh="$ac_aux_dir/install-sh -c"
689 break
690 elif test -f $ac_dir/install.sh; then
691 ac_aux_dir=$ac_dir
692 ac_install_sh="$ac_aux_dir/install.sh -c"
693 break
694 fi
695done
696if test -z "$ac_aux_dir"; then
697 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
698fi
699ac_config_guess=$ac_aux_dir/config.guess
700ac_config_sub=$ac_aux_dir/config.sub
701ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
702
703
704# Do some error checking and defaulting for the host and target type.
705# The inputs are:
706# configure --host=HOST --target=TARGET --build=BUILD NONOPT
707#
708# The rules are:
709# 1. You are not allowed to specify --host, --target, and nonopt at the
710# same time.
711# 2. Host defaults to nonopt.
712# 3. If nonopt is not specified, then host defaults to the current host,
713# as determined by config.guess.
714# 4. Target and build default to nonopt.
715# 5. If nonopt is not specified, then target and build default to host.
716
717# The aliases save the names the user supplied, while $host etc.
718# will get canonicalized.
719case $host---$target---$nonopt in
720NONE---*---* | *---NONE---* | *---*---NONE) ;;
721*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
722esac
723
724
725# Make sure we can run config.sub.
726if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
727else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
728fi
729
730echo $ac_n "checking host system type""... $ac_c" 1>&6
731echo "configure:732: checking host system type" >&5
732
733host_alias=$host
734case "$host_alias" in
735NONE)
736 case $nonopt in
737 NONE)
738 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
739 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
740 fi ;;
741 *) host_alias=$nonopt ;;
742 esac ;;
743esac
744
745host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
746host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
747host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
748host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
749echo "$ac_t""$host" 1>&6
750
751echo $ac_n "checking target system type""... $ac_c" 1>&6
752echo "configure:753: checking target system type" >&5
753
754target_alias=$target
755case "$target_alias" in
756NONE)
757 case $nonopt in
758 NONE) target_alias=$host_alias ;;
759 *) target_alias=$nonopt ;;
760 esac ;;
761esac
762
763target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
764target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
765target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
766target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
767echo "$ac_t""$target" 1>&6
768
769echo $ac_n "checking build system type""... $ac_c" 1>&6
770echo "configure:771: checking build system type" >&5
771
772build_alias=$build
773case "$build_alias" in
774NONE)
775 case $nonopt in
776 NONE) build_alias=$host_alias ;;
777 *) build_alias=$nonopt ;;
778 esac ;;
779esac
780
781build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
782build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
783build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
784build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
785echo "$ac_t""$build" 1>&6
786
787test "$host_alias" != "$target_alias" &&
788 test "$program_prefix$program_suffix$program_transform_name" = \
789 NONENONEs,x,x, &&
790 program_prefix=${target_alias}-
791
792if test "$program_transform_name" = s,x,x,; then
793 program_transform_name=
794else
795 # Double any \ or $. echo might interpret backslashes.
796 cat <<\EOF_SED > conftestsed
797s,\\,\\\\,g; s,\$,$$,g
798EOF_SED
799 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
800 rm -f conftestsed
801fi
802test "$program_prefix" != NONE &&
803 program_transform_name="s,^,${program_prefix},; $program_transform_name"
804# Use a double $ so make ignores it.
805test "$program_suffix" != NONE &&
806 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
807
808# sed with no file args requires a program.
809test "$program_transform_name" = "" && program_transform_name="s,x,x,"
810
811
812# Autoconf M4 include file defining utility macros for complex Canadian
813# cross builds.
814
815####
816# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM
817# or AC_INIT.
818# These demand that AC_CANONICAL_SYSTEM be called beforehand.
819
820####
821# NCN_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
822# Like AC_CHECK_TOOL, but tries a prefix of the target, not the host.
823# Code is pretty much lifted from autoconf2.53.
824
825
826
827####
828# NCN_STRICT_CHECK_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
829# Like AC_CHECK_TOOL, but requires the prefix if build!=host.
830
831
832
833####
834# NCN_STRICT_CHECK_TARGET_TOOL(variable, prog-to-check-for,[value-if-not-found],[path])
835# Like NCN_CHECK_TARGET_TOOL, but requires the prefix if build!=target.
836
837
838
839### we might need to use some other shell than /bin/sh for running subshells
840### If we are on Windows, search for the shell. This will permit people
841### to not have /bin/sh, but to be able to see /SOME/PATH/sh configure
842### without also having to set CONFIG_SHELL. This code will work when
843### using bash, which sets OSTYPE.
844case "${OSTYPE}" in
845*win32*)
846 if test x${CONFIG_SHELL} = x ; then
847 if test ! -f /bin/sh ; then
848 if test x${SHELL} != x && test -f ${SHELL} ; then
849 CONFIG_SHELL=${SHELL}
850 export CONFIG_SHELL
851 else
852 for prog in sh sh.exe bash bash.exe; do
853 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${PATH_IFS}"
854 for dir in $PATH; do
855 test -z "$dir" && dir=.
856 if test -f $dir/$prog; then
857 CONFIG_SHELL=$dir/$prog
858 export CONFIG_SHELL
859 break
860 fi
861 done
862 IFS="$save_ifs"
863 test -n "${CONFIG_SHELL}" && break
864 done
865 fi
866 fi
867 fi
868 ;;
869esac
870
871config_shell=${CONFIG_SHELL-/bin/sh}
872
873progname=$0
874# if PWD already has a value, it is probably wrong.
875if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
876
877# Export original configure arguments for use by sub-configures.
878TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@"
879
880
881moveifchange=${srcdir}/move-if-change
882
883# Set srcdir to "." if that's what it is.
884# This is important for multilib support.
885pwd=`${PWDCMD-pwd}`
886srcpwd=`cd ${srcdir} ; ${PWDCMD-pwd}`
887if test "${pwd}" = "${srcpwd}" ; then
888 srcdir=.
889fi
890
891topsrcdir=$srcpwd
892
893extra_host_args=
894# Define the trigger file to make sure configure will re-run whenever
895# the gcc version number changes.
896if test "${with_gcc_version_trigger+set}" = set ; then
897 gcc_version_trigger="$with_gcc_version_trigger"
898 gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
899else
900 # If gcc's sources are available, define the trigger file.
901 if test -f ${topsrcdir}/gcc/version.c ; then
902 gcc_version_trigger=${topsrcdir}/gcc/version.c
903 gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
904 case "$ac_configure_args" in
905 *--with-gcc-version-trigger=$gcc_version_trigger* )
906 ;;
907 * )
908 # Add to all subconfigure arguments: build, host, and target.
909 ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
910 ;;
911 esac
912 fi
913fi
914
915### To add a new directory to the tree, first choose whether it is a target
916### or a host dependent tool. Then put it into the appropriate list
917### (library or tools, host or target), doing a dependency sort.
918
919# Subdirs will be configured in the order listed in build_configdirs,
920# configdirs, or target_configdirs; see the serialization section below.
921
922# Dependency sorting is only needed when *configuration* must be done in
923# a particular order. In all cases a dependency should be specified in
924# the Makefile, whether or not it's implicitly specified here.
925
926# Double entries in build_configdirs, configdirs, or target_configdirs may
927# cause circular dependencies and break everything horribly.
928
929# these libraries are used by various programs built for the host environment
930#
931host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl tix libgui zlib"
932
933# these tools are built for the host environment
934# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
935# know that we are building the simulator.
936# binutils, gas and ld appear in that order because it makes sense to run
937# "make check" in that particular order.
938host_tools="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"
939
940# libgcj represents the runtime libraries only used by gcj.
941libgcj="target-libffi \
942 target-boehm-gc \
943 target-zlib \
944 target-qthreads \
945 target-libjava"
946
947# these libraries are built for the target environment, and are built after
948# the host libraries and the host tools (which may be a cross compiler)
949#
950target_libs="target-libiberty \
951 target-libgloss \
952 target-newlib \
953 target-libstdc++-v3 \
954 target-libf2c \
955 ${libgcj} \
956 target-libobjc"
957
958# these tools are built using the target libs, and are intended to run only
959# in the target environment
960#
961# note: any program that *uses* libraries that are in the "target_libs"
962# list belongs in this list. those programs are also very likely
963# candidates for the "native_only" list which follows
964#
965target_tools="target-examples target-groff target-gperf target-rda"
966
967################################################################################
968
969## All tools belong in one of the four categories, and are assigned above
970## We assign ${configdirs} this way to remove all embedded newlines. This
971## is important because configure will choke if they ever get through.
972## ${configdirs} is directories we build using the host tools.
973## ${target_configdirs} is directories we build using the target tools.
974#
975configdirs=`echo ${host_libs} ${host_tools}`
976target_configdirs=`echo ${target_libs} ${target_tools}`
977
978################################################################################
979
980srcname="gnu development package"
981
982# This gets set non-empty for some net releases of packages.
983appdirs=""
984
985# Define is_cross_compiler to save on calls to 'test'.
986is_cross_compiler=
987if test x"${host}" = x"${target}" ; then
988 is_cross_compiler=no
989else
990 is_cross_compiler=yes
991fi
992
993# We always want to use the same name for this directory, so that dejagnu
994# can reliably find it.
995target_subdir=${target_alias}
996
997if test ! -d ${target_subdir} ; then
998 if mkdir ${target_subdir} ; then true
999 else
1000 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${target_subdir}" 1>&2
1001 exit 1
1002 fi
1003fi
1004
1005build_prefix=build-
1006build_subdir=${build_prefix}${build_alias}
1007
1008if test x"${build_alias}" != x"${host}" ; then
1009 if test ! -d ${build_subdir} ; then
1010 if mkdir ${build_subdir} ; then true
1011 else
1012 echo "'*** could not make ${PWD=`${PWDCMD-pwd}`}/${build_subdir}" 1>&2
1013 exit 1
1014 fi
1015 fi
1016fi
1017
1018# Skipdirs are removed silently.
1019skipdirs=
1020# Noconfigdirs are removed loudly.
1021noconfigdirs=""
1022
1023use_gnu_ld=
1024# Make sure we don't let GNU ld be added if we didn't want it.
1025if test x$with_gnu_ld = xno ; then
1026 use_gnu_ld=no
1027 noconfigdirs="$noconfigdirs ld"
1028fi
1029
1030use_gnu_as=
1031# Make sure we don't let GNU as be added if we didn't want it.
1032if test x$with_gnu_as = xno ; then
1033 use_gnu_as=no
1034 noconfigdirs="$noconfigdirs gas"
1035fi
1036
1037# some tools are so dependent upon X11 that if we're not building with X,
1038# it's not even worth trying to configure, much less build, that tool.
1039
1040case ${with_x} in
1041 yes | "") ;; # the default value for this tree is that X11 is available
1042 no)
1043 skipdirs="${skipdirs} tk tix itcl libgui"
1044 # We won't be able to build gdbtk without X.
1045 enable_gdbtk=no
1046 ;;
1047 *) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
1048esac
1049
1050# Some tools are only suitable for building in a "native" situation.
1051# Remove these if host!=target.
1052native_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"
1053
1054# Similarly, some are only suitable for cross toolchains.
1055# Remove these if host=target.
1056cross_only="target-libgloss target-newlib target-opcodes"
1057
1058case $is_cross_compiler in
1059 no) skipdirs="${skipdirs} ${cross_only}" ;;
1060 yes) skipdirs="${skipdirs} ${native_only}" ;;
1061esac
1062
1063# If both --with-headers and --with-libs are specified, default to
1064# --without-newlib.
1065if test x"${with_headers}" != x && test x"${with_libs}" != x ; then
1066 if test x"${with_newlib}" = x ; then
1067 with_newlib=no
1068 fi
1069fi
1070
1071# Recognize --with-newlib/--without-newlib.
1072case ${with_newlib} in
1073 no) skipdirs="${skipdirs} target-newlib" ;;
1074 yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
1075esac
1076
1077# Configure extra directories which are host specific
1078
1079case "${host}" in
1080 *-cygwin*)
1081 configdirs="$configdirs libtermcap" ;;
1082esac
1083
1084# Remove more programs from consideration, based on the host or
1085# target this usually means that a port of the program doesn't
1086# exist yet.
1087
1088case "${host}" in
1089 hppa*64*-*-*)
1090 noconfigdirs="$noconfigdirs byacc"
1091 ;;
1092 i[3456]86-*-vsta)
1093 noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl itcl tix gnuserv gettext"
1094 ;;
1095 i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
1096 noconfigdirs="tcl tk expect dejagnu send-pr uudecode guile itcl tix gnuserv libffi"
1097 ;;
1098 i[3456]86-*-mingw32*)
1099 # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl tix gnuserv"
1100 noconfigdirs="expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
1101 ;;
1102 i[3456]86-*-beos*)
1103 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
1104 ;;
1105 *-*-cygwin*)
1106 noconfigdirs="autoconf automake send-pr rcs guile perl"
1107 ;;
1108 *-*-netbsd*)
1109 noconfigdirs="rcs"
1110 ;;
1111 ppc*-*-pe)
1112 noconfigdirs="patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl tix gnuserv"
1113 ;;
1114 powerpc-*-beos*)
1115 noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline"
1116 ;;
1117 *-*-darwin*)
1118 noconfigdirs="$noconfigdirs tk itcl tix libgui"
1119 ;;
1120esac
1121
1122# Save it here so that, even in case of --enable-libgcj, if the Java
1123# front-end isn't enabled, we still get libgcj disabled.
1124libgcj_saved=$libgcj
1125case $enable_libgcj in
1126yes)
1127 # If we reset it here, it won't get added to noconfigdirs in the
1128 # target-specific build rules, so it will be forcibly enabled
1129 # (unless the Java language itself isn't enabled).
1130 libgcj=
1131 ;;
1132no)
1133 # Make sure we get it printed in the list of not supported target libs.
1134 noconfigdirs="$noconfigdirs ${libgcj}"
1135 ;;
1136esac
1137
1138case "${target}" in
1139 *-*-chorusos)
1140 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1141 ;;
1142 *-*-darwin*)
1143 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
1144 noconfigdirs="$noconfigdirs target-libobjc ${libgcj}"
1145 ;;
1146 *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
1147 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1148 ;;
1149 *-*-kaos*)
1150 # Remove unsupported stuff on all kaOS configurations.
1151 skipdirs="target-libiberty ${libgcj} target-libstdc++-v3 target-libf2c target-librx"
1152 skipdirs="$skipdirs target-libobjc target-examples target-groff target-gperf"
1153 skipdirs="$skipdirs zlib fastjar target-libjava target-boehm-gc target-zlib"
1154 noconfigdirs="$noconfigdirs target-libgloss"
1155 ;;
1156 *-*-netbsd*)
1157 # Skip some stuff on all NetBSD configurations.
1158 noconfigdirs="$noconfigdirs target-newlib target-libiberty target-libgloss"
1159
1160 # Skip some stuff that's unsupported on some NetBSD configurations.
1161 case "${target}" in
1162 i*86-*-netbsdelf*) ;;
1163 arm*-*-netbsdelf*) ;;
1164 *)
1165 noconfigdirs="$noconfigdirs ${libgcj}"
1166 ;;
1167 esac
1168 ;;
1169 *-*-netware)
1170 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-newlib target-libiberty target-libgloss ${libgcj}"
1171 ;;
1172 *-*-rtems*)
1173 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1174 case ${target} in
1175 h8300*-*-* | h8500-*-*)
1176 noconfigdirs="$noconfigdirs target-libf2c"
1177 ;;
1178 *) ;;
1179 esac
1180 ;;
1181 *-*-vxworks*)
1182 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1183 ;;
1184 alpha*-dec-osf*)
1185 # ld works, but does not support shared libraries.
1186 # newlib is not 64 bit ready. I'm not sure about fileutils.
1187 # gas doesn't generate exception information.
1188 noconfigdirs="$noconfigdirs gas ld fileutils target-newlib target-libgloss"
1189 ;;
1190 alpha*-*-*vms*)
1191 noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss ${libgcj}"
1192 ;;
1193 alpha*-*-linux*)
1194 # newlib is not 64 bit ready
1195 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1196 ;;
1197 alpha*-*-freebsd*)
1198 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1199 ;;
1200 alpha*-*-*)
1201 # newlib is not 64 bit ready
1202 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1203 ;;
1204 sh-*-linux*)
1205 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1206 ;;
1207 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1208 noconfigdirs="$noconfigdirs ${libgcj}"
1209 noconfigdirs="$noconfigdirs target-examples"
1210 noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr"
1211 noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim"
1212 noconfigdirs="$noconfigdirs expect dejagnu"
1213 # the C++ libraries don't build on top of CE's C libraries
1214 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1215 noconfigdirs="$noconfigdirs target-newlib"
1216 case "${host}" in
1217 *-*-cygwin*) ;; # keep gdb and readline
1218 *) noconfigdirs="$noconfigdirs gdb readline"
1219 ;;
1220 esac
1221 ;;
1222 arc-*-*)
1223 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1224 ;;
1225 arm-*-coff | strongarm-*-coff | xscale-*-coff)
1226 noconfigdirs="$noconfigdirs ${libgcj}"
1227 ;;
1228 arm-*-elf* | strongarm-*-elf* | xscale-*-elf*)
1229 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
1230 ;;
1231 arm-*-pe*)
1232 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1233 ;;
1234 arm-*-oabi*)
1235 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1236 ;;
1237 thumb-*-coff)
1238 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1239 ;;
1240 thumb-*-elf)
1241 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1242 ;;
1243 thumb-*-oabi)
1244 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1245 ;;
1246 thumb-*-pe)
1247 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1248 ;;
1249 arm-*-riscix*)
1250 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1251 ;;
1252 avr-*-*)
1253 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1254 ;;
1255 c4x-*-* | tic4x-*-*)
1256 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1257 ;;
1258 c54x*-*-* | tic54x-*-*)
1259 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
1260 ;;
1261 cris-*-*)
1262 noconfigdirs="$noconfigdirs ${libgcj}"
1263 ;;
1264 d10v-*-*)
1265 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1266 ;;
1267 d30v-*-*)
1268 noconfigdirs="$noconfigdirs ${libgcj}"
1269 ;;
1270 fr30-*-elf*)
1271 noconfigdirs="$noconfigdirs ${libgcj}"
1272 ;;
1273 frv-*-*)
1274 noconfigdirs="$noconfigdirs ${libgcj}"
1275 ;;
1276 h8300*-*-*)
1277 noconfigdirs="$noconfigdirs target-libgloss"
1278 ;;
1279 h8500-*-*)
1280 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} target-libf2c"
1281 ;;
1282 hppa*64*-*-linux* | parisc*64*-*-linux*)
1283 # In this case, it's because the hppa64-linux target is for
1284 # the kernel only at this point and has no libc, and thus no
1285 # headers, crt*.o, etc., all of which are needed by these.
1286 noconfigdirs="$noconfigdirs target-zlib"
1287 ;;
1288 hppa*-*-*elf* | \
1289 parisc*-*-linux* | hppa*-*-linux* | \
1290 hppa*-*-lites* | \
1291 hppa*-*-openbsd* | \
1292 hppa*64*-*-*)
1293 noconfigdirs="$noconfigdirs ${libgcj}"
1294 # Do configure ld/binutils/gas for this case.
1295 ;;
1296 hppa*-*-*)
1297 # According to Alexandre Oliva <[email protected]>, libjava won't
1298 # build on HP-UX 10.20.
1299 noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
1300 ;;
1301 ia64*-*-elf*)
1302 # No gdb support yet.
1303 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
1304 ;;
1305 ia64*-**-hpux*)
1306 # No gdb or ld support yet.
1307 noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
1308 ;;
1309 i[3456]86-*-coff | i[3456]86-*-elf)
1310 noconfigdirs="$noconfigdirs ${libgcj}"
1311 ;;
1312 i[34567]86-*-freebsd*)
1313 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1314 ;;
1315 i[3456]86-*-linux*)
1316 # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
1317 # not build java stuff by default.
1318 case "${target}" in
1319 *-*-*libc1*)
1320 noconfigdirs="$noconfigdirs ${libgcj}";;
1321 esac
1322
1323 # This section makes it possible to build newlib natively on linux.
1324 # If we are using a cross compiler then don't configure newlib.
1325 if test x${is_cross_compiler} != xno ; then
1326 noconfigdirs="$noconfigdirs target-newlib"
1327 fi
1328 noconfigdirs="$noconfigdirs target-libgloss"
1329 # If we are not using a cross compiler, do configure newlib.
1330 # Note however, that newlib will only be configured in this situation
1331 # if the --with-newlib option has been given, because otherwise
1332 # 'target-newlib' will appear in skipdirs.
1333 ;;
1334 i[3456]86-*-mingw32*)
1335 target_configdirs="$target_configdirs target-mingw"
1336 noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
1337
1338 # Can't build gdb for mingw32 if not native.
1339 case "${host}" in
1340 i[3456]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
1341 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix gnuserv"
1342 ;;
1343 esac
1344 ;;
1345 *-*-cygwin*)
1346 target_configdirs="$target_configdirs target-libtermcap target-winsup"
1347 noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
1348 # always build newlib.
1349 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1350
1351 # Can't build gdb for Cygwin if not native.
1352 case "${host}" in
1353 *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
1354 *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix libgui gnuserv"
1355 ;;
1356 esac
1357 ;;
1358 i[3456]86-*-pe)
1359 noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj}"
1360 ;;
1361 i[3456]86-*-sco3.2v5*)
1362 # The linker does not yet know about weak symbols in COFF,
1363 # and is not configured to handle mixed ELF and COFF.
1364 noconfigdirs="$noconfigdirs ld target-libgloss ${libgcj}"
1365 ;;
1366 i[3456]86-*-sco*)
1367 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1368 ;;
1369 i[3456]86-*-solaris2*)
1370 noconfigdirs="$noconfigdirs target-libgloss"
1371 ;;
1372 i[3456]86-*-sysv4*)
1373 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1374 ;;
1375 i[3456]86-*-beos*)
1376 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1377 ;;
1378 m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
1379 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1380 ;;
1381 m68k-*-elf*)
1382 noconfigdirs="$noconfigdirs ${libgcj}"
1383 ;;
1384 m68k-*-coff*)
1385 noconfigdirs="$noconfigdirs ${libgcj}"
1386 ;;
1387 mcore-*-pe*)
1388 # The EPOC C++ environment does not support exceptions or rtti,
1389 # and so building libstdc++-v3 tends not to always work.
1390 noconfigdirs="$noconfigdirs target-libstdc++-v3"
1391 ;;
1392 mmix-*-*)
1393 noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss"
1394 ;;
1395 mn10200-*-*)
1396 noconfigdirs="$noconfigdirs ${libgcj}"
1397 ;;
1398 mn10300-*-*)
1399 noconfigdirs="$noconfigdirs ${libgcj}"
1400 ;;
1401 powerpc-*-aix*)
1402 # copied from rs6000-*-* entry
1403 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1404 ;;
1405 powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
1406 target_configdirs="$target_configdirs target-winsup"
1407 noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix gnuserv ${libgcj}"
1408 # always build newlib.
1409 skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
1410 ;;
1411 # This is temporary until we can link against shared libraries
1412 powerpcle-*-solaris*)
1413 noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix gnuserv ${libgcj}"
1414 ;;
1415 powerpc-*-beos*)
1416 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
1417 ;;
1418 powerpc-*-eabi)
1419 noconfigdirs="$noconfigdirs ${libgcj}"
1420 ;;
1421 rs6000-*-lynxos*)
1422 noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
1423 ;;
1424 rs6000-*-aix*)
1425 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1426 ;;
1427 rs6000-*-*)
1428 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1429 ;;
1430 m68k-apollo-*)
1431 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
1432 ;;
1433 mips*-*-irix5*)
1434 # The GNU linker does not support shared libraries.
1435 noconfigdirs="$noconfigdirs ld gprof target-libgloss ${libgcj}"
1436 ;;
1437 mips*-*-irix6*)
1438 # Linking libjava exceeds command-line length limits on at least
1439 # IRIX 6.2, but not on IRIX 6.5.
1440 # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
1441 # <[email protected]>
1442 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1443 ;;
1444 mips*-dec-bsd*)
1445 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1446 ;;
1447 mips*-*-bsd*)
1448 noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
1449 ;;
1450 mipstx39-*-*)
1451 noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
1452 ;;
1453 mips*-*-linux*)
1454 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1455 ;;
1456 mips*-*-*)
1457 noconfigdirs="$noconfigdirs gprof ${libgcj}"
1458 ;;
1459 romp-*-*)
1460 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1461 ;;
1462 sh-*-*)
1463 case "${host}" in
1464 i[3456]86-*-vsta) ;; # don't add gprof back in
1465 i[3456]86-*-go32*) ;; # don't add gprof back in
1466 i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
1467 *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
1468 esac
1469 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1470 ;;
1471 sh64-*-*)
1472 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1473 ;;
1474 sparc-*-elf*)
1475 noconfigdirs="$noconfigdirs ${libgcj}"
1476 ;;
1477 sparc64-*-elf*)
1478 noconfigdirs="$noconfigdirs ${libgcj}"
1479 ;;
1480 sparclite-*-*)
1481 noconfigdirs="$noconfigdirs ${libgcj}"
1482 ;;
1483 sparc-*-sunos4*)
1484 noconfigdirs="$noconfigdirs ${libgcj}"
1485 if test x${is_cross_compiler} != xno ; then
1486 noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
1487 else
1488 use_gnu_ld=no
1489 fi
1490 ;;
1491 sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
1492 ;;
1493 v810-*-*)
1494 noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
1495 ;;
1496 v850-*-*)
1497 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1498 ;;
1499 v850e-*-*)
1500 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1501 ;;
1502 v850ea-*-*)
1503 noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
1504 ;;
1505 vax-*-vms)
1506 noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss ${libgcj}"
1507 ;;
1508 vax-*-*)
1509 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1510 ;;
1511 ip2k-*-*)
1512 noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
1513 ;;
1514 *-*-linux*)
1515 noconfigdirs="$noconfigdirs target-newlib target-libgloss"
1516 ;;
1517 *-*-lynxos*)
1518 noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
1519 ;;
1520 *-*-*)
1521 noconfigdirs="$noconfigdirs ${libgcj}"
1522 ;;
1523esac
1524
1525# If we aren't building newlib, then don't build libgloss, since libgloss
1526# depends upon some newlib header files.
1527case "${noconfigdirs}" in
1528 *target-libgloss*) ;;
1529 *target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
1530esac
1531
1532# Figure out what language subdirectories are present.
1533# Look if the user specified --enable-languages="..."; if not, use
1534# the environment variable $LANGUAGES if defined. $LANGUAGES might
1535# go away some day.
1536# NB: embedded tabs in this IF block -- do not untabify
1537if test x"${enable_languages+set}" != xset; then
1538 if test x"${LANGUAGES+set}" = xset; then
1539 enable_languages="${LANGUAGES}"
1540 echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
1541 else
1542 enable_languages=all
1543 fi
1544else
1545 if test x"${enable_languages}" = x ||
1546 test x"${enable_languages}" = xyes;
1547 then
1548 echo configure.in: --enable-languages needs at least one language argument 1>&2
1549 exit 1
1550 fi
1551fi
1552enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
1553
1554# First scan to see if an enabled language requires some other language.
1555# We assume that a given config-lang.in will list all the language
1556# front ends it requires, even if some are required indirectly.
1557for lang in ${srcdir}/gcc/*/config-lang.in ..
1558do
1559 case $lang in
1560 ..) ;;
1561 # The odd quoting in the next line works around
1562 # an apparent bug in bash 1.12 on linux.
1563 ${srcdir}/gcc/[*]/config-lang.in) ;;
1564 *)
1565 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
1566 this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
1567 for other in $this_lang_requires
1568 do
1569 case ,${enable_languages}, in
1570 *,$other,*) ;;
1571 *,all,*) ;;
1572 *,$lang_alias,*)
1573 echo " \`$other' language required by \`$lang_alias'; enabling" 1>&2
1574 enable_languages="$enable_languages,$other"
1575 ;;
1576 esac
1577 done
1578 ;;
1579 esac
1580done
1581
1582subdirs=
1583for lang in ${srcdir}/gcc/*/config-lang.in ..
1584do
1585 case $lang in
1586 ..) ;;
1587 # The odd quoting in the next line works around
1588 # an apparent bug in bash 1.12 on linux.
1589 ${srcdir}/gcc/[*]/config-lang.in) ;;
1590 *)
1591 lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
1592 this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
1593 this_lang_dirs=`sed -n -e 's,^lang_dirs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_dirs=\([^ ]*\).*$,\1,p' $lang`
1594 build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
1595 if test "x$lang_alias" = x
1596 then
1597 echo "$lang doesn't set \$language." 1>&2
1598 exit 1
1599 fi
1600 case ${build_by_default},${enable_languages}, in
1601 *,$lang_alias,*) add_this_lang=yes ;;
1602 no,*) add_this_lang=no ;;
1603 *,all,*) add_this_lang=yes ;;
1604 *) add_this_lang=no ;;
1605 esac
1606 if test x"${add_this_lang}" = xyes; then
1607 eval target_libs='"$target_libs "'\"$this_lang_libs\"
1608 else
1609 eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs $this_lang_dirs\"
1610 fi
1611 ;;
1612 esac
1613done
1614
1615# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
1616# $target_configdirs.
1617# If we have the source for $noconfigdirs entries, add them to $notsupp.
1618
1619notsupp=""
1620for dir in . $skipdirs $noconfigdirs ; do
1621 dirname=`echo $dir | sed -e s/target-//g`
1622 if test $dir != . && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1623 configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
1624 if test -r $srcdir/$dirname/configure ; then
1625 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1626 true
1627 else
1628 notsupp="$notsupp $dir"
1629 fi
1630 fi
1631 fi
1632 if test $dir != . && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1633 target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
1634 if test -r $srcdir/$dirname/configure ; then
1635 if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1636 true
1637 else
1638 notsupp="$notsupp $dir"
1639 fi
1640 fi
1641 fi
1642done
1643
1644# Sometimes the tools are distributed with libiberty but with no other
1645# libraries. In that case, we don't want to build target-libiberty.
1646if test -n "${target_configdirs}" ; then
1647 others=
1648 for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
1649 if test "$i" != "libiberty" ; then
1650 if test -r $srcdir/$i/configure ; then
1651 others=yes;
1652 break;
1653 fi
1654 fi
1655 done
1656 if test -z "${others}" ; then
1657 target_configdirs=
1658 fi
1659fi
1660
1661# Quietly strip out all directories which aren't configurable in this tree.
1662# This relies on all configurable subdirectories being autoconfiscated, which
1663# is now the case.
1664configdirs_all="$configdirs"
1665configdirs=
1666for i in ${configdirs_all} ; do
1667 if test -f ${srcdir}/$i/configure ; then
1668 configdirs="${configdirs} $i"
1669 fi
1670done
1671target_configdirs_all="$target_configdirs"
1672target_configdirs=
1673for i in ${target_configdirs_all} ; do
1674 j=`echo $i | sed -e s/target-//g`
1675 if test -f ${srcdir}/$j/configure ; then
1676 target_configdirs="${target_configdirs} $i"
1677 fi
1678done
1679
1680# Produce a warning message for the subdirs we can't configure.
1681# This isn't especially interesting in the Cygnus tree, but in the individual
1682# FSF releases, it's important to let people know when their machine isn't
1683# supported by the one or two programs in a package.
1684
1685if test -n "${notsupp}" && test -z "${norecursion}" ; then
1686 # If $appdirs is non-empty, at least one of those directories must still
1687 # be configured, or we error out. (E.g., if the gas release supports a
1688 # specified target in some subdirs but not the gas subdir, we shouldn't
1689 # pretend that all is well.)
1690 if test -n "$appdirs" ; then
1691 for dir in $appdirs ; do
1692 if test -r $dir/Makefile.in ; then
1693 if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1694 appdirs=""
1695 break
1696 fi
1697 if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
1698 appdirs=""
1699 break
1700 fi
1701 fi
1702 done
1703 if test -n "$appdirs" ; then
1704 echo "*** This configuration is not supported by this package." 1>&2
1705 exit 1
1706 fi
1707 fi
1708 # Okay, some application will build, or we don't care to check. Still
1709 # notify of subdirs not getting built.
1710 echo "*** This configuration is not supported in the following subdirectories:" 1>&2
1711 echo " ${notsupp}" 1>&2
1712 echo " (Any other directories should still work fine.)" 1>&2
1713fi
1714
1715case "$host" in
1716 *msdosdjgpp*)
1717 enable_gdbtk=no ;;
1718esac
1719
1720copy_dirs=
1721
1722# Handle --with-headers=XXX. If the value is not "yes", the contents of
1723# the named directory are copied to $(tooldir)/sys-include.
1724if test x"${with_headers}" != x ; then
1725 if test x${is_cross_compiler} = xno ; then
1726 echo 1>&2 '***' --with-headers is only supported when cross compiling
1727 exit 1
1728 fi
1729 if test x"${with_headers}" != xyes ; then
1730 case "${exec_prefixoption}" in
1731 "") x=${prefix} ;;
1732 *) x=${exec_prefix} ;;
1733 esac
1734 copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
1735 fi
1736fi
1737
1738# Handle --with-libs=XXX. If the value is not "yes", the contents of
1739# the name directories are copied to $(tooldir)/lib. Multiple directories
1740# are permitted.
1741if test x"${with_libs}" != x ; then
1742 if test x${is_cross_compiler} = xno ; then
1743 echo 1>&2 '***' --with-libs is only supported when cross compiling
1744 exit 1
1745 fi
1746 if test x"${with_libs}" != xyes ; then
1747 # Copy the libraries in reverse order, so that files in the first named
1748 # library override files in subsequent libraries.
1749 case "${exec_prefixoption}" in
1750 "") x=${prefix} ;;
1751 *) x=${exec_prefix} ;;
1752 esac
1753 for l in ${with_libs}; do
1754 copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
1755 done
1756 fi
1757fi
1758
1759# Handle ${copy_dirs}
1760set fnord ${copy_dirs}
1761shift
1762while test $# != 0 ; do
1763 if test -f $2/COPIED && test x"`cat $2/COPIED`" = x"$1" ; then
1764 :
1765 else
1766 echo Copying $1 to $2
1767
1768 # Use the install script to create the directory and all required
1769 # parent directories.
1770 if test -d $2 ; then
1771 :
1772 else
1773 echo >config.temp
1774 ${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
1775 fi
1776
1777 # Copy the directory, assuming we have tar.
1778 # FIXME: Should we use B in the second tar? Not all systems support it.
1779 (cd $1; tar -cf - .) | (cd $2; tar -xpf -)
1780
1781 # It is the responsibility of the user to correctly adjust all
1782 # symlinks. If somebody can figure out how to handle them correctly
1783 # here, feel free to add the code.
1784
1785 echo $1 > $2/COPIED
1786 fi
1787 shift; shift
1788done
1789
1790# Work in distributions that contain no compiler tools, like Autoconf.
1791tentative_cc=""
1792host_makefile_frag=/dev/null
1793if test -d ${srcdir}/config ; then
1794case "${host}" in
1795 m68k-hp-hpux*)
1796 # Avoid "too much defining" errors from HPUX compiler.
1797 tentative_cc="cc -Wp,-H256000"
1798 # If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
1799 # If it's HP/UX ar, this should be harmless.
1800 RANLIB="ar ts"
1801 ;;
1802 m68k-apollo-sysv*)
1803 tentative_cc="cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG"
1804 ;;
1805 m68k-apollo-bsd*)
1806 #None of the Apollo compilers can compile gas or binutils. The preprocessor
1807 # chokes on bfd, the compiler won't let you assign integers to enums, and
1808 # other problems. Defining CC to gcc is a questionable way to say "don't use
1809 # the apollo compiler" (the preferred version of GCC could be called cc,
1810 # or whatever), but I'm not sure leaving CC as cc is any better...
1811 #CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
1812 # Used to have BISON=yacc.
1813 tentative_cc=gcc
1814 ;;
1815 m88k-dg-dgux*)
1816 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1817 ;;
1818 m88k-harris-cxux*)
1819 # Under CX/UX, we want to tell the compiler to use ANSI mode.
1820 tentative_cc="cc -Xa"
1821 host_makefile_frag="config/mh-cxux"
1822 ;;
1823 m88k-motorola-sysv*)
1824 ;;
1825 mips*-dec-ultrix*)
1826 tentative_cc="cc -Wf,-XNg1000"
1827 host_makefile_frag="config/mh-decstation"
1828 ;;
1829 mips*-nec-sysv4*)
1830 # The C compiler on NEC MIPS SVR4 needs bigger tables.
1831 tentative_cc="cc -ZXNd=5000 -ZXNg=1000"
1832 host_makefile_frag="config/mh-necv4"
1833 ;;
1834 mips*-sgi-irix4*)
1835 # Tell compiler to use K&R C. We can't compile under the SGI Ansi
1836 # environment. Also bump switch table size so that cp-parse will
1837 # compile. Bump string length limit so linker builds.
1838 tentative_cc="cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192"
1839 ;;
1840 mips*-*-sysv4*)
1841 host_makefile_frag="config/mh-sysv4"
1842 ;;
1843 mips*-*-sysv*)
1844 # This is for a MIPS running RISC/os 4.52C.
1845
1846 # This is needed for GDB, but needs to be in the top-level make because
1847 # if a library is compiled with the bsd headers and gets linked with the
1848 # sysv system libraries all hell can break loose (e.g. a jmp_buf might be
1849 # a different size).
1850 # ptrace(2) apparently has problems in the BSD environment. No workaround is
1851 # known except to select the sysv environment. Could we use /proc instead?
1852 # These "sysv environments" and "bsd environments" often end up being a pain.
1853 #
1854 # This is not part of CFLAGS because perhaps not all C compilers have this
1855 # option.
1856 tentative_cc="cc -systype sysv"
1857 ;;
1858 i370-ibm-opened*)
1859 tentative_cc="c89"
1860 ;;
1861 i[3456]86-*-sysv5*)
1862 host_makefile_frag="config/mh-sysv5"
1863 ;;
1864 i[3456]86-*-dgux*)
1865 tentative_cc="gcc -Wall -ansi -D__using_DGUX"
1866 host_makefile_frag="config/mh-dgux386"
1867 ;;
1868 i[3456]86-ncr-sysv4.3*)
1869 # The MetaWare compiler will generate a copyright message unless you
1870 # turn it off by adding the -Hnocopyr flag.
1871 tentative_cc="cc -Hnocopyr"
1872 ;;
1873 i[3456]86-ncr-sysv4*)
1874 # for an NCR 3000 (i486/SVR4) system.
1875 # The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
1876 # This compiler not only emits obnoxious copyright messages every time
1877 # you run it, but it chokes and dies on a whole bunch of GNU source
1878 # files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
1879 tentative_cc="/usr/ccs/ATT/cc"
1880 host_makefile_frag="config/mh-ncr3000"
1881 ;;
1882 i[3456]86-*-sco3.2v5*)
1883 ;;
1884 i[3456]86-*-sco*)
1885 # The native C compiler botches some simple uses of const. Unfortunately,
1886 # it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
1887 tentative_cc="cc -Dconst="
1888 host_makefile_frag="config/mh-sco"
1889 ;;
1890 i[3456]86-*-udk*)
1891 host_makefile_frag="config/mh-sysv5"
1892 ;;
1893 i[3456]86-*-solaris2*)
1894 host_makefile_frag="config/mh-sysv4"
1895 ;;
1896 i[3456]86-*-msdosdjgpp*)
1897 host_makefile_frag="config/mh-djgpp"
1898 ;;
1899 i345686-*-os2*)
1900 host_makefile_frag="config/mh-emx"
1901 ;;
1902 *-cygwin*)
1903 host_makefile_frag="config/mh-cygwin"
1904 ;;
1905 *-mingw32*)
1906 host_makefile_frag="config/mh-mingw32"
1907 ;;
1908 *-interix*)
1909 host_makefile_frag="config/mh-interix"
1910 ;;
1911 vax-*-ultrix2*)
1912 # The old BSD pcc isn't up to compiling parts of gdb so use gcc
1913 tentative_cc=gcc
1914 ;;
1915 *-*-solaris2*)
1916 host_makefile_frag="config/mh-solaris"
1917 ;;
1918 m68k-sun-sunos*)
1919 # Sun's C compiler needs the -J flag to be able to compile cp-parse.c
1920 # without overflowing the jump tables (-J says to use a 32 bit table)
1921 tentative_cc="cc -J"
1922 ;;
1923 *-hp-hpux*)
1924 tentative_cc="cc -Wp,-H256000"
1925 ;;
1926 *-*-hiux*)
1927 tentative_cc="cc -Wp,-H256000"
1928 ;;
1929 rs6000-*-lynxos*)
1930 # /bin/cc is less than useful for our purposes. Always use GCC
1931 tentative_cc="/usr/cygnus/progressive/bin/gcc"
1932 host_makefile_frag="config/mh-lynxrs6k"
1933 ;;
1934 *-*-lynxos*)
1935 # /bin/cc is less than useful for our purposes. Always use GCC
1936 tentative_cc="/bin/gcc"
1937 ;;
1938 *-*-sysv4*)
1939 host_makefile_frag="config/mh-sysv4"
1940 ;;
1941esac
1942fi
1943
1944extra_arflags_for_target=
1945extra_nmflags_for_target=
1946extra_ranlibflags_for_target=
1947target_makefile_frag=/dev/null
1948case "${target}" in
1949 i[3456]86-*-netware*)
1950 target_makefile_frag="config/mt-netware"
1951 ;;
1952 powerpc-*-netware*)
1953 target_makefile_frag="config/mt-netware"
1954 ;;
1955 *-*-linux*)
1956 target_makefile_frag="config/mt-linux"
1957 ;;
1958 *-*-aix4.[3456789]* | *-*-aix[56789].*)
1959 # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
1960 # commands to handle both 32-bit and 64-bit objects. These flags are
1961 # harmless if we're using GNU nm or ar.
1962 extra_arflags_for_target=" -X32_64"
1963 extra_nmflags_for_target=" -B -X32_64"
1964 ;;
1965 *-*-darwin*)
1966 # ranlib from Darwin requires the -c flag to look at common symbols.
1967 extra_ranlibflags_for_target=" -c"
1968 ;;
1969 mips*-*-pe | sh*-*-pe | *arm-wince-pe)
1970 target_makefile_frag="config/mt-wince"
1971 ;;
1972esac
1973
1974alphaieee_frag=/dev/null
1975case $target in
1976 alpha*-*-*)
1977 # This just makes sure to use the -mieee option to build target libs.
1978 # This should probably be set individually by each library.
1979 alphaieee_frag="config/mt-alphaieee"
1980 ;;
1981esac
1982
1983# If --enable-target-optspace always use -Os instead of -O2 to build
1984# the target libraries, similarly if it is not specified, use -Os
1985# on selected platforms.
1986ospace_frag=/dev/null
1987case "${enable_target_optspace}:${target}" in
1988 yes:*)
1989 ospace_frag="config/mt-ospace"
1990 ;;
1991 :d30v-*)
1992 ospace_frag="config/mt-d30v"
1993 ;;
1994 :m32r-* | :d10v-* | :fr30-*)
1995 ospace_frag="config/mt-ospace"
1996 ;;
1997 no:* | :*)
1998 ;;
1999 *)
2000 echo "*** bad value \"${enable_target_optspace}\" for --enable-target-optspace flag; ignored" 1>&2
2001 ;;
2002esac
2003
2004# Set with_gnu_as and with_gnu_ld as appropriate.
2005#
2006# This is done by determining whether or not the appropriate directory
2007# is available, and by checking whether or not specific configurations
2008# have requested that this magic not happen.
2009#
2010# The command line options always override the explicit settings in
2011# configure.in, and the settings in configure.in override this magic.
2012#
2013# If the default for a toolchain is to use GNU as and ld, and you don't
2014# want to do that, then you should use the --without-gnu-as and
2015# --without-gnu-ld options for the configure script.
2016
2017if test x${use_gnu_as} = x &&
2018 echo " ${configdirs} " | grep " gas " > /dev/null 2>&1 ; then
2019 with_gnu_as=yes
2020 extra_host_args="$extra_host_args --with-gnu-as"
2021fi
2022
2023if test x${use_gnu_ld} = x &&
2024 echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
2025 with_gnu_ld=yes
2026 extra_host_args="$extra_host_args --with-gnu-ld"
2027fi
2028
2029# If using newlib, add --with-newlib to the extra_host_args so that gcc/configure
2030# can detect this case.
2031
2032if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 ; then
2033 with_newlib=yes
2034 extra_host_args="$extra_host_args --with-newlib"
2035fi
2036
2037
2038# Default to using --with-stabs for certain targets.
2039if test x${with_stabs} = x ; then
2040 case "${target}" in
2041 mips*-*-irix6*o32)
2042 with_stabs=yes;
2043 extra_host_args="${extra_host_args} --with-stabs"
2044 ;;
2045 mips*-*-irix6*)
2046 ;;
2047 mips*-*-* | alpha*-*-osf*)
2048 with_stabs=yes;
2049 extra_host_args="${extra_host_args} --with-stabs"
2050 ;;
2051 esac
2052fi
2053
2054# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
2055# them automatically.
2056case "${host}" in
2057 hppa*64*-*-hpux11*)
2058 extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
2059 ;;
2060esac
2061
2062# If we aren't going to be using gcc, see if we can extract a definition
2063# of CC from the fragment.
2064# Actually, use the 'pre-extracted' version above.
2065if test -z "${CC}" && test "${build}" = "${host}" ; then
2066 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${PATH_IFS}"
2067 found=
2068 for dir in $PATH; do
2069 test -z "$dir" && dir=.
2070 if test -f $dir/gcc${ac_cv_exeext}; then
2071 found=yes
2072 break
2073 fi
2074 done
2075 IFS="$save_ifs"
2076 if test -z "${found}" && test -n "${tentative_cc}" ; then
2077 CC=$tentative_cc
2078 fi
2079fi
2080
2081# Some systems (e.g., one of the i386-aix systems the gas testers are
2082# using) don't handle "\$" correctly, so don't use it here.
2083tooldir='$(exec_prefix)'/${target_alias}
2084build_tooldir=${tooldir}
2085
2086# Generate a default definition for YACC. This is used if the makefile can't
2087# locate bison or byacc in objdir.
2088
2089for prog in "bison${ac_cv_exeext} -y" byacc${ac_cv_exeext} yacc${ac_cv_exeext}
2090do
2091 set dummy $prog; tmp=$2
2092 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${PATH_IFS}"
2093 for dir in $PATH; do
2094 test -z "$dir" && dir=.
2095 if test -f $dir/$tmp; then
2096 DEFAULT_YACC="$prog"
2097 break
2098 fi
2099 done
2100 IFS="$save_ifs"
2101
2102 test -n "$DEFAULT_YACC" && break
2103done
2104
2105# Generate a default definition for M4. This is used if the makefile can't
2106# locate m4 in objdir.
2107
2108for prog in gm4${ac_cv_exeext} gnum4${ac_cv_exeext} m4${ac_cv_exeext}
2109do
2110 set dummy $prog; tmp=$2
2111 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${PATH_IFS}"
2112 for dir in $PATH; do
2113 test -z "$dir" && dir=.
2114 if test -f $dir/$tmp; then
2115 DEFAULT_M4="$prog"
2116 break
2117 fi
2118 done
2119 IFS="$save_ifs"
2120
2121 test -n "$DEFAULT_M4" && break
2122done
2123
2124# Generate a default definition for LEX. This is used if the makefile can't
2125# locate flex in objdir.
2126
2127for prog in flex${ac_cv_exeext} lex${ac_cv_exeext}
2128do
2129 set dummy $prog; tmp=$2
2130 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${PATH_IFS}"
2131 for dir in $PATH; do
2132 test -z "$dir" && dir=.
2133 if test -f $dir/$tmp; then
2134 DEFAULT_LEX="$prog"
2135 break
2136 fi
2137 done
2138 IFS="$save_ifs"
2139
2140 test -n "$DEFAULT_LEX" && break
2141done
2142
2143if test "${build}" != "${host}" ; then
2144 # If we are doing a Canadian Cross, in which the host and build systems
2145 # are not the same, we set reasonable default values for the tools.
2146
2147 BISON=${BISON-bison}
2148 CC=${CC-${host_alias}-gcc}
2149 CFLAGS=${CFLAGS-"-g -O2"}
2150 CXX=${CXX-${host_alias}-c++}
2151 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2152 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
2153 CC_FOR_TARGET=${CC_FOR_TARGET-${target_alias}-gcc}
2154 CXX_FOR_TARGET=${CXX_FOR_TARGET-${target_alias}-c++}
2155 GCJ_FOR_TARGET=${GCJ_FOR_TARGET-${target_alias}-gcj}
2156 GCC_FOR_TARGET=${GCC_FOR_TARGET-${CC_FOR_TARGET-${target_alias}-gcc}}
2157 BUILD_PREFIX=${build_alias}-
2158 BUILD_PREFIX_1=${build_alias}-
2159 MAKEINFO=${MAKEINFO-makeinfo}
2160
2161 if test -z "${YACC}" ; then
2162 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${PATH_IFS}"
2163 for dir in $PATH; do
2164 test -z "$dir" && dir=.
2165 if test -f $dir/bison${ac_cv_exeext}; then
2166 YACC="bison${ac_cv_exeext} -y"
2167 break
2168 fi
2169 if test -f $dir/byacc${ac_cv_exeext}; then
2170 YACC=byacc${ac_cv_exeext}
2171 break
2172 fi
2173 if test -f $dir/yacc; then
2174 YACC=yacc${ac_cv_exeext}
2175 break
2176 fi
2177 done
2178 IFS="$save_ifs"
2179 if test -z "${YACC}" ; then
2180 YACC="bison${ac_cv_exeext} -y"
2181 fi
2182 fi
2183
2184 if test -z "${LEX}" ; then
2185 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${PATH_IFS}"
2186 for dir in $PATH; do
2187 test -z "$dir" && dir=.
2188 if test -f $dir/flex${ac_cv_exeext}; then
2189 LEX=flex${ac_cv_exeext}
2190 break
2191 fi
2192 if test -f $dir/lex${ac_cv_exeext}; then
2193 LEX=lex${ac_cv_exeext}
2194 break
2195 fi
2196 done
2197 IFS="$save_ifs"
2198 LEX=${LEX-flex}
2199 fi
2200
2201else
2202 # Set reasonable default values for some tools even if not Canadian.
2203 # Of course, these are different reasonable default values, originally
2204 # specified directly in the Makefile.
2205 # We don't export, so that autoconf can do its job.
2206 # Note that all these settings are above the fragment inclusion point
2207 # in Makefile.in, so can still be overridden by fragments.
2208 # This is all going to change when we autoconfiscate...
2209
2210 BISON="\$(USUAL_BISON)"
2211 CC_FOR_BUILD="\$(CC)"
2212 GCC_FOR_TARGET="\$(USUAL_GCC_FOR_TARGET)"
2213 BUILD_PREFIX=
2214 BUILD_PREFIX_1=loser-
2215 MAKEINFO="\$(USUAL_MAKEINFO)"
2216 LEX="\$(USUAL_LEX)"
2217 YACC="\$(USUAL_YACC)"
2218
2219 # If CC is still not set, try to get gcc.
2220 cc_prog_is_gcc=
2221 if test -z "${CC}" ; then
2222 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${PATH_IFS}"
2223 for dir in $PATH; do
2224 test -z "$dir" && dir=.
2225 if test -f $dir/gcc${ac_cv_exeext}; then
2226 CC="gcc"
2227 cc_prog_is_gcc=yes
2228 echo 'void f(){}' > conftest.c
2229 if test -z "`${CC} -g -c conftest.c 2>&1`"; then
2230 CFLAGS=${CFLAGS-"-g -O2"}
2231 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2232 else
2233 CFLAGS=${CFLAGS-"-O2"}
2234 CXXFLAGS=${CXXFLAGS-"-O2"}
2235 fi
2236 rm -f conftest*
2237 break
2238 fi
2239 done
2240 IFS="$save_ifs"
2241 CC=${CC-cc}
2242 else
2243 # Determine if we are using gcc.
2244 cat > conftest.c <<EOF
2245#ifdef __GNUC__
2246 yes;
2247#endif
2248EOF
2249 if ${CC} -E conftest.c | grep yes >/dev/null 2>&1; then
2250 cc_prog_is_gcc=yes
2251 fi
2252 rm -f conftest.c
2253 if test -z "${CFLAGS}"; then
2254 # Here CC is set but CFLAGS is not. Use a quick hack to use -O2 if CC
2255 # is set to a version of gcc.
2256 if test "$cc_prog_is_gcc" = yes; then
2257 echo 'void f(){}' > conftest.c
2258 if test -z "`${CC} -g -c conftest.c 2>&1`"; then
2259 CFLAGS=${CFLAGS-"-g -O2"}
2260 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2261 else
2262 CFLAGS=${CFLAGS-"-O2"}
2263 CXXFLAGS=${CXXFLAGS-"-O2"}
2264 fi
2265 rm -f conftest*
2266 fi
2267 fi
2268 fi
2269
2270 # We must set the default linker to the linker used by gcc for the correct
2271 # operation of libtool. If LD is not defined and we are using gcc, try to
2272 # set the LD default to the ld used by gcc.
2273 if test -z "$LD"; then
2274 if test "$cc_prog_is_gcc" = yes; then
2275 case $build in
2276 *-*-mingw*)
2277 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
2278 *)
2279 gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
2280 esac
2281 case $gcc_prog_ld in
2282 # Accept absolute paths.
2283 [\\/]* | [A-Za-z]:[\\/]*)
2284 LD="$gcc_prog_ld" ;;
2285 esac
2286 fi
2287 fi
2288
2289 CXX=${CXX-"c++"}
2290 CFLAGS=${CFLAGS-"-g"}
2291 CXXFLAGS=${CXXFLAGS-"-g -O2"}
2292fi
2293
2294# FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
2295# Set up the list of links to be made.
2296# ${links} is the list of link names, and ${files} is the list of names to link to.
2297
2298# Make the links.
2299configlinks="${links}"
2300if test -r ./config.status ; then
2301 mv -f ./config.status ./config.back
2302fi
2303while test -n "${files}" ; do
2304 # set file to car of files, files to cdr of files
2305 set ${files}; file=$1; shift; files=$*
2306 set ${links}; link=$1; shift; links=$*
2307
2308 if test ! -r ${srcdir}/${file} ; then
2309 if test ! -r ${file} ; then
2310 echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
2311 echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
2312 exit 1
2313 else
2314 srcfile=${file}
2315 fi
2316 else
2317 srcfile=${srcdir}/${file}
2318 fi
2319
2320 ${remove} -f ${link}
2321 # Make a symlink if possible, otherwise try a hard link
2322 if ${symbolic_link} ${srcfile} ${link} >/dev/null 2>&1 ; then
2323 true
2324 else
2325 # We need to re-remove the file because Lynx leaves a
2326 # very strange directory there when it fails an NFS symlink.
2327 ${remove} -r -f ${link}
2328 ${hard_link} ${srcfile} ${link}
2329 fi
2330 if test ! -r ${link} ; then
2331 echo '***' "${progname}: unable to link \"${link}\" to \"${srcfile}\"." 1>&2
2332 exit 1
2333 fi
2334
2335 echo "Linked \"${link}\" to \"${srcfile}\"."
2336done
2337
2338# Create a .gdbinit file which runs the one in srcdir
2339# and tells GDB to look there for source files.
2340
2341if test -r ${srcdir}/.gdbinit ; then
2342 case ${srcdir} in
2343 .) ;;
2344 *) cat > ./.gdbinit <<EOF
2345# ${NO_EDIT}
2346dir ${srcdir}
2347dir .
2348source ${srcdir}/.gdbinit
2349EOF
2350 ;;
2351 esac
2352fi
2353
2354# Make sure that the compiler is able to generate an executable. If it
2355# can't, we are probably in trouble. We don't care whether we can run the
2356# executable--we might be using a cross compiler--we only care whether it
2357# can be created. At this point the main configure script has set CC.
2358we_are_ok=no
2359echo "int main () { return 0; }" > conftest.c
2360${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
2361if test $? = 0 ; then
2362 if test -s conftest || test -s conftest.exe ; then
2363 we_are_ok=yes
2364 fi
2365fi
2366case $we_are_ok in
2367 no)
2368 echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
2369 echo 1>&2 "*** You must set the environment variable CC to a working compiler."
2370 rm -f conftest*
2371 exit 1
2372 ;;
2373esac
2374rm -f conftest*
2375
2376# The Solaris /usr/ucb/cc compiler does not appear to work.
2377case "${host}" in
2378 sparc-sun-solaris2*)
2379 CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
2380 if test "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ; then
2381 could_use=
2382 test -d /opt/SUNWspro/bin && could_use="/opt/SUNWspro/bin"
2383 if test -d /opt/cygnus/bin ; then
2384 if test "$could_use" = "" ; then
2385 could_use="/opt/cygnus/bin"
2386 else
2387 could_use="$could_use or /opt/cygnus/bin"
2388 fi
2389 fi
2390 if test "$could_use" = "" ; then
2391 echo "Warning: compilation may fail because you're using"
2392 echo "/usr/ucb/cc. You should change your PATH or CC "
2393 echo "variable and rerun configure."
2394 else
2395 echo "Warning: compilation may fail because you're using"
2396 echo "/usr/ucb/cc, when you should use the C compiler from"
2397 echo "$could_use. You should change your"
2398 echo "PATH or CC variable and rerun configure."
2399 fi
2400 fi
2401 ;;
2402esac
2403
2404# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
2405# binutils tools will find libbfd.so.
2406case "${enable_shared}" in
2407 no | "") SET_LIB_PATH= ;;
2408 *) SET_LIB_PATH="\$(REALLY_SET_LIB_PATH)" ;;
2409esac
2410
2411case "${host}" in
2412 *-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
2413 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
2414esac
2415
2416# Record target_configdirs and the configure arguments for target and
2417# build configuration in Makefile.
2418target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
2419
2420# This is the final value for target_configdirs. configdirs already
2421# has its final value. It's time to create some lists of valid targets.
2422
2423# While at that, we remove Makefiles if we were started for recursive
2424# configuration, such that the top-level Makefile reconfigures them,
2425# like we used to do when configure itself was recursive.
2426
2427all_build_modules=
2428configure_build_modules=
2429# Only make build modules if build != host.
2430# This should be done more generally, but at the moment it doesn't matter.
2431if test ${host_alias} != ${build_alias} ; then
2432 for module in libiberty ; do
2433 all_build_modules=all-build-${module}
2434 configure_build_modules=configure-build-${module}
2435 if test -z "${no_recursion}" \
2436 && test -f ${build_subdir}/${module}/Makefile; then
2437 echo 1>&2 "*** removing ${build_subdir}/${module}/Makefile to force reconfigure"
2438 rm -f ${build_subdir}/${module}/Makefile
2439 fi
2440 done
2441fi
2442
2443all_host_modules=
2444check_host_modules=
2445install_host_modules=
2446configure_host_modules=
2447for module in ${configdirs} ; do
2448 all_host_modules="${all_host_modules} all-${module}"
2449 check_host_modules="${check_host_modules} check-${module}"
2450 install_host_modules="${install_host_modules} install-${module}"
2451 configure_host_modules="${configure_host_modules} configure-${module}"
2452 if test -z "${no_recursion}" \
2453 && test -f ${module}/Makefile; then
2454 echo 1>&2 "*** removing ${module}/Makefile to force reconfigure"
2455 rm -f ${module}/Makefile
2456 fi
2457done
2458install_host_modules_nogcc=`echo "${install_host_modules}" | sed -e 's/install-gcc//g'`
2459
2460all_target_modules=
2461check_target_modules=
2462install_target_modules=
2463configure_target_modules=
2464for module in ${target_configdirs} ; do
2465 all_target_modules="${all_target_modules} all-target-${module}"
2466 check_target_modules="${check_target_modules} check-target-${module}"
2467 install_target_modules="${install_target_modules} install-target-${module}"
2468 configure_target_modules="${configure_target_modules} configure-target-${module}"
2469 if test -z "${no_recursion}" \
2470 && test -f ${target_subdir}/${module}/Makefile; then
2471 echo 1>&2 "*** removing ${target_subdir}/${module}/Makefile to force reconfigure"
2472 rm -f ${target_subdir}/${module}/Makefile
2473 fi
2474done
2475
2476# Determine whether gdb needs tk/tcl or not.
2477# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
2478# and in that case we want gdb to be built without tk. Ugh!
2479# In fact I believe gdb is the *only* package directly dependent on tk,
2480# so we should be able to put the 'maybe's in unconditionally and
2481# leave out the maybe dependencies when enable_gdbtk is false. I'm not
2482# 100% sure that that's safe though.
2483
2484gdb_tk="maybe-all-tcl maybe-all-tk maybe-all-itcl maybe-all-tix maybe-all-libgui"
2485case "$enable_gdbtk" in
2486 no)
2487 GDB_TK="" ;;
2488 yes)
2489 GDB_TK="${gdb_tk}" ;;
2490 *)
2491 # Only add the dependency on gdbtk when GDBtk is part of the gdb
2492 # distro. Eventually someone will fix this and move Insight, nee
2493 # gdbtk to a separate directory.
2494 if test -d ${srcdir}/gdb/gdbtk ; then
2495 GDB_TK="${gdb_tk}"
2496 else
2497 GDB_TK=""
2498 fi
2499 ;;
2500esac
2501
2502# Create the 'maybe dependencies'. This uses a temporary file.
2503rm -f maybedep.tmp
2504echo '# maybedep.tmp' > maybedep.tmp
2505for item in ${all_build_modules} ${all_host_modules} ${all_target_modules} \
2506 ${install_host_modules} ${install_target_modules} \
2507 ${configure_build_modules} ${configure_host_modules} ${configure_target_modules} \
2508 ; do
2509 echo "maybe-${item}: ${item}" >> maybedep.tmp
2510done
2511maybe_dependencies=maybedep.tmp
2512
2513
2514# Create the serialization dependencies. This uses a temporary file.
2515
2516# Check whether --enable-serial-configure or --disable-serial-configure was given.
2517if test "${enable_serial_configure+set}" = set; then
2518 enableval="$enable_serial_configure"
2519 :
2520fi
2521
2522
2523# These force 'configure's to be done one at a time, to avoid problems
2524# with contention over a shared config.cache.
2525rm -f serdep.tmp
2526echo '# serdep.tmp' > serdep.tmp
2527olditem=
2528test "x${enable_serial_configure}" = xno ||
2529test "x${enable_serial_build_configure}" = xno ||
2530for item in ${build_configdirs} ; do
2531 case ${olditem} in
2532 "") ;;
2533 *) echo "configure-build-${item}: configure-build-${olditem}" >> serdep.tmp ;;
2534 esac
2535 olditem=${item}
2536done
2537olditem=
2538test "x${enable_serial_configure}" = xno ||
2539test "x${enable_serial_host_configure}" = xno ||
2540for item in ${configdirs} ; do
2541 case ${olditem} in
2542 "") ;;
2543 *) echo "configure-${item}: configure-${olditem}" >> serdep.tmp ;;
2544 esac
2545 olditem=${item}
2546done
2547olditem=
2548test "x${enable_serial_configure}" = xno ||
2549test "x${enable_serial_target_configure}" = xno ||
2550for item in ${target_configdirs} ; do
2551 case ${olditem} in
2552 "") ;;
2553 *) echo "configure-target-${item}: configure-target-${olditem}" >> serdep.tmp ;;
2554 esac
2555 olditem=${item}
2556done
2557serialization_dependencies=serdep.tmp
2558
2559
2560# Base args. Strip norecursion, cache-file, srcdir, host, build,
2561# target and nonopt. These are the ones we might not want to pass
2562# down to subconfigures.
2563baseargs=`echo " ${ac_configure_args} " | \
2564 sed -e 's/ --no[^ ]* / /' \
2565 -e 's/ --c[a-z-]*[= ][^ ]* / /' \
2566 -e 's/ --sr[a-z-]*[= ][^ ]* / /' \
2567 -e 's/ --ho[a-z-]*[= ][^ ]* / /' \
2568 -e 's/ --bu[a-z-]*[= ][^ ]* / /' \
2569 -e 's/ --t[a-z-]*[= ][^ ]* / /' \
2570 -e 's/ -cache-file[= ][^ ]* / /' \
2571 -e 's/ -srcdir[= ][^ ]* / /' \
2572 -e 's/ -host[= ][^ ]* / /' \
2573 -e 's/ -build[= ][^ ]* / /' \
2574 -e 's/ -target[= ][^ ]* / /' \
2575 -e "s/ [^' -][^ ]* / /" \
2576 -e 's/^ *//;s/ *$//'`
2577
2578# For the build-side libraries, we just need to pretend we're native,
2579# and not use the same cache file. Multilibs are neither needed nor
2580# desired.
2581build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${baseargs}"
2582
2583# For host modules, accept cache file option, or specification as blank.
2584case "${cache_file}" in
2585"") # empty
2586 cache_file_option="" ;;
2587/* | [A-Za-z]:[\\/]* ) # absolute path
2588 cache_file_option="--cache-file=${cache_file}" ;;
2589*) # relative path
2590 cache_file_option="--cache-file=../${cache_file}" ;;
2591esac
2592
2593host_configargs="${cache_file_option} --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
2594
2595target_configargs=${baseargs}
2596
2597# Passing a --with-cross-host argument lets the target libraries know
2598# whether they are being built with a cross-compiler or being built
2599# native. However, it would be better to use other mechanisms to make the
2600# sorts of decisions they want to make on this basis. Please consider
2601# this option to be deprecated. FIXME.
2602if test x${is_cross_compiler} = xyes ; then
2603 target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
2604fi
2605
2606# Default to --enable-multilib.
2607if test x${enable_multilib} = x ; then
2608 target_configargs="--enable-multilib ${target_configargs}"
2609fi
2610
2611# Pass --with-newlib if appropriate. Note that target_configdirs has
2612# changed from the earlier setting of with_newlib.
2613if test x${with_newlib} != xno && echo " ${target_configdirs} " | grep " newlib " > /dev/null 2>&1 && test -d ${srcdir}/newlib ; then
2614 target_configargs="--with-newlib ${target_configargs}"
2615fi
2616
2617# Pass the appropriate --host, --build, and --cache-file arguments.
2618target_configargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
2619
2620# provide a proper gxx_include_dir.
2621# Note, if you change the default, make sure to fix both here and in
2622# the gcc and libstdc++-v3 subdirectories.
2623# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
2624case "${with_gxx_include_dir}" in
2625 yes)
2626 { echo "configure: error: --with-gxx-include-dir=[dir] requires a directory" 1>&2; exit 1; }
2627 ;;
2628 no | "")
2629 case "${enable_version_specific_runtime_libs}" in
2630 yes) gxx_include_dir='${libsubdir}/include/c++' ;;
2631 *)
2632 . ${srcdir}/config.if
2633 gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
2634 esac ;;
2635 *) gxx_include_dir=${with_gxx_include_dir} ;;
2636esac
2637
2638FLAGS_FOR_TARGET=
2639case " $target_configdirs " in
2640 *" newlib "*)
2641 case " $target_configargs " in
2642 *" --with-newlib "*)
2643 case "$target" in
2644 *-cygwin*)
2645 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 -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;;
2646 esac
2647
2648 # If we're not building GCC, don't discard standard headers.
2649 if test -d ${srcdir}/gcc; then
2650 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc'
2651
2652 if test "${build}" != "${host}"; then
2653 # On Canadian crosses, CC_FOR_TARGET will have already been set
2654 # by `configure', so we won't have an opportunity to add -Bgcc/
2655 # to it. This is right: we don't want to search that directory
2656 # for binaries, but we want the header files in there, so add
2657 # them explicitly.
2658 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include'
2659
2660 # Someone might think of using the pre-installed headers on
2661 # Canadian crosses, in case the installed compiler is not fully
2662 # compatible with the compiler being built. In this case, it
2663 # would be better to flag an error than risking having
2664 # incompatible object files being constructed. We can't
2665 # guarantee that an error will be flagged, but let's hope the
2666 # compiler will do it, when presented with incompatible header
2667 # files.
2668 fi
2669 fi
2670
2671 case "${target}-${is_cross_compiler}" in
2672 i[3456]86-*-linux*-no)
2673 # Here host == target, so we don't need to build gcc,
2674 # so we don't want to discard standard headers.
2675 FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
2676 ;;
2677 *)
2678 # If we're building newlib, use its generic headers last, but search
2679 # for any libc-related directories first (so make it the last -B
2680 # switch).
2681 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
2682 ;;
2683 esac
2684 ;;
2685 esac
2686 ;;
2687esac
2688
2689# On Canadian crosses, we'll be searching the right directories for
2690# the previously-installed cross compiler, so don't bother to add
2691# flags for directories within the install tree of the compiler
2692# being built; programs in there won't even run.
2693if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
2694 # Search for pre-installed headers if nothing else fits.
2695 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
2696fi
2697
2698if test "x${use_gnu_ld}" = x &&
2699 echo " ${configdirs} " | grep " ld " > /dev/null ; then
2700 # Arrange for us to find uninstalled linker scripts.
2701 FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld'
2702fi
2703
2704if test "x${CC_FOR_TARGET+set}" = xset; then
2705 :
2706elif test -d ${srcdir}/gcc; then
2707 CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/'
2708elif test "$host" = "$target"; then
2709 CC_FOR_TARGET='$(CC)'
2710else
2711 CC_FOR_TARGET=`echo gcc | sed "${program_transform_name}"`
2712fi
2713CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)'
2714
2715if test "x${GCJ_FOR_TARGET+set}" = xset; then
2716 :
2717elif test -d ${srcdir}/gcc; then
2718 GCJ_FOR_TARGET='$$r/gcc/gcj -B$$r/gcc/'
2719elif test "$host" = "$target"; then
2720 GCJ_FOR_TARGET='gcj'
2721else
2722 GCJ_FOR_TARGET=`echo gcj | sed "${program_transform_name}"`
2723fi
2724GCJ_FOR_TARGET=$GCJ_FOR_TARGET' $(FLAGS_FOR_TARGET)'
2725
2726# Don't use libstdc++-v3's flags to configure/build itself.
2727libstdcxx_flags='`test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
2728raw_libstdcxx_flags=' -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
2729
2730if test "x${CXX_FOR_TARGET+set}" = xset; then
2731 :
2732elif test -d ${srcdir}/gcc; then
2733 # We add -shared-libgcc to CXX_FOR_TARGET whenever we use xgcc instead
2734 # of g++ for linking C++ or Java, because g++ has -shared-libgcc by
2735 # default whereas gcc does not.
2736 # RAW_CXX_FOR_TARGET is for linking C++ or java; CXX_FOR_TARGET is for
2737 # all other cases.
2738 CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
2739 RAW_CXX_FOR_TARGET='$$r/gcc/xgcc -shared-libgcc -B$$r/gcc/ -nostdinc++ '$raw_libstdcxx_flags
2740elif test "$host" = "$target"; then
2741 CXX_FOR_TARGET='$(CXX)'
2742 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
2743else
2744 CXX_FOR_TARGET=`echo c++ | sed "${program_transform_name}"`
2745 RAW_CXX_FOR_TARGET=${CXX_FOR_TARGET}
2746fi
2747CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
2748RAW_CXX_FOR_TARGET=$RAW_CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)'
2749
2750qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
2751qRAW_CXX_FOR_TARGET=`echo "$RAW_CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
2752
2753# We want to defer the evaluation of `cmd`s and shell variables in
2754# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
2755# bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
2756# quotes, but we still have to duplicate `$'s so that shell variables
2757# can be expanded by the nested make as shell variables, not as make
2758# macros.
2759qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
2760qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
2761
2762# Wrap CC_FOR_TARGET and friends, for certain types of builds.
2763CC_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}"
2764GCJ_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}"
2765CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}"
2766RAW_CXX_FOR_TARGET="\$(STAGE_CC_WRAPPER) ${qRAW_CXX_FOR_TARGET}"
2767CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}"
2768RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE="\$(STAGE_CC_WRAPPER) ${qqRAW_CXX_FOR_TARGET}"
2769
2770# Makefile fragments.
2771host_makefile_frag=${srcdir}/${host_makefile_frag}
2772target_makefile_frag=${srcdir}/${target_makefile_frag}
2773alphaieee_frag=${srcdir}/${alphaieee_frag}
2774ospace_frag=${srcdir}/${ospace_frag}
2775
2776
2777
2778
2779
2780# Miscellanea: directories, flags, etc.
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794# Build module lists & subconfigure args.
2795
2796
2797
2798
2799
2800# Host module lists & subconfigure args.
2801
2802
2803
2804
2805
2806
2807
2808
2809# Target module lists & subconfigure args.
2810
2811
2812
2813
2814
2815
2816
2817
2818# Build tools.
2819
2820
2821
2822
2823
2824
2825
2826# Host tools.
2827ncn_tool_prefix=
2828test -n "$host_alias" && ncn_tool_prefix=$host_alias-
2829ncn_target_tool_prefix=
2830test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
2831
2832 if test -n "$ncn_tool_prefix"; then
2833 # Extract the first word of "${ncn_tool_prefix}ar", so it can be a program name with args.
2834set dummy ${ncn_tool_prefix}ar; ac_word=$2
2835echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2836echo "configure:2837: checking for $ac_word" >&5
2837if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2838 echo $ac_n "(cached) $ac_c" 1>&6
2839else
2840 if test -n "$AR"; then
2841 ac_cv_prog_AR="$AR" # Let the user override the test.
2842else
2843 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2844 ac_dummy="$PATH"
2845 for ac_dir in $ac_dummy; do
2846 test -z "$ac_dir" && ac_dir=.
2847 if test -f $ac_dir/$ac_word -o \
2848 -f $ac_dir/$ac_word$ac_exeext ; then
2849 ac_cv_prog_AR="${ncn_tool_prefix}ar"
2850 break
2851 fi
2852 done
2853 IFS="$ac_save_ifs"
2854fi
2855fi
2856AR="$ac_cv_prog_AR"
2857if test -n "$AR"; then
2858 echo "$ac_t""$AR" 1>&6
2859else
2860 echo "$ac_t""no" 1>&6
2861fi
2862
2863fi
2864if test -z "$ac_cv_prog_AR" ; then
2865 if test $build = $host ; then
2866 ncn_cv_AR=$AR
2867 # Extract the first word of "ar", so it can be a program name with args.
2868set dummy ar; ac_word=$2
2869echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2870echo "configure:2871: checking for $ac_word" >&5
2871if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR'+set}'`\" = set"; then
2872 echo $ac_n "(cached) $ac_c" 1>&6
2873else
2874 if test -n "$ncn_cv_AR"; then
2875 ac_cv_prog_ncn_cv_AR="$ncn_cv_AR" # Let the user override the test.
2876else
2877 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2878 ac_dummy="$PATH"
2879 for ac_dir in $ac_dummy; do
2880 test -z "$ac_dir" && ac_dir=.
2881 if test -f $ac_dir/$ac_word -o \
2882 -f $ac_dir/$ac_word$ac_exeext ; then
2883 ac_cv_prog_ncn_cv_AR="ar"
2884 break
2885 fi
2886 done
2887 IFS="$ac_save_ifs"
2888 test -z "$ac_cv_prog_ncn_cv_AR" && ac_cv_prog_ncn_cv_AR="ar"
2889fi
2890fi
2891ncn_cv_AR="$ac_cv_prog_ncn_cv_AR"
2892if test -n "$ncn_cv_AR"; then
2893 echo "$ac_t""$ncn_cv_AR" 1>&6
2894else
2895 echo "$ac_t""no" 1>&6
2896fi
2897
2898 AR=$ncn_cv_AR
2899 else
2900 AR="${ncn_tool_prefix}ar"
2901 fi
2902else
2903 AR="$ac_cv_prog_AR"
2904fi
2905
2906 if test -n "$ncn_tool_prefix"; then
2907 # Extract the first word of "${ncn_tool_prefix}as", so it can be a program name with args.
2908set dummy ${ncn_tool_prefix}as; ac_word=$2
2909echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2910echo "configure:2911: checking for $ac_word" >&5
2911if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2912 echo $ac_n "(cached) $ac_c" 1>&6
2913else
2914 if test -n "$AS"; then
2915 ac_cv_prog_AS="$AS" # Let the user override the test.
2916else
2917 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2918 ac_dummy="$PATH"
2919 for ac_dir in $ac_dummy; do
2920 test -z "$ac_dir" && ac_dir=.
2921 if test -f $ac_dir/$ac_word -o \
2922 -f $ac_dir/$ac_word$ac_exeext ; then
2923 ac_cv_prog_AS="${ncn_tool_prefix}as"
2924 break
2925 fi
2926 done
2927 IFS="$ac_save_ifs"
2928fi
2929fi
2930AS="$ac_cv_prog_AS"
2931if test -n "$AS"; then
2932 echo "$ac_t""$AS" 1>&6
2933else
2934 echo "$ac_t""no" 1>&6
2935fi
2936
2937fi
2938if test -z "$ac_cv_prog_AS" ; then
2939 if test $build = $host ; then
2940 ncn_cv_AS=$AS
2941 # Extract the first word of "as", so it can be a program name with args.
2942set dummy as; ac_word=$2
2943echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2944echo "configure:2945: checking for $ac_word" >&5
2945if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS'+set}'`\" = set"; then
2946 echo $ac_n "(cached) $ac_c" 1>&6
2947else
2948 if test -n "$ncn_cv_AS"; then
2949 ac_cv_prog_ncn_cv_AS="$ncn_cv_AS" # Let the user override the test.
2950else
2951 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2952 ac_dummy="$PATH"
2953 for ac_dir in $ac_dummy; do
2954 test -z "$ac_dir" && ac_dir=.
2955 if test -f $ac_dir/$ac_word -o \
2956 -f $ac_dir/$ac_word$ac_exeext ; then
2957 ac_cv_prog_ncn_cv_AS="as"
2958 break
2959 fi
2960 done
2961 IFS="$ac_save_ifs"
2962 test -z "$ac_cv_prog_ncn_cv_AS" && ac_cv_prog_ncn_cv_AS="as"
2963fi
2964fi
2965ncn_cv_AS="$ac_cv_prog_ncn_cv_AS"
2966if test -n "$ncn_cv_AS"; then
2967 echo "$ac_t""$ncn_cv_AS" 1>&6
2968else
2969 echo "$ac_t""no" 1>&6
2970fi
2971
2972 AS=$ncn_cv_AS
2973 else
2974 AS="${ncn_tool_prefix}as"
2975 fi
2976else
2977 AS="$ac_cv_prog_AS"
2978fi
2979
2980 if test -n "$ncn_tool_prefix"; then
2981 # Extract the first word of "${ncn_tool_prefix}dlltool", so it can be a program name with args.
2982set dummy ${ncn_tool_prefix}dlltool; ac_word=$2
2983echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2984echo "configure:2985: checking for $ac_word" >&5
2985if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
2986 echo $ac_n "(cached) $ac_c" 1>&6
2987else
2988 if test -n "$DLLTOOL"; then
2989 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2990else
2991 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
2992 ac_dummy="$PATH"
2993 for ac_dir in $ac_dummy; do
2994 test -z "$ac_dir" && ac_dir=.
2995 if test -f $ac_dir/$ac_word -o \
2996 -f $ac_dir/$ac_word$ac_exeext ; then
2997 ac_cv_prog_DLLTOOL="${ncn_tool_prefix}dlltool"
2998 break
2999 fi
3000 done
3001 IFS="$ac_save_ifs"
3002fi
3003fi
3004DLLTOOL="$ac_cv_prog_DLLTOOL"
3005if test -n "$DLLTOOL"; then
3006 echo "$ac_t""$DLLTOOL" 1>&6
3007else
3008 echo "$ac_t""no" 1>&6
3009fi
3010
3011fi
3012if test -z "$ac_cv_prog_DLLTOOL" ; then
3013 if test $build = $host ; then
3014 ncn_cv_DLLTOOL=$DLLTOOL
3015 # Extract the first word of "dlltool", so it can be a program name with args.
3016set dummy dlltool; ac_word=$2
3017echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3018echo "configure:3019: checking for $ac_word" >&5
3019if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL'+set}'`\" = set"; then
3020 echo $ac_n "(cached) $ac_c" 1>&6
3021else
3022 if test -n "$ncn_cv_DLLTOOL"; then
3023 ac_cv_prog_ncn_cv_DLLTOOL="$ncn_cv_DLLTOOL" # Let the user override the test.
3024else
3025 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
3026 ac_dummy="$PATH"
3027 for ac_dir in $ac_dummy; do
3028 test -z "$ac_dir" && ac_dir=.
3029 if test -f $ac_dir/$ac_word -o \
3030 -f $ac_dir/$ac_word$ac_exeext ; then
3031 ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
3032 break
3033 fi
3034 done
3035 IFS="$ac_save_ifs"
3036 test -z "$ac_cv_prog_ncn_cv_DLLTOOL" && ac_cv_prog_ncn_cv_DLLTOOL="dlltool"
3037fi
3038fi
3039ncn_cv_DLLTOOL="$ac_cv_prog_ncn_cv_DLLTOOL"
3040if test -n "$ncn_cv_DLLTOOL"; then
3041 echo "$ac_t""$ncn_cv_DLLTOOL" 1>&6
3042else
3043 echo "$ac_t""no" 1>&6
3044fi
3045
3046 DLLTOOL=$ncn_cv_DLLTOOL
3047 else
3048 DLLTOOL="${ncn_tool_prefix}dlltool"
3049 fi
3050else
3051 DLLTOOL="$ac_cv_prog_DLLTOOL"
3052fi
3053
3054 if test -n "$ncn_tool_prefix"; then
3055 # Extract the first word of "${ncn_tool_prefix}ld", so it can be a program name with args.
3056set dummy ${ncn_tool_prefix}ld; ac_word=$2
3057echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3058echo "configure:3059: checking for $ac_word" >&5
3059if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
3060 echo $ac_n "(cached) $ac_c" 1>&6
3061else
3062 if test -n "$LD"; then
3063 ac_cv_prog_LD="$LD" # Let the user override the test.
3064else
3065 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068 test -z "$ac_dir" && ac_dir=.
3069 if test -f $ac_dir/$ac_word -o \
3070 -f $ac_dir/$ac_word$ac_exeext ; then
3071 ac_cv_prog_LD="${ncn_tool_prefix}ld"
3072 break
3073 fi
3074 done
3075 IFS="$ac_save_ifs"
3076fi
3077fi
3078LD="$ac_cv_prog_LD"
3079if test -n "$LD"; then
3080 echo "$ac_t""$LD" 1>&6
3081else
3082 echo "$ac_t""no" 1>&6
3083fi
3084
3085fi
3086if test -z "$ac_cv_prog_LD" ; then
3087 if test $build = $host ; then
3088 ncn_cv_LD=$LD
3089 # Extract the first word of "ld", so it can be a program name with args.
3090set dummy ld; ac_word=$2
3091echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3092echo "configure:3093: checking for $ac_word" >&5
3093if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD'+set}'`\" = set"; then
3094 echo $ac_n "(cached) $ac_c" 1>&6
3095else
3096 if test -n "$ncn_cv_LD"; then
3097 ac_cv_prog_ncn_cv_LD="$ncn_cv_LD" # Let the user override the test.
3098else
3099 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
3100 ac_dummy="$PATH"
3101 for ac_dir in $ac_dummy; do
3102 test -z "$ac_dir" && ac_dir=.
3103 if test -f $ac_dir/$ac_word -o \
3104 -f $ac_dir/$ac_word$ac_exeext ; then
3105 ac_cv_prog_ncn_cv_LD="ld"
3106 break
3107 fi
3108 done
3109 IFS="$ac_save_ifs"
3110 test -z "$ac_cv_prog_ncn_cv_LD" && ac_cv_prog_ncn_cv_LD="ld"
3111fi
3112fi
3113ncn_cv_LD="$ac_cv_prog_ncn_cv_LD"
3114if test -n "$ncn_cv_LD"; then
3115 echo "$ac_t""$ncn_cv_LD" 1>&6
3116else
3117 echo "$ac_t""no" 1>&6
3118fi
3119
3120 LD=$ncn_cv_LD
3121 else
3122 LD="${ncn_tool_prefix}ld"
3123 fi
3124else
3125 LD="$ac_cv_prog_LD"
3126fi
3127
3128 if test -n "$ncn_tool_prefix"; then
3129 # Extract the first word of "${ncn_tool_prefix}nm", so it can be a program name with args.
3130set dummy ${ncn_tool_prefix}nm; ac_word=$2
3131echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3132echo "configure:3133: checking for $ac_word" >&5
3133if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
3134 echo $ac_n "(cached) $ac_c" 1>&6
3135else
3136 if test -n "$NM"; then
3137 ac_cv_prog_NM="$NM" # Let the user override the test.
3138else
3139 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS"
3140 ac_dummy="$PATH"
3141 for ac_dir in $ac_dummy; do
3142 test -z "$ac_dir" && ac_dir=.
3143 if test -f $ac_dir/$ac_word -o \
3144 -f $ac_dir/$ac_word$ac_exeext ; then
3145 ac_cv_prog_NM="${ncn_tool_prefix}nm"
3146 break
3147 fi
3148 done
3149 IFS="$ac_save_ifs"
3150fi
3151fi
3152NM="$ac_cv_prog_NM"
3153if test -n "$NM"; then
3154 echo "$ac_t""$NM" 1>&6
3155else
3156 echo "$ac_t""no" 1>&6
3157fi
3158