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