New translation: Kinyarwanda
[platform/upstream/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 unistd.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 /* This mess was copied from the GNU getpagesize.h.  */
3439 #ifndef HAVE_GETPAGESIZE
3440 # ifdef HAVE_UNISTD_H
3441 #  include <unistd.h>
3442 # endif
3443
3444 /* Assume that all systems that can run configure have sys/param.h.  */
3445 # ifndef HAVE_SYS_PARAM_H
3446 #  define HAVE_SYS_PARAM_H 1
3447 # endif
3448
3449 # ifdef _SC_PAGESIZE
3450 #  define getpagesize() sysconf(_SC_PAGESIZE)
3451 # else /* no _SC_PAGESIZE */
3452 #  ifdef HAVE_SYS_PARAM_H
3453 #   include <sys/param.h>
3454 #   ifdef EXEC_PAGESIZE
3455 #    define getpagesize() EXEC_PAGESIZE
3456 #   else /* no EXEC_PAGESIZE */
3457 #    ifdef NBPG
3458 #     define getpagesize() NBPG * CLSIZE
3459 #     ifndef CLSIZE
3460 #      define CLSIZE 1
3461 #     endif /* no CLSIZE */
3462 #    else /* no NBPG */
3463 #     ifdef NBPC
3464 #      define getpagesize() NBPC
3465 #     else /* no NBPC */
3466 #      ifdef PAGESIZE
3467 #       define getpagesize() PAGESIZE
3468 #      endif /* PAGESIZE */
3469 #     endif /* no NBPC */
3470 #    endif /* no NBPG */
3471 #   endif /* no EXEC_PAGESIZE */
3472 #  else /* no HAVE_SYS_PARAM_H */
3473 #   define getpagesize() 8192   /* punt totally */
3474 #  endif /* no HAVE_SYS_PARAM_H */
3475 # endif /* no _SC_PAGESIZE */
3476
3477 #endif /* no HAVE_GETPAGESIZE */
3478
3479 #ifdef __cplusplus
3480 extern "C" { void *malloc(unsigned); }
3481 #else
3482 char *malloc();
3483 #endif
3484
3485 int
3486 main()
3487 {
3488         char *data, *data2, *data3;
3489         int i, pagesize;
3490         int fd;
3491
3492         pagesize = getpagesize();
3493
3494         /*
3495          * First, make a file with some known garbage in it.
3496          */
3497         data = malloc(pagesize);
3498         if (!data)
3499                 exit(1);
3500         for (i = 0; i < pagesize; ++i)
3501                 *(data + i) = rand();
3502         umask(0);
3503         fd = creat("conftestmmap", 0600);
3504         if (fd < 0)
3505                 exit(1);
3506         if (write(fd, data, pagesize) != pagesize)
3507                 exit(1);
3508         close(fd);
3509
3510         /*
3511          * Next, try to mmap the file at a fixed address which
3512          * already has something else allocated at it.  If we can,
3513          * also make sure that we see the same garbage.
3514          */
3515         fd = open("conftestmmap", O_RDWR);
3516         if (fd < 0)
3517                 exit(1);
3518         data2 = malloc(2 * pagesize);
3519         if (!data2)
3520                 exit(1);
3521         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3522         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3523             MAP_PRIVATE | MAP_FIXED, fd, 0L))
3524                 exit(1);
3525         for (i = 0; i < pagesize; ++i)
3526                 if (*(data + i) != *(data2 + i))
3527                         exit(1);
3528
3529         /*
3530          * Finally, make sure that changes to the mapped area
3531          * do not percolate back to the file as seen by read().
3532          * (This is a bug on some variants of i386 svr4.0.)
3533          */
3534         for (i = 0; i < pagesize; ++i)
3535                 *(data2 + i) = *(data2 + i) + 1;
3536         data3 = malloc(pagesize);
3537         if (!data3)
3538                 exit(1);
3539         if (read(fd, data3, pagesize) != pagesize)
3540                 exit(1);
3541         for (i = 0; i < pagesize; ++i)
3542                 if (*(data + i) != *(data3 + i))
3543                         exit(1);
3544         close(fd);
3545         unlink("conftestmmap");
3546         exit(0);
3547 }
3548
3549 EOF
3550 if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3551 then
3552   ac_cv_func_mmap_fixed_mapped=yes
3553 else
3554   echo "configure: failed program was:" >&5
3555   cat conftest.$ac_ext >&5
3556   rm -fr conftest*
3557   ac_cv_func_mmap_fixed_mapped=no
3558 fi
3559 rm -fr conftest*
3560 fi
3561
3562 fi
3563
3564 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3565 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3566   cat >> confdefs.h <<\EOF
3567 #define HAVE_MMAP 1
3568 EOF
3569
3570 fi
3571
3572                               
3573    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3574 unistd.h values.h sys/param.h
3575 do
3576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3578 echo "configure:3579: checking for $ac_hdr" >&5
3579 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   cat > conftest.$ac_ext <<EOF
3583 #line 3584 "configure"
3584 #include "confdefs.h"
3585 #include <$ac_hdr>
3586 EOF
3587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3588 { (eval echo configure:3589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3590 if test -z "$ac_err"; then
3591   rm -rf conftest*
3592   eval "ac_cv_header_$ac_safe=yes"
3593 else
3594   echo "$ac_err" >&5
3595   echo "configure: failed program was:" >&5
3596   cat conftest.$ac_ext >&5
3597   rm -rf conftest*
3598   eval "ac_cv_header_$ac_safe=no"
3599 fi
3600 rm -f conftest*
3601 fi
3602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3603   echo "$ac_t""yes" 1>&6
3604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3605   cat >> confdefs.h <<EOF
3606 #define $ac_tr_hdr 1
3607 EOF
3608  
3609 else
3610   echo "$ac_t""no" 1>&6
3611 fi
3612 done
3613
3614    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3615 __argz_count __argz_stringify __argz_next
3616 do
3617 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3618 echo "configure:3619: checking for $ac_func" >&5
3619 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3620   echo $ac_n "(cached) $ac_c" 1>&6
3621 else
3622   cat > conftest.$ac_ext <<EOF
3623 #line 3624 "configure"
3624 #include "confdefs.h"
3625 /* System header to define __stub macros and hopefully few prototypes,
3626     which can conflict with char $ac_func(); below.  */
3627 #include <assert.h>
3628 /* Override any gcc2 internal prototype to avoid an error.  */
3629 /* We use char because int might match the return type of a gcc2
3630     builtin and then its argument prototype would still apply.  */
3631 char $ac_func();
3632
3633 int main() {
3634
3635 /* The GNU C library defines this for functions which it implements
3636     to always fail with ENOSYS.  Some functions are actually named
3637     something starting with __ and the normal name is an alias.  */
3638 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3639 choke me
3640 #else
3641 $ac_func();
3642 #endif
3643
3644 ; return 0; }
3645 EOF
3646 if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3647   rm -rf conftest*
3648   eval "ac_cv_func_$ac_func=yes"
3649 else
3650   echo "configure: failed program was:" >&5
3651   cat conftest.$ac_ext >&5
3652   rm -rf conftest*
3653   eval "ac_cv_func_$ac_func=no"
3654 fi
3655 rm -f conftest*
3656 fi
3657
3658 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3659   echo "$ac_t""yes" 1>&6
3660     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3661   cat >> confdefs.h <<EOF
3662 #define $ac_tr_func 1
3663 EOF
3664  
3665 else
3666   echo "$ac_t""no" 1>&6
3667 fi
3668 done
3669
3670
3671    if test "${ac_cv_func_stpcpy+set}" != "set"; then
3672      for ac_func in stpcpy
3673 do
3674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3675 echo "configure:3676: checking for $ac_func" >&5
3676 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3682 /* System header to define __stub macros and hopefully few prototypes,
3683     which can conflict with char $ac_func(); below.  */
3684 #include <assert.h>
3685 /* Override any gcc2 internal prototype to avoid an error.  */
3686 /* We use char because int might match the return type of a gcc2
3687     builtin and then its argument prototype would still apply.  */
3688 char $ac_func();
3689
3690 int main() {
3691
3692 /* The GNU C library defines this for functions which it implements
3693     to always fail with ENOSYS.  Some functions are actually named
3694     something starting with __ and the normal name is an alias.  */
3695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3696 choke me
3697 #else
3698 $ac_func();
3699 #endif
3700
3701 ; return 0; }
3702 EOF
3703 if { (eval echo configure:3704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3704   rm -rf conftest*
3705   eval "ac_cv_func_$ac_func=yes"
3706 else
3707   echo "configure: failed program was:" >&5
3708   cat conftest.$ac_ext >&5
3709   rm -rf conftest*
3710   eval "ac_cv_func_$ac_func=no"
3711 fi
3712 rm -f conftest*
3713 fi
3714
3715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3716   echo "$ac_t""yes" 1>&6
3717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3718   cat >> confdefs.h <<EOF
3719 #define $ac_tr_func 1
3720 EOF
3721  
3722 else
3723   echo "$ac_t""no" 1>&6
3724 fi
3725 done
3726
3727    fi
3728    if test "${ac_cv_func_stpcpy}" = "yes"; then
3729      cat >> confdefs.h <<\EOF
3730 #define HAVE_STPCPY 1
3731 EOF
3732
3733    fi
3734
3735    if test $ac_cv_header_locale_h = yes; then
3736     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3737 echo "configure:3738: checking for LC_MESSAGES" >&5
3738 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3739   echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741   cat > conftest.$ac_ext <<EOF
3742 #line 3743 "configure"
3743 #include "confdefs.h"
3744 #include <locale.h>
3745 int main() {
3746 return LC_MESSAGES
3747 ; return 0; }
3748 EOF
3749 if { (eval echo configure:3750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3750   rm -rf conftest*
3751   am_cv_val_LC_MESSAGES=yes
3752 else
3753   echo "configure: failed program was:" >&5
3754   cat conftest.$ac_ext >&5
3755   rm -rf conftest*
3756   am_cv_val_LC_MESSAGES=no
3757 fi
3758 rm -f conftest*
3759 fi
3760
3761 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3762     if test $am_cv_val_LC_MESSAGES = yes; then
3763       cat >> confdefs.h <<\EOF
3764 #define HAVE_LC_MESSAGES 1
3765 EOF
3766
3767     fi
3768   fi
3769    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3770 echo "configure:3771: checking whether NLS is requested" >&5
3771         # Check whether --enable-nls or --disable-nls was given.
3772 if test "${enable_nls+set}" = set; then
3773   enableval="$enable_nls"
3774   USE_NLS=$enableval
3775 else
3776   USE_NLS=yes
3777 fi
3778
3779     echo "$ac_t""$USE_NLS" 1>&6
3780     
3781
3782     USE_INCLUDED_LIBINTL=no
3783
3784         if test "$USE_NLS" = "yes"; then
3785       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3786 echo "configure:3787: checking whether included gettext is requested" >&5
3787       # Check whether --with-included-gettext or --without-included-gettext was given.
3788 if test "${with_included_gettext+set}" = set; then
3789   withval="$with_included_gettext"
3790   nls_cv_force_use_gnu_gettext=$withval
3791 else
3792   nls_cv_force_use_gnu_gettext=no
3793 fi
3794
3795       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3796
3797       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3798       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3799                                         nls_cv_header_intl=
3800         nls_cv_header_libgt=
3801         CATOBJEXT=
3802
3803         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3804 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3805 echo "configure:3806: checking for libintl.h" >&5
3806 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   cat > conftest.$ac_ext <<EOF
3810 #line 3811 "configure"
3811 #include "confdefs.h"
3812 #include <libintl.h>
3813 EOF
3814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3815 { (eval echo configure:3816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3817 if test -z "$ac_err"; then
3818   rm -rf conftest*
3819   eval "ac_cv_header_$ac_safe=yes"
3820 else
3821   echo "$ac_err" >&5
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824   rm -rf conftest*
3825   eval "ac_cv_header_$ac_safe=no"
3826 fi
3827 rm -f conftest*
3828 fi
3829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3830   echo "$ac_t""yes" 1>&6
3831   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3832 echo "configure:3833: checking for gettext in libc" >&5
3833 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3834   echo $ac_n "(cached) $ac_c" 1>&6
3835 else
3836   cat > conftest.$ac_ext <<EOF
3837 #line 3838 "configure"
3838 #include "confdefs.h"
3839 #include <libintl.h>
3840 int main() {
3841 return (int) gettext ("")
3842 ; return 0; }
3843 EOF
3844 if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3845   rm -rf conftest*
3846   gt_cv_func_gettext_libc=yes
3847 else
3848   echo "configure: failed program was:" >&5
3849   cat conftest.$ac_ext >&5
3850   rm -rf conftest*
3851   gt_cv_func_gettext_libc=no
3852 fi
3853 rm -f conftest*
3854 fi
3855
3856 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3857
3858            if test "$gt_cv_func_gettext_libc" != "yes"; then
3859              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3860 echo "configure:3861: checking for bindtextdomain in -lintl" >&5
3861 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3862 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   ac_save_LIBS="$LIBS"
3866 LIBS="-lintl  $LIBS"
3867 cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870 /* Override any gcc2 internal prototype to avoid an error.  */
3871 /* We use char because int might match the return type of a gcc2
3872     builtin and then its argument prototype would still apply.  */
3873 char bindtextdomain();
3874
3875 int main() {
3876 bindtextdomain()
3877 ; return 0; }
3878 EOF
3879 if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3880   rm -rf conftest*
3881   eval "ac_cv_lib_$ac_lib_var=yes"
3882 else
3883   echo "configure: failed program was:" >&5
3884   cat conftest.$ac_ext >&5
3885   rm -rf conftest*
3886   eval "ac_cv_lib_$ac_lib_var=no"
3887 fi
3888 rm -f conftest*
3889 LIBS="$ac_save_LIBS"
3890
3891 fi
3892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3893   echo "$ac_t""yes" 1>&6
3894   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3895 echo "configure:3896: checking for gettext in libintl" >&5
3896 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3897   echo $ac_n "(cached) $ac_c" 1>&6
3898 else
3899   cat > conftest.$ac_ext <<EOF
3900 #line 3901 "configure"
3901 #include "confdefs.h"
3902
3903 int main() {
3904 return (int) gettext ("")
3905 ; return 0; }
3906 EOF
3907 if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3908   rm -rf conftest*
3909   gt_cv_func_gettext_libintl=yes
3910 else
3911   echo "configure: failed program was:" >&5
3912   cat conftest.$ac_ext >&5
3913   rm -rf conftest*
3914   gt_cv_func_gettext_libintl=no
3915 fi
3916 rm -f conftest*
3917 fi
3918
3919 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3920 else
3921   echo "$ac_t""no" 1>&6
3922 fi
3923
3924            fi
3925
3926            if test "$gt_cv_func_gettext_libc" = "yes" \
3927               || test "$gt_cv_func_gettext_libintl" = "yes"; then
3928               cat >> confdefs.h <<\EOF
3929 #define HAVE_GETTEXT 1
3930 EOF
3931
3932               # Extract the first word of "msgfmt", so it can be a program name with args.
3933 set dummy msgfmt; ac_word=$2
3934 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3935 echo "configure:3936: checking for $ac_word" >&5
3936 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3937   echo $ac_n "(cached) $ac_c" 1>&6
3938 else
3939   case "$MSGFMT" in
3940   /*)
3941   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3942   ;;
3943   *)
3944   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3945   for ac_dir in $PATH; do
3946     test -z "$ac_dir" && ac_dir=.
3947     if test -f $ac_dir/$ac_word; then
3948       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3949         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3950         break
3951       fi
3952     fi
3953   done
3954   IFS="$ac_save_ifs"
3955   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3956   ;;
3957 esac
3958 fi
3959 MSGFMT="$ac_cv_path_MSGFMT"
3960 if test -n "$MSGFMT"; then
3961   echo "$ac_t""$MSGFMT" 1>&6
3962 else
3963   echo "$ac_t""no" 1>&6
3964 fi
3965               if test "$MSGFMT" != "no"; then
3966                 for ac_func in dcgettext
3967 do
3968 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3969 echo "configure:3970: checking for $ac_func" >&5
3970 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3971   echo $ac_n "(cached) $ac_c" 1>&6
3972 else
3973   cat > conftest.$ac_ext <<EOF
3974 #line 3975 "configure"
3975 #include "confdefs.h"
3976 /* System header to define __stub macros and hopefully few prototypes,
3977     which can conflict with char $ac_func(); below.  */
3978 #include <assert.h>
3979 /* Override any gcc2 internal prototype to avoid an error.  */
3980 /* We use char because int might match the return type of a gcc2
3981     builtin and then its argument prototype would still apply.  */
3982 char $ac_func();
3983
3984 int main() {
3985
3986 /* The GNU C library defines this for functions which it implements
3987     to always fail with ENOSYS.  Some functions are actually named
3988     something starting with __ and the normal name is an alias.  */
3989 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3990 choke me
3991 #else
3992 $ac_func();
3993 #endif
3994
3995 ; return 0; }
3996 EOF
3997 if { (eval echo configure:3998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3998   rm -rf conftest*
3999   eval "ac_cv_func_$ac_func=yes"
4000 else
4001   echo "configure: failed program was:" >&5
4002   cat conftest.$ac_ext >&5
4003   rm -rf conftest*
4004   eval "ac_cv_func_$ac_func=no"
4005 fi
4006 rm -f conftest*
4007 fi
4008
4009 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4010   echo "$ac_t""yes" 1>&6
4011     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4012   cat >> confdefs.h <<EOF
4013 #define $ac_tr_func 1
4014 EOF
4015  
4016 else
4017   echo "$ac_t""no" 1>&6
4018 fi
4019 done
4020
4021                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
4022 set dummy gmsgfmt; ac_word=$2
4023 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4024 echo "configure:4025: checking for $ac_word" >&5
4025 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4026   echo $ac_n "(cached) $ac_c" 1>&6
4027 else
4028   case "$GMSGFMT" in
4029   /*)
4030   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4031   ;;
4032   ?:/*)                  
4033   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4034   ;;
4035   *)
4036   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4037   ac_dummy="$PATH"
4038   for ac_dir in $ac_dummy; do 
4039     test -z "$ac_dir" && ac_dir=.
4040     if test -f $ac_dir/$ac_word; then
4041       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4042       break
4043     fi
4044   done
4045   IFS="$ac_save_ifs"
4046   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4047   ;;
4048 esac
4049 fi
4050 GMSGFMT="$ac_cv_path_GMSGFMT"
4051 if test -n "$GMSGFMT"; then
4052   echo "$ac_t""$GMSGFMT" 1>&6
4053 else
4054   echo "$ac_t""no" 1>&6
4055 fi
4056
4057                 # Extract the first word of "xgettext", so it can be a program name with args.
4058 set dummy xgettext; ac_word=$2
4059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4060 echo "configure:4061: checking for $ac_word" >&5
4061 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4062   echo $ac_n "(cached) $ac_c" 1>&6
4063 else
4064   case "$XGETTEXT" in
4065   /*)
4066   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4067   ;;
4068   *)
4069   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4070   for ac_dir in $PATH; do
4071     test -z "$ac_dir" && ac_dir=.
4072     if test -f $ac_dir/$ac_word; then
4073       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4074         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4075         break
4076       fi
4077     fi
4078   done
4079   IFS="$ac_save_ifs"
4080   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4081   ;;
4082 esac
4083 fi
4084 XGETTEXT="$ac_cv_path_XGETTEXT"
4085 if test -n "$XGETTEXT"; then
4086   echo "$ac_t""$XGETTEXT" 1>&6
4087 else
4088   echo "$ac_t""no" 1>&6
4089 fi
4090
4091                 cat > conftest.$ac_ext <<EOF
4092 #line 4093 "configure"
4093 #include "confdefs.h"
4094
4095 int main() {
4096 extern int _nl_msg_cat_cntr;
4097                                return _nl_msg_cat_cntr
4098 ; return 0; }
4099 EOF
4100 if { (eval echo configure:4101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4101   rm -rf conftest*
4102   CATOBJEXT=.gmo
4103                    DATADIRNAME=share
4104 else
4105   echo "configure: failed program was:" >&5
4106   cat conftest.$ac_ext >&5
4107   rm -rf conftest*
4108   CATOBJEXT=.mo
4109                    DATADIRNAME=lib
4110 fi
4111 rm -f conftest*
4112                 INSTOBJEXT=.mo
4113               fi
4114             fi
4115         
4116 else
4117   echo "$ac_t""no" 1>&6
4118 fi
4119
4120
4121                 
4122         if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
4123           # Neither gettext nor catgets in included in the C library.
4124           # Fall back on GNU gettext library (assuming it is present).
4125           nls_cv_use_gnu_gettext=yes
4126         fi
4127       fi
4128
4129       if test "$nls_cv_use_gnu_gettext" = "yes"; then
4130                 INTLOBJS="\$(GETTOBJS)"
4131         # Extract the first word of "msgfmt", so it can be a program name with args.
4132 set dummy msgfmt; ac_word=$2
4133 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4134 echo "configure:4135: checking for $ac_word" >&5
4135 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
4136   echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138   case "$MSGFMT" in
4139   /*)
4140   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
4141   ;;
4142   *)
4143   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4144   for ac_dir in $PATH; do
4145     test -z "$ac_dir" && ac_dir=.
4146     if test -f $ac_dir/$ac_word; then
4147       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
4148         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
4149         break
4150       fi
4151     fi
4152   done
4153   IFS="$ac_save_ifs"
4154   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
4155   ;;
4156 esac
4157 fi
4158 MSGFMT="$ac_cv_path_MSGFMT"
4159 if test -n "$MSGFMT"; then
4160   echo "$ac_t""$MSGFMT" 1>&6
4161 else
4162   echo "$ac_t""no" 1>&6
4163 fi
4164
4165         # Extract the first word of "gmsgfmt", so it can be a program name with args.
4166 set dummy gmsgfmt; ac_word=$2
4167 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4168 echo "configure:4169: checking for $ac_word" >&5
4169 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
4170   echo $ac_n "(cached) $ac_c" 1>&6
4171 else
4172   case "$GMSGFMT" in
4173   /*)
4174   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
4175   ;;
4176   ?:/*)                  
4177   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
4178   ;;
4179   *)
4180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4181   ac_dummy="$PATH"
4182   for ac_dir in $ac_dummy; do 
4183     test -z "$ac_dir" && ac_dir=.
4184     if test -f $ac_dir/$ac_word; then
4185       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
4186       break
4187     fi
4188   done
4189   IFS="$ac_save_ifs"
4190   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
4191   ;;
4192 esac
4193 fi
4194 GMSGFMT="$ac_cv_path_GMSGFMT"
4195 if test -n "$GMSGFMT"; then
4196   echo "$ac_t""$GMSGFMT" 1>&6
4197 else
4198   echo "$ac_t""no" 1>&6
4199 fi
4200
4201         # Extract the first word of "xgettext", so it can be a program name with args.
4202 set dummy xgettext; ac_word=$2
4203 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4204 echo "configure:4205: checking for $ac_word" >&5
4205 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
4206   echo $ac_n "(cached) $ac_c" 1>&6
4207 else
4208   case "$XGETTEXT" in
4209   /*)
4210   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
4211   ;;
4212   *)
4213   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4214   for ac_dir in $PATH; do
4215     test -z "$ac_dir" && ac_dir=.
4216     if test -f $ac_dir/$ac_word; then
4217       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
4218         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
4219         break
4220       fi
4221     fi
4222   done
4223   IFS="$ac_save_ifs"
4224   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
4225   ;;
4226 esac
4227 fi
4228 XGETTEXT="$ac_cv_path_XGETTEXT"
4229 if test -n "$XGETTEXT"; then
4230   echo "$ac_t""$XGETTEXT" 1>&6
4231 else
4232   echo "$ac_t""no" 1>&6
4233 fi
4234
4235         
4236         USE_INCLUDED_LIBINTL=yes
4237         CATOBJEXT=.gmo
4238         INSTOBJEXT=.mo
4239         DATADIRNAME=share
4240         INTLDEPS='$(top_builddir)/../intl/libintl.a'
4241         INTLLIBS=$INTLDEPS
4242         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
4243         nls_cv_header_intl=libintl.h
4244         nls_cv_header_libgt=libgettext.h
4245       fi
4246
4247             if test "$XGETTEXT" != ":"; then
4248                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
4249           : ;
4250         else
4251           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
4252           XGETTEXT=":"
4253         fi
4254       fi
4255
4256       # We need to process the po/ directory.
4257       POSUB=po
4258     else
4259       DATADIRNAME=share
4260       nls_cv_header_intl=libintl.h
4261       nls_cv_header_libgt=libgettext.h
4262     fi
4263
4264     # If this is used in GNU gettext we have to set USE_NLS to `yes'
4265     # because some of the sources are only built for this goal.
4266     if test "$PACKAGE" = gettext; then
4267       USE_NLS=yes
4268       USE_INCLUDED_LIBINTL=yes
4269     fi
4270
4271                 for lang in $ALL_LINGUAS; do
4272       GMOFILES="$GMOFILES $lang.gmo"
4273       POFILES="$POFILES $lang.po"
4274     done
4275
4276         
4277     
4278     
4279     
4280     
4281     
4282     
4283     
4284     
4285     
4286     
4287     if test "x$CATOBJEXT" != "x"; then
4288       cat >> confdefs.h <<\EOF
4289 #define ENABLE_NLS 1
4290 EOF
4291
4292     fi
4293   
4294
4295    if test "x$CATOBJEXT" != "x"; then
4296      if test "x$ALL_LINGUAS" = "x"; then
4297        LINGUAS=
4298      else
4299        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
4300 echo "configure:4301: checking for catalogs to be installed" >&5
4301        NEW_LINGUAS=
4302        for lang in ${LINGUAS=$ALL_LINGUAS}; do
4303          case "$ALL_LINGUAS" in
4304           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
4305          esac
4306        done
4307        LINGUAS=$NEW_LINGUAS
4308        echo "$ac_t""$LINGUAS" 1>&6
4309      fi
4310
4311           if test -n "$LINGUAS"; then
4312        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
4313      fi
4314    fi
4315
4316             if test $ac_cv_header_locale_h = yes; then
4317      INCLUDE_LOCALE_H="#include <locale.h>"
4318    else
4319      INCLUDE_LOCALE_H="\
4320 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
4321    fi
4322    
4323
4324             if test -f $srcdir/po2tbl.sed.in; then
4325       if test "$CATOBJEXT" = ".cat"; then
4326          ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
4327 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
4328 echo "configure:4329: checking for linux/version.h" >&5
4329 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4330   echo $ac_n "(cached) $ac_c" 1>&6
4331 else
4332   cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 #include <linux/version.h>
4336 EOF
4337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4338 { (eval echo configure:4339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4340 if test -z "$ac_err"; then
4341   rm -rf conftest*
4342   eval "ac_cv_header_$ac_safe=yes"
4343 else
4344   echo "$ac_err" >&5
4345   echo "configure: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   rm -rf conftest*
4348   eval "ac_cv_header_$ac_safe=no"
4349 fi
4350 rm -f conftest*
4351 fi
4352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4353   echo "$ac_t""yes" 1>&6
4354   msgformat=linux
4355 else
4356   echo "$ac_t""no" 1>&6
4357 msgformat=xopen
4358 fi
4359
4360
4361                          sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4362       fi
4363             sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4364          $srcdir/po2tbl.sed.in > po2tbl.sed
4365    fi
4366
4367             if test "$PACKAGE" = "gettext"; then
4368      GT_NO="#NO#"
4369      GT_YES=
4370    else
4371      GT_NO=
4372      GT_YES="#YES#"
4373    fi
4374    
4375    
4376
4377    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4378    
4379
4380       l=
4381    
4382
4383             if test -f $srcdir/po/POTFILES.in; then
4384       test -d po || mkdir po
4385       if test "x$srcdir" != "x."; then
4386          if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4387             posrcprefix="$srcdir/"
4388          else
4389             posrcprefix="../$srcdir/"
4390          fi
4391       else
4392          posrcprefix="../"
4393       fi
4394       rm -f po/POTFILES
4395       sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4396          < $srcdir/po/POTFILES.in > po/POTFILES
4397    fi
4398   
4399
4400 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4401 echo "configure:4402: checking whether to enable maintainer-specific portions of Makefiles" >&5
4402     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4403 if test "${enable_maintainer_mode+set}" = set; then
4404   enableval="$enable_maintainer_mode"
4405   USE_MAINTAINER_MODE=$enableval
4406 else
4407   USE_MAINTAINER_MODE=no
4408 fi
4409
4410   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4411   
4412
4413 if test $USE_MAINTAINER_MODE = yes; then
4414   MAINTAINER_MODE_TRUE=
4415   MAINTAINER_MODE_FALSE='#'
4416 else
4417   MAINTAINER_MODE_TRUE='#'
4418   MAINTAINER_MODE_FALSE=
4419 fi
4420   MAINT=$MAINTAINER_MODE_TRUE
4421   
4422
4423
4424
4425 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4426 echo "configure:4427: checking for executable suffix" >&5
4427 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4428   echo $ac_n "(cached) $ac_c" 1>&6
4429 else
4430   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4431   ac_cv_exeext=.exe
4432 else
4433   rm -f conftest*
4434   echo 'int main () { return 0; }' > conftest.$ac_ext
4435   ac_cv_exeext=
4436   if { (eval echo configure:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4437     for file in conftest.*; do
4438       case $file in
4439       *.c | *.o | *.obj) ;;
4440       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4441       esac
4442     done
4443   else
4444     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4445   fi
4446   rm -f conftest*
4447   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4448 fi
4449 fi
4450
4451 EXEEXT=""
4452 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4453 echo "$ac_t""${ac_cv_exeext}" 1>&6
4454 ac_exeext=$EXEEXT
4455
4456 if test -n "$EXEEXT"; then
4457   cat >> confdefs.h <<\EOF
4458 #define HAVE_EXECUTABLE_SUFFIX 1
4459 EOF
4460
4461 fi
4462 cat >> confdefs.h <<EOF
4463 #define EXECUTABLE_SUFFIX "${EXEEXT}"
4464 EOF
4465
4466
4467 # host-specific stuff:
4468
4469 HDEFINES=
4470
4471 . ${srcdir}/../bfd/configure.host
4472
4473
4474 AR=${AR-ar}
4475
4476 # Extract the first word of "ranlib", so it can be a program name with args.
4477 set dummy ranlib; ac_word=$2
4478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4479 echo "configure:4480: checking for $ac_word" >&5
4480 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4481   echo $ac_n "(cached) $ac_c" 1>&6
4482 else
4483   if test -n "$RANLIB"; then
4484   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4485 else
4486   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4487   ac_dummy="$PATH"
4488   for ac_dir in $ac_dummy; do
4489     test -z "$ac_dir" && ac_dir=.
4490     if test -f $ac_dir/$ac_word; then
4491       ac_cv_prog_RANLIB="ranlib"
4492       break
4493     fi
4494   done
4495   IFS="$ac_save_ifs"
4496   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4497 fi
4498 fi
4499 RANLIB="$ac_cv_prog_RANLIB"
4500 if test -n "$RANLIB"; then
4501   echo "$ac_t""$RANLIB" 1>&6
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505
4506 # Find a good install program.  We prefer a C program (faster),
4507 # so one script is as good as another.  But avoid the broken or
4508 # incompatible versions:
4509 # SysV /etc/install, /usr/sbin/install
4510 # SunOS /usr/etc/install
4511 # IRIX /sbin/install
4512 # AIX /bin/install
4513 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4514 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4515 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4516 # ./install, which can be erroneously created by make from ./install.sh.
4517 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4518 echo "configure:4519: checking for a BSD compatible install" >&5
4519 if test -z "$INSTALL"; then
4520 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4521   echo $ac_n "(cached) $ac_c" 1>&6
4522 else
4523     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
4524   for ac_dir in $PATH; do
4525     # Account for people who put trailing slashes in PATH elements.
4526     case "$ac_dir/" in
4527     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4528     *)
4529       # OSF1 and SCO ODT 3.0 have their own names for install.
4530       # Don't use installbsd from OSF since it installs stuff as root
4531       # by default.
4532       for ac_prog in ginstall scoinst install; do
4533         if test -f $ac_dir/$ac_prog; then
4534           if test $ac_prog = install &&
4535             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4536             # AIX install.  It has an incompatible calling convention.
4537             :
4538           else
4539             ac_cv_path_install="$ac_dir/$ac_prog -c"
4540             break 2
4541           fi
4542         fi
4543       done
4544       ;;
4545     esac
4546   done
4547   IFS="$ac_save_IFS"
4548
4549 fi
4550   if test "${ac_cv_path_install+set}" = set; then
4551     INSTALL="$ac_cv_path_install"
4552   else
4553     # As a last resort, use the slow shell script.  We don't cache a
4554     # path for INSTALL within a source directory, because that will
4555     # break other packages using the cache if that directory is
4556     # removed, or if the path is relative.
4557     INSTALL="$ac_install_sh"
4558   fi
4559 fi
4560 echo "$ac_t""$INSTALL" 1>&6
4561
4562 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4563 # It thinks the first close brace ends the variable substitution.
4564 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4565
4566 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4567
4568 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4569
4570
4571 # Put a plausible default for CC_FOR_BUILD in Makefile.
4572 if test -z "$CC_FOR_BUILD"; then
4573   if test "x$cross_compiling" = "xno"; then
4574     CC_FOR_BUILD='$(CC)'
4575   else
4576     CC_FOR_BUILD=gcc
4577   fi
4578 fi
4579
4580 # Also set EXEEXT_FOR_BUILD.
4581 if test "x$cross_compiling" = "xno"; then
4582   EXEEXT_FOR_BUILD='$(EXEEXT)'
4583 else
4584   echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
4585 echo "configure:4586: checking for build system executable suffix" >&5
4586 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
4587   echo $ac_n "(cached) $ac_c" 1>&6
4588 else
4589   rm -f conftest*
4590      echo 'int main () { return 0; }' > conftest.c
4591      bfd_cv_build_exeext=
4592      ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
4593      for file in conftest.*; do
4594        case $file in
4595        *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4596        *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
4597        esac
4598      done
4599      rm -f conftest*
4600      test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
4601 fi
4602
4603 echo "$ac_t""$bfd_cv_build_exeext" 1>&6
4604   EXEEXT_FOR_BUILD=""
4605   test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4606 fi
4607
4608
4609 DEMANGLER_NAME=c++filt
4610 case "${host}" in
4611   *-*-go32* | *-*-msdos*)
4612     DEMANGLER_NAME=cxxfilt
4613 esac
4614
4615
4616 for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
4617 do
4618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4620 echo "configure:4621: checking for $ac_hdr" >&5
4621 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627 #include <$ac_hdr>
4628 EOF
4629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4630 { (eval echo configure:4631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4632 if test -z "$ac_err"; then
4633   rm -rf conftest*
4634   eval "ac_cv_header_$ac_safe=yes"
4635 else
4636   echo "$ac_err" >&5
4637   echo "configure: failed program was:" >&5
4638   cat conftest.$ac_ext >&5
4639   rm -rf conftest*
4640   eval "ac_cv_header_$ac_safe=no"
4641 fi
4642 rm -f conftest*
4643 fi
4644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4645   echo "$ac_t""yes" 1>&6
4646     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4647   cat >> confdefs.h <<EOF
4648 #define $ac_tr_hdr 1
4649 EOF
4650  
4651 else
4652   echo "$ac_t""no" 1>&6
4653 fi
4654 done
4655
4656 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4657 echo "configure:4658: checking for sys/wait.h that is POSIX.1 compatible" >&5
4658 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4659   echo $ac_n "(cached) $ac_c" 1>&6
4660 else
4661   cat > conftest.$ac_ext <<EOF
4662 #line 4663 "configure"
4663 #include "confdefs.h"
4664 #include <sys/types.h>
4665 #include <sys/wait.h>
4666 #ifndef WEXITSTATUS
4667 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4668 #endif
4669 #ifndef WIFEXITED
4670 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4671 #endif
4672 int main() {
4673 int s;
4674 wait (&s);
4675 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4676 ; return 0; }
4677 EOF
4678 if { (eval echo configure:4679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4679   rm -rf conftest*
4680   ac_cv_header_sys_wait_h=yes
4681 else
4682   echo "configure: failed program was:" >&5
4683   cat conftest.$ac_ext >&5
4684   rm -rf conftest*
4685   ac_cv_header_sys_wait_h=no
4686 fi
4687 rm -f conftest*
4688 fi
4689
4690 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4691 if test $ac_cv_header_sys_wait_h = yes; then
4692   cat >> confdefs.h <<\EOF
4693 #define HAVE_SYS_WAIT_H 1
4694 EOF
4695
4696 fi
4697
4698 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4699 # for constant arguments.  Useless!
4700 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4701 echo "configure:4702: checking for working alloca.h" >&5
4702 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4703   echo $ac_n "(cached) $ac_c" 1>&6
4704 else
4705   cat > conftest.$ac_ext <<EOF
4706 #line 4707 "configure"
4707 #include "confdefs.h"
4708 #include <alloca.h>
4709 int main() {
4710 char *p = alloca(2 * sizeof(int));
4711 ; return 0; }
4712 EOF
4713 if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4714   rm -rf conftest*
4715   ac_cv_header_alloca_h=yes
4716 else
4717   echo "configure: failed program was:" >&5
4718   cat conftest.$ac_ext >&5
4719   rm -rf conftest*
4720   ac_cv_header_alloca_h=no
4721 fi
4722 rm -f conftest*
4723 fi
4724
4725 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4726 if test $ac_cv_header_alloca_h = yes; then
4727   cat >> confdefs.h <<\EOF
4728 #define HAVE_ALLOCA_H 1
4729 EOF
4730
4731 fi
4732
4733 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4734 echo "configure:4735: checking for alloca" >&5
4735 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4736   echo $ac_n "(cached) $ac_c" 1>&6
4737 else
4738   cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741
4742 #ifdef __GNUC__
4743 # define alloca __builtin_alloca
4744 #else
4745 # ifdef _MSC_VER
4746 #  include <malloc.h>
4747 #  define alloca _alloca
4748 # else
4749 #  if HAVE_ALLOCA_H
4750 #   include <alloca.h>
4751 #  else
4752 #   ifdef _AIX
4753  #pragma alloca
4754 #   else
4755 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4756 char *alloca ();
4757 #    endif
4758 #   endif
4759 #  endif
4760 # endif
4761 #endif
4762
4763 int main() {
4764 char *p = (char *) alloca(1);
4765 ; return 0; }
4766 EOF
4767 if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4768   rm -rf conftest*
4769   ac_cv_func_alloca_works=yes
4770 else
4771   echo "configure: failed program was:" >&5
4772   cat conftest.$ac_ext >&5
4773   rm -rf conftest*
4774   ac_cv_func_alloca_works=no
4775 fi
4776 rm -f conftest*
4777 fi
4778
4779 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4780 if test $ac_cv_func_alloca_works = yes; then
4781   cat >> confdefs.h <<\EOF
4782 #define HAVE_ALLOCA 1
4783 EOF
4784
4785 fi
4786
4787 if test $ac_cv_func_alloca_works = no; then
4788   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4789   # that cause trouble.  Some versions do not even contain alloca or
4790   # contain a buggy version.  If you still want to use their alloca,
4791   # use ar to extract alloca.o from them instead of compiling alloca.c.
4792   ALLOCA=alloca.${ac_objext}
4793   cat >> confdefs.h <<\EOF
4794 #define C_ALLOCA 1
4795 EOF
4796
4797
4798 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4799 echo "configure:4800: checking whether alloca needs Cray hooks" >&5
4800 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   cat > conftest.$ac_ext <<EOF
4804 #line 4805 "configure"
4805 #include "confdefs.h"
4806 #if defined(CRAY) && ! defined(CRAY2)
4807 webecray
4808 #else
4809 wenotbecray
4810 #endif
4811
4812 EOF
4813 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4814   egrep "webecray" >/dev/null 2>&1; then
4815   rm -rf conftest*
4816   ac_cv_os_cray=yes
4817 else
4818   rm -rf conftest*
4819   ac_cv_os_cray=no
4820 fi
4821 rm -f conftest*
4822
4823 fi
4824
4825 echo "$ac_t""$ac_cv_os_cray" 1>&6
4826 if test $ac_cv_os_cray = yes; then
4827 for ac_func in _getb67 GETB67 getb67; do
4828   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4829 echo "configure:4830: checking for $ac_func" >&5
4830 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4831   echo $ac_n "(cached) $ac_c" 1>&6
4832 else
4833   cat > conftest.$ac_ext <<EOF
4834 #line 4835 "configure"
4835 #include "confdefs.h"
4836 /* System header to define __stub macros and hopefully few prototypes,
4837     which can conflict with char $ac_func(); below.  */
4838 #include <assert.h>
4839 /* Override any gcc2 internal prototype to avoid an error.  */
4840 /* We use char because int might match the return type of a gcc2
4841     builtin and then its argument prototype would still apply.  */
4842 char $ac_func();
4843
4844 int main() {
4845
4846 /* The GNU C library defines this for functions which it implements
4847     to always fail with ENOSYS.  Some functions are actually named
4848     something starting with __ and the normal name is an alias.  */
4849 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4850 choke me
4851 #else
4852 $ac_func();
4853 #endif
4854
4855 ; return 0; }
4856 EOF
4857 if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4858   rm -rf conftest*
4859   eval "ac_cv_func_$ac_func=yes"
4860 else
4861   echo "configure: failed program was:" >&5
4862   cat conftest.$ac_ext >&5
4863   rm -rf conftest*
4864   eval "ac_cv_func_$ac_func=no"
4865 fi
4866 rm -f conftest*
4867 fi
4868
4869 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4870   echo "$ac_t""yes" 1>&6
4871   cat >> confdefs.h <<EOF
4872 #define CRAY_STACKSEG_END $ac_func
4873 EOF
4874
4875   break
4876 else
4877   echo "$ac_t""no" 1>&6
4878 fi
4879
4880 done
4881 fi
4882
4883 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4884 echo "configure:4885: checking stack direction for C alloca" >&5
4885 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4886   echo $ac_n "(cached) $ac_c" 1>&6
4887 else
4888   if test "$cross_compiling" = yes; then
4889   ac_cv_c_stack_direction=0
4890 else
4891   cat > conftest.$ac_ext <<EOF
4892 #line 4893 "configure"
4893 #include "confdefs.h"
4894 find_stack_direction ()
4895 {
4896   static char *addr = 0;
4897   auto char dummy;
4898   if (addr == 0)
4899     {
4900       addr = &dummy;
4901       return find_stack_direction ();
4902     }
4903   else
4904     return (&dummy > addr) ? 1 : -1;
4905 }
4906 main ()
4907 {
4908   exit (find_stack_direction() < 0);
4909 }
4910 EOF
4911 if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4912 then
4913   ac_cv_c_stack_direction=1
4914 else
4915   echo "configure: failed program was:" >&5
4916   cat conftest.$ac_ext >&5
4917   rm -fr conftest*
4918   ac_cv_c_stack_direction=-1
4919 fi
4920 rm -fr conftest*
4921 fi
4922
4923 fi
4924
4925 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4926 cat >> confdefs.h <<EOF
4927 #define STACK_DIRECTION $ac_cv_c_stack_direction
4928 EOF
4929
4930 fi
4931
4932 for ac_func in sbrk utimes setmode getc_unlocked strcoll
4933 do
4934 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4935 echo "configure:4936: checking for $ac_func" >&5
4936 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4937   echo $ac_n "(cached) $ac_c" 1>&6
4938 else
4939   cat > conftest.$ac_ext <<EOF
4940 #line 4941 "configure"
4941 #include "confdefs.h"
4942 /* System header to define __stub macros and hopefully few prototypes,
4943     which can conflict with char $ac_func(); below.  */
4944 #include <assert.h>
4945 /* Override any gcc2 internal prototype to avoid an error.  */
4946 /* We use char because int might match the return type of a gcc2
4947     builtin and then its argument prototype would still apply.  */
4948 char $ac_func();
4949
4950 int main() {
4951
4952 /* The GNU C library defines this for functions which it implements
4953     to always fail with ENOSYS.  Some functions are actually named
4954     something starting with __ and the normal name is an alias.  */
4955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4956 choke me
4957 #else
4958 $ac_func();
4959 #endif
4960
4961 ; return 0; }
4962 EOF
4963 if { (eval echo configure:4964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4964   rm -rf conftest*
4965   eval "ac_cv_func_$ac_func=yes"
4966 else
4967   echo "configure: failed program was:" >&5
4968   cat conftest.$ac_ext >&5
4969   rm -rf conftest*
4970   eval "ac_cv_func_$ac_func=no"
4971 fi
4972 rm -f conftest*
4973 fi
4974
4975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4976   echo "$ac_t""yes" 1>&6
4977     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4978   cat >> confdefs.h <<EOF
4979 #define $ac_tr_func 1
4980 EOF
4981  
4982 else
4983   echo "$ac_t""no" 1>&6
4984 fi
4985 done
4986
4987
4988 # Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
4989 # needs to be defined for it
4990 echo $ac_n "checking for fopen64""... $ac_c" 1>&6
4991 echo "configure:4992: checking for fopen64" >&5
4992 if eval "test \"`echo '$''{'bu_cv_have_fopen64'+set}'`\" = set"; then
4993   echo $ac_n "(cached) $ac_c" 1>&6
4994 else
4995   cat > conftest.$ac_ext <<EOF
4996 #line 4997 "configure"
4997 #include "confdefs.h"
4998 #include <stdio.h>
4999 int main() {
5000 FILE *f = fopen64 ("/tmp/foo","r");
5001 ; return 0; }
5002 EOF
5003 if { (eval echo configure:5004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5004   rm -rf conftest*
5005   bu_cv_have_fopen64=yes
5006 else
5007   echo "configure: failed program was:" >&5
5008   cat conftest.$ac_ext >&5
5009   rm -rf conftest*
5010   saved_CPPFLAGS=$CPPFLAGS
5011  CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
5012  cat > conftest.$ac_ext <<EOF
5013 #line 5014 "configure"
5014 #include "confdefs.h"
5015 #include <stdio.h>
5016 int main() {
5017 FILE *f = fopen64 ("/tmp/foo","r");
5018 ; return 0; }
5019 EOF
5020 if { (eval echo configure:5021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5021   rm -rf conftest*
5022   bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE"
5023 else
5024   echo "configure: failed program was:" >&5
5025   cat conftest.$ac_ext >&5
5026   rm -rf conftest*
5027   bu_cv_have_fopen64=no
5028 fi
5029 rm -f conftest*
5030  CPPFLAGS=$saved_CPPFLAGS
5031 fi
5032 rm -f conftest*
5033 fi
5034
5035 echo "$ac_t""$bu_cv_have_fopen64" 1>&6
5036 if test "$bu_cv_have_fopen64" != no; then
5037   cat >> confdefs.h <<\EOF
5038 #define HAVE_FOPEN64 1
5039 EOF
5040
5041 fi
5042 echo $ac_n "checking for stat64""... $ac_c" 1>&6
5043 echo "configure:5044: checking for stat64" >&5
5044 if eval "test \"`echo '$''{'bu_cv_have_stat64'+set}'`\" = set"; then
5045   echo $ac_n "(cached) $ac_c" 1>&6
5046 else
5047   cat > conftest.$ac_ext <<EOF
5048 #line 5049 "configure"
5049 #include "confdefs.h"
5050 #include <sys/stat.h>
5051 int main() {
5052 struct stat64 st; stat64 ("/tmp/foo", &st);
5053 ; return 0; }
5054 EOF
5055 if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5056   rm -rf conftest*
5057   bu_cv_have_stat64=yes
5058 else
5059   echo "configure: failed program was:" >&5
5060   cat conftest.$ac_ext >&5
5061   rm -rf conftest*
5062   saved_CPPFLAGS=$CPPFLAGS
5063  CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
5064  cat > conftest.$ac_ext <<EOF
5065 #line 5066 "configure"
5066 #include "confdefs.h"
5067 #include <sys/stat.h>
5068 int main() {
5069 struct stat64 st; stat64 ("/tmp/foo", &st);
5070 ; return 0; }
5071 EOF
5072 if { (eval echo configure:5073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5073   rm -rf conftest*
5074   bu_cv_have_stat64="need -D_LARGEFILE64_SOURCE"
5075 else
5076   echo "configure: failed program was:" >&5
5077   cat conftest.$ac_ext >&5
5078   rm -rf conftest*
5079   bu_cv_have_stat64=no
5080 fi
5081 rm -f conftest*
5082  CPPFLAGS=$saved_CPPFLAGS
5083 fi
5084 rm -f conftest*
5085 fi
5086
5087 echo "$ac_t""$bu_cv_have_stat64" 1>&6
5088 if test "$bu_cv_have_stat64" != no; then
5089   cat >> confdefs.h <<\EOF
5090 #define HAVE_STAT64 1
5091 EOF
5092
5093 fi
5094 if test "$bu_cv_have_fopen64" = "need -D_LARGEFILE64_SOURCE" \
5095    || test "$bu_cv_have_stat64" = "need -D_LARGEFILE64_SOURCE"; then
5096   cat >> confdefs.h <<\EOF
5097 #define _LARGEFILE64_SOURCE 1
5098 EOF
5099
5100   CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
5101 fi
5102
5103 # Some systems have frexp only in -lm, not in -lc.
5104
5105 echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
5106 echo "configure:5107: checking for library containing frexp" >&5
5107 if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
5108   echo $ac_n "(cached) $ac_c" 1>&6
5109 else
5110   ac_func_search_save_LIBS="$LIBS"
5111 ac_cv_search_frexp="no"
5112 cat > conftest.$ac_ext <<EOF
5113 #line 5114 "configure"
5114 #include "confdefs.h"
5115 /* Override any gcc2 internal prototype to avoid an error.  */
5116 /* We use char because int might match the return type of a gcc2
5117     builtin and then its argument prototype would still apply.  */
5118 char frexp();
5119
5120 int main() {
5121 frexp()
5122 ; return 0; }
5123 EOF
5124 if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5125   rm -rf conftest*
5126   ac_cv_search_frexp="none required"
5127 else
5128   echo "configure: failed program was:" >&5
5129   cat conftest.$ac_ext >&5
5130 fi
5131 rm -f conftest*
5132 test "$ac_cv_search_frexp" = "no" && for i in m; do
5133 LIBS="-l$i  $ac_func_search_save_LIBS"
5134 cat > conftest.$ac_ext <<EOF
5135 #line 5136 "configure"
5136 #include "confdefs.h"
5137 /* Override any gcc2 internal prototype to avoid an error.  */
5138 /* We use char because int might match the return type of a gcc2
5139     builtin and then its argument prototype would still apply.  */
5140 char frexp();
5141
5142 int main() {
5143 frexp()
5144 ; return 0; }
5145 EOF
5146 if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5147   rm -rf conftest*
5148   ac_cv_search_frexp="-l$i"
5149 break
5150 else
5151   echo "configure: failed program was:" >&5
5152   cat conftest.$ac_ext >&5
5153 fi
5154 rm -f conftest*
5155 done
5156 LIBS="$ac_func_search_save_LIBS"
5157 fi
5158
5159 echo "$ac_t""$ac_cv_search_frexp" 1>&6
5160 if test "$ac_cv_search_frexp" != "no"; then
5161   test "$ac_cv_search_frexp" = "none required" || LIBS="$ac_cv_search_frexp $LIBS"
5162   
5163 else :
5164   
5165 fi
5166
5167 echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
5168 echo "configure:5169: checking for time_t in time.h" >&5
5169 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
5170   echo $ac_n "(cached) $ac_c" 1>&6
5171 else
5172   cat > conftest.$ac_ext <<EOF
5173 #line 5174 "configure"
5174 #include "confdefs.h"
5175 #include <time.h>
5176 int main() {
5177 time_t i;
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5181   rm -rf conftest*
5182   bu_cv_decl_time_t_time_h=yes
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   bu_cv_decl_time_t_time_h=no
5188 fi
5189 rm -f conftest*
5190 fi
5191
5192 echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
5193 if test $bu_cv_decl_time_t_time_h = yes; then
5194   cat >> confdefs.h <<\EOF
5195 #define HAVE_TIME_T_IN_TIME_H 1
5196 EOF
5197
5198 fi
5199
5200 echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
5201 echo "configure:5202: checking for time_t in sys/types.h" >&5
5202 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
5203   echo $ac_n "(cached) $ac_c" 1>&6
5204 else
5205   cat > conftest.$ac_ext <<EOF
5206 #line 5207 "configure"
5207 #include "confdefs.h"
5208 #include <sys/types.h>
5209 int main() {
5210 time_t i;
5211 ; return 0; }
5212 EOF
5213 if { (eval echo configure:5214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5214   rm -rf conftest*
5215   bu_cv_decl_time_t_types_h=yes
5216 else
5217   echo "configure: failed program was:" >&5
5218   cat conftest.$ac_ext >&5
5219   rm -rf conftest*
5220   bu_cv_decl_time_t_types_h=no
5221 fi
5222 rm -f conftest*
5223 fi
5224
5225 echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
5226 if test $bu_cv_decl_time_t_types_h = yes; then
5227   cat >> confdefs.h <<\EOF
5228 #define HAVE_TIME_T_IN_TYPES_H 1
5229 EOF
5230
5231 fi
5232
5233 echo $ac_n "checking for a known getopt prototype in unistd.h""... $ac_c" 1>&6
5234 echo "configure:5235: checking for a known getopt prototype in unistd.h" >&5
5235 if eval "test \"`echo '$''{'bu_cv_decl_getopt_unistd_h'+set}'`\" = set"; then
5236   echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238   cat > conftest.$ac_ext <<EOF
5239 #line 5240 "configure"
5240 #include "confdefs.h"
5241 #include <unistd.h>
5242 int main() {
5243 extern int getopt (int, char *const*, const char *);
5244 ; return 0; }
5245 EOF
5246 if { (eval echo configure:5247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5247   rm -rf conftest*
5248   bu_cv_decl_getopt_unistd_h=yes
5249 else
5250   echo "configure: failed program was:" >&5
5251   cat conftest.$ac_ext >&5
5252   rm -rf conftest*
5253   bu_cv_decl_getopt_unistd_h=no
5254 fi
5255 rm -f conftest*
5256 fi
5257
5258 echo "$ac_t""$bu_cv_decl_getopt_unistd_h" 1>&6
5259 if test $bu_cv_decl_getopt_unistd_h = yes; then
5260   cat >> confdefs.h <<\EOF
5261 #define HAVE_DECL_GETOPT 1
5262 EOF
5263
5264 fi
5265
5266 # Under Next 3.2 <utime.h> apparently does not define struct utimbuf
5267 # by default.
5268 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
5269 echo "configure:5270: checking for utime.h" >&5
5270 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
5271   echo $ac_n "(cached) $ac_c" 1>&6
5272 else
5273   cat > conftest.$ac_ext <<EOF
5274 #line 5275 "configure"
5275 #include "confdefs.h"
5276 #include <sys/types.h>
5277 #ifdef HAVE_TIME_H
5278 #include <time.h>
5279 #endif
5280 #include <utime.h>
5281 int main() {
5282 struct utimbuf s;
5283 ; return 0; }
5284 EOF
5285 if { (eval echo configure:5286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5286   rm -rf conftest*
5287   bu_cv_header_utime_h=yes
5288 else
5289   echo "configure: failed program was:" >&5
5290   cat conftest.$ac_ext >&5
5291   rm -rf conftest*
5292   bu_cv_header_utime_h=no
5293 fi
5294 rm -f conftest*
5295 fi
5296
5297 echo "$ac_t""$bu_cv_header_utime_h" 1>&6
5298 if test $bu_cv_header_utime_h = yes; then
5299   cat >> confdefs.h <<\EOF
5300 #define HAVE_GOOD_UTIME_H 1
5301 EOF
5302
5303 fi
5304
5305 echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
5306 echo "configure:5307: checking whether fprintf must be declared" >&5
5307 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
5308   echo $ac_n "(cached) $ac_c" 1>&6
5309 else
5310   cat > conftest.$ac_ext <<EOF
5311 #line 5312 "configure"
5312 #include "confdefs.h"
5313
5314 #include <stdio.h>
5315 #ifdef HAVE_STRING_H
5316 #include <string.h>
5317 #else
5318 #ifdef HAVE_STRINGS_H
5319 #include <strings.h>
5320 #endif
5321 #endif
5322 #ifdef HAVE_STDLIB_H
5323 #include <stdlib.h>
5324 #endif
5325 #ifdef HAVE_UNISTD_H
5326 #include <unistd.h>
5327 #endif
5328 int main() {
5329 char *(*pfn) = (char *(*)) fprintf
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5333   rm -rf conftest*
5334   bfd_cv_decl_needed_fprintf=no
5335 else
5336   echo "configure: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338   rm -rf conftest*
5339   bfd_cv_decl_needed_fprintf=yes
5340 fi
5341 rm -f conftest*
5342 fi
5343
5344 echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
5345 if test $bfd_cv_decl_needed_fprintf = yes; then
5346   cat >> confdefs.h <<\EOF
5347 #define NEED_DECLARATION_FPRINTF 1
5348 EOF
5349
5350 fi
5351
5352 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
5353 echo "configure:5354: checking whether strstr must be declared" >&5
5354 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
5355   echo $ac_n "(cached) $ac_c" 1>&6
5356 else
5357   cat > conftest.$ac_ext <<EOF
5358 #line 5359 "configure"
5359 #include "confdefs.h"
5360
5361 #include <stdio.h>
5362 #ifdef HAVE_STRING_H
5363 #include <string.h>
5364 #else
5365 #ifdef HAVE_STRINGS_H
5366 #include <strings.h>
5367 #endif
5368 #endif
5369 #ifdef HAVE_STDLIB_H
5370 #include <stdlib.h>
5371 #endif
5372 #ifdef HAVE_UNISTD_H
5373 #include <unistd.h>
5374 #endif
5375 int main() {
5376 char *(*pfn) = (char *(*)) strstr
5377 ; return 0; }
5378 EOF
5379 if { (eval echo configure:5380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5380   rm -rf conftest*
5381   bfd_cv_decl_needed_strstr=no
5382 else
5383   echo "configure: failed program was:" >&5
5384   cat conftest.$ac_ext >&5
5385   rm -rf conftest*
5386   bfd_cv_decl_needed_strstr=yes
5387 fi
5388 rm -f conftest*
5389 fi
5390
5391 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
5392 if test $bfd_cv_decl_needed_strstr = yes; then
5393   cat >> confdefs.h <<\EOF
5394 #define NEED_DECLARATION_STRSTR 1
5395 EOF
5396
5397 fi
5398
5399 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
5400 echo "configure:5401: checking whether sbrk must be declared" >&5
5401 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
5402   echo $ac_n "(cached) $ac_c" 1>&6
5403 else
5404   cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5407
5408 #include <stdio.h>
5409 #ifdef HAVE_STRING_H
5410 #include <string.h>
5411 #else
5412 #ifdef HAVE_STRINGS_H
5413 #include <strings.h>
5414 #endif
5415 #endif
5416 #ifdef HAVE_STDLIB_H
5417 #include <stdlib.h>
5418 #endif
5419 #ifdef HAVE_UNISTD_H
5420 #include <unistd.h>
5421 #endif
5422 int main() {
5423 char *(*pfn) = (char *(*)) sbrk
5424 ; return 0; }
5425 EOF
5426 if { (eval echo configure:5427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5427   rm -rf conftest*
5428   bfd_cv_decl_needed_sbrk=no
5429 else
5430   echo "configure: failed program was:" >&5
5431   cat conftest.$ac_ext >&5
5432   rm -rf conftest*
5433   bfd_cv_decl_needed_sbrk=yes
5434 fi
5435 rm -f conftest*
5436 fi
5437
5438 echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
5439 if test $bfd_cv_decl_needed_sbrk = yes; then
5440   cat >> confdefs.h <<\EOF
5441 #define NEED_DECLARATION_SBRK 1
5442 EOF
5443
5444 fi
5445
5446 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
5447 echo "configure:5448: checking whether getenv must be declared" >&5
5448 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
5449   echo $ac_n "(cached) $ac_c" 1>&6
5450 else
5451   cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5454
5455 #include <stdio.h>
5456 #ifdef HAVE_STRING_H
5457 #include <string.h>
5458 #else
5459 #ifdef HAVE_STRINGS_H
5460 #include <strings.h>
5461 #endif
5462 #endif
5463 #ifdef HAVE_STDLIB_H
5464 #include <stdlib.h>
5465 #endif
5466 #ifdef HAVE_UNISTD_H
5467 #include <unistd.h>
5468 #endif
5469 int main() {
5470 char *(*pfn) = (char *(*)) getenv
5471 ; return 0; }
5472 EOF
5473 if { (eval echo configure:5474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5474   rm -rf conftest*
5475   bfd_cv_decl_needed_getenv=no
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479   rm -rf conftest*
5480   bfd_cv_decl_needed_getenv=yes
5481 fi
5482 rm -f conftest*
5483 fi
5484
5485 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
5486 if test $bfd_cv_decl_needed_getenv = yes; then
5487   cat >> confdefs.h <<\EOF
5488 #define NEED_DECLARATION_GETENV 1
5489 EOF
5490
5491 fi
5492
5493 echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
5494 echo "configure:5495: checking whether environ must be declared" >&5
5495 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
5496   echo $ac_n "(cached) $ac_c" 1>&6
5497 else
5498   cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501
5502 #include <stdio.h>
5503 #ifdef HAVE_STRING_H
5504 #include <string.h>
5505 #else
5506 #ifdef HAVE_STRINGS_H
5507 #include <strings.h>
5508 #endif
5509 #endif
5510 #ifdef HAVE_STDLIB_H
5511 #include <stdlib.h>
5512 #endif
5513 #ifdef HAVE_UNISTD_H
5514 #include <unistd.h>
5515 #endif
5516 int main() {
5517 char *(*pfn) = (char *(*)) environ
5518 ; return 0; }
5519 EOF
5520 if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5521   rm -rf conftest*
5522   bfd_cv_decl_needed_environ=no
5523 else
5524   echo "configure: failed program was:" >&5
5525   cat conftest.$ac_ext >&5
5526   rm -rf conftest*
5527   bfd_cv_decl_needed_environ=yes
5528 fi
5529 rm -f conftest*
5530 fi
5531
5532 echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
5533 if test $bfd_cv_decl_needed_environ = yes; then
5534   cat >> confdefs.h <<\EOF
5535 #define NEED_DECLARATION_ENVIRON 1
5536 EOF
5537
5538 fi
5539
5540
5541
5542 case "${host}" in
5543 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
5544   cat >> confdefs.h <<\EOF
5545 #define USE_BINARY_FOPEN 1
5546 EOF
5547  ;;
5548 esac
5549
5550 # target-specific stuff:
5551
5552 # Canonicalize the secondary target names.
5553 if test -n "$enable_targets"; then
5554     for targ in `echo $enable_targets | sed 's/,/ /g'`
5555     do
5556         result=`$ac_config_sub $targ 2>/dev/null`
5557         if test -n "$result"; then
5558             canon_targets="$canon_targets $result"
5559         else
5560             # Allow targets that config.sub doesn't recognize, like "all".
5561             canon_targets="$canon_targets $targ"
5562         fi
5563     done
5564 fi
5565
5566 all_targets=false
5567 BUILD_NLMCONV=
5568 NLMCONV_DEFS=
5569 BUILD_SRCONV=
5570 BUILD_DLLTOOL=
5571 DLLTOOL_DEFS=
5572 BUILD_WINDRES=
5573 BUILD_DLLWRAP=
5574 BUILD_MISC=
5575 OBJDUMP_DEFS=
5576
5577 for targ in $target $canon_targets
5578 do
5579     if test "x$targ" = "xall"; then
5580         all_targets=true
5581         BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5582         BUILD_SRCONV='$(SRCONV_PROG)'
5583         NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
5584     else
5585         case $targ in
5586         i[3-7]86*-*-netware*) 
5587           BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5588           NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
5589           ;;
5590         alpha*-*-netware*)
5591           BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5592           NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
5593           ;;
5594         powerpc*-*-netware*)
5595           BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5596           NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
5597           ;;
5598         sparc*-*-netware*)
5599           BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5600           NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
5601           ;;
5602         esac
5603         case $targ in
5604         *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
5605         esac
5606         case $targ in
5607         arm-epoc-pe*)
5608           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5609           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
5610           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5611           ;;
5612         arm-*-pe* | arm-*-wince)
5613           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5614           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
5615           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5616           ;;
5617         thumb-*-pe*)
5618           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5619           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
5620           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5621           ;;
5622         arm*-* | xscale-* | strongarm-* | d10v-*)
5623           OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS"
5624           ;;
5625         i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
5626           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5627           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
5628           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5629           BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
5630           ;;
5631         i[3-7]86-*-interix)
5632           BUILD_DLLTOOL='$(DLLTOOL_PROG)'
5633           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
5634           ;;
5635         powerpc*-aix5.[01])
5636           ;;
5637         powerpc*-aix5.*)
5638           OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT"
5639           ;;
5640         powerpc*-*-pe* | powerpc*-*-cygwin*)
5641           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5642           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
5643           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5644           ;;
5645         sh*-*-pe)
5646           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5647           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
5648           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5649           ;;
5650         mips*-*-pe)
5651           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5652           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
5653           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5654           ;;
5655         mcore-*-pe)
5656           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5657           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
5658           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5659           ;;
5660         mcore-*-elf)
5661           BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5662           DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
5663           ;;
5664         esac
5665     fi
5666 done
5667
5668 if test "${with_windres+set}" = set; then
5669           BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5670 fi
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682 cat >> confdefs.h <<EOF
5683 #define TARGET "${target}"
5684 EOF
5685
5686
5687 targ=$target
5688 . $srcdir/../bfd/config.bfd
5689 if test "x$targ_underscore" = "xyes"; then
5690     UNDERSCORE=1
5691 else
5692     UNDERSCORE=0
5693 fi
5694 cat >> confdefs.h <<EOF
5695 #define TARGET_PREPENDS_UNDERSCORE $UNDERSCORE
5696 EOF
5697
5698
5699 # Emulation 
5700 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
5701 do
5702   # Canonicalize the secondary target names.
5703  result=`$ac_config_sub $targ_alias 2>/dev/null`
5704  if test -n "$result"; then
5705    targ=$result
5706  else
5707    targ=$targ_alias
5708  fi
5709
5710  . ${srcdir}/configure.tgt
5711
5712   EMULATION=$targ_emul
5713   EMULATION_VECTOR=$targ_emul_vector    
5714 done
5715
5716
5717
5718
5719 trap '' 1 2 15
5720 cat > confcache <<\EOF
5721 # This file is a shell script that caches the results of configure
5722 # tests run on this system so they can be shared between configure
5723 # scripts and configure runs.  It is not useful on other systems.
5724 # If it contains results you don't want to keep, you may remove or edit it.
5725 #
5726 # By default, configure uses ./config.cache as the cache file,
5727 # creating it if it does not exist already.  You can give configure
5728 # the --cache-file=FILE option to use a different cache file; that is
5729 # what configure does when it calls configure scripts in
5730 # subdirectories, so they share the cache.
5731 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5732 # config.status only pays attention to the cache file if you give it the
5733 # --recheck option to rerun configure.
5734 #
5735 EOF
5736 # The following way of writing the cache mishandles newlines in values,
5737 # but we know of no workaround that is simple, portable, and efficient.
5738 # So, don't put newlines in cache variables' values.
5739 # Ultrix sh set writes to stderr and can't be redirected directly,
5740 # and sets the high bit in the cache file unless we assign to the vars.
5741 (set) 2>&1 |
5742   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5743   *ac_space=\ *)
5744     # `set' does not quote correctly, so add quotes (double-quote substitution
5745     # turns \\\\ into \\, and sed turns \\ into \).
5746     sed -n \
5747       -e "s/'/'\\\\''/g" \
5748       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5749     ;;
5750   *)
5751     # `set' quotes correctly as required by POSIX, so do not add quotes.
5752     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5753     ;;
5754   esac >> confcache
5755 if cmp -s $cache_file confcache; then
5756   :
5757 else
5758   if test -w $cache_file; then
5759     echo "updating cache $cache_file"
5760     cat confcache > $cache_file
5761   else
5762     echo "not updating unwritable cache $cache_file"
5763   fi
5764 fi
5765 rm -f confcache
5766
5767 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5768
5769 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5770 # Let make expand exec_prefix.
5771 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5772
5773 # Any assignment to VPATH causes Sun make to only execute
5774 # the first set of double-colon rules, so remove it if not needed.
5775 # If there is a colon in the path, we need to keep it.
5776 if test "x$srcdir" = x.; then
5777   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5778 fi
5779
5780 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5781
5782 DEFS=-DHAVE_CONFIG_H
5783
5784 # Without the "./", some shells look in PATH for config.status.
5785 : ${CONFIG_STATUS=./config.status}
5786
5787 echo creating $CONFIG_STATUS
5788 rm -f $CONFIG_STATUS
5789 cat > $CONFIG_STATUS <<EOF
5790 #! /bin/sh
5791 # Generated automatically by configure.
5792 # Run this file to recreate the current configuration.
5793 # This directory was configured as follows,
5794 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5795 #
5796 # $0 $ac_configure_args
5797 #
5798 # Compiler output produced by configure, useful for debugging
5799 # configure, is in ./config.log if it exists.
5800
5801 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5802 for ac_option
5803 do
5804   case "\$ac_option" in
5805   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5806     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5807     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5808   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5809     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5810     exit 0 ;;
5811   -help | --help | --hel | --he | --h)
5812     echo "\$ac_cs_usage"; exit 0 ;;
5813   *) echo "\$ac_cs_usage"; exit 1 ;;
5814   esac
5815 done
5816
5817 ac_given_srcdir=$srcdir
5818 ac_given_INSTALL="$INSTALL"
5819
5820 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
5821 EOF
5822 cat >> $CONFIG_STATUS <<EOF
5823
5824 # Protect against being on the right side of a sed subst in config.status.
5825 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5826  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5827 $ac_vpsub
5828 $extrasub
5829 s%@SHELL@%$SHELL%g
5830 s%@CFLAGS@%$CFLAGS%g
5831 s%@CPPFLAGS@%$CPPFLAGS%g
5832 s%@CXXFLAGS@%$CXXFLAGS%g
5833 s%@FFLAGS@%$FFLAGS%g
5834 s%@DEFS@%$DEFS%g
5835 s%@LDFLAGS@%$LDFLAGS%g
5836 s%@LIBS@%$LIBS%g
5837 s%@exec_prefix@%$exec_prefix%g
5838 s%@prefix@%$prefix%g
5839 s%@program_transform_name@%$program_transform_name%g
5840 s%@bindir@%$bindir%g
5841 s%@sbindir@%$sbindir%g
5842 s%@libexecdir@%$libexecdir%g
5843 s%@datadir@%$datadir%g
5844 s%@sysconfdir@%$sysconfdir%g
5845 s%@sharedstatedir@%$sharedstatedir%g
5846 s%@localstatedir@%$localstatedir%g
5847 s%@libdir@%$libdir%g
5848 s%@includedir@%$includedir%g
5849 s%@oldincludedir@%$oldincludedir%g
5850 s%@infodir@%$infodir%g
5851 s%@mandir@%$mandir%g
5852 s%@host@%$host%g
5853 s%@host_alias@%$host_alias%g
5854 s%@host_cpu@%$host_cpu%g
5855 s%@host_vendor@%$host_vendor%g
5856 s%@host_os@%$host_os%g
5857 s%@target@%$target%g
5858 s%@target_alias@%$target_alias%g
5859 s%@target_cpu@%$target_cpu%g
5860 s%@target_vendor@%$target_vendor%g
5861 s%@target_os@%$target_os%g
5862 s%@build@%$build%g
5863 s%@build_alias@%$build_alias%g
5864 s%@build_cpu@%$build_cpu%g
5865 s%@build_vendor@%$build_vendor%g
5866 s%@build_os@%$build_os%g
5867 s%@CC@%$CC%g
5868 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5869 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5870 s%@INSTALL_DATA@%$INSTALL_DATA%g
5871 s%@PACKAGE@%$PACKAGE%g
5872 s%@VERSION@%$VERSION%g
5873 s%@ACLOCAL@%$ACLOCAL%g
5874 s%@AUTOCONF@%$AUTOCONF%g
5875 s%@AUTOMAKE@%$AUTOMAKE%g
5876 s%@AUTOHEADER@%$AUTOHEADER%g
5877 s%@MAKEINFO@%$MAKEINFO%g
5878 s%@SET_MAKE@%$SET_MAKE%g
5879 s%@LN_S@%$LN_S%g
5880 s%@OBJEXT@%$OBJEXT%g
5881 s%@EXEEXT@%$EXEEXT%g
5882 s%@RANLIB@%$RANLIB%g
5883 s%@STRIP@%$STRIP%g
5884 s%@LIBTOOL@%$LIBTOOL%g
5885 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
5886 s%@YACC@%$YACC%g
5887 s%@LEX@%$LEX%g
5888 s%@LEXLIB@%$LEXLIB%g
5889 s%@CPP@%$CPP%g
5890 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5891 s%@ALLOCA@%$ALLOCA%g
5892 s%@USE_NLS@%$USE_NLS%g
5893 s%@MSGFMT@%$MSGFMT%g
5894 s%@GMSGFMT@%$GMSGFMT%g
5895 s%@XGETTEXT@%$XGETTEXT%g
5896 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5897 s%@CATALOGS@%$CATALOGS%g
5898 s%@CATOBJEXT@%$CATOBJEXT%g
5899 s%@DATADIRNAME@%$DATADIRNAME%g
5900 s%@GMOFILES@%$GMOFILES%g
5901 s%@INSTOBJEXT@%$INSTOBJEXT%g
5902 s%@INTLDEPS@%$INTLDEPS%g
5903 s%@INTLLIBS@%$INTLLIBS%g
5904 s%@INTLOBJS@%$INTLOBJS%g
5905 s%@POFILES@%$POFILES%g
5906 s%@POSUB@%$POSUB%g
5907 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5908 s%@GT_NO@%$GT_NO%g
5909 s%@GT_YES@%$GT_YES%g
5910 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5911 s%@l@%$l%g
5912 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5913 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5914 s%@MAINT@%$MAINT%g
5915 s%@HDEFINES@%$HDEFINES%g
5916 s%@AR@%$AR%g
5917 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5918 s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
5919 s%@DEMANGLER_NAME@%$DEMANGLER_NAME%g
5920 s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
5921 s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
5922 s%@BUILD_SRCONV@%$BUILD_SRCONV%g
5923 s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
5924 s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
5925 s%@BUILD_WINDRES@%$BUILD_WINDRES%g
5926 s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
5927 s%@BUILD_MISC@%$BUILD_MISC%g
5928 s%@OBJDUMP_DEFS@%$OBJDUMP_DEFS%g
5929 s%@EMULATION@%$EMULATION%g
5930 s%@EMULATION_VECTOR@%$EMULATION_VECTOR%g
5931
5932 CEOF
5933 EOF
5934
5935 cat >> $CONFIG_STATUS <<\EOF
5936
5937 # Split the substitutions into bite-sized pieces for seds with
5938 # small command number limits, like on Digital OSF/1 and HP-UX.
5939 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5940 ac_file=1 # Number of current file.
5941 ac_beg=1 # First line for current file.
5942 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5943 ac_more_lines=:
5944 ac_sed_cmds=""
5945 while $ac_more_lines; do
5946   if test $ac_beg -gt 1; then
5947     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5948   else
5949     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5950   fi
5951   if test ! -s conftest.s$ac_file; then
5952     ac_more_lines=false
5953     rm -f conftest.s$ac_file
5954   else
5955     if test -z "$ac_sed_cmds"; then
5956       ac_sed_cmds="sed -f conftest.s$ac_file"
5957     else
5958       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5959     fi
5960     ac_file=`expr $ac_file + 1`
5961     ac_beg=$ac_end
5962     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5963   fi
5964 done
5965 if test -z "$ac_sed_cmds"; then
5966   ac_sed_cmds=cat
5967 fi
5968 EOF
5969
5970 cat >> $CONFIG_STATUS <<EOF
5971
5972 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile po/Makefile.in:po/Make-in"}
5973 EOF
5974 cat >> $CONFIG_STATUS <<\EOF
5975 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5976   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5977   case "$ac_file" in
5978   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5979        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5980   *) ac_file_in="${ac_file}.in" ;;
5981   esac
5982
5983   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5984
5985   # Remove last slash and all that follows it.  Not all systems have dirname.
5986   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5987   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5988     # The file is in a subdirectory.
5989     test ! -d "$ac_dir" && mkdir "$ac_dir"
5990     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5991     # A "../" for each directory in $ac_dir_suffix.
5992     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5993   else
5994     ac_dir_suffix= ac_dots=
5995   fi
5996
5997   case "$ac_given_srcdir" in
5998   .)  srcdir=.
5999       if test -z "$ac_dots"; then top_srcdir=.
6000       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6001   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6002   *) # Relative path.
6003     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6004     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6005   esac
6006
6007   case "$ac_given_INSTALL" in
6008   [/$]*) INSTALL="$ac_given_INSTALL" ;;
6009   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6010   esac
6011
6012   echo creating "$ac_file"
6013   rm -f "$ac_file"
6014   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6015   case "$ac_file" in
6016   *Makefile*) ac_comsub="1i\\
6017 # $configure_input" ;;
6018   *) ac_comsub= ;;
6019   esac
6020
6021   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6022   sed -e "$ac_comsub
6023 s%@configure_input@%$configure_input%g
6024 s%@srcdir@%$srcdir%g
6025 s%@top_srcdir@%$top_srcdir%g
6026 s%@INSTALL@%$INSTALL%g
6027 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6028 fi; done
6029 rm -f conftest.s*
6030
6031 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6032 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6033 #
6034 # ac_d sets the value in "#define NAME VALUE" lines.
6035 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6036 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6037 ac_dC='\3'
6038 ac_dD='%g'
6039 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6040 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6041 ac_uB='\([      ]\)%\1#\2define\3'
6042 ac_uC=' '
6043 ac_uD='\4%g'
6044 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6045 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6046 ac_eB='$%\1#\2define\3'
6047 ac_eC=' '
6048 ac_eD='%g'
6049
6050 if test "${CONFIG_HEADERS+set}" != set; then
6051 EOF
6052 cat >> $CONFIG_STATUS <<EOF
6053   CONFIG_HEADERS="config.h:config.in"
6054 EOF
6055 cat >> $CONFIG_STATUS <<\EOF
6056 fi
6057 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6058   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6059   case "$ac_file" in
6060   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6061        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6062   *) ac_file_in="${ac_file}.in" ;;
6063   esac
6064
6065   echo creating $ac_file
6066
6067   rm -f conftest.frag conftest.in conftest.out
6068   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6069   cat $ac_file_inputs > conftest.in
6070
6071 EOF
6072
6073 # Transform confdefs.h into a sed script conftest.vals that substitutes
6074 # the proper values into config.h.in to produce config.h.  And first:
6075 # Protect against being on the right side of a sed subst in config.status.
6076 # Protect against being in an unquoted here document in config.status.
6077 rm -f conftest.vals
6078 cat > conftest.hdr <<\EOF
6079 s/[\\&%]/\\&/g
6080 s%[\\$`]%\\&%g
6081 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6082 s%ac_d%ac_u%gp
6083 s%ac_u%ac_e%gp
6084 EOF
6085 sed -n -f conftest.hdr confdefs.h > conftest.vals
6086 rm -f conftest.hdr
6087
6088 # This sed command replaces #undef with comments.  This is necessary, for
6089 # example, in the case of _POSIX_SOURCE, which is predefined and required
6090 # on some systems where configure will not decide to define it.
6091 cat >> conftest.vals <<\EOF
6092 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6093 EOF
6094
6095 # Break up conftest.vals because some shells have a limit on
6096 # the size of here documents, and old seds have small limits too.
6097
6098 rm -f conftest.tail
6099 while :
6100 do
6101   ac_lines=`grep -c . conftest.vals`
6102   # grep -c gives empty output for an empty file on some AIX systems.
6103   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6104   # Write a limited-size here document to conftest.frag.
6105   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6106   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6107   echo 'CEOF
6108   sed -f conftest.frag conftest.in > conftest.out
6109   rm -f conftest.in
6110   mv conftest.out conftest.in
6111 ' >> $CONFIG_STATUS
6112   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6113   rm -f conftest.vals
6114   mv conftest.tail conftest.vals
6115 done
6116 rm -f conftest.vals
6117
6118 cat >> $CONFIG_STATUS <<\EOF
6119   rm -f conftest.frag conftest.h
6120   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6121   cat conftest.in >> conftest.h
6122   rm -f conftest.in
6123   if cmp -s $ac_file conftest.h 2>/dev/null; then
6124     echo "$ac_file is unchanged"
6125     rm -f conftest.h
6126   else
6127     # Remove last slash and all that follows it.  Not all systems have dirname.
6128       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6129       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6130       # The file is in a subdirectory.
6131       test ! -d "$ac_dir" && mkdir "$ac_dir"
6132     fi
6133     rm -f $ac_file
6134     mv conftest.h $ac_file
6135   fi
6136 fi; done
6137
6138 EOF
6139 cat >> $CONFIG_STATUS <<EOF
6140
6141
6142 EOF
6143 cat >> $CONFIG_STATUS <<\EOF
6144 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
6145
6146 case "x$CONFIG_FILES" in
6147 *) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
6148 esac
6149
6150 exit 0
6151 EOF
6152 chmod +x $CONFIG_STATUS
6153 rm -fr confdefs* $ac_clean_files
6154 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6155