configure revision 89857
1139823Simp#! /bin/sh
2121461Sharti
3121461Sharti# Guess values for system-dependent variables and create Makefiles.
4121461Sharti# Generated automatically using autoconf version 2.13 
5121461Sharti# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6121461Sharti#
7121461Sharti# This configure script is free software; the Free Software Foundation
8121461Sharti# gives unlimited permission to copy, distribute and modify it.
9121461Sharti
10121461Sharti# Defaults:
11121461Shartiac_help=
12121461Shartiac_default_prefix=/usr/local
13121461Sharti# Any additions from configure.in:
14121461Shartiac_help="$ac_help
15121461Sharti  --enable-shared[=PKGS]  build shared libraries [default=no]"
16121461Shartiac_help="$ac_help
17121461Sharti  --enable-static[=PKGS]  build static libraries [default=yes]"
18121461Shartiac_help="$ac_help
19121461Sharti  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
20121461Shartiac_help="$ac_help
21121461Sharti  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
22121461Shartiac_help="$ac_help
23121461Sharti  --disable-libtool-lock  avoid locking (might break parallel builds)"
24121461Shartiac_help="$ac_help
25121461Sharti  --with-pic              try to use only PIC/non-PIC objects [default=use both]"
26121461Shartiac_help="$ac_help
27121461Sharti  --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)"
28121461Shartiac_help="$ac_help
29121461Sharti  --enable-targets        alternative target configurations"
30121461Shartiac_help="$ac_help
31121461Sharti  --enable-commonbfdlib   build shared BFD/opcodes/libiberty library"
32121461Shartiac_help="$ac_help
33121461Sharti  --with-mmap             try using mmap for BFD input files if available"
34121461Shartiac_help="$ac_help
35121461Sharti  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
36121461Shartiac_help="$ac_help
37121461Sharti  --enable-maintainer-mode enable make rules and dependencies not useful
38121461Sharti                          (and sometimes confusing) to the casual installer"
39121461Shartiac_help="$ac_help
40121461Sharti  --disable-nls           do not use Native Language Support"
41121461Shartiac_help="$ac_help
42121461Sharti  --with-included-gettext use the GNU gettext library included here"
43121461Sharti
44121461Sharti# Initialize some variables set by options.
45121461Sharti# The variables have the same names as the options, with
46121461Sharti# dashes changed to underlines.
47121461Shartibuild=NONE
48121461Sharticache_file=./config.cache
49121461Shartiexec_prefix=NONE
50121461Shartihost=NONE
51121461Shartino_create=
52121461Shartinonopt=NONE
53121461Shartino_recursion=
54121461Shartiprefix=NONE
55121461Shartiprogram_prefix=NONE
56121461Shartiprogram_suffix=NONE
57121461Shartiprogram_transform_name=s,x,x,
58121461Shartisilent=
59121461Shartisite=
60121461Shartisrcdir=
61121461Shartitarget=NONE
62121461Shartiverbose=
63121461Shartix_includes=NONE
64121461Shartix_libraries=NONE
65121461Shartibindir='${exec_prefix}/bin'
66121461Shartisbindir='${exec_prefix}/sbin'
67121461Shartilibexecdir='${exec_prefix}/libexec'
68121461Shartidatadir='${prefix}/share'
69121461Shartisysconfdir='${prefix}/etc'
70121461Shartisharedstatedir='${prefix}/com'
71121461Shartilocalstatedir='${prefix}/var'
72121461Shartilibdir='${exec_prefix}/lib'
73121461Shartiincludedir='${prefix}/include'
74121461Shartioldincludedir='/usr/include'
75121461Shartiinfodir='${prefix}/info'
76121461Shartimandir='${prefix}/man'
77121461Sharti
78121461Sharti# Initialize some other variables.
79121461Shartisubdirs=
80121461ShartiMFLAGS= MAKEFLAGS=
81121461ShartiSHELL=${CONFIG_SHELL-/bin/sh}
82121461Sharti# Maximum number of lines to put in a shell here document.
83121461Shartiac_max_here_lines=12
84121461Sharti
85121461Shartiac_prev=
86121461Shartifor ac_option
87121461Shartido
88121461Sharti
89121461Sharti  # If the previous option needs an argument, assign it.
90121461Sharti  if test -n "$ac_prev"; then
91121461Sharti    eval "$ac_prev=\$ac_option"
92121461Sharti    ac_prev=
93121461Sharti    continue
94121461Sharti  fi
95121461Sharti
96121461Sharti  case "$ac_option" in
97121461Sharti  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
98121461Sharti  *) ac_optarg= ;;
99121461Sharti  esac
100121461Sharti
101121461Sharti  # Accept the important Cygnus configure options, so we can diagnose typos.
102121461Sharti
103121461Sharti  case "$ac_option" in
104121461Sharti
105121461Sharti  -bindir | --bindir | --bindi | --bind | --bin | --bi)
106121461Sharti    ac_prev=bindir ;;
107121461Sharti  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
108137199Sharti    bindir="$ac_optarg" ;;
109137199Sharti
110121461Sharti  -build | --build | --buil | --bui | --bu)
111138268Sglebius    ac_prev=build ;;
112121461Sharti  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
113121461Sharti    build="$ac_optarg" ;;
114137897Sglebius
115138268Sglebius  -cache-file | --cache-file | --cache-fil | --cache-fi \
116121461Sharti  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
117121461Sharti    ac_prev=cache_file ;;
118280785Srrs  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
119121461Sharti  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
120121461Sharti    cache_file="$ac_optarg" ;;
121121461Sharti
122121461Sharti  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
123121461Sharti    ac_prev=datadir ;;
124121461Sharti  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
125121461Sharti  | --da=*)
126121461Sharti    datadir="$ac_optarg" ;;
127121461Sharti
128121461Sharti  -disable-* | --disable-*)
129121461Sharti    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
130121461Sharti    # Reject names that are not valid shell variable names.
131121461Sharti    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
132121461Sharti      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
133121461Sharti    fi
134121461Sharti    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
135121461Sharti    eval "enable_${ac_feature}=no" ;;
136121461Sharti
137121461Sharti  -enable-* | --enable-*)
138121461Sharti    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
139121461Sharti    # Reject names that are not valid shell variable names.
140121461Sharti    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
141121461Sharti      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
142121461Sharti    fi
143121461Sharti    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144121461Sharti    case "$ac_option" in
145121461Sharti      *=*) ;;
146121461Sharti      *) ac_optarg=yes ;;
147121461Sharti    esac
148121461Sharti    eval "enable_${ac_feature}='$ac_optarg'" ;;
149121461Sharti
150121461Sharti  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
151121461Sharti  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
152121461Sharti  | --exec | --exe | --ex)
153121461Sharti    ac_prev=exec_prefix ;;
154121461Sharti  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
155121461Sharti  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
156121461Sharti  | --exec=* | --exe=* | --ex=*)
157121461Sharti    exec_prefix="$ac_optarg" ;;
158121461Sharti
159121461Sharti  -gas | --gas | --ga | --g)
160121461Sharti    # Obsolete; use --with-gas.
161121461Sharti    with_gas=yes ;;
162121461Sharti
163121461Sharti  -help | --help | --hel | --he)
164121461Sharti    # Omit some internal or obsolete options to make the list less imposing.
165121461Sharti    # This message is too long to be a string in the A/UX 3.1 sh.
166121461Sharti    cat << EOF
167121461ShartiUsage: configure [options] [host]
168121461ShartiOptions: [defaults in brackets after descriptions]
169121461ShartiConfiguration:
170121461Sharti  --cache-file=FILE       cache test results in FILE
171121461Sharti  --help                  print this message
172121461Sharti  --no-create             do not create output files
173121461Sharti  --quiet, --silent       do not print \`checking...' messages
174121461Sharti  --version               print the version of autoconf that created configure
175121461ShartiDirectory and file names:
176121461Sharti  --prefix=PREFIX         install architecture-independent files in PREFIX
177121461Sharti                          [$ac_default_prefix]
178121461Sharti  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
179121461Sharti                          [same as prefix]
180121461Sharti  --bindir=DIR            user executables in DIR [EPREFIX/bin]
181121461Sharti  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
182121461Sharti  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
183121461Sharti  --datadir=DIR           read-only architecture-independent data in DIR
184121461Sharti                          [PREFIX/share]
185121461Sharti  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
186121461Sharti  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
187121461Sharti                          [PREFIX/com]
188121461Sharti  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
189121461Sharti  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
190121461Sharti  --includedir=DIR        C header files in DIR [PREFIX/include]
191121461Sharti  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
192121461Sharti  --infodir=DIR           info documentation in DIR [PREFIX/info]
193121461Sharti  --mandir=DIR            man documentation in DIR [PREFIX/man]
194121461Sharti  --srcdir=DIR            find the sources in DIR [configure dir or ..]
195121461Sharti  --program-prefix=PREFIX prepend PREFIX to installed program names
196121461Sharti  --program-suffix=SUFFIX append SUFFIX to installed program names
197121461Sharti  --program-transform-name=PROGRAM
198121461Sharti                          run sed PROGRAM on installed program names
199121461ShartiEOF
200121461Sharti    cat << EOF
201121461ShartiHost type:
202121461Sharti  --build=BUILD           configure for building on BUILD [BUILD=HOST]
203121461Sharti  --host=HOST             configure for HOST [guessed]
204121461Sharti  --target=TARGET         configure for TARGET [TARGET=HOST]
205121461ShartiFeatures and packages:
206121461Sharti  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
207121461Sharti  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
208121461Sharti  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
209121461Sharti  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
210121461Sharti  --x-includes=DIR        X include files are in DIR
211121461Sharti  --x-libraries=DIR       X library files are in DIR
212121461ShartiEOF
213121461Sharti    if test -n "$ac_help"; then
214121461Sharti      echo "--enable and --with options recognized:$ac_help"
215121461Sharti    fi
216121461Sharti    exit 0 ;;
217121461Sharti
218121461Sharti  -host | --host | --hos | --ho)
219121461Sharti    ac_prev=host ;;
220121461Sharti  -host=* | --host=* | --hos=* | --ho=*)
221121461Sharti    host="$ac_optarg" ;;
222121461Sharti
223121461Sharti  -includedir | --includedir | --includedi | --included | --include \
224121461Sharti  | --includ | --inclu | --incl | --inc)
225121461Sharti    ac_prev=includedir ;;
226121461Sharti  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
227121461Sharti  | --includ=* | --inclu=* | --incl=* | --inc=*)
228121461Sharti    includedir="$ac_optarg" ;;
229121461Sharti
230121461Sharti  -infodir | --infodir | --infodi | --infod | --info | --inf)
231121461Sharti    ac_prev=infodir ;;
232121461Sharti  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
233121461Sharti    infodir="$ac_optarg" ;;
234121461Sharti
235121461Sharti  -libdir | --libdir | --libdi | --libd)
236121461Sharti    ac_prev=libdir ;;
237121461Sharti  -libdir=* | --libdir=* | --libdi=* | --libd=*)
238121461Sharti    libdir="$ac_optarg" ;;
239121461Sharti
240121461Sharti  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
241121461Sharti  | --libexe | --libex | --libe)
242121461Sharti    ac_prev=libexecdir ;;
243121461Sharti  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
244121461Sharti  | --libexe=* | --libex=* | --libe=*)
245121461Sharti    libexecdir="$ac_optarg" ;;
246121461Sharti
247121461Sharti  -localstatedir | --localstatedir | --localstatedi | --localstated \
248121461Sharti  | --localstate | --localstat | --localsta | --localst \
249121461Sharti  | --locals | --local | --loca | --loc | --lo)
250121461Sharti    ac_prev=localstatedir ;;
251121461Sharti  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
252121461Sharti  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
253121461Sharti  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
254121461Sharti    localstatedir="$ac_optarg" ;;
255121461Sharti
256121461Sharti  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
257121461Sharti    ac_prev=mandir ;;
258121461Sharti  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
259121461Sharti    mandir="$ac_optarg" ;;
260121461Sharti
261121461Sharti  -nfp | --nfp | --nf)
262121461Sharti    # Obsolete; use --without-fp.
263121461Sharti    with_fp=no ;;
264121461Sharti
265121461Sharti  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266121461Sharti  | --no-cr | --no-c)
267121461Sharti    no_create=yes ;;
268121461Sharti
269121461Sharti  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
270121461Sharti  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
271121461Sharti    no_recursion=yes ;;
272121461Sharti
273121461Sharti  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
274121461Sharti  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
275121461Sharti  | --oldin | --oldi | --old | --ol | --o)
276121461Sharti    ac_prev=oldincludedir ;;
277121461Sharti  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
278121461Sharti  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
279121461Sharti  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
280121461Sharti    oldincludedir="$ac_optarg" ;;
281121461Sharti
282121461Sharti  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
283121461Sharti    ac_prev=prefix ;;
284121461Sharti  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
285121461Sharti    prefix="$ac_optarg" ;;
286121461Sharti
287121461Sharti  -program-prefix | --program-prefix | --program-prefi | --program-pref \
288121461Sharti  | --program-pre | --program-pr | --program-p)
289121461Sharti    ac_prev=program_prefix ;;
290121461Sharti  -program-prefix=* | --program-prefix=* | --program-prefi=* \
291121461Sharti  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
292121461Sharti    program_prefix="$ac_optarg" ;;
293121461Sharti
294121461Sharti  -program-suffix | --program-suffix | --program-suffi | --program-suff \
295121461Sharti  | --program-suf | --program-su | --program-s)
296121461Sharti    ac_prev=program_suffix ;;
297121461Sharti  -program-suffix=* | --program-suffix=* | --program-suffi=* \
298121461Sharti  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
299121461Sharti    program_suffix="$ac_optarg" ;;
300121461Sharti
301121461Sharti  -program-transform-name | --program-transform-name \
302121461Sharti  | --program-transform-nam | --program-transform-na \
303121461Sharti  | --program-transform-n | --program-transform- \
304121461Sharti  | --program-transform | --program-transfor \
305121461Sharti  | --program-transfo | --program-transf \
306121461Sharti  | --program-trans | --program-tran \
307121461Sharti  | --progr-tra | --program-tr | --program-t)
308121461Sharti    ac_prev=program_transform_name ;;
309121461Sharti  -program-transform-name=* | --program-transform-name=* \
310121461Sharti  | --program-transform-nam=* | --program-transform-na=* \
311121461Sharti  | --program-transform-n=* | --program-transform-=* \
312121461Sharti  | --program-transform=* | --program-transfor=* \
313121461Sharti  | --program-transfo=* | --program-transf=* \
314121461Sharti  | --program-trans=* | --program-tran=* \
315121461Sharti  | --progr-tra=* | --program-tr=* | --program-t=*)
316121461Sharti    program_transform_name="$ac_optarg" ;;
317121461Sharti
318121461Sharti  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
319121461Sharti  | -silent | --silent | --silen | --sile | --sil)
320121461Sharti    silent=yes ;;
321121461Sharti
322121461Sharti  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
323121461Sharti    ac_prev=sbindir ;;
324121461Sharti  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
325121461Sharti  | --sbi=* | --sb=*)
326121461Sharti    sbindir="$ac_optarg" ;;
327121461Sharti
328121461Sharti  -sharedstatedir | --sharedstatedir | --sharedstatedi \
329121461Sharti  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
330276750Srwatson  | --sharedst | --shareds | --shared | --share | --shar \
331121461Sharti  | --sha | --sh)
332121461Sharti    ac_prev=sharedstatedir ;;
333121461Sharti  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
334121461Sharti  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
335121461Sharti  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
336121461Sharti  | --sha=* | --sh=*)
337121461Sharti    sharedstatedir="$ac_optarg" ;;
338121461Sharti
339121461Sharti  -site | --site | --sit)
340121461Sharti    ac_prev=site ;;
341121461Sharti  -site=* | --site=* | --sit=*)
342121461Sharti    site="$ac_optarg" ;;
343121461Sharti
344  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
345    ac_prev=srcdir ;;
346  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
347    srcdir="$ac_optarg" ;;
348
349  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
350  | --syscon | --sysco | --sysc | --sys | --sy)
351    ac_prev=sysconfdir ;;
352  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
353  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
354    sysconfdir="$ac_optarg" ;;
355
356  -target | --target | --targe | --targ | --tar | --ta | --t)
357    ac_prev=target ;;
358  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
359    target="$ac_optarg" ;;
360
361  -v | -verbose | --verbose | --verbos | --verbo | --verb)
362    verbose=yes ;;
363
364  -version | --version | --versio | --versi | --vers)
365    echo "configure generated by autoconf version 2.13"
366    exit 0 ;;
367
368  -with-* | --with-*)
369    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
370    # Reject names that are not valid shell variable names.
371    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
372      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373    fi
374    ac_package=`echo $ac_package| sed 's/-/_/g'`
375    case "$ac_option" in
376      *=*) ;;
377      *) ac_optarg=yes ;;
378    esac
379    eval "with_${ac_package}='$ac_optarg'" ;;
380
381  -without-* | --without-*)
382    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
383    # Reject names that are not valid shell variable names.
384    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
385      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
386    fi
387    ac_package=`echo $ac_package| sed 's/-/_/g'`
388    eval "with_${ac_package}=no" ;;
389
390  --x)
391    # Obsolete; use --with-x.
392    with_x=yes ;;
393
394  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
395  | --x-incl | --x-inc | --x-in | --x-i)
396    ac_prev=x_includes ;;
397  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
398  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
399    x_includes="$ac_optarg" ;;
400
401  -x-libraries | --x-libraries | --x-librarie | --x-librari \
402  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
403    ac_prev=x_libraries ;;
404  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
405  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
406    x_libraries="$ac_optarg" ;;
407
408  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
409    ;;
410
411  *)
412    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
413      echo "configure: warning: $ac_option: invalid host type" 1>&2
414    fi
415    if test "x$nonopt" != xNONE; then
416      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
417    fi
418    nonopt="$ac_option"
419    ;;
420
421  esac
422done
423
424if test -n "$ac_prev"; then
425  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
426fi
427
428trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
429
430# File descriptor usage:
431# 0 standard input
432# 1 file creation
433# 2 errors and warnings
434# 3 some systems may open it to /dev/tty
435# 4 used on the Kubota Titan
436# 6 checking for... messages and results
437# 5 compiler messages saved in config.log
438if test "$silent" = yes; then
439  exec 6>/dev/null
440else
441  exec 6>&1
442fi
443exec 5>./config.log
444
445echo "\
446This file contains any messages produced by compilers while
447running configure, to aid debugging if configure makes a mistake.
448" 1>&5
449
450# Strip out --no-create and --no-recursion so they do not pile up.
451# Also quote any args containing shell metacharacters.
452ac_configure_args=
453for ac_arg
454do
455  case "$ac_arg" in
456  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
457  | --no-cr | --no-c) ;;
458  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
459  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
460  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
461  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
462  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
463  esac
464done
465
466# NLS nuisances.
467# Only set these to C if already set.  These must not be set unconditionally
468# because not all systems understand e.g. LANG=C (notably SCO).
469# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
470# Non-C LC_CTYPE values break the ctype check.
471if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
472if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
473if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
474if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
475
476# confdefs.h avoids OS command line length limits that DEFS can exceed.
477rm -rf conftest* confdefs.h
478# AIX cpp loses on an empty file, so make sure it contains at least a newline.
479echo > confdefs.h
480
481# A filename unique to this package, relative to the directory that
482# configure is in, which we can look for to find out if srcdir is correct.
483ac_unique_file=libbfd.c
484
485# Find the source files, if location was not specified.
486if test -z "$srcdir"; then
487  ac_srcdir_defaulted=yes
488  # Try the directory containing this script, then its parent.
489  ac_prog=$0
490  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
491  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
492  srcdir=$ac_confdir
493  if test ! -r $srcdir/$ac_unique_file; then
494    srcdir=..
495  fi
496else
497  ac_srcdir_defaulted=no
498fi
499if test ! -r $srcdir/$ac_unique_file; then
500  if test "$ac_srcdir_defaulted" = yes; then
501    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
502  else
503    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
504  fi
505fi
506srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
507
508# Prefer explicitly selected file to automatically selected ones.
509if test -z "$CONFIG_SITE"; then
510  if test "x$prefix" != xNONE; then
511    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
512  else
513    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
514  fi
515fi
516for ac_site_file in $CONFIG_SITE; do
517  if test -r "$ac_site_file"; then
518    echo "loading site script $ac_site_file"
519    . "$ac_site_file"
520  fi
521done
522
523if test -r "$cache_file"; then
524  echo "loading cache $cache_file"
525  . $cache_file
526else
527  echo "creating cache $cache_file"
528  > $cache_file
529fi
530
531ac_ext=c
532# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
533ac_cpp='$CPP $CPPFLAGS'
534ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
535ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
536cross_compiling=$ac_cv_prog_cc_cross
537
538ac_exeext=
539ac_objext=o
540if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
541  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
542  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
543    ac_n= ac_c='
544' ac_t='	'
545  else
546    ac_n=-n ac_c= ac_t=
547  fi
548else
549  ac_n= ac_c='\c' ac_t=
550fi
551
552echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
553echo "configure:554: checking for Cygwin environment" >&5
554if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
555  echo $ac_n "(cached) $ac_c" 1>&6
556else
557  cat > conftest.$ac_ext <<EOF
558#line 559 "configure"
559#include "confdefs.h"
560
561int main() {
562
563#ifndef __CYGWIN__
564#define __CYGWIN__ __CYGWIN32__
565#endif
566return __CYGWIN__;
567; return 0; }
568EOF
569if { (eval echo configure:570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
570  rm -rf conftest*
571  ac_cv_cygwin=yes
572else
573  echo "configure: failed program was:" >&5
574  cat conftest.$ac_ext >&5
575  rm -rf conftest*
576  ac_cv_cygwin=no
577fi
578rm -f conftest*
579rm -f conftest*
580fi
581
582echo "$ac_t""$ac_cv_cygwin" 1>&6
583CYGWIN=
584test "$ac_cv_cygwin" = yes && CYGWIN=yes
585echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
586echo "configure:587: checking for mingw32 environment" >&5
587if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
588  echo $ac_n "(cached) $ac_c" 1>&6
589else
590  cat > conftest.$ac_ext <<EOF
591#line 592 "configure"
592#include "confdefs.h"
593
594int main() {
595return __MINGW32__;
596; return 0; }
597EOF
598if { (eval echo configure:599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
599  rm -rf conftest*
600  ac_cv_mingw32=yes
601else
602  echo "configure: failed program was:" >&5
603  cat conftest.$ac_ext >&5
604  rm -rf conftest*
605  ac_cv_mingw32=no
606fi
607rm -f conftest*
608rm -f conftest*
609fi
610
611echo "$ac_t""$ac_cv_mingw32" 1>&6
612MINGW32=
613test "$ac_cv_mingw32" = yes && MINGW32=yes
614
615
616ac_aux_dir=
617for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
618  if test -f $ac_dir/install-sh; then
619    ac_aux_dir=$ac_dir
620    ac_install_sh="$ac_aux_dir/install-sh -c"
621    break
622  elif test -f $ac_dir/install.sh; then
623    ac_aux_dir=$ac_dir
624    ac_install_sh="$ac_aux_dir/install.sh -c"
625    break
626  fi
627done
628if test -z "$ac_aux_dir"; then
629  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
630fi
631ac_config_guess=$ac_aux_dir/config.guess
632ac_config_sub=$ac_aux_dir/config.sub
633ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
634
635
636# Do some error checking and defaulting for the host and target type.
637# The inputs are:
638#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
639#
640# The rules are:
641# 1. You are not allowed to specify --host, --target, and nonopt at the
642#    same time.
643# 2. Host defaults to nonopt.
644# 3. If nonopt is not specified, then host defaults to the current host,
645#    as determined by config.guess.
646# 4. Target and build default to nonopt.
647# 5. If nonopt is not specified, then target and build default to host.
648
649# The aliases save the names the user supplied, while $host etc.
650# will get canonicalized.
651case $host---$target---$nonopt in
652NONE---*---* | *---NONE---* | *---*---NONE) ;;
653*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
654esac
655
656
657# Make sure we can run config.sub.
658if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
659else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
660fi
661
662echo $ac_n "checking host system type""... $ac_c" 1>&6
663echo "configure:664: checking host system type" >&5
664
665host_alias=$host
666case "$host_alias" in
667NONE)
668  case $nonopt in
669  NONE)
670    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
671    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
672    fi ;;
673  *) host_alias=$nonopt ;;
674  esac ;;
675esac
676
677host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
678host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
679host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
680host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
681echo "$ac_t""$host" 1>&6
682
683echo $ac_n "checking target system type""... $ac_c" 1>&6
684echo "configure:685: checking target system type" >&5
685
686target_alias=$target
687case "$target_alias" in
688NONE)
689  case $nonopt in
690  NONE) target_alias=$host_alias ;;
691  *) target_alias=$nonopt ;;
692  esac ;;
693esac
694
695target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
696target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
697target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
698target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
699echo "$ac_t""$target" 1>&6
700
701echo $ac_n "checking build system type""... $ac_c" 1>&6
702echo "configure:703: checking build system type" >&5
703
704build_alias=$build
705case "$build_alias" in
706NONE)
707  case $nonopt in
708  NONE) build_alias=$host_alias ;;
709  *) build_alias=$nonopt ;;
710  esac ;;
711esac
712
713build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
714build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
715build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
716build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
717echo "$ac_t""$build" 1>&6
718
719test "$host_alias" != "$target_alias" &&
720  test "$program_prefix$program_suffix$program_transform_name" = \
721    NONENONEs,x,x, &&
722  program_prefix=${target_alias}-
723
724# Extract the first word of "gcc", so it can be a program name with args.
725set dummy gcc; ac_word=$2
726echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
727echo "configure:728: checking for $ac_word" >&5
728if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
729  echo $ac_n "(cached) $ac_c" 1>&6
730else
731  if test -n "$CC"; then
732  ac_cv_prog_CC="$CC" # Let the user override the test.
733else
734  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
735  ac_dummy="$PATH"
736  for ac_dir in $ac_dummy; do
737    test -z "$ac_dir" && ac_dir=.
738    if test -f $ac_dir/$ac_word; then
739      ac_cv_prog_CC="gcc"
740      break
741    fi
742  done
743  IFS="$ac_save_ifs"
744fi
745fi
746CC="$ac_cv_prog_CC"
747if test -n "$CC"; then
748  echo "$ac_t""$CC" 1>&6
749else
750  echo "$ac_t""no" 1>&6
751fi
752
753if test -z "$CC"; then
754  # Extract the first word of "cc", so it can be a program name with args.
755set dummy cc; ac_word=$2
756echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
757echo "configure:758: checking for $ac_word" >&5
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=":"
765  ac_prog_rejected=no
766  ac_dummy="$PATH"
767  for ac_dir in $ac_dummy; 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  if test -z "$CC"; then
803    case "`uname -s`" in
804    *win32* | *WIN32*)
805      # Extract the first word of "cl", so it can be a program name with args.
806set dummy cl; ac_word=$2
807echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
808echo "configure:809: checking for $ac_word" >&5
809if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
810  echo $ac_n "(cached) $ac_c" 1>&6
811else
812  if test -n "$CC"; then
813  ac_cv_prog_CC="$CC" # Let the user override the test.
814else
815  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
816  ac_dummy="$PATH"
817  for ac_dir in $ac_dummy; do
818    test -z "$ac_dir" && ac_dir=.
819    if test -f $ac_dir/$ac_word; then
820      ac_cv_prog_CC="cl"
821      break
822    fi
823  done
824  IFS="$ac_save_ifs"
825fi
826fi
827CC="$ac_cv_prog_CC"
828if test -n "$CC"; then
829  echo "$ac_t""$CC" 1>&6
830else
831  echo "$ac_t""no" 1>&6
832fi
833 ;;
834    esac
835  fi
836  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
837fi
838
839echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
840echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
841
842ac_ext=c
843# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
844ac_cpp='$CPP $CPPFLAGS'
845ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
846ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
847cross_compiling=$ac_cv_prog_cc_cross
848
849cat > conftest.$ac_ext << EOF
850
851#line 852 "configure"
852#include "confdefs.h"
853
854main(){return(0);}
855EOF
856if { (eval echo configure:857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
857  ac_cv_prog_cc_works=yes
858  # If we can't run a trivial program, we are probably using a cross compiler.
859  if (./conftest; exit) 2>/dev/null; then
860    ac_cv_prog_cc_cross=no
861  else
862    ac_cv_prog_cc_cross=yes
863  fi
864else
865  echo "configure: failed program was:" >&5
866  cat conftest.$ac_ext >&5
867  ac_cv_prog_cc_works=no
868fi
869rm -fr conftest*
870ac_ext=c
871# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
872ac_cpp='$CPP $CPPFLAGS'
873ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
874ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
875cross_compiling=$ac_cv_prog_cc_cross
876
877echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
878if test $ac_cv_prog_cc_works = no; then
879  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
880fi
881echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
882echo "configure:883: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
883echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
884cross_compiling=$ac_cv_prog_cc_cross
885
886echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
887echo "configure:888: checking whether we are using GNU C" >&5
888if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
889  echo $ac_n "(cached) $ac_c" 1>&6
890else
891  cat > conftest.c <<EOF
892#ifdef __GNUC__
893  yes;
894#endif
895EOF
896if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
897  ac_cv_prog_gcc=yes
898else
899  ac_cv_prog_gcc=no
900fi
901fi
902
903echo "$ac_t""$ac_cv_prog_gcc" 1>&6
904
905if test $ac_cv_prog_gcc = yes; then
906  GCC=yes
907else
908  GCC=
909fi
910
911ac_test_CFLAGS="${CFLAGS+set}"
912ac_save_CFLAGS="$CFLAGS"
913CFLAGS=
914echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
915echo "configure:916: checking whether ${CC-cc} accepts -g" >&5
916if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
917  echo $ac_n "(cached) $ac_c" 1>&6
918else
919  echo 'void f(){}' > conftest.c
920if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
921  ac_cv_prog_cc_g=yes
922else
923  ac_cv_prog_cc_g=no
924fi
925rm -f conftest*
926
927fi
928
929echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
930if test "$ac_test_CFLAGS" = set; then
931  CFLAGS="$ac_save_CFLAGS"
932elif test $ac_cv_prog_cc_g = yes; then
933  if test "$GCC" = yes; then
934    CFLAGS="-g -O2"
935  else
936    CFLAGS="-g"
937  fi
938else
939  if test "$GCC" = yes; then
940    CFLAGS="-O2"
941  else
942    CFLAGS=
943  fi
944fi
945
946echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
947echo "configure:948: checking for POSIXized ISC" >&5
948if test -d /etc/conf/kconfig.d &&
949  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
950then
951  echo "$ac_t""yes" 1>&6
952  ISC=yes # If later tests want to check for ISC.
953  cat >> confdefs.h <<\EOF
954#define _POSIX_SOURCE 1
955EOF
956
957  if test "$GCC" = yes; then
958    CC="$CC -posix"
959  else
960    CC="$CC -Xp"
961  fi
962else
963  echo "$ac_t""no" 1>&6
964  ISC=
965fi
966
967
968# Find a good install program.  We prefer a C program (faster),
969# so one script is as good as another.  But avoid the broken or
970# incompatible versions:
971# SysV /etc/install, /usr/sbin/install
972# SunOS /usr/etc/install
973# IRIX /sbin/install
974# AIX /bin/install
975# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
976# AFS /usr/afsws/bin/install, which mishandles nonexistent args
977# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
978# ./install, which can be erroneously created by make from ./install.sh.
979echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
980echo "configure:981: checking for a BSD compatible install" >&5
981if test -z "$INSTALL"; then
982if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
983  echo $ac_n "(cached) $ac_c" 1>&6
984else
985    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
986  for ac_dir in $PATH; do
987    # Account for people who put trailing slashes in PATH elements.
988    case "$ac_dir/" in
989    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
990    *)
991      # OSF1 and SCO ODT 3.0 have their own names for install.
992      # Don't use installbsd from OSF since it installs stuff as root
993      # by default.
994      for ac_prog in ginstall scoinst install; do
995        if test -f $ac_dir/$ac_prog; then
996	  if test $ac_prog = install &&
997            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
998	    # AIX install.  It has an incompatible calling convention.
999	    :
1000	  else
1001	    ac_cv_path_install="$ac_dir/$ac_prog -c"
1002	    break 2
1003	  fi
1004	fi
1005      done
1006      ;;
1007    esac
1008  done
1009  IFS="$ac_save_IFS"
1010
1011fi
1012  if test "${ac_cv_path_install+set}" = set; then
1013    INSTALL="$ac_cv_path_install"
1014  else
1015    # As a last resort, use the slow shell script.  We don't cache a
1016    # path for INSTALL within a source directory, because that will
1017    # break other packages using the cache if that directory is
1018    # removed, or if the path is relative.
1019    INSTALL="$ac_install_sh"
1020  fi
1021fi
1022echo "$ac_t""$INSTALL" 1>&6
1023
1024# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1025# It thinks the first close brace ends the variable substitution.
1026test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1027
1028test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1029
1030test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1031
1032echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1033echo "configure:1034: checking whether build environment is sane" >&5
1034# Just in case
1035sleep 1
1036echo timestamp > conftestfile
1037# Do `set' in a subshell so we don't clobber the current shell's
1038# arguments.  Must try -L first in case configure is actually a
1039# symlink; some systems play weird games with the mod time of symlinks
1040# (eg FreeBSD returns the mod time of the symlink's containing
1041# directory).
1042if (
1043   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1044   if test "$*" = "X"; then
1045      # -L didn't work.
1046      set X `ls -t $srcdir/configure conftestfile`
1047   fi
1048   if test "$*" != "X $srcdir/configure conftestfile" \
1049      && test "$*" != "X conftestfile $srcdir/configure"; then
1050
1051      # If neither matched, then we have a broken ls.  This can happen
1052      # if, for instance, CONFIG_SHELL is bash and it inherits a
1053      # broken ls alias from the environment.  This has actually
1054      # happened.  Such a system could not be considered "sane".
1055      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1056alias in your environment" 1>&2; exit 1; }
1057   fi
1058
1059   test "$2" = conftestfile
1060   )
1061then
1062   # Ok.
1063   :
1064else
1065   { echo "configure: error: newly created file is older than distributed files!
1066Check your system clock" 1>&2; exit 1; }
1067fi
1068rm -f conftest*
1069echo "$ac_t""yes" 1>&6
1070if test "$program_transform_name" = s,x,x,; then
1071  program_transform_name=
1072else
1073  # Double any \ or $.  echo might interpret backslashes.
1074  cat <<\EOF_SED > conftestsed
1075s,\\,\\\\,g; s,\$,$$,g
1076EOF_SED
1077  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1078  rm -f conftestsed
1079fi
1080test "$program_prefix" != NONE &&
1081  program_transform_name="s,^,${program_prefix},; $program_transform_name"
1082# Use a double $ so make ignores it.
1083test "$program_suffix" != NONE &&
1084  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1085
1086# sed with no file args requires a program.
1087test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1088
1089echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1090echo "configure:1091: checking whether ${MAKE-make} sets \${MAKE}" >&5
1091set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1092if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1093  echo $ac_n "(cached) $ac_c" 1>&6
1094else
1095  cat > conftestmake <<\EOF
1096all:
1097	@echo 'ac_maketemp="${MAKE}"'
1098EOF
1099# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1100eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1101if test -n "$ac_maketemp"; then
1102  eval ac_cv_prog_make_${ac_make}_set=yes
1103else
1104  eval ac_cv_prog_make_${ac_make}_set=no
1105fi
1106rm -f conftestmake
1107fi
1108if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1109  echo "$ac_t""yes" 1>&6
1110  SET_MAKE=
1111else
1112  echo "$ac_t""no" 1>&6
1113  SET_MAKE="MAKE=${MAKE-make}"
1114fi
1115
1116
1117PACKAGE=bfd
1118
1119VERSION=2.11.93
1120
1121if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1122  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1123fi
1124cat >> confdefs.h <<EOF
1125#define PACKAGE "$PACKAGE"
1126EOF
1127
1128cat >> confdefs.h <<EOF
1129#define VERSION "$VERSION"
1130EOF
1131
1132
1133
1134missing_dir=`cd $ac_aux_dir && pwd`
1135echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1136echo "configure:1137: checking for working aclocal" >&5
1137# Run test in a subshell; some versions of sh will print an error if
1138# an executable is not found, even if stderr is redirected.
1139# Redirect stdin to placate older versions of autoconf.  Sigh.
1140if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1141   ACLOCAL=aclocal
1142   echo "$ac_t""found" 1>&6
1143else
1144   ACLOCAL="$missing_dir/missing aclocal"
1145   echo "$ac_t""missing" 1>&6
1146fi
1147
1148echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1149echo "configure:1150: checking for working autoconf" >&5
1150# Run test in a subshell; some versions of sh will print an error if
1151# an executable is not found, even if stderr is redirected.
1152# Redirect stdin to placate older versions of autoconf.  Sigh.
1153if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1154   AUTOCONF=autoconf
1155   echo "$ac_t""found" 1>&6
1156else
1157   AUTOCONF="$missing_dir/missing autoconf"
1158   echo "$ac_t""missing" 1>&6
1159fi
1160
1161echo $ac_n "checking for working automake""... $ac_c" 1>&6
1162echo "configure:1163: checking for working automake" >&5
1163# Run test in a subshell; some versions of sh will print an error if
1164# an executable is not found, even if stderr is redirected.
1165# Redirect stdin to placate older versions of autoconf.  Sigh.
1166if (automake --version) < /dev/null > /dev/null 2>&1; then
1167   AUTOMAKE=automake
1168   echo "$ac_t""found" 1>&6
1169else
1170   AUTOMAKE="$missing_dir/missing automake"
1171   echo "$ac_t""missing" 1>&6
1172fi
1173
1174echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1175echo "configure:1176: checking for working autoheader" >&5
1176# Run test in a subshell; some versions of sh will print an error if
1177# an executable is not found, even if stderr is redirected.
1178# Redirect stdin to placate older versions of autoconf.  Sigh.
1179if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1180   AUTOHEADER=autoheader
1181   echo "$ac_t""found" 1>&6
1182else
1183   AUTOHEADER="$missing_dir/missing autoheader"
1184   echo "$ac_t""missing" 1>&6
1185fi
1186
1187echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1188echo "configure:1189: checking for working makeinfo" >&5
1189# Run test in a subshell; some versions of sh will print an error if
1190# an executable is not found, even if stderr is redirected.
1191# Redirect stdin to placate older versions of autoconf.  Sigh.
1192if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1193   MAKEINFO=makeinfo
1194   echo "$ac_t""found" 1>&6
1195else
1196   MAKEINFO="$missing_dir/missing makeinfo"
1197   echo "$ac_t""missing" 1>&6
1198fi
1199
1200
1201# Uncomment the next line to remove the date from the reported bfd version
1202#is_release=y
1203
1204bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
1205
1206bfd_version_string="\"${VERSION}\""
1207bfd_version_date=`sed -e 's/.*DATE //' < ${srcdir}/version.h`
1208if test x${is_release} = x; then
1209  bfd_version_string="\"${VERSION} ${bfd_version_date}\""
1210fi
1211
1212
1213
1214
1215if test $host != $build; then
1216  ac_tool_prefix=${host_alias}-
1217else
1218  ac_tool_prefix=
1219fi
1220
1221# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1222set dummy ${ac_tool_prefix}ar; ac_word=$2
1223echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1224echo "configure:1225: checking for $ac_word" >&5
1225if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1226  echo $ac_n "(cached) $ac_c" 1>&6
1227else
1228  if test -n "$AR"; then
1229  ac_cv_prog_AR="$AR" # Let the user override the test.
1230else
1231  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1232  ac_dummy="$PATH"
1233  for ac_dir in $ac_dummy; do
1234    test -z "$ac_dir" && ac_dir=.
1235    if test -f $ac_dir/$ac_word; then
1236      ac_cv_prog_AR="${ac_tool_prefix}ar"
1237      break
1238    fi
1239  done
1240  IFS="$ac_save_ifs"
1241  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1242fi
1243fi
1244AR="$ac_cv_prog_AR"
1245if test -n "$AR"; then
1246  echo "$ac_t""$AR" 1>&6
1247else
1248  echo "$ac_t""no" 1>&6
1249fi
1250
1251
1252
1253# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1254set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1255echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1256echo "configure:1257: checking for $ac_word" >&5
1257if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1258  echo $ac_n "(cached) $ac_c" 1>&6
1259else
1260  if test -n "$RANLIB"; then
1261  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1262else
1263  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1264  ac_dummy="$PATH"
1265  for ac_dir in $ac_dummy; do
1266    test -z "$ac_dir" && ac_dir=.
1267    if test -f $ac_dir/$ac_word; then
1268      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1269      break
1270    fi
1271  done
1272  IFS="$ac_save_ifs"
1273fi
1274fi
1275RANLIB="$ac_cv_prog_RANLIB"
1276if test -n "$RANLIB"; then
1277  echo "$ac_t""$RANLIB" 1>&6
1278else
1279  echo "$ac_t""no" 1>&6
1280fi
1281
1282
1283if test -z "$ac_cv_prog_RANLIB"; then
1284if test -n "$ac_tool_prefix"; then
1285  # Extract the first word of "ranlib", so it can be a program name with args.
1286set dummy ranlib; ac_word=$2
1287echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1288echo "configure:1289: checking for $ac_word" >&5
1289if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1290  echo $ac_n "(cached) $ac_c" 1>&6
1291else
1292  if test -n "$RANLIB"; then
1293  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1294else
1295  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1296  ac_dummy="$PATH"
1297  for ac_dir in $ac_dummy; do
1298    test -z "$ac_dir" && ac_dir=.
1299    if test -f $ac_dir/$ac_word; then
1300      ac_cv_prog_RANLIB="ranlib"
1301      break
1302    fi
1303  done
1304  IFS="$ac_save_ifs"
1305  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1306fi
1307fi
1308RANLIB="$ac_cv_prog_RANLIB"
1309if test -n "$RANLIB"; then
1310  echo "$ac_t""$RANLIB" 1>&6
1311else
1312  echo "$ac_t""no" 1>&6
1313fi
1314
1315else
1316  RANLIB=":"
1317fi
1318fi
1319
1320
1321# Check whether --enable-shared or --disable-shared was given.
1322if test "${enable_shared+set}" = set; then
1323  enableval="$enable_shared"
1324  p=${PACKAGE-default}
1325case $enableval in
1326yes) enable_shared=yes ;;
1327no) enable_shared=no ;;
1328*)
1329  enable_shared=no
1330  # Look at the argument we got.  We use all the common list separators.
1331  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1332  for pkg in $enableval; do
1333    if test "X$pkg" = "X$p"; then
1334      enable_shared=yes
1335    fi
1336  done
1337  IFS="$ac_save_ifs"
1338  ;;
1339esac
1340else
1341  enable_shared=no
1342fi
1343
1344
1345# Check whether --enable-static or --disable-static was given.
1346if test "${enable_static+set}" = set; then
1347  enableval="$enable_static"
1348  p=${PACKAGE-default}
1349case $enableval in
1350yes) enable_static=yes ;;
1351no) enable_static=no ;;
1352*)
1353  enable_static=no
1354  # Look at the argument we got.  We use all the common list separators.
1355  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1356  for pkg in $enableval; do
1357    if test "X$pkg" = "X$p"; then
1358      enable_static=yes
1359    fi
1360  done
1361  IFS="$ac_save_ifs"
1362  ;;
1363esac
1364else
1365  enable_static=yes
1366fi
1367
1368# Check whether --enable-fast-install or --disable-fast-install was given.
1369if test "${enable_fast_install+set}" = set; then
1370  enableval="$enable_fast_install"
1371  p=${PACKAGE-default}
1372case $enableval in
1373yes) enable_fast_install=yes ;;
1374no) enable_fast_install=no ;;
1375*)
1376  enable_fast_install=no
1377  # Look at the argument we got.  We use all the common list separators.
1378  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1379  for pkg in $enableval; do
1380    if test "X$pkg" = "X$p"; then
1381      enable_fast_install=yes
1382    fi
1383  done
1384  IFS="$ac_save_ifs"
1385  ;;
1386esac
1387else
1388  enable_fast_install=yes
1389fi
1390
1391# Check whether --with-gnu-ld or --without-gnu-ld was given.
1392if test "${with_gnu_ld+set}" = set; then
1393  withval="$with_gnu_ld"
1394  test "$withval" = no || with_gnu_ld=yes
1395else
1396  with_gnu_ld=no
1397fi
1398
1399ac_prog=ld
1400if test "$GCC" = yes; then
1401  # Check if gcc -print-prog-name=ld gives a path.
1402  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1403echo "configure:1404: checking for ld used by GCC" >&5
1404  case $host in
1405  *-*-mingw*)
1406    # gcc leaves a trailing carriage return which upsets mingw
1407    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1408  *)
1409    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1410  esac
1411  case $ac_prog in
1412    # Accept absolute paths.
1413    [\\/]* | [A-Za-z]:[\\/]*)
1414      re_direlt='/[^/][^/]*/\.\./'
1415      # Canonicalize the path of ld
1416      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1417      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1418	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1419      done
1420      test -z "$LD" && LD="$ac_prog"
1421      ;;
1422  "")
1423    # If it fails, then pretend we aren't using GCC.
1424    ac_prog=ld
1425    ;;
1426  *)
1427    # If it is relative, then search for the first ld in PATH.
1428    with_gnu_ld=unknown
1429    ;;
1430  esac
1431elif test "$with_gnu_ld" = yes; then
1432  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1433echo "configure:1434: checking for GNU ld" >&5
1434else
1435  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1436echo "configure:1437: checking for non-GNU ld" >&5
1437fi
1438if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1439  echo $ac_n "(cached) $ac_c" 1>&6
1440else
1441  if test -z "$LD"; then
1442  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1443  for ac_dir in $PATH; do
1444    test -z "$ac_dir" && ac_dir=.
1445    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1446      lt_cv_path_LD="$ac_dir/$ac_prog"
1447      # Check to see if the program is GNU ld.  I'd rather use --version,
1448      # but apparently some GNU ld's only accept -v.
1449      # Break only if it was the GNU/non-GNU ld that we prefer.
1450      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1451	test "$with_gnu_ld" != no && break
1452      else
1453	test "$with_gnu_ld" != yes && break
1454      fi
1455    fi
1456  done
1457  IFS="$ac_save_ifs"
1458else
1459  lt_cv_path_LD="$LD" # Let the user override the test with a path.
1460fi
1461fi
1462
1463LD="$lt_cv_path_LD"
1464if test -n "$LD"; then
1465  echo "$ac_t""$LD" 1>&6
1466else
1467  echo "$ac_t""no" 1>&6
1468fi
1469test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1470echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1471echo "configure:1472: checking if the linker ($LD) is GNU ld" >&5
1472if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1473  echo $ac_n "(cached) $ac_c" 1>&6
1474else
1475  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1476if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1477  lt_cv_prog_gnu_ld=yes
1478else
1479  lt_cv_prog_gnu_ld=no
1480fi
1481fi
1482
1483echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1484with_gnu_ld=$lt_cv_prog_gnu_ld
1485
1486
1487echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1488echo "configure:1489: checking for $LD option to reload object files" >&5
1489if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1490  echo $ac_n "(cached) $ac_c" 1>&6
1491else
1492  lt_cv_ld_reload_flag='-r'
1493fi
1494
1495echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1496reload_flag=$lt_cv_ld_reload_flag
1497test -n "$reload_flag" && reload_flag=" $reload_flag"
1498
1499echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1500echo "configure:1501: checking for BSD-compatible nm" >&5
1501if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1502  echo $ac_n "(cached) $ac_c" 1>&6
1503else
1504  if test -n "$NM"; then
1505  # Let the user override the test.
1506  lt_cv_path_NM="$NM"
1507else
1508  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1509  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1510    test -z "$ac_dir" && ac_dir=.
1511    tmp_nm=$ac_dir/${ac_tool_prefix}nm
1512    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1513      # Check to see if the nm accepts a BSD-compat flag.
1514      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1515      #   nm: unknown option "B" ignored
1516      # Tru64's nm complains that /dev/null is an invalid object file
1517      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1518	lt_cv_path_NM="$tmp_nm -B"
1519	break
1520      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1521	lt_cv_path_NM="$tmp_nm -p"
1522	break
1523      else
1524	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1525	continue # so that we can try to find one that supports BSD flags
1526      fi
1527    fi
1528  done
1529  IFS="$ac_save_ifs"
1530  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1531fi
1532fi
1533
1534NM="$lt_cv_path_NM"
1535echo "$ac_t""$NM" 1>&6
1536
1537echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1538echo "configure:1539: checking whether ln -s works" >&5
1539if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1540  echo $ac_n "(cached) $ac_c" 1>&6
1541else
1542  rm -f conftestdata
1543if ln -s X conftestdata 2>/dev/null
1544then
1545  rm -f conftestdata
1546  ac_cv_prog_LN_S="ln -s"
1547else
1548  ac_cv_prog_LN_S=ln
1549fi
1550fi
1551LN_S="$ac_cv_prog_LN_S"
1552if test "$ac_cv_prog_LN_S" = "ln -s"; then
1553  echo "$ac_t""yes" 1>&6
1554else
1555  echo "$ac_t""no" 1>&6
1556fi
1557
1558echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1559echo "configure:1560: checking how to recognise dependant libraries" >&5
1560if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1561  echo $ac_n "(cached) $ac_c" 1>&6
1562else
1563  lt_cv_file_magic_cmd='$MAGIC_CMD'
1564lt_cv_file_magic_test_file=
1565lt_cv_deplibs_check_method='unknown'
1566# Need to set the preceding variable on all platforms that support
1567# interlibrary dependencies.
1568# 'none' -- dependencies not supported.
1569# `unknown' -- same as none, but documents that we really don't know.
1570# 'pass_all' -- all dependencies passed with no checks.
1571# 'test_compile' -- check by making test program.
1572# 'file_magic [regex]' -- check by looking for files in library path
1573# which responds to the $file_magic_cmd with a given egrep regex.
1574# If you have `file' or equivalent on your system and you're not sure
1575# whether `pass_all' will *always* work, you probably want this one.
1576
1577case $host_os in
1578aix*)
1579  lt_cv_deplibs_check_method=pass_all
1580  ;;
1581
1582beos*)
1583  lt_cv_deplibs_check_method=pass_all
1584  ;;
1585
1586bsdi4*)
1587  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1588  lt_cv_file_magic_cmd='/usr/bin/file -L'
1589  lt_cv_file_magic_test_file=/shlib/libc.so
1590  ;;
1591
1592cygwin* | mingw* |pw32*)
1593  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1594  lt_cv_file_magic_cmd='$OBJDUMP -f'
1595  ;;
1596
1597darwin* | rhapsody*)
1598  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1599  lt_cv_file_magic_cmd='/usr/bin/file -L'
1600  case "$host_os" in
1601  rhapsody* | darwin1.012)
1602    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1603    ;;
1604  *) # Darwin 1.3 on
1605    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1606    ;;
1607  esac
1608  ;;
1609
1610freebsd* )
1611  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1612    case $host_cpu in
1613    i*86 )
1614      # Not sure whether the presence of OpenBSD here was a mistake.
1615      # Let's accept both of them until this is cleared up.
1616      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1617      lt_cv_file_magic_cmd=/usr/bin/file
1618      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1619      ;;
1620    esac
1621  else
1622    lt_cv_deplibs_check_method=pass_all
1623  fi
1624  ;;
1625
1626gnu*)
1627  lt_cv_deplibs_check_method=pass_all
1628  ;;
1629
1630hpux10.20*|hpux11*)
1631  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1632  lt_cv_file_magic_cmd=/usr/bin/file
1633  lt_cv_file_magic_test_file=/usr/lib/libc.sl
1634  ;;
1635
1636irix5* | irix6*)
1637  case $host_os in
1638  irix5*)
1639    # this will be overridden with pass_all, but let us keep it just in case
1640    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1641    ;;
1642  *)
1643    case $LD in
1644    *-32|*"-32 ") libmagic=32-bit;;
1645    *-n32|*"-n32 ") libmagic=N32;;
1646    *-64|*"-64 ") libmagic=64-bit;;
1647    *) libmagic=never-match;;
1648    esac
1649    # this will be overridden with pass_all, but let us keep it just in case
1650    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1651    ;;
1652  esac
1653  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1654  lt_cv_deplibs_check_method=pass_all
1655  ;;
1656
1657# This must be Linux ELF.
1658linux-gnu*)
1659  case $host_cpu in
1660  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
1661    lt_cv_deplibs_check_method=pass_all ;;
1662  *)
1663    # glibc up to 2.1.1 does not perform some relocations on ARM
1664    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1665  esac
1666  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1667  ;;
1668
1669netbsd*)
1670  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1671    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1672  else
1673    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1674  fi
1675  ;;
1676
1677newsos6)
1678  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1679  lt_cv_file_magic_cmd=/usr/bin/file
1680  lt_cv_file_magic_test_file=/usr/lib/libnls.so
1681  ;;
1682
1683osf3* | osf4* | osf5*)
1684  # this will be overridden with pass_all, but let us keep it just in case
1685  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1686  lt_cv_file_magic_test_file=/shlib/libc.so
1687  lt_cv_deplibs_check_method=pass_all
1688  ;;
1689
1690sco3.2v5*)
1691  lt_cv_deplibs_check_method=pass_all
1692  ;;
1693
1694solaris*)
1695  lt_cv_deplibs_check_method=pass_all
1696  lt_cv_file_magic_test_file=/lib/libc.so
1697  ;;
1698
1699sysv5uw[78]* | sysv4*uw2*)
1700  lt_cv_deplibs_check_method=pass_all
1701  ;;
1702
1703sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1704  case $host_vendor in
1705  ncr)
1706    lt_cv_deplibs_check_method=pass_all
1707    ;;
1708  motorola)
1709    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
1710    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1711    ;;
1712  esac
1713  ;;
1714esac
1715
1716fi
1717
1718echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1719file_magic_cmd=$lt_cv_file_magic_cmd
1720deplibs_check_method=$lt_cv_deplibs_check_method
1721
1722echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1723echo "configure:1724: checking for object suffix" >&5
1724if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1725  echo $ac_n "(cached) $ac_c" 1>&6
1726else
1727  rm -f conftest*
1728echo 'int i = 1;' > conftest.$ac_ext
1729if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1730  for ac_file in conftest.*; do
1731    case $ac_file in
1732    *.c) ;;
1733    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1734    esac
1735  done
1736else
1737  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1738fi
1739rm -f conftest*
1740fi
1741
1742echo "$ac_t""$ac_cv_objext" 1>&6
1743OBJEXT=$ac_cv_objext
1744ac_objext=$ac_cv_objext
1745
1746
1747
1748echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1749echo "configure:1750: checking for executable suffix" >&5
1750if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1751  echo $ac_n "(cached) $ac_c" 1>&6
1752else
1753  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1754  ac_cv_exeext=.exe
1755else
1756  rm -f conftest*
1757  echo 'int main () { return 0; }' > conftest.$ac_ext
1758  ac_cv_exeext=
1759  if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1760    for file in conftest.*; do
1761      case $file in
1762      *.c | *.o | *.obj) ;;
1763      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1764      esac
1765    done
1766  else
1767    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1768  fi
1769  rm -f conftest*
1770  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1771fi
1772fi
1773
1774EXEEXT=""
1775test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1776echo "$ac_t""${ac_cv_exeext}" 1>&6
1777ac_exeext=$EXEEXT
1778
1779# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1780
1781# Only perform the check for file, if the check method requires it
1782case $deplibs_check_method in
1783file_magic*)
1784  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1785    echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
1786echo "configure:1787: checking for ${ac_tool_prefix}file" >&5
1787if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1788  echo $ac_n "(cached) $ac_c" 1>&6
1789else
1790  case $MAGIC_CMD in
1791  /*)
1792  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1793  ;;
1794  ?:/*)
1795  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1796  ;;
1797  *)
1798  ac_save_MAGIC_CMD="$MAGIC_CMD"
1799  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1800  ac_dummy="/usr/bin:$PATH"
1801  for ac_dir in $ac_dummy; do
1802    test -z "$ac_dir" && ac_dir=.
1803    if test -f $ac_dir/${ac_tool_prefix}file; then
1804      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
1805      if test -n "$file_magic_test_file"; then
1806	case $deplibs_check_method in
1807	"file_magic "*)
1808	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1809	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1810	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1811	    egrep "$file_magic_regex" > /dev/null; then
1812	    :
1813	  else
1814	    cat <<EOF 1>&2
1815
1816*** Warning: the command libtool uses to detect shared libraries,
1817*** $file_magic_cmd, produces output that libtool cannot recognize.
1818*** The result is that libtool may fail to recognize shared libraries
1819*** as such.  This will affect the creation of libtool libraries that
1820*** depend on shared libraries, but programs linked with such libtool
1821*** libraries will work regardless of this problem.  Nevertheless, you
1822*** may want to report the problem to your system manager and/or to
1823*** bug-libtool@gnu.org
1824
1825EOF
1826	  fi ;;
1827	esac
1828      fi
1829      break
1830    fi
1831  done
1832  IFS="$ac_save_ifs"
1833  MAGIC_CMD="$ac_save_MAGIC_CMD"
1834  ;;
1835esac
1836fi
1837
1838MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1839if test -n "$MAGIC_CMD"; then
1840  echo "$ac_t""$MAGIC_CMD" 1>&6
1841else
1842  echo "$ac_t""no" 1>&6
1843fi
1844
1845if test -z "$lt_cv_path_MAGIC_CMD"; then
1846  if test -n "$ac_tool_prefix"; then
1847    echo $ac_n "checking for file""... $ac_c" 1>&6
1848echo "configure:1849: checking for file" >&5
1849if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1850  echo $ac_n "(cached) $ac_c" 1>&6
1851else
1852  case $MAGIC_CMD in
1853  /*)
1854  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1855  ;;
1856  ?:/*)
1857  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1858  ;;
1859  *)
1860  ac_save_MAGIC_CMD="$MAGIC_CMD"
1861  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1862  ac_dummy="/usr/bin:$PATH"
1863  for ac_dir in $ac_dummy; do
1864    test -z "$ac_dir" && ac_dir=.
1865    if test -f $ac_dir/file; then
1866      lt_cv_path_MAGIC_CMD="$ac_dir/file"
1867      if test -n "$file_magic_test_file"; then
1868	case $deplibs_check_method in
1869	"file_magic "*)
1870	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1871	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1872	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1873	    egrep "$file_magic_regex" > /dev/null; then
1874	    :
1875	  else
1876	    cat <<EOF 1>&2
1877
1878*** Warning: the command libtool uses to detect shared libraries,
1879*** $file_magic_cmd, produces output that libtool cannot recognize.
1880*** The result is that libtool may fail to recognize shared libraries
1881*** as such.  This will affect the creation of libtool libraries that
1882*** depend on shared libraries, but programs linked with such libtool
1883*** libraries will work regardless of this problem.  Nevertheless, you
1884*** may want to report the problem to your system manager and/or to
1885*** bug-libtool@gnu.org
1886
1887EOF
1888	  fi ;;
1889	esac
1890      fi
1891      break
1892    fi
1893  done
1894  IFS="$ac_save_ifs"
1895  MAGIC_CMD="$ac_save_MAGIC_CMD"
1896  ;;
1897esac
1898fi
1899
1900MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1901if test -n "$MAGIC_CMD"; then
1902  echo "$ac_t""$MAGIC_CMD" 1>&6
1903else
1904  echo "$ac_t""no" 1>&6
1905fi
1906
1907  else
1908    MAGIC_CMD=:
1909  fi
1910fi
1911
1912  fi
1913  ;;
1914esac
1915
1916# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1917set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1918echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1919echo "configure:1920: checking for $ac_word" >&5
1920if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1921  echo $ac_n "(cached) $ac_c" 1>&6
1922else
1923  if test -n "$RANLIB"; then
1924  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1925else
1926  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1927  ac_dummy="$PATH"
1928  for ac_dir in $ac_dummy; do
1929    test -z "$ac_dir" && ac_dir=.
1930    if test -f $ac_dir/$ac_word; then
1931      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1932      break
1933    fi
1934  done
1935  IFS="$ac_save_ifs"
1936fi
1937fi
1938RANLIB="$ac_cv_prog_RANLIB"
1939if test -n "$RANLIB"; then
1940  echo "$ac_t""$RANLIB" 1>&6
1941else
1942  echo "$ac_t""no" 1>&6
1943fi
1944
1945
1946if test -z "$ac_cv_prog_RANLIB"; then
1947if test -n "$ac_tool_prefix"; then
1948  # Extract the first word of "ranlib", so it can be a program name with args.
1949set dummy ranlib; ac_word=$2
1950echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1951echo "configure:1952: checking for $ac_word" >&5
1952if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1953  echo $ac_n "(cached) $ac_c" 1>&6
1954else
1955  if test -n "$RANLIB"; then
1956  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1957else
1958  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1959  ac_dummy="$PATH"
1960  for ac_dir in $ac_dummy; do
1961    test -z "$ac_dir" && ac_dir=.
1962    if test -f $ac_dir/$ac_word; then
1963      ac_cv_prog_RANLIB="ranlib"
1964      break
1965    fi
1966  done
1967  IFS="$ac_save_ifs"
1968  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1969fi
1970fi
1971RANLIB="$ac_cv_prog_RANLIB"
1972if test -n "$RANLIB"; then
1973  echo "$ac_t""$RANLIB" 1>&6
1974else
1975  echo "$ac_t""no" 1>&6
1976fi
1977
1978else
1979  RANLIB=":"
1980fi
1981fi
1982
1983# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1984set dummy ${ac_tool_prefix}strip; ac_word=$2
1985echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1986echo "configure:1987: checking for $ac_word" >&5
1987if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1988  echo $ac_n "(cached) $ac_c" 1>&6
1989else
1990  if test -n "$STRIP"; then
1991  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1992else
1993  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1994  ac_dummy="$PATH"
1995  for ac_dir in $ac_dummy; do
1996    test -z "$ac_dir" && ac_dir=.
1997    if test -f $ac_dir/$ac_word; then
1998      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1999      break
2000    fi
2001  done
2002  IFS="$ac_save_ifs"
2003fi
2004fi
2005STRIP="$ac_cv_prog_STRIP"
2006if test -n "$STRIP"; then
2007  echo "$ac_t""$STRIP" 1>&6
2008else
2009  echo "$ac_t""no" 1>&6
2010fi
2011
2012
2013if test -z "$ac_cv_prog_STRIP"; then
2014if test -n "$ac_tool_prefix"; then
2015  # Extract the first word of "strip", so it can be a program name with args.
2016set dummy strip; ac_word=$2
2017echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2018echo "configure:2019: checking for $ac_word" >&5
2019if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2020  echo $ac_n "(cached) $ac_c" 1>&6
2021else
2022  if test -n "$STRIP"; then
2023  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2024else
2025  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2026  ac_dummy="$PATH"
2027  for ac_dir in $ac_dummy; do
2028    test -z "$ac_dir" && ac_dir=.
2029    if test -f $ac_dir/$ac_word; then
2030      ac_cv_prog_STRIP="strip"
2031      break
2032    fi
2033  done
2034  IFS="$ac_save_ifs"
2035  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2036fi
2037fi
2038STRIP="$ac_cv_prog_STRIP"
2039if test -n "$STRIP"; then
2040  echo "$ac_t""$STRIP" 1>&6
2041else
2042  echo "$ac_t""no" 1>&6
2043fi
2044
2045else
2046  STRIP=":"
2047fi
2048fi
2049
2050
2051# Check for any special flags to pass to ltconfig.
2052libtool_flags="--cache-file=$cache_file"
2053test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2054test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2055test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2056test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2057test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2058
2059
2060# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2061if test "${enable_libtool_lock+set}" = set; then
2062  enableval="$enable_libtool_lock"
2063  :
2064fi
2065
2066test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2067test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2068
2069# Check whether --with-pic or --without-pic was given.
2070if test "${with_pic+set}" = set; then
2071  withval="$with_pic"
2072  pic_mode="$withval"
2073else
2074  pic_mode=default
2075fi
2076
2077test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2078test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2079
2080# Some flags need to be propagated to the compiler or linker for good
2081# libtool support.
2082case $host in
2083*-*-irix6*)
2084  # Find out which ABI we are using.
2085  echo '#line 2086 "configure"' > conftest.$ac_ext
2086  if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2087    case `/usr/bin/file conftest.$ac_objext` in
2088    *32-bit*)
2089      LD="${LD-ld} -32"
2090      ;;
2091    *N32*)
2092      LD="${LD-ld} -n32"
2093      ;;
2094    *64-bit*)
2095      LD="${LD-ld} -64"
2096      ;;
2097    esac
2098  fi
2099  rm -rf conftest*
2100  ;;
2101
2102*-*-sco3.2v5*)
2103  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2104  SAVE_CFLAGS="$CFLAGS"
2105  CFLAGS="$CFLAGS -belf"
2106  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2107echo "configure:2108: checking whether the C compiler needs -belf" >&5
2108if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2109  echo $ac_n "(cached) $ac_c" 1>&6
2110else
2111  
2112     ac_ext=c
2113# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2114ac_cpp='$CPP $CPPFLAGS'
2115ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2116ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2117cross_compiling=$ac_cv_prog_cc_cross
2118
2119     cat > conftest.$ac_ext <<EOF
2120#line 2121 "configure"
2121#include "confdefs.h"
2122
2123int main() {
2124
2125; return 0; }
2126EOF
2127if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2128  rm -rf conftest*
2129  lt_cv_cc_needs_belf=yes
2130else
2131  echo "configure: failed program was:" >&5
2132  cat conftest.$ac_ext >&5
2133  rm -rf conftest*
2134  lt_cv_cc_needs_belf=no
2135fi
2136rm -f conftest*
2137     ac_ext=c
2138# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2139ac_cpp='$CPP $CPPFLAGS'
2140ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2141ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2142cross_compiling=$ac_cv_prog_cc_cross
2143
2144fi
2145
2146echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2147  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2148    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2149    CFLAGS="$SAVE_CFLAGS"
2150  fi
2151  ;;
2152
2153
2154esac
2155
2156
2157# Save cache, so that ltconfig can load it
2158cat > confcache <<\EOF
2159# This file is a shell script that caches the results of configure
2160# tests run on this system so they can be shared between configure
2161# scripts and configure runs.  It is not useful on other systems.
2162# If it contains results you don't want to keep, you may remove or edit it.
2163#
2164# By default, configure uses ./config.cache as the cache file,
2165# creating it if it does not exist already.  You can give configure
2166# the --cache-file=FILE option to use a different cache file; that is
2167# what configure does when it calls configure scripts in
2168# subdirectories, so they share the cache.
2169# Giving --cache-file=/dev/null disables caching, for debugging configure.
2170# config.status only pays attention to the cache file if you give it the
2171# --recheck option to rerun configure.
2172#
2173EOF
2174# The following way of writing the cache mishandles newlines in values,
2175# but we know of no workaround that is simple, portable, and efficient.
2176# So, don't put newlines in cache variables' values.
2177# Ultrix sh set writes to stderr and can't be redirected directly,
2178# and sets the high bit in the cache file unless we assign to the vars.
2179(set) 2>&1 |
2180  case `(ac_space=' '; set | grep ac_space) 2>&1` in
2181  *ac_space=\ *)
2182    # `set' does not quote correctly, so add quotes (double-quote substitution
2183    # turns \\\\ into \\, and sed turns \\ into \).
2184    sed -n \
2185      -e "s/'/'\\\\''/g" \
2186      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2187    ;;
2188  *)
2189    # `set' quotes correctly as required by POSIX, so do not add quotes.
2190    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2191    ;;
2192  esac >> confcache
2193if cmp -s $cache_file confcache; then
2194  :
2195else
2196  if test -w $cache_file; then
2197    echo "updating cache $cache_file"
2198    cat confcache > $cache_file
2199  else
2200    echo "not updating unwritable cache $cache_file"
2201  fi
2202fi
2203rm -f confcache
2204
2205
2206# Actually configure libtool.  ac_aux_dir is where install-sh is found.
2207AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2208MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2209LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2210AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2211objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2212deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2213${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2214$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2215|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2216
2217# Reload cache, that may have been modified by ltconfig
2218if test -r "$cache_file"; then
2219  echo "loading cache $cache_file"
2220  . $cache_file
2221else
2222  echo "creating cache $cache_file"
2223  > $cache_file
2224fi
2225
2226
2227# This can be used to rebuild libtool when needed
2228LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2229
2230# Always use our own libtool.
2231LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2232
2233# Redirect the config.log output again, so that the ltconfig log is not
2234# clobbered by the next message.
2235exec 5>>./config.log
2236
2237  
2238
2239  
2240	 
2241	 
2242
2243# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
2244if test "${enable_64_bit_bfd+set}" = set; then
2245  enableval="$enable_64_bit_bfd"
2246  case "${enableval}" in
2247  yes)  want64=true  ;;
2248  no)   want64=false ;;
2249  *)    { echo "configure: error: bad value ${enableval} for 64-bit-bfd option" 1>&2; exit 1; } ;;
2250esac
2251else
2252  want64=false
2253fi
2254# Check whether --enable-targets or --disable-targets was given.
2255if test "${enable_targets+set}" = set; then
2256  enableval="$enable_targets"
2257  case "${enableval}" in
2258  yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
2259            ;;
2260  no)       enable_targets= ;;
2261  *)        enable_targets=$enableval ;;
2262esac
2263fi
2264# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
2265if test "${enable_commonbfdlib+set}" = set; then
2266  enableval="$enable_commonbfdlib"
2267  case "${enableval}" in
2268  yes) commonbfdlib=true ;;
2269  no)  commonbfdlib=false ;;
2270  *)   { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
2271esac
2272fi
2273# Check whether --with-mmap or --without-mmap was given.
2274if test "${with_mmap+set}" = set; then
2275  withval="$with_mmap"
2276  case "${withval}" in
2277  yes)  want_mmap=true ;;
2278  no)   want_mmap=false ;;
2279  *)    { echo "configure: error: bad value ${withval} for BFD with-mmap option" 1>&2; exit 1; } ;;
2280esac
2281else
2282  want_mmap=false
2283fi
2284
2285build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
2286# Check whether --enable-build-warnings or --disable-build-warnings was given.
2287if test "${enable_build_warnings+set}" = set; then
2288  enableval="$enable_build_warnings"
2289  case "${enableval}" in
2290  yes)	;;
2291  no)	build_warnings="-w";;
2292  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
2293        build_warnings="${build_warnings} ${t}";;
2294  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
2295        build_warnings="${t} ${build_warnings}";;
2296  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
2297esac
2298if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
2299  echo "Setting warning flags = $build_warnings" 6>&1
2300fi
2301fi
2302WARN_CFLAGS=""
2303if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then
2304    WARN_CFLAGS="${build_warnings}"
2305fi
2306
2307
2308
2309
2310
2311
2312if test -z "$target" ; then
2313    { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
2314fi
2315
2316echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
2317echo "configure:2318: checking whether to enable maintainer-specific portions of Makefiles" >&5
2318    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2319if test "${enable_maintainer_mode+set}" = set; then
2320  enableval="$enable_maintainer_mode"
2321  USE_MAINTAINER_MODE=$enableval
2322else
2323  USE_MAINTAINER_MODE=no
2324fi
2325
2326  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
2327  
2328
2329if test $USE_MAINTAINER_MODE = yes; then
2330  MAINTAINER_MODE_TRUE=
2331  MAINTAINER_MODE_FALSE='#'
2332else
2333  MAINTAINER_MODE_TRUE='#'
2334  MAINTAINER_MODE_FALSE=
2335fi
2336  MAINT=$MAINTAINER_MODE_TRUE
2337  
2338
2339
2340
2341echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2342echo "configure:2343: checking for executable suffix" >&5
2343if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2344  echo $ac_n "(cached) $ac_c" 1>&6
2345else
2346  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2347  ac_cv_exeext=.exe
2348else
2349  rm -f conftest*
2350  echo 'int main () { return 0; }' > conftest.$ac_ext
2351  ac_cv_exeext=
2352  if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2353    for file in conftest.*; do
2354      case $file in
2355      *.c | *.o | *.obj) ;;
2356      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2357      esac
2358    done
2359  else
2360    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2361  fi
2362  rm -f conftest*
2363  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2364fi
2365fi
2366
2367EXEEXT=""
2368test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2369echo "$ac_t""${ac_cv_exeext}" 1>&6
2370ac_exeext=$EXEEXT
2371
2372
2373host64=false
2374target64=false
2375bfd_default_target_size=32
2376
2377# host stuff:
2378
2379# Extract the first word of "gcc", so it can be a program name with args.
2380set dummy gcc; ac_word=$2
2381echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2382echo "configure:2383: checking for $ac_word" >&5
2383if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2384  echo $ac_n "(cached) $ac_c" 1>&6
2385else
2386  if test -n "$CC"; then
2387  ac_cv_prog_CC="$CC" # Let the user override the test.
2388else
2389  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2390  ac_dummy="$PATH"
2391  for ac_dir in $ac_dummy; do
2392    test -z "$ac_dir" && ac_dir=.
2393    if test -f $ac_dir/$ac_word; then
2394      ac_cv_prog_CC="gcc"
2395      break
2396    fi
2397  done
2398  IFS="$ac_save_ifs"
2399fi
2400fi
2401CC="$ac_cv_prog_CC"
2402if test -n "$CC"; then
2403  echo "$ac_t""$CC" 1>&6
2404else
2405  echo "$ac_t""no" 1>&6
2406fi
2407
2408if test -z "$CC"; then
2409  # Extract the first word of "cc", so it can be a program name with args.
2410set dummy cc; ac_word=$2
2411echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2412echo "configure:2413: checking for $ac_word" >&5
2413if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2414  echo $ac_n "(cached) $ac_c" 1>&6
2415else
2416  if test -n "$CC"; then
2417  ac_cv_prog_CC="$CC" # Let the user override the test.
2418else
2419  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2420  ac_prog_rejected=no
2421  ac_dummy="$PATH"
2422  for ac_dir in $ac_dummy; do
2423    test -z "$ac_dir" && ac_dir=.
2424    if test -f $ac_dir/$ac_word; then
2425      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2426        ac_prog_rejected=yes
2427	continue
2428      fi
2429      ac_cv_prog_CC="cc"
2430      break
2431    fi
2432  done
2433  IFS="$ac_save_ifs"
2434if test $ac_prog_rejected = yes; then
2435  # We found a bogon in the path, so make sure we never use it.
2436  set dummy $ac_cv_prog_CC
2437  shift
2438  if test $# -gt 0; then
2439    # We chose a different compiler from the bogus one.
2440    # However, it has the same basename, so the bogon will be chosen
2441    # first if we set CC to just the basename; use the full file name.
2442    shift
2443    set dummy "$ac_dir/$ac_word" "$@"
2444    shift
2445    ac_cv_prog_CC="$@"
2446  fi
2447fi
2448fi
2449fi
2450CC="$ac_cv_prog_CC"
2451if test -n "$CC"; then
2452  echo "$ac_t""$CC" 1>&6
2453else
2454  echo "$ac_t""no" 1>&6
2455fi
2456
2457  if test -z "$CC"; then
2458    case "`uname -s`" in
2459    *win32* | *WIN32*)
2460      # Extract the first word of "cl", so it can be a program name with args.
2461set dummy cl; ac_word=$2
2462echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2463echo "configure:2464: checking for $ac_word" >&5
2464if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
2465  echo $ac_n "(cached) $ac_c" 1>&6
2466else
2467  if test -n "$CC"; then
2468  ac_cv_prog_CC="$CC" # Let the user override the test.
2469else
2470  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2471  ac_dummy="$PATH"
2472  for ac_dir in $ac_dummy; do
2473    test -z "$ac_dir" && ac_dir=.
2474    if test -f $ac_dir/$ac_word; then
2475      ac_cv_prog_CC="cl"
2476      break
2477    fi
2478  done
2479  IFS="$ac_save_ifs"
2480fi
2481fi
2482CC="$ac_cv_prog_CC"
2483if test -n "$CC"; then
2484  echo "$ac_t""$CC" 1>&6
2485else
2486  echo "$ac_t""no" 1>&6
2487fi
2488 ;;
2489    esac
2490  fi
2491  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2492fi
2493
2494echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2495echo "configure:2496: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2496
2497ac_ext=c
2498# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2499ac_cpp='$CPP $CPPFLAGS'
2500ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2501ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2502cross_compiling=$ac_cv_prog_cc_cross
2503
2504cat > conftest.$ac_ext << EOF
2505
2506#line 2507 "configure"
2507#include "confdefs.h"
2508
2509main(){return(0);}
2510EOF
2511if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2512  ac_cv_prog_cc_works=yes
2513  # If we can't run a trivial program, we are probably using a cross compiler.
2514  if (./conftest; exit) 2>/dev/null; then
2515    ac_cv_prog_cc_cross=no
2516  else
2517    ac_cv_prog_cc_cross=yes
2518  fi
2519else
2520  echo "configure: failed program was:" >&5
2521  cat conftest.$ac_ext >&5
2522  ac_cv_prog_cc_works=no
2523fi
2524rm -fr conftest*
2525ac_ext=c
2526# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2527ac_cpp='$CPP $CPPFLAGS'
2528ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2529ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2530cross_compiling=$ac_cv_prog_cc_cross
2531
2532echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2533if test $ac_cv_prog_cc_works = no; then
2534  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2535fi
2536echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2537echo "configure:2538: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2538echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2539cross_compiling=$ac_cv_prog_cc_cross
2540
2541echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2542echo "configure:2543: checking whether we are using GNU C" >&5
2543if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2544  echo $ac_n "(cached) $ac_c" 1>&6
2545else
2546  cat > conftest.c <<EOF
2547#ifdef __GNUC__
2548  yes;
2549#endif
2550EOF
2551if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2552  ac_cv_prog_gcc=yes
2553else
2554  ac_cv_prog_gcc=no
2555fi
2556fi
2557
2558echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2559
2560if test $ac_cv_prog_gcc = yes; then
2561  GCC=yes
2562else
2563  GCC=
2564fi
2565
2566ac_test_CFLAGS="${CFLAGS+set}"
2567ac_save_CFLAGS="$CFLAGS"
2568CFLAGS=
2569echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2570echo "configure:2571: checking whether ${CC-cc} accepts -g" >&5
2571if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2572  echo $ac_n "(cached) $ac_c" 1>&6
2573else
2574  echo 'void f(){}' > conftest.c
2575if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2576  ac_cv_prog_cc_g=yes
2577else
2578  ac_cv_prog_cc_g=no
2579fi
2580rm -f conftest*
2581
2582fi
2583
2584echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2585if test "$ac_test_CFLAGS" = set; then
2586  CFLAGS="$ac_save_CFLAGS"
2587elif test $ac_cv_prog_cc_g = yes; then
2588  if test "$GCC" = yes; then
2589    CFLAGS="-g -O2"
2590  else
2591    CFLAGS="-g"
2592  fi
2593else
2594  if test "$GCC" = yes; then
2595    CFLAGS="-O2"
2596  else
2597    CFLAGS=
2598  fi
2599fi
2600
2601
2602ALL_LINGUAS="fr tr ja es sv"
2603echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2604echo "configure:2605: checking how to run the C preprocessor" >&5
2605# On Suns, sometimes $CPP names a directory.
2606if test -n "$CPP" && test -d "$CPP"; then
2607  CPP=
2608fi
2609if test -z "$CPP"; then
2610if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2611  echo $ac_n "(cached) $ac_c" 1>&6
2612else
2613    # This must be in double quotes, not single quotes, because CPP may get
2614  # substituted into the Makefile and "${CC-cc}" will confuse make.
2615  CPP="${CC-cc} -E"
2616  # On the NeXT, cc -E runs the code through the compiler's parser,
2617  # not just through cpp.
2618  cat > conftest.$ac_ext <<EOF
2619#line 2620 "configure"
2620#include "confdefs.h"
2621#include <assert.h>
2622Syntax Error
2623EOF
2624ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2625{ (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2626ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2627if test -z "$ac_err"; then
2628  :
2629else
2630  echo "$ac_err" >&5
2631  echo "configure: failed program was:" >&5
2632  cat conftest.$ac_ext >&5
2633  rm -rf conftest*
2634  CPP="${CC-cc} -E -traditional-cpp"
2635  cat > conftest.$ac_ext <<EOF
2636#line 2637 "configure"
2637#include "confdefs.h"
2638#include <assert.h>
2639Syntax Error
2640EOF
2641ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2642{ (eval echo configure:2643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2643ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2644if test -z "$ac_err"; then
2645  :
2646else
2647  echo "$ac_err" >&5
2648  echo "configure: failed program was:" >&5
2649  cat conftest.$ac_ext >&5
2650  rm -rf conftest*
2651  CPP="${CC-cc} -nologo -E"
2652  cat > conftest.$ac_ext <<EOF
2653#line 2654 "configure"
2654#include "confdefs.h"
2655#include <assert.h>
2656Syntax Error
2657EOF
2658ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2659{ (eval echo configure:2660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2660ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2661if test -z "$ac_err"; then
2662  :
2663else
2664  echo "$ac_err" >&5
2665  echo "configure: failed program was:" >&5
2666  cat conftest.$ac_ext >&5
2667  rm -rf conftest*
2668  CPP=/lib/cpp
2669fi
2670rm -f conftest*
2671fi
2672rm -f conftest*
2673fi
2674rm -f conftest*
2675  ac_cv_prog_CPP="$CPP"
2676fi
2677  CPP="$ac_cv_prog_CPP"
2678else
2679  ac_cv_prog_CPP="$CPP"
2680fi
2681echo "$ac_t""$CPP" 1>&6
2682
2683# Extract the first word of "ranlib", so it can be a program name with args.
2684set dummy ranlib; ac_word=$2
2685echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2686echo "configure:2687: checking for $ac_word" >&5
2687if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2688  echo $ac_n "(cached) $ac_c" 1>&6
2689else
2690  if test -n "$RANLIB"; then
2691  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2692else
2693  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2694  ac_dummy="$PATH"
2695  for ac_dir in $ac_dummy; do
2696    test -z "$ac_dir" && ac_dir=.
2697    if test -f $ac_dir/$ac_word; then
2698      ac_cv_prog_RANLIB="ranlib"
2699      break
2700    fi
2701  done
2702  IFS="$ac_save_ifs"
2703  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2704fi
2705fi
2706RANLIB="$ac_cv_prog_RANLIB"
2707if test -n "$RANLIB"; then
2708  echo "$ac_t""$RANLIB" 1>&6
2709else
2710  echo "$ac_t""no" 1>&6
2711fi
2712
2713echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2714echo "configure:2715: checking for ANSI C header files" >&5
2715if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2716  echo $ac_n "(cached) $ac_c" 1>&6
2717else
2718  cat > conftest.$ac_ext <<EOF
2719#line 2720 "configure"
2720#include "confdefs.h"
2721#include <stdlib.h>
2722#include <stdarg.h>
2723#include <string.h>
2724#include <float.h>
2725EOF
2726ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2727{ (eval echo configure:2728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2728ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2729if test -z "$ac_err"; then
2730  rm -rf conftest*
2731  ac_cv_header_stdc=yes
2732else
2733  echo "$ac_err" >&5
2734  echo "configure: failed program was:" >&5
2735  cat conftest.$ac_ext >&5
2736  rm -rf conftest*
2737  ac_cv_header_stdc=no
2738fi
2739rm -f conftest*
2740
2741if test $ac_cv_header_stdc = yes; then
2742  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2743cat > conftest.$ac_ext <<EOF
2744#line 2745 "configure"
2745#include "confdefs.h"
2746#include <string.h>
2747EOF
2748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2749  egrep "memchr" >/dev/null 2>&1; then
2750  :
2751else
2752  rm -rf conftest*
2753  ac_cv_header_stdc=no
2754fi
2755rm -f conftest*
2756
2757fi
2758
2759if test $ac_cv_header_stdc = yes; then
2760  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2761cat > conftest.$ac_ext <<EOF
2762#line 2763 "configure"
2763#include "confdefs.h"
2764#include <stdlib.h>
2765EOF
2766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2767  egrep "free" >/dev/null 2>&1; then
2768  :
2769else
2770  rm -rf conftest*
2771  ac_cv_header_stdc=no
2772fi
2773rm -f conftest*
2774
2775fi
2776
2777if test $ac_cv_header_stdc = yes; then
2778  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2779if test "$cross_compiling" = yes; then
2780  :
2781else
2782  cat > conftest.$ac_ext <<EOF
2783#line 2784 "configure"
2784#include "confdefs.h"
2785#include <ctype.h>
2786#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2787#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2788#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2789int main () { int i; for (i = 0; i < 256; i++)
2790if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2791exit (0); }
2792
2793EOF
2794if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2795then
2796  :
2797else
2798  echo "configure: failed program was:" >&5
2799  cat conftest.$ac_ext >&5
2800  rm -fr conftest*
2801  ac_cv_header_stdc=no
2802fi
2803rm -fr conftest*
2804fi
2805
2806fi
2807fi
2808
2809echo "$ac_t""$ac_cv_header_stdc" 1>&6
2810if test $ac_cv_header_stdc = yes; then
2811  cat >> confdefs.h <<\EOF
2812#define STDC_HEADERS 1
2813EOF
2814
2815fi
2816
2817echo $ac_n "checking for working const""... $ac_c" 1>&6
2818echo "configure:2819: checking for working const" >&5
2819if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2820  echo $ac_n "(cached) $ac_c" 1>&6
2821else
2822  cat > conftest.$ac_ext <<EOF
2823#line 2824 "configure"
2824#include "confdefs.h"
2825
2826int main() {
2827
2828/* Ultrix mips cc rejects this.  */
2829typedef int charset[2]; const charset x;
2830/* SunOS 4.1.1 cc rejects this.  */
2831char const *const *ccp;
2832char **p;
2833/* NEC SVR4.0.2 mips cc rejects this.  */
2834struct point {int x, y;};
2835static struct point const zero = {0,0};
2836/* AIX XL C 1.02.0.0 rejects this.
2837   It does not let you subtract one const X* pointer from another in an arm
2838   of an if-expression whose if-part is not a constant expression */
2839const char *g = "string";
2840ccp = &g + (g ? g-g : 0);
2841/* HPUX 7.0 cc rejects these. */
2842++ccp;
2843p = (char**) ccp;
2844ccp = (char const *const *) p;
2845{ /* SCO 3.2v4 cc rejects this.  */
2846  char *t;
2847  char const *s = 0 ? (char *) 0 : (char const *) 0;
2848
2849  *t++ = 0;
2850}
2851{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2852  int x[] = {25, 17};
2853  const int *foo = &x[0];
2854  ++foo;
2855}
2856{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2857  typedef const int *iptr;
2858  iptr p = 0;
2859  ++p;
2860}
2861{ /* AIX XL C 1.02.0.0 rejects this saying
2862     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2863  struct s { int j; const int *ap[3]; };
2864  struct s *b; b->j = 5;
2865}
2866{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2867  const int foo = 10;
2868}
2869
2870; return 0; }
2871EOF
2872if { (eval echo configure:2873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2873  rm -rf conftest*
2874  ac_cv_c_const=yes
2875else
2876  echo "configure: failed program was:" >&5
2877  cat conftest.$ac_ext >&5
2878  rm -rf conftest*
2879  ac_cv_c_const=no
2880fi
2881rm -f conftest*
2882fi
2883
2884echo "$ac_t""$ac_cv_c_const" 1>&6
2885if test $ac_cv_c_const = no; then
2886  cat >> confdefs.h <<\EOF
2887#define const 
2888EOF
2889
2890fi
2891
2892echo $ac_n "checking for inline""... $ac_c" 1>&6
2893echo "configure:2894: checking for inline" >&5
2894if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2895  echo $ac_n "(cached) $ac_c" 1>&6
2896else
2897  ac_cv_c_inline=no
2898for ac_kw in inline __inline__ __inline; do
2899  cat > conftest.$ac_ext <<EOF
2900#line 2901 "configure"
2901#include "confdefs.h"
2902
2903int main() {
2904} $ac_kw foo() {
2905; return 0; }
2906EOF
2907if { (eval echo configure:2908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2908  rm -rf conftest*
2909  ac_cv_c_inline=$ac_kw; break
2910else
2911  echo "configure: failed program was:" >&5
2912  cat conftest.$ac_ext >&5
2913fi
2914rm -f conftest*
2915done
2916
2917fi
2918
2919echo "$ac_t""$ac_cv_c_inline" 1>&6
2920case "$ac_cv_c_inline" in
2921  inline | yes) ;;
2922  no) cat >> confdefs.h <<\EOF
2923#define inline 
2924EOF
2925 ;;
2926  *)  cat >> confdefs.h <<EOF
2927#define inline $ac_cv_c_inline
2928EOF
2929 ;;
2930esac
2931
2932echo $ac_n "checking for off_t""... $ac_c" 1>&6
2933echo "configure:2934: checking for off_t" >&5
2934if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2935  echo $ac_n "(cached) $ac_c" 1>&6
2936else
2937  cat > conftest.$ac_ext <<EOF
2938#line 2939 "configure"
2939#include "confdefs.h"
2940#include <sys/types.h>
2941#if STDC_HEADERS
2942#include <stdlib.h>
2943#include <stddef.h>
2944#endif
2945EOF
2946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2947  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2948  rm -rf conftest*
2949  ac_cv_type_off_t=yes
2950else
2951  rm -rf conftest*
2952  ac_cv_type_off_t=no
2953fi
2954rm -f conftest*
2955
2956fi
2957echo "$ac_t""$ac_cv_type_off_t" 1>&6
2958if test $ac_cv_type_off_t = no; then
2959  cat >> confdefs.h <<\EOF
2960#define off_t long
2961EOF
2962
2963fi
2964
2965echo $ac_n "checking for size_t""... $ac_c" 1>&6
2966echo "configure:2967: checking for size_t" >&5
2967if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2968  echo $ac_n "(cached) $ac_c" 1>&6
2969else
2970  cat > conftest.$ac_ext <<EOF
2971#line 2972 "configure"
2972#include "confdefs.h"
2973#include <sys/types.h>
2974#if STDC_HEADERS
2975#include <stdlib.h>
2976#include <stddef.h>
2977#endif
2978EOF
2979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2980  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2981  rm -rf conftest*
2982  ac_cv_type_size_t=yes
2983else
2984  rm -rf conftest*
2985  ac_cv_type_size_t=no
2986fi
2987rm -f conftest*
2988
2989fi
2990echo "$ac_t""$ac_cv_type_size_t" 1>&6
2991if test $ac_cv_type_size_t = no; then
2992  cat >> confdefs.h <<\EOF
2993#define size_t unsigned
2994EOF
2995
2996fi
2997
2998# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2999# for constant arguments.  Useless!
3000echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3001echo "configure:3002: checking for working alloca.h" >&5
3002if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3003  echo $ac_n "(cached) $ac_c" 1>&6
3004else
3005  cat > conftest.$ac_ext <<EOF
3006#line 3007 "configure"
3007#include "confdefs.h"
3008#include <alloca.h>
3009int main() {
3010char *p = alloca(2 * sizeof(int));
3011; return 0; }
3012EOF
3013if { (eval echo configure:3014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3014  rm -rf conftest*
3015  ac_cv_header_alloca_h=yes
3016else
3017  echo "configure: failed program was:" >&5
3018  cat conftest.$ac_ext >&5
3019  rm -rf conftest*
3020  ac_cv_header_alloca_h=no
3021fi
3022rm -f conftest*
3023fi
3024
3025echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3026if test $ac_cv_header_alloca_h = yes; then
3027  cat >> confdefs.h <<\EOF
3028#define HAVE_ALLOCA_H 1
3029EOF
3030
3031fi
3032
3033echo $ac_n "checking for alloca""... $ac_c" 1>&6
3034echo "configure:3035: checking for alloca" >&5
3035if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3036  echo $ac_n "(cached) $ac_c" 1>&6
3037else
3038  cat > conftest.$ac_ext <<EOF
3039#line 3040 "configure"
3040#include "confdefs.h"
3041
3042#ifdef __GNUC__
3043# define alloca __builtin_alloca
3044#else
3045# ifdef _MSC_VER
3046#  include <malloc.h>
3047#  define alloca _alloca
3048# else
3049#  if HAVE_ALLOCA_H
3050#   include <alloca.h>
3051#  else
3052#   ifdef _AIX
3053 #pragma alloca
3054#   else
3055#    ifndef alloca /* predefined by HP cc +Olibcalls */
3056char *alloca ();
3057#    endif
3058#   endif
3059#  endif
3060# endif
3061#endif
3062
3063int main() {
3064char *p = (char *) alloca(1);
3065; return 0; }
3066EOF
3067if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3068  rm -rf conftest*
3069  ac_cv_func_alloca_works=yes
3070else
3071  echo "configure: failed program was:" >&5
3072  cat conftest.$ac_ext >&5
3073  rm -rf conftest*
3074  ac_cv_func_alloca_works=no
3075fi
3076rm -f conftest*
3077fi
3078
3079echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3080if test $ac_cv_func_alloca_works = yes; then
3081  cat >> confdefs.h <<\EOF
3082#define HAVE_ALLOCA 1
3083EOF
3084
3085fi
3086
3087if test $ac_cv_func_alloca_works = no; then
3088  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3089  # that cause trouble.  Some versions do not even contain alloca or
3090  # contain a buggy version.  If you still want to use their alloca,
3091  # use ar to extract alloca.o from them instead of compiling alloca.c.
3092  ALLOCA=alloca.${ac_objext}
3093  cat >> confdefs.h <<\EOF
3094#define C_ALLOCA 1
3095EOF
3096
3097
3098echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3099echo "configure:3100: checking whether alloca needs Cray hooks" >&5
3100if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3101  echo $ac_n "(cached) $ac_c" 1>&6
3102else
3103  cat > conftest.$ac_ext <<EOF
3104#line 3105 "configure"
3105#include "confdefs.h"
3106#if defined(CRAY) && ! defined(CRAY2)
3107webecray
3108#else
3109wenotbecray
3110#endif
3111
3112EOF
3113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3114  egrep "webecray" >/dev/null 2>&1; then
3115  rm -rf conftest*
3116  ac_cv_os_cray=yes
3117else
3118  rm -rf conftest*
3119  ac_cv_os_cray=no
3120fi
3121rm -f conftest*
3122
3123fi
3124
3125echo "$ac_t""$ac_cv_os_cray" 1>&6
3126if test $ac_cv_os_cray = yes; then
3127for ac_func in _getb67 GETB67 getb67; do
3128  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3129echo "configure:3130: checking for $ac_func" >&5
3130if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3131  echo $ac_n "(cached) $ac_c" 1>&6
3132else
3133  cat > conftest.$ac_ext <<EOF
3134#line 3135 "configure"
3135#include "confdefs.h"
3136/* System header to define __stub macros and hopefully few prototypes,
3137    which can conflict with char $ac_func(); below.  */
3138#include <assert.h>
3139/* Override any gcc2 internal prototype to avoid an error.  */
3140/* We use char because int might match the return type of a gcc2
3141    builtin and then its argument prototype would still apply.  */
3142char $ac_func();
3143
3144int main() {
3145
3146/* The GNU C library defines this for functions which it implements
3147    to always fail with ENOSYS.  Some functions are actually named
3148    something starting with __ and the normal name is an alias.  */
3149#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3150choke me
3151#else
3152$ac_func();
3153#endif
3154
3155; return 0; }
3156EOF
3157if { (eval echo configure:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3158  rm -rf conftest*
3159  eval "ac_cv_func_$ac_func=yes"
3160else
3161  echo "configure: failed program was:" >&5
3162  cat conftest.$ac_ext >&5
3163  rm -rf conftest*
3164  eval "ac_cv_func_$ac_func=no"
3165fi
3166rm -f conftest*
3167fi
3168
3169if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3170  echo "$ac_t""yes" 1>&6
3171  cat >> confdefs.h <<EOF
3172#define CRAY_STACKSEG_END $ac_func
3173EOF
3174
3175  break
3176else
3177  echo "$ac_t""no" 1>&6
3178fi
3179
3180done
3181fi
3182
3183echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3184echo "configure:3185: checking stack direction for C alloca" >&5
3185if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3186  echo $ac_n "(cached) $ac_c" 1>&6
3187else
3188  if test "$cross_compiling" = yes; then
3189  ac_cv_c_stack_direction=0
3190else
3191  cat > conftest.$ac_ext <<EOF
3192#line 3193 "configure"
3193#include "confdefs.h"
3194find_stack_direction ()
3195{
3196  static char *addr = 0;
3197  auto char dummy;
3198  if (addr == 0)
3199    {
3200      addr = &dummy;
3201      return find_stack_direction ();
3202    }
3203  else
3204    return (&dummy > addr) ? 1 : -1;
3205}
3206main ()
3207{
3208  exit (find_stack_direction() < 0);
3209}
3210EOF
3211if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3212then
3213  ac_cv_c_stack_direction=1
3214else
3215  echo "configure: failed program was:" >&5
3216  cat conftest.$ac_ext >&5
3217  rm -fr conftest*
3218  ac_cv_c_stack_direction=-1
3219fi
3220rm -fr conftest*
3221fi
3222
3223fi
3224
3225echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3226cat >> confdefs.h <<EOF
3227#define STACK_DIRECTION $ac_cv_c_stack_direction
3228EOF
3229
3230fi
3231
3232for ac_hdr in unistd.h
3233do
3234ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3235echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3236echo "configure:3237: checking for $ac_hdr" >&5
3237if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3238  echo $ac_n "(cached) $ac_c" 1>&6
3239else
3240  cat > conftest.$ac_ext <<EOF
3241#line 3242 "configure"
3242#include "confdefs.h"
3243#include <$ac_hdr>
3244EOF
3245ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3246{ (eval echo configure:3247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3247ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3248if test -z "$ac_err"; then
3249  rm -rf conftest*
3250  eval "ac_cv_header_$ac_safe=yes"
3251else
3252  echo "$ac_err" >&5
3253  echo "configure: failed program was:" >&5
3254  cat conftest.$ac_ext >&5
3255  rm -rf conftest*
3256  eval "ac_cv_header_$ac_safe=no"
3257fi
3258rm -f conftest*
3259fi
3260if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3261  echo "$ac_t""yes" 1>&6
3262    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3263  cat >> confdefs.h <<EOF
3264#define $ac_tr_hdr 1
3265EOF
3266 
3267else
3268  echo "$ac_t""no" 1>&6
3269fi
3270done
3271
3272for ac_func in getpagesize
3273do
3274echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3275echo "configure:3276: checking for $ac_func" >&5
3276if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3277  echo $ac_n "(cached) $ac_c" 1>&6
3278else
3279  cat > conftest.$ac_ext <<EOF
3280#line 3281 "configure"
3281#include "confdefs.h"
3282/* System header to define __stub macros and hopefully few prototypes,
3283    which can conflict with char $ac_func(); below.  */
3284#include <assert.h>
3285/* Override any gcc2 internal prototype to avoid an error.  */
3286/* We use char because int might match the return type of a gcc2
3287    builtin and then its argument prototype would still apply.  */
3288char $ac_func();
3289
3290int main() {
3291
3292/* The GNU C library defines this for functions which it implements
3293    to always fail with ENOSYS.  Some functions are actually named
3294    something starting with __ and the normal name is an alias.  */
3295#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3296choke me
3297#else
3298$ac_func();
3299#endif
3300
3301; return 0; }
3302EOF
3303if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3304  rm -rf conftest*
3305  eval "ac_cv_func_$ac_func=yes"
3306else
3307  echo "configure: failed program was:" >&5
3308  cat conftest.$ac_ext >&5
3309  rm -rf conftest*
3310  eval "ac_cv_func_$ac_func=no"
3311fi
3312rm -f conftest*
3313fi
3314
3315if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3316  echo "$ac_t""yes" 1>&6
3317    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3318  cat >> confdefs.h <<EOF
3319#define $ac_tr_func 1
3320EOF
3321 
3322else
3323  echo "$ac_t""no" 1>&6
3324fi
3325done
3326
3327echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3328echo "configure:3329: checking for working mmap" >&5
3329if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3330  echo $ac_n "(cached) $ac_c" 1>&6
3331else
3332  if test "$cross_compiling" = yes; then
3333  ac_cv_func_mmap_fixed_mapped=no
3334else
3335  cat > conftest.$ac_ext <<EOF
3336#line 3337 "configure"
3337#include "confdefs.h"
3338
3339/* Thanks to Mike Haertel and Jim Avera for this test.
3340   Here is a matrix of mmap possibilities:
3341	mmap private not fixed
3342	mmap private fixed at somewhere currently unmapped
3343	mmap private fixed at somewhere already mapped
3344	mmap shared not fixed
3345	mmap shared fixed at somewhere currently unmapped
3346	mmap shared fixed at somewhere already mapped
3347   For private mappings, we should verify that changes cannot be read()
3348   back from the file, nor mmap's back from the file at a different
3349   address.  (There have been systems where private was not correctly
3350   implemented like the infamous i386 svr4.0, and systems where the
3351   VM page cache was not coherent with the filesystem buffer cache
3352   like early versions of FreeBSD and possibly contemporary NetBSD.)
3353   For shared mappings, we should conversely verify that changes get
3354   propogated back to all the places they're supposed to be.
3355
3356   Grep wants private fixed already mapped.
3357   The main things grep needs to know about mmap are:
3358   * does it exist and is it safe to write into the mmap'd area
3359   * how to use it (BSD variants)  */
3360#include <sys/types.h>
3361#include <fcntl.h>
3362#include <sys/mman.h>
3363
3364/* This mess was copied from the GNU getpagesize.h.  */
3365#ifndef HAVE_GETPAGESIZE
3366# ifdef HAVE_UNISTD_H
3367#  include <unistd.h>
3368# endif
3369
3370/* Assume that all systems that can run configure have sys/param.h.  */
3371# ifndef HAVE_SYS_PARAM_H
3372#  define HAVE_SYS_PARAM_H 1
3373# endif
3374
3375# ifdef _SC_PAGESIZE
3376#  define getpagesize() sysconf(_SC_PAGESIZE)
3377# else /* no _SC_PAGESIZE */
3378#  ifdef HAVE_SYS_PARAM_H
3379#   include <sys/param.h>
3380#   ifdef EXEC_PAGESIZE
3381#    define getpagesize() EXEC_PAGESIZE
3382#   else /* no EXEC_PAGESIZE */
3383#    ifdef NBPG
3384#     define getpagesize() NBPG * CLSIZE
3385#     ifndef CLSIZE
3386#      define CLSIZE 1
3387#     endif /* no CLSIZE */
3388#    else /* no NBPG */
3389#     ifdef NBPC
3390#      define getpagesize() NBPC
3391#     else /* no NBPC */
3392#      ifdef PAGESIZE
3393#       define getpagesize() PAGESIZE
3394#      endif /* PAGESIZE */
3395#     endif /* no NBPC */
3396#    endif /* no NBPG */
3397#   endif /* no EXEC_PAGESIZE */
3398#  else /* no HAVE_SYS_PARAM_H */
3399#   define getpagesize() 8192	/* punt totally */
3400#  endif /* no HAVE_SYS_PARAM_H */
3401# endif /* no _SC_PAGESIZE */
3402
3403#endif /* no HAVE_GETPAGESIZE */
3404
3405#ifdef __cplusplus
3406extern "C" { void *malloc(unsigned); }
3407#else
3408char *malloc();
3409#endif
3410
3411int
3412main()
3413{
3414	char *data, *data2, *data3;
3415	int i, pagesize;
3416	int fd;
3417
3418	pagesize = getpagesize();
3419
3420	/*
3421	 * First, make a file with some known garbage in it.
3422	 */
3423	data = malloc(pagesize);
3424	if (!data)
3425		exit(1);
3426	for (i = 0; i < pagesize; ++i)
3427		*(data + i) = rand();
3428	umask(0);
3429	fd = creat("conftestmmap", 0600);
3430	if (fd < 0)
3431		exit(1);
3432	if (write(fd, data, pagesize) != pagesize)
3433		exit(1);
3434	close(fd);
3435
3436	/*
3437	 * Next, try to mmap the file at a fixed address which
3438	 * already has something else allocated at it.  If we can,
3439	 * also make sure that we see the same garbage.
3440	 */
3441	fd = open("conftestmmap", O_RDWR);
3442	if (fd < 0)
3443		exit(1);
3444	data2 = malloc(2 * pagesize);
3445	if (!data2)
3446		exit(1);
3447	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3448	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3449	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
3450		exit(1);
3451	for (i = 0; i < pagesize; ++i)
3452		if (*(data + i) != *(data2 + i))
3453			exit(1);
3454
3455	/*
3456	 * Finally, make sure that changes to the mapped area
3457	 * do not percolate back to the file as seen by read().
3458	 * (This is a bug on some variants of i386 svr4.0.)
3459	 */
3460	for (i = 0; i < pagesize; ++i)
3461		*(data2 + i) = *(data2 + i) + 1;
3462	data3 = malloc(pagesize);
3463	if (!data3)
3464		exit(1);
3465	if (read(fd, data3, pagesize) != pagesize)
3466		exit(1);
3467	for (i = 0; i < pagesize; ++i)
3468		if (*(data + i) != *(data3 + i))
3469			exit(1);
3470	close(fd);
3471	unlink("conftestmmap");
3472	exit(0);
3473}
3474
3475EOF
3476if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3477then
3478  ac_cv_func_mmap_fixed_mapped=yes
3479else
3480  echo "configure: failed program was:" >&5
3481  cat conftest.$ac_ext >&5
3482  rm -fr conftest*
3483  ac_cv_func_mmap_fixed_mapped=no
3484fi
3485rm -fr conftest*
3486fi
3487
3488fi
3489
3490echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3491if test $ac_cv_func_mmap_fixed_mapped = yes; then
3492  cat >> confdefs.h <<\EOF
3493#define HAVE_MMAP 1
3494EOF
3495
3496fi
3497
3498                              
3499   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3500unistd.h values.h sys/param.h
3501do
3502ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3503echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3504echo "configure:3505: checking for $ac_hdr" >&5
3505if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3506  echo $ac_n "(cached) $ac_c" 1>&6
3507else
3508  cat > conftest.$ac_ext <<EOF
3509#line 3510 "configure"
3510#include "confdefs.h"
3511#include <$ac_hdr>
3512EOF
3513ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3514{ (eval echo configure:3515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3515ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3516if test -z "$ac_err"; then
3517  rm -rf conftest*
3518  eval "ac_cv_header_$ac_safe=yes"
3519else
3520  echo "$ac_err" >&5
3521  echo "configure: failed program was:" >&5
3522  cat conftest.$ac_ext >&5
3523  rm -rf conftest*
3524  eval "ac_cv_header_$ac_safe=no"
3525fi
3526rm -f conftest*
3527fi
3528if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3529  echo "$ac_t""yes" 1>&6
3530    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3531  cat >> confdefs.h <<EOF
3532#define $ac_tr_hdr 1
3533EOF
3534 
3535else
3536  echo "$ac_t""no" 1>&6
3537fi
3538done
3539
3540   for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3541__argz_count __argz_stringify __argz_next
3542do
3543echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3544echo "configure:3545: checking for $ac_func" >&5
3545if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3546  echo $ac_n "(cached) $ac_c" 1>&6
3547else
3548  cat > conftest.$ac_ext <<EOF
3549#line 3550 "configure"
3550#include "confdefs.h"
3551/* System header to define __stub macros and hopefully few prototypes,
3552    which can conflict with char $ac_func(); below.  */
3553#include <assert.h>
3554/* Override any gcc2 internal prototype to avoid an error.  */
3555/* We use char because int might match the return type of a gcc2
3556    builtin and then its argument prototype would still apply.  */
3557char $ac_func();
3558
3559int main() {
3560
3561/* The GNU C library defines this for functions which it implements
3562    to always fail with ENOSYS.  Some functions are actually named
3563    something starting with __ and the normal name is an alias.  */
3564#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3565choke me
3566#else
3567$ac_func();
3568#endif
3569
3570; return 0; }
3571EOF
3572if { (eval echo configure:3573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3573  rm -rf conftest*
3574  eval "ac_cv_func_$ac_func=yes"
3575else
3576  echo "configure: failed program was:" >&5
3577  cat conftest.$ac_ext >&5
3578  rm -rf conftest*
3579  eval "ac_cv_func_$ac_func=no"
3580fi
3581rm -f conftest*
3582fi
3583
3584if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3585  echo "$ac_t""yes" 1>&6
3586    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3587  cat >> confdefs.h <<EOF
3588#define $ac_tr_func 1
3589EOF
3590 
3591else
3592  echo "$ac_t""no" 1>&6
3593fi
3594done
3595
3596
3597   if test "${ac_cv_func_stpcpy+set}" != "set"; then
3598     for ac_func in stpcpy
3599do
3600echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3601echo "configure:3602: checking for $ac_func" >&5
3602if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3603  echo $ac_n "(cached) $ac_c" 1>&6
3604else
3605  cat > conftest.$ac_ext <<EOF
3606#line 3607 "configure"
3607#include "confdefs.h"
3608/* System header to define __stub macros and hopefully few prototypes,
3609    which can conflict with char $ac_func(); below.  */
3610#include <assert.h>
3611/* Override any gcc2 internal prototype to avoid an error.  */
3612/* We use char because int might match the return type of a gcc2
3613    builtin and then its argument prototype would still apply.  */
3614char $ac_func();
3615
3616int main() {
3617
3618/* The GNU C library defines this for functions which it implements
3619    to always fail with ENOSYS.  Some functions are actually named
3620    something starting with __ and the normal name is an alias.  */
3621#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3622choke me
3623#else
3624$ac_func();
3625#endif
3626
3627; return 0; }
3628EOF
3629if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3630  rm -rf conftest*
3631  eval "ac_cv_func_$ac_func=yes"
3632else
3633  echo "configure: failed program was:" >&5
3634  cat conftest.$ac_ext >&5
3635  rm -rf conftest*
3636  eval "ac_cv_func_$ac_func=no"
3637fi
3638rm -f conftest*
3639fi
3640
3641if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3642  echo "$ac_t""yes" 1>&6
3643    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3644  cat >> confdefs.h <<EOF
3645#define $ac_tr_func 1
3646EOF
3647 
3648else
3649  echo "$ac_t""no" 1>&6
3650fi
3651done
3652
3653   fi
3654   if test "${ac_cv_func_stpcpy}" = "yes"; then
3655     cat >> confdefs.h <<\EOF
3656#define HAVE_STPCPY 1
3657EOF
3658
3659   fi
3660
3661   if test $ac_cv_header_locale_h = yes; then
3662    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3663echo "configure:3664: checking for LC_MESSAGES" >&5
3664if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3665  echo $ac_n "(cached) $ac_c" 1>&6
3666else
3667  cat > conftest.$ac_ext <<EOF
3668#line 3669 "configure"
3669#include "confdefs.h"
3670#include <locale.h>
3671int main() {
3672return LC_MESSAGES
3673; return 0; }
3674EOF
3675if { (eval echo configure:3676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3676  rm -rf conftest*
3677  am_cv_val_LC_MESSAGES=yes
3678else
3679  echo "configure: failed program was:" >&5
3680  cat conftest.$ac_ext >&5
3681  rm -rf conftest*
3682  am_cv_val_LC_MESSAGES=no
3683fi
3684rm -f conftest*
3685fi
3686
3687echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3688    if test $am_cv_val_LC_MESSAGES = yes; then
3689      cat >> confdefs.h <<\EOF
3690#define HAVE_LC_MESSAGES 1
3691EOF
3692
3693    fi
3694  fi
3695   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3696echo "configure:3697: checking whether NLS is requested" >&5
3697        # Check whether --enable-nls or --disable-nls was given.
3698if test "${enable_nls+set}" = set; then
3699  enableval="$enable_nls"
3700  USE_NLS=$enableval
3701else
3702  USE_NLS=yes
3703fi
3704
3705    echo "$ac_t""$USE_NLS" 1>&6
3706    
3707
3708    USE_INCLUDED_LIBINTL=no
3709
3710        if test "$USE_NLS" = "yes"; then
3711      cat >> confdefs.h <<\EOF
3712#define ENABLE_NLS 1
3713EOF
3714
3715      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3716echo "configure:3717: checking whether included gettext is requested" >&5
3717      # Check whether --with-included-gettext or --without-included-gettext was given.
3718if test "${with_included_gettext+set}" = set; then
3719  withval="$with_included_gettext"
3720  nls_cv_force_use_gnu_gettext=$withval
3721else
3722  nls_cv_force_use_gnu_gettext=no
3723fi
3724
3725      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3726
3727      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3728      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3729                        		nls_cv_header_intl=
3730	nls_cv_header_libgt=
3731	CATOBJEXT=NONE
3732
3733	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3734echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3735echo "configure:3736: checking for libintl.h" >&5
3736if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3737  echo $ac_n "(cached) $ac_c" 1>&6
3738else
3739  cat > conftest.$ac_ext <<EOF
3740#line 3741 "configure"
3741#include "confdefs.h"
3742#include <libintl.h>
3743EOF
3744ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3745{ (eval echo configure:3746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3746ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3747if test -z "$ac_err"; then
3748  rm -rf conftest*
3749  eval "ac_cv_header_$ac_safe=yes"
3750else
3751  echo "$ac_err" >&5
3752  echo "configure: failed program was:" >&5
3753  cat conftest.$ac_ext >&5
3754  rm -rf conftest*
3755  eval "ac_cv_header_$ac_safe=no"
3756fi
3757rm -f conftest*
3758fi
3759if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3760  echo "$ac_t""yes" 1>&6
3761  echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3762echo "configure:3763: checking for gettext in libc" >&5
3763if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3764  echo $ac_n "(cached) $ac_c" 1>&6
3765else
3766  cat > conftest.$ac_ext <<EOF
3767#line 3768 "configure"
3768#include "confdefs.h"
3769#include <libintl.h>
3770int main() {
3771return (int) gettext ("")
3772; return 0; }
3773EOF
3774if { (eval echo configure:3775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3775  rm -rf conftest*
3776  gt_cv_func_gettext_libc=yes
3777else
3778  echo "configure: failed program was:" >&5
3779  cat conftest.$ac_ext >&5
3780  rm -rf conftest*
3781  gt_cv_func_gettext_libc=no
3782fi
3783rm -f conftest*
3784fi
3785
3786echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3787
3788	   if test "$gt_cv_func_gettext_libc" != "yes"; then
3789	     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3790echo "configure:3791: checking for bindtextdomain in -lintl" >&5
3791ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3792if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3793  echo $ac_n "(cached) $ac_c" 1>&6
3794else
3795  ac_save_LIBS="$LIBS"
3796LIBS="-lintl  $LIBS"
3797cat > conftest.$ac_ext <<EOF
3798#line 3799 "configure"
3799#include "confdefs.h"
3800/* Override any gcc2 internal prototype to avoid an error.  */
3801/* We use char because int might match the return type of a gcc2
3802    builtin and then its argument prototype would still apply.  */
3803char bindtextdomain();
3804
3805int main() {
3806bindtextdomain()
3807; return 0; }
3808EOF
3809if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3810  rm -rf conftest*
3811  eval "ac_cv_lib_$ac_lib_var=yes"
3812else
3813  echo "configure: failed program was:" >&5
3814  cat conftest.$ac_ext >&5
3815  rm -rf conftest*
3816  eval "ac_cv_lib_$ac_lib_var=no"
3817fi
3818rm -f conftest*
3819LIBS="$ac_save_LIBS"
3820
3821fi
3822if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3823  echo "$ac_t""yes" 1>&6
3824  echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3825echo "configure:3826: checking for gettext in libintl" >&5
3826if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3827  echo $ac_n "(cached) $ac_c" 1>&6
3828else
3829  cat > conftest.$ac_ext <<EOF
3830#line 3831 "configure"
3831#include "confdefs.h"
3832
3833int main() {
3834return (int) gettext ("")
3835; return 0; }
3836EOF
3837if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3838  rm -rf conftest*
3839  gt_cv_func_gettext_libintl=yes
3840else
3841  echo "configure: failed program was:" >&5
3842  cat conftest.$ac_ext >&5
3843  rm -rf conftest*
3844  gt_cv_func_gettext_libintl=no
3845fi
3846rm -f conftest*
3847fi
3848
3849echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3850else
3851  echo "$ac_t""no" 1>&6
3852fi
3853
3854	   fi
3855
3856	   if test "$gt_cv_func_gettext_libc" = "yes" \
3857	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
3858	      cat >> confdefs.h <<\EOF
3859#define HAVE_GETTEXT 1
3860EOF
3861
3862	      # Extract the first word of "msgfmt", so it can be a program name with args.
3863set dummy msgfmt; ac_word=$2
3864echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3865echo "configure:3866: checking for $ac_word" >&5
3866if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3867  echo $ac_n "(cached) $ac_c" 1>&6
3868else
3869  case "$MSGFMT" in
3870  /*)
3871  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3872  ;;
3873  *)
3874  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3875  for ac_dir in $PATH; do
3876    test -z "$ac_dir" && ac_dir=.
3877    if test -f $ac_dir/$ac_word; then
3878      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3879	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3880	break
3881      fi
3882    fi
3883  done
3884  IFS="$ac_save_ifs"
3885  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3886  ;;
3887esac
3888fi
3889MSGFMT="$ac_cv_path_MSGFMT"
3890if test -n "$MSGFMT"; then
3891  echo "$ac_t""$MSGFMT" 1>&6
3892else
3893  echo "$ac_t""no" 1>&6
3894fi
3895	      if test "$MSGFMT" != "no"; then
3896		for ac_func in dcgettext
3897do
3898echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3899echo "configure:3900: checking for $ac_func" >&5
3900if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3901  echo $ac_n "(cached) $ac_c" 1>&6
3902else
3903  cat > conftest.$ac_ext <<EOF
3904#line 3905 "configure"
3905#include "confdefs.h"
3906/* System header to define __stub macros and hopefully few prototypes,
3907    which can conflict with char $ac_func(); below.  */
3908#include <assert.h>
3909/* Override any gcc2 internal prototype to avoid an error.  */
3910/* We use char because int might match the return type of a gcc2
3911    builtin and then its argument prototype would still apply.  */
3912char $ac_func();
3913
3914int main() {
3915
3916/* The GNU C library defines this for functions which it implements
3917    to always fail with ENOSYS.  Some functions are actually named
3918    something starting with __ and the normal name is an alias.  */
3919#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3920choke me
3921#else
3922$ac_func();
3923#endif
3924
3925; return 0; }
3926EOF
3927if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3928  rm -rf conftest*
3929  eval "ac_cv_func_$ac_func=yes"
3930else
3931  echo "configure: failed program was:" >&5
3932  cat conftest.$ac_ext >&5
3933  rm -rf conftest*
3934  eval "ac_cv_func_$ac_func=no"
3935fi
3936rm -f conftest*
3937fi
3938
3939if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3940  echo "$ac_t""yes" 1>&6
3941    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3942  cat >> confdefs.h <<EOF
3943#define $ac_tr_func 1
3944EOF
3945 
3946else
3947  echo "$ac_t""no" 1>&6
3948fi
3949done
3950
3951		# Extract the first word of "gmsgfmt", so it can be a program name with args.
3952set dummy gmsgfmt; ac_word=$2
3953echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3954echo "configure:3955: checking for $ac_word" >&5
3955if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3956  echo $ac_n "(cached) $ac_c" 1>&6
3957else
3958  case "$GMSGFMT" in
3959  /*)
3960  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3961  ;;
3962  ?:/*)			 
3963  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3964  ;;
3965  *)
3966  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
3967  ac_dummy="$PATH"
3968  for ac_dir in $ac_dummy; do 
3969    test -z "$ac_dir" && ac_dir=.
3970    if test -f $ac_dir/$ac_word; then
3971      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3972      break
3973    fi
3974  done
3975  IFS="$ac_save_ifs"
3976  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3977  ;;
3978esac
3979fi
3980GMSGFMT="$ac_cv_path_GMSGFMT"
3981if test -n "$GMSGFMT"; then
3982  echo "$ac_t""$GMSGFMT" 1>&6
3983else
3984  echo "$ac_t""no" 1>&6
3985fi
3986
3987		# Extract the first word of "xgettext", so it can be a program name with args.
3988set dummy xgettext; ac_word=$2
3989echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3990echo "configure:3991: checking for $ac_word" >&5
3991if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3992  echo $ac_n "(cached) $ac_c" 1>&6
3993else
3994  case "$XGETTEXT" in
3995  /*)
3996  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3997  ;;
3998  *)
3999  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4000  for ac_dir in $PATH; do
4001    test -z "$ac_dir" && ac_dir=.
4002    if test -f $ac_dir/$ac_word; then
4003      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4004	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4005	break
4006      fi
4007    fi
4008  done
4009  IFS="$ac_save_ifs"
4010  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4011  ;;
4012esac
4013fi
4014XGETTEXT="$ac_cv_path_XGETTEXT"
4015if test -n "$XGETTEXT"; then
4016  echo "$ac_t""$XGETTEXT" 1>&6
4017else
4018  echo "$ac_t""no" 1>&6
4019fi
4020
4021		cat > conftest.$ac_ext <<EOF
4022#line 4023 "configure"
4023#include "confdefs.h"
4024
4025int main() {
4026extern int _nl_msg_cat_cntr;
4027			       return _nl_msg_cat_cntr
4028; return 0; }
4029EOF
4030if { (eval echo configure:4031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4031  rm -rf conftest*
4032  CATOBJEXT=.gmo
4033		   DATADIRNAME=share
4034else
4035  echo "configure: failed program was:" >&5
4036  cat conftest.$ac_ext >&5
4037  rm -rf conftest*
4038  CATOBJEXT=.mo
4039		   DATADIRNAME=lib
4040fi
4041rm -f conftest*
4042		INSTOBJEXT=.mo
4043	      fi
4044	    fi
4045	
4046else
4047  echo "$ac_t""no" 1>&6
4048fi
4049
4050
4051	        
4052        if test "$CATOBJEXT" = "NONE"; then
4053	  	  	  nls_cv_use_gnu_gettext=yes
4054        fi
4055      fi
4056
4057      if test "$nls_cv_use_gnu_gettext" = "yes"; then
4058                INTLOBJS="\$(GETTOBJS)"
4059        # Extract the first word of "msgfmt", so it can be a program name with args.
4060set dummy msgfmt; ac_word=$2
4061echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4062echo "configure:4063: checking for $ac_word" >&5
4063if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4064  echo $ac_n "(cached) $ac_c" 1>&6
4065else
4066  case "$MSGFMT" in
4067  /*)
4068  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4069  ;;
4070  *)
4071  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4072  for ac_dir in $PATH; do
4073    test -z "$ac_dir" && ac_dir=.
4074    if test -f $ac_dir/$ac_word; then
4075      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4076	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4077	break
4078      fi
4079    fi
4080  done
4081  IFS="$ac_save_ifs"
4082  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4083  ;;
4084esac
4085fi
4086MSGFMT="$ac_cv_path_MSGFMT"
4087if test -n "$MSGFMT"; then
4088  echo "$ac_t""$MSGFMT" 1>&6
4089else
4090  echo "$ac_t""no" 1>&6
4091fi
4092
4093        # Extract the first word of "gmsgfmt", so it can be a program name with args.
4094set dummy gmsgfmt; ac_word=$2
4095echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4096echo "configure:4097: checking for $ac_word" >&5
4097if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4098  echo $ac_n "(cached) $ac_c" 1>&6
4099else
4100  case "$GMSGFMT" in
4101  /*)
4102  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4103  ;;
4104  ?:/*)			 
4105  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4106  ;;
4107  *)
4108  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
4109  ac_dummy="$PATH"
4110  for ac_dir in $ac_dummy; do 
4111    test -z "$ac_dir" && ac_dir=.
4112    if test -f $ac_dir/$ac_word; then
4113      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4114      break
4115    fi
4116  done
4117  IFS="$ac_save_ifs"
4118  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4119  ;;
4120esac
4121fi
4122GMSGFMT="$ac_cv_path_GMSGFMT"
4123if test -n "$GMSGFMT"; then
4124  echo "$ac_t""$GMSGFMT" 1>&6
4125else
4126  echo "$ac_t""no" 1>&6
4127fi
4128
4129        # Extract the first word of "xgettext", so it can be a program name with args.
4130set dummy xgettext; ac_word=$2
4131echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4132echo "configure:4133: checking for $ac_word" >&5
4133if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4134  echo $ac_n "(cached) $ac_c" 1>&6
4135else
4136  case "$XGETTEXT" in
4137  /*)
4138  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4139  ;;
4140  *)
4141  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4142  for ac_dir in $PATH; do
4143    test -z "$ac_dir" && ac_dir=.
4144    if test -f $ac_dir/$ac_word; then
4145      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4146	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4147	break
4148      fi
4149    fi
4150  done
4151  IFS="$ac_save_ifs"
4152  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4153  ;;
4154esac
4155fi
4156XGETTEXT="$ac_cv_path_XGETTEXT"
4157if test -n "$XGETTEXT"; then
4158  echo "$ac_t""$XGETTEXT" 1>&6
4159else
4160  echo "$ac_t""no" 1>&6
4161fi
4162
4163        
4164	USE_INCLUDED_LIBINTL=yes
4165        CATOBJEXT=.gmo
4166        INSTOBJEXT=.mo
4167        DATADIRNAME=share
4168	INTLDEPS='$(top_builddir)/../intl/libintl.a'
4169	INTLLIBS=$INTLDEPS
4170	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4171        nls_cv_header_intl=libintl.h
4172        nls_cv_header_libgt=libgettext.h
4173      fi
4174
4175            if test "$XGETTEXT" != ":"; then
4176			if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4177	  : ;
4178	else
4179	  echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4180	  XGETTEXT=":"
4181	fi
4182      fi
4183
4184      # We need to process the po/ directory.
4185      POSUB=po
4186    else
4187      DATADIRNAME=share
4188      nls_cv_header_intl=libintl.h
4189      nls_cv_header_libgt=libgettext.h
4190    fi
4191
4192    # If this is used in GNU gettext we have to set USE_NLS to `yes'
4193    # because some of the sources are only built for this goal.
4194    if test "$PACKAGE" = gettext; then
4195      USE_NLS=yes
4196      USE_INCLUDED_LIBINTL=yes
4197    fi
4198
4199                for lang in $ALL_LINGUAS; do
4200      GMOFILES="$GMOFILES $lang.gmo"
4201      POFILES="$POFILES $lang.po"
4202    done
4203
4204        
4205    
4206    
4207    
4208    
4209    
4210    
4211    
4212    
4213    
4214    
4215  
4216
4217   if test "x$CATOBJEXT" != "x"; then
4218     if test "x$ALL_LINGUAS" = "x"; then
4219       LINGUAS=
4220     else
4221       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4222echo "configure:4223: checking for catalogs to be installed" >&5
4223       NEW_LINGUAS=
4224       for lang in ${LINGUAS=$ALL_LINGUAS}; do
4225         case "$ALL_LINGUAS" in
4226          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4227         esac
4228       done
4229       LINGUAS=$NEW_LINGUAS
4230       echo "$ac_t""$LINGUAS" 1>&6
4231     fi
4232
4233          if test -n "$LINGUAS"; then
4234       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4235     fi
4236   fi
4237
4238            if test $ac_cv_header_locale_h = yes; then
4239     INCLUDE_LOCALE_H="#include <locale.h>"
4240   else
4241     INCLUDE_LOCALE_H="\
4242/* The system does not provide the header <locale.h>.  Take care yourself.  */"
4243   fi
4244   
4245
4246            if test -f $srcdir/po2tbl.sed.in; then
4247      if test "$CATOBJEXT" = ".cat"; then
4248	 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4249echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4250echo "configure:4251: checking for linux/version.h" >&5
4251if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4252  echo $ac_n "(cached) $ac_c" 1>&6
4253else
4254  cat > conftest.$ac_ext <<EOF
4255#line 4256 "configure"
4256#include "confdefs.h"
4257#include <linux/version.h>
4258EOF
4259ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4260{ (eval echo configure:4261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4261ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4262if test -z "$ac_err"; then
4263  rm -rf conftest*
4264  eval "ac_cv_header_$ac_safe=yes"
4265else
4266  echo "$ac_err" >&5
4267  echo "configure: failed program was:" >&5
4268  cat conftest.$ac_ext >&5
4269  rm -rf conftest*
4270  eval "ac_cv_header_$ac_safe=no"
4271fi
4272rm -f conftest*
4273fi
4274if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4275  echo "$ac_t""yes" 1>&6
4276  msgformat=linux
4277else
4278  echo "$ac_t""no" 1>&6
4279msgformat=xopen
4280fi
4281
4282
4283	          	 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4284      fi
4285            sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4286	 $srcdir/po2tbl.sed.in > po2tbl.sed
4287   fi
4288
4289            if test "$PACKAGE" = "gettext"; then
4290     GT_NO="#NO#"
4291     GT_YES=
4292   else
4293     GT_NO=
4294     GT_YES="#YES#"
4295   fi
4296   
4297   
4298
4299   MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4300   
4301
4302      l=
4303   
4304
4305            if test -f $srcdir/po/POTFILES.in; then
4306      test -d po || mkdir po
4307      if test "x$srcdir" != "x."; then
4308	 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4309	    posrcprefix="$srcdir/"
4310	 else
4311	    posrcprefix="../$srcdir/"
4312	 fi
4313      else
4314	 posrcprefix="../"
4315      fi
4316      rm -f po/POTFILES
4317      sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4318	 < $srcdir/po/POTFILES.in > po/POTFILES
4319   fi
4320  
4321
4322# Permit host specific settings.
4323. ${srcdir}/configure.host
4324
4325
4326# Find a good install program.  We prefer a C program (faster),
4327# so one script is as good as another.  But avoid the broken or
4328# incompatible versions:
4329# SysV /etc/install, /usr/sbin/install
4330# SunOS /usr/etc/install
4331# IRIX /sbin/install
4332# AIX /bin/install
4333# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4334# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4335# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4336# ./install, which can be erroneously created by make from ./install.sh.
4337echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4338echo "configure:4339: checking for a BSD compatible install" >&5
4339if test -z "$INSTALL"; then
4340if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4341  echo $ac_n "(cached) $ac_c" 1>&6
4342else
4343    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
4344  for ac_dir in $PATH; do
4345    # Account for people who put trailing slashes in PATH elements.
4346    case "$ac_dir/" in
4347    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4348    *)
4349      # OSF1 and SCO ODT 3.0 have their own names for install.
4350      # Don't use installbsd from OSF since it installs stuff as root
4351      # by default.
4352      for ac_prog in ginstall scoinst install; do
4353        if test -f $ac_dir/$ac_prog; then
4354	  if test $ac_prog = install &&
4355            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4356	    # AIX install.  It has an incompatible calling convention.
4357	    :
4358	  else
4359	    ac_cv_path_install="$ac_dir/$ac_prog -c"
4360	    break 2
4361	  fi
4362	fi
4363      done
4364      ;;
4365    esac
4366  done
4367  IFS="$ac_save_IFS"
4368
4369fi
4370  if test "${ac_cv_path_install+set}" = set; then
4371    INSTALL="$ac_cv_path_install"
4372  else
4373    # As a last resort, use the slow shell script.  We don't cache a
4374    # path for INSTALL within a source directory, because that will
4375    # break other packages using the cache if that directory is
4376    # removed, or if the path is relative.
4377    INSTALL="$ac_install_sh"
4378  fi
4379fi
4380echo "$ac_t""$INSTALL" 1>&6
4381
4382# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4383# It thinks the first close brace ends the variable substitution.
4384test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4385
4386test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4387
4388test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4389
4390
4391BFD_HOST_64BIT_LONG=0
4392BFD_HOST_64_BIT_DEFINED=0
4393BFD_HOST_64_BIT=
4394BFD_HOST_U_64_BIT=
4395if test "x${HOST_64BIT_TYPE}" = "xlong"; then
4396  BFD_HOST_64BIT_LONG=1
4397elif test "x${HOST_64BIT_TYPE}" != "x"; then
4398  BFD_HOST_64_BIT_DEFINED=1
4399  BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
4400  BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
4401fi
4402
4403
4404
4405
4406
4407# Put a plausible default for CC_FOR_BUILD in Makefile.
4408if test -z "$CC_FOR_BUILD"; then
4409  if test "x$cross_compiling" = "xno"; then
4410    CC_FOR_BUILD='$(CC)'
4411  else
4412    CC_FOR_BUILD=gcc
4413  fi
4414fi
4415
4416# Also set EXEEXT_FOR_BUILD.
4417if test "x$cross_compiling" = "xno"; then
4418  EXEEXT_FOR_BUILD='$(EXEEXT)'
4419else
4420  echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
4421echo "configure:4422: checking for build system executable suffix" >&5
4422if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
4423  echo $ac_n "(cached) $ac_c" 1>&6
4424else
4425  rm -f conftest*
4426     echo 'int main () { return 0; }' > conftest.c
4427     bfd_cv_build_exeext=
4428     ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
4429     for file in conftest.*; do
4430       case $file in
4431       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4432       *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
4433       esac
4434     done
4435     rm -f conftest*
4436     test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
4437fi
4438
4439echo "$ac_t""$bfd_cv_build_exeext" 1>&6
4440  EXEEXT_FOR_BUILD=""
4441  test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4442fi
4443
4444
4445for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
4446do
4447ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4448echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4449echo "configure:4450: checking for $ac_hdr" >&5
4450if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4451  echo $ac_n "(cached) $ac_c" 1>&6
4452else
4453  cat > conftest.$ac_ext <<EOF
4454#line 4455 "configure"
4455#include "confdefs.h"
4456#include <$ac_hdr>
4457EOF
4458ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4459{ (eval echo configure:4460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4460ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4461if test -z "$ac_err"; then
4462  rm -rf conftest*
4463  eval "ac_cv_header_$ac_safe=yes"
4464else
4465  echo "$ac_err" >&5
4466  echo "configure: failed program was:" >&5
4467  cat conftest.$ac_ext >&5
4468  rm -rf conftest*
4469  eval "ac_cv_header_$ac_safe=no"
4470fi
4471rm -f conftest*
4472fi
4473if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4474  echo "$ac_t""yes" 1>&6
4475    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4476  cat >> confdefs.h <<EOF
4477#define $ac_tr_hdr 1
4478EOF
4479 
4480else
4481  echo "$ac_t""no" 1>&6
4482fi
4483done
4484
4485for ac_hdr in fcntl.h sys/file.h sys/time.h
4486do
4487ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4488echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4489echo "configure:4490: checking for $ac_hdr" >&5
4490if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4491  echo $ac_n "(cached) $ac_c" 1>&6
4492else
4493  cat > conftest.$ac_ext <<EOF
4494#line 4495 "configure"
4495#include "confdefs.h"
4496#include <$ac_hdr>
4497EOF
4498ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4499{ (eval echo configure:4500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4500ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4501if test -z "$ac_err"; then
4502  rm -rf conftest*
4503  eval "ac_cv_header_$ac_safe=yes"
4504else
4505  echo "$ac_err" >&5
4506  echo "configure: failed program was:" >&5
4507  cat conftest.$ac_ext >&5
4508  rm -rf conftest*
4509  eval "ac_cv_header_$ac_safe=no"
4510fi
4511rm -f conftest*
4512fi
4513if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4514  echo "$ac_t""yes" 1>&6
4515    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4516  cat >> confdefs.h <<EOF
4517#define $ac_tr_hdr 1
4518EOF
4519 
4520else
4521  echo "$ac_t""no" 1>&6
4522fi
4523done
4524
4525echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4526echo "configure:4527: checking whether time.h and sys/time.h may both be included" >&5
4527if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4528  echo $ac_n "(cached) $ac_c" 1>&6
4529else
4530  cat > conftest.$ac_ext <<EOF
4531#line 4532 "configure"
4532#include "confdefs.h"
4533#include <sys/types.h>
4534#include <sys/time.h>
4535#include <time.h>
4536int main() {
4537struct tm *tp;
4538; return 0; }
4539EOF
4540if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4541  rm -rf conftest*
4542  ac_cv_header_time=yes
4543else
4544  echo "configure: failed program was:" >&5
4545  cat conftest.$ac_ext >&5
4546  rm -rf conftest*
4547  ac_cv_header_time=no
4548fi
4549rm -f conftest*
4550fi
4551
4552echo "$ac_t""$ac_cv_header_time" 1>&6
4553if test $ac_cv_header_time = yes; then
4554  cat >> confdefs.h <<\EOF
4555#define TIME_WITH_SYS_TIME 1
4556EOF
4557
4558fi
4559
4560ac_header_dirent=no
4561for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4562do
4563ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4564echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4565echo "configure:4566: checking for $ac_hdr that defines DIR" >&5
4566if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4567  echo $ac_n "(cached) $ac_c" 1>&6
4568else
4569  cat > conftest.$ac_ext <<EOF
4570#line 4571 "configure"
4571#include "confdefs.h"
4572#include <sys/types.h>
4573#include <$ac_hdr>
4574int main() {
4575DIR *dirp = 0;
4576; return 0; }
4577EOF
4578if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4579  rm -rf conftest*
4580  eval "ac_cv_header_dirent_$ac_safe=yes"
4581else
4582  echo "configure: failed program was:" >&5
4583  cat conftest.$ac_ext >&5
4584  rm -rf conftest*
4585  eval "ac_cv_header_dirent_$ac_safe=no"
4586fi
4587rm -f conftest*
4588fi
4589if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4590  echo "$ac_t""yes" 1>&6
4591    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4592  cat >> confdefs.h <<EOF
4593#define $ac_tr_hdr 1
4594EOF
4595 ac_header_dirent=$ac_hdr; break
4596else
4597  echo "$ac_t""no" 1>&6
4598fi
4599done
4600# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4601if test $ac_header_dirent = dirent.h; then
4602echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4603echo "configure:4604: checking for opendir in -ldir" >&5
4604ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4605if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4606  echo $ac_n "(cached) $ac_c" 1>&6
4607else
4608  ac_save_LIBS="$LIBS"
4609LIBS="-ldir  $LIBS"
4610cat > conftest.$ac_ext <<EOF
4611#line 4612 "configure"
4612#include "confdefs.h"
4613/* Override any gcc2 internal prototype to avoid an error.  */
4614/* We use char because int might match the return type of a gcc2
4615    builtin and then its argument prototype would still apply.  */
4616char opendir();
4617
4618int main() {
4619opendir()
4620; return 0; }
4621EOF
4622if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4623  rm -rf conftest*
4624  eval "ac_cv_lib_$ac_lib_var=yes"
4625else
4626  echo "configure: failed program was:" >&5
4627  cat conftest.$ac_ext >&5
4628  rm -rf conftest*
4629  eval "ac_cv_lib_$ac_lib_var=no"
4630fi
4631rm -f conftest*
4632LIBS="$ac_save_LIBS"
4633
4634fi
4635if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4636  echo "$ac_t""yes" 1>&6
4637  LIBS="$LIBS -ldir"
4638else
4639  echo "$ac_t""no" 1>&6
4640fi
4641
4642else
4643echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4644echo "configure:4645: checking for opendir in -lx" >&5
4645ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4646if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4647  echo $ac_n "(cached) $ac_c" 1>&6
4648else
4649  ac_save_LIBS="$LIBS"
4650LIBS="-lx  $LIBS"
4651cat > conftest.$ac_ext <<EOF
4652#line 4653 "configure"
4653#include "confdefs.h"
4654/* Override any gcc2 internal prototype to avoid an error.  */
4655/* We use char because int might match the return type of a gcc2
4656    builtin and then its argument prototype would still apply.  */
4657char opendir();
4658
4659int main() {
4660opendir()
4661; return 0; }
4662EOF
4663if { (eval echo configure:4664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4664  rm -rf conftest*
4665  eval "ac_cv_lib_$ac_lib_var=yes"
4666else
4667  echo "configure: failed program was:" >&5
4668  cat conftest.$ac_ext >&5
4669  rm -rf conftest*
4670  eval "ac_cv_lib_$ac_lib_var=no"
4671fi
4672rm -f conftest*
4673LIBS="$ac_save_LIBS"
4674
4675fi
4676if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4677  echo "$ac_t""yes" 1>&6
4678  LIBS="$LIBS -lx"
4679else
4680  echo "$ac_t""no" 1>&6
4681fi
4682
4683fi
4684
4685for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
4686do
4687echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4688echo "configure:4689: checking for $ac_func" >&5
4689if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4690  echo $ac_n "(cached) $ac_c" 1>&6
4691else
4692  cat > conftest.$ac_ext <<EOF
4693#line 4694 "configure"
4694#include "confdefs.h"
4695/* System header to define __stub macros and hopefully few prototypes,
4696    which can conflict with char $ac_func(); below.  */
4697#include <assert.h>
4698/* Override any gcc2 internal prototype to avoid an error.  */
4699/* We use char because int might match the return type of a gcc2
4700    builtin and then its argument prototype would still apply.  */
4701char $ac_func();
4702
4703int main() {
4704
4705/* The GNU C library defines this for functions which it implements
4706    to always fail with ENOSYS.  Some functions are actually named
4707    something starting with __ and the normal name is an alias.  */
4708#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4709choke me
4710#else
4711$ac_func();
4712#endif
4713
4714; return 0; }
4715EOF
4716if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4717  rm -rf conftest*
4718  eval "ac_cv_func_$ac_func=yes"
4719else
4720  echo "configure: failed program was:" >&5
4721  cat conftest.$ac_ext >&5
4722  rm -rf conftest*
4723  eval "ac_cv_func_$ac_func=no"
4724fi
4725rm -f conftest*
4726fi
4727
4728if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4729  echo "$ac_t""yes" 1>&6
4730    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4731  cat >> confdefs.h <<EOF
4732#define $ac_tr_func 1
4733EOF
4734 
4735else
4736  echo "$ac_t""no" 1>&6
4737fi
4738done
4739
4740
4741
4742case "${host}" in
4743*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
4744  cat >> confdefs.h <<\EOF
4745#define USE_BINARY_FOPEN 1
4746EOF
4747 ;;
4748esac
4749
4750echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4751echo "configure:4752: checking whether strstr must be declared" >&5
4752if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4753  echo $ac_n "(cached) $ac_c" 1>&6
4754else
4755  cat > conftest.$ac_ext <<EOF
4756#line 4757 "configure"
4757#include "confdefs.h"
4758
4759#include <stdio.h>
4760#ifdef HAVE_STRING_H
4761#include <string.h>
4762#else
4763#ifdef HAVE_STRINGS_H
4764#include <strings.h>
4765#endif
4766#endif
4767#ifdef HAVE_STDLIB_H
4768#include <stdlib.h>
4769#endif
4770#ifdef HAVE_UNISTD_H
4771#include <unistd.h>
4772#endif
4773int main() {
4774char *(*pfn) = (char *(*)) strstr
4775; return 0; }
4776EOF
4777if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4778  rm -rf conftest*
4779  bfd_cv_decl_needed_strstr=no
4780else
4781  echo "configure: failed program was:" >&5
4782  cat conftest.$ac_ext >&5
4783  rm -rf conftest*
4784  bfd_cv_decl_needed_strstr=yes
4785fi
4786rm -f conftest*
4787fi
4788
4789echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4790if test $bfd_cv_decl_needed_strstr = yes; then
4791  cat >> confdefs.h <<\EOF
4792#define NEED_DECLARATION_STRSTR 1
4793EOF
4794
4795fi
4796
4797echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4798echo "configure:4799: checking whether malloc must be declared" >&5
4799if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4800  echo $ac_n "(cached) $ac_c" 1>&6
4801else
4802  cat > conftest.$ac_ext <<EOF
4803#line 4804 "configure"
4804#include "confdefs.h"
4805
4806#include <stdio.h>
4807#ifdef HAVE_STRING_H
4808#include <string.h>
4809#else
4810#ifdef HAVE_STRINGS_H
4811#include <strings.h>
4812#endif
4813#endif
4814#ifdef HAVE_STDLIB_H
4815#include <stdlib.h>
4816#endif
4817#ifdef HAVE_UNISTD_H
4818#include <unistd.h>
4819#endif
4820int main() {
4821char *(*pfn) = (char *(*)) malloc
4822; return 0; }
4823EOF
4824if { (eval echo configure:4825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4825  rm -rf conftest*
4826  bfd_cv_decl_needed_malloc=no
4827else
4828  echo "configure: failed program was:" >&5
4829  cat conftest.$ac_ext >&5
4830  rm -rf conftest*
4831  bfd_cv_decl_needed_malloc=yes
4832fi
4833rm -f conftest*
4834fi
4835
4836echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4837if test $bfd_cv_decl_needed_malloc = yes; then
4838  cat >> confdefs.h <<\EOF
4839#define NEED_DECLARATION_MALLOC 1
4840EOF
4841
4842fi
4843
4844echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4845echo "configure:4846: checking whether realloc must be declared" >&5
4846if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4847  echo $ac_n "(cached) $ac_c" 1>&6
4848else
4849  cat > conftest.$ac_ext <<EOF
4850#line 4851 "configure"
4851#include "confdefs.h"
4852
4853#include <stdio.h>
4854#ifdef HAVE_STRING_H
4855#include <string.h>
4856#else
4857#ifdef HAVE_STRINGS_H
4858#include <strings.h>
4859#endif
4860#endif
4861#ifdef HAVE_STDLIB_H
4862#include <stdlib.h>
4863#endif
4864#ifdef HAVE_UNISTD_H
4865#include <unistd.h>
4866#endif
4867int main() {
4868char *(*pfn) = (char *(*)) realloc
4869; return 0; }
4870EOF
4871if { (eval echo configure:4872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4872  rm -rf conftest*
4873  bfd_cv_decl_needed_realloc=no
4874else
4875  echo "configure: failed program was:" >&5
4876  cat conftest.$ac_ext >&5
4877  rm -rf conftest*
4878  bfd_cv_decl_needed_realloc=yes
4879fi
4880rm -f conftest*
4881fi
4882
4883echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4884if test $bfd_cv_decl_needed_realloc = yes; then
4885  cat >> confdefs.h <<\EOF
4886#define NEED_DECLARATION_REALLOC 1
4887EOF
4888
4889fi
4890
4891echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4892echo "configure:4893: checking whether free must be declared" >&5
4893if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4894  echo $ac_n "(cached) $ac_c" 1>&6
4895else
4896  cat > conftest.$ac_ext <<EOF
4897#line 4898 "configure"
4898#include "confdefs.h"
4899
4900#include <stdio.h>
4901#ifdef HAVE_STRING_H
4902#include <string.h>
4903#else
4904#ifdef HAVE_STRINGS_H
4905#include <strings.h>
4906#endif
4907#endif
4908#ifdef HAVE_STDLIB_H
4909#include <stdlib.h>
4910#endif
4911#ifdef HAVE_UNISTD_H
4912#include <unistd.h>
4913#endif
4914int main() {
4915char *(*pfn) = (char *(*)) free
4916; return 0; }
4917EOF
4918if { (eval echo configure:4919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4919  rm -rf conftest*
4920  bfd_cv_decl_needed_free=no
4921else
4922  echo "configure: failed program was:" >&5
4923  cat conftest.$ac_ext >&5
4924  rm -rf conftest*
4925  bfd_cv_decl_needed_free=yes
4926fi
4927rm -f conftest*
4928fi
4929
4930echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4931if test $bfd_cv_decl_needed_free = yes; then
4932  cat >> confdefs.h <<\EOF
4933#define NEED_DECLARATION_FREE 1
4934EOF
4935
4936fi
4937
4938echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
4939echo "configure:4940: checking whether getenv must be declared" >&5
4940if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4941  echo $ac_n "(cached) $ac_c" 1>&6
4942else
4943  cat > conftest.$ac_ext <<EOF
4944#line 4945 "configure"
4945#include "confdefs.h"
4946
4947#include <stdio.h>
4948#ifdef HAVE_STRING_H
4949#include <string.h>
4950#else
4951#ifdef HAVE_STRINGS_H
4952#include <strings.h>
4953#endif
4954#endif
4955#ifdef HAVE_STDLIB_H
4956#include <stdlib.h>
4957#endif
4958#ifdef HAVE_UNISTD_H
4959#include <unistd.h>
4960#endif
4961int main() {
4962char *(*pfn) = (char *(*)) getenv
4963; return 0; }
4964EOF
4965if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4966  rm -rf conftest*
4967  bfd_cv_decl_needed_getenv=no
4968else
4969  echo "configure: failed program was:" >&5
4970  cat conftest.$ac_ext >&5
4971  rm -rf conftest*
4972  bfd_cv_decl_needed_getenv=yes
4973fi
4974rm -f conftest*
4975fi
4976
4977echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4978if test $bfd_cv_decl_needed_getenv = yes; then
4979  cat >> confdefs.h <<\EOF
4980#define NEED_DECLARATION_GETENV 1
4981EOF
4982
4983fi
4984
4985
4986# If we are configured native, pick a core file support file.
4987COREFILE=
4988COREFLAG=
4989TRAD_HEADER=
4990if test "${target}" = "${host}"; then
4991  case "${host}" in
4992  alpha*-*-freebsd*)
4993	COREFILE=''
4994	;;
4995  alpha*-*-linux-gnu*)
4996	COREFILE=trad-core.lo
4997	TRAD_HEADER='"hosts/alphalinux.h"'
4998	;;
4999  alpha*-*-netbsd*)	COREFILE=netbsd-core.lo ;;
5000  alpha*-*-*)		COREFILE=osf-core.lo ;;
5001  arm-*-freebsd*)	COREFILE='' ;;
5002  arm-*-netbsd*)	COREFILE=netbsd-core.lo ;;
5003  arm-*-riscix)		COREFILE=trad-core.lo ;;
5004  hppa*-*-hpux*)	COREFILE=hpux-core.lo ;;
5005  hppa*-*-hiux*)	COREFILE=hpux-core.lo ;;
5006  hppa*-*-mpeix*)	COREFILE=hpux-core.lo ;;
5007  hppa*-*-bsd*)		COREFILE="hpux-core.lo hppabsd-core.lo"
5008			COREFLAG="-DHPUX_CORE -DHPPABSD_CORE" ;;
5009  i370-*-*)
5010	COREFILE=trad-core.lo
5011	TRAD_HEADER='"hosts/i370linux.h"'
5012	;;
5013
5014  i[3456]86-sequent-bsd*)
5015	COREFILE=trad-core.lo
5016	TRAD_HEADER='"hosts/symmetry.h"'
5017	;;
5018  i[3456]86-sequent-sysv4*) ;;
5019  i[3456]86-sequent-sysv*)
5020	COREFILE=trad-core.lo
5021	TRAD_HEADER='"hosts/symmetry.h"'
5022	;;
5023  i[3456]86-*-bsdi)
5024	COREFILE=
5025	;;
5026  i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*)
5027	COREFILE=trad-core.lo
5028	TRAD_HEADER='"hosts/i386bsd.h"'
5029	;;
5030  i[3456]86-*-freebsd*)
5031	COREFILE=''
5032	TRAD_HEADER='"hosts/i386bsd.h"'
5033	;;
5034  i[3456]86-*-netbsd* | i[3456]86-*-openbsd*)
5035	COREFILE=netbsd-core.lo
5036	;;
5037  i[3456]86-esix-sysv3*)
5038	COREFILE=trad-core.lo
5039	TRAD_HEADER='"hosts/esix.h"'
5040	;;
5041  i[3456]86-*-sco3.2v5*)
5042	COREFILE=sco5-core.lo
5043	;;
5044  i[3456]86-*-sco* | i[3456]86-*-isc*)
5045	COREFILE=trad-core.lo
5046	TRAD_HEADER='"hosts/i386sco.h"'
5047	;;
5048  i[3456]86-*-mach3*)
5049	COREFILE=trad-core.lo
5050	TRAD_HEADER='"hosts/i386mach3.h"'
5051	;;
5052  i[3456]86-*-linux-gnu*)
5053	COREFILE=trad-core.lo
5054	TRAD_HEADER='"hosts/i386linux.h"'
5055	;;
5056  i[3456]86-*-isc*)	COREFILE=trad-core.lo ;;
5057  i[3456]86-*-aix*)	COREFILE=aix386-core.lo ;;
5058  i860-*-mach3* | i860-*-osf1*)
5059	COREFILE=trad-core.lo
5060	TRAD_HEADER='"hosts/i860mach3.h"'
5061	;;
5062  mips-dec-bsd*)
5063	COREFILE=trad-core.lo
5064	TRAD_HEADER='"hosts/mipsbsd.h"'
5065	;;
5066  mips-dec-mach3*)
5067	COREFILE=trad-core.lo
5068	TRAD_HEADER='"hosts/mipsmach3.h"'
5069	;;
5070  mips-*-netbsd* | mips*-*-openbsd*)
5071	COREFILE=netbsd-core.lo
5072	;;
5073  mips-dec-*)
5074	COREFILE=trad-core.lo
5075	TRAD_HEADER='"hosts/decstation.h"'
5076	;;
5077  mips-sgi-irix4*)	COREFILE=irix-core.lo ;;
5078  mips-sgi-irix5*)	COREFILE=irix-core.lo ;;
5079  mips-sgi-irix6*)	COREFILE=irix-core.lo ;;
5080  mips-*-mach3*)
5081	COREFILE=trad-core.lo
5082	TRAD_HEADER='"hosts/mipsmach3.h"'
5083	;;
5084  mips-*-sysv4*)	;;
5085  mips-*-sysv* | mips-*-riscos*)
5086	COREFILE=trad-core.lo
5087	TRAD_HEADER='"hosts/riscos.h"'
5088	;;
5089  mips-sony-bsd*)
5090	COREFILE=trad-core.lo
5091	TRAD_HEADER='"hosts/news-mips.h"'
5092	;;
5093  m68*-bull*-sysv*)
5094	COREFILE=trad-core.lo
5095	TRAD_HEADER='"hosts/dpx2.h"'
5096	;;
5097  m68*-hp-hpux*)	COREFILE=hpux-core.lo ;;
5098  m68*-hp-bsd*)
5099	COREFILE=trad-core.lo
5100	TRAD_HEADER='"hosts/hp300bsd.h"'
5101	;;
5102  m68*-*-linux-gnu*)
5103	COREFILE=trad-core.lo
5104	TRAD_HEADER='"hosts/m68klinux.h"'
5105	;;
5106  m68*-motorola-sysv*)
5107	COREFILE=trad-core.lo
5108	TRAD_HEADER='"hosts/delta68.h"'
5109	;;
5110  m68*-sony-*)
5111	COREFILE=trad-core.lo
5112	TRAD_HEADER='"hosts/news.h"'
5113	;;
5114  m68*-*-netbsd* | m68*-*-openbsd*)
5115	COREFILE=netbsd-core.lo
5116	;;
5117  m68*-apple-aux*)
5118	COREFILE=trad-core.lo
5119	TRAD_HEADER='"hosts/m68kaux.h"'
5120	;;
5121  m88*-*-sysv4*)	;;
5122  m88*-motorola-sysv*)	COREFILE=ptrace-core.lo ;;
5123  m88*-*-mach3*)
5124	COREFILE=trad-core.lo
5125	TRAD_HEADER='"hosts/m88kmach3.h"'
5126	;;
5127  ns32k-pc532-mach)
5128	COREFILE=trad-core.lo
5129	TRAD_HEADER='"hosts/pc532mach.h"'
5130	;;
5131  ns32k-*-netbsd* | ns32k-*-openbsd*)
5132	COREFILE=netbsd-core.lo
5133	;;
5134  rs6000-*-lynx*)	COREFILE=lynx-core.lo ;;
5135  rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*)
5136        COREFILE=rs6000-core.lo
5137	COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE"
5138	;;
5139  rs6000-*-aix4*)	COREFILE=rs6000-core.lo ;;
5140  rs6000-*-*)		COREFILE=rs6000-core.lo ;;
5141  powerpc-*-aix4*)	COREFILE=rs6000-core.lo ;;
5142  powerpc-*-aix*)	COREFILE=rs6000-core.lo ;;
5143  powerpc-*-beos*)	;;
5144  powerpc-*-freebsd*)	COREFILE='' ;;
5145  powerpc-*-netbsd*)	COREFILE=netbsd-core.lo ;;
5146  powerpc-*-*bsd*)	COREFILE=netbsd-core.lo ;;
5147  s390*-*-*)            COREFILE=trad-core.lo ;;
5148  sh*-*-netbsd*)	COREFILE=netbsd-core.lo ;;
5149  sparc-*-netbsd* | sparc-*-openbsd*)
5150	COREFILE=netbsd-core.lo
5151	;;
5152  tahoe-*-*)
5153	COREFILE=trad-core.lo
5154	TRAD_HEADER='"hosts/tahoe.h"'
5155	;;
5156  vax-*-ultrix2*)
5157	COREFILE=trad-core.lo
5158	TRAD_HEADER='"hosts/vaxult2.h"'
5159	;;
5160  vax-*-ultrix*)
5161	COREFILE=trad-core.lo
5162	TRAD_HEADER='"hosts/vaxult2.h"'
5163	;;
5164  vax-*-*)
5165	COREFILE=trad-core.lo
5166	TRAD_HEADER='"hosts/vaxbsd.h"'
5167	;;
5168  x86_64-*-netbsd*)	COREFILE=netbsd-core.lo ;;
5169  esac
5170
5171  case "$COREFILE" in
5172  aix386-core.lo)	COREFLAG=-DAIX386_CORE ;;
5173  hppabsd-core.lo)	COREFLAG=-DHPPABSD_CORE ;;
5174  hpux-core.lo)		COREFLAG=-DHPUX_CORE ;;
5175  irix-core.lo)		COREFLAG=-DIRIX_CORE ;;
5176  lynx-core.lo)		COREFLAG=-DLYNX_CORE ;;
5177  netbsd-core.lo)	COREFLAG=-DNETBSD_CORE ;;
5178  osf-core.lo)		COREFLAG=-DOSF_CORE ;;
5179  ptrace-core.lo)	COREFLAG=-DPTRACE_CORE ;;
5180  rs6000-core.lo)	COREFLAG="$COREFLAG -DAIX_CORE" ;;
5181  sco5-core.lo)		COREFLAG="$COREFLAG -DSCO5_CORE" ;;
5182  trad-core.lo)		COREFLAG="$COREFLAG -DTRAD_CORE" ;;
5183  esac
5184
5185  # ELF corefile support has several flavors, but all of
5186  # them use something called <sys/procfs.h>
5187  for ac_hdr in sys/procfs.h
5188do
5189ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5190echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5191echo "configure:5192: checking for $ac_hdr" >&5
5192if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5193  echo $ac_n "(cached) $ac_c" 1>&6
5194else
5195  cat > conftest.$ac_ext <<EOF
5196#line 5197 "configure"
5197#include "confdefs.h"
5198#include <$ac_hdr>
5199EOF
5200ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5201{ (eval echo configure:5202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5202ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5203if test -z "$ac_err"; then
5204  rm -rf conftest*
5205  eval "ac_cv_header_$ac_safe=yes"
5206else
5207  echo "$ac_err" >&5
5208  echo "configure: failed program was:" >&5
5209  cat conftest.$ac_ext >&5
5210  rm -rf conftest*
5211  eval "ac_cv_header_$ac_safe=no"
5212fi
5213rm -f conftest*
5214fi
5215if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5216  echo "$ac_t""yes" 1>&6
5217    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5218  cat >> confdefs.h <<EOF
5219#define $ac_tr_hdr 1
5220EOF
5221 
5222else
5223  echo "$ac_t""no" 1>&6
5224fi
5225done
5226
5227  if test "$ac_cv_header_sys_procfs_h" = yes; then
5228    echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
5229echo "configure:5230: checking for prstatus_t in sys/procfs.h" >&5
5230 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
5231  echo $ac_n "(cached) $ac_c" 1>&6
5232else
5233  cat > conftest.$ac_ext <<EOF
5234#line 5235 "configure"
5235#include "confdefs.h"
5236
5237#define _SYSCALL32
5238#include <sys/procfs.h>
5239int main() {
5240prstatus_t avar
5241; return 0; }
5242EOF
5243if { (eval echo configure:5244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5244  rm -rf conftest*
5245  bfd_cv_have_sys_procfs_type_prstatus_t=yes
5246else
5247  echo "configure: failed program was:" >&5
5248  cat conftest.$ac_ext >&5
5249  rm -rf conftest*
5250  bfd_cv_have_sys_procfs_type_prstatus_t=no
5251   
5252fi
5253rm -f conftest*
5254fi
5255
5256 if test $bfd_cv_have_sys_procfs_type_prstatus_t = yes; then
5257   cat >> confdefs.h <<\EOF
5258#define HAVE_PRSTATUS_T 1
5259EOF
5260
5261 fi
5262 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
5263
5264    echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
5265echo "configure:5266: checking for prstatus32_t in sys/procfs.h" >&5
5266 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
5267  echo $ac_n "(cached) $ac_c" 1>&6
5268else
5269  cat > conftest.$ac_ext <<EOF
5270#line 5271 "configure"
5271#include "confdefs.h"
5272
5273#define _SYSCALL32
5274#include <sys/procfs.h>
5275int main() {
5276prstatus32_t avar
5277; return 0; }
5278EOF
5279if { (eval echo configure:5280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5280  rm -rf conftest*
5281  bfd_cv_have_sys_procfs_type_prstatus32_t=yes
5282else
5283  echo "configure: failed program was:" >&5
5284  cat conftest.$ac_ext >&5
5285  rm -rf conftest*
5286  bfd_cv_have_sys_procfs_type_prstatus32_t=no
5287   
5288fi
5289rm -f conftest*
5290fi
5291
5292 if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then
5293   cat >> confdefs.h <<\EOF
5294#define HAVE_PRSTATUS32_T 1
5295EOF
5296
5297 fi
5298 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
5299
5300    echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
5301echo "configure:5302: checking for prstatus_t.pr_who in sys/procfs.h" >&5
5302 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
5303  echo $ac_n "(cached) $ac_c" 1>&6
5304else
5305  cat > conftest.$ac_ext <<EOF
5306#line 5307 "configure"
5307#include "confdefs.h"
5308
5309#define _SYSCALL32
5310#include <sys/procfs.h>
5311int main() {
5312prstatus_t avar; void* aref = (void*) &avar.pr_who
5313; return 0; }
5314EOF
5315if { (eval echo configure:5316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5316  rm -rf conftest*
5317  bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
5318else
5319  echo "configure: failed program was:" >&5
5320  cat conftest.$ac_ext >&5
5321  rm -rf conftest*
5322  bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
5323   
5324fi
5325rm -f conftest*
5326fi
5327
5328 if test $bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who = yes; then
5329   cat >> confdefs.h <<\EOF
5330#define HAVE_PRSTATUS_T_PR_WHO 1
5331EOF
5332
5333 fi
5334 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
5335
5336    echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
5337echo "configure:5338: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
5338 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
5339  echo $ac_n "(cached) $ac_c" 1>&6
5340else
5341  cat > conftest.$ac_ext <<EOF
5342#line 5343 "configure"
5343#include "confdefs.h"
5344
5345#define _SYSCALL32
5346#include <sys/procfs.h>
5347int main() {
5348prstatus32_t avar; void* aref = (void*) &avar.pr_who
5349; return 0; }
5350EOF
5351if { (eval echo configure:5352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5352  rm -rf conftest*
5353  bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
5354else
5355  echo "configure: failed program was:" >&5
5356  cat conftest.$ac_ext >&5
5357  rm -rf conftest*
5358  bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
5359   
5360fi
5361rm -f conftest*
5362fi
5363
5364 if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then
5365   cat >> confdefs.h <<\EOF
5366#define HAVE_PRSTATUS32_T_PR_WHO 1
5367EOF
5368
5369 fi
5370 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
5371
5372    echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
5373echo "configure:5374: checking for pstatus_t in sys/procfs.h" >&5
5374 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
5375  echo $ac_n "(cached) $ac_c" 1>&6
5376else
5377  cat > conftest.$ac_ext <<EOF
5378#line 5379 "configure"
5379#include "confdefs.h"
5380
5381#define _SYSCALL32
5382#include <sys/procfs.h>
5383int main() {
5384pstatus_t avar
5385; return 0; }
5386EOF
5387if { (eval echo configure:5388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5388  rm -rf conftest*
5389  bfd_cv_have_sys_procfs_type_pstatus_t=yes
5390else
5391  echo "configure: failed program was:" >&5
5392  cat conftest.$ac_ext >&5
5393  rm -rf conftest*
5394  bfd_cv_have_sys_procfs_type_pstatus_t=no
5395   
5396fi
5397rm -f conftest*
5398fi
5399
5400 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
5401   cat >> confdefs.h <<\EOF
5402#define HAVE_PSTATUS_T 1
5403EOF
5404
5405 fi
5406 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
5407
5408    echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
5409echo "configure:5410: checking for pxstatus_t in sys/procfs.h" >&5
5410 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
5411  echo $ac_n "(cached) $ac_c" 1>&6
5412else
5413  cat > conftest.$ac_ext <<EOF
5414#line 5415 "configure"
5415#include "confdefs.h"
5416
5417#define _SYSCALL32
5418#include <sys/procfs.h>
5419int main() {
5420pxstatus_t avar
5421; return 0; }
5422EOF
5423if { (eval echo configure:5424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5424  rm -rf conftest*
5425  bfd_cv_have_sys_procfs_type_pxstatus_t=yes
5426else
5427  echo "configure: failed program was:" >&5
5428  cat conftest.$ac_ext >&5
5429  rm -rf conftest*
5430  bfd_cv_have_sys_procfs_type_pxstatus_t=no
5431   
5432fi
5433rm -f conftest*
5434fi
5435
5436 if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then
5437   cat >> confdefs.h <<\EOF
5438#define HAVE_PXSTATUS_T 1
5439EOF
5440
5441 fi
5442 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
5443
5444    echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
5445echo "configure:5446: checking for pstatus32_t in sys/procfs.h" >&5
5446 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
5447  echo $ac_n "(cached) $ac_c" 1>&6
5448else
5449  cat > conftest.$ac_ext <<EOF
5450#line 5451 "configure"
5451#include "confdefs.h"
5452
5453#define _SYSCALL32
5454#include <sys/procfs.h>
5455int main() {
5456pstatus32_t avar
5457; return 0; }
5458EOF
5459if { (eval echo configure:5460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5460  rm -rf conftest*
5461  bfd_cv_have_sys_procfs_type_pstatus32_t=yes
5462else
5463  echo "configure: failed program was:" >&5
5464  cat conftest.$ac_ext >&5
5465  rm -rf conftest*
5466  bfd_cv_have_sys_procfs_type_pstatus32_t=no
5467   
5468fi
5469rm -f conftest*
5470fi
5471
5472 if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then
5473   cat >> confdefs.h <<\EOF
5474#define HAVE_PSTATUS32_T 1
5475EOF
5476
5477 fi
5478 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
5479
5480    echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
5481echo "configure:5482: checking for prpsinfo_t in sys/procfs.h" >&5
5482 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
5483  echo $ac_n "(cached) $ac_c" 1>&6
5484else
5485  cat > conftest.$ac_ext <<EOF
5486#line 5487 "configure"
5487#include "confdefs.h"
5488
5489#define _SYSCALL32
5490#include <sys/procfs.h>
5491int main() {
5492prpsinfo_t avar
5493; return 0; }
5494EOF
5495if { (eval echo configure:5496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5496  rm -rf conftest*
5497  bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
5498else
5499  echo "configure: failed program was:" >&5
5500  cat conftest.$ac_ext >&5
5501  rm -rf conftest*
5502  bfd_cv_have_sys_procfs_type_prpsinfo_t=no
5503   
5504fi
5505rm -f conftest*
5506fi
5507
5508 if test $bfd_cv_have_sys_procfs_type_prpsinfo_t = yes; then
5509   cat >> confdefs.h <<\EOF
5510#define HAVE_PRPSINFO_T 1
5511EOF
5512
5513 fi
5514 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
5515
5516    echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
5517echo "configure:5518: checking for prpsinfo32_t in sys/procfs.h" >&5
5518 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
5519  echo $ac_n "(cached) $ac_c" 1>&6
5520else
5521  cat > conftest.$ac_ext <<EOF
5522#line 5523 "configure"
5523#include "confdefs.h"
5524
5525#define _SYSCALL32
5526#include <sys/procfs.h>
5527int main() {
5528prpsinfo32_t avar
5529; return 0; }
5530EOF
5531if { (eval echo configure:5532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5532  rm -rf conftest*
5533  bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
5534else
5535  echo "configure: failed program was:" >&5
5536  cat conftest.$ac_ext >&5
5537  rm -rf conftest*
5538  bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
5539   
5540fi
5541rm -f conftest*
5542fi
5543
5544 if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then
5545   cat >> confdefs.h <<\EOF
5546#define HAVE_PRPSINFO32_T 1
5547EOF
5548
5549 fi
5550 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
5551
5552    echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
5553echo "configure:5554: checking for psinfo_t in sys/procfs.h" >&5
5554 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
5555  echo $ac_n "(cached) $ac_c" 1>&6
5556else
5557  cat > conftest.$ac_ext <<EOF
5558#line 5559 "configure"
5559#include "confdefs.h"
5560
5561#define _SYSCALL32
5562#include <sys/procfs.h>
5563int main() {
5564psinfo_t avar
5565; return 0; }
5566EOF
5567if { (eval echo configure:5568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5568  rm -rf conftest*
5569  bfd_cv_have_sys_procfs_type_psinfo_t=yes
5570else
5571  echo "configure: failed program was:" >&5
5572  cat conftest.$ac_ext >&5
5573  rm -rf conftest*
5574  bfd_cv_have_sys_procfs_type_psinfo_t=no
5575   
5576fi
5577rm -f conftest*
5578fi
5579
5580 if test $bfd_cv_have_sys_procfs_type_psinfo_t = yes; then
5581   cat >> confdefs.h <<\EOF
5582#define HAVE_PSINFO_T 1
5583EOF
5584
5585 fi
5586 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
5587
5588    echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
5589echo "configure:5590: checking for psinfo32_t in sys/procfs.h" >&5
5590 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
5591  echo $ac_n "(cached) $ac_c" 1>&6
5592else
5593  cat > conftest.$ac_ext <<EOF
5594#line 5595 "configure"
5595#include "confdefs.h"
5596
5597#define _SYSCALL32
5598#include <sys/procfs.h>
5599int main() {
5600psinfo32_t avar
5601; return 0; }
5602EOF
5603if { (eval echo configure:5604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5604  rm -rf conftest*
5605  bfd_cv_have_sys_procfs_type_psinfo32_t=yes
5606else
5607  echo "configure: failed program was:" >&5
5608  cat conftest.$ac_ext >&5
5609  rm -rf conftest*
5610  bfd_cv_have_sys_procfs_type_psinfo32_t=no
5611   
5612fi
5613rm -f conftest*
5614fi
5615
5616 if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then
5617   cat >> confdefs.h <<\EOF
5618#define HAVE_PSINFO32_T 1
5619EOF
5620
5621 fi
5622 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
5623
5624    echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
5625echo "configure:5626: checking for lwpstatus_t in sys/procfs.h" >&5
5626 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
5627  echo $ac_n "(cached) $ac_c" 1>&6
5628else
5629  cat > conftest.$ac_ext <<EOF
5630#line 5631 "configure"
5631#include "confdefs.h"
5632
5633#define _SYSCALL32
5634#include <sys/procfs.h>
5635int main() {
5636lwpstatus_t avar
5637; return 0; }
5638EOF
5639if { (eval echo configure:5640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5640  rm -rf conftest*
5641  bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
5642else
5643  echo "configure: failed program was:" >&5
5644  cat conftest.$ac_ext >&5
5645  rm -rf conftest*
5646  bfd_cv_have_sys_procfs_type_lwpstatus_t=no
5647   
5648fi
5649rm -f conftest*
5650fi
5651
5652 if test $bfd_cv_have_sys_procfs_type_lwpstatus_t = yes; then
5653   cat >> confdefs.h <<\EOF
5654#define HAVE_LWPSTATUS_T 1
5655EOF
5656
5657 fi
5658 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
5659
5660    echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
5661echo "configure:5662: checking for lwpxstatus_t in sys/procfs.h" >&5
5662 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
5663  echo $ac_n "(cached) $ac_c" 1>&6
5664else
5665  cat > conftest.$ac_ext <<EOF
5666#line 5667 "configure"
5667#include "confdefs.h"
5668
5669#define _SYSCALL32
5670#include <sys/procfs.h>
5671int main() {
5672lwpxstatus_t avar
5673; return 0; }
5674EOF
5675if { (eval echo configure:5676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5676  rm -rf conftest*
5677  bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
5678else
5679  echo "configure: failed program was:" >&5
5680  cat conftest.$ac_ext >&5
5681  rm -rf conftest*
5682  bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
5683   
5684fi
5685rm -f conftest*
5686fi
5687
5688 if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then
5689   cat >> confdefs.h <<\EOF
5690#define HAVE_LWPXSTATUS_T 1
5691EOF
5692
5693 fi
5694 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
5695
5696    echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
5697echo "configure:5698: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
5698 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
5699  echo $ac_n "(cached) $ac_c" 1>&6
5700else
5701  cat > conftest.$ac_ext <<EOF
5702#line 5703 "configure"
5703#include "confdefs.h"
5704
5705#define _SYSCALL32
5706#include <sys/procfs.h>
5707int main() {
5708lwpstatus_t avar; void* aref = (void*) &avar.pr_context
5709; return 0; }
5710EOF
5711if { (eval echo configure:5712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5712  rm -rf conftest*
5713  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
5714else
5715  echo "configure: failed program was:" >&5
5716  cat conftest.$ac_ext >&5
5717  rm -rf conftest*
5718  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
5719   
5720fi
5721rm -f conftest*
5722fi
5723
5724 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context = yes; then
5725   cat >> confdefs.h <<\EOF
5726#define HAVE_LWPSTATUS_T_PR_CONTEXT 1
5727EOF
5728
5729 fi
5730 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
5731
5732    echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
5733echo "configure:5734: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
5734 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
5735  echo $ac_n "(cached) $ac_c" 1>&6
5736else
5737  cat > conftest.$ac_ext <<EOF
5738#line 5739 "configure"
5739#include "confdefs.h"
5740
5741#define _SYSCALL32
5742#include <sys/procfs.h>
5743int main() {
5744lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
5745; return 0; }
5746EOF
5747if { (eval echo configure:5748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5748  rm -rf conftest*
5749  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
5750else
5751  echo "configure: failed program was:" >&5
5752  cat conftest.$ac_ext >&5
5753  rm -rf conftest*
5754  bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
5755   
5756fi
5757rm -f conftest*
5758fi
5759
5760 if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg = yes; then
5761   cat >> confdefs.h <<\EOF
5762#define HAVE_LWPSTATUS_T_PR_REG 1
5763EOF
5764
5765 fi
5766 echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
5767
5768    echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
5769echo "configure:5770: checking for win32_pstatus_t in sys/procfs.h" >&5
5770 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
5771  echo $ac_n "(cached) $ac_c" 1>&6
5772else
5773  cat > conftest.$ac_ext <<EOF
5774#line 5775 "configure"
5775#include "confdefs.h"
5776
5777#define _SYSCALL32
5778#include <sys/procfs.h>
5779int main() {
5780win32_pstatus_t avar
5781; return 0; }
5782EOF
5783if { (eval echo configure:5784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5784  rm -rf conftest*
5785  bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
5786else
5787  echo "configure: failed program was:" >&5
5788  cat conftest.$ac_ext >&5
5789  rm -rf conftest*
5790  bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
5791   
5792fi
5793rm -f conftest*
5794fi
5795
5796 if test $bfd_cv_have_sys_procfs_type_win32_pstatus_t = yes; then
5797   cat >> confdefs.h <<\EOF
5798#define HAVE_WIN32_PSTATUS_T 1
5799EOF
5800
5801 fi
5802 echo "$ac_t""$bfd_cv_have_sys_procfs_type_win32_pstatus_t" 1>&6
5803
5804  fi
5805fi
5806
5807
5808if test -n "$TRAD_HEADER"; then
5809  cat >> confdefs.h <<EOF
5810#define TRAD_HEADER $TRAD_HEADER
5811EOF
5812
5813fi
5814
5815# Horrible hacks to build DLLs on Windows.
5816WIN32LDFLAGS=
5817WIN32LIBADD=
5818case "${host}" in
5819*-*-cygwin*)
5820  if test "$enable_shared" = "yes"; then
5821    WIN32LDFLAGS="-no-undefined"
5822    WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
5823  fi
5824  ;;
5825*-*-linux*)
5826  # We borrow WIN32LIBADD so that the shared libbfd won't depend on
5827  # libiberty.a.
5828  case "${host}" in
5829  mips*-*-linux*)
5830    # Linux/MIPS uses PIC by default.
5831    if test "$enable_shared" = "yes"; then
5832      WIN32LIBADD="-L../libiberty -liberty"
5833    fi
5834    ;;
5835  *)
5836    PICFLAG=
5837        eval `grep "^[ 	]*PICFLAG[ 	]*=" ../libiberty/Makefile | sed -e "s/[ 	]*//g"`
5838        if test -n "$PICFLAG"; then
5839      WIN32LIBADD="-L../libiberty/pic -liberty"
5840    fi
5841  ;;
5842  esac
5843  ;;
5844esac
5845
5846
5847
5848# target stuff:
5849
5850# Canonicalize the secondary target names.
5851if test -n "$enable_targets" ; then
5852    for targ in `echo $enable_targets | sed 's/,/ /g'`
5853    do
5854	result=`$ac_config_sub $targ 2>/dev/null`
5855	if test -n "$result" ; then
5856	    canon_targets="$canon_targets $result"
5857	else
5858	    # Allow targets that config.sub doesn't recognize, like "all".
5859	    canon_targets="$canon_targets $targ"
5860	fi
5861    done
5862fi
5863
5864all_targets=false
5865defvec=
5866selvecs=
5867selarchs=
5868TDEFINES=
5869for targ in $target $canon_targets
5870do
5871    if test "x$targ" = "xall"; then
5872        all_targets=true
5873    else
5874	. $srcdir/config.bfd
5875	if test "x$targ" = "x$target"; then
5876	    defvec=$targ_defvec
5877	fi
5878	selvecs="$selvecs $targ_defvec $targ_selvecs"
5879	selarchs="$selarchs $targ_archs"
5880	TDEFINES="$TDEFINES $targ_cflags"
5881    fi
5882done
5883
5884
5885# This processing still needs to be done if we're to decide properly whether
5886# 64-bit support needs to be compiled in.  Currently, it will be included if
5887# the default or any other explicitly requested target requires it; it
5888# will not be included on a 32-bit host if no 64-bit target is requested, and
5889# no "--with-64-bit-bfd" option is given, even if "--enable-targets=all" is
5890# used.
5891
5892# uniq the default and selected vectors in all the configured targets.
5893f=""
5894for i in $selvecs ; do
5895    case " $f " in
5896    *" $i "*) ;;
5897    *) f="$f $i" ;;
5898    esac
5899done
5900selvecs="$f"
5901
5902
5903# uniq the architectures in all the configured targets.
5904f=""
5905for i in $selarchs ; do
5906    case " $f " in
5907    *" $i "*) ;;
5908    *) f="$f $i" ;;
5909    esac
5910done
5911selarchs="$f"
5912
5913# Target backend .o files.
5914tb=
5915
5916elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
5917
5918for vec in $selvecs
5919do
5920    target_size=32
5921    case "$vec" in
5922    # This list is alphabetized to make it easy to compare
5923    # with the two vector lists in targets.c.  For the same reason,
5924    # use one entry per line, even though this leads to long lines.
5925    a29kcoff_big_vec)		tb="$tb coff-a29k.lo cofflink.lo" ;;
5926    a_out_adobe_vec)		tb="$tb aout-adobe.lo aout32.lo" ;;
5927    aout0_big_vec)		tb="$tb aout0.lo aout32.lo" ;;
5928    aout_arm_big_vec)		tb="$tb aout-arm.lo aout32.lo" ;;
5929    aout_arm_little_vec)	tb="$tb aout-arm.lo aout32.lo" ;;
5930    aout_mips_big_vec)		tb="$tb mipsbsd.lo aout32.lo" ;;
5931    aout_mips_little_vec)	tb="$tb mipsbsd.lo aout32.lo" ;;
5932    apollocoff_vec)		tb="$tb coff-apollo.lo" ;;
5933    arm_epoc_pe_big_vec)	tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
5934    arm_epoc_pe_little_vec)	tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
5935    arm_epoc_pei_big_vec)	tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
5936    arm_epoc_pei_little_vec)	tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
5937    armcoff_big_vec)		tb="$tb coff-arm.lo cofflink.lo " ;;
5938    armcoff_little_vec)		tb="$tb coff-arm.lo cofflink.lo " ;;
5939    armnetbsd_vec)		tb="$tb armnetbsd.lo aout32.lo" ;;
5940    armpe_big_vec)		tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
5941    armpe_little_vec)		tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
5942    armpei_big_vec)		tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
5943    armpei_little_vec)		tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
5944    b_out_vec_big_host)		tb="$tb bout.lo aout32.lo" ;;
5945    b_out_vec_little_host)	tb="$tb bout.lo aout32.lo" ;;
5946    bfd_efi_app_ia32_vec)	tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
5947    bfd_efi_app_ia64_vec)	tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
5948    bfd_elf32_avr_vec)		tb="$tb elf32-avr.lo elf32.lo $elf" ;;
5949    bfd_elf32_big_generic_vec) 	tb="$tb elf32-gen.lo elf32.lo $elf" ;;
5950    bfd_elf32_bigarc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
5951    bfd_elf32_bigarm_oabi_vec)	tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
5952    bfd_elf32_bigarm_vec)	tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
5953    bfd_elf32_bigmips_vec) 	tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5954    bfd_elf32_cris_vec)		tb="$tb elf32-cris.lo elf32.lo $elf" ;;
5955    bfd_elf32_d10v_vec)		tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
5956    bfd_elf32_d30v_vec)		tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
5957    bfd_elf32_fr30_vec)		tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
5958    bfd_elf32_h8300_vec)	tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
5959    bfd_elf32_hppa_linux_vec)	tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
5960    bfd_elf32_hppa_vec)		tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
5961    bfd_elf32_i370_vec)		tb="$tb elf32-i370.lo elf32.lo $elf" ;;
5962    bfd_elf32_i386_vec)		tb="$tb elf32-i386.lo elf32.lo $elf" ;;
5963    bfd_elf32_i860_little_vec)	tb="$tb elf32-i860.lo elf32.lo $elf" ;;
5964    bfd_elf32_i860_vec)		tb="$tb elf32-i860.lo elf32.lo $elf" ;;
5965    bfd_elf32_i960_vec)		tb="$tb elf32-i960.lo elf32.lo $elf" ;;
5966    bfd_elf32_ia64_big_vec)	tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
5967    bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
5968    bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
5969    bfd_elf32_littlearc_vec)	tb="$tb elf32-arc.lo elf32.lo $elf" ;;
5970    bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
5971    bfd_elf32_littlearm_vec)	tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
5972    bfd_elf32_littlemips_vec) 	tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5973    bfd_elf32_m32r_vec)		tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
5974    bfd_elf32_m68hc11_vec)	tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
5975    bfd_elf32_m68hc12_vec)	tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;;
5976    bfd_elf32_m68k_vec)		tb="$tb elf32-m68k.lo elf32.lo $elf" ;;
5977    bfd_elf32_m88k_vec)		tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
5978    bfd_elf32_mcore_big_vec)	tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
5979    bfd_elf32_mcore_little_vec)	tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
5980    bfd_elf32_mn10200_vec)	tb="$tb elf-m10200.lo elf32.lo $elf" ;;
5981    bfd_elf32_mn10300_vec)	tb="$tb elf-m10300.lo elf32.lo $elf" ;;
5982    bfd_elf32_openrisc_vec)	tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
5983    bfd_elf32_pj_vec)           tb="$tb elf32-pj.lo elf32.lo $elf";;
5984    bfd_elf32_pjl_vec)          tb="$tb elf32-pj.lo elf32.lo $elf";;
5985    bfd_elf32_powerpc_vec)	tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
5986    bfd_elf32_powerpcle_vec)	tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
5987    bfd_elf32_s390_vec)		tb="$tb elf32-s390.lo elf32.lo $elf" ;;
5988    bfd_elf32_sh_vec)		tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
5989    bfd_elf32_shblin_vec)	tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
5990    bfd_elf32_shl_vec)		tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
5991    bfd_elf32_shlin_vec)	tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
5992    bfd_elf32_shlnbsd_vec)	tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
5993    bfd_elf32_shnbsd_vec)	tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
5994    bfd_elf32_sparc_vec)	tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
5995    bfd_elf32_tradbigmips_vec)  tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5996    bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
5997    bfd_elf32_us_cris_vec)	tb="$tb elf32-cris.lo elf32.lo $elf" ;;
5998    bfd_elf32_v850_vec)		tb="$tb elf32-v850.lo elf32.lo $elf" ;;
5999    bfd_elf32_xstormy16_vec)	tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
6000    bfd_elf64_alpha_vec)	tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
6001    bfd_elf64_big_generic_vec) 	tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
6002    bfd_elf64_bigmips_vec) 	tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6003    bfd_elf64_hppa_linux_vec)	tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
6004    bfd_elf64_hppa_vec)		tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
6005    bfd_elf64_ia64_aix_big_vec)	tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
6006    bfd_elf64_ia64_aix_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
6007    bfd_elf64_ia64_big_vec)	tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
6008    bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
6009    bfd_elf64_ia64_little_vec)	tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
6010    bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
6011    bfd_elf64_littlemips_vec) 	tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
6012    bfd_elf64_mmix_vec) 	tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
6013    bfd_elf64_powerpc_vec)	tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
6014    bfd_elf64_powerpcle_vec)	tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
6015    bfd_elf64_s390_vec)		tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
6016    bfd_elf64_sparc_vec)	tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
6017    bfd_elf64_tradbigmips_vec)	tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;;
6018    bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;;
6019    bfd_elf64_x86_64_vec)	tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
6020    bfd_mmo_vec)		tb="$tb mmo.lo" target_size=64 ;;
6021    bfd_powerpc_pe_vec)         tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
6022    bfd_powerpc_pei_vec)        tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
6023    bfd_powerpcle_pe_vec)       tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
6024    bfd_powerpcle_pei_vec)      tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
6025    cisco_core_big_vec)		tb="$tb cisco-core.lo" ;;
6026    cisco_core_little_vec)	tb="$tb cisco-core.lo" ;;
6027    cris_aout_vec)		tb="$tb aout-cris.lo" ;;
6028    demo_64_vec)		tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
6029    ecoff_big_vec)		tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
6030    ecoff_biglittle_vec)	tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
6031    ecoff_little_vec)		tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
6032    ecoffalpha_little_vec)	tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;;
6033    go32coff_vec)		tb="$tb coff-go32.lo cofflink.lo" ;;
6034    go32stubbedcoff_vec)	tb="$tb coff-stgo32.lo cofflink.lo" ;;
6035    h8300coff_vec)		tb="$tb coff-h8300.lo reloc16.lo" ;;
6036    h8500coff_vec)		tb="$tb coff-h8500.lo reloc16.lo" ;;
6037    host_aout_vec)		tb="$tb host-aout.lo aout32.lo" ;;
6038    hp300bsd_vec)		tb="$tb hp300bsd.lo aout32.lo" ;;
6039    hp300hpux_vec)		tb="$tb hp300hpux.lo aout32.lo" ;;
6040    i386aout_vec)		tb="$tb i386aout.lo aout32.lo" ;;
6041    i386bsd_vec)		tb="$tb i386bsd.lo aout32.lo" ;;
6042    i386coff_vec)		tb="$tb coff-i386.lo cofflink.lo" ;;
6043    i386dynix_vec)		tb="$tb i386dynix.lo aout32.lo" ;;
6044    i386freebsd_vec)		tb="$tb i386freebsd.lo aout32.lo" ;;
6045    i386linux_vec)		tb="$tb i386linux.lo aout32.lo" ;;
6046    i386lynx_aout_vec)		tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
6047    i386lynx_coff_vec)		tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
6048    i386mach3_vec)		tb="$tb i386mach3.lo aout32.lo" ;;
6049    i386msdos_vec)		tb="$tb i386msdos.lo" ;;
6050    i386netbsd_vec)		tb="$tb i386netbsd.lo aout32.lo" ;;
6051    i386os9k_vec)		tb="$tb i386os9k.lo aout32.lo" ;;
6052    i386pe_vec)			tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
6053    i386pei_vec)		tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
6054    i860coff_vec)		tb="$tb coff-i860.lo cofflink.lo" ;;
6055    icoff_big_vec)		tb="$tb coff-i960.lo cofflink.lo" ;;
6056    icoff_little_vec)		tb="$tb coff-i960.lo cofflink.lo" ;;
6057    ieee_vec)			tb="$tb ieee.lo" ;;
6058    m68k4knetbsd_vec)		tb="$tb m68k4knetbsd.lo aout32.lo" ;;
6059    m68kaux_coff_vec)		tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
6060    m68kcoff_vec)		tb="$tb coff-m68k.lo cofflink.lo" ;;
6061    m68kcoffun_vec)		tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
6062    m68klinux_vec)		tb="$tb m68klinux.lo aout32.lo" ;;
6063    m68klynx_aout_vec)		tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
6064    m68klynx_coff_vec)		tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
6065    m68knetbsd_vec)		tb="$tb m68knetbsd.lo aout32.lo" ;;
6066    m68ksysvcoff_vec)		tb="$tb coff-svm68k.lo cofflink.lo" ;;
6067    m88kbcs_vec)		tb="$tb coff-m88k.lo" ;;
6068    mcore_pe_big_vec)		tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
6069    mcore_pe_little_vec)	tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
6070    mcore_pei_big_vec)		tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
6071    mcore_pei_little_vec)	tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
6072    mipslpe_vec)		tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
6073    mipslpei_vec)		tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
6074    newsos3_vec)		tb="$tb newsos3.lo aout32.lo" ;;
6075    nlm32_alpha_vec)		tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
6076    nlm32_i386_vec)		tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
6077    nlm32_powerpc_vec)		tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
6078    nlm32_sparc_vec)		tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
6079    pc532machaout_vec)		tb="$tb pc532-mach.lo aout-ns32k.lo" ;;
6080    pc532netbsd_vec)		tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
6081    pdp11_aout_vec)		tb="$tb pdp11.lo" ;;
6082    pmac_xcoff_vec)		tb="$tb coff-rs6000.lo xcofflink.lo" ;;
6083    ppcboot_vec)		tb="$tb ppcboot.lo" ;;
6084    riscix_vec)			tb="$tb aout32.lo riscix.lo" ;;
6085    rs6000coff64_vec)		tb="$tb coff64-rs6000.lo xcofflink.lo"; target_size=64 ;;
6086    rs6000coff_vec)		tb="$tb coff-rs6000.lo xcofflink.lo" ;;
6087    shcoff_small_vec)		tb="$tb coff-sh.lo cofflink.lo" ;;
6088    shcoff_vec)			tb="$tb coff-sh.lo cofflink.lo" ;;
6089    shlcoff_small_vec)		tb="$tb coff-sh.lo cofflink.lo" ;;
6090    shlcoff_vec)		tb="$tb coff-sh.lo cofflink.lo" ;;
6091    shlpe_vec)			tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
6092    shlpei_vec)			tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
6093    som_vec)			tb="$tb som.lo" ;;
6094    sparccoff_vec)		tb="$tb coff-sparc.lo" ;;
6095    sparcle_aout_vec)		tb="$tb aout-sparcle.lo aout32.lo" ;;
6096    sparclinux_vec)		tb="$tb sparclinux.lo aout32.lo" ;;
6097    sparclynx_aout_vec)		tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
6098    sparclynx_coff_vec)		tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
6099    sparcnetbsd_vec)		tb="$tb sparcnetbsd.lo aout32.lo" ;;
6100    srec_vec)			tb="$tb srec.lo" ;;
6101    sunos_big_vec)		tb="$tb sunos.lo aout32.lo" ;;
6102    symbolsrec_vec)		tb="$tb srec.lo" ;;
6103    tekhex_vec)			tb="$tb tekhex.lo" ;;
6104    tic30_aout_vec)		tb="$tb aout-tic30.lo" ;;
6105    tic30_coff_vec)		tb="$tb coff-tic30.lo" ;;
6106    tic54x_coff0_beh_vec)	tb="$tb coff-tic54x.lo" ;;
6107    tic54x_coff0_vec)		tb="$tb coff-tic54x.lo" ;;
6108    tic54x_coff1_beh_vec)	tb="$tb coff-tic54x.lo" ;;
6109    tic54x_coff1_vec)		tb="$tb coff-tic54x.lo" ;;
6110    tic54x_coff2_beh_vec)	tb="$tb coff-tic54x.lo" ;;
6111    tic54x_coff2_vec)		tb="$tb coff-tic54x.lo" ;;
6112    tic80coff_vec)		tb="$tb coff-tic80.lo cofflink.lo" ;;
6113    versados_vec)		tb="$tb versados.lo" ;;
6114    vms_alpha_vec)		tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
6115    vms_vax_vec)		tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" ;;
6116    w65_vec)			tb="$tb coff-w65.lo reloc16.lo" ;;
6117    we32kcoff_vec)		tb="$tb coff-we32k.lo" ;;
6118    z8kcoff_vec)		tb="$tb coff-z8k.lo reloc16.lo" ;;
6119
6120    "")			;;
6121    *) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
6122    esac
6123
6124    if test ${target_size} = 64; then
6125	target64=true
6126    fi
6127    if test x"${vec}" = x"${defvec}"; then
6128	bfd_default_target_size=${target_size}
6129    fi
6130done
6131
6132# Target architecture .o files.
6133# A couple of CPUs use shorter file names to avoid problems on DOS
6134# filesystems.
6135ta=`echo $selarchs | sed -e s/bfd_/cpu-/g -e s/_arch/.lo/g -e s/mn10200/m10200/ -e s/mn10300/m10300/`
6136
6137# Weed out duplicate .o files.
6138f=""
6139for i in $tb ; do
6140    case " $f " in
6141    *" $i "*) ;;
6142    *) f="$f $i" ;;
6143    esac
6144done
6145tb="$f"
6146
6147f=""
6148for i in $ta ; do
6149    case " $f " in
6150    *" $i "*) ;;
6151    *) f="$f $i" ;;
6152    esac
6153done
6154ta="$f"
6155
6156bfd_backends="$tb"
6157bfd_machines="$ta"
6158
6159if test x${all_targets} = xtrue ; then
6160  bfd_backends="${bfd_backends}"' $(ALL_BACKENDS)'
6161  bfd_machines="${bfd_machines}"' $(ALL_MACHINES)'
6162  selvecs=
6163  havevecs=
6164  selarchs=
6165else	# all_targets is true
6166  # Only set these if they will be nonempty, for the clever echo.
6167  havevecs=
6168  test -n "$selvecs" &&
6169    havevecs=`echo $selvecs | sed -e 's/^/-DHAVE_/' -e 's/ \(.\)/ -DHAVE_\1/g'`
6170  test -n "$selvecs" &&
6171    selvecs=`echo $selvecs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
6172  test -n "$selarchs" &&
6173    selarchs=`echo $selarchs | sed -e 's/^/\&/' -e 's/ \(.\)/,\&\1/g'`
6174fi	# all_targets is true
6175
6176case ${host64}-${target64}-${want64} in
6177  *true*)
6178    wordsize=64
6179    bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
6180    all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
6181    if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
6182      echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
6183      echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
6184    fi
6185    if test -n "$GCC" ; then
6186       bad_64bit_gcc=no;
6187       echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
6188echo "configure:6189: checking for gcc version with buggy 64-bit support" >&5
6189       # Add more tests for gcc versions with non-working 64-bit support here.
6190       cat > conftest.$ac_ext <<EOF
6191#line 6192 "configure"
6192#include "confdefs.h"
6193:__GNUC__:__GNUC_MINOR__:__i386__:
6194EOF
6195if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6196  egrep ": 2 : 91 : 1 :" >/dev/null 2>&1; then
6197  rm -rf conftest*
6198  bad_64bit_gcc=yes;
6199		    echo "$ac_t""yes: egcs-1.1.2 on ix86 spotted" 1>&6
6200else
6201  rm -rf conftest*
6202  echo "$ac_t""no" 1>&6
6203fi
6204rm -f conftest*
6205
6206       if test $bad_64bit_gcc = yes ; then
6207	 { echo "configure: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" 1>&2; exit 1; }
6208       fi
6209    fi
6210    ;;
6211  false-false-false)
6212    wordsize=32
6213    bfd_libs='$(BFD32_LIBS)'
6214    all_backends='$(BFD32_BACKENDS)'
6215    ;;
6216esac
6217
6218
6219
6220
6221
6222
6223
6224
6225tdefaults=""
6226test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
6227test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
6228test -n "${selarchs}" && tdefaults="${tdefaults} -DSELECT_ARCHITECTURES='${selarchs}'"
6229test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}"
6230
6231
6232for ac_hdr in unistd.h
6233do
6234ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6235echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6236echo "configure:6237: checking for $ac_hdr" >&5
6237if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6238  echo $ac_n "(cached) $ac_c" 1>&6
6239else
6240  cat > conftest.$ac_ext <<EOF
6241#line 6242 "configure"
6242#include "confdefs.h"
6243#include <$ac_hdr>
6244EOF
6245ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6246{ (eval echo configure:6247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6247ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6248if test -z "$ac_err"; then
6249  rm -rf conftest*
6250  eval "ac_cv_header_$ac_safe=yes"
6251else
6252  echo "$ac_err" >&5
6253  echo "configure: failed program was:" >&5
6254  cat conftest.$ac_ext >&5
6255  rm -rf conftest*
6256  eval "ac_cv_header_$ac_safe=no"
6257fi
6258rm -f conftest*
6259fi
6260if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6261  echo "$ac_t""yes" 1>&6
6262    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6263  cat >> confdefs.h <<EOF
6264#define $ac_tr_hdr 1
6265EOF
6266 
6267else
6268  echo "$ac_t""no" 1>&6
6269fi
6270done
6271
6272for ac_func in getpagesize
6273do
6274echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6275echo "configure:6276: checking for $ac_func" >&5
6276if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6277  echo $ac_n "(cached) $ac_c" 1>&6
6278else
6279  cat > conftest.$ac_ext <<EOF
6280#line 6281 "configure"
6281#include "confdefs.h"
6282/* System header to define __stub macros and hopefully few prototypes,
6283    which can conflict with char $ac_func(); below.  */
6284#include <assert.h>
6285/* Override any gcc2 internal prototype to avoid an error.  */
6286/* We use char because int might match the return type of a gcc2
6287    builtin and then its argument prototype would still apply.  */
6288char $ac_func();
6289
6290int main() {
6291
6292/* The GNU C library defines this for functions which it implements
6293    to always fail with ENOSYS.  Some functions are actually named
6294    something starting with __ and the normal name is an alias.  */
6295#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6296choke me
6297#else
6298$ac_func();
6299#endif
6300
6301; return 0; }
6302EOF
6303if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6304  rm -rf conftest*
6305  eval "ac_cv_func_$ac_func=yes"
6306else
6307  echo "configure: failed program was:" >&5
6308  cat conftest.$ac_ext >&5
6309  rm -rf conftest*
6310  eval "ac_cv_func_$ac_func=no"
6311fi
6312rm -f conftest*
6313fi
6314
6315if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6316  echo "$ac_t""yes" 1>&6
6317    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6318  cat >> confdefs.h <<EOF
6319#define $ac_tr_func 1
6320EOF
6321 
6322else
6323  echo "$ac_t""no" 1>&6
6324fi
6325done
6326
6327echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6328echo "configure:6329: checking for working mmap" >&5
6329if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6330  echo $ac_n "(cached) $ac_c" 1>&6
6331else
6332  if test "$cross_compiling" = yes; then
6333  ac_cv_func_mmap_fixed_mapped=no
6334else
6335  cat > conftest.$ac_ext <<EOF
6336#line 6337 "configure"
6337#include "confdefs.h"
6338
6339/* Thanks to Mike Haertel and Jim Avera for this test.
6340   Here is a matrix of mmap possibilities:
6341	mmap private not fixed
6342	mmap private fixed at somewhere currently unmapped
6343	mmap private fixed at somewhere already mapped
6344	mmap shared not fixed
6345	mmap shared fixed at somewhere currently unmapped
6346	mmap shared fixed at somewhere already mapped
6347   For private mappings, we should verify that changes cannot be read()
6348   back from the file, nor mmap's back from the file at a different
6349   address.  (There have been systems where private was not correctly
6350   implemented like the infamous i386 svr4.0, and systems where the
6351   VM page cache was not coherent with the filesystem buffer cache
6352   like early versions of FreeBSD and possibly contemporary NetBSD.)
6353   For shared mappings, we should conversely verify that changes get
6354   propogated back to all the places they're supposed to be.
6355
6356   Grep wants private fixed already mapped.
6357   The main things grep needs to know about mmap are:
6358   * does it exist and is it safe to write into the mmap'd area
6359   * how to use it (BSD variants)  */
6360#include <sys/types.h>
6361#include <fcntl.h>
6362#include <sys/mman.h>
6363
6364/* This mess was copied from the GNU getpagesize.h.  */
6365#ifndef HAVE_GETPAGESIZE
6366# ifdef HAVE_UNISTD_H
6367#  include <unistd.h>
6368# endif
6369
6370/* Assume that all systems that can run configure have sys/param.h.  */
6371# ifndef HAVE_SYS_PARAM_H
6372#  define HAVE_SYS_PARAM_H 1
6373# endif
6374
6375# ifdef _SC_PAGESIZE
6376#  define getpagesize() sysconf(_SC_PAGESIZE)
6377# else /* no _SC_PAGESIZE */
6378#  ifdef HAVE_SYS_PARAM_H
6379#   include <sys/param.h>
6380#   ifdef EXEC_PAGESIZE
6381#    define getpagesize() EXEC_PAGESIZE
6382#   else /* no EXEC_PAGESIZE */
6383#    ifdef NBPG
6384#     define getpagesize() NBPG * CLSIZE
6385#     ifndef CLSIZE
6386#      define CLSIZE 1
6387#     endif /* no CLSIZE */
6388#    else /* no NBPG */
6389#     ifdef NBPC
6390#      define getpagesize() NBPC
6391#     else /* no NBPC */
6392#      ifdef PAGESIZE
6393#       define getpagesize() PAGESIZE
6394#      endif /* PAGESIZE */
6395#     endif /* no NBPC */
6396#    endif /* no NBPG */
6397#   endif /* no EXEC_PAGESIZE */
6398#  else /* no HAVE_SYS_PARAM_H */
6399#   define getpagesize() 8192	/* punt totally */
6400#  endif /* no HAVE_SYS_PARAM_H */
6401# endif /* no _SC_PAGESIZE */
6402
6403#endif /* no HAVE_GETPAGESIZE */
6404
6405#ifdef __cplusplus
6406extern "C" { void *malloc(unsigned); }
6407#else
6408char *malloc();
6409#endif
6410
6411int
6412main()
6413{
6414	char *data, *data2, *data3;
6415	int i, pagesize;
6416	int fd;
6417
6418	pagesize = getpagesize();
6419
6420	/*
6421	 * First, make a file with some known garbage in it.
6422	 */
6423	data = malloc(pagesize);
6424	if (!data)
6425		exit(1);
6426	for (i = 0; i < pagesize; ++i)
6427		*(data + i) = rand();
6428	umask(0);
6429	fd = creat("conftestmmap", 0600);
6430	if (fd < 0)
6431		exit(1);
6432	if (write(fd, data, pagesize) != pagesize)
6433		exit(1);
6434	close(fd);
6435
6436	/*
6437	 * Next, try to mmap the file at a fixed address which
6438	 * already has something else allocated at it.  If we can,
6439	 * also make sure that we see the same garbage.
6440	 */
6441	fd = open("conftestmmap", O_RDWR);
6442	if (fd < 0)
6443		exit(1);
6444	data2 = malloc(2 * pagesize);
6445	if (!data2)
6446		exit(1);
6447	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6448	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6449	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
6450		exit(1);
6451	for (i = 0; i < pagesize; ++i)
6452		if (*(data + i) != *(data2 + i))
6453			exit(1);
6454
6455	/*
6456	 * Finally, make sure that changes to the mapped area
6457	 * do not percolate back to the file as seen by read().
6458	 * (This is a bug on some variants of i386 svr4.0.)
6459	 */
6460	for (i = 0; i < pagesize; ++i)
6461		*(data2 + i) = *(data2 + i) + 1;
6462	data3 = malloc(pagesize);
6463	if (!data3)
6464		exit(1);
6465	if (read(fd, data3, pagesize) != pagesize)
6466		exit(1);
6467	for (i = 0; i < pagesize; ++i)
6468		if (*(data + i) != *(data3 + i))
6469			exit(1);
6470	close(fd);
6471	unlink("conftestmmap");
6472	exit(0);
6473}
6474
6475EOF
6476if { (eval echo configure:6477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6477then
6478  ac_cv_func_mmap_fixed_mapped=yes
6479else
6480  echo "configure: failed program was:" >&5
6481  cat conftest.$ac_ext >&5
6482  rm -fr conftest*
6483  ac_cv_func_mmap_fixed_mapped=no
6484fi
6485rm -fr conftest*
6486fi
6487
6488fi
6489
6490echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6491if test $ac_cv_func_mmap_fixed_mapped = yes; then
6492  cat >> confdefs.h <<\EOF
6493#define HAVE_MMAP 1
6494EOF
6495
6496fi
6497
6498for ac_func in madvise mprotect
6499do
6500echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6501echo "configure:6502: checking for $ac_func" >&5
6502if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6503  echo $ac_n "(cached) $ac_c" 1>&6
6504else
6505  cat > conftest.$ac_ext <<EOF
6506#line 6507 "configure"
6507#include "confdefs.h"
6508/* System header to define __stub macros and hopefully few prototypes,
6509    which can conflict with char $ac_func(); below.  */
6510#include <assert.h>
6511/* Override any gcc2 internal prototype to avoid an error.  */
6512/* We use char because int might match the return type of a gcc2
6513    builtin and then its argument prototype would still apply.  */
6514char $ac_func();
6515
6516int main() {
6517
6518/* The GNU C library defines this for functions which it implements
6519    to always fail with ENOSYS.  Some functions are actually named
6520    something starting with __ and the normal name is an alias.  */
6521#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6522choke me
6523#else
6524$ac_func();
6525#endif
6526
6527; return 0; }
6528EOF
6529if { (eval echo configure:6530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6530  rm -rf conftest*
6531  eval "ac_cv_func_$ac_func=yes"
6532else
6533  echo "configure: failed program was:" >&5
6534  cat conftest.$ac_ext >&5
6535  rm -rf conftest*
6536  eval "ac_cv_func_$ac_func=no"
6537fi
6538rm -f conftest*
6539fi
6540
6541if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6542  echo "$ac_t""yes" 1>&6
6543    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6544  cat >> confdefs.h <<EOF
6545#define $ac_tr_func 1
6546EOF
6547 
6548else
6549  echo "$ac_t""no" 1>&6
6550fi
6551done
6552
6553case ${want_mmap}+${ac_cv_func_mmap_fixed_mapped} in
6554  true+yes )  cat >> confdefs.h <<\EOF
6555#define USE_MMAP 1
6556EOF
6557 ;;
6558esac
6559
6560rm -f doc/config.status
6561trap '' 1 2 15
6562cat > confcache <<\EOF
6563# This file is a shell script that caches the results of configure
6564# tests run on this system so they can be shared between configure
6565# scripts and configure runs.  It is not useful on other systems.
6566# If it contains results you don't want to keep, you may remove or edit it.
6567#
6568# By default, configure uses ./config.cache as the cache file,
6569# creating it if it does not exist already.  You can give configure
6570# the --cache-file=FILE option to use a different cache file; that is
6571# what configure does when it calls configure scripts in
6572# subdirectories, so they share the cache.
6573# Giving --cache-file=/dev/null disables caching, for debugging configure.
6574# config.status only pays attention to the cache file if you give it the
6575# --recheck option to rerun configure.
6576#
6577EOF
6578# The following way of writing the cache mishandles newlines in values,
6579# but we know of no workaround that is simple, portable, and efficient.
6580# So, don't put newlines in cache variables' values.
6581# Ultrix sh set writes to stderr and can't be redirected directly,
6582# and sets the high bit in the cache file unless we assign to the vars.
6583(set) 2>&1 |
6584  case `(ac_space=' '; set | grep ac_space) 2>&1` in
6585  *ac_space=\ *)
6586    # `set' does not quote correctly, so add quotes (double-quote substitution
6587    # turns \\\\ into \\, and sed turns \\ into \).
6588    sed -n \
6589      -e "s/'/'\\\\''/g" \
6590      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6591    ;;
6592  *)
6593    # `set' quotes correctly as required by POSIX, so do not add quotes.
6594    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6595    ;;
6596  esac >> confcache
6597if cmp -s $cache_file confcache; then
6598  :
6599else
6600  if test -w $cache_file; then
6601    echo "updating cache $cache_file"
6602    cat confcache > $cache_file
6603  else
6604    echo "not updating unwritable cache $cache_file"
6605  fi
6606fi
6607rm -f confcache
6608
6609trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6610
6611test "x$prefix" = xNONE && prefix=$ac_default_prefix
6612# Let make expand exec_prefix.
6613test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6614
6615# Any assignment to VPATH causes Sun make to only execute
6616# the first set of double-colon rules, so remove it if not needed.
6617# If there is a colon in the path, we need to keep it.
6618if test "x$srcdir" = x.; then
6619  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
6620fi
6621
6622trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6623
6624DEFS=-DHAVE_CONFIG_H
6625
6626# Without the "./", some shells look in PATH for config.status.
6627: ${CONFIG_STATUS=./config.status}
6628
6629echo creating $CONFIG_STATUS
6630rm -f $CONFIG_STATUS
6631cat > $CONFIG_STATUS <<EOF
6632#! /bin/sh
6633# Generated automatically by configure.
6634# Run this file to recreate the current configuration.
6635# This directory was configured as follows,
6636# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6637#
6638# $0 $ac_configure_args
6639#
6640# Compiler output produced by configure, useful for debugging
6641# configure, is in ./config.log if it exists.
6642
6643ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6644for ac_option
6645do
6646  case "\$ac_option" in
6647  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6648    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6649    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6650  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6651    echo "$CONFIG_STATUS generated by autoconf version 2.13"
6652    exit 0 ;;
6653  -help | --help | --hel | --he | --h)
6654    echo "\$ac_cs_usage"; exit 0 ;;
6655  *) echo "\$ac_cs_usage"; exit 1 ;;
6656  esac
6657done
6658
6659ac_given_srcdir=$srcdir
6660ac_given_INSTALL="$INSTALL"
6661
6662trap 'rm -fr `echo "Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6663EOF
6664cat >> $CONFIG_STATUS <<EOF
6665
6666# Protect against being on the right side of a sed subst in config.status.
6667sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6668 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6669$ac_vpsub
6670$extrasub
6671s%@SHELL@%$SHELL%g
6672s%@CFLAGS@%$CFLAGS%g
6673s%@CPPFLAGS@%$CPPFLAGS%g
6674s%@CXXFLAGS@%$CXXFLAGS%g
6675s%@FFLAGS@%$FFLAGS%g
6676s%@DEFS@%$DEFS%g
6677s%@LDFLAGS@%$LDFLAGS%g
6678s%@LIBS@%$LIBS%g
6679s%@exec_prefix@%$exec_prefix%g
6680s%@prefix@%$prefix%g
6681s%@program_transform_name@%$program_transform_name%g
6682s%@bindir@%$bindir%g
6683s%@sbindir@%$sbindir%g
6684s%@libexecdir@%$libexecdir%g
6685s%@datadir@%$datadir%g
6686s%@sysconfdir@%$sysconfdir%g
6687s%@sharedstatedir@%$sharedstatedir%g
6688s%@localstatedir@%$localstatedir%g
6689s%@libdir@%$libdir%g
6690s%@includedir@%$includedir%g
6691s%@oldincludedir@%$oldincludedir%g
6692s%@infodir@%$infodir%g
6693s%@mandir@%$mandir%g
6694s%@host@%$host%g
6695s%@host_alias@%$host_alias%g
6696s%@host_cpu@%$host_cpu%g
6697s%@host_vendor@%$host_vendor%g
6698s%@host_os@%$host_os%g
6699s%@target@%$target%g
6700s%@target_alias@%$target_alias%g
6701s%@target_cpu@%$target_cpu%g
6702s%@target_vendor@%$target_vendor%g
6703s%@target_os@%$target_os%g
6704s%@build@%$build%g
6705s%@build_alias@%$build_alias%g
6706s%@build_cpu@%$build_cpu%g
6707s%@build_vendor@%$build_vendor%g
6708s%@build_os@%$build_os%g
6709s%@CC@%$CC%g
6710s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6711s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6712s%@INSTALL_DATA@%$INSTALL_DATA%g
6713s%@PACKAGE@%$PACKAGE%g
6714s%@VERSION@%$VERSION%g
6715s%@ACLOCAL@%$ACLOCAL%g
6716s%@AUTOCONF@%$AUTOCONF%g
6717s%@AUTOMAKE@%$AUTOMAKE%g
6718s%@AUTOHEADER@%$AUTOHEADER%g
6719s%@MAKEINFO@%$MAKEINFO%g
6720s%@SET_MAKE@%$SET_MAKE%g
6721s%@bfd_version@%$bfd_version%g
6722s%@bfd_version_date@%$bfd_version_date%g
6723s%@bfd_version_string@%$bfd_version_string%g
6724s%@AR@%$AR%g
6725s%@RANLIB@%$RANLIB%g
6726s%@LN_S@%$LN_S%g
6727s%@OBJEXT@%$OBJEXT%g
6728s%@EXEEXT@%$EXEEXT%g
6729s%@STRIP@%$STRIP%g
6730s%@LIBTOOL@%$LIBTOOL%g
6731s%@WARN_CFLAGS@%$WARN_CFLAGS%g
6732s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6733s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6734s%@MAINT@%$MAINT%g
6735s%@CPP@%$CPP%g
6736s%@ALLOCA@%$ALLOCA%g
6737s%@USE_NLS@%$USE_NLS%g
6738s%@MSGFMT@%$MSGFMT%g
6739s%@GMSGFMT@%$GMSGFMT%g
6740s%@XGETTEXT@%$XGETTEXT%g
6741s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6742s%@CATALOGS@%$CATALOGS%g
6743s%@CATOBJEXT@%$CATOBJEXT%g
6744s%@DATADIRNAME@%$DATADIRNAME%g
6745s%@GMOFILES@%$GMOFILES%g
6746s%@INSTOBJEXT@%$INSTOBJEXT%g
6747s%@INTLDEPS@%$INTLDEPS%g
6748s%@INTLLIBS@%$INTLLIBS%g
6749s%@INTLOBJS@%$INTLOBJS%g
6750s%@POFILES@%$POFILES%g
6751s%@POSUB@%$POSUB%g
6752s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6753s%@GT_NO@%$GT_NO%g
6754s%@GT_YES@%$GT_YES%g
6755s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6756s%@l@%$l%g
6757s%@HDEFINES@%$HDEFINES%g
6758s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g
6759s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g
6760s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g
6761s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g
6762s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
6763s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
6764s%@COREFILE@%$COREFILE%g
6765s%@COREFLAG@%$COREFLAG%g
6766s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
6767s%@WIN32LIBADD@%$WIN32LIBADD%g
6768s%@TDEFINES@%$TDEFINES%g
6769s%@wordsize@%$wordsize%g
6770s%@bfd_libs@%$bfd_libs%g
6771s%@all_backends@%$all_backends%g
6772s%@bfd_backends@%$bfd_backends%g
6773s%@bfd_machines@%$bfd_machines%g
6774s%@bfd_default_target_size@%$bfd_default_target_size%g
6775s%@tdefaults@%$tdefaults%g
6776
6777CEOF
6778EOF
6779
6780cat >> $CONFIG_STATUS <<\EOF
6781
6782# Split the substitutions into bite-sized pieces for seds with
6783# small command number limits, like on Digital OSF/1 and HP-UX.
6784ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6785ac_file=1 # Number of current file.
6786ac_beg=1 # First line for current file.
6787ac_end=$ac_max_sed_cmds # Line after last line for current file.
6788ac_more_lines=:
6789ac_sed_cmds=""
6790while $ac_more_lines; do
6791  if test $ac_beg -gt 1; then
6792    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6793  else
6794    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6795  fi
6796  if test ! -s conftest.s$ac_file; then
6797    ac_more_lines=false
6798    rm -f conftest.s$ac_file
6799  else
6800    if test -z "$ac_sed_cmds"; then
6801      ac_sed_cmds="sed -f conftest.s$ac_file"
6802    else
6803      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6804    fi
6805    ac_file=`expr $ac_file + 1`
6806    ac_beg=$ac_end
6807    ac_end=`expr $ac_end + $ac_max_sed_cmds`
6808  fi
6809done
6810if test -z "$ac_sed_cmds"; then
6811  ac_sed_cmds=cat
6812fi
6813EOF
6814
6815cat >> $CONFIG_STATUS <<EOF
6816
6817CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"}
6818EOF
6819cat >> $CONFIG_STATUS <<\EOF
6820for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6821  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6822  case "$ac_file" in
6823  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6824       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6825  *) ac_file_in="${ac_file}.in" ;;
6826  esac
6827
6828  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6829
6830  # Remove last slash and all that follows it.  Not all systems have dirname.
6831  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6832  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6833    # The file is in a subdirectory.
6834    test ! -d "$ac_dir" && mkdir "$ac_dir"
6835    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6836    # A "../" for each directory in $ac_dir_suffix.
6837    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6838  else
6839    ac_dir_suffix= ac_dots=
6840  fi
6841
6842  case "$ac_given_srcdir" in
6843  .)  srcdir=.
6844      if test -z "$ac_dots"; then top_srcdir=.
6845      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6846  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6847  *) # Relative path.
6848    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6849    top_srcdir="$ac_dots$ac_given_srcdir" ;;
6850  esac
6851
6852  case "$ac_given_INSTALL" in
6853  [/$]*) INSTALL="$ac_given_INSTALL" ;;
6854  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6855  esac
6856
6857  echo creating "$ac_file"
6858  rm -f "$ac_file"
6859  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6860  case "$ac_file" in
6861  *Makefile*) ac_comsub="1i\\
6862# $configure_input" ;;
6863  *) ac_comsub= ;;
6864  esac
6865
6866  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6867  sed -e "$ac_comsub
6868s%@configure_input@%$configure_input%g
6869s%@srcdir@%$srcdir%g
6870s%@top_srcdir@%$top_srcdir%g
6871s%@INSTALL@%$INSTALL%g
6872" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6873fi; done
6874rm -f conftest.s*
6875
6876# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6877# NAME is the cpp macro being defined and VALUE is the value it is being given.
6878#
6879# ac_d sets the value in "#define NAME VALUE" lines.
6880ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
6881ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
6882ac_dC='\3'
6883ac_dD='%g'
6884# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6885ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
6886ac_uB='\([ 	]\)%\1#\2define\3'
6887ac_uC=' '
6888ac_uD='\4%g'
6889# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6890ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
6891ac_eB='$%\1#\2define\3'
6892ac_eC=' '
6893ac_eD='%g'
6894
6895if test "${CONFIG_HEADERS+set}" != set; then
6896EOF
6897cat >> $CONFIG_STATUS <<EOF
6898  CONFIG_HEADERS="config.h:config.in"
6899EOF
6900cat >> $CONFIG_STATUS <<\EOF
6901fi
6902for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6903  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6904  case "$ac_file" in
6905  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6906       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6907  *) ac_file_in="${ac_file}.in" ;;
6908  esac
6909
6910  echo creating $ac_file
6911
6912  rm -f conftest.frag conftest.in conftest.out
6913  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6914  cat $ac_file_inputs > conftest.in
6915
6916EOF
6917
6918# Transform confdefs.h into a sed script conftest.vals that substitutes
6919# the proper values into config.h.in to produce config.h.  And first:
6920# Protect against being on the right side of a sed subst in config.status.
6921# Protect against being in an unquoted here document in config.status.
6922rm -f conftest.vals
6923cat > conftest.hdr <<\EOF
6924s/[\\&%]/\\&/g
6925s%[\\$`]%\\&%g
6926s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6927s%ac_d%ac_u%gp
6928s%ac_u%ac_e%gp
6929EOF
6930sed -n -f conftest.hdr confdefs.h > conftest.vals
6931rm -f conftest.hdr
6932
6933# This sed command replaces #undef with comments.  This is necessary, for
6934# example, in the case of _POSIX_SOURCE, which is predefined and required
6935# on some systems where configure will not decide to define it.
6936cat >> conftest.vals <<\EOF
6937s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6938EOF
6939
6940# Break up conftest.vals because some shells have a limit on
6941# the size of here documents, and old seds have small limits too.
6942
6943rm -f conftest.tail
6944while :
6945do
6946  ac_lines=`grep -c . conftest.vals`
6947  # grep -c gives empty output for an empty file on some AIX systems.
6948  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6949  # Write a limited-size here document to conftest.frag.
6950  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6951  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6952  echo 'CEOF
6953  sed -f conftest.frag conftest.in > conftest.out
6954  rm -f conftest.in
6955  mv conftest.out conftest.in
6956' >> $CONFIG_STATUS
6957  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6958  rm -f conftest.vals
6959  mv conftest.tail conftest.vals
6960done
6961rm -f conftest.vals
6962
6963cat >> $CONFIG_STATUS <<\EOF
6964  rm -f conftest.frag conftest.h
6965  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6966  cat conftest.in >> conftest.h
6967  rm -f conftest.in
6968  if cmp -s $ac_file conftest.h 2>/dev/null; then
6969    echo "$ac_file is unchanged"
6970    rm -f conftest.h
6971  else
6972    # Remove last slash and all that follows it.  Not all systems have dirname.
6973      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6974      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6975      # The file is in a subdirectory.
6976      test ! -d "$ac_dir" && mkdir "$ac_dir"
6977    fi
6978    rm -f $ac_file
6979    mv conftest.h $ac_file
6980  fi
6981fi; done
6982
6983EOF
6984cat >> $CONFIG_STATUS <<EOF
6985
6986
6987EOF
6988cat >> $CONFIG_STATUS <<\EOF
6989test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6990sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile
6991exit 0
6992EOF
6993chmod +x $CONFIG_STATUS
6994rm -fr confdefs* $ac_clean_files
6995test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6996
6997
6998