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