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