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