OSDN Git Service

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