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