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