* doc/as.texinfo (Machine Dependencies): Add v850 to menu.
[deliverable/binutils-gdb.git] / bfd / configure
CommitLineData
8c693660
KR
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
70e8e585 4# Generated automatically using autoconf version 2.12.1
a4322a77 5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
8c693660
KR
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:
c0734708
ILT
14ac_help="$ac_help
15 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
16ac_help="$ac_help
17 --enable-shared build shared libraries [default=yes]"
18ac_help="$ac_help
19 --enable-static build static libraries [default=yes]"
8c693660 20ac_help="$ac_help
e818c22e 21 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)"
8c693660 22ac_help="$ac_help
e818c22e 23 --enable-targets alternative target configurations"
44f795f7
ILT
24ac_help="$ac_help
25 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
85e493f0
ILT
26ac_help="$ac_help
27 --with-mmap try using mmap for BFD input files if available"
c0734708
ILT
28ac_help="$ac_help
29 --enable-maintainer-mode enable make rules and dependencies not useful
30 (and sometimes confusing) to the casual installer"
8c693660
KR
31
32# Initialize some variables set by options.
33# The variables have the same names as the options, with
34# dashes changed to underlines.
35build=NONE
36cache_file=./config.cache
37exec_prefix=NONE
38host=NONE
39no_create=
40nonopt=NONE
41no_recursion=
42prefix=NONE
43program_prefix=NONE
44program_suffix=NONE
45program_transform_name=s,x,x,
46silent=
47site=
48srcdir=
49target=NONE
50verbose=
51x_includes=NONE
52x_libraries=NONE
85e493f0
ILT
53bindir='${exec_prefix}/bin'
54sbindir='${exec_prefix}/sbin'
55libexecdir='${exec_prefix}/libexec'
56datadir='${prefix}/share'
57sysconfdir='${prefix}/etc'
58sharedstatedir='${prefix}/com'
59localstatedir='${prefix}/var'
60libdir='${exec_prefix}/lib'
61includedir='${prefix}/include'
62oldincludedir='/usr/include'
63infodir='${prefix}/info'
64mandir='${prefix}/man'
8c693660
KR
65
66# Initialize some other variables.
67subdirs=
85e493f0 68MFLAGS= MAKEFLAGS=
ac388f2a
ILT
69# Maximum number of lines to put in a shell here document.
70ac_max_here_lines=12
8c693660
KR
71
72ac_prev=
73for ac_option
74do
75
76 # If the previous option needs an argument, assign it.
77 if test -n "$ac_prev"; then
78 eval "$ac_prev=\$ac_option"
79 ac_prev=
80 continue
81 fi
82
83 case "$ac_option" in
84 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
85 *) ac_optarg= ;;
86 esac
87
88 # Accept the important Cygnus configure options, so we can diagnose typos.
89
90 case "$ac_option" in
91
85e493f0
ILT
92 -bindir | --bindir | --bindi | --bind | --bin | --bi)
93 ac_prev=bindir ;;
94 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
95 bindir="$ac_optarg" ;;
96
97 -build | --build | --buil | --bui | --bu)
8c693660 98 ac_prev=build ;;
85e493f0 99 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
8c693660
KR
100 build="$ac_optarg" ;;
101
102 -cache-file | --cache-file | --cache-fil | --cache-fi \
103 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
104 ac_prev=cache_file ;;
105 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
106 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
107 cache_file="$ac_optarg" ;;
108
85e493f0
ILT
109 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
110 ac_prev=datadir ;;
111 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
112 | --da=*)
113 datadir="$ac_optarg" ;;
114
8c693660
KR
115 -disable-* | --disable-*)
116 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
117 # Reject names that are not valid shell variable names.
118 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
119 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120 fi
121 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122 eval "enable_${ac_feature}=no" ;;
123
124 -enable-* | --enable-*)
125 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
126 # Reject names that are not valid shell variable names.
127 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
128 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129 fi
130 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131 case "$ac_option" in
132 *=*) ;;
133 *) ac_optarg=yes ;;
134 esac
135 eval "enable_${ac_feature}='$ac_optarg'" ;;
136
137 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
138 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
139 | --exec | --exe | --ex)
140 ac_prev=exec_prefix ;;
141 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
142 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
143 | --exec=* | --exe=* | --ex=*)
144 exec_prefix="$ac_optarg" ;;
145
146 -gas | --gas | --ga | --g)
147 # Obsolete; use --with-gas.
148 with_gas=yes ;;
149
150 -help | --help | --hel | --he)
151 # Omit some internal or obsolete options to make the list less imposing.
152 # This message is too long to be a string in the A/UX 3.1 sh.
153 cat << EOF
154Usage: configure [options] [host]
155Options: [defaults in brackets after descriptions]
156Configuration:
157 --cache-file=FILE cache test results in FILE
158 --help print this message
159 --no-create do not create output files
160 --quiet, --silent do not print \`checking...' messages
161 --version print the version of autoconf that created configure
162Directory and file names:
163 --prefix=PREFIX install architecture-independent files in PREFIX
164 [$ac_default_prefix]
85e493f0 165 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
8c693660 166 [same as prefix]
85e493f0
ILT
167 --bindir=DIR user executables in DIR [EPREFIX/bin]
168 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
169 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
170 --datadir=DIR read-only architecture-independent data in DIR
171 [PREFIX/share]
172 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
173 --sharedstatedir=DIR modifiable architecture-independent data in DIR
174 [PREFIX/com]
175 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
176 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
177 --includedir=DIR C header files in DIR [PREFIX/include]
178 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
179 --infodir=DIR info documentation in DIR [PREFIX/info]
180 --mandir=DIR man documentation in DIR [PREFIX/man]
8c693660
KR
181 --srcdir=DIR find the sources in DIR [configure dir or ..]
182 --program-prefix=PREFIX prepend PREFIX to installed program names
183 --program-suffix=SUFFIX append SUFFIX to installed program names
85e493f0
ILT
184 --program-transform-name=PROGRAM
185 run sed PROGRAM on installed program names
186EOF
187 cat << EOF
8c693660
KR
188Host type:
189 --build=BUILD configure for building on BUILD [BUILD=HOST]
190 --host=HOST configure for HOST [guessed]
191 --target=TARGET configure for TARGET [TARGET=HOST]
192Features and packages:
193 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
194 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
195 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
196 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
197 --x-includes=DIR X include files are in DIR
198 --x-libraries=DIR X library files are in DIR
8c693660 199EOF
85e493f0
ILT
200 if test -n "$ac_help"; then
201 echo "--enable and --with options recognized:$ac_help"
202 fi
8c693660
KR
203 exit 0 ;;
204
205 -host | --host | --hos | --ho)
206 ac_prev=host ;;
207 -host=* | --host=* | --hos=* | --ho=*)
208 host="$ac_optarg" ;;
209
85e493f0
ILT
210 -includedir | --includedir | --includedi | --included | --include \
211 | --includ | --inclu | --incl | --inc)
212 ac_prev=includedir ;;
213 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
214 | --includ=* | --inclu=* | --incl=* | --inc=*)
215 includedir="$ac_optarg" ;;
216
217 -infodir | --infodir | --infodi | --infod | --info | --inf)
218 ac_prev=infodir ;;
219 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
220 infodir="$ac_optarg" ;;
221
222 -libdir | --libdir | --libdi | --libd)
223 ac_prev=libdir ;;
224 -libdir=* | --libdir=* | --libdi=* | --libd=*)
225 libdir="$ac_optarg" ;;
226
227 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
228 | --libexe | --libex | --libe)
229 ac_prev=libexecdir ;;
230 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
231 | --libexe=* | --libex=* | --libe=*)
232 libexecdir="$ac_optarg" ;;
233
234 -localstatedir | --localstatedir | --localstatedi | --localstated \
235 | --localstate | --localstat | --localsta | --localst \
236 | --locals | --local | --loca | --loc | --lo)
237 ac_prev=localstatedir ;;
238 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
239 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
240 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
241 localstatedir="$ac_optarg" ;;
242
243 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
244 ac_prev=mandir ;;
245 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
246 mandir="$ac_optarg" ;;
247
8c693660
KR
248 -nfp | --nfp | --nf)
249 # Obsolete; use --without-fp.
250 with_fp=no ;;
251
252 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
253 | --no-cr | --no-c)
254 no_create=yes ;;
255
256 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
257 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
258 no_recursion=yes ;;
259
85e493f0
ILT
260 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
261 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
262 | --oldin | --oldi | --old | --ol | --o)
263 ac_prev=oldincludedir ;;
264 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
265 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
266 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
267 oldincludedir="$ac_optarg" ;;
268
8c693660
KR
269 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
270 ac_prev=prefix ;;
271 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
272 prefix="$ac_optarg" ;;
273
274 -program-prefix | --program-prefix | --program-prefi | --program-pref \
275 | --program-pre | --program-pr | --program-p)
276 ac_prev=program_prefix ;;
277 -program-prefix=* | --program-prefix=* | --program-prefi=* \
278 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
279 program_prefix="$ac_optarg" ;;
280
281 -program-suffix | --program-suffix | --program-suffi | --program-suff \
282 | --program-suf | --program-su | --program-s)
283 ac_prev=program_suffix ;;
284 -program-suffix=* | --program-suffix=* | --program-suffi=* \
285 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
286 program_suffix="$ac_optarg" ;;
287
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 ac_prev=program_transform_name ;;
296 -program-transform-name=* | --program-transform-name=* \
297 | --program-transform-nam=* | --program-transform-na=* \
298 | --program-transform-n=* | --program-transform-=* \
299 | --program-transform=* | --program-transfor=* \
300 | --program-transfo=* | --program-transf=* \
301 | --program-trans=* | --program-tran=* \
302 | --progr-tra=* | --program-tr=* | --program-t=*)
303 program_transform_name="$ac_optarg" ;;
304
305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
306 | -silent | --silent | --silen | --sile | --sil)
307 silent=yes ;;
308
85e493f0
ILT
309 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
310 ac_prev=sbindir ;;
311 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
312 | --sbi=* | --sb=*)
313 sbindir="$ac_optarg" ;;
314
315 -sharedstatedir | --sharedstatedir | --sharedstatedi \
316 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
317 | --sharedst | --shareds | --shared | --share | --shar \
318 | --sha | --sh)
319 ac_prev=sharedstatedir ;;
320 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
321 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
322 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
323 | --sha=* | --sh=*)
324 sharedstatedir="$ac_optarg" ;;
325
8c693660
KR
326 -site | --site | --sit)
327 ac_prev=site ;;
328 -site=* | --site=* | --sit=*)
329 site="$ac_optarg" ;;
330
331 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
332 ac_prev=srcdir ;;
333 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
334 srcdir="$ac_optarg" ;;
335
85e493f0
ILT
336 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
337 | --syscon | --sysco | --sysc | --sys | --sy)
338 ac_prev=sysconfdir ;;
339 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
340 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
341 sysconfdir="$ac_optarg" ;;
342
8c693660
KR
343 -target | --target | --targe | --targ | --tar | --ta | --t)
344 ac_prev=target ;;
345 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
346 target="$ac_optarg" ;;
347
348 -v | -verbose | --verbose | --verbos | --verbo | --verb)
349 verbose=yes ;;
350
351 -version | --version | --versio | --versi | --vers)
70e8e585 352 echo "configure generated by autoconf version 2.12.1"
8c693660
KR
353 exit 0 ;;
354
355 -with-* | --with-*)
356 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
357 # Reject names that are not valid shell variable names.
358 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
359 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360 fi
361 ac_package=`echo $ac_package| sed 's/-/_/g'`
362 case "$ac_option" in
363 *=*) ;;
364 *) ac_optarg=yes ;;
365 esac
366 eval "with_${ac_package}='$ac_optarg'" ;;
367
368 -without-* | --without-*)
369 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
370 # Reject names that are not valid shell variable names.
371 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
372 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373 fi
374 ac_package=`echo $ac_package| sed 's/-/_/g'`
375 eval "with_${ac_package}=no" ;;
376
377 --x)
378 # Obsolete; use --with-x.
379 with_x=yes ;;
380
381 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
382 | --x-incl | --x-inc | --x-in | --x-i)
383 ac_prev=x_includes ;;
384 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
385 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
386 x_includes="$ac_optarg" ;;
387
388 -x-libraries | --x-libraries | --x-librarie | --x-librari \
389 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
390 ac_prev=x_libraries ;;
391 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
392 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
393 x_libraries="$ac_optarg" ;;
394
395 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
396 ;;
397
85e493f0 398 *)
8c693660
KR
399 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
400 echo "configure: warning: $ac_option: invalid host type" 1>&2
401 fi
402 if test "x$nonopt" != xNONE; then
403 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
404 fi
405 nonopt="$ac_option"
406 ;;
407
408 esac
409done
410
411if test -n "$ac_prev"; then
412 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
413fi
414
415trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
416
417# File descriptor usage:
418# 0 standard input
419# 1 file creation
420# 2 errors and warnings
421# 3 some systems may open it to /dev/tty
422# 4 used on the Kubota Titan
423# 6 checking for... messages and results
424# 5 compiler messages saved in config.log
425if test "$silent" = yes; then
426 exec 6>/dev/null
427else
428 exec 6>&1
429fi
430exec 5>./config.log
431
432echo "\
433This file contains any messages produced by compilers while
434running configure, to aid debugging if configure makes a mistake.
435" 1>&5
436
437# Strip out --no-create and --no-recursion so they do not pile up.
438# Also quote any args containing shell metacharacters.
439ac_configure_args=
440for ac_arg
441do
442 case "$ac_arg" in
443 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
444 | --no-cr | --no-c) ;;
445 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
446 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
447 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
448 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
449 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
450 esac
451done
452
453# NLS nuisances.
ac388f2a
ILT
454# Only set these to C if already set. These must not be set unconditionally
455# because not all systems understand e.g. LANG=C (notably SCO).
456# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
457# Non-C LC_CTYPE values break the ctype check.
fd8d7c31 458if test "${LANG+set}" = set; then LANG=C; export LANG; fi
ac388f2a
ILT
459if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
460if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
461if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
8c693660
KR
462
463# confdefs.h avoids OS command line length limits that DEFS can exceed.
464rm -rf conftest* confdefs.h
465# AIX cpp loses on an empty file, so make sure it contains at least a newline.
466echo > confdefs.h
467
468# A filename unique to this package, relative to the directory that
469# configure is in, which we can look for to find out if srcdir is correct.
470ac_unique_file=libbfd.c
471
472# Find the source files, if location was not specified.
473if test -z "$srcdir"; then
474 ac_srcdir_defaulted=yes
475 # Try the directory containing this script, then its parent.
476 ac_prog=$0
477 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
478 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
479 srcdir=$ac_confdir
480 if test ! -r $srcdir/$ac_unique_file; then
481 srcdir=..
482 fi
483else
484 ac_srcdir_defaulted=no
485fi
486if test ! -r $srcdir/$ac_unique_file; then
487 if test "$ac_srcdir_defaulted" = yes; then
488 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
489 else
490 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
491 fi
492fi
493srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
494
495# Prefer explicitly selected file to automatically selected ones.
496if test -z "$CONFIG_SITE"; then
497 if test "x$prefix" != xNONE; then
498 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
499 else
500 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
501 fi
502fi
503for ac_site_file in $CONFIG_SITE; do
504 if test -r "$ac_site_file"; then
505 echo "loading site script $ac_site_file"
506 . "$ac_site_file"
507 fi
508done
509
510if test -r "$cache_file"; then
511 echo "loading cache $cache_file"
512 . $cache_file
513else
514 echo "creating cache $cache_file"
515 > $cache_file
516fi
517
518ac_ext=c
519# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
986cf3b8
ILT
520ac_cpp='$CPP $CPPFLAGS'
521ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
522ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
ac388f2a 523cross_compiling=$ac_cv_prog_cc_cross
8c693660
KR
524
525if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
526 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
527 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
528 ac_n= ac_c='
529' ac_t=' '
530 else
531 ac_n=-n ac_c= ac_t=
532 fi
533else
534 ac_n= ac_c='\c' ac_t=
535fi
536
537
538
8c693660 539ac_aux_dir=
c0734708 540for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
8c693660
KR
541 if test -f $ac_dir/install-sh; then
542 ac_aux_dir=$ac_dir
543 ac_install_sh="$ac_aux_dir/install-sh -c"
544 break
545 elif test -f $ac_dir/install.sh; then
546 ac_aux_dir=$ac_dir
547 ac_install_sh="$ac_aux_dir/install.sh -c"
548 break
549 fi
550done
551if test -z "$ac_aux_dir"; then
c0734708 552 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
8c693660
KR
553fi
554ac_config_guess=$ac_aux_dir/config.guess
555ac_config_sub=$ac_aux_dir/config.sub
556ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
557
558
559# Do some error checking and defaulting for the host and target type.
560# The inputs are:
561# configure --host=HOST --target=TARGET --build=BUILD NONOPT
562#
563# The rules are:
564# 1. You are not allowed to specify --host, --target, and nonopt at the
85e493f0 565# same time.
8c693660
KR
566# 2. Host defaults to nonopt.
567# 3. If nonopt is not specified, then host defaults to the current host,
568# as determined by config.guess.
569# 4. Target and build default to nonopt.
570# 5. If nonopt is not specified, then target and build default to host.
571
572# The aliases save the names the user supplied, while $host etc.
573# will get canonicalized.
574case $host---$target---$nonopt in
575NONE---*---* | *---NONE---* | *---*---NONE) ;;
576*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
577esac
578
579
c0734708 580# Make sure we can run config.sub.
70e8e585 581if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
c0734708
ILT
582else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
583fi
584
585echo $ac_n "checking host system type""... $ac_c" 1>&6
586echo "configure:587: checking host system type" >&5
587
588host_alias=$host
589case "$host_alias" in
590NONE)
591 case $nonopt in
592 NONE)
70e8e585 593 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
c0734708
ILT
594 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
595 fi ;;
596 *) host_alias=$nonopt ;;
597 esac ;;
598esac
599
70e8e585 600host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
c0734708
ILT
601host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
602host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
603host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
604echo "$ac_t""$host" 1>&6
605
606echo $ac_n "checking target system type""... $ac_c" 1>&6
607echo "configure:608: checking target system type" >&5
608
609target_alias=$target
610case "$target_alias" in
611NONE)
612 case $nonopt in
613 NONE) target_alias=$host_alias ;;
614 *) target_alias=$nonopt ;;
615 esac ;;
616esac
617
70e8e585 618target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
c0734708
ILT
619target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
620target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
621target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
622echo "$ac_t""$target" 1>&6
623
624echo $ac_n "checking build system type""... $ac_c" 1>&6
625echo "configure:626: checking build system type" >&5
626
627build_alias=$build
628case "$build_alias" in
629NONE)
630 case $nonopt in
631 NONE) build_alias=$host_alias ;;
632 *) build_alias=$nonopt ;;
633 esac ;;
634esac
635
70e8e585 636build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
c0734708
ILT
637build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
638build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
639build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
640echo "$ac_t""$build" 1>&6
641
642test "$host_alias" != "$target_alias" &&
643 test "$program_prefix$program_suffix$program_transform_name" = \
644 NONENONEs,x,x, &&
645 program_prefix=${target_alias}-
646
647# Extract the first word of "gcc", so it can be a program name with args.
648set dummy gcc; ac_word=$2
649echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
650echo "configure:651: checking for $ac_word" >&5
651if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
652 echo $ac_n "(cached) $ac_c" 1>&6
653else
654 if test -n "$CC"; then
655 ac_cv_prog_CC="$CC" # Let the user override the test.
656else
657 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
658 for ac_dir in $PATH; do
659 test -z "$ac_dir" && ac_dir=.
660 if test -f $ac_dir/$ac_word; then
661 ac_cv_prog_CC="gcc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666fi
667fi
668CC="$ac_cv_prog_CC"
669if test -n "$CC"; then
670 echo "$ac_t""$CC" 1>&6
671else
672 echo "$ac_t""no" 1>&6
673fi
674
675if test -z "$CC"; then
676 # Extract the first word of "cc", so it can be a program name with args.
677set dummy cc; ac_word=$2
678echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
679echo "configure:680: checking for $ac_word" >&5
680if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
681 echo $ac_n "(cached) $ac_c" 1>&6
682else
683 if test -n "$CC"; then
684 ac_cv_prog_CC="$CC" # Let the user override the test.
685else
686 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
687 ac_prog_rejected=no
688 for ac_dir in $PATH; do
689 test -z "$ac_dir" && ac_dir=.
690 if test -f $ac_dir/$ac_word; then
691 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
692 ac_prog_rejected=yes
693 continue
694 fi
695 ac_cv_prog_CC="cc"
696 break
697 fi
698 done
699 IFS="$ac_save_ifs"
700if test $ac_prog_rejected = yes; then
701 # We found a bogon in the path, so make sure we never use it.
702 set dummy $ac_cv_prog_CC
703 shift
704 if test $# -gt 0; then
705 # We chose a different compiler from the bogus one.
706 # However, it has the same basename, so the bogon will be chosen
707 # first if we set CC to just the basename; use the full file name.
708 shift
709 set dummy "$ac_dir/$ac_word" "$@"
710 shift
711 ac_cv_prog_CC="$@"
712 fi
713fi
714fi
715fi
716CC="$ac_cv_prog_CC"
717if test -n "$CC"; then
718 echo "$ac_t""$CC" 1>&6
719else
720 echo "$ac_t""no" 1>&6
721fi
722
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext <<EOF
737#line 738 "configure"
738#include "confdefs.h"
739main(){return(0);}
740EOF
741if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
742 ac_cv_prog_cc_works=yes
743 # If we can't run a trivial program, we are probably using a cross compiler.
744 if (./conftest; exit) 2>/dev/null; then
745 ac_cv_prog_cc_cross=no
746 else
747 ac_cv_prog_cc_cross=yes
748 fi
749else
750 echo "configure: failed program was:" >&5
751 cat conftest.$ac_ext >&5
752 ac_cv_prog_cc_works=no
753fi
754rm -fr conftest*
755
756echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
757if test $ac_cv_prog_cc_works = no; then
758 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
759fi
760echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
761echo "configure:762: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
762echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
763cross_compiling=$ac_cv_prog_cc_cross
764
765echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
766echo "configure:767: checking whether we are using GNU C" >&5
767if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
768 echo $ac_n "(cached) $ac_c" 1>&6
769else
770 cat > conftest.c <<EOF
771#ifdef __GNUC__
772 yes;
773#endif
774EOF
775if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
776 ac_cv_prog_gcc=yes
777else
778 ac_cv_prog_gcc=no
779fi
780fi
781
782echo "$ac_t""$ac_cv_prog_gcc" 1>&6
783
784if test $ac_cv_prog_gcc = yes; then
785 GCC=yes
786 ac_test_CFLAGS="${CFLAGS+set}"
787 ac_save_CFLAGS="$CFLAGS"
788 CFLAGS=
789 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
790echo "configure:791: checking whether ${CC-cc} accepts -g" >&5
791if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
792 echo $ac_n "(cached) $ac_c" 1>&6
793else
794 echo 'void f(){}' > conftest.c
795if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
796 ac_cv_prog_cc_g=yes
797else
798 ac_cv_prog_cc_g=no
799fi
800rm -f conftest*
801
802fi
803
804echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
805 if test "$ac_test_CFLAGS" = set; then
806 CFLAGS="$ac_save_CFLAGS"
807 elif test $ac_cv_prog_cc_g = yes; then
808 CFLAGS="-g -O2"
809 else
810 CFLAGS="-O2"
811 fi
812else
813 GCC=
814 test "${CFLAGS+set}" = set || CFLAGS="-g"
815fi
816
817echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
818echo "configure:819: checking for POSIXized ISC" >&5
819if test -d /etc/conf/kconfig.d &&
820 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
821then
822 echo "$ac_t""yes" 1>&6
823 ISC=yes # If later tests want to check for ISC.
824 cat >> confdefs.h <<\EOF
825#define _POSIX_SOURCE 1
826EOF
827
828 if test "$GCC" = yes; then
829 CC="$CC -posix"
830 else
831 CC="$CC -Xp"
832 fi
833else
834 echo "$ac_t""no" 1>&6
835 ISC=
836fi
837
838
839# Find a good install program. We prefer a C program (faster),
840# so one script is as good as another. But avoid the broken or
841# incompatible versions:
842# SysV /etc/install, /usr/sbin/install
843# SunOS /usr/etc/install
844# IRIX /sbin/install
845# AIX /bin/install
846# AFS /usr/afsws/bin/install, which mishandles nonexistent args
847# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
848# ./install, which can be erroneously created by make from ./install.sh.
849echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
850echo "configure:851: checking for a BSD compatible install" >&5
851if test -z "$INSTALL"; then
852if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
853 echo $ac_n "(cached) $ac_c" 1>&6
854else
855 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
856 for ac_dir in $PATH; do
857 # Account for people who put trailing slashes in PATH elements.
858 case "$ac_dir/" in
859 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
860 *)
861 # OSF1 and SCO ODT 3.0 have their own names for install.
862 for ac_prog in ginstall installbsd scoinst install; do
863 if test -f $ac_dir/$ac_prog; then
864 if test $ac_prog = install &&
865 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
866 # AIX install. It has an incompatible calling convention.
867 # OSF/1 installbsd also uses dspmsg, but is usable.
868 :
869 else
870 ac_cv_path_install="$ac_dir/$ac_prog -c"
871 break 2
872 fi
873 fi
874 done
875 ;;
876 esac
877 done
878 IFS="$ac_save_IFS"
879
880fi
881 if test "${ac_cv_path_install+set}" = set; then
882 INSTALL="$ac_cv_path_install"
883 else
884 # As a last resort, use the slow shell script. We don't cache a
885 # path for INSTALL within a source directory, because that will
886 # break other packages using the cache if that directory is
887 # removed, or if the path is relative.
888 INSTALL="$ac_install_sh"
889 fi
890fi
891echo "$ac_t""$INSTALL" 1>&6
892
893# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
894# It thinks the first close brace ends the variable substitution.
895test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
896
897test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
898
899
900test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
901
902
903PACKAGE=bfd
904
905VERSION=2.8.2
906
907if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
908 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
909fi
910cat >> confdefs.h <<EOF
911#define PACKAGE "$PACKAGE"
912EOF
913
914cat >> confdefs.h <<EOF
915#define VERSION "$VERSION"
916EOF
917
918echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
919echo "configure:920: checking whether build environment is sane" >&5
920# Just in case
921sleep 1
922echo timestamp > conftestfile
923# Do `set' in a subshell so we don't clobber the current shell's
924# arguments. Must try -L first in case configure is actually a
925# symlink; some systems play weird games with the mod time of symlinks
926# (eg FreeBSD returns the mod time of the symlink's containing
927# directory).
928if (
929 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
930 if test "" = "X"; then
931 # -L didn't work.
932 set X `ls -t $srcdir/configure conftestfile`
933 fi
934 test "$2" = conftestfile
935 )
936then
937 # Ok.
938 :
939else
940 { echo "configure: error: newly created file is older than distributed files!
941Check your system clock" 1>&2; exit 1; }
942fi
943rm -f conftest*
944echo "$ac_t""yes" 1>&6
945if test "$program_transform_name" = s,x,x,; then
946 program_transform_name=
947else
948 # Double any \ or $. echo might interpret backslashes.
949 cat <<\EOF_SED > conftestsed
950s,\\,\\\\,g; s,\$,$$,g
951EOF_SED
952 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
953 rm -f conftestsed
954fi
955test "$program_prefix" != NONE &&
956 program_transform_name="s,^,${program_prefix},; $program_transform_name"
957# Use a double $ so make ignores it.
958test "$program_suffix" != NONE &&
959 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
960
961# sed with no file args requires a program.
962test "$program_transform_name" = "" && program_transform_name="s,x,x,"
963
964missing_dir=`cd $ac_aux_dir && pwd`
965echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
966echo "configure:967: checking for working aclocal" >&5
967# Run test in a subshell; some versions of sh will print an error if
968# an executable is not found, even if stderr is redirected.
969# Redirect stdin to placate older versions of autoconf. Sigh.
970if (aclocal --version) < /dev/null > /dev/null 2>&1; then
971 ACLOCAL=aclocal
972 echo "$ac_t""found" 1>&6
973else
974 ACLOCAL="$missing_dir/missing aclocal"
975 echo "$ac_t""missing" 1>&6
976fi
977
978echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
979echo "configure:980: checking for working autoconf" >&5
980# Run test in a subshell; some versions of sh will print an error if
981# an executable is not found, even if stderr is redirected.
982# Redirect stdin to placate older versions of autoconf. Sigh.
983if (autoconf --version) < /dev/null > /dev/null 2>&1; then
984 AUTOCONF=autoconf
985 echo "$ac_t""found" 1>&6
986else
987 AUTOCONF="$missing_dir/missing autoconf"
988 echo "$ac_t""missing" 1>&6
989fi
990
991echo $ac_n "checking for working automake""... $ac_c" 1>&6
992echo "configure:993: checking for working automake" >&5
993# Run test in a subshell; some versions of sh will print an error if
994# an executable is not found, even if stderr is redirected.
995# Redirect stdin to placate older versions of autoconf. Sigh.
996if (automake --version) < /dev/null > /dev/null 2>&1; then
997 AUTOMAKE=automake
998 echo "$ac_t""found" 1>&6
999else
1000 AUTOMAKE="$missing_dir/missing automake"
1001 echo "$ac_t""missing" 1>&6
1002fi
1003
1004echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1005echo "configure:1006: checking for working autoheader" >&5
1006# Run test in a subshell; some versions of sh will print an error if
1007# an executable is not found, even if stderr is redirected.
1008# Redirect stdin to placate older versions of autoconf. Sigh.
1009if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1010 AUTOHEADER=autoheader
1011 echo "$ac_t""found" 1>&6
1012else
1013 AUTOHEADER="$missing_dir/missing autoheader"
1014 echo "$ac_t""missing" 1>&6
1015fi
1016
1017echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1018echo "configure:1019: checking for working makeinfo" >&5
1019# Run test in a subshell; some versions of sh will print an error if
1020# an executable is not found, even if stderr is redirected.
1021# Redirect stdin to placate older versions of autoconf. Sigh.
1022if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1023 MAKEINFO=makeinfo
1024 echo "$ac_t""found" 1>&6
1025else
1026 MAKEINFO="$missing_dir/missing makeinfo"
1027 echo "$ac_t""missing" 1>&6
1028fi
1029
1030echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1031echo "configure:1032: checking whether ${MAKE-make} sets \${MAKE}" >&5
1032set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1033if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1034 echo $ac_n "(cached) $ac_c" 1>&6
1035else
1036 cat > conftestmake <<\EOF
1037all:
1038 @echo 'ac_maketemp="${MAKE}"'
1039EOF
1040# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1041eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1042if test -n "$ac_maketemp"; then
1043 eval ac_cv_prog_make_${ac_make}_set=yes
1044else
1045 eval ac_cv_prog_make_${ac_make}_set=no
1046fi
1047rm -f conftestmake
1048fi
1049if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1050 echo "$ac_t""yes" 1>&6
1051 SET_MAKE=
1052else
1053 echo "$ac_t""no" 1>&6
1054 SET_MAKE="MAKE=${MAKE-make}"
1055fi
1056
1057
aa13d30d 1058enable_shared=no
c0734708
ILT
1059# Extract the first word of "ranlib", so it can be a program name with args.
1060set dummy ranlib; ac_word=$2
1061echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
aa13d30d 1062echo "configure:1063: checking for $ac_word" >&5
c0734708
ILT
1063if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1064 echo $ac_n "(cached) $ac_c" 1>&6
1065else
1066 if test -n "$RANLIB"; then
1067 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1068else
1069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1070 for ac_dir in $PATH; do
1071 test -z "$ac_dir" && ac_dir=.
1072 if test -f $ac_dir/$ac_word; then
1073 ac_cv_prog_RANLIB="ranlib"
1074 break
1075 fi
1076 done
1077 IFS="$ac_save_ifs"
1078 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1079fi
1080fi
1081RANLIB="$ac_cv_prog_RANLIB"
1082if test -n "$RANLIB"; then
1083 echo "$ac_t""$RANLIB" 1>&6
1084else
1085 echo "$ac_t""no" 1>&6
1086fi
1087
1088# Check whether --with-gnu-ld or --without-gnu-ld was given.
1089if test "${with_gnu_ld+set}" = set; then
1090 withval="$with_gnu_ld"
1091 test "$withval" = no || with_gnu_ld=yes
1092else
1093 with_gnu_ld=no
1094fi
1095
1096if test "$with_gnu_ld" = yes; then
1097 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
aa13d30d 1098echo "configure:1099: checking for GNU ld" >&5
c0734708
ILT
1099else
1100 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
aa13d30d 1101echo "configure:1102: checking for non-GNU ld" >&5
c0734708
ILT
1102fi
1103if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1104 echo $ac_n "(cached) $ac_c" 1>&6
1105else
1106 case "$LD" in
1107 /*)
1108 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1109 ;;
1110 *)
1111 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1112 for ac_dir in $PATH; do
1113 test -z "$ac_dir" && ac_dir=.
1114 if test -f "$ac_dir/ld"; then
1115 ac_cv_path_LD="$ac_dir/ld"
1116 # Check to see if the program is GNU ld. I'd rather use --version,
1117 # but apparently some GNU ld's only accept -v.
1118 # Break only if it was the GNU/non-GNU ld that we prefer.
1119 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
1120 test "$with_gnu_ld" = yes && break
1121 else
1122 test "$with_gnu_ld" != yes && break
1123 fi
1124 fi
1125 done
1126 IFS="$ac_save_ifs"
1127 ;;
1128esac
1129fi
1130
1131LD="$ac_cv_path_LD"
1132if test -n "$LD"; then
1133 echo "$ac_t""$LD" 1>&6
1134else
1135 echo "$ac_t""no" 1>&6
1136fi
1137test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1138
1139echo $ac_n "checking whether we are using GNU ld""... $ac_c" 1>&6
aa13d30d 1140echo "configure:1141: checking whether we are using GNU ld" >&5
c0734708
ILT
1141if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1142 echo $ac_n "(cached) $ac_c" 1>&6
1143else
1144 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1145if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
1146 ac_cv_prog_gnu_ld=yes
1147else
1148 ac_cv_prog_gnu_ld=no
1149fi
1150fi
1151
1152echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1153
1154
1155echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
aa13d30d 1156echo "configure:1157: checking whether ln -s works" >&5
c0734708
ILT
1157if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1158 echo $ac_n "(cached) $ac_c" 1>&6
1159else
1160 rm -f conftestdata
1161if ln -s X conftestdata 2>/dev/null
1162then
1163 rm -f conftestdata
1164 ac_cv_prog_LN_S="ln -s"
1165else
1166 ac_cv_prog_LN_S=ln
1167fi
1168fi
1169LN_S="$ac_cv_prog_LN_S"
1170if test "$ac_cv_prog_LN_S" = "ln -s"; then
1171 echo "$ac_t""yes" 1>&6
1172else
1173 echo "$ac_t""no" 1>&6
1174fi
1175
1176
1177
1178
1179
1180
1181
1182# Always use our own libtool.
1183LIBTOOL='$(top_builddir)/libtool'
1184
1185
1186# Check whether --enable-shared or --disable-shared was given.
1187if test "${enable_shared+set}" = set; then
1188 enableval="$enable_shared"
aa13d30d
ILT
1189 if test "$enableval" = no; then
1190 enable_shared=no
c0734708 1191else
aa13d30d
ILT
1192 enable_shared=yes
1193fi
c0734708
ILT
1194fi
1195
aa13d30d
ILT
1196libtool_shared=
1197test "$enable_shared" = no && libtool_shared=" --disable-shared"
c0734708
ILT
1198
1199# Check whether --enable-static or --disable-static was given.
1200if test "${enable_static+set}" = set; then
1201 enableval="$enable_static"
aa13d30d
ILT
1202 if test "$enableval" = no; then
1203 enable_static=no
c0734708 1204else
aa13d30d
ILT
1205 enable_static=yes
1206fi
8c693660
KR
1207fi
1208
aa13d30d
ILT
1209libtool_static=
1210test "$enable_static" = no && libtool_static=" --disable-static"
8c693660 1211
c0734708
ILT
1212libtool_flags="$libtool_shared$libtool_static"
1213test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1214test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1215test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
8c693660 1216
c0734708
ILT
1217# Some flags need to be propagated to the compiler or linker for good
1218# libtool support.
1219case "$host" in
1220*-*-irix6*)
aa13d30d
ILT
1221 ac_save_CFLAGS="$CFLAGS"
1222 # -n32 always needs to be added to the linker when using GCC.
1223 test "$ac_cv_prog_gcc" = yes && CFLAGS="$CFLAGS -n32"
c0734708
ILT
1224 for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
1225 if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
1226 LD="${LD-ld} $f"
1227 fi
1228 done
aa13d30d 1229 CFLAGS="$ac_save_CFLAGS"
c0734708 1230 ;;
8c693660 1231
c0734708
ILT
1232*-*-sco3.2v5*)
1233 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1234 CFLAGS="$CFLAGS -belf"
1235 ;;
8c693660
KR
1236esac
1237
c0734708
ILT
1238# Actually configure libtool. ac_aux_dir is where install-sh is found.
1239CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1240LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \
1241${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1242$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1243|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
8c693660 1244
8c693660 1245
c0734708
ILT
1246# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
1247if test "${enable_64_bit_bfd+set}" = set; then
1248 enableval="$enable_64_bit_bfd"
1249 case "${enableval}" in
1250 yes) want64=true ;;
1251 no) want64=false ;;
1252 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
1253esac
1254else
1255 want64=false
1256fi
1257# Check whether --enable-targets or --disable-targets was given.
1258if test "${enable_targets+set}" = set; then
1259 enableval="$enable_targets"
1260 case "${enableval}" in
1261 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1262 ;;
1263 no) enable_targets= ;;
1264 *) enable_targets=$enableval ;;
1265esac
1266fi
1267# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1268if test "${enable_commonbfdlib+set}" = set; then
1269 enableval="$enable_commonbfdlib"
1270 case "${enableval}" in
1271 yes) commonbfdlib=true ;;
1272 no) commonbfdlib=false ;;
1273 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1274esac
1275fi
1276# Check whether --with-mmap or --without-mmap was given.
1277if test "${with_mmap+set}" = set; then
1278 withval="$with_mmap"
1279 case "${withval}" in
1280 yes) want_mmap=true ;;
1281 no) want_mmap=false ;;
1282 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
8c693660 1283esac
c0734708
ILT
1284else
1285 want_mmap=false
1286fi
1287
1288
8c693660 1289
8c693660 1290
8c693660
KR
1291
1292if test -z "$target" ; then
1293 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1294fi
1295if test "$program_transform_name" = s,x,x,; then
1296 program_transform_name=
1297else
d19df9b5
ILT
1298 # Double any \ or $. echo might interpret backslashes.
1299 cat <<\EOF_SED > conftestsed
1300s,\\,\\\\,g; s,\$,$$,g
1301EOF_SED
8c693660
KR
1302 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1303 rm -f conftestsed
1304fi
1305test "$program_prefix" != NONE &&
1306 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1307# Use a double $ so make ignores it.
1308test "$program_suffix" != NONE &&
1309 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1310
1311# sed with no file args requires a program.
1312test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1313
1314
c0734708 1315echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
aa13d30d 1316echo "configure:1317: checking whether to enable maintainer-specific portions of Makefiles" >&5
c0734708
ILT
1317 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1318if test "${enable_maintainer_mode+set}" = set; then
1319 enableval="$enable_maintainer_mode"
1320 USE_MAINTAINER_MODE=$enableval
1321else
1322 USE_MAINTAINER_MODE=no
1323fi
8c693660 1324
c0734708
ILT
1325 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1326 if test $USE_MAINTAINER_MODE = yes; then
1327 MAINT=
44f795f7 1328 else
c0734708 1329 MAINT='#M#'
44f795f7 1330 fi
c0734708
ILT
1331
1332
1333echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
aa13d30d 1334echo "configure:1335: checking for Cygwin32 environment" >&5
c0734708
ILT
1335if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1337else
1338 cat > conftest.$ac_ext <<EOF
aa13d30d 1339#line 1340 "configure"
c0734708
ILT
1340#include "confdefs.h"
1341
1342int main() {
1343int main () { return __CYGWIN32__; }
1344; return 0; }
1345EOF
aa13d30d 1346if { (eval echo configure:1347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c0734708
ILT
1347 rm -rf conftest*
1348 am_cv_cygwin32=yes
1349else
1350 echo "configure: failed program was:" >&5
1351 cat conftest.$ac_ext >&5
1352 rm -rf conftest*
1353 am_cv_cygwin32=no
1354fi
1355rm -f conftest*
1356rm -f conftest*
1357fi
1358
1359echo "$ac_t""$am_cv_cygwin32" 1>&6
1360CYGWIN32=
1361test "$am_cv_cygwin32" = yes && CYGWIN32=yes
70e8e585 1362
c0734708 1363echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
70e8e585 1364echo "configure:1365: checking for executable suffix" >&5
c0734708
ILT
1365if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
1366 echo $ac_n "(cached) $ac_c" 1>&6
1367else
1368 if test "$CYGWIN32" = yes; then
1369am_cv_exeext=.exe
1370else
1371cat > am_c_test.c << 'EOF'
1372int main() {
1373/* Nothing needed here */
1374}
1375EOF
1376${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
70e8e585 1377am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
c0734708
ILT
1378rm -f am_c_test*
1379fi
1380
1381test x"${am_cv_exeext}" = x && am_cv_exeext=no
44f795f7 1382fi
c0734708
ILT
1383EXEEXT=""
1384test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1385echo "$ac_t""${am_cv_exeext}" 1>&6
1386
1387
1388host64=false
1389target64=false
1390
1391# host stuff:
44f795f7 1392
85e493f0
ILT
1393# Extract the first word of "gcc", so it can be a program name with args.
1394set dummy gcc; ac_word=$2
1395echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
70e8e585 1396echo "configure:1397: checking for $ac_word" >&5
85e493f0
ILT
1397if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1398 echo $ac_n "(cached) $ac_c" 1>&6
1399else
1400 if test -n "$CC"; then
1401 ac_cv_prog_CC="$CC" # Let the user override the test.
1402else
1403 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1404 for ac_dir in $PATH; do
1405 test -z "$ac_dir" && ac_dir=.
1406 if test -f $ac_dir/$ac_word; then
1407 ac_cv_prog_CC="gcc"
1408 break
1409 fi
1410 done
1411 IFS="$ac_save_ifs"
85e493f0
ILT
1412fi
1413fi
1414CC="$ac_cv_prog_CC"
1415if test -n "$CC"; then
1416 echo "$ac_t""$CC" 1>&6
1417else
1418 echo "$ac_t""no" 1>&6
1419fi
1420
986cf3b8
ILT
1421if test -z "$CC"; then
1422 # Extract the first word of "cc", so it can be a program name with args.
1423set dummy cc; ac_word=$2
1424echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
70e8e585 1425echo "configure:1426: checking for $ac_word" >&5
986cf3b8
ILT
1426if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1427 echo $ac_n "(cached) $ac_c" 1>&6
1428else
1429 if test -n "$CC"; then
1430 ac_cv_prog_CC="$CC" # Let the user override the test.
1431else
1432 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1433 ac_prog_rejected=no
1434 for ac_dir in $PATH; do
1435 test -z "$ac_dir" && ac_dir=.
1436 if test -f $ac_dir/$ac_word; then
1437 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1438 ac_prog_rejected=yes
1439 continue
1440 fi
1441 ac_cv_prog_CC="cc"
1442 break
1443 fi
1444 done
1445 IFS="$ac_save_ifs"
1446if test $ac_prog_rejected = yes; then
1447 # We found a bogon in the path, so make sure we never use it.
1448 set dummy $ac_cv_prog_CC
1449 shift
1450 if test $# -gt 0; then
1451 # We chose a different compiler from the bogus one.
1452 # However, it has the same basename, so the bogon will be chosen
1453 # first if we set CC to just the basename; use the full file name.
1454 shift
1455 set dummy "$ac_dir/$ac_word" "$@"
1456 shift
1457 ac_cv_prog_CC="$@"
1458 fi
1459fi
1460fi
1461fi
1462CC="$ac_cv_prog_CC"
1463if test -n "$CC"; then
1464 echo "$ac_t""$CC" 1>&6
1465else
1466 echo "$ac_t""no" 1>&6
1467fi
1468
1469 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1470fi
f515fb2f 1471
ac388f2a 1472echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
70e8e585 1473echo "configure:1474: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac388f2a
ILT
1474
1475ac_ext=c
1476# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1477ac_cpp='$CPP $CPPFLAGS'
1478ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1479ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1480cross_compiling=$ac_cv_prog_cc_cross
1481
1482cat > conftest.$ac_ext <<EOF
70e8e585 1483#line 1484 "configure"
ac388f2a
ILT
1484#include "confdefs.h"
1485main(){return(0);}
1486EOF
70e8e585 1487if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac388f2a
ILT
1488 ac_cv_prog_cc_works=yes
1489 # If we can't run a trivial program, we are probably using a cross compiler.
1490 if (./conftest; exit) 2>/dev/null; then
1491 ac_cv_prog_cc_cross=no
1492 else
1493 ac_cv_prog_cc_cross=yes
1494 fi
1495else
1496 echo "configure: failed program was:" >&5
1497 cat conftest.$ac_ext >&5
1498 ac_cv_prog_cc_works=no
1499fi
1500rm -fr conftest*
1501
1502echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1503if test $ac_cv_prog_cc_works = no; then
1504 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1505fi
1506echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
70e8e585 1507echo "configure:1508: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
ac388f2a
ILT
1508echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1509cross_compiling=$ac_cv_prog_cc_cross
1510
85e493f0 1511echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
70e8e585 1512echo "configure:1513: checking whether we are using GNU C" >&5
85e493f0
ILT
1513if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.c <<EOF
f515fb2f
ILT
1517#ifdef __GNUC__
1518 yes;
1519#endif
1520EOF
70e8e585 1521if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
85e493f0
ILT
1522 ac_cv_prog_gcc=yes
1523else
1524 ac_cv_prog_gcc=no
1525fi
1526fi
1527
1528echo "$ac_t""$ac_cv_prog_gcc" 1>&6
ac388f2a 1529
85e493f0 1530if test $ac_cv_prog_gcc = yes; then
f515fb2f 1531 GCC=yes
ac388f2a
ILT
1532 ac_test_CFLAGS="${CFLAGS+set}"
1533 ac_save_CFLAGS="$CFLAGS"
1534 CFLAGS=
1535 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
70e8e585 1536echo "configure:1537: checking whether ${CC-cc} accepts -g" >&5
ac388f2a 1537if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
85e493f0
ILT
1538 echo $ac_n "(cached) $ac_c" 1>&6
1539else
1540 echo 'void f(){}' > conftest.c
1541if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac388f2a 1542 ac_cv_prog_cc_g=yes
85e493f0 1543else
ac388f2a 1544 ac_cv_prog_cc_g=no
85e493f0
ILT
1545fi
1546rm -f conftest*
1547
1548fi
1549
ac388f2a
ILT
1550echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1551 if test "$ac_test_CFLAGS" = set; then
1552 CFLAGS="$ac_save_CFLAGS"
1553 elif test $ac_cv_prog_cc_g = yes; then
1554 CFLAGS="-g -O2"
1555 else
1556 CFLAGS="-O2"
f515fb2f
ILT
1557 fi
1558else
1559 GCC=
1560 test "${CFLAGS+set}" = set || CFLAGS="-g"
1561fi
f515fb2f
ILT
1562
1563
55626bf0
ILT
1564# Permit host specific settings.
1565. ${srcdir}/configure.host
1566
f515fb2f 1567
986cf3b8
ILT
1568if test $host != $build; then
1569 ac_tool_prefix=${host_alias}-
1570else
1571 ac_tool_prefix=
1572fi
1573
1574# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1575set dummy ${ac_tool_prefix}ar; ac_word=$2
6a468850 1576echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
70e8e585 1577echo "configure:1578: checking for $ac_word" >&5
6a468850
ILT
1578if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1579 echo $ac_n "(cached) $ac_c" 1>&6
1580else
1581 if test -n "$AR"; then
1582 ac_cv_prog_AR="$AR" # Let the user override the test.
1583else
1584 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1585 for ac_dir in $PATH; do
1586 test -z "$ac_dir" && ac_dir=.
1587 if test -f $ac_dir/$ac_word; then
986cf3b8 1588 ac_cv_prog_AR="${ac_tool_prefix}ar"
6a468850
ILT
1589 break
1590 fi
1591 done
1592 IFS="$ac_save_ifs"
986cf3b8 1593 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
6a468850
ILT
1594fi
1595fi
1596AR="$ac_cv_prog_AR"
1597if test -n "$AR"; then
1598 echo "$ac_t""$AR" 1>&6
1599else
1600 echo "$ac_t""no" 1>&6
1601fi
f515fb2f 1602
986cf3b8
ILT
1603
1604
1605# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1606set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1607echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
70e8e585 1608echo "configure:1609: checking for $ac_word" >&5
986cf3b8
ILT
1609if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1610 echo $ac_n "(cached) $ac_c" 1>&6
1611else
1612 if test -n "$RANLIB"; then
1613 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1614else
1615 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1616 for ac_dir in $PATH; do
1617 test -z "$ac_dir" && ac_dir=.
1618 if test -f $ac_dir/$ac_word; then
1619 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1620 break
1621 fi
1622 done
1623 IFS="$ac_save_ifs"
1624fi
1625fi
1626RANLIB="$ac_cv_prog_RANLIB"
1627if test -n "$RANLIB"; then
1628 echo "$ac_t""$RANLIB" 1>&6
1629else
1630 echo "$ac_t""no" 1>&6
1631fi
1632
1633
1634if test -z "$ac_cv_prog_RANLIB"; then
1635if test -n "$ac_tool_prefix"; then
1636 # Extract the first word of "ranlib", so it can be a program name with args.
8c693660
KR
1637set dummy ranlib; ac_word=$2
1638echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
70e8e585 1639echo "configure:1640: checking for $ac_word" >&5
8c693660
KR
1640if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1641 echo $ac_n "(cached) $ac_c" 1>&6
1642else
1643 if test -n "$RANLIB"; then
1644 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1645else
1646 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1647 for ac_dir in $PATH; do
1648 test -z "$ac_dir" && ac_dir=.
1649 if test -f $ac_dir/$ac_word; then
1650 ac_cv_prog_RANLIB="ranlib"
1651 break
1652 fi
1653 done
1654 IFS="$ac_save_ifs"
1655 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1656fi
1657fi
1658RANLIB="$ac_cv_prog_RANLIB"
1659if test -n "$RANLIB"; then
1660 echo "$ac_t""$RANLIB" 1>&6
1661else
1662 echo "$ac_t""no" 1>&6
1663fi
1664
986cf3b8
ILT
1665else
1666 RANLIB=":"
1667fi
1668fi
1669
8c693660 1670
5e377ed2 1671test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
8c693660
KR
1672
1673
f4e14cb9
ILT
1674BFD_HOST_64BIT_LONG=0
1675BFD_HOST_64_BIT_DEFINED=0
1676BFD_HOST_64_BIT=
1677BFD_HOST_U_64_BIT=
b7577823 1678if test "x${HOST_64BIT_TYPE}" = "xlong"; then
f4e14cb9
ILT
1679 BFD_HOST_64BIT_LONG=1
1680elif test "x${HOST_64BIT_TYPE}" != "x"; then
1681 BFD_HOST_64_BIT_DEFINED=1
1682 BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
1683 BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
b7577823
ILT
1684fi
1685
1686
f4e14cb9
ILT
1687
1688
1689
b7577823 1690# Put a plausible default for CC_FOR_BUILD in Makefile.
6a468850
ILT
1691if test -z "$CC_FOR_BUILD"; then
1692 if test "x$cross_compiling" = "xno"; then
1693 CC_FOR_BUILD='$(CC)'
1694 else
1695 CC_FOR_BUILD=gcc
1696 fi
8c693660
KR
1697fi
1698
f515fb2f 1699
b7577823 1700echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
70e8e585 1701echo "configure:1702: checking how to run the C preprocessor" >&5
b7577823
ILT
1702# On Suns, sometimes $CPP names a directory.
1703if test -n "$CPP" && test -d "$CPP"; then
1704 CPP=
1705fi
1706if test -z "$CPP"; then
1707if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1708 echo $ac_n "(cached) $ac_c" 1>&6
1709else
1710 # This must be in double quotes, not single quotes, because CPP may get
1711 # substituted into the Makefile and "${CC-cc}" will confuse make.
1712 CPP="${CC-cc} -E"
1713 # On the NeXT, cc -E runs the code through the compiler's parser,
1714 # not just through cpp.
1715 cat > conftest.$ac_ext <<EOF
70e8e585 1716#line 1717 "configure"
b7577823
ILT
1717#include "confdefs.h"
1718#include <assert.h>
1719Syntax Error
1720EOF
986cf3b8 1721ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
70e8e585 1722{ (eval echo configure:1723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1723ac_err=`grep -v '^ *+' conftest.out`
1724if test -z "$ac_err"; then
1725 :
1726else
1727 echo "$ac_err" >&5
ac388f2a
ILT
1728 echo "configure: failed program was:" >&5
1729 cat conftest.$ac_ext >&5
b7577823
ILT
1730 rm -rf conftest*
1731 CPP="${CC-cc} -E -traditional-cpp"
1732 cat > conftest.$ac_ext <<EOF
70e8e585 1733#line 1734 "configure"
b7577823
ILT
1734#include "confdefs.h"
1735#include <assert.h>
1736Syntax Error
1737EOF
986cf3b8 1738ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
70e8e585 1739{ (eval echo configure:1740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1740ac_err=`grep -v '^ *+' conftest.out`
1741if test -z "$ac_err"; then
1742 :
1743else
1744 echo "$ac_err" >&5
ac388f2a
ILT
1745 echo "configure: failed program was:" >&5
1746 cat conftest.$ac_ext >&5
b7577823
ILT
1747 rm -rf conftest*
1748 CPP=/lib/cpp
1749fi
1750rm -f conftest*
1751fi
1752rm -f conftest*
1753 ac_cv_prog_CPP="$CPP"
1754fi
1755 CPP="$ac_cv_prog_CPP"
1756else
1757 ac_cv_prog_CPP="$CPP"
1758fi
1759echo "$ac_t""$CPP" 1>&6
1760
1761for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
1762do
ac388f2a 1763ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
b7577823 1764echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
70e8e585 1765echo "configure:1766: checking for $ac_hdr" >&5
b7577823
ILT
1766if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1767 echo $ac_n "(cached) $ac_c" 1>&6
1768else
1769 cat > conftest.$ac_ext <<EOF
70e8e585 1770#line 1771 "configure"
b7577823
ILT
1771#include "confdefs.h"
1772#include <$ac_hdr>
1773EOF
986cf3b8 1774ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
70e8e585 1775{ (eval echo configure:1776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1776ac_err=`grep -v '^ *+' conftest.out`
1777if test -z "$ac_err"; then
1778 rm -rf conftest*
1779 eval "ac_cv_header_$ac_safe=yes"
1780else
1781 echo "$ac_err" >&5
ac388f2a
ILT
1782 echo "configure: failed program was:" >&5
1783 cat conftest.$ac_ext >&5
b7577823
ILT
1784 rm -rf conftest*
1785 eval "ac_cv_header_$ac_safe=no"
1786fi
1787rm -f conftest*
1788fi
1789if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1790 echo "$ac_t""yes" 1>&6
ac388f2a 1791 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
b7577823
ILT
1792 cat >> confdefs.h <<EOF
1793#define $ac_tr_hdr 1
1794EOF
1795
1796else
1797 echo "$ac_t""no" 1>&6
1798fi
1799done
1800
ab1aa5cd 1801for ac_hdr in fcntl.h sys/file.h sys/time.h
b7577823 1802do
ac388f2a 1803ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
b7577823 1804echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
70e8e585 1805echo "configure:1806: checking for $ac_hdr" >&5
b7577823
ILT
1806if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
1808else
1809 cat > conftest.$ac_ext <<EOF
70e8e585 1810#line 1811 "configure"
b7577823
ILT
1811#include "confdefs.h"
1812#include <$ac_hdr>
1813EOF
986cf3b8 1814ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
70e8e585 1815{ (eval echo configure:1816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1816ac_err=`grep -v '^ *+' conftest.out`
1817if test -z "$ac_err"; then
1818 rm -rf conftest*
1819 eval "ac_cv_header_$ac_safe=yes"
1820else
1821 echo "$ac_err" >&5
ac388f2a
ILT
1822 echo "configure: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
b7577823
ILT
1824 rm -rf conftest*
1825 eval "ac_cv_header_$ac_safe=no"
1826fi
1827rm -f conftest*
1828fi
1829if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1830 echo "$ac_t""yes" 1>&6
ac388f2a 1831 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
b7577823
ILT
1832 cat >> confdefs.h <<EOF
1833#define $ac_tr_hdr 1
1834EOF
1835
1836else
1837 echo "$ac_t""no" 1>&6
1838fi
1839done
1840
ab1aa5cd 1841echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
70e8e585 1842echo "configure:1843: checking whether time.h and sys/time.h may both be included" >&5
ab1aa5cd
FF
1843if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
1845else
1846 cat > conftest.$ac_ext <<EOF
70e8e585 1847#line 1848 "configure"
ab1aa5cd
FF
1848#include "confdefs.h"
1849#include <sys/types.h>
1850#include <sys/time.h>
1851#include <time.h>
ac388f2a 1852int main() {
ab1aa5cd
FF
1853struct tm *tp;
1854; return 0; }
1855EOF
70e8e585 1856if { (eval echo configure:1857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
ab1aa5cd
FF
1857 rm -rf conftest*
1858 ac_cv_header_time=yes
1859else
ac388f2a
ILT
1860 echo "configure: failed program was:" >&5
1861 cat conftest.$ac_ext >&5
ab1aa5cd
FF
1862 rm -rf conftest*
1863 ac_cv_header_time=no
1864fi
1865rm -f conftest*
ab1aa5cd
FF
1866fi
1867
1868echo "$ac_t""$ac_cv_header_time" 1>&6
1869if test $ac_cv_header_time = yes; then
1870 cat >> confdefs.h <<\EOF
1871#define TIME_WITH_SYS_TIME 1
1872EOF
1873
1874fi
1875
60f1ad85 1876for ac_func in fcntl getpagesize setitimer sysconf fdopen
b7577823
ILT
1877do
1878echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
70e8e585 1879echo "configure:1880: checking for $ac_func" >&5
b7577823
ILT
1880if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1881 echo $ac_n "(cached) $ac_c" 1>&6
1882else
1883 cat > conftest.$ac_ext <<EOF
70e8e585 1884#line 1885 "configure"
b7577823
ILT
1885#include "confdefs.h"
1886/* System header to define __stub macros and hopefully few prototypes,
1887 which can conflict with char $ac_func(); below. */
1888#include <assert.h>
1889/* Override any gcc2 internal prototype to avoid an error. */
a4322a77
ILT
1890/* We use char because int might match the return type of a gcc2
1891 builtin and then its argument prototype would still apply. */
85e493f0 1892char $ac_func();
b7577823 1893
ac388f2a 1894int main() {
b7577823
ILT
1895
1896/* The GNU C library defines this for functions which it implements
1897 to always fail with ENOSYS. Some functions are actually named
1898 something starting with __ and the normal name is an alias. */
1899#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1900choke me
1901#else
1902$ac_func();
1903#endif
1904
1905; return 0; }
1906EOF
70e8e585 1907if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b7577823
ILT
1908 rm -rf conftest*
1909 eval "ac_cv_func_$ac_func=yes"
1910else
ac388f2a
ILT
1911 echo "configure: failed program was:" >&5
1912 cat conftest.$ac_ext >&5
b7577823
ILT
1913 rm -rf conftest*
1914 eval "ac_cv_func_$ac_func=no"
1915fi
1916rm -f conftest*
fd8d7c31 1917fi
ac388f2a 1918
b7577823
ILT
1919if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1920 echo "$ac_t""yes" 1>&6
85e493f0 1921 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
b7577823
ILT
1922 cat >> confdefs.h <<EOF
1923#define $ac_tr_func 1
1924EOF
1925
1926else
1927 echo "$ac_t""no" 1>&6
1928fi
1929done
1930
1931
85e493f0 1932
b7577823 1933case "${host}" in
dfc7020d 1934i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
b7577823
ILT
1935 cat >> confdefs.h <<\EOF
1936#define USE_BINARY_FOPEN 1
1937EOF
1938 ;;
1939esac
1940
f7954d86 1941echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
70e8e585 1942echo "configure:1943: checking whether strstr must be declared" >&5
f7954d86
MM
1943if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
1944 echo $ac_n "(cached) $ac_c" 1>&6
1945else
1946 cat > conftest.$ac_ext <<EOF
70e8e585 1947#line 1948 "configure"
f7954d86
MM
1948#include "confdefs.h"
1949
1950#include <stdio.h>
1951#ifdef HAVE_STRING_H
1952#include <string.h>
1953#else
1954#ifdef HAVE_STRINGS_H
1955#include <strings.h>
1956#endif
1957#endif
1958#ifdef HAVE_STDLIB_H
1959#include <stdlib.h>
1960#endif
1961#ifdef HAVE_UNISTD_H
1962#include <unistd.h>
1963#endif
ac388f2a 1964int main() {
f7954d86
MM
1965char *(*pfn) = (char *(*)) strstr
1966; return 0; }
1967EOF
70e8e585 1968if { (eval echo configure:1969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f7954d86
MM
1969 rm -rf conftest*
1970 bfd_cv_decl_needed_strstr=no
1971else
ac388f2a
ILT
1972 echo "configure: failed program was:" >&5
1973 cat conftest.$ac_ext >&5
f7954d86
MM
1974 rm -rf conftest*
1975 bfd_cv_decl_needed_strstr=yes
1976fi
1977rm -f conftest*
f7954d86
MM
1978fi
1979
1980echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
1981if test $bfd_cv_decl_needed_strstr = yes; then
1982 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1983 cat >> confdefs.h <<EOF
1984#define $bfd_tr_decl 1
1985EOF
1986
1987fi
1988
b7577823 1989echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
70e8e585 1990echo "configure:1991: checking whether malloc must be declared" >&5
b7577823
ILT
1991if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
1992 echo $ac_n "(cached) $ac_c" 1>&6
1993else
1994 cat > conftest.$ac_ext <<EOF
70e8e585 1995#line 1996 "configure"
b7577823
ILT
1996#include "confdefs.h"
1997
1998#include <stdio.h>
f7954d86
MM
1999#ifdef HAVE_STRING_H
2000#include <string.h>
2001#else
2002#ifdef HAVE_STRINGS_H
2003#include <strings.h>
2004#endif
2005#endif
b7577823
ILT
2006#ifdef HAVE_STDLIB_H
2007#include <stdlib.h>
2008#endif
2009#ifdef HAVE_UNISTD_H
2010#include <unistd.h>
2011#endif
ac388f2a 2012int main() {
b7577823
ILT
2013char *(*pfn) = (char *(*)) malloc
2014; return 0; }
2015EOF
70e8e585 2016if { (eval echo configure:2017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b7577823
ILT
2017 rm -rf conftest*
2018 bfd_cv_decl_needed_malloc=no
2019else
ac388f2a
ILT
2020 echo "configure: failed program was:" >&5
2021 cat conftest.$ac_ext >&5
b7577823
ILT
2022 rm -rf conftest*
2023 bfd_cv_decl_needed_malloc=yes
2024fi
2025rm -f conftest*
b7577823
ILT
2026fi
2027
2028echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
2029if test $bfd_cv_decl_needed_malloc = yes; then
85e493f0
ILT
2030 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2031 cat >> confdefs.h <<EOF
2032#define $bfd_tr_decl 1
b7577823 2033EOF
f515fb2f 2034
2b79a104
ILT
2035fi
2036
f7954d86 2037echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
70e8e585 2038echo "configure:2039: checking whether realloc must be declared" >&5
f7954d86
MM
2039if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041else
2042 cat > conftest.$ac_ext <<EOF
70e8e585 2043#line 2044 "configure"
f7954d86
MM
2044#include "confdefs.h"
2045
2046#include <stdio.h>
2047#ifdef HAVE_STRING_H
2048#include <string.h>
2049#else
2050#ifdef HAVE_STRINGS_H
2051#include <strings.h>
2052#endif
2053#endif
2054#ifdef HAVE_STDLIB_H
2055#include <stdlib.h>
2056#endif
2057#ifdef HAVE_UNISTD_H
2058#include <unistd.h>
2059#endif
ac388f2a 2060int main() {
f7954d86
MM
2061char *(*pfn) = (char *(*)) realloc
2062; return 0; }
2063EOF
70e8e585 2064if { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f7954d86
MM
2065 rm -rf conftest*
2066 bfd_cv_decl_needed_realloc=no
2067else
ac388f2a
ILT
2068 echo "configure: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
f7954d86
MM
2070 rm -rf conftest*
2071 bfd_cv_decl_needed_realloc=yes
2072fi
2073rm -f conftest*
f7954d86
MM
2074fi
2075
2076echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
2077if test $bfd_cv_decl_needed_realloc = yes; then
2078 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2079 cat >> confdefs.h <<EOF
2080#define $bfd_tr_decl 1
2081EOF
2082
2083fi
2084
b7577823 2085echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
70e8e585 2086echo "configure:2087: checking whether free must be declared" >&5
b7577823
ILT
2087if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
2088 echo $ac_n "(cached) $ac_c" 1>&6
2089else
2090 cat > conftest.$ac_ext <<EOF
70e8e585 2091#line 2092 "configure"
b7577823 2092#include "confdefs.h"
8c693660 2093
b7577823 2094#include <stdio.h>
f7954d86
MM
2095#ifdef HAVE_STRING_H
2096#include <string.h>
2097#else
2098#ifdef HAVE_STRINGS_H
2099#include <strings.h>
2100#endif
2101#endif
b7577823
ILT
2102#ifdef HAVE_STDLIB_H
2103#include <stdlib.h>
2104#endif
2105#ifdef HAVE_UNISTD_H
2106#include <unistd.h>
2107#endif
ac388f2a 2108int main() {
85e493f0 2109char *(*pfn) = (char *(*)) free
b7577823
ILT
2110; return 0; }
2111EOF
70e8e585 2112if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b7577823
ILT
2113 rm -rf conftest*
2114 bfd_cv_decl_needed_free=no
2115else
ac388f2a
ILT
2116 echo "configure: failed program was:" >&5
2117 cat conftest.$ac_ext >&5
b7577823
ILT
2118 rm -rf conftest*
2119 bfd_cv_decl_needed_free=yes
2120fi
2121rm -f conftest*
b7577823
ILT
2122fi
2123
2124echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
2125if test $bfd_cv_decl_needed_free = yes; then
85e493f0
ILT
2126 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2127 cat >> confdefs.h <<EOF
2128#define $bfd_tr_decl 1
b7577823
ILT
2129EOF
2130
2131fi
f515fb2f 2132
dee99794 2133echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
70e8e585 2134echo "configure:2135: checking whether getenv must be declared" >&5
dee99794
ILT
2135if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
2136 echo $ac_n "(cached) $ac_c" 1>&6
2137else
2138 cat > conftest.$ac_ext <<EOF
70e8e585 2139#line 2140 "configure"
dee99794
ILT
2140#include "confdefs.h"
2141
2142#include <stdio.h>
2143#ifdef HAVE_STRING_H
2144#include <string.h>
2145#else
2146#ifdef HAVE_STRINGS_H
2147#include <strings.h>
2148#endif
2149#endif
2150#ifdef HAVE_STDLIB_H
2151#include <stdlib.h>
2152#endif
2153#ifdef HAVE_UNISTD_H
2154#include <unistd.h>
2155#endif
ac388f2a 2156int main() {
dee99794
ILT
2157char *(*pfn) = (char *(*)) getenv
2158; return 0; }
2159EOF
70e8e585 2160if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
dee99794
ILT
2161 rm -rf conftest*
2162 bfd_cv_decl_needed_getenv=no
2163else
ac388f2a
ILT
2164 echo "configure: failed program was:" >&5
2165 cat conftest.$ac_ext >&5
dee99794
ILT
2166 rm -rf conftest*
2167 bfd_cv_decl_needed_getenv=yes
2168fi
2169rm -f conftest*
dee99794
ILT
2170fi
2171
2172echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
2173if test $bfd_cv_decl_needed_getenv = yes; then
2174 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2175 cat >> confdefs.h <<EOF
2176#define $bfd_tr_decl 1
2177EOF
2178
2179fi
2180
85e493f0 2181
a52a3ce8
ILT
2182# If we are configured native, pick a core file support file.
2183COREFILE=
2184COREFLAG=
2185if test "${target}" = "${host}"; then
2186 case "${host}" in
999cc186 2187 alpha*-*-linux*)
c0734708 2188 COREFILE=trad-core.lo
999cc186
ILT
2189 cat >> confdefs.h <<\EOF
2190#define TRAD_HEADER "hosts/alphalinux.h"
2191EOF
2192
2193 ;;
c0734708
ILT
2194 alpha*-*-*) COREFILE=osf-core.lo ;;
2195 arm-*-riscix) COREFILE=trad-core.lo ;;
2196 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
2197 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
2198 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
a52a3ce8 2199 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
f7954d86 2200 i[3456]86-sequent-bsd*)
c0734708 2201 COREFILE=trad-core.lo;
b7577823
ILT
2202 cat >> confdefs.h <<\EOF
2203#define TRAD_HEADER "hosts/symmetry.h"
2204EOF
2205
2206 ;;
f7954d86
MM
2207 i[3456]86-sequent-sysv4*) ;;
2208 i[3456]86-sequent-sysv*)
c0734708 2209 COREFILE=trad-core.lo
b7577823
ILT
2210 cat >> confdefs.h <<\EOF
2211#define TRAD_HEADER "hosts/symmetry.h"
2212EOF
2213
2214 ;;
f7954d86 2215 i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
c0734708 2216 COREFILE=trad-core.lo
b7577823
ILT
2217 cat >> confdefs.h <<\EOF
2218#define TRAD_HEADER "hosts/i386bsd.h"
69a374c0
NH
2219EOF
2220
2221 ;;
3b1b0308 2222 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
c0734708 2223 COREFILE=netbsd-core.lo
b7577823 2224 ;;
f7954d86 2225 i[3456]86-esix-sysv3*)
c0734708 2226 COREFILE=trad-core.lo
b7577823
ILT
2227 cat >> confdefs.h <<\EOF
2228#define TRAD_HEADER "hosts/esix.h"
2229EOF
2230
2231 ;;
f7954d86 2232 i[3456]86-*-sco* | i[3456]86-*-isc*)
c0734708 2233 COREFILE=trad-core.lo
b7577823
ILT
2234 cat >> confdefs.h <<\EOF
2235#define TRAD_HEADER "hosts/i386sco.h"
2236EOF
2237
2238 ;;
f7954d86 2239 i[3456]86-*-mach3*)
c0734708 2240 COREFILE=trad-core.lo
b7577823
ILT
2241 cat >> confdefs.h <<\EOF
2242#define TRAD_HEADER "hosts/i386mach3.h"
2243EOF
2244
2245 ;;
f7954d86 2246 i[3456]86-*-linux*)
c0734708 2247 COREFILE=trad-core.lo
b7577823
ILT
2248 cat >> confdefs.h <<\EOF
2249#define TRAD_HEADER "hosts/i386linux.h"
2250EOF
2251
2252 ;;
c0734708
ILT
2253 i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
2254 i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
cf587de8 2255 i860-*-mach3* | i860-*-osf1*)
c0734708 2256 COREFILE=trad-core.lo
cf587de8
ILT
2257 cat >> confdefs.h <<\EOF
2258#define TRAD_HEADER "hosts/i860mach3.h"
2259EOF
2260
2261 ;;
b7577823 2262 mips-dec-bsd*)
c0734708 2263 COREFILE=trad-core.lo
b7577823
ILT
2264 cat >> confdefs.h <<\EOF
2265#define TRAD_HEADER "hosts/mipsbsd.h"
2266EOF
2267
2268 ;;
2269 mips-dec-mach3*)
c0734708 2270 COREFILE=trad-core.lo
b7577823
ILT
2271 cat >> confdefs.h <<\EOF
2272#define TRAD_HEADER "hosts/mipsmach3.h"
2273EOF
2274
2275 ;;
3b1b0308 2276 mips-*-netbsd* | mips*-*-openbsd*)
c0734708 2277 COREFILE=netbsd-core.lo
69a374c0 2278 ;;
b7577823 2279 mips-dec-*)
c0734708 2280 COREFILE=trad-core.lo
b7577823
ILT
2281 cat >> confdefs.h <<\EOF
2282#define TRAD_HEADER "hosts/decstation.h"
2283EOF
2284
2285 ;;
c0734708
ILT
2286 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
2287 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
2288 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
b7577823 2289 mips-*-mach3*)
c0734708 2290 COREFILE=trad-core.lo
b7577823
ILT
2291 cat >> confdefs.h <<\EOF
2292#define TRAD_HEADER "hosts/mipsmach3.h"
2293EOF
2294
2295 ;;
a52a3ce8 2296 mips-*-sysv4*) ;;
b7577823 2297 mips-*-sysv* | mips-*-riscos*)
c0734708 2298 COREFILE=trad-core.lo
b7577823
ILT
2299 cat >> confdefs.h <<\EOF
2300#define TRAD_HEADER "hosts/riscos.h"
2301EOF
2302
2303 ;;
2304 mips-sony-bsd*)
c0734708 2305 COREFILE=trad-core.lo
b7577823 2306 cat >> confdefs.h <<\EOF
ab1aa5cd 2307#define TRAD_HEADER "hosts/news-mips.h"
b7577823
ILT
2308EOF
2309
2310 ;;
2311 m68*-bull*-sysv*)
c0734708 2312 COREFILE=trad-core.lo
b7577823
ILT
2313 cat >> confdefs.h <<\EOF
2314#define TRAD_HEADER "hosts/dpx2.h"
2315EOF
2316
2317 ;;
c0734708 2318 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
b7577823 2319 m68*-hp-bsd*)
c0734708 2320 COREFILE=trad-core.lo
b7577823
ILT
2321 cat >> confdefs.h <<\EOF
2322#define TRAD_HEADER "hosts/hp300bsd.h"
55626bf0
ILT
2323EOF
2324
2325 ;;
2326 m68*-*-linux*)
c0734708 2327 COREFILE=trad-core.lo
55626bf0
ILT
2328 cat >> confdefs.h <<\EOF
2329#define TRAD_HEADER "hosts/m68klinux.h"
7f82c7e1
ILT
2330EOF
2331
2332 ;;
4c8b9746 2333 m68*-motorola-sysv*)
c0734708 2334 COREFILE=trad-core.lo
7f82c7e1
ILT
2335 cat >> confdefs.h <<\EOF
2336#define TRAD_HEADER "hosts/delta68.h"
b7577823
ILT
2337EOF
2338
2339 ;;
b7577823 2340 m68*-sony-*)
c0734708 2341 COREFILE=trad-core.lo
b7577823
ILT
2342 cat >> confdefs.h <<\EOF
2343#define TRAD_HEADER "hosts/news.h"
69a374c0
NH
2344EOF
2345
2346 ;;
3b1b0308 2347 m68*-*-netbsd* | m68*-*-openbsd*)
c0734708 2348 COREFILE=netbsd-core.lo
d19df9b5
ILT
2349 ;;
2350 m68*-apple-aux*)
c0734708 2351 COREFILE=trad-core.lo
d19df9b5
ILT
2352 cat >> confdefs.h <<\EOF
2353#define TRAD_HEADER "hosts/m68kaux.h"
b7577823
ILT
2354EOF
2355
2356 ;;
a52a3ce8 2357 m88*-*-sysv4*) ;;
c0734708 2358 m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
b7577823 2359 m88*-*-mach3*)
c0734708 2360 COREFILE=trad-core.lo
b7577823
ILT
2361 cat >> confdefs.h <<\EOF
2362#define TRAD_HEADER "hosts/m88kmach3.h"
2363EOF
2364
2365 ;;
2366 ns32k-pc532-mach)
c0734708 2367 COREFILE=trad-core.lo
b7577823
ILT
2368 cat >> confdefs.h <<\EOF
2369#define TRAD_HEADER "hosts/pc532mach.h"
69a374c0
NH
2370EOF
2371
2372 ;;
3b1b0308 2373 ns32k-*-netbsd* | ns32k-*-openbsd*)
c0734708 2374 COREFILE=netbsd-core.lo
b7577823 2375 ;;
c0734708
ILT
2376 rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
2377 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
2378 rs6000-*-*) COREFILE=rs6000-core.lo ;;
2379 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
2380 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
2381 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
ac388f2a 2382 powerpc-*-beos*) ;;
3b1b0308 2383 sparc-*-netbsd* | sparc-*-openbsd*)
c0734708 2384 COREFILE=netbsd-core.lo
69a374c0 2385 ;;
b7577823 2386 tahoe-*-*)
c0734708 2387 COREFILE=trad-core.lo
b7577823
ILT
2388 cat >> confdefs.h <<\EOF
2389#define TRAD_HEADER "hosts/tahoe.h"
2390EOF
2391
2392 ;;
2393 vax-*-ultrix2*)
c0734708 2394 COREFILE=trad-core.lo
b7577823
ILT
2395 cat >> confdefs.h <<\EOF
2396#define TRAD_HEADER "hosts/vaxult2.h"
2397EOF
2398
2399 ;;
2400 vax-*-ultrix*)
c0734708 2401 COREFILE=trad-core.lo
b7577823
ILT
2402 cat >> confdefs.h <<\EOF
2403#define TRAD_HEADER "hosts/vaxult2.h"
2404EOF
2405
2406 ;;
2407 vax-*-*)
c0734708 2408 COREFILE=trad-core.lo
b7577823
ILT
2409 cat >> confdefs.h <<\EOF
2410#define TRAD_HEADER "hosts/vaxbsd.h"
2411EOF
2412
2413 ;;
a52a3ce8
ILT
2414 esac
2415
2416 case "$COREFILE" in
c0734708
ILT
2417 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
2418 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
2419 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
2420 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
2421 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
2422 osf-core.lo) COREFLAG=-DOSF_CORE ;;
2423 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
2424 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
2425 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
a52a3ce8 2426 esac
1dff7902
ILT
2427
2428 # The ELF code uses the native <sys/procfs.h> to handle core files.
2429 # Define HAVE_SYS_PROCFS_H if the file exists and defines
2430 # prstatus_t.
2431 echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
70e8e585 2432echo "configure:2433: checking for sys/procfs.h" >&5
1dff7902
ILT
2433 if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
2434 echo $ac_n "(cached) $ac_c" 1>&6
2435else
2436 cat > conftest.$ac_ext <<EOF
70e8e585 2437#line 2438 "configure"
1dff7902
ILT
2438#include "confdefs.h"
2439#include <sys/procfs.h>
ac388f2a 2440int main() {
1dff7902
ILT
2441prstatus_t t;
2442; return 0; }
2443EOF
70e8e585 2444if { (eval echo configure:2445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1dff7902
ILT
2445 rm -rf conftest*
2446 bfd_cv_header_sys_procfs_h=yes
2447else
ac388f2a
ILT
2448 echo "configure: failed program was:" >&5
2449 cat conftest.$ac_ext >&5
1dff7902
ILT
2450 rm -rf conftest*
2451 bfd_cv_header_sys_procfs_h=no
2452fi
2453rm -f conftest*
1dff7902
ILT
2454fi
2455
2456 echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
2457 if test $bfd_cv_header_sys_procfs_h = yes; then
2458 cat >> confdefs.h <<\EOF
2459#define HAVE_SYS_PROCFS_H 1
2460EOF
2461
2462 fi
2463
a52a3ce8
ILT
2464fi
2465
2466
2467
8c693660
KR
2468# target stuff:
2469
2470# Canonicalize the secondary target names.
2471if test -n "$enable_targets" ; then
2472 for targ in `echo $enable_targets | sed 's/,/ /g'`
2473 do
60f1ad85 2474 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
8c693660
KR
2475 if test -n "$result" ; then
2476 canon_targets="$canon_targets $result"
2477 else
2478 # Allow targets that config.sub doesn't recognize, like "all".
2479 canon_targets="$canon_targets $targ"
2480 fi
2481 done
2482fi
2483
2484all_targets=false
2b79a104
ILT
2485defvec=
2486selvecs=
2487selarchs=
2488TDEFINES=
8c693660
KR
2489for targ in $target $canon_targets
2490do
2b79a104 2491 if test "x$targ" = "xall"; then
8c693660
KR
2492 all_targets=true
2493 else
2b79a104
ILT
2494 . $srcdir/config.bfd
2495 if test "x$targ" = "x$target"; then
2496 defvec=$targ_defvec
8c693660 2497 fi
2b79a104
ILT
2498 selvecs="$selvecs $targ_defvec $targ_selvecs"
2499 selarchs="$selarchs $targ_archs"
2500 TDEFINES="$TDEFINES $targ_cflags"
8c693660
KR
2501 fi
2502done
2503
8c693660
KR
2504
2505# This processing still needs to be done if we're to decide properly whether
2506# 64-bit support needs to be compiled in. Currently, it will be included if
2507# the default or any other explicitly requested target requires it; it
2508# will not be included on a 32-bit host if no 64-bit target is requested, and
2509# no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
2510# used.
2511
2b79a104 2512# uniq the default and selected vectors in all the configured targets.
8c693660 2513f=""
2b79a104 2514for i in $selvecs ; do
8c693660
KR
2515 case " $f " in
2516 *" $i "*) ;;
2517 *) f="$f $i" ;;
2518 esac
2519done
2b79a104 2520selvecs="$f"
8c693660 2521
2b79a104 2522# uniq the architectures in all the configured targets.
8c693660 2523f=""
2b79a104 2524for i in $selarchs ; do
8c693660
KR
2525 case " $f " in
2526 *" $i "*) ;;
2527 *) f="$f $i" ;;
2528 esac
2529done
2b79a104 2530selarchs="$f"
8c693660
KR
2531
2532# Target backend .o files.
2533tb=
2534
c0734708 2535elf="elf.lo elflink.lo"
a52a3ce8 2536
2b79a104 2537for vec in $selvecs
8c693660
KR
2538do
2539 case "$vec" in
2540 # This list is alphabetized to make it easy to compare
2541 # with the two vector lists in targets.c.
c0734708
ILT
2542 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
2543 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
2544 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
2545 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
2546 armpe_little_vec) tb="$tb pe-arm.lo cofflink.lo " ;;
2547 armpe_big_vec) tb="$tb pe-arm.lo cofflink.lo " ;;
2548 armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
2549 armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
2550 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
2551 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
2552 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
2553 aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
2554 aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
2555 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
2556 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
2557 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
2558 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
50bd50d4 2559 target64=true ;;
c0734708
ILT
2560 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
2561 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
c0734708
ILT
2562 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
2563 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
2564 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
d1bf45aa 2565 target64=true ;;
c0734708 2566 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
fd8d7c31 2567# start-sanitize-d30v
c0734708 2568 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
fd8d7c31 2569# end-sanitize-d30v
c0734708
ILT
2570 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
2571 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
2572 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
2573 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
2574 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
2575 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
d1bf45aa 2576 target64=true ;;
c0734708
ILT
2577 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
2578 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
2579 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
2580 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
2581 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
2582 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
2583 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
2584 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
2585 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
2586 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
f7954d86 2587# start-sanitize-v850
c0734708 2588 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
f7954d86 2589# end-sanitize-v850
c0734708 2590 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
8c693660 2591 target64=true ;;
c0734708 2592 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
8c693660 2593 target64=true ;;
c0734708 2594 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
8c693660 2595 target64=true ;;
c0734708
ILT
2596 cisco_core_vec) tb="$tb cisco-core.lo" ;;
2597 demo_64_vec) tb="$tb demo64.lo aout64.lo"
8c693660 2598 target64=true ;;
c0734708
ILT
2599 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
2600 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
2601 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
2602 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
8c693660 2603 target64=true ;;
c0734708 2604 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
70e8e585 2605 go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
c0734708 2606 evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
50bd50d4 2607 target64=true ;;
c0734708
ILT
2608 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
2609 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
2610 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
2611 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
2612 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
2613 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
2614 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
2615 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
2616 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
2617 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
2618 i386msdos_vec) tb="$tb i386msdos.lo" ;;
2619 i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
2620 i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
2621 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
2622 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
2623 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
2624 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
2625 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
2626 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
2627 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
2628 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
2629 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
2630 ieee_vec) tb="$tb ieee.lo" ;;
2631 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
2632 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
2633 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
2634 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
2635 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
2636 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
2637 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
2638 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
2639 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
2640 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
2641 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
2642 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
2643 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
2644 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
8c693660 2645 target64=true ;;
c0734708
ILT
2646 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
2647 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
2648 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
2649 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
2650 pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
2651 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
2652 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
2653 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
2654 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
2655 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
2656 ppcboot_vec) tb="$tb ppcboot.lo" ;;
2657 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
2658 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
2659 som_vec) tb="$tb som.lo" ;;
2660 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
2661 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo stab-syms.lo" ;;
2662 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
2663 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
2664 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
2665 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
2666 srec_vec) tb="$tb srec.lo" ;;
2667 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
2668 symbolsrec_vec) tb="$tb srec.lo" ;;
2669 tekhex_vec) tb="$tb tekhex.lo" ;;
cd6213ff 2670# start-sanitize-tic80
c0734708 2671 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
cd6213ff 2672# end-sanitize-tic80
c0734708
ILT
2673 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
2674 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
2675 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
2676 versados_vec) tb="$tb versados.lo" ;;
8c693660
KR
2677
2678 "") ;;
2679 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
2680 esac
2681done
2682
2683# Target architecture .o files.
b872076e
ILT
2684# A couple of CPUs use shorter file names to avoid problems on DOS
2685# filesystems.
c0734708 2686ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
8c693660
KR
2687
2688# Weed out duplicate .o files.
2689f=""
2690for i in $tb ; do
2691 case " $f " in
2692 *" $i "*) ;;
2693 *) f="$f $i" ;;
2694 esac
2695done
2696tb="$f"
2697
2698f=""
2699for i in $ta ; do
2700 case " $f " in
2701 *" $i "*) ;;
2702 *) f="$f $i" ;;
2703 esac
2704done
2705ta="$f"
2706
2707bfd_backends="$tb"
2708bfd_machines="$ta"
2709
2710if test x${all_targets} = xtrue ; then
2711 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
2712 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
2b79a104 2713 selvecs=
dee99794 2714 havevecs=
2b79a104 2715 selarchs=
8c693660
KR
2716else # all_targets is true
2717 # Only set these if they will be nonempty, for the clever echo.
dee99794
ILT
2718 havevecs=
2719 test -n "$selvecs" &&
2720 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
2b79a104
ILT
2721 test -n "$selvecs" &&
2722 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
2723 test -n "$selarchs" &&
2ffbb79a 2724 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
8c693660
KR
2725fi # all_targets is true
2726
2727case ${host64}-${target64}-${want64} in
2728 *true*)
2729 wordsize=64
2730 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
194141a9 2731 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
50bd50d4
MH
2732 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
2733 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
2734 fi
8c693660
KR
2735 ;;
2736 false-false-false)
2737 wordsize=32
2738 all_backends='$(BFD32_BACKENDS)'
2739 ;;
2740esac
2741
2742
2743
2744
2745
2746
8c693660
KR
2747tdefaults=""
2748test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
2749test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
2750test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
dee99794 2751test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
8c693660
KR
2752
2753
ac388f2a
ILT
2754for ac_hdr in unistd.h
2755do
2756ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2757echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
70e8e585 2758echo "configure:2759: checking for $ac_hdr" >&5
ac388f2a 2759if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
dfc7020d
ILT
2760 echo $ac_n "(cached) $ac_c" 1>&6
2761else
ac388f2a 2762 cat > conftest.$ac_ext <<EOF
70e8e585 2763#line 2764 "configure"
dfc7020d 2764#include "confdefs.h"
ac388f2a 2765#include <$ac_hdr>
dfc7020d 2766EOF
ac388f2a 2767ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
70e8e585 2768{ (eval echo configure:2769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac388f2a
ILT
2769ac_err=`grep -v '^ *+' conftest.out`
2770if test -z "$ac_err"; then
2771 rm -rf conftest*
2772 eval "ac_cv_header_$ac_safe=yes"
dfc7020d 2773else
ac388f2a
ILT
2774 echo "$ac_err" >&5
2775 echo "configure: failed program was:" >&5
2776 cat conftest.$ac_ext >&5
2777 rm -rf conftest*
2778 eval "ac_cv_header_$ac_safe=no"
dfc7020d 2779fi
ac388f2a 2780rm -f conftest*
dfc7020d 2781fi
ac388f2a
ILT
2782if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2783 echo "$ac_t""yes" 1>&6
2784 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2785 cat >> confdefs.h <<EOF
2786#define $ac_tr_hdr 1
2787EOF
2788
2789else
2790 echo "$ac_t""no" 1>&6
dfc7020d 2791fi
ac388f2a 2792done
dfc7020d 2793
ac388f2a 2794for ac_func in getpagesize
d19df9b5
ILT
2795do
2796echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
70e8e585 2797echo "configure:2798: checking for $ac_func" >&5
d19df9b5
ILT
2798if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2799 echo $ac_n "(cached) $ac_c" 1>&6
2800else
2801 cat > conftest.$ac_ext <<EOF
70e8e585 2802#line 2803 "configure"
d19df9b5
ILT
2803#include "confdefs.h"
2804/* System header to define __stub macros and hopefully few prototypes,
2805 which can conflict with char $ac_func(); below. */
2806#include <assert.h>
2807/* Override any gcc2 internal prototype to avoid an error. */
a4322a77
ILT
2808/* We use char because int might match the return type of a gcc2
2809 builtin and then its argument prototype would still apply. */
d19df9b5
ILT
2810char $ac_func();
2811
ac388f2a 2812int main() {
d19df9b5
ILT
2813
2814/* The GNU C library defines this for functions which it implements
2815 to always fail with ENOSYS. Some functions are actually named
2816 something starting with __ and the normal name is an alias. */
2817#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2818choke me
2819#else
2820$ac_func();
2821#endif
2822
2823; return 0; }
2824EOF
70e8e585 2825if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
d19df9b5
ILT
2826 rm -rf conftest*
2827 eval "ac_cv_func_$ac_func=yes"
2828else
ac388f2a
ILT
2829 echo "configure: failed program was:" >&5
2830 cat conftest.$ac_ext >&5
d19df9b5
ILT
2831 rm -rf conftest*
2832 eval "ac_cv_func_$ac_func=no"
2833fi
2834rm -f conftest*
fd8d7c31 2835fi
ac388f2a 2836
d19df9b5
ILT
2837if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2838 echo "$ac_t""yes" 1>&6
2839 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2840 cat >> confdefs.h <<EOF
2841#define $ac_tr_func 1
2842EOF
2843
2844else
2845 echo "$ac_t""no" 1>&6
2846fi
2847done
2848
4fe6d901 2849echo $ac_n "checking for working mmap""... $ac_c" 1>&6
70e8e585 2850echo "configure:2851: checking for working mmap" >&5
ac388f2a 2851if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4fe6d901
KR
2852 echo $ac_n "(cached) $ac_c" 1>&6
2853else
2854 if test "$cross_compiling" = yes; then
ac388f2a 2855 ac_cv_func_mmap_fixed_mapped=no
4fe6d901 2856else
ac388f2a 2857 cat > conftest.$ac_ext <<EOF
70e8e585 2858#line 2859 "configure"
4fe6d901
KR
2859#include "confdefs.h"
2860
ac388f2a
ILT
2861/* Thanks to Mike Haertel and Jim Avera for this test.
2862 Here is a matrix of mmap possibilities:
2863 mmap private not fixed
2864 mmap private fixed at somewhere currently unmapped
2865 mmap private fixed at somewhere already mapped
2866 mmap shared not fixed
2867 mmap shared fixed at somewhere currently unmapped
2868 mmap shared fixed at somewhere already mapped
2869 For private mappings, we should verify that changes cannot be read()
2870 back from the file, nor mmap's back from the file at a different
2871 address. (There have been systems where private was not correctly
2872 implemented like the infamous i386 svr4.0, and systems where the
2873 VM page cache was not coherent with the filesystem buffer cache
2874 like early versions of FreeBSD and possibly contemporary NetBSD.)
2875 For shared mappings, we should conversely verify that changes get
2876 propogated back to all the places they're supposed to be.
2877
2878 Grep wants private fixed already mapped.
2879 The main things grep needs to know about mmap are:
2880 * does it exist and is it safe to write into the mmap'd area
2881 * how to use it (BSD variants) */
4fe6d901
KR
2882#include <sys/types.h>
2883#include <fcntl.h>
2884#include <sys/mman.h>
2885
ac388f2a 2886/* This mess was copied from the GNU getpagesize.h. */
4fe6d901 2887#ifndef HAVE_GETPAGESIZE
ac388f2a
ILT
2888# ifdef HAVE_UNISTD_H
2889# include <unistd.h>
dfc7020d
ILT
2890# endif
2891
ac388f2a
ILT
2892/* Assume that all systems that can run configure have sys/param.h. */
2893# ifndef HAVE_SYS_PARAM_H
2894# define HAVE_SYS_PARAM_H 1
2895# endif
2896
2897# ifdef _SC_PAGESIZE
2898# define getpagesize() sysconf(_SC_PAGESIZE)
2899# else /* no _SC_PAGESIZE */
2900# ifdef HAVE_SYS_PARAM_H
2901# include <sys/param.h>
2902# ifdef EXEC_PAGESIZE
2903# define getpagesize() EXEC_PAGESIZE
2904# else /* no EXEC_PAGESIZE */
2905# ifdef NBPG
2906# define getpagesize() NBPG * CLSIZE
2907# ifndef CLSIZE
2908# define CLSIZE 1
2909# endif /* no CLSIZE */
2910# else /* no NBPG */
2911# ifdef NBPC
2912# define getpagesize() NBPC
2913# else /* no NBPC */
2914# ifdef PAGESIZE
2915# define getpagesize() PAGESIZE
2916# endif /* PAGESIZE */
2917# endif /* no NBPC */
2918# endif /* no NBPG */
2919# endif /* no EXEC_PAGESIZE */
2920# else /* no HAVE_SYS_PARAM_H */
2921# define getpagesize() 8192 /* punt totally */
2922# endif /* no HAVE_SYS_PARAM_H */
2923# endif /* no _SC_PAGESIZE */
2924
2925#endif /* no HAVE_GETPAGESIZE */
4fe6d901
KR
2926
2927#ifdef __cplusplus
ac388f2a 2928extern "C" { void *malloc(unsigned); }
4fe6d901 2929#else
ac388f2a 2930char *malloc();
4fe6d901
KR
2931#endif
2932
2933int
2934main()
2935{
ac388f2a
ILT
2936 char *data, *data2, *data3;
2937 int i, pagesize;
2938 int fd;
2939
2940 pagesize = getpagesize();
2941
2942 /*
2943 * First, make a file with some known garbage in it.
2944 */
2945 data = malloc(pagesize);
2946 if (!data)
2947 exit(1);
2948 for (i = 0; i < pagesize; ++i)
2949 *(data + i) = rand();
2950 umask(0);
2951 fd = creat("conftestmmap", 0600);
2952 if (fd < 0)
2953 exit(1);
2954 if (write(fd, data, pagesize) != pagesize)
2955 exit(1);
2956 close(fd);
2957
2958 /*
2959 * Next, try to mmap the file at a fixed address which
2960 * already has something else allocated at it. If we can,
2961 * also make sure that we see the same garbage.
2962 */
2963 fd = open("conftestmmap", O_RDWR);
2964 if (fd < 0)
2965 exit(1);
2966 data2 = malloc(2 * pagesize);
2967 if (!data2)
2968 exit(1);
2969 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2970 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2971 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2972 exit(1);
2973 for (i = 0; i < pagesize; ++i)
2974 if (*(data + i) != *(data2 + i))
2975 exit(1);
2976
2977 /*
2978 * Finally, make sure that changes to the mapped area
2979 * do not percolate back to the file as seen by read().
2980 * (This is a bug on some variants of i386 svr4.0.)
2981 */
2982 for (i = 0; i < pagesize; ++i)
2983 *(data2 + i) = *(data2 + i) + 1;
2984 data3 = malloc(pagesize);
2985 if (!data3)
2986 exit(1);
2987 if (read(fd, data3, pagesize) != pagesize)
2988 exit(1);
2989 for (i = 0; i < pagesize; ++i)
2990 if (*(data + i) != *(data3 + i))
2991 exit(1);
2992 close(fd);
2993 unlink("conftestmmap");
2994 exit(0);
4fe6d901
KR
2995}
2996
2997EOF
70e8e585 2998if { (eval echo configure:2999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
ac388f2a
ILT
2999then
3000 ac_cv_func_mmap_fixed_mapped=yes
4fe6d901 3001else
ac388f2a
ILT
3002 echo "configure: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 rm -fr conftest*
3005 ac_cv_func_mmap_fixed_mapped=no
4fe6d901 3006fi
fd8d7c31 3007rm -fr conftest*
dfc7020d
ILT
3008fi
3009
ac388f2a
ILT
3010fi
3011
3012echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3013if test $ac_cv_func_mmap_fixed_mapped = yes; then
4fe6d901
KR
3014 cat >> confdefs.h <<\EOF
3015#define HAVE_MMAP 1
3016EOF
3017
3018fi
3019
3020for ac_func in madvise mprotect
3021do
3022echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
70e8e585 3023echo "configure:3024: checking for $ac_func" >&5
4fe6d901
KR
3024if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3025 echo $ac_n "(cached) $ac_c" 1>&6
3026else
3027 cat > conftest.$ac_ext <<EOF
70e8e585 3028#line 3029 "configure"
4fe6d901
KR
3029#include "confdefs.h"
3030/* System header to define __stub macros and hopefully few prototypes,
3031 which can conflict with char $ac_func(); below. */
3032#include <assert.h>
3033/* Override any gcc2 internal prototype to avoid an error. */
a4322a77
ILT
3034/* We use char because int might match the return type of a gcc2
3035 builtin and then its argument prototype would still apply. */
85e493f0 3036char $ac_func();
4fe6d901 3037
ac388f2a 3038int main() {
4fe6d901
KR
3039
3040/* The GNU C library defines this for functions which it implements
3041 to always fail with ENOSYS. Some functions are actually named
3042 something starting with __ and the normal name is an alias. */
3043#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3044choke me
3045#else
3046$ac_func();
3047#endif
3048
3049; return 0; }
3050EOF
70e8e585 3051if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4fe6d901
KR
3052 rm -rf conftest*
3053 eval "ac_cv_func_$ac_func=yes"
3054else
ac388f2a
ILT
3055 echo "configure: failed program was:" >&5
3056 cat conftest.$ac_ext >&5
4fe6d901
KR
3057 rm -rf conftest*
3058 eval "ac_cv_func_$ac_func=no"
3059fi
3060rm -f conftest*
fd8d7c31 3061fi
ac388f2a 3062
4fe6d901
KR
3063if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3064 echo "$ac_t""yes" 1>&6
85e493f0 3065 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4fe6d901
KR
3066 cat >> confdefs.h <<EOF
3067#define $ac_tr_func 1
3068EOF
3069
3070else
3071 echo "$ac_t""no" 1>&6
3072fi
3073done
3074
fd8d7c31 3075case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
85e493f0
ILT
3076 true+yes ) cat >> confdefs.h <<\EOF
3077#define USE_MMAP 1
3078EOF
3079 ;;
3080esac
4fe6d901 3081
8c693660
KR
3082rm -f doc/config.status
3083trap '' 1 2 15
3084cat > confcache <<\EOF
3085# This file is a shell script that caches the results of configure
3086# tests run on this system so they can be shared between configure
3087# scripts and configure runs. It is not useful on other systems.
3088# If it contains results you don't want to keep, you may remove or edit it.
3089#
3090# By default, configure uses ./config.cache as the cache file,
3091# creating it if it does not exist already. You can give configure
3092# the --cache-file=FILE option to use a different cache file; that is
3093# what configure does when it calls configure scripts in
3094# subdirectories, so they share the cache.
3095# Giving --cache-file=/dev/null disables caching, for debugging configure.
3096# config.status only pays attention to the cache file if you give it the
3097# --recheck option to rerun configure.
3098#
3099EOF
ac388f2a
ILT
3100# The following way of writing the cache mishandles newlines in values,
3101# but we know of no workaround that is simple, portable, and efficient.
3102# So, don't put newlines in cache variables' values.
8c693660
KR
3103# Ultrix sh set writes to stderr and can't be redirected directly,
3104# and sets the high bit in the cache file unless we assign to the vars.
3105(set) 2>&1 |
ac388f2a
ILT
3106 case `(ac_space=' '; set) 2>&1` in
3107 *ac_space=\ *)
3108 # `set' does not quote correctly, so add quotes (double-quote substitution
3109 # turns \\\\ into \\, and sed turns \\ into \).
3110 sed -n \
3111 -e "s/'/'\\\\''/g" \
3112 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3113 ;;
3114 *)
3115 # `set' quotes correctly as required by POSIX, so do not add quotes.
3116 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3117 ;;
3118 esac >> confcache
8c693660
KR
3119if cmp -s $cache_file confcache; then
3120 :
3121else
3122 if test -w $cache_file; then
3123 echo "updating cache $cache_file"
3124 cat confcache > $cache_file
3125 else
3126 echo "not updating unwritable cache $cache_file"
3127 fi
3128fi
3129rm -f confcache
3130
3131trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3132
3133test "x$prefix" = xNONE && prefix=$ac_default_prefix
3134# Let make expand exec_prefix.
3135test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3136
3137# Any assignment to VPATH causes Sun make to only execute
3138# the first set of double-colon rules, so remove it if not needed.
3139# If there is a colon in the path, we need to keep it.
3140if test "x$srcdir" = x.; then
3141 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3142fi
3143
3144trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3145
b7577823 3146DEFS=-DHAVE_CONFIG_H
8c693660
KR
3147
3148# Without the "./", some shells look in PATH for config.status.
3149: ${CONFIG_STATUS=./config.status}
3150
3151echo creating $CONFIG_STATUS
3152rm -f $CONFIG_STATUS
3153cat > $CONFIG_STATUS <<EOF
3154#! /bin/sh
3155# Generated automatically by configure.
3156# Run this file to recreate the current configuration.
3157# This directory was configured as follows,
3158# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3159#
3160# $0 $ac_configure_args
3161#
3162# Compiler output produced by configure, useful for debugging
3163# configure, is in ./config.log if it exists.
3164
3165ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3166for ac_option
3167do
3168 case "\$ac_option" in
3169 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3170 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3171 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3172 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
70e8e585 3173 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
8c693660
KR
3174 exit 0 ;;
3175 -help | --help | --hel | --he | --h)
3176 echo "\$ac_cs_usage"; exit 0 ;;
3177 *) echo "\$ac_cs_usage"; exit 1 ;;
3178 esac
3179done
3180
3181ac_given_srcdir=$srcdir
f515fb2f 3182ac_given_INSTALL="$INSTALL"
8c693660 3183
f4e14cb9 3184trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
d19df9b5
ILT
3185EOF
3186cat >> $CONFIG_STATUS <<EOF
8c693660 3187
85e493f0 3188# Protect against being on the right side of a sed subst in config.status.
d19df9b5
ILT
3189sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3190 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8c693660
KR
3191$ac_vpsub
3192$extrasub
3193s%@CFLAGS@%$CFLAGS%g
3194s%@CPPFLAGS@%$CPPFLAGS%g
3195s%@CXXFLAGS@%$CXXFLAGS%g
3196s%@DEFS@%$DEFS%g
3197s%@LDFLAGS@%$LDFLAGS%g
3198s%@LIBS@%$LIBS%g
3199s%@exec_prefix@%$exec_prefix%g
3200s%@prefix@%$prefix%g
3201s%@program_transform_name@%$program_transform_name%g
85e493f0
ILT
3202s%@bindir@%$bindir%g
3203s%@sbindir@%$sbindir%g
3204s%@libexecdir@%$libexecdir%g
3205s%@datadir@%$datadir%g
3206s%@sysconfdir@%$sysconfdir%g
3207s%@sharedstatedir@%$sharedstatedir%g
3208s%@localstatedir@%$localstatedir%g
3209s%@libdir@%$libdir%g
3210s%@includedir@%$includedir%g
3211s%@oldincludedir@%$oldincludedir%g
3212s%@infodir@%$infodir%g
3213s%@mandir@%$mandir%g
8c693660
KR
3214s%@host@%$host%g
3215s%@host_alias@%$host_alias%g
3216s%@host_cpu@%$host_cpu%g
3217s%@host_vendor@%$host_vendor%g
3218s%@host_os@%$host_os%g
3219s%@target@%$target%g
3220s%@target_alias@%$target_alias%g
3221s%@target_cpu@%$target_cpu%g
3222s%@target_vendor@%$target_vendor%g
3223s%@target_os@%$target_os%g
3224s%@build@%$build%g
3225s%@build_alias@%$build_alias%g
3226s%@build_cpu@%$build_cpu%g
3227s%@build_vendor@%$build_vendor%g
3228s%@build_os@%$build_os%g
f515fb2f 3229s%@CC@%$CC%g
f515fb2f
ILT
3230s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3231s%@INSTALL_DATA@%$INSTALL_DATA%g
c0734708
ILT
3232s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3233s%@PACKAGE@%$PACKAGE%g
f4e14cb9 3234s%@VERSION@%$VERSION%g
c0734708
ILT
3235s%@ACLOCAL@%$ACLOCAL%g
3236s%@AUTOCONF@%$AUTOCONF%g
3237s%@AUTOMAKE@%$AUTOMAKE%g
3238s%@AUTOHEADER@%$AUTOHEADER%g
3239s%@MAKEINFO@%$MAKEINFO%g
3240s%@SET_MAKE@%$SET_MAKE%g
3241s%@RANLIB@%$RANLIB%g
3242s%@LD@%$LD%g
3243s%@LN_S@%$LN_S%g
3244s%@LIBTOOL@%$LIBTOOL%g
3245s%@MAINT@%$MAINT%g
3246s%@EXEEXT@%$EXEEXT%g
3247s%@HDEFINES@%$HDEFINES%g
3248s%@AR@%$AR%g
f4e14cb9
ILT
3249s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
3250s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
3251s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
3252s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
f515fb2f 3253s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
b7577823 3254s%@CPP@%$CPP%g
a52a3ce8
ILT
3255s%@COREFILE@%$COREFILE%g
3256s%@COREFLAG@%$COREFLAG%g
2b79a104 3257s%@TDEFINES@%$TDEFINES%g
8c693660
KR
3258s%@wordsize@%$wordsize%g
3259s%@all_backends@%$all_backends%g
3260s%@bfd_backends@%$bfd_backends%g
3261s%@bfd_machines@%$bfd_machines%g
3262s%@tdefaults@%$tdefaults%g
3263
3264CEOF
3265EOF
ac388f2a
ILT
3266
3267cat >> $CONFIG_STATUS <<\EOF
3268
3269# Split the substitutions into bite-sized pieces for seds with
3270# small command number limits, like on Digital OSF/1 and HP-UX.
3271ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3272ac_file=1 # Number of current file.
3273ac_beg=1 # First line for current file.
3274ac_end=$ac_max_sed_cmds # Line after last line for current file.
3275ac_more_lines=:
3276ac_sed_cmds=""
3277while $ac_more_lines; do
3278 if test $ac_beg -gt 1; then
3279 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3280 else
3281 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3282 fi
3283 if test ! -s conftest.s$ac_file; then
3284 ac_more_lines=false
3285 rm -f conftest.s$ac_file
3286 else
3287 if test -z "$ac_sed_cmds"; then
3288 ac_sed_cmds="sed -f conftest.s$ac_file"
3289 else
3290 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3291 fi
3292 ac_file=`expr $ac_file + 1`
3293 ac_beg=$ac_end
3294 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3295 fi
3296done
3297if test -z "$ac_sed_cmds"; then
3298 ac_sed_cmds=cat
3299fi
3300EOF
3301
8c693660
KR
3302cat >> $CONFIG_STATUS <<EOF
3303
f4e14cb9 3304CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h"}
8c693660
KR
3305EOF
3306cat >> $CONFIG_STATUS <<\EOF
3307for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
ac388f2a 3308 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8c693660 3309 case "$ac_file" in
ac388f2a 3310 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8c693660
KR
3311 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3312 *) ac_file_in="${ac_file}.in" ;;
3313 esac
3314
ac388f2a 3315 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8c693660
KR
3316
3317 # Remove last slash and all that follows it. Not all systems have dirname.
3318 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3319 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3320 # The file is in a subdirectory.
3321 test ! -d "$ac_dir" && mkdir "$ac_dir"
3322 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3323 # A "../" for each directory in $ac_dir_suffix.
3324 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3325 else
3326 ac_dir_suffix= ac_dots=
3327 fi
3328
3329 case "$ac_given_srcdir" in
3330 .) srcdir=.
3331 if test -z "$ac_dots"; then top_srcdir=.
3332 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3333 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3334 *) # Relative path.
3335 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3336 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3337 esac
3338
f515fb2f
ILT
3339 case "$ac_given_INSTALL" in
3340 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3341 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3342 esac
ac388f2a 3343
8c693660
KR
3344 echo creating "$ac_file"
3345 rm -f "$ac_file"
3346 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3347 case "$ac_file" in
3348 *Makefile*) ac_comsub="1i\\
3349# $configure_input" ;;
3350 *) ac_comsub= ;;
3351 esac
ac388f2a 3352
c0734708 3353 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8c693660
KR
3354 sed -e "$ac_comsub
3355s%@configure_input@%$configure_input%g
3356s%@srcdir@%$srcdir%g
3357s%@top_srcdir@%$top_srcdir%g
f515fb2f 3358s%@INSTALL@%$INSTALL%g
ac388f2a 3359" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8c693660 3360fi; done
ac388f2a 3361rm -f conftest.s*
8c693660 3362
b7577823
ILT
3363# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3364# NAME is the cpp macro being defined and VALUE is the value it is being given.
3365#
3366# ac_d sets the value in "#define NAME VALUE" lines.
3367ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3368ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3369ac_dC='\3'
3370ac_dD='%g'
3371# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3372ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3373ac_uB='\([ ]\)%\1#\2define\3'
3374ac_uC=' '
3375ac_uD='\4%g'
3376# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3377ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3378ac_eB='$%\1#\2define\3'
3379ac_eC=' '
3380ac_eD='%g'
3381
ac388f2a
ILT
3382if test "${CONFIG_HEADERS+set}" != set; then
3383EOF
3384cat >> $CONFIG_STATUS <<EOF
3385 CONFIG_HEADERS="config.h:config.in"
3386EOF
3387cat >> $CONFIG_STATUS <<\EOF
3388fi
b7577823 3389for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
ac388f2a 3390 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
b7577823 3391 case "$ac_file" in
ac388f2a 3392 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
b7577823
ILT
3393 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3394 *) ac_file_in="${ac_file}.in" ;;
3395 esac
8c693660 3396
b7577823 3397 echo creating $ac_file
8c693660 3398
b7577823 3399 rm -f conftest.frag conftest.in conftest.out
c0734708 3400 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
ac388f2a 3401 cat $ac_file_inputs > conftest.in
8c693660 3402
b7577823 3403EOF
8c693660 3404
b7577823
ILT
3405# Transform confdefs.h into a sed script conftest.vals that substitutes
3406# the proper values into config.h.in to produce config.h. And first:
85e493f0 3407# Protect against being on the right side of a sed subst in config.status.
b7577823
ILT
3408# Protect against being in an unquoted here document in config.status.
3409rm -f conftest.vals
3410cat > conftest.hdr <<\EOF
3411s/[\\&%]/\\&/g
3412s%[\\$`]%\\&%g
a4322a77 3413s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
b7577823
ILT
3414s%ac_d%ac_u%gp
3415s%ac_u%ac_e%gp
3416EOF
3417sed -n -f conftest.hdr confdefs.h > conftest.vals
3418rm -f conftest.hdr
3419
3420# This sed command replaces #undef with comments. This is necessary, for
3421# example, in the case of _POSIX_SOURCE, which is predefined and required
3422# on some systems where configure will not decide to define it.
3423cat >> conftest.vals <<\EOF
3424s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3425EOF
8c693660 3426
b7577823
ILT
3427# Break up conftest.vals because some shells have a limit on
3428# the size of here documents, and old seds have small limits too.
8c693660 3429
b7577823
ILT
3430rm -f conftest.tail
3431while :
3432do
3433 ac_lines=`grep -c . conftest.vals`
3434 # grep -c gives empty output for an empty file on some AIX systems.
3435 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3436 # Write a limited-size here document to conftest.frag.
3437 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3438 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3439 echo 'CEOF
3440 sed -f conftest.frag conftest.in > conftest.out
3441 rm -f conftest.in
3442 mv conftest.out conftest.in
3443' >> $CONFIG_STATUS
3444 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3445 rm -f conftest.vals
3446 mv conftest.tail conftest.vals
3447done
3448rm -f conftest.vals
8c693660 3449
b7577823
ILT
3450cat >> $CONFIG_STATUS <<\EOF
3451 rm -f conftest.frag conftest.h
3452 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3453 cat conftest.in >> conftest.h
3454 rm -f conftest.in
3455 if cmp -s $ac_file conftest.h 2>/dev/null; then
3456 echo "$ac_file is unchanged"
3457 rm -f conftest.h
8c693660 3458 else
a4322a77
ILT
3459 # Remove last slash and all that follows it. Not all systems have dirname.
3460 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3461 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3462 # The file is in a subdirectory.
3463 test ! -d "$ac_dir" && mkdir "$ac_dir"
3464 fi
b7577823
ILT
3465 rm -f $ac_file
3466 mv conftest.h $ac_file
8c693660 3467 fi
b7577823
ILT
3468fi; done
3469
ac388f2a
ILT
3470EOF
3471cat >> $CONFIG_STATUS <<EOF
8c693660 3472
c0734708 3473
ac388f2a
ILT
3474EOF
3475cat >> $CONFIG_STATUS <<\EOF
c0734708
ILT
3476test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3477
8c693660
KR
3478exit 0
3479EOF
3480chmod +x $CONFIG_STATUS
3481rm -fr confdefs* $ac_clean_files
3482test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3483
This page took 0.245067 seconds and 4 git commands to generate.