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