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