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