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