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