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