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