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