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