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