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