OSDN Git Service

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