* config/tc-h8300.c (do_a_fix_imm): Rename last argument to
[deliverable/binutils-gdb.git] / bfd / configure
CommitLineData
8c693660
KR
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
986cf3b8 4# Generated automatically using autoconf version 2.8
8c693660
KR
5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
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)
986cf3b8 343 echo "configure generated by autoconf version 2.8"
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 ;;
553 *) { echo "configure: error: bad value ${enableval} for BFD shared option" 1>&2; exit 1; } ;;
554esac
555fi
556# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
557if test "${enable_commonbfdlib+set}" = set; then
558 enableval="$enable_commonbfdlib"
559 case "${enableval}" in
560 yes) commonbfdlib=true ;;
561 no) commonbfdlib=false ;;
562 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
563esac
564fi
85e493f0
ILT
565# Check whether --with-mmap or --without-mmap was given.
566if test "${with_mmap+set}" = set; then
567 withval="$with_mmap"
568 case "${withval}" in
569 yes) want_mmap=true ;;
570 no) want_mmap=false ;;
571 *) { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
572esac
573else
574 want_mmap=false
575fi
8c693660 576
b7577823
ILT
577
578
8c693660
KR
579ac_aux_dir=
580for ac_dir in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`; do
581 if test -f $ac_dir/install-sh; then
582 ac_aux_dir=$ac_dir
583 ac_install_sh="$ac_aux_dir/install-sh -c"
584 break
585 elif test -f $ac_dir/install.sh; then
586 ac_aux_dir=$ac_dir
587 ac_install_sh="$ac_aux_dir/install.sh -c"
588 break
589 fi
590done
591if test -z "$ac_aux_dir"; then
592 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir/..;pwd` $srcdir/`cd $srcdir/..;pwd`" 1>&2; exit 1; }
593fi
594ac_config_guess=$ac_aux_dir/config.guess
595ac_config_sub=$ac_aux_dir/config.sub
596ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
597
598
599# Do some error checking and defaulting for the host and target type.
600# The inputs are:
601# configure --host=HOST --target=TARGET --build=BUILD NONOPT
602#
603# The rules are:
604# 1. You are not allowed to specify --host, --target, and nonopt at the
85e493f0 605# same time.
8c693660
KR
606# 2. Host defaults to nonopt.
607# 3. If nonopt is not specified, then host defaults to the current host,
608# as determined by config.guess.
609# 4. Target and build default to nonopt.
610# 5. If nonopt is not specified, then target and build default to host.
611
612# The aliases save the names the user supplied, while $host etc.
613# will get canonicalized.
614case $host---$target---$nonopt in
615NONE---*---* | *---NONE---* | *---*---NONE) ;;
616*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
617esac
618
619
620# Make sure we can run config.sub.
621if $ac_config_sub sun4 >/dev/null 2>&1; then :
622else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
623fi
624
625echo $ac_n "checking host system type""... $ac_c" 1>&6
626
627host_alias=$host
628case "$host_alias" in
629NONE)
630 case $nonopt in
631 NONE)
632 if host_alias=`$ac_config_guess`; then :
633 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
634 fi ;;
635 *) host_alias=$nonopt ;;
636 esac ;;
637esac
638
639host=`$ac_config_sub $host_alias`
640host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
641host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
642host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
643echo "$ac_t""$host" 1>&6
644
645echo $ac_n "checking target system type""... $ac_c" 1>&6
646
647target_alias=$target
648case "$target_alias" in
649NONE)
650 case $nonopt in
651 NONE) target_alias=$host_alias ;;
652 *) target_alias=$nonopt ;;
653 esac ;;
654esac
655
656target=`$ac_config_sub $target_alias`
657target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
658target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
659target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
660echo "$ac_t""$target" 1>&6
661
662echo $ac_n "checking build system type""... $ac_c" 1>&6
663
664build_alias=$build
665case "$build_alias" in
666NONE)
667 case $nonopt in
668 NONE) build_alias=$host_alias ;;
669 *) build_alias=$nonopt ;;
670 esac ;;
671esac
672
673build=`$ac_config_sub $build_alias`
674build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
675build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
676build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
677echo "$ac_t""$build" 1>&6
678
679test "$host_alias" != "$target_alias" &&
680 test "$program_prefix$program_suffix$program_transform_name" = \
681 NONENONEs,x,x, &&
682 program_prefix=${target_alias}-
683
684if test -z "$target" ; then
685 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
686fi
687if test "$program_transform_name" = s,x,x,; then
688 program_transform_name=
689else
d19df9b5
ILT
690 # Double any \ or $. echo might interpret backslashes.
691 cat <<\EOF_SED > conftestsed
692s,\\,\\\\,g; s,\$,$$,g
693EOF_SED
8c693660
KR
694 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
695 rm -f conftestsed
696fi
697test "$program_prefix" != NONE &&
698 program_transform_name="s,^,${program_prefix},; $program_transform_name"
699# Use a double $ so make ignores it.
700test "$program_suffix" != NONE &&
701 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
702
703# sed with no file args requires a program.
704test "$program_transform_name" = "" && program_transform_name="s,x,x,"
705
706
707host64=false
708target64=false
709
710# host stuff:
711
44f795f7
ILT
712ALLLIBS='$(TARGETLIB)'
713PICFLAG=
c189fdfb
ILT
714SHLIB=unused-shlib
715SHLINK=unused-shlink
44f795f7
ILT
716if test "${shared}" = "true"; then
717 PICFLAG=-fpic
718 if test "${commonbfdlib}" = "true"; then
719 ALLLIBS='$(TARGETLIB)'
720 else
721 ALLLIBS='$(TARGETLIB) $(SHLIB) $(SHLINK)'
722 SHLIB=libbfd.so.`sed -e 's/[^0-9]*\([0-9.]*\).*/\1/' ${srcdir}/VERSION`
723 SHLINK=libbfd.so
724 fi
725fi
726
85e493f0
ILT
727# Extract the first word of "gcc", so it can be a program name with args.
728set dummy gcc; ac_word=$2
729echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
731 echo $ac_n "(cached) $ac_c" 1>&6
732else
733 if test -n "$CC"; then
734 ac_cv_prog_CC="$CC" # Let the user override the test.
735else
736 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
737 for ac_dir in $PATH; do
738 test -z "$ac_dir" && ac_dir=.
739 if test -f $ac_dir/$ac_word; then
740 ac_cv_prog_CC="gcc"
741 break
742 fi
743 done
744 IFS="$ac_save_ifs"
85e493f0
ILT
745fi
746fi
747CC="$ac_cv_prog_CC"
748if test -n "$CC"; then
749 echo "$ac_t""$CC" 1>&6
750else
751 echo "$ac_t""no" 1>&6
752fi
753
986cf3b8
ILT
754if test -z "$CC"; then
755 # Extract the first word of "cc", so it can be a program name with args.
756set dummy cc; ac_word=$2
757echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
758if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
759 echo $ac_n "(cached) $ac_c" 1>&6
760else
761 if test -n "$CC"; then
762 ac_cv_prog_CC="$CC" # Let the user override the test.
763else
764 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
765 ac_prog_rejected=no
766 for ac_dir in $PATH; do
767 test -z "$ac_dir" && ac_dir=.
768 if test -f $ac_dir/$ac_word; then
769 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
770 ac_prog_rejected=yes
771 continue
772 fi
773 ac_cv_prog_CC="cc"
774 break
775 fi
776 done
777 IFS="$ac_save_ifs"
778if test $ac_prog_rejected = yes; then
779 # We found a bogon in the path, so make sure we never use it.
780 set dummy $ac_cv_prog_CC
781 shift
782 if test $# -gt 0; then
783 # We chose a different compiler from the bogus one.
784 # However, it has the same basename, so the bogon will be chosen
785 # first if we set CC to just the basename; use the full file name.
786 shift
787 set dummy "$ac_dir/$ac_word" "$@"
788 shift
789 ac_cv_prog_CC="$@"
790 fi
791fi
792fi
793fi
794CC="$ac_cv_prog_CC"
795if test -n "$CC"; then
796 echo "$ac_t""$CC" 1>&6
797else
798 echo "$ac_t""no" 1>&6
799fi
800
801 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
802fi
f515fb2f 803
85e493f0
ILT
804echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
805if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
806 echo $ac_n "(cached) $ac_c" 1>&6
807else
808 cat > conftest.c <<EOF
f515fb2f
ILT
809#ifdef __GNUC__
810 yes;
811#endif
812EOF
986cf3b8 813if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
85e493f0
ILT
814 ac_cv_prog_gcc=yes
815else
816 ac_cv_prog_gcc=no
817fi
818fi
819
820echo "$ac_t""$ac_cv_prog_gcc" 1>&6
821if test $ac_cv_prog_gcc = yes; then
f515fb2f
ILT
822 GCC=yes
823 if test "${CFLAGS+set}" != set; then
85e493f0
ILT
824 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
825if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
826 echo $ac_n "(cached) $ac_c" 1>&6
827else
828 echo 'void f(){}' > conftest.c
829if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
830 ac_cv_prog_gcc_g=yes
831else
832 ac_cv_prog_gcc_g=no
833fi
834rm -f conftest*
835
836fi
837
838echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
839 if test $ac_cv_prog_gcc_g = yes; then
f515fb2f
ILT
840 CFLAGS="-g -O"
841 else
842 CFLAGS="-O"
843 fi
844 fi
845else
846 GCC=
847 test "${CFLAGS+set}" = set || CFLAGS="-g"
848fi
f515fb2f
ILT
849
850
55626bf0
ILT
851# Permit host specific settings.
852. ${srcdir}/configure.host
853
f515fb2f 854
986cf3b8
ILT
855if test $host != $build; then
856 ac_tool_prefix=${host_alias}-
857else
858 ac_tool_prefix=
859fi
860
861# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
862set dummy ${ac_tool_prefix}ar; ac_word=$2
6a468850
ILT
863echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
864if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
865 echo $ac_n "(cached) $ac_c" 1>&6
866else
867 if test -n "$AR"; then
868 ac_cv_prog_AR="$AR" # Let the user override the test.
869else
870 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
871 for ac_dir in $PATH; do
872 test -z "$ac_dir" && ac_dir=.
873 if test -f $ac_dir/$ac_word; then
986cf3b8 874 ac_cv_prog_AR="${ac_tool_prefix}ar"
6a468850
ILT
875 break
876 fi
877 done
878 IFS="$ac_save_ifs"
986cf3b8 879 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
6a468850
ILT
880fi
881fi
882AR="$ac_cv_prog_AR"
883if test -n "$AR"; then
884 echo "$ac_t""$AR" 1>&6
885else
886 echo "$ac_t""no" 1>&6
887fi
f515fb2f 888
986cf3b8
ILT
889
890
891# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
892set dummy ${ac_tool_prefix}ranlib; ac_word=$2
893echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
894if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
895 echo $ac_n "(cached) $ac_c" 1>&6
896else
897 if test -n "$RANLIB"; then
898 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
899else
900 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
901 for ac_dir in $PATH; do
902 test -z "$ac_dir" && ac_dir=.
903 if test -f $ac_dir/$ac_word; then
904 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
905 break
906 fi
907 done
908 IFS="$ac_save_ifs"
909fi
910fi
911RANLIB="$ac_cv_prog_RANLIB"
912if test -n "$RANLIB"; then
913 echo "$ac_t""$RANLIB" 1>&6
914else
915 echo "$ac_t""no" 1>&6
916fi
917
918
919if test -z "$ac_cv_prog_RANLIB"; then
920if test -n "$ac_tool_prefix"; then
921 # Extract the first word of "ranlib", so it can be a program name with args.
8c693660
KR
922set dummy ranlib; ac_word=$2
923echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
924if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
925 echo $ac_n "(cached) $ac_c" 1>&6
926else
927 if test -n "$RANLIB"; then
928 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
929else
930 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
931 for ac_dir in $PATH; do
932 test -z "$ac_dir" && ac_dir=.
933 if test -f $ac_dir/$ac_word; then
934 ac_cv_prog_RANLIB="ranlib"
935 break
936 fi
937 done
938 IFS="$ac_save_ifs"
939 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
940fi
941fi
942RANLIB="$ac_cv_prog_RANLIB"
943if test -n "$RANLIB"; then
944 echo "$ac_t""$RANLIB" 1>&6
945else
946 echo "$ac_t""no" 1>&6
947fi
948
986cf3b8
ILT
949else
950 RANLIB=":"
951fi
952fi
953
f515fb2f
ILT
954# Find a good install program. We prefer a C program (faster),
955# so one script is as good as another. But avoid the broken or
956# incompatible versions:
957# SysV /etc/install, /usr/sbin/install
958# SunOS /usr/etc/install
959# IRIX /sbin/install
960# AIX /bin/install
961# AFS /usr/afsws/bin/install, which mishandles nonexistent args
962# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
963# ./install, which can be erroneously created by make from ./install.sh.
964echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
965if test -z "$INSTALL"; then
966if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
967 echo $ac_n "(cached) $ac_c" 1>&6
968else
969 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
970 for ac_dir in $PATH; do
971 # Account for people who put trailing slashes in PATH elements.
972 case "$ac_dir/" in
973 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
974 *)
975 # OSF1 and SCO ODT 3.0 have their own names for install.
976 for ac_prog in ginstall installbsd scoinst install; do
977 if test -f $ac_dir/$ac_prog; then
978 if test $ac_prog = install &&
979 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
980 # AIX install. It has an incompatible calling convention.
981 # OSF/1 installbsd also uses dspmsg, but is usable.
982 :
983 else
984 ac_cv_path_install="$ac_dir/$ac_prog -c"
985 break 2
986 fi
987 fi
988 done
989 ;;
990 esac
991 done
992 IFS="$ac_save_ifs"
85e493f0 993
f515fb2f 994fi
85e493f0
ILT
995 if test "${ac_cv_path_install+set}" = set; then
996 INSTALL="$ac_cv_path_install"
997 else
998 # As a last resort, use the slow shell script. We don't cache a
999 # path for INSTALL within a source directory, because that will
1000 # break other packages using the cache if that directory is
1001 # removed, or if the path is relative.
1002 INSTALL="$ac_install_sh"
1003 fi
f515fb2f
ILT
1004fi
1005echo "$ac_t""$INSTALL" 1>&6
8c693660 1006
f515fb2f
ILT
1007# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1008# It thinks the first close brace ends the variable substitution.
1009test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8c693660 1010
f515fb2f 1011test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8c693660
KR
1012
1013
44f795f7
ILT
1014if test "${shared}" = "true"; then
1015 if test "${GCC}" != "yes" && test "${shared_non_gcc}" != "yes"; then
1016 echo "configure: warning: BFD --enable-shared only supported when using gcc" 1>&2
1017 shared=false
c189fdfb 1018 ALLLIBS='$(TARGETLIB)'
44f795f7 1019 PICFLAG=
c189fdfb 1020 SHLIB=unused-shlib
44f795f7
ILT
1021 fi
1022fi
1023
1024
1025
1026
1027
1028
1029if test "${commonbfdlib}" = "true"; then
1030 COMMON_SHLIB=yes
1031 PICLIST=piclist
1032else
1033 COMMON_SHLIB=
1034 PICLIST=
1035fi
1036
1037
1038
1039
b7577823
ILT
1040HOST_64BIT_LONG=0
1041if test "x${HOST_64BIT_TYPE}" = "xlong"; then
1042 HOST_64BIT_LONG=1
1043fi
1044
1045
f515fb2f
ILT
1046# If we cannot run a trivial program, we must be cross compiling.
1047echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1048if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1049 echo $ac_n "(cached) $ac_c" 1>&6
1050else
1051 if test "$cross_compiling" = yes; then
1052 ac_cv_c_cross=yes
1053else
1054cat > conftest.$ac_ext <<EOF
986cf3b8 1055#line 1056 "configure"
f515fb2f
ILT
1056#include "confdefs.h"
1057main(){return(0);}
1058EOF
986cf3b8 1059{ (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
f515fb2f
ILT
1060if test -s conftest && (./conftest; exit) 2>/dev/null; then
1061 ac_cv_c_cross=no
1062else
1063 ac_cv_c_cross=yes
1064fi
1065fi
1066rm -fr conftest*
1067fi
85e493f0 1068
f515fb2f 1069echo "$ac_t""$ac_cv_c_cross" 1>&6
85e493f0 1070cross_compiling=$ac_cv_c_cross
8c693660 1071
b7577823 1072# Put a plausible default for CC_FOR_BUILD in Makefile.
6a468850
ILT
1073if test -z "$CC_FOR_BUILD"; then
1074 if test "x$cross_compiling" = "xno"; then
1075 CC_FOR_BUILD='$(CC)'
1076 else
1077 CC_FOR_BUILD=gcc
1078 fi
8c693660
KR
1079fi
1080
f515fb2f 1081
b7577823
ILT
1082echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1083# On Suns, sometimes $CPP names a directory.
1084if test -n "$CPP" && test -d "$CPP"; then
1085 CPP=
1086fi
1087if test -z "$CPP"; then
1088if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1089 echo $ac_n "(cached) $ac_c" 1>&6
1090else
1091 # This must be in double quotes, not single quotes, because CPP may get
1092 # substituted into the Makefile and "${CC-cc}" will confuse make.
1093 CPP="${CC-cc} -E"
1094 # On the NeXT, cc -E runs the code through the compiler's parser,
1095 # not just through cpp.
1096 cat > conftest.$ac_ext <<EOF
986cf3b8 1097#line 1098 "configure"
b7577823
ILT
1098#include "confdefs.h"
1099#include <assert.h>
1100Syntax Error
1101EOF
986cf3b8
ILT
1102ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1103{ (eval echo configure:1104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1104ac_err=`grep -v '^ *+' conftest.out`
1105if test -z "$ac_err"; then
1106 :
1107else
1108 echo "$ac_err" >&5
1109 rm -rf conftest*
1110 CPP="${CC-cc} -E -traditional-cpp"
1111 cat > conftest.$ac_ext <<EOF
986cf3b8 1112#line 1113 "configure"
b7577823
ILT
1113#include "confdefs.h"
1114#include <assert.h>
1115Syntax Error
1116EOF
986cf3b8
ILT
1117ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1118{ (eval echo configure:1119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1119ac_err=`grep -v '^ *+' conftest.out`
1120if test -z "$ac_err"; then
1121 :
1122else
1123 echo "$ac_err" >&5
1124 rm -rf conftest*
1125 CPP=/lib/cpp
1126fi
1127rm -f conftest*
1128fi
1129rm -f conftest*
1130 ac_cv_prog_CPP="$CPP"
1131fi
1132 CPP="$ac_cv_prog_CPP"
1133else
1134 ac_cv_prog_CPP="$CPP"
1135fi
1136echo "$ac_t""$CPP" 1>&6
1137
1138for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
1139do
1140ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1141echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1142if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1143 echo $ac_n "(cached) $ac_c" 1>&6
1144else
1145 cat > conftest.$ac_ext <<EOF
986cf3b8 1146#line 1147 "configure"
b7577823
ILT
1147#include "confdefs.h"
1148#include <$ac_hdr>
1149EOF
986cf3b8
ILT
1150ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1151{ (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1152ac_err=`grep -v '^ *+' conftest.out`
1153if test -z "$ac_err"; then
1154 rm -rf conftest*
1155 eval "ac_cv_header_$ac_safe=yes"
1156else
1157 echo "$ac_err" >&5
1158 rm -rf conftest*
1159 eval "ac_cv_header_$ac_safe=no"
1160fi
1161rm -f conftest*
1162fi
1163if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1164 echo "$ac_t""yes" 1>&6
85e493f0 1165 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
b7577823
ILT
1166 cat >> confdefs.h <<EOF
1167#define $ac_tr_hdr 1
1168EOF
1169
1170else
1171 echo "$ac_t""no" 1>&6
1172fi
1173done
1174
ab1aa5cd 1175for ac_hdr in fcntl.h sys/file.h sys/time.h
b7577823
ILT
1176do
1177ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1178echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1179if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1180 echo $ac_n "(cached) $ac_c" 1>&6
1181else
1182 cat > conftest.$ac_ext <<EOF
986cf3b8 1183#line 1184 "configure"
b7577823
ILT
1184#include "confdefs.h"
1185#include <$ac_hdr>
1186EOF
986cf3b8
ILT
1187ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1188{ (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b7577823
ILT
1189ac_err=`grep -v '^ *+' conftest.out`
1190if test -z "$ac_err"; then
1191 rm -rf conftest*
1192 eval "ac_cv_header_$ac_safe=yes"
1193else
1194 echo "$ac_err" >&5
1195 rm -rf conftest*
1196 eval "ac_cv_header_$ac_safe=no"
1197fi
1198rm -f conftest*
1199fi
1200if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1201 echo "$ac_t""yes" 1>&6
85e493f0 1202 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
b7577823
ILT
1203 cat >> confdefs.h <<EOF
1204#define $ac_tr_hdr 1
1205EOF
1206
1207else
1208 echo "$ac_t""no" 1>&6
1209fi
1210done
1211
ab1aa5cd
FF
1212echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1213if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1214 echo $ac_n "(cached) $ac_c" 1>&6
1215else
1216 cat > conftest.$ac_ext <<EOF
1217#line 1218 "configure"
1218#include "confdefs.h"
1219#include <sys/types.h>
1220#include <sys/time.h>
1221#include <time.h>
1222int main() { return 0; }
1223int t() {
1224struct tm *tp;
1225; return 0; }
1226EOF
1227if { (eval echo configure:1228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1228 rm -rf conftest*
1229 ac_cv_header_time=yes
1230else
1231 rm -rf conftest*
1232 ac_cv_header_time=no
1233fi
1234rm -f conftest*
1235
1236fi
1237
1238echo "$ac_t""$ac_cv_header_time" 1>&6
1239if test $ac_cv_header_time = yes; then
1240 cat >> confdefs.h <<\EOF
1241#define TIME_WITH_SYS_TIME 1
1242EOF
1243
1244fi
1245
aadf04f7 1246for ac_func in fcntl getpagesize
b7577823
ILT
1247do
1248echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1249if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251else
1252 cat > conftest.$ac_ext <<EOF
ab1aa5cd 1253#line 1254 "configure"
b7577823
ILT
1254#include "confdefs.h"
1255/* System header to define __stub macros and hopefully few prototypes,
1256 which can conflict with char $ac_func(); below. */
1257#include <assert.h>
1258/* Override any gcc2 internal prototype to avoid an error. */
85e493f0 1259char $ac_func();
b7577823
ILT
1260
1261int main() { return 0; }
1262int t() {
1263
1264/* The GNU C library defines this for functions which it implements
1265 to always fail with ENOSYS. Some functions are actually named
1266 something starting with __ and the normal name is an alias. */
1267#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1268choke me
1269#else
1270$ac_func();
1271#endif
1272
1273; return 0; }
1274EOF
ab1aa5cd 1275if { (eval echo configure:1276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
b7577823
ILT
1276 rm -rf conftest*
1277 eval "ac_cv_func_$ac_func=yes"
1278else
1279 rm -rf conftest*
1280 eval "ac_cv_func_$ac_func=no"
1281fi
1282rm -f conftest*
1283
1284fi
1285if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1286 echo "$ac_t""yes" 1>&6
85e493f0 1287 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
b7577823
ILT
1288 cat >> confdefs.h <<EOF
1289#define $ac_tr_func 1
1290EOF
1291
1292else
1293 echo "$ac_t""no" 1>&6
1294fi
1295done
1296
1297
85e493f0 1298
b7577823 1299case "${host}" in
55626bf0 1300i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32)
b7577823
ILT
1301 cat >> confdefs.h <<\EOF
1302#define USE_BINARY_FOPEN 1
1303EOF
1304 ;;
1305esac
1306
1307echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
1308if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
1309 echo $ac_n "(cached) $ac_c" 1>&6
1310else
1311 cat > conftest.$ac_ext <<EOF
ab1aa5cd 1312#line 1313 "configure"
b7577823
ILT
1313#include "confdefs.h"
1314
1315#include <stdio.h>
1316#ifdef HAVE_STDLIB_H
1317#include <stdlib.h>
1318#endif
1319#ifdef HAVE_UNISTD_H
1320#include <unistd.h>
1321#endif
1322int main() { return 0; }
1323int t() {
1324char *(*pfn) = (char *(*)) malloc
1325; return 0; }
1326EOF
ab1aa5cd 1327if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b7577823
ILT
1328 rm -rf conftest*
1329 bfd_cv_decl_needed_malloc=no
1330else
1331 rm -rf conftest*
1332 bfd_cv_decl_needed_malloc=yes
1333fi
1334rm -f conftest*
1335
1336fi
1337
1338echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
1339if test $bfd_cv_decl_needed_malloc = yes; then
85e493f0
ILT
1340 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1341 cat >> confdefs.h <<EOF
1342#define $bfd_tr_decl 1
b7577823 1343EOF
f515fb2f 1344
2b79a104
ILT
1345fi
1346
b7577823
ILT
1347echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
1348if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
1349 echo $ac_n "(cached) $ac_c" 1>&6
1350else
1351 cat > conftest.$ac_ext <<EOF
ab1aa5cd 1352#line 1353 "configure"
b7577823 1353#include "confdefs.h"
8c693660 1354
b7577823
ILT
1355#include <stdio.h>
1356#ifdef HAVE_STDLIB_H
1357#include <stdlib.h>
1358#endif
1359#ifdef HAVE_UNISTD_H
1360#include <unistd.h>
1361#endif
1362int main() { return 0; }
1363int t() {
85e493f0 1364char *(*pfn) = (char *(*)) free
b7577823
ILT
1365; return 0; }
1366EOF
ab1aa5cd 1367if { (eval echo configure:1368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b7577823
ILT
1368 rm -rf conftest*
1369 bfd_cv_decl_needed_free=no
1370else
1371 rm -rf conftest*
1372 bfd_cv_decl_needed_free=yes
1373fi
1374rm -f conftest*
1375
1376fi
1377
1378echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
1379if test $bfd_cv_decl_needed_free = yes; then
85e493f0
ILT
1380 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1381 cat >> confdefs.h <<EOF
1382#define $bfd_tr_decl 1
b7577823
ILT
1383EOF
1384
1385fi
f515fb2f 1386
85e493f0 1387
a52a3ce8
ILT
1388# If we are configured native, pick a core file support file.
1389COREFILE=
1390COREFLAG=
1391if test "${target}" = "${host}"; then
1392 case "${host}" in
999cc186
ILT
1393 alpha*-*-linux*)
1394 COREFILE=trad-core.o
1395 cat >> confdefs.h <<\EOF
1396#define TRAD_HEADER "hosts/alphalinux.h"
1397EOF
1398
1399 ;;
1400 alpha*-*-*) COREFILE=osf-core.o ;;
a52a3ce8
ILT
1401 arm-*-riscix) COREFILE=trad-core.o ;;
1402 hppa*-*-hpux*) COREFILE=hpux-core.o ;;
1403 hppa*-*-hiux*) COREFILE=hpux-core.o ;;
1404 hppa*-*-bsd*) COREFILE="hpux-core.o hppabsd-core.o"
1405 COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
b7577823
ILT
1406 i[345]86-sequent-bsd*)
1407 COREFILE=trad-core.o;
1408 cat >> confdefs.h <<\EOF
1409#define TRAD_HEADER "hosts/symmetry.h"
1410EOF
1411
1412 ;;
2cb159a5 1413 i[345]86-sequent-sysv4*) ;;
b7577823
ILT
1414 i[345]86-sequent-sysv*)
1415 COREFILE=trad-core.o
1416 cat >> confdefs.h <<\EOF
1417#define TRAD_HEADER "hosts/symmetry.h"
1418EOF
1419
1420 ;;
69a374c0 1421 i[345]86-*-bsd* | i[345]86-*-freebsd*)
b7577823
ILT
1422 COREFILE=trad-core.o
1423 cat >> confdefs.h <<\EOF
1424#define TRAD_HEADER "hosts/i386bsd.h"
69a374c0
NH
1425EOF
1426
1427 ;;
1428 i[345]86-*-netbsd*)
fe16107d 1429 COREFILE=netbsd-core.o
b7577823
ILT
1430 ;;
1431 i[345]86-esix-sysv3*)
1432 COREFILE=trad-core.o
1433 cat >> confdefs.h <<\EOF
1434#define TRAD_HEADER "hosts/esix.h"
1435EOF
1436
1437 ;;
1438 i[345]86-*-sco* | i[345]86-*-isc*)
1439 COREFILE=trad-core.o
1440 cat >> confdefs.h <<\EOF
1441#define TRAD_HEADER "hosts/i386sco.h"
1442EOF
1443
1444 ;;
1445 i[345]86-*-mach3*)
1446 COREFILE=trad-core.o
1447 cat >> confdefs.h <<\EOF
1448#define TRAD_HEADER "hosts/i386mach3.h"
1449EOF
1450
1451 ;;
1452 i[345]86-*-linux*)
1453 COREFILE=trad-core.o
1454 cat >> confdefs.h <<\EOF
1455#define TRAD_HEADER "hosts/i386linux.h"
1456EOF
1457
1458 ;;
2cb159a5
KR
1459 i[345]86-*-isc*) COREFILE=trad-core.o ;;
1460 i[345]86-*-aix*) COREFILE=aix386-core.o ;;
cf587de8
ILT
1461 i860-*-mach3* | i860-*-osf1*)
1462 COREFILE=trad-core.o
1463 cat >> confdefs.h <<\EOF
1464#define TRAD_HEADER "hosts/i860mach3.h"
1465EOF
1466
1467 ;;
b7577823
ILT
1468 mips-dec-bsd*)
1469 COREFILE=trad-core.o
1470 cat >> confdefs.h <<\EOF
1471#define TRAD_HEADER "hosts/mipsbsd.h"
1472EOF
1473
1474 ;;
1475 mips-dec-mach3*)
1476 COREFILE=trad-core.o
1477 cat >> confdefs.h <<\EOF
1478#define TRAD_HEADER "hosts/mipsmach3.h"
1479EOF
1480
1481 ;;
69a374c0 1482 mips-*-netbsd*)
fe16107d 1483 COREFILE=netbsd-core.o
69a374c0 1484 ;;
b7577823
ILT
1485 mips-dec-*)
1486 COREFILE=trad-core.o
1487 cat >> confdefs.h <<\EOF
1488#define TRAD_HEADER "hosts/decstation.h"
1489EOF
1490
1491 ;;
a52a3ce8
ILT
1492 mips-sgi-irix4*) COREFILE=irix-core.o ;;
1493 mips-sgi-irix5*) COREFILE=irix-core.o ;;
b7577823
ILT
1494 mips-*-mach3*)
1495 COREFILE=trad-core.o
1496 cat >> confdefs.h <<\EOF
1497#define TRAD_HEADER "hosts/mipsmach3.h"
1498EOF
1499
1500 ;;
a52a3ce8 1501 mips-*-sysv4*) ;;
b7577823
ILT
1502 mips-*-sysv* | mips-*-riscos*)
1503 COREFILE=trad-core.o
1504 cat >> confdefs.h <<\EOF
1505#define TRAD_HEADER "hosts/riscos.h"
1506EOF
1507
1508 ;;
1509 mips-sony-bsd*)
1510 COREFILE=trad-core.o
1511 cat >> confdefs.h <<\EOF
ab1aa5cd 1512#define TRAD_HEADER "hosts/news-mips.h"
b7577823
ILT
1513EOF
1514
1515 ;;
1516 m68*-bull*-sysv*)
1517 COREFILE=trad-core.o
1518 cat >> confdefs.h <<\EOF
1519#define TRAD_HEADER "hosts/dpx2.h"
1520EOF
1521
1522 ;;
a52a3ce8 1523 m68*-hp-hpux*) COREFILE=hpux-core.o ;;
b7577823
ILT
1524 m68*-hp-bsd*)
1525 COREFILE=trad-core.o
1526 cat >> confdefs.h <<\EOF
1527#define TRAD_HEADER "hosts/hp300bsd.h"
55626bf0
ILT
1528EOF
1529
1530 ;;
1531 m68*-*-linux*)
1532 COREFILE=trad-core.o
1533 cat >> confdefs.h <<\EOF
1534#define TRAD_HEADER "hosts/m68klinux.h"
7f82c7e1
ILT
1535EOF
1536
1537 ;;
4c8b9746 1538 m68*-motorola-sysv*)
7f82c7e1
ILT
1539 COREFILE=trad-core.o
1540 cat >> confdefs.h <<\EOF
1541#define TRAD_HEADER "hosts/delta68.h"
b7577823
ILT
1542EOF
1543
1544 ;;
b7577823
ILT
1545 m68*-sony-*)
1546 COREFILE=trad-core.o
1547 cat >> confdefs.h <<\EOF
1548#define TRAD_HEADER "hosts/news.h"
69a374c0
NH
1549EOF
1550
1551 ;;
1552 m68*-*-netbsd*)
fe16107d 1553 COREFILE=netbsd-core.o
d19df9b5
ILT
1554 ;;
1555 m68*-apple-aux*)
1556 COREFILE=trad-core.o
1557 cat >> confdefs.h <<\EOF
1558#define TRAD_HEADER "hosts/m68kaux.h"
b7577823
ILT
1559EOF
1560
1561 ;;
a52a3ce8 1562 m88*-*-sysv4*) ;;
7f82c7e1 1563 m88*-motorola-sysv*) COREFILE=ptrace-core.o ;;
b7577823
ILT
1564 m88*-*-mach3*)
1565 COREFILE=trad-core.o
1566 cat >> confdefs.h <<\EOF
1567#define TRAD_HEADER "hosts/m88kmach3.h"
1568EOF
1569
1570 ;;
1571 ns32k-pc532-mach)
1572 COREFILE=trad-core.o
1573 cat >> confdefs.h <<\EOF
1574#define TRAD_HEADER "hosts/pc532mach.h"
69a374c0
NH
1575EOF
1576
1577 ;;
1578 ns32k-*-netbsd*)
fe16107d 1579 COREFILE=netbsd-core.o
b7577823 1580 ;;
a52a3ce8 1581 rs6000-*-lynx*) COREFILE=lynx-core.o ;;
aadf04f7 1582 rs6000-*-aix4*) COREFILE=rs6000-core.o ;;
a52a3ce8 1583 rs6000-*-*) COREFILE=rs6000-core.o ;;
aadf04f7 1584 powerpc-*-aix4*) COREFILE=rs6000-core.o ;;
a52a3ce8 1585 powerpc-*-aix*) COREFILE=rs6000-core.o ;;
69a374c0 1586 sparc-*-netbsd*)
fe16107d 1587 COREFILE=netbsd-core.o
69a374c0 1588 ;;
b7577823
ILT
1589 tahoe-*-*)
1590 COREFILE=trad-core.o
1591 cat >> confdefs.h <<\EOF
1592#define TRAD_HEADER "hosts/tahoe.h"
1593EOF
1594
1595 ;;
1596 vax-*-ultrix2*)
1597 COREFILE=trad-core.o
1598 cat >> confdefs.h <<\EOF
1599#define TRAD_HEADER "hosts/vaxult2.h"
1600EOF
1601
1602 ;;
1603 vax-*-ultrix*)
1604 COREFILE=trad-core.o
1605 cat >> confdefs.h <<\EOF
1606#define TRAD_HEADER "hosts/vaxult2.h"
1607EOF
1608
1609 ;;
1610 vax-*-*)
1611 COREFILE=trad-core.o
1612 cat >> confdefs.h <<\EOF
1613#define TRAD_HEADER "hosts/vaxbsd.h"
1614EOF
1615
1616 ;;
a52a3ce8
ILT
1617 esac
1618
1619 case "$COREFILE" in
1620 aix386-core.o) COREFLAG=-DAIX386_CORE ;;
1621 hppabsd-core.o) COREFLAG=-DHPPABSD_CORE ;;
1622 hpux-core.o) COREFLAG=-DHPUX_CORE ;;
1623 irix-core.o) COREFLAG=-DIRIX_CORE ;;
1624 lynx-core.o) COREFLAG=-DLYNX_CORE ;;
1625 osf-core.o) COREFLAG=-DOSF_CORE ;;
1626 ptrace-core.o) COREFLAG=-DPTRACE_CORE ;;
1627 rs6000-core.o) COREFLAG="$COREFLAG -DAIX_CORE" ;;
b7577823 1628 trad-core.o) COREFLAG="$COREFLAG -DTRAD_CORE" ;;
a52a3ce8 1629 esac
1dff7902
ILT
1630
1631 # The ELF code uses the native <sys/procfs.h> to handle core files.
1632 # Define HAVE_SYS_PROCFS_H if the file exists and defines
1633 # prstatus_t.
1634 echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6
1635 if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then
1636 echo $ac_n "(cached) $ac_c" 1>&6
1637else
1638 cat > conftest.$ac_ext <<EOF
ab1aa5cd 1639#line 1640 "configure"
1dff7902
ILT
1640#include "confdefs.h"
1641#include <sys/procfs.h>
1642int main() { return 0; }
1643int t() {
1644prstatus_t t;
1645; return 0; }
1646EOF
ab1aa5cd 1647if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1dff7902
ILT
1648 rm -rf conftest*
1649 bfd_cv_header_sys_procfs_h=yes
1650else
1651 rm -rf conftest*
1652 bfd_cv_header_sys_procfs_h=no
1653fi
1654rm -f conftest*
1655
1656fi
1657
1658 echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6
1659 if test $bfd_cv_header_sys_procfs_h = yes; then
1660 cat >> confdefs.h <<\EOF
1661#define HAVE_SYS_PROCFS_H 1
1662EOF
1663
1664 fi
1665
a52a3ce8
ILT
1666fi
1667
1668
1669
8c693660
KR
1670# target stuff:
1671
1672# Canonicalize the secondary target names.
1673if test -n "$enable_targets" ; then
1674 for targ in `echo $enable_targets | sed 's/,/ /g'`
1675 do
9525b61b 1676 result=`$ac_config_sub $targ 2>/dev/null`
8c693660
KR
1677 if test -n "$result" ; then
1678 canon_targets="$canon_targets $result"
1679 else
1680 # Allow targets that config.sub doesn't recognize, like "all".
1681 canon_targets="$canon_targets $targ"
1682 fi
1683 done
1684fi
1685
1686all_targets=false
2b79a104
ILT
1687defvec=
1688selvecs=
1689selarchs=
1690TDEFINES=
8c693660
KR
1691for targ in $target $canon_targets
1692do
2b79a104 1693 if test "x$targ" = "xall"; then
8c693660
KR
1694 all_targets=true
1695 else
2b79a104
ILT
1696 . $srcdir/config.bfd
1697 if test "x$targ" = "x$target"; then
1698 defvec=$targ_defvec
8c693660 1699 fi
2b79a104
ILT
1700 selvecs="$selvecs $targ_defvec $targ_selvecs"
1701 selarchs="$selarchs $targ_archs"
1702 TDEFINES="$TDEFINES $targ_cflags"
8c693660
KR
1703 fi
1704done
1705
8c693660
KR
1706
1707# This processing still needs to be done if we're to decide properly whether
1708# 64-bit support needs to be compiled in. Currently, it will be included if
1709# the default or any other explicitly requested target requires it; it
1710# will not be included on a 32-bit host if no 64-bit target is requested, and
1711# no "--with-64-bit-bfd" option is given, even if "--with-targets=all" is
1712# used.
1713
2b79a104 1714# uniq the default and selected vectors in all the configured targets.
8c693660 1715f=""
2b79a104 1716for i in $selvecs ; do
8c693660
KR
1717 case " $f " in
1718 *" $i "*) ;;
1719 *) f="$f $i" ;;
1720 esac
1721done
2b79a104 1722selvecs="$f"
8c693660 1723
2b79a104 1724# uniq the architectures in all the configured targets.
8c693660 1725f=""
2b79a104 1726for i in $selarchs ; do
8c693660
KR
1727 case " $f " in
1728 *" $i "*) ;;
1729 *) f="$f $i" ;;
1730 esac
1731done
2b79a104 1732selarchs="$f"
8c693660
KR
1733
1734# Target backend .o files.
1735tb=
1736
a52a3ce8
ILT
1737elf="elf.o elflink.o"
1738
2b79a104 1739for vec in $selvecs
8c693660
KR
1740do
1741 case "$vec" in
1742 # This list is alphabetized to make it easy to compare
1743 # with the two vector lists in targets.c.
1744 a29kcoff_big_vec) tb="$tb coff-a29k.o cofflink.o" ;;
c189fdfb 1745 a_out_adobe_vec) tb="$tb aout-adobe.o aout32.o" ;;
a11e10fe
DE
1746 armcoff_little_vec) tb="$tb coff-arm.o cofflink.o " ;;
1747 armcoff_big_vec) tb="$tb coff-arm.o cofflink.o " ;;
a52a3ce8
ILT
1748 armpe_little_vec) tb="$tb pe-arm.o cofflink.o " ;;
1749 armpe_big_vec) tb="$tb pe-arm.o cofflink.o " ;;
1750 armpei_little_vec) tb="$tb pei-arm.o cofflink.o " ;;
1751 armpei_big_vec) tb="$tb pei-arm.o cofflink.o " ;;
c189fdfb
ILT
1752 aout0_big_vec) tb="$tb aout0.o aout32.o" ;;
1753 aout_arm_big_vec) tb="$tb aout-arm.o aout32.o" ;;
1754 aout_arm_little_vec) tb="$tb aout-arm.o aout32.o" ;;
1755 aout_mips_big_vec) tb="$tb mipsbsd.o aout32.o" ;;
1756 aout_mips_little_vec) tb="$tb mipsbsd.o aout32.o" ;;
8c693660 1757 apollocoff_vec) tb="$tb coff-apollo.o" ;;
c189fdfb
ILT
1758 b_out_vec_big_host) tb="$tb bout.o aout32.o" ;;
1759 b_out_vec_little_host) tb="$tb bout.o aout32.o" ;;
8c693660 1760# start-sanitize-arc
a52a3ce8
ILT
1761 bfd_elf32_littlearc_vec) tb="$tb elf32-arc.o elf32.o $elf" ;;
1762 bfd_elf32_bigarc_vec) tb="$tb elf32-arc.o elf32.o $elf" ;;
8c693660 1763# end-sanitize-arc
a52a3ce8
ILT
1764 bfd_elf32_big_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
1765 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
1766 bfd_elf32_hppa_vec) tb="$tb elf32-hppa.o elf32.o $elf" ;;
1767 bfd_elf32_i386_vec) tb="$tb elf32-i386.o elf32.o $elf" ;;
1768 bfd_elf32_i860_vec) tb="$tb elf32-i860.o elf32.o $elf" ;;
1769 bfd_elf32_little_generic_vec) tb="$tb elf32-gen.o elf32.o $elf" ;;
1770 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.o elf32.o $elf ecofflink.o" ;;
1771 bfd_elf32_m68k_vec) tb="$tb elf32-m68k.o elf32.o $elf" ;;
1772 bfd_elf32_m88k_vec) tb="$tb elf32-m88k.o elf32.o $elf" ;;
1773 bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;;
1774 bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.o elf32.o $elf" ;;
1775 bfd_elf32_sparc_vec) tb="$tb elf32-sparc.o elf32.o $elf" ;;
1776 bfd_elf64_big_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
8c693660 1777 target64=true ;;
a52a3ce8 1778 bfd_elf64_little_generic_vec) tb="$tb elf64-gen.o elf64.o $elf"
8c693660 1779 target64=true ;;
a52a3ce8 1780 bfd_elf64_sparc_vec) tb="$tb elf64-sparc.o elf64.o $elf"
8c693660
KR
1781 target64=true ;;
1782 cisco_core_vec) tb="$tb cisco-core.o" ;;
c189fdfb 1783 demo_64_vec) tb="$tb demo64.o aout64.o"
8c693660
KR
1784 target64=true ;;
1785 ecoff_big_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
1786 ecoff_little_vec) tb="$tb coff-mips.o ecoff.o ecofflink.o" ;;
1787 ecoffalpha_little_vec) tb="$tb coff-alpha.o ecoff.o ecofflink.o"
1788 target64=true ;;
1789 h8300coff_vec) tb="$tb coff-h8300.o reloc16.o" ;;
1790 h8500coff_vec) tb="$tb coff-h8500.o reloc16.o" ;;
c189fdfb
ILT
1791 host_aout_vec) tb="$tb host-aout.o aout32.o" ;;
1792 hp300bsd_vec) tb="$tb hp300bsd.o aout32.o" ;;
1793 hp300hpux_vec) tb="$tb hp300hpux.o aout32.o" ;;
1794 i386aout_vec) tb="$tb i386aout.o aout32.o" ;;
1795 i386bsd_vec) tb="$tb i386bsd.o aout32.o" ;;
8c693660 1796 i386coff_vec) tb="$tb coff-i386.o cofflink.o" ;;
c189fdfb
ILT
1797 i386dynix_vec) tb="$tb i386dynix.o aout32.o" ;;
1798 i386freebsd_vec) tb="$tb i386freebsd.o aout32.o" ;;
8c693660
KR
1799 i386msdos_vec) tb="$tb i386msdos.o" ;;
1800 i386pe_vec) tb="$tb pe-i386.o cofflink.o " ;;
1801 i386pei_vec) tb="$tb pei-i386.o cofflink.o" ;;
c189fdfb
ILT
1802 i386linux_vec) tb="$tb i386linux.o aout32.o" ;;
1803 i386lynx_aout_vec) tb="$tb i386lynx.o lynx-core.o aout32.o" ;;
1804 i386lynx_coff_vec) tb="$tb cf-i386lynx.o cofflink.o lynx-core.o" ;;
1805 i386mach3_vec) tb="$tb i386mach3.o aout32.o" ;;
1806 i386netbsd_vec) tb="$tb i386netbsd.o aout32.o" ;;
1807 i386os9k_vec) tb="$tb i386os9k.o aout32.o" ;;
cf587de8 1808 i860coff_vec) tb="$tb coff-i860.o cofflink.o" ;;
a208a70f
ILT
1809 icoff_big_vec) tb="$tb coff-i960.o cofflink.o" ;;
1810 icoff_little_vec) tb="$tb coff-i960.o cofflink.o" ;;
8c693660
KR
1811 ieee_vec) tb="$tb ieee.o" ;;
1812 m68kcoff_vec) tb="$tb coff-m68k.o cofflink.o" ;;
1813 m68kcoffun_vec) tb="$tb coff-u68k.o coff-m68k.o cofflink.o" ;;
c189fdfb
ILT
1814 m68klinux_vec) tb="$tb m68klinux.o aout32.o" ;;
1815 m68klynx_aout_vec) tb="$tb m68klynx.o lynx-core.o aout32.o" ;;
1816 m68klynx_coff_vec) tb="$tb cf-m68klynx.o coff-m68k.o cofflink.o lynx-core.o" ;;
1817 m68knetbsd_vec) tb="$tb m68knetbsd.o aout32.o" ;;
1818 m68k4knetbsd_vec) tb="$tb m68k4knetbsd.o aout32.o" ;;
d19df9b5 1819 m68kaux_coff_vec) tb="$tb coff-aux.o coff-m68k.o cofflink.o" ;;
8c693660 1820 m88kbcs_vec) tb="$tb coff-m88k.o" ;;
c189fdfb 1821 newsos3_vec) tb="$tb newsos3.o aout32.o" ;;
8c693660
KR
1822 nlm32_i386_vec) tb="$tb nlm32-i386.o nlm32.o nlm.o" ;;
1823 nlm32_sparc_vec) tb="$tb nlm32-sparc.o nlm32.o nlm.o" ;;
1824 nlm32_alpha_vec) tb="$tb nlm32-alpha.o nlm32.o nlm.o"
1825 target64=true ;;
c189fdfb 1826 riscix_vec) tb="$tb aout32.o riscix.o" ;;
8c693660 1827 nlm32_powerpc_vec) tb="$tb nlm32-ppc.o nlm32.o nlm.o" ;;
c189fdfb
ILT
1828 pc532netbsd_vec) tb="$tb ns32knetbsd.o aout-ns32k.o" ;;
1829 pc532machaout_vec) tb="$tb pc532-mach.o aout-ns32k.o" ;;
aadf04f7
SS
1830 pmac_xcoff_vec) tb="$tb coff-pmac.o xcofflink.o" ;;
1831 rs6000coff_vec) tb="$tb coff-rs6000.o xcofflink.o" ;;
e0c10737
KK
1832 bfd_powerpc_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;;
1833 bfd_powerpcle_pe_vec) tb="$tb pe-ppc.o cofflink.o" ;;
1834 bfd_powerpc_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;;
1835 bfd_powerpcle_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;;
8c693660
KR
1836 shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
1837# start-sanitize-rce
c189fdfb 1838 rce_aout_vec) tb="$tb aout-rce.o aout32.o" ;;
8c693660
KR
1839# end-sanitize-rce
1840 shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;;
1841 som_vec) tb="$tb som.o" ;;
c189fdfb
ILT
1842 sparclynx_aout_vec) tb="$tb sparclynx.o lynx-core.o aout32.o" ;;
1843 sparclynx_coff_vec) tb="$tb cf-sparclynx.o lynx-core.o" ;;
1844 sparcnetbsd_vec) tb="$tb sparcnetbsd.o aout32.o" ;;
8c693660
KR
1845 sparccoff_vec) tb="$tb coff-sparc.o" ;;
1846 srec_vec) tb="$tb srec.o" ;;
c189fdfb 1847 sunos_big_vec) tb="$tb sunos.o aout32.o" ;;
8c693660
KR
1848 symbolsrec_vec) tb="$tb srec.o" ;;
1849 tekhex_vec) tb="$tb tekhex.o" ;;
1850 we32kcoff_vec) tb="$tb coff-we32k.o" ;;
1851 z8kcoff_vec) tb="$tb coff-z8k.o reloc16.o" ;;
1852 w65_vec) tb="$tb coff-w65.o reloc16.o" ;;
1853 versados_vec) tb="$tb versados.o" ;;
1854
1855 "") ;;
1856 *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
1857 esac
1858done
1859
1860# Target architecture .o files.
2b79a104 1861ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.o/g`
8c693660
KR
1862
1863# Weed out duplicate .o files.
1864f=""
1865for i in $tb ; do
1866 case " $f " in
1867 *" $i "*) ;;
1868 *) f="$f $i" ;;
1869 esac
1870done
1871tb="$f"
1872
1873f=""
1874for i in $ta ; do
1875 case " $f " in
1876 *" $i "*) ;;
1877 *) f="$f $i" ;;
1878 esac
1879done
1880ta="$f"
1881
1882bfd_backends="$tb"
1883bfd_machines="$ta"
1884
1885if test x${all_targets} = xtrue ; then
1886 bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
1887 bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
2b79a104
ILT
1888 selvecs=
1889 selarchs=
8c693660
KR
1890else # all_targets is true
1891 # Only set these if they will be nonempty, for the clever echo.
2b79a104
ILT
1892 test -n "$selvecs" &&
1893 selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
1894 test -n "$selarchs" &&
2ffbb79a 1895 selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
8c693660
KR
1896fi # all_targets is true
1897
1898case ${host64}-${target64}-${want64} in
1899 *true*)
1900 wordsize=64
1901 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
1902 ;;
1903 false-false-false)
1904 wordsize=32
1905 all_backends='$(BFD32_BACKENDS)'
1906 ;;
1907esac
1908
1909
1910
1911
1912
1913
8c693660
KR
1914tdefaults=""
1915test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
1916test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
1917test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
1918
1919
d19df9b5
ILT
1920for ac_func in valloc getpagesize
1921do
1922echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1923if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1924 echo $ac_n "(cached) $ac_c" 1>&6
1925else
1926 cat > conftest.$ac_ext <<EOF
ab1aa5cd 1927#line 1928 "configure"
d19df9b5
ILT
1928#include "confdefs.h"
1929/* System header to define __stub macros and hopefully few prototypes,
1930 which can conflict with char $ac_func(); below. */
1931#include <assert.h>
1932/* Override any gcc2 internal prototype to avoid an error. */
1933char $ac_func();
1934
1935int main() { return 0; }
1936int t() {
1937
1938/* The GNU C library defines this for functions which it implements
1939 to always fail with ENOSYS. Some functions are actually named
1940 something starting with __ and the normal name is an alias. */
1941#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1942choke me
1943#else
1944$ac_func();
1945#endif
1946
1947; return 0; }
1948EOF
ab1aa5cd 1949if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
d19df9b5
ILT
1950 rm -rf conftest*
1951 eval "ac_cv_func_$ac_func=yes"
1952else
1953 rm -rf conftest*
1954 eval "ac_cv_func_$ac_func=no"
1955fi
1956rm -f conftest*
1957
1958fi
1959if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1960 echo "$ac_t""yes" 1>&6
1961 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1962 cat >> confdefs.h <<EOF
1963#define $ac_tr_func 1
1964EOF
1965
1966else
1967 echo "$ac_t""no" 1>&6
1968fi
1969done
1970
4fe6d901
KR
1971echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1972if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1973 echo $ac_n "(cached) $ac_c" 1>&6
1974else
1975 if test "$cross_compiling" = yes; then
1976 ac_cv_func_mmap=no
1977else
1978cat > conftest.$ac_ext <<EOF
ab1aa5cd 1979#line 1980 "configure"
4fe6d901
KR
1980#include "confdefs.h"
1981
1982/* Thanks to Mike Haertel and Jim Avera for this test. */
1983#include <sys/types.h>
1984#include <fcntl.h>
1985#include <sys/mman.h>
1986
4fe6d901
KR
1987#ifndef HAVE_GETPAGESIZE
1988# include <sys/param.h>
1989# ifdef EXEC_PAGESIZE
1990# define getpagesize() EXEC_PAGESIZE
1991# else
1992# ifdef NBPG
1993# define getpagesize() NBPG * CLSIZE
1994# ifndef CLSIZE
1995# define CLSIZE 1
1996# endif
1997# else
1998# ifdef NBPC
1999# define getpagesize() NBPC
2000# else
2001# define getpagesize() PAGESIZE /* SVR4 */
2002# endif
2003# endif
2004# endif
2005#endif
2006
d19df9b5 2007#ifndef HAVE_VALLOC
4fe6d901
KR
2008# define valloc malloc
2009#endif
2010
2011#ifdef __cplusplus
2012extern "C" { void *valloc(unsigned), *malloc(unsigned); }
2013#else
2014char *valloc(), *malloc();
2015#endif
2016
2017int
2018main()
2019{
2020 char *buf1, *buf2, *buf3;
2021 int i = getpagesize(), j;
d19df9b5 2022 int i2 = i * 2;
4fe6d901
KR
2023 int fd;
2024
2025 buf1 = (char *)valloc(i2);
2026 buf2 = (char *)valloc(i);
2027 buf3 = (char *)malloc(i2);
2028 for (j = 0; j < i2; ++j)
2029 *(buf1 + j) = rand();
2030 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
2031 write(fd, buf1, i2);
2032 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
2033 for (j = 0; j < i; ++j)
2034 if (*(buf1 + j) != *(buf2 + j))
2035 exit(1);
2036 lseek(fd, (long)i, 0);
2037 read(fd, buf2, i); /* read into mapped memory -- file should not change */
2038 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
2039 lseek(fd, (long)0, 0);
2040 read(fd, buf3, i2);
2041 for (j = 0; j < i2; ++j)
2042 if (*(buf1 + j) != *(buf3 + j))
2043 exit(1);
2044 exit(0);
2045}
2046
2047EOF
ab1aa5cd 2048{ (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
4fe6d901
KR
2049if test -s conftest && (./conftest; exit) 2>/dev/null; then
2050 ac_cv_func_mmap=yes
2051else
2052 ac_cv_func_mmap=no
2053fi
2054fi
2055rm -fr conftest*
2056fi
85e493f0 2057
4fe6d901
KR
2058echo "$ac_t""$ac_cv_func_mmap" 1>&6
2059if test $ac_cv_func_mmap = yes; then
2060 cat >> confdefs.h <<\EOF
2061#define HAVE_MMAP 1
2062EOF
2063
2064fi
2065
2066for ac_func in madvise mprotect
2067do
2068echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2069if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2070 echo $ac_n "(cached) $ac_c" 1>&6
2071else
2072 cat > conftest.$ac_ext <<EOF
ab1aa5cd 2073#line 2074 "configure"
4fe6d901
KR
2074#include "confdefs.h"
2075/* System header to define __stub macros and hopefully few prototypes,
2076 which can conflict with char $ac_func(); below. */
2077#include <assert.h>
2078/* Override any gcc2 internal prototype to avoid an error. */
85e493f0 2079char $ac_func();
4fe6d901
KR
2080
2081int main() { return 0; }
2082int t() {
2083
2084/* The GNU C library defines this for functions which it implements
2085 to always fail with ENOSYS. Some functions are actually named
2086 something starting with __ and the normal name is an alias. */
2087#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2088choke me
2089#else
2090$ac_func();
2091#endif
2092
2093; return 0; }
2094EOF
ab1aa5cd 2095if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4fe6d901
KR
2096 rm -rf conftest*
2097 eval "ac_cv_func_$ac_func=yes"
2098else
2099 rm -rf conftest*
2100 eval "ac_cv_func_$ac_func=no"
2101fi
2102rm -f conftest*
2103
2104fi
2105if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2106 echo "$ac_t""yes" 1>&6
85e493f0 2107 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4fe6d901
KR
2108 cat >> confdefs.h <<EOF
2109#define $ac_tr_func 1
2110EOF
2111
2112else
2113 echo "$ac_t""no" 1>&6
2114fi
2115done
2116
85e493f0
ILT
2117case ${want_mmap}+${ac_cv_func_mmap} in
2118 true+yes ) cat >> confdefs.h <<\EOF
2119#define USE_MMAP 1
2120EOF
2121 ;;
2122esac
4fe6d901 2123
8c693660
KR
2124rm -f doc/config.status
2125trap '' 1 2 15
2126cat > confcache <<\EOF
2127# This file is a shell script that caches the results of configure
2128# tests run on this system so they can be shared between configure
2129# scripts and configure runs. It is not useful on other systems.
2130# If it contains results you don't want to keep, you may remove or edit it.
2131#
2132# By default, configure uses ./config.cache as the cache file,
2133# creating it if it does not exist already. You can give configure
2134# the --cache-file=FILE option to use a different cache file; that is
2135# what configure does when it calls configure scripts in
2136# subdirectories, so they share the cache.
2137# Giving --cache-file=/dev/null disables caching, for debugging configure.
2138# config.status only pays attention to the cache file if you give it the
2139# --recheck option to rerun configure.
2140#
2141EOF
2142# Ultrix sh set writes to stderr and can't be redirected directly,
2143# and sets the high bit in the cache file unless we assign to the vars.
2144(set) 2>&1 |
2145 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2146 >> confcache
2147if cmp -s $cache_file confcache; then
2148 :
2149else
2150 if test -w $cache_file; then
2151 echo "updating cache $cache_file"
2152 cat confcache > $cache_file
2153 else
2154 echo "not updating unwritable cache $cache_file"
2155 fi
2156fi
2157rm -f confcache
2158
2159trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2160
2161test "x$prefix" = xNONE && prefix=$ac_default_prefix
2162# Let make expand exec_prefix.
2163test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2164
2165# Any assignment to VPATH causes Sun make to only execute
2166# the first set of double-colon rules, so remove it if not needed.
2167# If there is a colon in the path, we need to keep it.
2168if test "x$srcdir" = x.; then
2169 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2170fi
2171
2172trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2173
b7577823 2174DEFS=-DHAVE_CONFIG_H
8c693660
KR
2175
2176# Without the "./", some shells look in PATH for config.status.
2177: ${CONFIG_STATUS=./config.status}
2178
2179echo creating $CONFIG_STATUS
2180rm -f $CONFIG_STATUS
2181cat > $CONFIG_STATUS <<EOF
2182#! /bin/sh
2183# Generated automatically by configure.
2184# Run this file to recreate the current configuration.
2185# This directory was configured as follows,
2186# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2187#
2188# $0 $ac_configure_args
2189#
2190# Compiler output produced by configure, useful for debugging
2191# configure, is in ./config.log if it exists.
2192
2193ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2194for ac_option
2195do
2196 case "\$ac_option" in
2197 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2198 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2199 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2200 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
986cf3b8 2201 echo "$CONFIG_STATUS generated by autoconf version 2.8"
8c693660
KR
2202 exit 0 ;;
2203 -help | --help | --hel | --he | --h)
2204 echo "\$ac_cs_usage"; exit 0 ;;
2205 *) echo "\$ac_cs_usage"; exit 1 ;;
2206 esac
2207done
2208
2209ac_given_srcdir=$srcdir
f515fb2f 2210ac_given_INSTALL="$INSTALL"
8c693660 2211
936b870c 2212trap 'rm -fr `echo "Makefile doc/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
d19df9b5
ILT
2213EOF
2214cat >> $CONFIG_STATUS <<EOF
8c693660 2215
85e493f0 2216# Protect against being on the right side of a sed subst in config.status.
d19df9b5
ILT
2217sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2218 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8c693660
KR
2219$ac_vpsub
2220$extrasub
2221s%@CFLAGS@%$CFLAGS%g
2222s%@CPPFLAGS@%$CPPFLAGS%g
2223s%@CXXFLAGS@%$CXXFLAGS%g
2224s%@DEFS@%$DEFS%g
2225s%@LDFLAGS@%$LDFLAGS%g
2226s%@LIBS@%$LIBS%g
2227s%@exec_prefix@%$exec_prefix%g
2228s%@prefix@%$prefix%g
2229s%@program_transform_name@%$program_transform_name%g
85e493f0
ILT
2230s%@bindir@%$bindir%g
2231s%@sbindir@%$sbindir%g
2232s%@libexecdir@%$libexecdir%g
2233s%@datadir@%$datadir%g
2234s%@sysconfdir@%$sysconfdir%g
2235s%@sharedstatedir@%$sharedstatedir%g
2236s%@localstatedir@%$localstatedir%g
2237s%@libdir@%$libdir%g
2238s%@includedir@%$includedir%g
2239s%@oldincludedir@%$oldincludedir%g
2240s%@infodir@%$infodir%g
2241s%@mandir@%$mandir%g
8c693660
KR
2242s%@host@%$host%g
2243s%@host_alias@%$host_alias%g
2244s%@host_cpu@%$host_cpu%g
2245s%@host_vendor@%$host_vendor%g
2246s%@host_os@%$host_os%g
2247s%@target@%$target%g
2248s%@target_alias@%$target_alias%g
2249s%@target_cpu@%$target_cpu%g
2250s%@target_vendor@%$target_vendor%g
2251s%@target_os@%$target_os%g
2252s%@build@%$build%g
2253s%@build_alias@%$build_alias%g
2254s%@build_cpu@%$build_cpu%g
2255s%@build_vendor@%$build_vendor%g
2256s%@build_os@%$build_os%g
f515fb2f
ILT
2257s%@CC@%$CC%g
2258s%@HDEFINES@%$HDEFINES%g
2259s%@AR@%$AR%g
8c693660 2260s%@RANLIB@%$RANLIB%g
f515fb2f
ILT
2261s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2262s%@INSTALL_DATA@%$INSTALL_DATA%g
44f795f7
ILT
2263s%@ALLLIBS@%$ALLLIBS%g
2264s%@PICFLAG@%$PICFLAG%g
2265s%@SHLIB@%$SHLIB%g
2266s%@SHLIB_CC@%$SHLIB_CC%g
2267s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
2268s%@COMMON_SHLIB@%$COMMON_SHLIB%g
2269s%@PICLIST@%$PICLIST%g
2270s%@SHLINK@%$SHLINK%g
b7577823 2271s%@HOST_64BIT_LONG@%$HOST_64BIT_LONG%g
f515fb2f 2272s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
b7577823 2273s%@CPP@%$CPP%g
a52a3ce8
ILT
2274s%@COREFILE@%$COREFILE%g
2275s%@COREFLAG@%$COREFLAG%g
2b79a104 2276s%@TDEFINES@%$TDEFINES%g
8c693660
KR
2277s%@wordsize@%$wordsize%g
2278s%@all_backends@%$all_backends%g
2279s%@bfd_backends@%$bfd_backends%g
2280s%@bfd_machines@%$bfd_machines%g
2281s%@tdefaults@%$tdefaults%g
2282
2283CEOF
2284EOF
2285cat >> $CONFIG_STATUS <<EOF
2286
2287CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile"}
2288EOF
2289cat >> $CONFIG_STATUS <<\EOF
2290for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2291 # Support "outfile[:infile]", defaulting infile="outfile.in".
2292 case "$ac_file" in
2293 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2294 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2295 *) ac_file_in="${ac_file}.in" ;;
2296 esac
2297
2298 # Adjust relative srcdir, etc. for subdirectories.
2299
2300 # Remove last slash and all that follows it. Not all systems have dirname.
2301 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2302 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2303 # The file is in a subdirectory.
2304 test ! -d "$ac_dir" && mkdir "$ac_dir"
2305 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2306 # A "../" for each directory in $ac_dir_suffix.
2307 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2308 else
2309 ac_dir_suffix= ac_dots=
2310 fi
2311
2312 case "$ac_given_srcdir" in
2313 .) srcdir=.
2314 if test -z "$ac_dots"; then top_srcdir=.
2315 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2316 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2317 *) # Relative path.
2318 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2319 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2320 esac
2321
f515fb2f
ILT
2322 case "$ac_given_INSTALL" in
2323 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2324 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2325 esac
8c693660
KR
2326 echo creating "$ac_file"
2327 rm -f "$ac_file"
2328 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2329 case "$ac_file" in
2330 *Makefile*) ac_comsub="1i\\
2331# $configure_input" ;;
2332 *) ac_comsub= ;;
2333 esac
2334 sed -e "$ac_comsub
2335s%@configure_input@%$configure_input%g
2336s%@srcdir@%$srcdir%g
2337s%@top_srcdir@%$top_srcdir%g
f515fb2f 2338s%@INSTALL@%$INSTALL%g
8c693660
KR
2339" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2340fi; done
2341rm -f conftest.subs
2342
b7577823
ILT
2343# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2344# NAME is the cpp macro being defined and VALUE is the value it is being given.
2345#
2346# ac_d sets the value in "#define NAME VALUE" lines.
2347ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2348ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2349ac_dC='\3'
2350ac_dD='%g'
2351# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2352ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2353ac_uB='\([ ]\)%\1#\2define\3'
2354ac_uC=' '
2355ac_uD='\4%g'
2356# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2357ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2358ac_eB='$%\1#\2define\3'
2359ac_eC=' '
2360ac_eD='%g'
2361
936b870c 2362CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
b7577823
ILT
2363for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2364 # Support "outfile[:infile]", defaulting infile="outfile.in".
2365 case "$ac_file" in
2366 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2367 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2368 *) ac_file_in="${ac_file}.in" ;;
2369 esac
8c693660 2370
b7577823 2371 echo creating $ac_file
8c693660 2372
b7577823
ILT
2373 rm -f conftest.frag conftest.in conftest.out
2374 cp $ac_given_srcdir/$ac_file_in conftest.in
8c693660 2375
b7577823 2376EOF
8c693660 2377
b7577823
ILT
2378# Transform confdefs.h into a sed script conftest.vals that substitutes
2379# the proper values into config.h.in to produce config.h. And first:
85e493f0 2380# Protect against being on the right side of a sed subst in config.status.
b7577823
ILT
2381# Protect against being in an unquoted here document in config.status.
2382rm -f conftest.vals
2383cat > conftest.hdr <<\EOF
2384s/[\\&%]/\\&/g
2385s%[\\$`]%\\&%g
2386s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2387s%ac_d%ac_u%gp
2388s%ac_u%ac_e%gp
2389EOF
2390sed -n -f conftest.hdr confdefs.h > conftest.vals
2391rm -f conftest.hdr
2392
2393# This sed command replaces #undef with comments. This is necessary, for
2394# example, in the case of _POSIX_SOURCE, which is predefined and required
2395# on some systems where configure will not decide to define it.
2396cat >> conftest.vals <<\EOF
2397s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2398EOF
8c693660 2399
b7577823
ILT
2400# Break up conftest.vals because some shells have a limit on
2401# the size of here documents, and old seds have small limits too.
2402# Maximum number of lines to put in a single here document.
2403ac_max_here_lines=12
8c693660 2404
b7577823
ILT
2405rm -f conftest.tail
2406while :
2407do
2408 ac_lines=`grep -c . conftest.vals`
2409 # grep -c gives empty output for an empty file on some AIX systems.
2410 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2411 # Write a limited-size here document to conftest.frag.
2412 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2413 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2414 echo 'CEOF
2415 sed -f conftest.frag conftest.in > conftest.out
2416 rm -f conftest.in
2417 mv conftest.out conftest.in
2418' >> $CONFIG_STATUS
2419 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2420 rm -f conftest.vals
2421 mv conftest.tail conftest.vals
2422done
2423rm -f conftest.vals
8c693660 2424
b7577823
ILT
2425cat >> $CONFIG_STATUS <<\EOF
2426 rm -f conftest.frag conftest.h
2427 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2428 cat conftest.in >> conftest.h
2429 rm -f conftest.in
2430 if cmp -s $ac_file conftest.h 2>/dev/null; then
2431 echo "$ac_file is unchanged"
2432 rm -f conftest.h
8c693660 2433 else
b7577823
ILT
2434 rm -f $ac_file
2435 mv conftest.h $ac_file
8c693660 2436 fi
b7577823
ILT
2437fi; done
2438
8c693660 2439
a7873a6c 2440case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
8c693660
KR
2441exit 0
2442EOF
2443chmod +x $CONFIG_STATUS
2444rm -fr confdefs* $ac_clean_files
2445test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2446
This page took 0.204512 seconds and 4 git commands to generate.