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