tweaks
[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 # Extract the first word of "ranlib", so it can be a program name with args.
1059 set dummy ranlib; ac_word=$2
1060 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1061 echo "configure:1062: checking for $ac_word" >&5
1062 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1063 echo $ac_n "(cached) $ac_c" 1>&6
1064 else
1065 if test -n "$RANLIB"; then
1066 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1067 else
1068 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1069 for ac_dir in $PATH; do
1070 test -z "$ac_dir" && ac_dir=.
1071 if test -f $ac_dir/$ac_word; then
1072 ac_cv_prog_RANLIB="ranlib"
1073 break
1074 fi
1075 done
1076 IFS="$ac_save_ifs"
1077 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1078 fi
1079 fi
1080 RANLIB="$ac_cv_prog_RANLIB"
1081 if test -n "$RANLIB"; then
1082 echo "$ac_t""$RANLIB" 1>&6
1083 else
1084 echo "$ac_t""no" 1>&6
1085 fi
1086
1087 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1088 if test "${with_gnu_ld+set}" = set; then
1089 withval="$with_gnu_ld"
1090 test "$withval" = no || with_gnu_ld=yes
1091 else
1092 with_gnu_ld=no
1093 fi
1094
1095 if test "$with_gnu_ld" = yes; then
1096 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1097 echo "configure:1098: checking for GNU ld" >&5
1098 else
1099 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1100 echo "configure:1101: checking for non-GNU ld" >&5
1101 fi
1102 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1103 echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105 case "$LD" in
1106 /*)
1107 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1108 ;;
1109 *)
1110 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1111 for ac_dir in $PATH; do
1112 test -z "$ac_dir" && ac_dir=.
1113 if test -f "$ac_dir/ld"; then
1114 ac_cv_path_LD="$ac_dir/ld"
1115 # Check to see if the program is GNU ld. I'd rather use --version,
1116 # but apparently some GNU ld's only accept -v.
1117 # Break only if it was the GNU/non-GNU ld that we prefer.
1118 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
1119 test "$with_gnu_ld" = yes && break
1120 else
1121 test "$with_gnu_ld" != yes && break
1122 fi
1123 fi
1124 done
1125 IFS="$ac_save_ifs"
1126 ;;
1127 esac
1128 fi
1129
1130 LD="$ac_cv_path_LD"
1131 if test -n "$LD"; then
1132 echo "$ac_t""$LD" 1>&6
1133 else
1134 echo "$ac_t""no" 1>&6
1135 fi
1136 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1137
1138 echo $ac_n "checking whether we are using GNU ld""... $ac_c" 1>&6
1139 echo "configure:1140: checking whether we are using GNU ld" >&5
1140 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1141 echo $ac_n "(cached) $ac_c" 1>&6
1142 else
1143 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1144 if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then
1145 ac_cv_prog_gnu_ld=yes
1146 else
1147 ac_cv_prog_gnu_ld=no
1148 fi
1149 fi
1150
1151 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1152
1153
1154 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1155 echo "configure:1156: checking whether ln -s works" >&5
1156 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1157 echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159 rm -f conftestdata
1160 if ln -s X conftestdata 2>/dev/null
1161 then
1162 rm -f conftestdata
1163 ac_cv_prog_LN_S="ln -s"
1164 else
1165 ac_cv_prog_LN_S=ln
1166 fi
1167 fi
1168 LN_S="$ac_cv_prog_LN_S"
1169 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1170 echo "$ac_t""yes" 1>&6
1171 else
1172 echo "$ac_t""no" 1>&6
1173 fi
1174
1175
1176
1177
1178
1179
1180
1181 # Always use our own libtool.
1182 LIBTOOL='$(top_builddir)/libtool'
1183
1184
1185 # Check whether --enable-shared or --disable-shared was given.
1186 if test "${enable_shared+set}" = set; then
1187 enableval="$enable_shared"
1188 test "$enableval" = no && libtool_shared=" --disable-shared"
1189 else
1190 libtool_shared=--disable-shared
1191 fi
1192
1193
1194 # Check whether --enable-static or --disable-static was given.
1195 if test "${enable_static+set}" = set; then
1196 enableval="$enable_static"
1197 test "$enableval" = no && libtool_static=" --disable-static"
1198 else
1199 libtool_static=
1200 fi
1201
1202
1203 libtool_flags="$libtool_shared$libtool_static"
1204 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1205 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1206 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1207
1208 # Some flags need to be propagated to the compiler or linker for good
1209 # libtool support.
1210 case "$host" in
1211 *-*-irix6*)
1212 for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
1213 if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
1214 LD="${LD-ld} $f"
1215 fi
1216 done
1217 ;;
1218
1219 *-*-sco3.2v5*)
1220 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1221 CFLAGS="$CFLAGS -belf"
1222 ;;
1223 esac
1224
1225 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1226 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1227 LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \
1228 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
1229 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1230 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1231
1232
1233 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
1234 if test "${enable_64_bit_bfd+set}" = set; then
1235 enableval="$enable_64_bit_bfd"
1236 case "${enableval}" in
1237 yes) want64=true ;;
1238 no) want64=false ;;
1239 *) { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
1240 esac
1241 else
1242 want64=false
1243 fi
1244 # Check whether --enable-targets or --disable-targets was given.
1245 if test "${enable_targets+set}" = set; then
1246 enableval="$enable_targets"
1247 case "${enableval}" in
1248 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1249 ;;
1250 no) enable_targets= ;;
1251 *) enable_targets=$enableval ;;
1252 esac
1253 fi
1254 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1255 if test "${enable_commonbfdlib+set}" = set; then
1256 enableval="$enable_commonbfdlib"
1257 case "${enableval}" in
1258 yes) commonbfdlib=true ;;
1259 no) commonbfdlib=false ;;
1260 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1261 esac
1262 fi
1263 # Check whether --with-mmap or --without-mmap was given.
1264 if test "${with_mmap+set}" = set; then
1265 withval="$with_mmap"
1266 case "${withval}" in
1267 yes) want_mmap=true ;;
1268 no) want_mmap=false ;;
1269 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
1270 esac
1271 else
1272 want_mmap=false
1273 fi
1274
1275
1276
1277
1278
1279 if test -z "$target" ; then
1280 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1281 fi
1282 if test "$program_transform_name" = s,x,x,; then
1283 program_transform_name=
1284 else
1285 # Double any \ or $. echo might interpret backslashes.
1286 cat <<\EOF_SED > conftestsed
1287 s,\\,\\\\,g; s,\$,$$,g
1288 EOF_SED
1289 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1290 rm -f conftestsed
1291 fi
1292 test "$program_prefix" != NONE &&
1293 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1294 # Use a double $ so make ignores it.
1295 test "$program_suffix" != NONE &&
1296 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1297
1298 # sed with no file args requires a program.
1299 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1300
1301
1302 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1303 echo "configure:1304: checking whether to enable maintainer-specific portions of Makefiles" >&5
1304 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1305 if test "${enable_maintainer_mode+set}" = set; then
1306 enableval="$enable_maintainer_mode"
1307 USE_MAINTAINER_MODE=$enableval
1308 else
1309 USE_MAINTAINER_MODE=no
1310 fi
1311
1312 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1313 if test $USE_MAINTAINER_MODE = yes; then
1314 MAINT=
1315 else
1316 MAINT='#M#'
1317 fi
1318
1319
1320 echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
1321 echo "configure:1322: checking for Cygwin32 environment" >&5
1322 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
1323 echo $ac_n "(cached) $ac_c" 1>&6
1324 else
1325 cat > conftest.$ac_ext <<EOF
1326 #line 1327 "configure"
1327 #include "confdefs.h"
1328
1329 int main() {
1330 int main () { return __CYGWIN32__; }
1331 ; return 0; }
1332 EOF
1333 if { (eval echo configure:1334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1334 rm -rf conftest*
1335 am_cv_cygwin32=yes
1336 else
1337 echo "configure: failed program was:" >&5
1338 cat conftest.$ac_ext >&5
1339 rm -rf conftest*
1340 am_cv_cygwin32=no
1341 fi
1342 rm -f conftest*
1343 rm -f conftest*
1344 fi
1345
1346 echo "$ac_t""$am_cv_cygwin32" 1>&6
1347 CYGWIN32=
1348 test "$am_cv_cygwin32" = yes && CYGWIN32=yes
1349 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1350 echo "configure:1351: checking for executable suffix" >&5
1351 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
1352 echo $ac_n "(cached) $ac_c" 1>&6
1353 else
1354 if test "$CYGWIN32" = yes; then
1355 am_cv_exeext=.exe
1356 else
1357 cat > am_c_test.c << 'EOF'
1358 int main() {
1359 /* Nothing needed here */
1360 }
1361 EOF
1362 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
1363 am_cv_exeext=`ls am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
1364 rm -f am_c_test*
1365 fi
1366
1367 test x"${am_cv_exeext}" = x && am_cv_exeext=no
1368 fi
1369 EXEEXT=""
1370 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
1371 echo "$ac_t""${am_cv_exeext}" 1>&6
1372
1373
1374 host64=false
1375 target64=false
1376
1377 # host stuff:
1378
1379 # Extract the first word of "gcc", so it can be a program name with args.
1380 set dummy gcc; ac_word=$2
1381 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1382 echo "configure:1383: checking for $ac_word" >&5
1383 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1384 echo $ac_n "(cached) $ac_c" 1>&6
1385 else
1386 if test -n "$CC"; then
1387 ac_cv_prog_CC="$CC" # Let the user override the test.
1388 else
1389 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1390 for ac_dir in $PATH; do
1391 test -z "$ac_dir" && ac_dir=.
1392 if test -f $ac_dir/$ac_word; then
1393 ac_cv_prog_CC="gcc"
1394 break
1395 fi
1396 done
1397 IFS="$ac_save_ifs"
1398 fi
1399 fi
1400 CC="$ac_cv_prog_CC"
1401 if test -n "$CC"; then
1402 echo "$ac_t""$CC" 1>&6
1403 else
1404 echo "$ac_t""no" 1>&6
1405 fi
1406
1407 if test -z "$CC"; then
1408 # Extract the first word of "cc", so it can be a program name with args.
1409 set dummy cc; ac_word=$2
1410 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1411 echo "configure:1412: checking for $ac_word" >&5
1412 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1413 echo $ac_n "(cached) $ac_c" 1>&6
1414 else
1415 if test -n "$CC"; then
1416 ac_cv_prog_CC="$CC" # Let the user override the test.
1417 else
1418 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1419 ac_prog_rejected=no
1420 for ac_dir in $PATH; do
1421 test -z "$ac_dir" && ac_dir=.
1422 if test -f $ac_dir/$ac_word; then
1423 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1424 ac_prog_rejected=yes
1425 continue
1426 fi
1427 ac_cv_prog_CC="cc"
1428 break
1429 fi
1430 done
1431 IFS="$ac_save_ifs"
1432 if test $ac_prog_rejected = yes; then
1433 # We found a bogon in the path, so make sure we never use it.
1434 set dummy $ac_cv_prog_CC
1435 shift
1436 if test $# -gt 0; then
1437 # We chose a different compiler from the bogus one.
1438 # However, it has the same basename, so the bogon will be chosen
1439 # first if we set CC to just the basename; use the full file name.
1440 shift
1441 set dummy "$ac_dir/$ac_word" "$@"
1442 shift
1443 ac_cv_prog_CC="$@"
1444 fi
1445 fi
1446 fi
1447 fi
1448 CC="$ac_cv_prog_CC"
1449 if test -n "$CC"; then
1450 echo "$ac_t""$CC" 1>&6
1451 else
1452 echo "$ac_t""no" 1>&6
1453 fi
1454
1455 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1456 fi
1457
1458 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1459 echo "configure:1460: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1460
1461 ac_ext=c
1462 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1463 ac_cpp='$CPP $CPPFLAGS'
1464 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1465 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1466 cross_compiling=$ac_cv_prog_cc_cross
1467
1468 cat > conftest.$ac_ext <<EOF
1469 #line 1470 "configure"
1470 #include "confdefs.h"
1471 main(){return(0);}
1472 EOF
1473 if { (eval echo configure:1474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1474 ac_cv_prog_cc_works=yes
1475 # If we can't run a trivial program, we are probably using a cross compiler.
1476 if (./conftest; exit) 2>/dev/null; then
1477 ac_cv_prog_cc_cross=no
1478 else
1479 ac_cv_prog_cc_cross=yes
1480 fi
1481 else
1482 echo "configure: failed program was:" >&5
1483 cat conftest.$ac_ext >&5
1484 ac_cv_prog_cc_works=no
1485 fi
1486 rm -fr conftest*
1487
1488 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1489 if test $ac_cv_prog_cc_works = no; then
1490 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1491 fi
1492 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1493 echo "configure:1494: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1494 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1495 cross_compiling=$ac_cv_prog_cc_cross
1496
1497 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1498 echo "configure:1499: checking whether we are using GNU C" >&5
1499 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1500 echo $ac_n "(cached) $ac_c" 1>&6
1501 else
1502 cat > conftest.c <<EOF
1503 #ifdef __GNUC__
1504 yes;
1505 #endif
1506 EOF
1507 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1508 ac_cv_prog_gcc=yes
1509 else
1510 ac_cv_prog_gcc=no
1511 fi
1512 fi
1513
1514 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1515
1516 if test $ac_cv_prog_gcc = yes; then
1517 GCC=yes
1518 ac_test_CFLAGS="${CFLAGS+set}"
1519 ac_save_CFLAGS="$CFLAGS"
1520 CFLAGS=
1521 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1522 echo "configure:1523: checking whether ${CC-cc} accepts -g" >&5
1523 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1524 echo $ac_n "(cached) $ac_c" 1>&6
1525 else
1526 echo 'void f(){}' > conftest.c
1527 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1528 ac_cv_prog_cc_g=yes
1529 else
1530 ac_cv_prog_cc_g=no
1531 fi
1532 rm -f conftest*
1533
1534 fi
1535
1536 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1537 if test "$ac_test_CFLAGS" = set; then
1538 CFLAGS="$ac_save_CFLAGS"
1539 elif test $ac_cv_prog_cc_g = yes; then
1540 CFLAGS="-g -O2"
1541 else
1542 CFLAGS="-O2"
1543 fi
1544 else
1545 GCC=
1546 test "${CFLAGS+set}" = set || CFLAGS="-g"
1547 fi
1548
1549
1550 # Permit host specific settings.
1551 . ${srcdir}/configure.host
1552
1553
1554 if test $host != $build; then
1555 ac_tool_prefix=${host_alias}-
1556 else
1557 ac_tool_prefix=
1558 fi
1559
1560 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1561 set dummy ${ac_tool_prefix}ar; ac_word=$2
1562 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1563 echo "configure:1564: checking for $ac_word" >&5
1564 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1565 echo $ac_n "(cached) $ac_c" 1>&6
1566 else
1567 if test -n "$AR"; then
1568 ac_cv_prog_AR="$AR" # Let the user override the test.
1569 else
1570 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1571 for ac_dir in $PATH; do
1572 test -z "$ac_dir" && ac_dir=.
1573 if test -f $ac_dir/$ac_word; then
1574 ac_cv_prog_AR="${ac_tool_prefix}ar"
1575 break
1576 fi
1577 done
1578 IFS="$ac_save_ifs"
1579 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1580 fi
1581 fi
1582 AR="$ac_cv_prog_AR"
1583 if test -n "$AR"; then
1584 echo "$ac_t""$AR" 1>&6
1585 else
1586 echo "$ac_t""no" 1>&6
1587 fi
1588
1589
1590
1591 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1592 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1594 echo "configure:1595: checking for $ac_word" >&5
1595 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1596 echo $ac_n "(cached) $ac_c" 1>&6
1597 else
1598 if test -n "$RANLIB"; then
1599 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1600 else
1601 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1602 for ac_dir in $PATH; do
1603 test -z "$ac_dir" && ac_dir=.
1604 if test -f $ac_dir/$ac_word; then
1605 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1606 break
1607 fi
1608 done
1609 IFS="$ac_save_ifs"
1610 fi
1611 fi
1612 RANLIB="$ac_cv_prog_RANLIB"
1613 if test -n "$RANLIB"; then
1614 echo "$ac_t""$RANLIB" 1>&6
1615 else
1616 echo "$ac_t""no" 1>&6
1617 fi
1618
1619
1620 if test -z "$ac_cv_prog_RANLIB"; then
1621 if test -n "$ac_tool_prefix"; then
1622 # Extract the first word of "ranlib", so it can be a program name with args.
1623 set dummy ranlib; ac_word=$2
1624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1625 echo "configure:1626: checking for $ac_word" >&5
1626 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1627 echo $ac_n "(cached) $ac_c" 1>&6
1628 else
1629 if test -n "$RANLIB"; then
1630 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1631 else
1632 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1633 for ac_dir in $PATH; do
1634 test -z "$ac_dir" && ac_dir=.
1635 if test -f $ac_dir/$ac_word; then
1636 ac_cv_prog_RANLIB="ranlib"
1637 break
1638 fi
1639 done
1640 IFS="$ac_save_ifs"
1641 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1642 fi
1643 fi
1644 RANLIB="$ac_cv_prog_RANLIB"
1645 if test -n "$RANLIB"; then
1646 echo "$ac_t""$RANLIB" 1>&6
1647 else
1648 echo "$ac_t""no" 1>&6
1649 fi
1650
1651 else
1652 RANLIB=":"
1653 fi
1654 fi
1655
1656
1657 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1658
1659
1660 BFD_HOST_64BIT_LONG=0
1661 BFD_HOST_64_BIT_DEFINED=0
1662 BFD_HOST_64_BIT=
1663 BFD_HOST_U_64_BIT=
1664 if test "x${HOST_64BIT_TYPE}" = "xlong"; then
1665 BFD_HOST_64BIT_LONG=1
1666 elif test "x${HOST_64BIT_TYPE}" != "x"; then
1667 BFD_HOST_64_BIT_DEFINED=1
1668 BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
1669 BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
1670 fi
1671
1672
1673
1674
1675
1676 # Put a plausible default for CC_FOR_BUILD in Makefile.
1677 if test -z "$CC_FOR_BUILD"; then
1678 if test "x$cross_compiling" = "xno"; then
1679 CC_FOR_BUILD='$(CC)'
1680 else
1681 CC_FOR_BUILD=gcc
1682 fi
1683 fi
1684
1685
1686 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1687 echo "configure:1688: checking how to run the C preprocessor" >&5
1688 # On Suns, sometimes $CPP names a directory.
1689 if test -n "$CPP" && test -d "$CPP"; then
1690 CPP=
1691 fi
1692 if test -z "$CPP"; then
1693 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1694 echo $ac_n "(cached) $ac_c" 1>&6
1695 else
1696 # This must be in double quotes, not single quotes, because CPP may get
1697 # substituted into the Makefile and "${CC-cc}" will confuse make.
1698 CPP="${CC-cc} -E"
1699 # On the NeXT, cc -E runs the code through the compiler's parser,
1700 # not just through cpp.
1701 cat > conftest.$ac_ext <<EOF
1702 #line 1703 "configure"
1703 #include "confdefs.h"
1704 #include <assert.h>
1705 Syntax Error
1706 EOF
1707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1708 { (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1709 ac_err=`grep -v '^ *+' conftest.out`
1710 if test -z "$ac_err"; then
1711 :
1712 else
1713 echo "$ac_err" >&5
1714 echo "configure: failed program was:" >&5
1715 cat conftest.$ac_ext >&5
1716 rm -rf conftest*
1717 CPP="${CC-cc} -E -traditional-cpp"
1718 cat > conftest.$ac_ext <<EOF
1719 #line 1720 "configure"
1720 #include "confdefs.h"
1721 #include <assert.h>
1722 Syntax Error
1723 EOF
1724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1725 { (eval echo configure:1726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1726 ac_err=`grep -v '^ *+' conftest.out`
1727 if test -z "$ac_err"; then
1728 :
1729 else
1730 echo "$ac_err" >&5
1731 echo "configure: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1733 rm -rf conftest*
1734 CPP=/lib/cpp
1735 fi
1736 rm -f conftest*
1737 fi
1738 rm -f conftest*
1739 ac_cv_prog_CPP="$CPP"
1740 fi
1741 CPP="$ac_cv_prog_CPP"
1742 else
1743 ac_cv_prog_CPP="$CPP"
1744 fi
1745 echo "$ac_t""$CPP" 1>&6
1746
1747 for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
1748 do
1749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1751 echo "configure:1752: checking for $ac_hdr" >&5
1752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1753 echo $ac_n "(cached) $ac_c" 1>&6
1754 else
1755 cat > conftest.$ac_ext <<EOF
1756 #line 1757 "configure"
1757 #include "confdefs.h"
1758 #include <$ac_hdr>
1759 EOF
1760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1761 { (eval echo configure:1762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1762 ac_err=`grep -v '^ *+' conftest.out`
1763 if test -z "$ac_err"; then
1764 rm -rf conftest*
1765 eval "ac_cv_header_$ac_safe=yes"
1766 else
1767 echo "$ac_err" >&5
1768 echo "configure: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1770 rm -rf conftest*
1771 eval "ac_cv_header_$ac_safe=no"
1772 fi
1773 rm -f conftest*
1774 fi
1775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1776 echo "$ac_t""yes" 1>&6
1777 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1778 cat >> confdefs.h <<EOF
1779 #define $ac_tr_hdr 1
1780 EOF
1781
1782 else
1783 echo "$ac_t""no" 1>&6
1784 fi
1785 done
1786
1787 for ac_hdr in fcntl.h sys/file.h sys/time.h
1788 do
1789 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1790 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1791 echo "configure:1792: checking for $ac_hdr" >&5
1792 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
1794 else
1795 cat > conftest.$ac_ext <<EOF
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1798 #include <$ac_hdr>
1799 EOF
1800 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1801 { (eval echo configure:1802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1802 ac_err=`grep -v '^ *+' conftest.out`
1803 if test -z "$ac_err"; then
1804 rm -rf conftest*
1805 eval "ac_cv_header_$ac_safe=yes"
1806 else
1807 echo "$ac_err" >&5
1808 echo "configure: failed program was:" >&5
1809 cat conftest.$ac_ext >&5
1810 rm -rf conftest*
1811 eval "ac_cv_header_$ac_safe=no"
1812 fi
1813 rm -f conftest*
1814 fi
1815 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1816 echo "$ac_t""yes" 1>&6
1817 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1818 cat >> confdefs.h <<EOF
1819 #define $ac_tr_hdr 1
1820 EOF
1821
1822 else
1823 echo "$ac_t""no" 1>&6
1824 fi
1825 done
1826
1827 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1828 echo "configure:1829: checking whether time.h and sys/time.h may both be included" >&5
1829 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1830 echo $ac_n "(cached) $ac_c" 1>&6
1831 else
1832 cat > conftest.$ac_ext <<EOF
1833 #line 1834 "configure"
1834 #include "confdefs.h"
1835 #include <sys/types.h>
1836 #include <sys/time.h>
1837 #include <time.h>
1838 int main() {
1839 struct tm *tp;
1840 ; return 0; }
1841 EOF
1842 if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1843 rm -rf conftest*
1844 ac_cv_header_time=yes
1845 else
1846 echo "configure: failed program was:" >&5
1847 cat conftest.$ac_ext >&5
1848 rm -rf conftest*
1849 ac_cv_header_time=no
1850 fi
1851 rm -f conftest*
1852 fi
1853
1854 echo "$ac_t""$ac_cv_header_time" 1>&6
1855 if test $ac_cv_header_time = yes; then
1856 cat >> confdefs.h <<\EOF
1857 #define TIME_WITH_SYS_TIME 1
1858 EOF
1859
1860 fi
1861
1862 for ac_func in fcntl getpagesize setitimer sysconf fdopen
1863 do
1864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1865 echo "configure:1866: checking for $ac_func" >&5
1866 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1868 else
1869 cat > conftest.$ac_ext <<EOF
1870 #line 1871 "configure"
1871 #include "confdefs.h"
1872 /* System header to define __stub macros and hopefully few prototypes,
1873 which can conflict with char $ac_func(); below. */
1874 #include <assert.h>
1875 /* Override any gcc2 internal prototype to avoid an error. */
1876 /* We use char because int might match the return type of a gcc2
1877 builtin and then its argument prototype would still apply. */
1878 char $ac_func();
1879
1880 int main() {
1881
1882 /* The GNU C library defines this for functions which it implements
1883 to always fail with ENOSYS. Some functions are actually named
1884 something starting with __ and the normal name is an alias. */
1885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1886 choke me
1887 #else
1888 $ac_func();
1889 #endif
1890
1891 ; return 0; }
1892 EOF
1893 if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1894 rm -rf conftest*
1895 eval "ac_cv_func_$ac_func=yes"
1896 else
1897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
1899 rm -rf conftest*
1900 eval "ac_cv_func_$ac_func=no"
1901 fi
1902 rm -f conftest*
1903 fi
1904
1905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1906 echo "$ac_t""yes" 1>&6
1907 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1908 cat >> confdefs.h <<EOF
1909 #define $ac_tr_func 1
1910 EOF
1911
1912 else
1913 echo "$ac_t""no" 1>&6
1914 fi
1915 done
1916
1917
1918
1919 case "${host}" in
1920 i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows)
1921 cat >> confdefs.h <<\EOF
1922 #define USE_BINARY_FOPEN 1
1923 EOF
1924 ;;
1925 esac
1926
1927 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
1928 echo "configure:1929: checking whether strstr must be declared" >&5
1929 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
1930 echo $ac_n "(cached) $ac_c" 1>&6
1931 else
1932 cat > conftest.$ac_ext <<EOF
1933 #line 1934 "configure"
1934 #include "confdefs.h"
1935
1936 #include <stdio.h>
1937 #ifdef HAVE_STRING_H
1938 #include <string.h>
1939 #else
1940 #ifdef HAVE_STRINGS_H
1941 #include <strings.h>
1942 #endif
1943 #endif
1944 #ifdef HAVE_STDLIB_H
1945 #include <stdlib.h>
1946 #endif
1947 #ifdef HAVE_UNISTD_H
1948 #include <unistd.h>
1949 #endif
1950 int main() {
1951 char *(*pfn) = (char *(*)) strstr
1952 ; return 0; }
1953 EOF
1954 if { (eval echo configure:1955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1955 rm -rf conftest*
1956 bfd_cv_decl_needed_strstr=no
1957 else
1958 echo "configure: failed program was:" >&5
1959 cat conftest.$ac_ext >&5
1960 rm -rf conftest*
1961 bfd_cv_decl_needed_strstr=yes
1962 fi
1963 rm -f conftest*
1964 fi
1965
1966 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
1967 if test $bfd_cv_decl_needed_strstr = yes; then
1968 bfd_tr_decl=NEED_DECLARATION_`echo strstr | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1969 cat >> confdefs.h <<EOF
1970 #define $bfd_tr_decl 1
1971 EOF
1972
1973 fi
1974
1975 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
1976 echo "configure:1977: checking whether malloc must be declared" >&5
1977 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
1978 echo $ac_n "(cached) $ac_c" 1>&6
1979 else
1980 cat > conftest.$ac_ext <<EOF
1981 #line 1982 "configure"
1982 #include "confdefs.h"
1983
1984 #include <stdio.h>
1985 #ifdef HAVE_STRING_H
1986 #include <string.h>
1987 #else
1988 #ifdef HAVE_STRINGS_H
1989 #include <strings.h>
1990 #endif
1991 #endif
1992 #ifdef HAVE_STDLIB_H
1993 #include <stdlib.h>
1994 #endif
1995 #ifdef HAVE_UNISTD_H
1996 #include <unistd.h>
1997 #endif
1998 int main() {
1999 char *(*pfn) = (char *(*)) malloc
2000 ; return 0; }
2001 EOF
2002 if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2003 rm -rf conftest*
2004 bfd_cv_decl_needed_malloc=no
2005 else
2006 echo "configure: failed program was:" >&5
2007 cat conftest.$ac_ext >&5
2008 rm -rf conftest*
2009 bfd_cv_decl_needed_malloc=yes
2010 fi
2011 rm -f conftest*
2012 fi
2013
2014 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
2015 if test $bfd_cv_decl_needed_malloc = yes; then
2016 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2017 cat >> confdefs.h <<EOF
2018 #define $bfd_tr_decl 1
2019 EOF
2020
2021 fi
2022
2023 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
2024 echo "configure:2025: checking whether realloc must be declared" >&5
2025 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
2026 echo $ac_n "(cached) $ac_c" 1>&6
2027 else
2028 cat > conftest.$ac_ext <<EOF
2029 #line 2030 "configure"
2030 #include "confdefs.h"
2031
2032 #include <stdio.h>
2033 #ifdef HAVE_STRING_H
2034 #include <string.h>
2035 #else
2036 #ifdef HAVE_STRINGS_H
2037 #include <strings.h>
2038 #endif
2039 #endif
2040 #ifdef HAVE_STDLIB_H
2041 #include <stdlib.h>
2042 #endif
2043 #ifdef HAVE_UNISTD_H
2044 #include <unistd.h>
2045 #endif
2046 int main() {
2047 char *(*pfn) = (char *(*)) realloc
2048 ; return 0; }
2049 EOF
2050 if { (eval echo configure:2051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2051 rm -rf conftest*
2052 bfd_cv_decl_needed_realloc=no
2053 else
2054 echo "configure: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 rm -rf conftest*
2057 bfd_cv_decl_needed_realloc=yes
2058 fi
2059 rm -f conftest*
2060 fi
2061
2062 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
2063 if test $bfd_cv_decl_needed_realloc = yes; then
2064 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2065 cat >> confdefs.h <<EOF
2066 #define $bfd_tr_decl 1
2067 EOF
2068
2069 fi
2070
2071 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
2072 echo "configure:2073: checking whether free must be declared" >&5
2073 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
2074 echo $ac_n "(cached) $ac_c" 1>&6
2075 else
2076 cat > conftest.$ac_ext <<EOF
2077 #line 2078 "configure"
2078 #include "confdefs.h"
2079
2080 #include <stdio.h>
2081 #ifdef HAVE_STRING_H
2082 #include <string.h>
2083 #else
2084 #ifdef HAVE_STRINGS_H
2085 #include <strings.h>
2086 #endif
2087 #endif
2088 #ifdef HAVE_STDLIB_H
2089 #include <stdlib.h>
2090 #endif
2091 #ifdef HAVE_UNISTD_H
2092 #include <unistd.h>
2093 #endif
2094 int main() {
2095 char *(*pfn) = (char *(*)) free
2096 ; return 0; }
2097 EOF
2098 if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2099 rm -rf conftest*
2100 bfd_cv_decl_needed_free=no
2101 else
2102 echo "configure: failed program was:" >&5
2103 cat conftest.$ac_ext >&5
2104 rm -rf conftest*
2105 bfd_cv_decl_needed_free=yes
2106 fi
2107 rm -f conftest*
2108 fi
2109
2110 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
2111 if test $bfd_cv_decl_needed_free = yes; then
2112 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2113 cat >> confdefs.h <<EOF
2114 #define $bfd_tr_decl 1
2115 EOF
2116
2117 fi
2118
2119 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
2120 echo "configure:2121: checking whether getenv must be declared" >&5
2121 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
2122 echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124 cat > conftest.$ac_ext <<EOF
2125 #line 2126 "configure"
2126 #include "confdefs.h"
2127
2128 #include <stdio.h>
2129 #ifdef HAVE_STRING_H
2130 #include <string.h>
2131 #else
2132 #ifdef HAVE_STRINGS_H
2133 #include <strings.h>
2134 #endif
2135 #endif
2136 #ifdef HAVE_STDLIB_H
2137 #include <stdlib.h>
2138 #endif
2139 #ifdef HAVE_UNISTD_H
2140 #include <unistd.h>
2141 #endif
2142 int main() {
2143 char *(*pfn) = (char *(*)) getenv
2144 ; return 0; }
2145 EOF
2146 if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2147 rm -rf conftest*
2148 bfd_cv_decl_needed_getenv=no
2149 else
2150 echo "configure: failed program was:" >&5
2151 cat conftest.$ac_ext >&5
2152 rm -rf conftest*
2153 bfd_cv_decl_needed_getenv=yes
2154 fi
2155 rm -f conftest*
2156 fi
2157
2158 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
2159 if test $bfd_cv_decl_needed_getenv = yes; then
2160 bfd_tr_decl=NEED_DECLARATION_`echo getenv | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2161 cat >> confdefs.h <<EOF
2162 #define $bfd_tr_decl 1
2163 EOF
2164
2165 fi
2166
2167
2168 # If we are configured native, pick a core file support file.
2169 COREFILE=
2170 COREFLAG=
2171 if test "${target}" = "${host}"; then
2172 case "${host}" in
2173 alpha*-*-linux*)
2174 COREFILE=trad-core.lo
2175 cat >> confdefs.h <<\EOF
2176 #define TRAD_HEADER "hosts/alphalinux.h"
2177 EOF
2178
2179 ;;
2180 alpha*-*-*) COREFILE=osf-core.lo ;;
2181 arm-*-riscix) COREFILE=trad-core.lo ;;
2182 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
2183 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
2184 hppa*-*-bsd*) COREFILE="hpux-core.lo hppabsd-core.lo"
2185 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
2186 i[3456]86-sequent-bsd*)
2187 COREFILE=trad-core.lo;
2188 cat >> confdefs.h <<\EOF
2189 #define TRAD_HEADER "hosts/symmetry.h"
2190 EOF
2191
2192 ;;
2193 i[3456]86-sequent-sysv4*) ;;
2194 i[3456]86-sequent-sysv*)
2195 COREFILE=trad-core.lo
2196 cat >> confdefs.h <<\EOF
2197 #define TRAD_HEADER "hosts/symmetry.h"
2198 EOF
2199
2200 ;;
2201 i[3456]86-*-bsd* | i[3456]86-*-freebsd*)
2202 COREFILE=trad-core.lo
2203 cat >> confdefs.h <<\EOF
2204 #define TRAD_HEADER "hosts/i386bsd.h"
2205 EOF
2206
2207 ;;
2208 i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
2209 COREFILE=netbsd-core.lo
2210 ;;
2211 i[3456]86-esix-sysv3*)
2212 COREFILE=trad-core.lo
2213 cat >> confdefs.h <<\EOF
2214 #define TRAD_HEADER "hosts/esix.h"
2215 EOF
2216
2217 ;;
2218 i[3456]86-*-sco* | i[3456]86-*-isc*)
2219 COREFILE=trad-core.lo
2220 cat >> confdefs.h <<\EOF
2221 #define TRAD_HEADER "hosts/i386sco.h"
2222 EOF
2223
2224 ;;
2225 i[3456]86-*-mach3*)
2226 COREFILE=trad-core.lo
2227 cat >> confdefs.h <<\EOF
2228 #define TRAD_HEADER "hosts/i386mach3.h"
2229 EOF
2230
2231 ;;
2232 i[3456]86-*-linux*)
2233 COREFILE=trad-core.lo
2234 cat >> confdefs.h <<\EOF
2235 #define TRAD_HEADER "hosts/i386linux.h"
2236 EOF
2237
2238 ;;
2239 i[3456]86-*-isc*) COREFILE=trad-core.lo ;;
2240 i[3456]86-*-aix*) COREFILE=aix386-core.lo ;;
2241 i860-*-mach3* | i860-*-osf1*)
2242 COREFILE=trad-core.lo
2243 cat >> confdefs.h <<\EOF
2244 #define TRAD_HEADER "hosts/i860mach3.h"
2245 EOF
2246
2247 ;;
2248 mips-dec-bsd*)
2249 COREFILE=trad-core.lo
2250 cat >> confdefs.h <<\EOF
2251 #define TRAD_HEADER "hosts/mipsbsd.h"
2252 EOF
2253
2254 ;;
2255 mips-dec-mach3*)
2256 COREFILE=trad-core.lo
2257 cat >> confdefs.h <<\EOF
2258 #define TRAD_HEADER "hosts/mipsmach3.h"
2259 EOF
2260
2261 ;;
2262 mips-*-netbsd* | mips*-*-openbsd*)
2263 COREFILE=netbsd-core.lo
2264 ;;
2265 mips-dec-*)
2266 COREFILE=trad-core.lo
2267 cat >> confdefs.h <<\EOF
2268 #define TRAD_HEADER "hosts/decstation.h"
2269 EOF
2270
2271 ;;
2272 mips-sgi-irix4*) COREFILE=irix-core.lo ;;
2273 mips-sgi-irix5*) COREFILE=irix-core.lo ;;
2274 mips-sgi-irix6*) COREFILE=irix-core.lo ;;
2275 mips-*-mach3*)
2276 COREFILE=trad-core.lo
2277 cat >> confdefs.h <<\EOF
2278 #define TRAD_HEADER "hosts/mipsmach3.h"
2279 EOF
2280
2281 ;;
2282 mips-*-sysv4*) ;;
2283 mips-*-sysv* | mips-*-riscos*)
2284 COREFILE=trad-core.lo
2285 cat >> confdefs.h <<\EOF
2286 #define TRAD_HEADER "hosts/riscos.h"
2287 EOF
2288
2289 ;;
2290 mips-sony-bsd*)
2291 COREFILE=trad-core.lo
2292 cat >> confdefs.h <<\EOF
2293 #define TRAD_HEADER "hosts/news-mips.h"
2294 EOF
2295
2296 ;;
2297 m68*-bull*-sysv*)
2298 COREFILE=trad-core.lo
2299 cat >> confdefs.h <<\EOF
2300 #define TRAD_HEADER "hosts/dpx2.h"
2301 EOF
2302
2303 ;;
2304 m68*-hp-hpux*) COREFILE=hpux-core.lo ;;
2305 m68*-hp-bsd*)
2306 COREFILE=trad-core.lo
2307 cat >> confdefs.h <<\EOF
2308 #define TRAD_HEADER "hosts/hp300bsd.h"
2309 EOF
2310
2311 ;;
2312 m68*-*-linux*)
2313 COREFILE=trad-core.lo
2314 cat >> confdefs.h <<\EOF
2315 #define TRAD_HEADER "hosts/m68klinux.h"
2316 EOF
2317
2318 ;;
2319 m68*-motorola-sysv*)
2320 COREFILE=trad-core.lo
2321 cat >> confdefs.h <<\EOF
2322 #define TRAD_HEADER "hosts/delta68.h"
2323 EOF
2324
2325 ;;
2326 m68*-sony-*)
2327 COREFILE=trad-core.lo
2328 cat >> confdefs.h <<\EOF
2329 #define TRAD_HEADER "hosts/news.h"
2330 EOF
2331
2332 ;;
2333 m68*-*-netbsd* | m68*-*-openbsd*)
2334 COREFILE=netbsd-core.lo
2335 ;;
2336 m68*-apple-aux*)
2337 COREFILE=trad-core.lo
2338 cat >> confdefs.h <<\EOF
2339 #define TRAD_HEADER "hosts/m68kaux.h"
2340 EOF
2341
2342 ;;
2343 m88*-*-sysv4*) ;;
2344 m88*-motorola-sysv*) COREFILE=ptrace-core.lo ;;
2345 m88*-*-mach3*)
2346 COREFILE=trad-core.lo
2347 cat >> confdefs.h <<\EOF
2348 #define TRAD_HEADER "hosts/m88kmach3.h"
2349 EOF
2350
2351 ;;
2352 ns32k-pc532-mach)
2353 COREFILE=trad-core.lo
2354 cat >> confdefs.h <<\EOF
2355 #define TRAD_HEADER "hosts/pc532mach.h"
2356 EOF
2357
2358 ;;
2359 ns32k-*-netbsd* | ns32k-*-openbsd*)
2360 COREFILE=netbsd-core.lo
2361 ;;
2362 rs6000-*-lynx*) COREFILE=lynx-core.lo ;;
2363 rs6000-*-aix4*) COREFILE=rs6000-core.lo ;;
2364 rs6000-*-*) COREFILE=rs6000-core.lo ;;
2365 powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
2366 powerpc-*-aix4*) COREFILE=rs6000-core.lo ;;
2367 powerpc-*-aix*) COREFILE=rs6000-core.lo ;;
2368 powerpc-*-beos*) ;;
2369 sparc-*-netbsd* | sparc-*-openbsd*)
2370 COREFILE=netbsd-core.lo
2371 ;;
2372 tahoe-*-*)
2373 COREFILE=trad-core.lo
2374 cat >> confdefs.h <<\EOF
2375 #define TRAD_HEADER "hosts/tahoe.h"
2376 EOF
2377
2378 ;;
2379 vax-*-ultrix2*)
2380 COREFILE=trad-core.lo
2381 cat >> confdefs.h <<\EOF
2382 #define TRAD_HEADER "hosts/vaxult2.h"
2383 EOF
2384
2385 ;;
2386 vax-*-ultrix*)
2387 COREFILE=trad-core.lo
2388 cat >> confdefs.h <<\EOF
2389 #define TRAD_HEADER "hosts/vaxult2.h"
2390 EOF
2391
2392 ;;
2393 vax-*-*)
2394 COREFILE=trad-core.lo
2395 cat >> confdefs.h <<\EOF
2396 #define TRAD_HEADER "hosts/vaxbsd.h"
2397 EOF
2398
2399 ;;
2400 esac
2401
2402 case "$COREFILE" in
2403 aix386-core.lo) COREFLAG=-DAIX386_CORE ;;
2404 hppabsd-core.lo) COREFLAG=-DHPPABSD_CORE ;;
2405 hpux-core.lo) COREFLAG=-DHPUX_CORE ;;
2406 irix-core.lo) COREFLAG=-DIRIX_CORE ;;
2407 lynx-core.lo) COREFLAG=-DLYNX_CORE ;;
2408 osf-core.lo) COREFLAG=-DOSF_CORE ;;
2409 ptrace-core.lo) COREFLAG=-DPTRACE_CORE ;;
2410 rs6000-core.lo) COREFLAG="$COREFLAG -DAIX_CORE" ;;
2411 trad-core.lo) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
2412 esac
2413
2414 # The ELF code uses the native <sys/procfs.h> to handle core files.
2415 # Define HAVE_SYS_PROCFS_H if the file exists and defines
2416 # prstatus_t.
2417 echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
2418 echo "configure:2419: checking for sys/procfs.h" >&5
2419 if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
2420 echo $ac_n "(cached) $ac_c" 1>&6
2421 else
2422 cat > conftest.$ac_ext <<EOF
2423 #line 2424 "configure"
2424 #include "confdefs.h"
2425 #include <sys/procfs.h>
2426 int main() {
2427 prstatus_t t;
2428 ; return 0; }
2429 EOF
2430 if { (eval echo configure:2431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2431 rm -rf conftest*
2432 bfd_cv_header_sys_procfs_h=yes
2433 else
2434 echo "configure: failed program was:" >&5
2435 cat conftest.$ac_ext >&5
2436 rm -rf conftest*
2437 bfd_cv_header_sys_procfs_h=no
2438 fi
2439 rm -f conftest*
2440 fi
2441
2442 echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
2443 if test $bfd_cv_header_sys_procfs_h = yes; then
2444 cat >> confdefs.h <<\EOF
2445 #define HAVE_SYS_PROCFS_H 1
2446 EOF
2447
2448 fi
2449
2450 fi
2451
2452
2453
2454 # target stuff:
2455
2456 # Canonicalize the secondary target names.
2457 if test -n "$enable_targets" ; then
2458 for targ in `echo $enable_targets | sed 's/,/ /g'`
2459 do
2460 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
2461 if test -n "$result" ; then
2462 canon_targets="$canon_targets $result"
2463 else
2464 # Allow targets that config.sub doesn't recognize, like "all".
2465 canon_targets="$canon_targets $targ"
2466 fi
2467 done
2468 fi
2469
2470 all_targets=false
2471 defvec=
2472 selvecs=
2473 selarchs=
2474 TDEFINES=
2475 for targ in $target $canon_targets
2476 do
2477 if test "x$targ" = "xall"; then
2478 all_targets=true
2479 else
2480 . $srcdir/config.bfd
2481 if test "x$targ" = "x$target"; then
2482 defvec=$targ_defvec
2483 fi
2484 selvecs="$selvecs $targ_defvec $targ_selvecs"
2485 selarchs="$selarchs $targ_archs"
2486 TDEFINES="$TDEFINES $targ_cflags"
2487 fi
2488 done
2489
2490
2491 # This processing still needs to be done if we're to decide properly whether
2492 # 64-bit support needs to be compiled in. Currently, it will be included if
2493 # the default or any other explicitly requested target requires it; it
2494 # will not be included on a 32-bit host if no 64-bit target is requested, and
2495 # no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
2496 # used.
2497
2498 # uniq the default and selected vectors in all the configured targets.
2499 f=""
2500 for i in $selvecs ; do
2501 case " $f " in
2502 *" $i "*) ;;
2503 *) f="$f $i" ;;
2504 esac
2505 done
2506 selvecs="$f"
2507
2508 # uniq the architectures in all the configured targets.
2509 f=""
2510 for i in $selarchs ; do
2511 case " $f " in
2512 *" $i "*) ;;
2513 *) f="$f $i" ;;
2514 esac
2515 done
2516 selarchs="$f"
2517
2518 # Target backend .o files.
2519 tb=
2520
2521 elf="elf.lo elflink.lo"
2522
2523 for vec in $selvecs
2524 do
2525 case "$vec" in
2526 # This list is alphabetized to make it easy to compare
2527 # with the two vector lists in targets.c.
2528 a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
2529 a_out_adobe_vec) tb="$tb aout-adobe.lo aout32.lo" ;;
2530 armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
2531 armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
2532 armpe_little_vec) tb="$tb pe-arm.lo cofflink.lo " ;;
2533 armpe_big_vec) tb="$tb pe-arm.lo cofflink.lo " ;;
2534 armpei_little_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
2535 armpei_big_vec) tb="$tb pei-arm.lo cofflink.lo " ;;
2536 aout0_big_vec) tb="$tb aout0.lo aout32.lo" ;;
2537 aout_arm_big_vec) tb="$tb aout-arm.lo aout32.lo" ;;
2538 aout_arm_little_vec) tb="$tb aout-arm.lo aout32.lo" ;;
2539 aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
2540 aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
2541 apollocoff_vec) tb="$tb coff-apollo.lo" ;;
2542 b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
2543 b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
2544 bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
2545 target64=true ;;
2546 # start-sanitize-arc
2547 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
2548 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
2549 # end-sanitize-arc
2550 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
2551 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
2552 bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
2553 target64=true ;;
2554 bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
2555 # start-sanitize-d30v
2556 bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
2557 # end-sanitize-d30v
2558 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
2559 bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
2560 bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
2561 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
2562 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
2563 bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
2564 target64=true ;;
2565 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
2566 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
2567 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
2568 bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
2569 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
2570 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
2571 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
2572 bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
2573 bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
2574 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
2575 # start-sanitize-v850
2576 bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
2577 # end-sanitize-v850
2578 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
2579 target64=true ;;
2580 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
2581 target64=true ;;
2582 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
2583 target64=true ;;
2584 cisco_core_vec) tb="$tb cisco-core.lo" ;;
2585 demo_64_vec) tb="$tb demo64.lo aout64.lo"
2586 target64=true ;;
2587 ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
2588 ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
2589 ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
2590 ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
2591 target64=true ;;
2592 go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
2593 go32stubbedcoff_vec) tb="$tb coff-stubgo32.lo cofflink.lo" ;;
2594 evax_alpha_vec) tb="$tb evax-alpha.lo evax-emh.lo evax-egsd.lo evax-etir.lo evax-misc.lo"
2595 target64=true ;;
2596 h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
2597 h8500coff_vec) tb="$tb coff-h8500.lo reloc16.lo" ;;
2598 host_aout_vec) tb="$tb host-aout.lo aout32.lo" ;;
2599 hp300bsd_vec) tb="$tb hp300bsd.lo aout32.lo" ;;
2600 hp300hpux_vec) tb="$tb hp300hpux.lo aout32.lo" ;;
2601 i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
2602 i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
2603 i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
2604 i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
2605 i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
2606 i386msdos_vec) tb="$tb i386msdos.lo" ;;
2607 i386pe_vec) tb="$tb pe-i386.lo cofflink.lo " ;;
2608 i386pei_vec) tb="$tb pei-i386.lo cofflink.lo" ;;
2609 i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
2610 i386lynx_aout_vec) tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
2611 i386lynx_coff_vec) tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
2612 i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
2613 i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
2614 i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
2615 i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
2616 icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
2617 icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
2618 ieee_vec) tb="$tb ieee.lo" ;;
2619 m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
2620 m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
2621 m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
2622 m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
2623 m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
2624 m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
2625 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
2626 m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
2627 m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;;
2628 m88kbcs_vec) tb="$tb coff-m88k.lo" ;;
2629 newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
2630 nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
2631 nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
2632 nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
2633 target64=true ;;
2634 riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
2635 nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
2636 pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
2637 pc532machaout_vec) tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
2638 pmac_xcoff_vec) tb="$tb coff-pmac.lo xcofflink.lo" ;;
2639 rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
2640 bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
2641 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo cofflink.lo" ;;
2642 bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
2643 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo cofflink.lo" ;;
2644 ppcboot_vec) tb="$tb ppcboot.lo" ;;
2645 shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
2646 shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
2647 som_vec) tb="$tb som.lo" ;;
2648 sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
2649 sparclinux_vec) tb="$tb sparclinux.lo aout32.lo stab-syms.lo" ;;
2650 sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
2651 sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
2652 sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
2653 sparccoff_vec) tb="$tb coff-sparc.lo" ;;
2654 srec_vec) tb="$tb srec.lo" ;;
2655 sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
2656 symbolsrec_vec) tb="$tb srec.lo" ;;
2657 tekhex_vec) tb="$tb tekhex.lo" ;;
2658 # start-sanitize-tic80
2659 tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
2660 # end-sanitize-tic80
2661 we32kcoff_vec) tb="$tb coff-we32k.lo" ;;
2662 z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;;
2663 w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;;
2664 versados_vec) tb="$tb versados.lo" ;;
2665
2666 "") ;;
2667 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
2668 esac
2669 done
2670
2671 # Target architecture .o files.
2672 # A couple of CPUs use shorter file names to avoid problems on DOS
2673 # filesystems.
2674 ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
2675
2676 # Weed out duplicate .o files.
2677 f=""
2678 for i in $tb ; do
2679 case " $f " in
2680 *" $i "*) ;;
2681 *) f="$f $i" ;;
2682 esac
2683 done
2684 tb="$f"
2685
2686 f=""
2687 for i in $ta ; do
2688 case " $f " in
2689 *" $i "*) ;;
2690 *) f="$f $i" ;;
2691 esac
2692 done
2693 ta="$f"
2694
2695 bfd_backends="$tb"
2696 bfd_machines="$ta"
2697
2698 if test x${all_targets} = xtrue ; then
2699 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
2700 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
2701 selvecs=
2702 havevecs=
2703 selarchs=
2704 else # all_targets is true
2705 # Only set these if they will be nonempty, for the clever echo.
2706 havevecs=
2707 test -n "$selvecs" &&
2708 havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
2709 test -n "$selvecs" &&
2710 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
2711 test -n "$selarchs" &&
2712 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
2713 fi # all_targets is true
2714
2715 case ${host64}-${target64}-${want64} in
2716 *true*)
2717 wordsize=64
2718 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
2719 if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
2720 echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
2721 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
2722 fi
2723 ;;
2724 false-false-false)
2725 wordsize=32
2726 all_backends='$(BFD32_BACKENDS)'
2727 ;;
2728 esac
2729
2730
2731
2732
2733
2734
2735 tdefaults=""
2736 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
2737 test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
2738 test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
2739 test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
2740
2741
2742 for ac_hdr in unistd.h
2743 do
2744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2746 echo "configure:2747: checking for $ac_hdr" >&5
2747 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2748 echo $ac_n "(cached) $ac_c" 1>&6
2749 else
2750 cat > conftest.$ac_ext <<EOF
2751 #line 2752 "configure"
2752 #include "confdefs.h"
2753 #include <$ac_hdr>
2754 EOF
2755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2756 { (eval echo configure:2757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2757 ac_err=`grep -v '^ *+' conftest.out`
2758 if test -z "$ac_err"; then
2759 rm -rf conftest*
2760 eval "ac_cv_header_$ac_safe=yes"
2761 else
2762 echo "$ac_err" >&5
2763 echo "configure: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 rm -rf conftest*
2766 eval "ac_cv_header_$ac_safe=no"
2767 fi
2768 rm -f conftest*
2769 fi
2770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2771 echo "$ac_t""yes" 1>&6
2772 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2773 cat >> confdefs.h <<EOF
2774 #define $ac_tr_hdr 1
2775 EOF
2776
2777 else
2778 echo "$ac_t""no" 1>&6
2779 fi
2780 done
2781
2782 for ac_func in getpagesize
2783 do
2784 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2785 echo "configure:2786: checking for $ac_func" >&5
2786 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2787 echo $ac_n "(cached) $ac_c" 1>&6
2788 else
2789 cat > conftest.$ac_ext <<EOF
2790 #line 2791 "configure"
2791 #include "confdefs.h"
2792 /* System header to define __stub macros and hopefully few prototypes,
2793 which can conflict with char $ac_func(); below. */
2794 #include <assert.h>
2795 /* Override any gcc2 internal prototype to avoid an error. */
2796 /* We use char because int might match the return type of a gcc2
2797 builtin and then its argument prototype would still apply. */
2798 char $ac_func();
2799
2800 int main() {
2801
2802 /* The GNU C library defines this for functions which it implements
2803 to always fail with ENOSYS. Some functions are actually named
2804 something starting with __ and the normal name is an alias. */
2805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2806 choke me
2807 #else
2808 $ac_func();
2809 #endif
2810
2811 ; return 0; }
2812 EOF
2813 if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2814 rm -rf conftest*
2815 eval "ac_cv_func_$ac_func=yes"
2816 else
2817 echo "configure: failed program was:" >&5
2818 cat conftest.$ac_ext >&5
2819 rm -rf conftest*
2820 eval "ac_cv_func_$ac_func=no"
2821 fi
2822 rm -f conftest*
2823 fi
2824
2825 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2826 echo "$ac_t""yes" 1>&6
2827 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2828 cat >> confdefs.h <<EOF
2829 #define $ac_tr_func 1
2830 EOF
2831
2832 else
2833 echo "$ac_t""no" 1>&6
2834 fi
2835 done
2836
2837 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2838 echo "configure:2839: checking for working mmap" >&5
2839 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2840 echo $ac_n "(cached) $ac_c" 1>&6
2841 else
2842 if test "$cross_compiling" = yes; then
2843 ac_cv_func_mmap_fixed_mapped=no
2844 else
2845 cat > conftest.$ac_ext <<EOF
2846 #line 2847 "configure"
2847 #include "confdefs.h"
2848
2849 /* Thanks to Mike Haertel and Jim Avera for this test.
2850 Here is a matrix of mmap possibilities:
2851 mmap private not fixed
2852 mmap private fixed at somewhere currently unmapped
2853 mmap private fixed at somewhere already mapped
2854 mmap shared not fixed
2855 mmap shared fixed at somewhere currently unmapped
2856 mmap shared fixed at somewhere already mapped
2857 For private mappings, we should verify that changes cannot be read()
2858 back from the file, nor mmap's back from the file at a different
2859 address. (There have been systems where private was not correctly
2860 implemented like the infamous i386 svr4.0, and systems where the
2861 VM page cache was not coherent with the filesystem buffer cache
2862 like early versions of FreeBSD and possibly contemporary NetBSD.)
2863 For shared mappings, we should conversely verify that changes get
2864 propogated back to all the places they're supposed to be.
2865
2866 Grep wants private fixed already mapped.
2867 The main things grep needs to know about mmap are:
2868 * does it exist and is it safe to write into the mmap'd area
2869 * how to use it (BSD variants) */
2870 #include <sys/types.h>
2871 #include <fcntl.h>
2872 #include <sys/mman.h>
2873
2874 /* This mess was copied from the GNU getpagesize.h. */
2875 #ifndef HAVE_GETPAGESIZE
2876 # ifdef HAVE_UNISTD_H
2877 # include <unistd.h>
2878 # endif
2879
2880 /* Assume that all systems that can run configure have sys/param.h. */
2881 # ifndef HAVE_SYS_PARAM_H
2882 # define HAVE_SYS_PARAM_H 1
2883 # endif
2884
2885 # ifdef _SC_PAGESIZE
2886 # define getpagesize() sysconf(_SC_PAGESIZE)
2887 # else /* no _SC_PAGESIZE */
2888 # ifdef HAVE_SYS_PARAM_H
2889 # include <sys/param.h>
2890 # ifdef EXEC_PAGESIZE
2891 # define getpagesize() EXEC_PAGESIZE
2892 # else /* no EXEC_PAGESIZE */
2893 # ifdef NBPG
2894 # define getpagesize() NBPG * CLSIZE
2895 # ifndef CLSIZE
2896 # define CLSIZE 1
2897 # endif /* no CLSIZE */
2898 # else /* no NBPG */
2899 # ifdef NBPC
2900 # define getpagesize() NBPC
2901 # else /* no NBPC */
2902 # ifdef PAGESIZE
2903 # define getpagesize() PAGESIZE
2904 # endif /* PAGESIZE */
2905 # endif /* no NBPC */
2906 # endif /* no NBPG */
2907 # endif /* no EXEC_PAGESIZE */
2908 # else /* no HAVE_SYS_PARAM_H */
2909 # define getpagesize() 8192 /* punt totally */
2910 # endif /* no HAVE_SYS_PARAM_H */
2911 # endif /* no _SC_PAGESIZE */
2912
2913 #endif /* no HAVE_GETPAGESIZE */
2914
2915 #ifdef __cplusplus
2916 extern "C" { void *malloc(unsigned); }
2917 #else
2918 char *malloc();
2919 #endif
2920
2921 int
2922 main()
2923 {
2924 char *data, *data2, *data3;
2925 int i, pagesize;
2926 int fd;
2927
2928 pagesize = getpagesize();
2929
2930 /*
2931 * First, make a file with some known garbage in it.
2932 */
2933 data = malloc(pagesize);
2934 if (!data)
2935 exit(1);
2936 for (i = 0; i < pagesize; ++i)
2937 *(data + i) = rand();
2938 umask(0);
2939 fd = creat("conftestmmap", 0600);
2940 if (fd < 0)
2941 exit(1);
2942 if (write(fd, data, pagesize) != pagesize)
2943 exit(1);
2944 close(fd);
2945
2946 /*
2947 * Next, try to mmap the file at a fixed address which
2948 * already has something else allocated at it. If we can,
2949 * also make sure that we see the same garbage.
2950 */
2951 fd = open("conftestmmap", O_RDWR);
2952 if (fd < 0)
2953 exit(1);
2954 data2 = malloc(2 * pagesize);
2955 if (!data2)
2956 exit(1);
2957 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2958 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2959 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2960 exit(1);
2961 for (i = 0; i < pagesize; ++i)
2962 if (*(data + i) != *(data2 + i))
2963 exit(1);
2964
2965 /*
2966 * Finally, make sure that changes to the mapped area
2967 * do not percolate back to the file as seen by read().
2968 * (This is a bug on some variants of i386 svr4.0.)
2969 */
2970 for (i = 0; i < pagesize; ++i)
2971 *(data2 + i) = *(data2 + i) + 1;
2972 data3 = malloc(pagesize);
2973 if (!data3)
2974 exit(1);
2975 if (read(fd, data3, pagesize) != pagesize)
2976 exit(1);
2977 for (i = 0; i < pagesize; ++i)
2978 if (*(data + i) != *(data3 + i))
2979 exit(1);
2980 close(fd);
2981 unlink("conftestmmap");
2982 exit(0);
2983 }
2984
2985 EOF
2986 if { (eval echo configure:2987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2987 then
2988 ac_cv_func_mmap_fixed_mapped=yes
2989 else
2990 echo "configure: failed program was:" >&5
2991 cat conftest.$ac_ext >&5
2992 rm -fr conftest*
2993 ac_cv_func_mmap_fixed_mapped=no
2994 fi
2995 rm -fr conftest*
2996 fi
2997
2998 fi
2999
3000 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3001 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3002 cat >> confdefs.h <<\EOF
3003 #define HAVE_MMAP 1
3004 EOF
3005
3006 fi
3007
3008 for ac_func in madvise mprotect
3009 do
3010 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3011 echo "configure:3012: checking for $ac_func" >&5
3012 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3013 echo $ac_n "(cached) $ac_c" 1>&6
3014 else
3015 cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018 /* System header to define __stub macros and hopefully few prototypes,
3019 which can conflict with char $ac_func(); below. */
3020 #include <assert.h>
3021 /* Override any gcc2 internal prototype to avoid an error. */
3022 /* We use char because int might match the return type of a gcc2
3023 builtin and then its argument prototype would still apply. */
3024 char $ac_func();
3025
3026 int main() {
3027
3028 /* The GNU C library defines this for functions which it implements
3029 to always fail with ENOSYS. Some functions are actually named
3030 something starting with __ and the normal name is an alias. */
3031 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3032 choke me
3033 #else
3034 $ac_func();
3035 #endif
3036
3037 ; return 0; }
3038 EOF
3039 if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3040 rm -rf conftest*
3041 eval "ac_cv_func_$ac_func=yes"
3042 else
3043 echo "configure: failed program was:" >&5
3044 cat conftest.$ac_ext >&5
3045 rm -rf conftest*
3046 eval "ac_cv_func_$ac_func=no"
3047 fi
3048 rm -f conftest*
3049 fi
3050
3051 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3052 echo "$ac_t""yes" 1>&6
3053 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3054 cat >> confdefs.h <<EOF
3055 #define $ac_tr_func 1
3056 EOF
3057
3058 else
3059 echo "$ac_t""no" 1>&6
3060 fi
3061 done
3062
3063 case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
3064 true+yes ) cat >> confdefs.h <<\EOF
3065 #define USE_MMAP 1
3066 EOF
3067 ;;
3068 esac
3069
3070 rm -f doc/config.status
3071 trap '' 1 2 15
3072 cat > confcache <<\EOF
3073 # This file is a shell script that caches the results of configure
3074 # tests run on this system so they can be shared between configure
3075 # scripts and configure runs. It is not useful on other systems.
3076 # If it contains results you don't want to keep, you may remove or edit it.
3077 #
3078 # By default, configure uses ./config.cache as the cache file,
3079 # creating it if it does not exist already. You can give configure
3080 # the --cache-file=FILE option to use a different cache file; that is
3081 # what configure does when it calls configure scripts in
3082 # subdirectories, so they share the cache.
3083 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3084 # config.status only pays attention to the cache file if you give it the
3085 # --recheck option to rerun configure.
3086 #
3087 EOF
3088 # The following way of writing the cache mishandles newlines in values,
3089 # but we know of no workaround that is simple, portable, and efficient.
3090 # So, don't put newlines in cache variables' values.
3091 # Ultrix sh set writes to stderr and can't be redirected directly,
3092 # and sets the high bit in the cache file unless we assign to the vars.
3093 (set) 2>&1 |
3094 case `(ac_space=' '; set) 2>&1` in
3095 *ac_space=\ *)
3096 # `set' does not quote correctly, so add quotes (double-quote substitution
3097 # turns \\\\ into \\, and sed turns \\ into \).
3098 sed -n \
3099 -e "s/'/'\\\\''/g" \
3100 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3101 ;;
3102 *)
3103 # `set' quotes correctly as required by POSIX, so do not add quotes.
3104 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3105 ;;
3106 esac >> confcache
3107 if cmp -s $cache_file confcache; then
3108 :
3109 else
3110 if test -w $cache_file; then
3111 echo "updating cache $cache_file"
3112 cat confcache > $cache_file
3113 else
3114 echo "not updating unwritable cache $cache_file"
3115 fi
3116 fi
3117 rm -f confcache
3118
3119 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3120
3121 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3122 # Let make expand exec_prefix.
3123 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3124
3125 # Any assignment to VPATH causes Sun make to only execute
3126 # the first set of double-colon rules, so remove it if not needed.
3127 # If there is a colon in the path, we need to keep it.
3128 if test "x$srcdir" = x.; then
3129 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3130 fi
3131
3132 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3133
3134 DEFS=-DHAVE_CONFIG_H
3135
3136 # Without the "./", some shells look in PATH for config.status.
3137 : ${CONFIG_STATUS=./config.status}
3138
3139 echo creating $CONFIG_STATUS
3140 rm -f $CONFIG_STATUS
3141 cat > $CONFIG_STATUS <<EOF
3142 #! /bin/sh
3143 # Generated automatically by configure.
3144 # Run this file to recreate the current configuration.
3145 # This directory was configured as follows,
3146 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3147 #
3148 # $0 $ac_configure_args
3149 #
3150 # Compiler output produced by configure, useful for debugging
3151 # configure, is in ./config.log if it exists.
3152
3153 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3154 for ac_option
3155 do
3156 case "\$ac_option" in
3157 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3158 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3159 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3160 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3161 echo "$CONFIG_STATUS generated by autoconf version 2.12"
3162 exit 0 ;;
3163 -help | --help | --hel | --he | --h)
3164 echo "\$ac_cs_usage"; exit 0 ;;
3165 *) echo "\$ac_cs_usage"; exit 1 ;;
3166 esac
3167 done
3168
3169 ac_given_srcdir=$srcdir
3170 ac_given_INSTALL="$INSTALL"
3171
3172 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
3173 EOF
3174 cat >> $CONFIG_STATUS <<EOF
3175
3176 # Protect against being on the right side of a sed subst in config.status.
3177 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3178 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3179 $ac_vpsub
3180 $extrasub
3181 s%@CFLAGS@%$CFLAGS%g
3182 s%@CPPFLAGS@%$CPPFLAGS%g
3183 s%@CXXFLAGS@%$CXXFLAGS%g
3184 s%@DEFS@%$DEFS%g
3185 s%@LDFLAGS@%$LDFLAGS%g
3186 s%@LIBS@%$LIBS%g
3187 s%@exec_prefix@%$exec_prefix%g
3188 s%@prefix@%$prefix%g
3189 s%@program_transform_name@%$program_transform_name%g
3190 s%@bindir@%$bindir%g
3191 s%@sbindir@%$sbindir%g
3192 s%@libexecdir@%$libexecdir%g
3193 s%@datadir@%$datadir%g
3194 s%@sysconfdir@%$sysconfdir%g
3195 s%@sharedstatedir@%$sharedstatedir%g
3196 s%@localstatedir@%$localstatedir%g
3197 s%@libdir@%$libdir%g
3198 s%@includedir@%$includedir%g
3199 s%@oldincludedir@%$oldincludedir%g
3200 s%@infodir@%$infodir%g
3201 s%@mandir@%$mandir%g
3202 s%@host@%$host%g
3203 s%@host_alias@%$host_alias%g
3204 s%@host_cpu@%$host_cpu%g
3205 s%@host_vendor@%$host_vendor%g
3206 s%@host_os@%$host_os%g
3207 s%@target@%$target%g
3208 s%@target_alias@%$target_alias%g
3209 s%@target_cpu@%$target_cpu%g
3210 s%@target_vendor@%$target_vendor%g
3211 s%@target_os@%$target_os%g
3212 s%@build@%$build%g
3213 s%@build_alias@%$build_alias%g
3214 s%@build_cpu@%$build_cpu%g
3215 s%@build_vendor@%$build_vendor%g
3216 s%@build_os@%$build_os%g
3217 s%@CC@%$CC%g
3218 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3219 s%@INSTALL_DATA@%$INSTALL_DATA%g
3220 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3221 s%@PACKAGE@%$PACKAGE%g
3222 s%@VERSION@%$VERSION%g
3223 s%@ACLOCAL@%$ACLOCAL%g
3224 s%@AUTOCONF@%$AUTOCONF%g
3225 s%@AUTOMAKE@%$AUTOMAKE%g
3226 s%@AUTOHEADER@%$AUTOHEADER%g
3227 s%@MAKEINFO@%$MAKEINFO%g
3228 s%@SET_MAKE@%$SET_MAKE%g
3229 s%@RANLIB@%$RANLIB%g
3230 s%@LD@%$LD%g
3231 s%@LN_S@%$LN_S%g
3232 s%@LIBTOOL@%$LIBTOOL%g
3233 s%@MAINT@%$MAINT%g
3234 s%@EXEEXT@%$EXEEXT%g
3235 s%@HDEFINES@%$HDEFINES%g
3236 s%@AR@%$AR%g
3237 s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
3238 s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
3239 s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
3240 s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
3241 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
3242 s%@CPP@%$CPP%g
3243 s%@COREFILE@%$COREFILE%g
3244 s%@COREFLAG@%$COREFLAG%g
3245 s%@TDEFINES@%$TDEFINES%g
3246 s%@wordsize@%$wordsize%g
3247 s%@all_backends@%$all_backends%g
3248 s%@bfd_backends@%$bfd_backends%g
3249 s%@bfd_machines@%$bfd_machines%g
3250 s%@tdefaults@%$tdefaults%g
3251
3252 CEOF
3253 EOF
3254
3255 cat >> $CONFIG_STATUS <<\EOF
3256
3257 # Split the substitutions into bite-sized pieces for seds with
3258 # small command number limits, like on Digital OSF/1 and HP-UX.
3259 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3260 ac_file=1 # Number of current file.
3261 ac_beg=1 # First line for current file.
3262 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3263 ac_more_lines=:
3264 ac_sed_cmds=""
3265 while $ac_more_lines; do
3266 if test $ac_beg -gt 1; then
3267 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3268 else
3269 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3270 fi
3271 if test ! -s conftest.s$ac_file; then
3272 ac_more_lines=false
3273 rm -f conftest.s$ac_file
3274 else
3275 if test -z "$ac_sed_cmds"; then
3276 ac_sed_cmds="sed -f conftest.s$ac_file"
3277 else
3278 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3279 fi
3280 ac_file=`expr $ac_file + 1`
3281 ac_beg=$ac_end
3282 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3283 fi
3284 done
3285 if test -z "$ac_sed_cmds"; then
3286 ac_sed_cmds=cat
3287 fi
3288 EOF
3289
3290 cat >> $CONFIG_STATUS <<EOF
3291
3292 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h"}
3293 EOF
3294 cat >> $CONFIG_STATUS <<\EOF
3295 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3296 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3297 case "$ac_file" in
3298 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3299 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3300 *) ac_file_in="${ac_file}.in" ;;
3301 esac
3302
3303 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3304
3305 # Remove last slash and all that follows it. Not all systems have dirname.
3306 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3307 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3308 # The file is in a subdirectory.
3309 test ! -d "$ac_dir" && mkdir "$ac_dir"
3310 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3311 # A "../" for each directory in $ac_dir_suffix.
3312 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3313 else
3314 ac_dir_suffix= ac_dots=
3315 fi
3316
3317 case "$ac_given_srcdir" in
3318 .) srcdir=.
3319 if test -z "$ac_dots"; then top_srcdir=.
3320 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3321 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3322 *) # Relative path.
3323 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3324 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3325 esac
3326
3327 case "$ac_given_INSTALL" in
3328 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3329 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3330 esac
3331
3332 echo creating "$ac_file"
3333 rm -f "$ac_file"
3334 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3335 case "$ac_file" in
3336 *Makefile*) ac_comsub="1i\\
3337 # $configure_input" ;;
3338 *) ac_comsub= ;;
3339 esac
3340
3341 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3342 sed -e "$ac_comsub
3343 s%@configure_input@%$configure_input%g
3344 s%@srcdir@%$srcdir%g
3345 s%@top_srcdir@%$top_srcdir%g
3346 s%@INSTALL@%$INSTALL%g
3347 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3348 fi; done
3349 rm -f conftest.s*
3350
3351 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3352 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3353 #
3354 # ac_d sets the value in "#define NAME VALUE" lines.
3355 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3356 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3357 ac_dC='\3'
3358 ac_dD='%g'
3359 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3360 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3361 ac_uB='\([ ]\)%\1#\2define\3'
3362 ac_uC=' '
3363 ac_uD='\4%g'
3364 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3365 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3366 ac_eB='$%\1#\2define\3'
3367 ac_eC=' '
3368 ac_eD='%g'
3369
3370 if test "${CONFIG_HEADERS+set}" != set; then
3371 EOF
3372 cat >> $CONFIG_STATUS <<EOF
3373 CONFIG_HEADERS="config.h:config.in"
3374 EOF
3375 cat >> $CONFIG_STATUS <<\EOF
3376 fi
3377 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3378 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3379 case "$ac_file" in
3380 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3381 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3382 *) ac_file_in="${ac_file}.in" ;;
3383 esac
3384
3385 echo creating $ac_file
3386
3387 rm -f conftest.frag conftest.in conftest.out
3388 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3389 cat $ac_file_inputs > conftest.in
3390
3391 EOF
3392
3393 # Transform confdefs.h into a sed script conftest.vals that substitutes
3394 # the proper values into config.h.in to produce config.h. And first:
3395 # Protect against being on the right side of a sed subst in config.status.
3396 # Protect against being in an unquoted here document in config.status.
3397 rm -f conftest.vals
3398 cat > conftest.hdr <<\EOF
3399 s/[\\&%]/\\&/g
3400 s%[\\$`]%\\&%g
3401 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3402 s%ac_d%ac_u%gp
3403 s%ac_u%ac_e%gp
3404 EOF
3405 sed -n -f conftest.hdr confdefs.h > conftest.vals
3406 rm -f conftest.hdr
3407
3408 # This sed command replaces #undef with comments. This is necessary, for
3409 # example, in the case of _POSIX_SOURCE, which is predefined and required
3410 # on some systems where configure will not decide to define it.
3411 cat >> conftest.vals <<\EOF
3412 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3413 EOF
3414
3415 # Break up conftest.vals because some shells have a limit on
3416 # the size of here documents, and old seds have small limits too.
3417
3418 rm -f conftest.tail
3419 while :
3420 do
3421 ac_lines=`grep -c . conftest.vals`
3422 # grep -c gives empty output for an empty file on some AIX systems.
3423 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3424 # Write a limited-size here document to conftest.frag.
3425 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3426 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3427 echo 'CEOF
3428 sed -f conftest.frag conftest.in > conftest.out
3429 rm -f conftest.in
3430 mv conftest.out conftest.in
3431 ' >> $CONFIG_STATUS
3432 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3433 rm -f conftest.vals
3434 mv conftest.tail conftest.vals
3435 done
3436 rm -f conftest.vals
3437
3438 cat >> $CONFIG_STATUS <<\EOF
3439 rm -f conftest.frag conftest.h
3440 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3441 cat conftest.in >> conftest.h
3442 rm -f conftest.in
3443 if cmp -s $ac_file conftest.h 2>/dev/null; then
3444 echo "$ac_file is unchanged"
3445 rm -f conftest.h
3446 else
3447 # Remove last slash and all that follows it. Not all systems have dirname.
3448 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3449 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3450 # The file is in a subdirectory.
3451 test ! -d "$ac_dir" && mkdir "$ac_dir"
3452 fi
3453 rm -f $ac_file
3454 mv conftest.h $ac_file
3455 fi
3456 fi; done
3457
3458 EOF
3459 cat >> $CONFIG_STATUS <<EOF
3460
3461
3462 EOF
3463 cat >> $CONFIG_STATUS <<\EOF
3464 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3465
3466 exit 0
3467 EOF
3468 chmod +x $CONFIG_STATUS
3469 rm -fr confdefs* $ac_clean_files
3470 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3471