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