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