OSDN Git Service

import gdb-1999-05-10
[pf3gnuchains/pf3gnuchains3x.git] / sim / w65 / configure
1 #! /bin/sh
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 sim_inline="-DDEFAULT_INLINE=0"
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81 # This file is derived from `gettext.m4'.  The difference is that the
82 # included macros assume Cygnus-style source and build trees.
83
84 # Macro to add for using GNU gettext.
85 # Ulrich Drepper <drepper@cygnus.com>, 1995.
86 #
87 # This file file be copied and used freely without restrictions.  It can
88 # be used in projects which are not available under the GNU Public License
89 # but which still want to provide support for the GNU gettext functionality.
90 # Please note that the actual code is *not* freely available.
91
92 # serial 3
93
94
95
96
97
98 # Search path for a program which passes the given test.
99 # Ulrich Drepper <drepper@cygnus.com>, 1996.
100 #
101 # This file file be copied and used freely without restrictions.  It can
102 # be used in projects which are not available under the GNU Public License
103 # but which still want to provide support for the GNU gettext functionality.
104 # Please note that the actual code is *not* freely available.
105
106 # serial 1
107
108
109
110 # Check whether LC_MESSAGES is available in <locale.h>.
111 # Ulrich Drepper <drepper@cygnus.com>, 1995.
112 #
113 # This file file be copied and used freely without restrictions.  It can
114 # be used in projects which are not available under the GNU Public License
115 # but which still want to provide support for the GNU gettext functionality.
116 # Please note that the actual code is *not* freely available.
117
118 # serial 1
119
120
121
122
123
124
125 # Guess values for system-dependent variables and create Makefiles.
126 # Generated automatically using autoconf version 2.13 
127 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
128 #
129 # This configure script is free software; the Free Software Foundation
130 # gives unlimited permission to copy, distribute and modify it.
131
132 # Defaults:
133 ac_help=
134 ac_default_prefix=/usr/local
135 # Any additions from configure.in:
136 ac_help="$ac_help
137   --disable-nls           do not use Native Language Support"
138 ac_help="$ac_help
139   --with-included-gettext use the GNU gettext library included here"
140
141 # Initialize some variables set by options.
142 # The variables have the same names as the options, with
143 # dashes changed to underlines.
144 build=NONE
145 cache_file=./config.cache
146 exec_prefix=NONE
147 host=NONE
148 no_create=
149 nonopt=NONE
150 no_recursion=
151 prefix=NONE
152 program_prefix=NONE
153 program_suffix=NONE
154 program_transform_name=s,x,x,
155 silent=
156 site=
157 sitefile=
158 srcdir=
159 target=NONE
160 verbose=
161 x_includes=NONE
162 x_libraries=NONE
163 bindir='${exec_prefix}/bin'
164 sbindir='${exec_prefix}/sbin'
165 libexecdir='${exec_prefix}/libexec'
166 datadir='${prefix}/share'
167 sysconfdir='${prefix}/etc'
168 sharedstatedir='${prefix}/com'
169 localstatedir='${prefix}/var'
170 libdir='${exec_prefix}/lib'
171 includedir='${prefix}/include'
172 oldincludedir='/usr/include'
173 infodir='${prefix}/info'
174 mandir='${prefix}/man'
175
176 # Initialize some other variables.
177 subdirs=
178 MFLAGS= MAKEFLAGS=
179 SHELL=${CONFIG_SHELL-/bin/sh}
180 # Maximum number of lines to put in a shell here document.
181 ac_max_here_lines=12
182
183 ac_prev=
184 for ac_option
185 do
186
187   # If the previous option needs an argument, assign it.
188   if test -n "$ac_prev"; then
189     eval "$ac_prev=\$ac_option"
190     ac_prev=
191     continue
192   fi
193
194   case "$ac_option" in
195   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
196   *) ac_optarg= ;;
197   esac
198
199   # Accept the important Cygnus configure options, so we can diagnose typos.
200
201   case "$ac_option" in
202
203   -bindir | --bindir | --bindi | --bind | --bin | --bi)
204     ac_prev=bindir ;;
205   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
206     bindir="$ac_optarg" ;;
207
208   -build | --build | --buil | --bui | --bu)
209     ac_prev=build ;;
210   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
211     build="$ac_optarg" ;;
212
213   -cache-file | --cache-file | --cache-fil | --cache-fi \
214   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
215     ac_prev=cache_file ;;
216   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
217   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
218     cache_file="$ac_optarg" ;;
219
220   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
221     ac_prev=datadir ;;
222   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
223   | --da=*)
224     datadir="$ac_optarg" ;;
225
226   -disable-* | --disable-*)
227     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
228     # Reject names that are not valid shell variable names.
229     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
230       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
231     fi
232     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
233     eval "enable_${ac_feature}=no" ;;
234
235   -enable-* | --enable-*)
236     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
237     # Reject names that are not valid shell variable names.
238     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
239       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
240     fi
241     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
242     case "$ac_option" in
243       *=*) ;;
244       *) ac_optarg=yes ;;
245     esac
246     eval "enable_${ac_feature}='$ac_optarg'" ;;
247
248   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
249   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
250   | --exec | --exe | --ex)
251     ac_prev=exec_prefix ;;
252   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
253   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
254   | --exec=* | --exe=* | --ex=*)
255     exec_prefix="$ac_optarg" ;;
256
257   -gas | --gas | --ga | --g)
258     # Obsolete; use --with-gas.
259     with_gas=yes ;;
260
261   -help | --help | --hel | --he)
262     # Omit some internal or obsolete options to make the list less imposing.
263     # This message is too long to be a string in the A/UX 3.1 sh.
264     cat << EOF
265 Usage: configure [options] [host]
266 Options: [defaults in brackets after descriptions]
267 Configuration:
268   --cache-file=FILE       cache test results in FILE
269   --help                  print this message
270   --no-create             do not create output files
271   --quiet, --silent       do not print \`checking...' messages
272   --site-file=FILE        use FILE as the site file
273   --version               print the version of autoconf that created configure
274 Directory and file names:
275   --prefix=PREFIX         install architecture-independent files in PREFIX
276                           [$ac_default_prefix]
277   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
278                           [same as prefix]
279   --bindir=DIR            user executables in DIR [EPREFIX/bin]
280   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
281   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
282   --datadir=DIR           read-only architecture-independent data in DIR
283                           [PREFIX/share]
284   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
285   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
286                           [PREFIX/com]
287   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
288   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
289   --includedir=DIR        C header files in DIR [PREFIX/include]
290   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
291   --infodir=DIR           info documentation in DIR [PREFIX/info]
292   --mandir=DIR            man documentation in DIR [PREFIX/man]
293   --srcdir=DIR            find the sources in DIR [configure dir or ..]
294   --program-prefix=PREFIX prepend PREFIX to installed program names
295   --program-suffix=SUFFIX append SUFFIX to installed program names
296   --program-transform-name=PROGRAM
297                           run sed PROGRAM on installed program names
298 EOF
299     cat << EOF
300 Host type:
301   --build=BUILD           configure for building on BUILD [BUILD=HOST]
302   --host=HOST             configure for HOST [guessed]
303   --target=TARGET         configure for TARGET [TARGET=HOST]
304 Features and packages:
305   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
306   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
307   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
308   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
309   --x-includes=DIR        X include files are in DIR
310   --x-libraries=DIR       X library files are in DIR
311 EOF
312     if test -n "$ac_help"; then
313       echo "--enable and --with options recognized:$ac_help"
314     fi
315     exit 0 ;;
316
317   -host | --host | --hos | --ho)
318     ac_prev=host ;;
319   -host=* | --host=* | --hos=* | --ho=*)
320     host="$ac_optarg" ;;
321
322   -includedir | --includedir | --includedi | --included | --include \
323   | --includ | --inclu | --incl | --inc)
324     ac_prev=includedir ;;
325   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
326   | --includ=* | --inclu=* | --incl=* | --inc=*)
327     includedir="$ac_optarg" ;;
328
329   -infodir | --infodir | --infodi | --infod | --info | --inf)
330     ac_prev=infodir ;;
331   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
332     infodir="$ac_optarg" ;;
333
334   -libdir | --libdir | --libdi | --libd)
335     ac_prev=libdir ;;
336   -libdir=* | --libdir=* | --libdi=* | --libd=*)
337     libdir="$ac_optarg" ;;
338
339   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
340   | --libexe | --libex | --libe)
341     ac_prev=libexecdir ;;
342   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
343   | --libexe=* | --libex=* | --libe=*)
344     libexecdir="$ac_optarg" ;;
345
346   -localstatedir | --localstatedir | --localstatedi | --localstated \
347   | --localstate | --localstat | --localsta | --localst \
348   | --locals | --local | --loca | --loc | --lo)
349     ac_prev=localstatedir ;;
350   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
351   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
352   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
353     localstatedir="$ac_optarg" ;;
354
355   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
356     ac_prev=mandir ;;
357   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
358     mandir="$ac_optarg" ;;
359
360   -nfp | --nfp | --nf)
361     # Obsolete; use --without-fp.
362     with_fp=no ;;
363
364   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
365   | --no-cr | --no-c)
366     no_create=yes ;;
367
368   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
369   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
370     no_recursion=yes ;;
371
372   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
373   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
374   | --oldin | --oldi | --old | --ol | --o)
375     ac_prev=oldincludedir ;;
376   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
377   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
378   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
379     oldincludedir="$ac_optarg" ;;
380
381   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
382     ac_prev=prefix ;;
383   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
384     prefix="$ac_optarg" ;;
385
386   -program-prefix | --program-prefix | --program-prefi | --program-pref \
387   | --program-pre | --program-pr | --program-p)
388     ac_prev=program_prefix ;;
389   -program-prefix=* | --program-prefix=* | --program-prefi=* \
390   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
391     program_prefix="$ac_optarg" ;;
392
393   -program-suffix | --program-suffix | --program-suffi | --program-suff \
394   | --program-suf | --program-su | --program-s)
395     ac_prev=program_suffix ;;
396   -program-suffix=* | --program-suffix=* | --program-suffi=* \
397   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
398     program_suffix="$ac_optarg" ;;
399
400   -program-transform-name | --program-transform-name \
401   | --program-transform-nam | --program-transform-na \
402   | --program-transform-n | --program-transform- \
403   | --program-transform | --program-transfor \
404   | --program-transfo | --program-transf \
405   | --program-trans | --program-tran \
406   | --progr-tra | --program-tr | --program-t)
407     ac_prev=program_transform_name ;;
408   -program-transform-name=* | --program-transform-name=* \
409   | --program-transform-nam=* | --program-transform-na=* \
410   | --program-transform-n=* | --program-transform-=* \
411   | --program-transform=* | --program-transfor=* \
412   | --program-transfo=* | --program-transf=* \
413   | --program-trans=* | --program-tran=* \
414   | --progr-tra=* | --program-tr=* | --program-t=*)
415     program_transform_name="$ac_optarg" ;;
416
417   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
418   | -silent | --silent | --silen | --sile | --sil)
419     silent=yes ;;
420
421   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
422     ac_prev=sbindir ;;
423   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
424   | --sbi=* | --sb=*)
425     sbindir="$ac_optarg" ;;
426
427   -sharedstatedir | --sharedstatedir | --sharedstatedi \
428   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
429   | --sharedst | --shareds | --shared | --share | --shar \
430   | --sha | --sh)
431     ac_prev=sharedstatedir ;;
432   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
433   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
434   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
435   | --sha=* | --sh=*)
436     sharedstatedir="$ac_optarg" ;;
437
438   -site | --site | --sit)
439     ac_prev=site ;;
440   -site=* | --site=* | --sit=*)
441     site="$ac_optarg" ;;
442
443   -site-file | --site-file | --site-fil | --site-fi | --site-f)
444     ac_prev=sitefile ;;
445   -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
446     sitefile="$ac_optarg" ;;
447
448   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
449     ac_prev=srcdir ;;
450   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
451     srcdir="$ac_optarg" ;;
452
453   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
454   | --syscon | --sysco | --sysc | --sys | --sy)
455     ac_prev=sysconfdir ;;
456   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
457   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
458     sysconfdir="$ac_optarg" ;;
459
460   -target | --target | --targe | --targ | --tar | --ta | --t)
461     ac_prev=target ;;
462   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
463     target="$ac_optarg" ;;
464
465   -v | -verbose | --verbose | --verbos | --verbo | --verb)
466     verbose=yes ;;
467
468   -version | --version | --versio | --versi | --vers)
469     echo "configure generated by autoconf version 2.13"
470     exit 0 ;;
471
472   -with-* | --with-*)
473     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
474     # Reject names that are not valid shell variable names.
475     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
476       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
477     fi
478     ac_package=`echo $ac_package| sed 's/-/_/g'`
479     case "$ac_option" in
480       *=*) ;;
481       *) ac_optarg=yes ;;
482     esac
483     eval "with_${ac_package}='$ac_optarg'" ;;
484
485   -without-* | --without-*)
486     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
487     # Reject names that are not valid shell variable names.
488     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
489       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
490     fi
491     ac_package=`echo $ac_package| sed 's/-/_/g'`
492     eval "with_${ac_package}=no" ;;
493
494   --x)
495     # Obsolete; use --with-x.
496     with_x=yes ;;
497
498   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
499   | --x-incl | --x-inc | --x-in | --x-i)
500     ac_prev=x_includes ;;
501   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
502   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503     x_includes="$ac_optarg" ;;
504
505   -x-libraries | --x-libraries | --x-librarie | --x-librari \
506   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
507     ac_prev=x_libraries ;;
508   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
509   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
510     x_libraries="$ac_optarg" ;;
511
512   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
513     ;;
514
515   *)
516     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
517       echo "configure: warning: $ac_option: invalid host type" 1>&2
518     fi
519     if test "x$nonopt" != xNONE; then
520       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
521     fi
522     nonopt="$ac_option"
523     ;;
524
525   esac
526 done
527
528 if test -n "$ac_prev"; then
529   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
530 fi
531
532 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
533
534 # File descriptor usage:
535 # 0 standard input
536 # 1 file creation
537 # 2 errors and warnings
538 # 3 some systems may open it to /dev/tty
539 # 4 used on the Kubota Titan
540 # 6 checking for... messages and results
541 # 5 compiler messages saved in config.log
542 if test "$silent" = yes; then
543   exec 6>/dev/null
544 else
545   exec 6>&1
546 fi
547 exec 5>./config.log
548
549 echo "\
550 This file contains any messages produced by compilers while
551 running configure, to aid debugging if configure makes a mistake.
552 " 1>&5
553
554 # Strip out --no-create and --no-recursion so they do not pile up.
555 # Also quote any args containing shell metacharacters.
556 ac_configure_args=
557 for ac_arg
558 do
559   case "$ac_arg" in
560   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
561   | --no-cr | --no-c) ;;
562   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
563   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
564   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
565   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
566   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
567   esac
568 done
569
570 # NLS nuisances.
571 # Only set these to C if already set.  These must not be set unconditionally
572 # because not all systems understand e.g. LANG=C (notably SCO).
573 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
574 # Non-C LC_CTYPE values break the ctype check.
575 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
576 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
577 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
578 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
579
580 # confdefs.h avoids OS command line length limits that DEFS can exceed.
581 rm -rf conftest* confdefs.h
582 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
583 echo > confdefs.h
584
585 # A filename unique to this package, relative to the directory that
586 # configure is in, which we can look for to find out if srcdir is correct.
587 ac_unique_file=Makefile.in
588
589 # Find the source files, if location was not specified.
590 if test -z "$srcdir"; then
591   ac_srcdir_defaulted=yes
592   # Try the directory containing this script, then its parent.
593   ac_prog=$0
594   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
595   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
596   srcdir=$ac_confdir
597   if test ! -r $srcdir/$ac_unique_file; then
598     srcdir=..
599   fi
600 else
601   ac_srcdir_defaulted=no
602 fi
603 if test ! -r $srcdir/$ac_unique_file; then
604   if test "$ac_srcdir_defaulted" = yes; then
605     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
606   else
607     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
608   fi
609 fi
610 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
611
612 # Prefer explicitly selected file to automatically selected ones.
613 if test -z "$sitefile"; then
614   if test -z "$CONFIG_SITE"; then
615     if test "x$prefix" != xNONE; then
616       CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
617     else
618       CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
619     fi
620   fi
621 else
622   CONFIG_SITE="$sitefile"
623 fi
624 for ac_site_file in $CONFIG_SITE; do
625   if test -r "$ac_site_file"; then
626     echo "loading site script $ac_site_file"
627     . "$ac_site_file"
628   fi
629 done
630
631 if test -r "$cache_file"; then
632   echo "loading cache $cache_file"
633   . $cache_file
634 else
635   echo "creating cache $cache_file"
636   > $cache_file
637 fi
638
639 ac_ext=c
640 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
641 ac_cpp='$CPP $CPPFLAGS'
642 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
643 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
644 cross_compiling=$ac_cv_prog_cc_cross
645
646 ac_exeext=
647 ac_objext=o
648 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
649   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
650   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
651     ac_n= ac_c='
652 ' ac_t='        '
653   else
654     ac_n=-n ac_c= ac_t=
655   fi
656 else
657   ac_n= ac_c='\c' ac_t=
658 fi
659
660
661
662
663
664 ac_aux_dir=
665 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
666   if test -f $ac_dir/install-sh; then
667     ac_aux_dir=$ac_dir
668     ac_install_sh="$ac_aux_dir/install-sh -c"
669     break
670   elif test -f $ac_dir/install.sh; then
671     ac_aux_dir=$ac_dir
672     ac_install_sh="$ac_aux_dir/install.sh -c"
673     break
674   fi
675 done
676 if test -z "$ac_aux_dir"; then
677   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
678 fi
679 ac_config_guess=$ac_aux_dir/config.guess
680 ac_config_sub=$ac_aux_dir/config.sub
681 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
682
683
684 # Do some error checking and defaulting for the host and target type.
685 # The inputs are:
686 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
687 #
688 # The rules are:
689 # 1. You are not allowed to specify --host, --target, and nonopt at the
690 #    same time.
691 # 2. Host defaults to nonopt.
692 # 3. If nonopt is not specified, then host defaults to the current host,
693 #    as determined by config.guess.
694 # 4. Target and build default to nonopt.
695 # 5. If nonopt is not specified, then target and build default to host.
696
697 # The aliases save the names the user supplied, while $host etc.
698 # will get canonicalized.
699 case $host---$target---$nonopt in
700 NONE---*---* | *---NONE---* | *---*---NONE) ;;
701 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
702 esac
703
704
705 # Make sure we can run config.sub.
706 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
707 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
708 fi
709
710 echo $ac_n "checking host system type""... $ac_c" 1>&6
711 echo "configure:712: checking host system type" >&5
712
713 host_alias=$host
714 case "$host_alias" in
715 NONE)
716   case $nonopt in
717   NONE)
718     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
719     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
720     fi ;;
721   *) host_alias=$nonopt ;;
722   esac ;;
723 esac
724
725 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
726 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
727 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
728 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
729 echo "$ac_t""$host" 1>&6
730
731 echo $ac_n "checking target system type""... $ac_c" 1>&6
732 echo "configure:733: checking target system type" >&5
733
734 target_alias=$target
735 case "$target_alias" in
736 NONE)
737   case $nonopt in
738   NONE) target_alias=$host_alias ;;
739   *) target_alias=$nonopt ;;
740   esac ;;
741 esac
742
743 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
744 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
745 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
746 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
747 echo "$ac_t""$target" 1>&6
748
749 echo $ac_n "checking build system type""... $ac_c" 1>&6
750 echo "configure:751: checking build system type" >&5
751
752 build_alias=$build
753 case "$build_alias" in
754 NONE)
755   case $nonopt in
756   NONE) build_alias=$host_alias ;;
757   *) build_alias=$nonopt ;;
758   esac ;;
759 esac
760
761 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
762 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
763 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
764 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
765 echo "$ac_t""$build" 1>&6
766
767 test "$host_alias" != "$target_alias" &&
768   test "$program_prefix$program_suffix$program_transform_name" = \
769     NONENONEs,x,x, &&
770   program_prefix=${target_alias}-
771
772 if test "$program_transform_name" = s,x,x,; then
773   program_transform_name=
774 else
775   # Double any \ or $.  echo might interpret backslashes.
776   cat <<\EOF_SED > conftestsed
777 s,\\,\\\\,g; s,\$,$$,g
778 EOF_SED
779   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
780   rm -f conftestsed
781 fi
782 test "$program_prefix" != NONE &&
783   program_transform_name="s,^,${program_prefix},; $program_transform_name"
784 # Use a double $ so make ignores it.
785 test "$program_suffix" != NONE &&
786   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
787
788 # sed with no file args requires a program.
789 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
790
791 # Extract the first word of "gcc", so it can be a program name with args.
792 set dummy gcc; ac_word=$2
793 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
794 echo "configure:795: checking for $ac_word" >&5
795 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
796   echo $ac_n "(cached) $ac_c" 1>&6
797 else
798   if test -n "$CC"; then
799   ac_cv_prog_CC="$CC" # Let the user override the test.
800 else
801   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
802   ac_dummy="$PATH"
803   for ac_dir in $ac_dummy; do
804     test -z "$ac_dir" && ac_dir=.
805     if test -f $ac_dir/$ac_word; then
806       ac_cv_prog_CC="gcc"
807       break
808     fi
809   done
810   IFS="$ac_save_ifs"
811 fi
812 fi
813 CC="$ac_cv_prog_CC"
814 if test -n "$CC"; then
815   echo "$ac_t""$CC" 1>&6
816 else
817   echo "$ac_t""no" 1>&6
818 fi
819
820 if test -z "$CC"; then
821   # Extract the first word of "cc", so it can be a program name with args.
822 set dummy cc; ac_word=$2
823 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
824 echo "configure:825: checking for $ac_word" >&5
825 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
826   echo $ac_n "(cached) $ac_c" 1>&6
827 else
828   if test -n "$CC"; then
829   ac_cv_prog_CC="$CC" # Let the user override the test.
830 else
831   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
832   ac_prog_rejected=no
833   ac_dummy="$PATH"
834   for ac_dir in $ac_dummy; do
835     test -z "$ac_dir" && ac_dir=.
836     if test -f $ac_dir/$ac_word; then
837       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
838         ac_prog_rejected=yes
839         continue
840       fi
841       ac_cv_prog_CC="cc"
842       break
843     fi
844   done
845   IFS="$ac_save_ifs"
846 if test $ac_prog_rejected = yes; then
847   # We found a bogon in the path, so make sure we never use it.
848   set dummy $ac_cv_prog_CC
849   shift
850   if test $# -gt 0; then
851     # We chose a different compiler from the bogus one.
852     # However, it has the same basename, so the bogon will be chosen
853     # first if we set CC to just the basename; use the full file name.
854     shift
855     set dummy "$ac_dir/$ac_word" "$@"
856     shift
857     ac_cv_prog_CC="$@"
858   fi
859 fi
860 fi
861 fi
862 CC="$ac_cv_prog_CC"
863 if test -n "$CC"; then
864   echo "$ac_t""$CC" 1>&6
865 else
866   echo "$ac_t""no" 1>&6
867 fi
868
869   if test -z "$CC"; then
870     case "`uname -s`" in
871     *win32* | *WIN32*)
872       # Extract the first word of "cl", so it can be a program name with args.
873 set dummy cl; ac_word=$2
874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
875 echo "configure:876: checking for $ac_word" >&5
876 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
877   echo $ac_n "(cached) $ac_c" 1>&6
878 else
879   if test -n "$CC"; then
880   ac_cv_prog_CC="$CC" # Let the user override the test.
881 else
882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
883   ac_dummy="$PATH"
884   for ac_dir in $ac_dummy; do
885     test -z "$ac_dir" && ac_dir=.
886     if test -f $ac_dir/$ac_word; then
887       ac_cv_prog_CC="cl"
888       break
889     fi
890   done
891   IFS="$ac_save_ifs"
892 fi
893 fi
894 CC="$ac_cv_prog_CC"
895 if test -n "$CC"; then
896   echo "$ac_t""$CC" 1>&6
897 else
898   echo "$ac_t""no" 1>&6
899 fi
900  ;;
901     esac
902   fi
903   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
904 fi
905
906 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
907 echo "configure:908: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
908
909 ac_ext=c
910 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
911 ac_cpp='$CPP $CPPFLAGS'
912 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
913 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
914 cross_compiling=$ac_cv_prog_cc_cross
915
916 cat > conftest.$ac_ext << EOF
917
918 #line 919 "configure"
919 #include "confdefs.h"
920
921 main(){return(0);}
922 EOF
923 if { (eval echo configure:924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
924   ac_cv_prog_cc_works=yes
925   # If we can't run a trivial program, we are probably using a cross compiler.
926   if (./conftest; exit) 2>/dev/null; then
927     ac_cv_prog_cc_cross=no
928   else
929     ac_cv_prog_cc_cross=yes
930   fi
931 else
932   echo "configure: failed program was:" >&5
933   cat conftest.$ac_ext >&5
934   ac_cv_prog_cc_works=no
935 fi
936 rm -fr conftest*
937 ac_ext=c
938 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
939 ac_cpp='$CPP $CPPFLAGS'
940 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
941 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
942 cross_compiling=$ac_cv_prog_cc_cross
943
944 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
945 if test $ac_cv_prog_cc_works = no; then
946   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
947 fi
948 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
949 echo "configure:950: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
950 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
951 cross_compiling=$ac_cv_prog_cc_cross
952
953 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
954 echo "configure:955: checking whether we are using GNU C" >&5
955 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
956   echo $ac_n "(cached) $ac_c" 1>&6
957 else
958   cat > conftest.c <<EOF
959 #ifdef __GNUC__
960   yes;
961 #endif
962 EOF
963 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
964   ac_cv_prog_gcc=yes
965 else
966   ac_cv_prog_gcc=no
967 fi
968 fi
969
970 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
971
972 if test $ac_cv_prog_gcc = yes; then
973   GCC=yes
974 else
975   GCC=
976 fi
977
978 ac_test_CFLAGS="${CFLAGS+set}"
979 ac_save_CFLAGS="$CFLAGS"
980 CFLAGS=
981 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
982 echo "configure:983: checking whether ${CC-cc} accepts -g" >&5
983 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
984   echo $ac_n "(cached) $ac_c" 1>&6
985 else
986   echo 'void f(){}' > conftest.c
987 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
988   ac_cv_prog_cc_g=yes
989 else
990   ac_cv_prog_cc_g=no
991 fi
992 rm -f conftest*
993
994 fi
995
996 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
997 if test "$ac_test_CFLAGS" = set; then
998   CFLAGS="$ac_save_CFLAGS"
999 elif test $ac_cv_prog_cc_g = yes; then
1000   if test "$GCC" = yes; then
1001     CFLAGS="-g -O2"
1002   else
1003     CFLAGS="-g"
1004   fi
1005 else
1006   if test "$GCC" = yes; then
1007     CFLAGS="-O2"
1008   else
1009     CFLAGS=
1010   fi
1011 fi
1012
1013 # Find a good install program.  We prefer a C program (faster),
1014 # so one script is as good as another.  But avoid the broken or
1015 # incompatible versions:
1016 # SysV /etc/install, /usr/sbin/install
1017 # SunOS /usr/etc/install
1018 # IRIX /sbin/install
1019 # AIX /bin/install
1020 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1021 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1022 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1023 # ./install, which can be erroneously created by make from ./install.sh.
1024 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1025 echo "configure:1026: checking for a BSD compatible install" >&5
1026 if test -z "$INSTALL"; then
1027 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1028   echo $ac_n "(cached) $ac_c" 1>&6
1029 else
1030     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1031   for ac_dir in $PATH; do
1032     # Account for people who put trailing slashes in PATH elements.
1033     case "$ac_dir/" in
1034     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1035     *)
1036       # OSF1 and SCO ODT 3.0 have their own names for install.
1037       # Don't use installbsd from OSF since it installs stuff as root
1038       # by default.
1039       for ac_prog in ginstall scoinst install; do
1040         if test -f $ac_dir/$ac_prog; then
1041           if test $ac_prog = install &&
1042             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1043             # AIX install.  It has an incompatible calling convention.
1044             :
1045           else
1046             ac_cv_path_install="$ac_dir/$ac_prog -c"
1047             break 2
1048           fi
1049         fi
1050       done
1051       ;;
1052     esac
1053   done
1054   IFS="$ac_save_IFS"
1055
1056 fi
1057   if test "${ac_cv_path_install+set}" = set; then
1058     INSTALL="$ac_cv_path_install"
1059   else
1060     # As a last resort, use the slow shell script.  We don't cache a
1061     # path for INSTALL within a source directory, because that will
1062     # break other packages using the cache if that directory is
1063     # removed, or if the path is relative.
1064     INSTALL="$ac_install_sh"
1065   fi
1066 fi
1067 echo "$ac_t""$INSTALL" 1>&6
1068
1069 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1070 # It thinks the first close brace ends the variable substitution.
1071 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1072
1073 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1074
1075 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1076
1077
1078 . ${srcdir}/../../bfd/configure.host
1079
1080
1081
1082 AR=${AR-ar}
1083
1084 # Extract the first word of "ranlib", so it can be a program name with args.
1085 set dummy ranlib; ac_word=$2
1086 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1087 echo "configure:1088: checking for $ac_word" >&5
1088 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1089   echo $ac_n "(cached) $ac_c" 1>&6
1090 else
1091   if test -n "$RANLIB"; then
1092   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1093 else
1094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1095   ac_dummy="$PATH"
1096   for ac_dir in $ac_dummy; do
1097     test -z "$ac_dir" && ac_dir=.
1098     if test -f $ac_dir/$ac_word; then
1099       ac_cv_prog_RANLIB="ranlib"
1100       break
1101     fi
1102   done
1103   IFS="$ac_save_ifs"
1104   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1105 fi
1106 fi
1107 RANLIB="$ac_cv_prog_RANLIB"
1108 if test -n "$RANLIB"; then
1109   echo "$ac_t""$RANLIB" 1>&6
1110 else
1111   echo "$ac_t""no" 1>&6
1112 fi
1113
1114
1115 # Put a plausible default for CC_FOR_BUILD in Makefile.
1116 if test "x$cross_compiling" = "xno"; then
1117   CC_FOR_BUILD='$(CC)'
1118 else
1119   CC_FOR_BUILD=gcc
1120 fi
1121
1122
1123 ALL_LINGUAS=
1124 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1125 echo "configure:1126: checking how to run the C preprocessor" >&5
1126 # On Suns, sometimes $CPP names a directory.
1127 if test -n "$CPP" && test -d "$CPP"; then
1128   CPP=
1129 fi
1130 if test -z "$CPP"; then
1131 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1132   echo $ac_n "(cached) $ac_c" 1>&6
1133 else
1134     # This must be in double quotes, not single quotes, because CPP may get
1135   # substituted into the Makefile and "${CC-cc}" will confuse make.
1136   CPP="${CC-cc} -E"
1137   # On the NeXT, cc -E runs the code through the compiler's parser,
1138   # not just through cpp.
1139   cat > conftest.$ac_ext <<EOF
1140 #line 1141 "configure"
1141 #include "confdefs.h"
1142 #include <assert.h>
1143 Syntax Error
1144 EOF
1145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1146 { (eval echo configure:1147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1148 if test -z "$ac_err"; then
1149   :
1150 else
1151   echo "$ac_err" >&5
1152   echo "configure: failed program was:" >&5
1153   cat conftest.$ac_ext >&5
1154   rm -rf conftest*
1155   CPP="${CC-cc} -E -traditional-cpp"
1156   cat > conftest.$ac_ext <<EOF
1157 #line 1158 "configure"
1158 #include "confdefs.h"
1159 #include <assert.h>
1160 Syntax Error
1161 EOF
1162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1163 { (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1165 if test -z "$ac_err"; then
1166   :
1167 else
1168   echo "$ac_err" >&5
1169   echo "configure: failed program was:" >&5
1170   cat conftest.$ac_ext >&5
1171   rm -rf conftest*
1172   CPP="${CC-cc} -nologo -E"
1173   cat > conftest.$ac_ext <<EOF
1174 #line 1175 "configure"
1175 #include "confdefs.h"
1176 #include <assert.h>
1177 Syntax Error
1178 EOF
1179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1180 { (eval echo configure:1181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1182 if test -z "$ac_err"; then
1183   :
1184 else
1185   echo "$ac_err" >&5
1186   echo "configure: failed program was:" >&5
1187   cat conftest.$ac_ext >&5
1188   rm -rf conftest*
1189   CPP=/lib/cpp
1190 fi
1191 rm -f conftest*
1192 fi
1193 rm -f conftest*
1194 fi
1195 rm -f conftest*
1196   ac_cv_prog_CPP="$CPP"
1197 fi
1198   CPP="$ac_cv_prog_CPP"
1199 else
1200   ac_cv_prog_CPP="$CPP"
1201 fi
1202 echo "$ac_t""$CPP" 1>&6
1203
1204 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1205 echo "configure:1206: checking whether ${MAKE-make} sets \${MAKE}" >&5
1206 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1207 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1208   echo $ac_n "(cached) $ac_c" 1>&6
1209 else
1210   cat > conftestmake <<\EOF
1211 all:
1212         @echo 'ac_maketemp="${MAKE}"'
1213 EOF
1214 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1215 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1216 if test -n "$ac_maketemp"; then
1217   eval ac_cv_prog_make_${ac_make}_set=yes
1218 else
1219   eval ac_cv_prog_make_${ac_make}_set=no
1220 fi
1221 rm -f conftestmake
1222 fi
1223 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1224   echo "$ac_t""yes" 1>&6
1225   SET_MAKE=
1226 else
1227   echo "$ac_t""no" 1>&6
1228   SET_MAKE="MAKE=${MAKE-make}"
1229 fi
1230
1231 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1232 echo "configure:1233: checking for POSIXized ISC" >&5
1233 if test -d /etc/conf/kconfig.d &&
1234   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1235 then
1236   echo "$ac_t""yes" 1>&6
1237   ISC=yes # If later tests want to check for ISC.
1238   cat >> confdefs.h <<\EOF
1239 #define _POSIX_SOURCE 1
1240 EOF
1241
1242   if test "$GCC" = yes; then
1243     CC="$CC -posix"
1244   else
1245     CC="$CC -Xp"
1246   fi
1247 else
1248   echo "$ac_t""no" 1>&6
1249   ISC=
1250 fi
1251
1252 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1253 echo "configure:1254: checking for ANSI C header files" >&5
1254 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1255   echo $ac_n "(cached) $ac_c" 1>&6
1256 else
1257   cat > conftest.$ac_ext <<EOF
1258 #line 1259 "configure"
1259 #include "confdefs.h"
1260 #include <stdlib.h>
1261 #include <stdarg.h>
1262 #include <string.h>
1263 #include <float.h>
1264 EOF
1265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1266 { (eval echo configure:1267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1268 if test -z "$ac_err"; then
1269   rm -rf conftest*
1270   ac_cv_header_stdc=yes
1271 else
1272   echo "$ac_err" >&5
1273   echo "configure: failed program was:" >&5
1274   cat conftest.$ac_ext >&5
1275   rm -rf conftest*
1276   ac_cv_header_stdc=no
1277 fi
1278 rm -f conftest*
1279
1280 if test $ac_cv_header_stdc = yes; then
1281   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1282 cat > conftest.$ac_ext <<EOF
1283 #line 1284 "configure"
1284 #include "confdefs.h"
1285 #include <string.h>
1286 EOF
1287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1288   egrep "memchr" >/dev/null 2>&1; then
1289   :
1290 else
1291   rm -rf conftest*
1292   ac_cv_header_stdc=no
1293 fi
1294 rm -f conftest*
1295
1296 fi
1297
1298 if test $ac_cv_header_stdc = yes; then
1299   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1300 cat > conftest.$ac_ext <<EOF
1301 #line 1302 "configure"
1302 #include "confdefs.h"
1303 #include <stdlib.h>
1304 EOF
1305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1306   egrep "free" >/dev/null 2>&1; then
1307   :
1308 else
1309   rm -rf conftest*
1310   ac_cv_header_stdc=no
1311 fi
1312 rm -f conftest*
1313
1314 fi
1315
1316 if test $ac_cv_header_stdc = yes; then
1317   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1318 if test "$cross_compiling" = yes; then
1319   :
1320 else
1321   cat > conftest.$ac_ext <<EOF
1322 #line 1323 "configure"
1323 #include "confdefs.h"
1324 #include <ctype.h>
1325 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1326 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1327 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1328 int main () { int i; for (i = 0; i < 256; i++)
1329 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1330 exit (0); }
1331
1332 EOF
1333 if { (eval echo configure:1334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1334 then
1335   :
1336 else
1337   echo "configure: failed program was:" >&5
1338   cat conftest.$ac_ext >&5
1339   rm -fr conftest*
1340   ac_cv_header_stdc=no
1341 fi
1342 rm -fr conftest*
1343 fi
1344
1345 fi
1346 fi
1347
1348 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1349 if test $ac_cv_header_stdc = yes; then
1350   cat >> confdefs.h <<\EOF
1351 #define STDC_HEADERS 1
1352 EOF
1353
1354 fi
1355
1356 echo $ac_n "checking for working const""... $ac_c" 1>&6
1357 echo "configure:1358: checking for working const" >&5
1358 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1359   echo $ac_n "(cached) $ac_c" 1>&6
1360 else
1361   cat > conftest.$ac_ext <<EOF
1362 #line 1363 "configure"
1363 #include "confdefs.h"
1364
1365 int main() {
1366
1367 /* Ultrix mips cc rejects this.  */
1368 typedef int charset[2]; const charset x;
1369 /* SunOS 4.1.1 cc rejects this.  */
1370 char const *const *ccp;
1371 char **p;
1372 /* NEC SVR4.0.2 mips cc rejects this.  */
1373 struct point {int x, y;};
1374 static struct point const zero = {0,0};
1375 /* AIX XL C 1.02.0.0 rejects this.
1376    It does not let you subtract one const X* pointer from another in an arm
1377    of an if-expression whose if-part is not a constant expression */
1378 const char *g = "string";
1379 ccp = &g + (g ? g-g : 0);
1380 /* HPUX 7.0 cc rejects these. */
1381 ++ccp;
1382 p = (char**) ccp;
1383 ccp = (char const *const *) p;
1384 { /* SCO 3.2v4 cc rejects this.  */
1385   char *t;
1386   char const *s = 0 ? (char *) 0 : (char const *) 0;
1387
1388   *t++ = 0;
1389 }
1390 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1391   int x[] = {25, 17};
1392   const int *foo = &x[0];
1393   ++foo;
1394 }
1395 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1396   typedef const int *iptr;
1397   iptr p = 0;
1398   ++p;
1399 }
1400 { /* AIX XL C 1.02.0.0 rejects this saying
1401      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1402   struct s { int j; const int *ap[3]; };
1403   struct s *b; b->j = 5;
1404 }
1405 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1406   const int foo = 10;
1407 }
1408
1409 ; return 0; }
1410 EOF
1411 if { (eval echo configure:1412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1412   rm -rf conftest*
1413   ac_cv_c_const=yes
1414 else
1415   echo "configure: failed program was:" >&5
1416   cat conftest.$ac_ext >&5
1417   rm -rf conftest*
1418   ac_cv_c_const=no
1419 fi
1420 rm -f conftest*
1421 fi
1422
1423 echo "$ac_t""$ac_cv_c_const" 1>&6
1424 if test $ac_cv_c_const = no; then
1425   cat >> confdefs.h <<\EOF
1426 #define const 
1427 EOF
1428
1429 fi
1430
1431 echo $ac_n "checking for inline""... $ac_c" 1>&6
1432 echo "configure:1433: checking for inline" >&5
1433 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1434   echo $ac_n "(cached) $ac_c" 1>&6
1435 else
1436   ac_cv_c_inline=no
1437 for ac_kw in inline __inline__ __inline; do
1438   cat > conftest.$ac_ext <<EOF
1439 #line 1440 "configure"
1440 #include "confdefs.h"
1441
1442 int main() {
1443 } $ac_kw foo() {
1444 ; return 0; }
1445 EOF
1446 if { (eval echo configure:1447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1447   rm -rf conftest*
1448   ac_cv_c_inline=$ac_kw; break
1449 else
1450   echo "configure: failed program was:" >&5
1451   cat conftest.$ac_ext >&5
1452 fi
1453 rm -f conftest*
1454 done
1455
1456 fi
1457
1458 echo "$ac_t""$ac_cv_c_inline" 1>&6
1459 case "$ac_cv_c_inline" in
1460   inline | yes) ;;
1461   no) cat >> confdefs.h <<\EOF
1462 #define inline 
1463 EOF
1464  ;;
1465   *)  cat >> confdefs.h <<EOF
1466 #define inline $ac_cv_c_inline
1467 EOF
1468  ;;
1469 esac
1470
1471 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1472 echo "configure:1473: checking for off_t" >&5
1473 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1474   echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476   cat > conftest.$ac_ext <<EOF
1477 #line 1478 "configure"
1478 #include "confdefs.h"
1479 #include <sys/types.h>
1480 #if STDC_HEADERS
1481 #include <stdlib.h>
1482 #include <stddef.h>
1483 #endif
1484 EOF
1485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1486   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1487   rm -rf conftest*
1488   ac_cv_type_off_t=yes
1489 else
1490   rm -rf conftest*
1491   ac_cv_type_off_t=no
1492 fi
1493 rm -f conftest*
1494
1495 fi
1496 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1497 if test $ac_cv_type_off_t = no; then
1498   cat >> confdefs.h <<\EOF
1499 #define off_t long
1500 EOF
1501
1502 fi
1503
1504 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1505 echo "configure:1506: checking for size_t" >&5
1506 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1507   echo $ac_n "(cached) $ac_c" 1>&6
1508 else
1509   cat > conftest.$ac_ext <<EOF
1510 #line 1511 "configure"
1511 #include "confdefs.h"
1512 #include <sys/types.h>
1513 #if STDC_HEADERS
1514 #include <stdlib.h>
1515 #include <stddef.h>
1516 #endif
1517 EOF
1518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1519   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1520   rm -rf conftest*
1521   ac_cv_type_size_t=yes
1522 else
1523   rm -rf conftest*
1524   ac_cv_type_size_t=no
1525 fi
1526 rm -f conftest*
1527
1528 fi
1529 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1530 if test $ac_cv_type_size_t = no; then
1531   cat >> confdefs.h <<\EOF
1532 #define size_t unsigned
1533 EOF
1534
1535 fi
1536
1537 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1538 # for constant arguments.  Useless!
1539 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1540 echo "configure:1541: checking for working alloca.h" >&5
1541 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1542   echo $ac_n "(cached) $ac_c" 1>&6
1543 else
1544   cat > conftest.$ac_ext <<EOF
1545 #line 1546 "configure"
1546 #include "confdefs.h"
1547 #include <alloca.h>
1548 int main() {
1549 char *p = alloca(2 * sizeof(int));
1550 ; return 0; }
1551 EOF
1552 if { (eval echo configure:1553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1553   rm -rf conftest*
1554   ac_cv_header_alloca_h=yes
1555 else
1556   echo "configure: failed program was:" >&5
1557   cat conftest.$ac_ext >&5
1558   rm -rf conftest*
1559   ac_cv_header_alloca_h=no
1560 fi
1561 rm -f conftest*
1562 fi
1563
1564 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1565 if test $ac_cv_header_alloca_h = yes; then
1566   cat >> confdefs.h <<\EOF
1567 #define HAVE_ALLOCA_H 1
1568 EOF
1569
1570 fi
1571
1572 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1573 echo "configure:1574: checking for alloca" >&5
1574 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1575   echo $ac_n "(cached) $ac_c" 1>&6
1576 else
1577   cat > conftest.$ac_ext <<EOF
1578 #line 1579 "configure"
1579 #include "confdefs.h"
1580
1581 #ifdef __GNUC__
1582 # define alloca __builtin_alloca
1583 #else
1584 # ifdef _MSC_VER
1585 #  include <malloc.h>
1586 #  define alloca _alloca
1587 # else
1588 #  if HAVE_ALLOCA_H
1589 #   include <alloca.h>
1590 #  else
1591 #   ifdef _AIX
1592  #pragma alloca
1593 #   else
1594 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1595 char *alloca ();
1596 #    endif
1597 #   endif
1598 #  endif
1599 # endif
1600 #endif
1601
1602 int main() {
1603 char *p = (char *) alloca(1);
1604 ; return 0; }
1605 EOF
1606 if { (eval echo configure:1607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1607   rm -rf conftest*
1608   ac_cv_func_alloca_works=yes
1609 else
1610   echo "configure: failed program was:" >&5
1611   cat conftest.$ac_ext >&5
1612   rm -rf conftest*
1613   ac_cv_func_alloca_works=no
1614 fi
1615 rm -f conftest*
1616 fi
1617
1618 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1619 if test $ac_cv_func_alloca_works = yes; then
1620   cat >> confdefs.h <<\EOF
1621 #define HAVE_ALLOCA 1
1622 EOF
1623
1624 fi
1625
1626 if test $ac_cv_func_alloca_works = no; then
1627   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1628   # that cause trouble.  Some versions do not even contain alloca or
1629   # contain a buggy version.  If you still want to use their alloca,
1630   # use ar to extract alloca.o from them instead of compiling alloca.c.
1631   ALLOCA=alloca.${ac_objext}
1632   cat >> confdefs.h <<\EOF
1633 #define C_ALLOCA 1
1634 EOF
1635
1636
1637 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1638 echo "configure:1639: checking whether alloca needs Cray hooks" >&5
1639 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1640   echo $ac_n "(cached) $ac_c" 1>&6
1641 else
1642   cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1645 #if defined(CRAY) && ! defined(CRAY2)
1646 webecray
1647 #else
1648 wenotbecray
1649 #endif
1650
1651 EOF
1652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1653   egrep "webecray" >/dev/null 2>&1; then
1654   rm -rf conftest*
1655   ac_cv_os_cray=yes
1656 else
1657   rm -rf conftest*
1658   ac_cv_os_cray=no
1659 fi
1660 rm -f conftest*
1661
1662 fi
1663
1664 echo "$ac_t""$ac_cv_os_cray" 1>&6
1665 if test $ac_cv_os_cray = yes; then
1666 for ac_func in _getb67 GETB67 getb67; do
1667   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1668 echo "configure:1669: checking for $ac_func" >&5
1669 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1670   echo $ac_n "(cached) $ac_c" 1>&6
1671 else
1672   cat > conftest.$ac_ext <<EOF
1673 #line 1674 "configure"
1674 #include "confdefs.h"
1675 /* System header to define __stub macros and hopefully few prototypes,
1676     which can conflict with char $ac_func(); below.  */
1677 #include <assert.h>
1678 /* Override any gcc2 internal prototype to avoid an error.  */
1679 /* We use char because int might match the return type of a gcc2
1680     builtin and then its argument prototype would still apply.  */
1681 char $ac_func();
1682
1683 int main() {
1684
1685 /* The GNU C library defines this for functions which it implements
1686     to always fail with ENOSYS.  Some functions are actually named
1687     something starting with __ and the normal name is an alias.  */
1688 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1689 choke me
1690 #else
1691 $ac_func();
1692 #endif
1693
1694 ; return 0; }
1695 EOF
1696 if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1697   rm -rf conftest*
1698   eval "ac_cv_func_$ac_func=yes"
1699 else
1700   echo "configure: failed program was:" >&5
1701   cat conftest.$ac_ext >&5
1702   rm -rf conftest*
1703   eval "ac_cv_func_$ac_func=no"
1704 fi
1705 rm -f conftest*
1706 fi
1707
1708 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1709   echo "$ac_t""yes" 1>&6
1710   cat >> confdefs.h <<EOF
1711 #define CRAY_STACKSEG_END $ac_func
1712 EOF
1713
1714   break
1715 else
1716   echo "$ac_t""no" 1>&6
1717 fi
1718
1719 done
1720 fi
1721
1722 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1723 echo "configure:1724: checking stack direction for C alloca" >&5
1724 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1725   echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727   if test "$cross_compiling" = yes; then
1728   ac_cv_c_stack_direction=0
1729 else
1730   cat > conftest.$ac_ext <<EOF
1731 #line 1732 "configure"
1732 #include "confdefs.h"
1733 find_stack_direction ()
1734 {
1735   static char *addr = 0;
1736   auto char dummy;
1737   if (addr == 0)
1738     {
1739       addr = &dummy;
1740       return find_stack_direction ();
1741     }
1742   else
1743     return (&dummy > addr) ? 1 : -1;
1744 }
1745 main ()
1746 {
1747   exit (find_stack_direction() < 0);
1748 }
1749 EOF
1750 if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1751 then
1752   ac_cv_c_stack_direction=1
1753 else
1754   echo "configure: failed program was:" >&5
1755   cat conftest.$ac_ext >&5
1756   rm -fr conftest*
1757   ac_cv_c_stack_direction=-1
1758 fi
1759 rm -fr conftest*
1760 fi
1761
1762 fi
1763
1764 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1765 cat >> confdefs.h <<EOF
1766 #define STACK_DIRECTION $ac_cv_c_stack_direction
1767 EOF
1768
1769 fi
1770
1771 for ac_hdr in unistd.h
1772 do
1773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1775 echo "configure:1776: checking for $ac_hdr" >&5
1776 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1777   echo $ac_n "(cached) $ac_c" 1>&6
1778 else
1779   cat > conftest.$ac_ext <<EOF
1780 #line 1781 "configure"
1781 #include "confdefs.h"
1782 #include <$ac_hdr>
1783 EOF
1784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1785 { (eval echo configure:1786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1787 if test -z "$ac_err"; then
1788   rm -rf conftest*
1789   eval "ac_cv_header_$ac_safe=yes"
1790 else
1791   echo "$ac_err" >&5
1792   echo "configure: failed program was:" >&5
1793   cat conftest.$ac_ext >&5
1794   rm -rf conftest*
1795   eval "ac_cv_header_$ac_safe=no"
1796 fi
1797 rm -f conftest*
1798 fi
1799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1800   echo "$ac_t""yes" 1>&6
1801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1802   cat >> confdefs.h <<EOF
1803 #define $ac_tr_hdr 1
1804 EOF
1805  
1806 else
1807   echo "$ac_t""no" 1>&6
1808 fi
1809 done
1810
1811 for ac_func in getpagesize
1812 do
1813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1814 echo "configure:1815: checking for $ac_func" >&5
1815 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1816   echo $ac_n "(cached) $ac_c" 1>&6
1817 else
1818   cat > conftest.$ac_ext <<EOF
1819 #line 1820 "configure"
1820 #include "confdefs.h"
1821 /* System header to define __stub macros and hopefully few prototypes,
1822     which can conflict with char $ac_func(); below.  */
1823 #include <assert.h>
1824 /* Override any gcc2 internal prototype to avoid an error.  */
1825 /* We use char because int might match the return type of a gcc2
1826     builtin and then its argument prototype would still apply.  */
1827 char $ac_func();
1828
1829 int main() {
1830
1831 /* The GNU C library defines this for functions which it implements
1832     to always fail with ENOSYS.  Some functions are actually named
1833     something starting with __ and the normal name is an alias.  */
1834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1835 choke me
1836 #else
1837 $ac_func();
1838 #endif
1839
1840 ; return 0; }
1841 EOF
1842 if { (eval echo configure:1843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1843   rm -rf conftest*
1844   eval "ac_cv_func_$ac_func=yes"
1845 else
1846   echo "configure: failed program was:" >&5
1847   cat conftest.$ac_ext >&5
1848   rm -rf conftest*
1849   eval "ac_cv_func_$ac_func=no"
1850 fi
1851 rm -f conftest*
1852 fi
1853
1854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1855   echo "$ac_t""yes" 1>&6
1856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1857   cat >> confdefs.h <<EOF
1858 #define $ac_tr_func 1
1859 EOF
1860  
1861 else
1862   echo "$ac_t""no" 1>&6
1863 fi
1864 done
1865
1866 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1867 echo "configure:1868: checking for working mmap" >&5
1868 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1869   echo $ac_n "(cached) $ac_c" 1>&6
1870 else
1871   if test "$cross_compiling" = yes; then
1872   ac_cv_func_mmap_fixed_mapped=no
1873 else
1874   cat > conftest.$ac_ext <<EOF
1875 #line 1876 "configure"
1876 #include "confdefs.h"
1877
1878 /* Thanks to Mike Haertel and Jim Avera for this test.
1879    Here is a matrix of mmap possibilities:
1880         mmap private not fixed
1881         mmap private fixed at somewhere currently unmapped
1882         mmap private fixed at somewhere already mapped
1883         mmap shared not fixed
1884         mmap shared fixed at somewhere currently unmapped
1885         mmap shared fixed at somewhere already mapped
1886    For private mappings, we should verify that changes cannot be read()
1887    back from the file, nor mmap's back from the file at a different
1888    address.  (There have been systems where private was not correctly
1889    implemented like the infamous i386 svr4.0, and systems where the
1890    VM page cache was not coherent with the filesystem buffer cache
1891    like early versions of FreeBSD and possibly contemporary NetBSD.)
1892    For shared mappings, we should conversely verify that changes get
1893    propogated back to all the places they're supposed to be.
1894
1895    Grep wants private fixed already mapped.
1896    The main things grep needs to know about mmap are:
1897    * does it exist and is it safe to write into the mmap'd area
1898    * how to use it (BSD variants)  */
1899 #include <sys/types.h>
1900 #include <fcntl.h>
1901 #include <sys/mman.h>
1902
1903 /* This mess was copied from the GNU getpagesize.h.  */
1904 #ifndef HAVE_GETPAGESIZE
1905 # ifdef HAVE_UNISTD_H
1906 #  include <unistd.h>
1907 # endif
1908
1909 /* Assume that all systems that can run configure have sys/param.h.  */
1910 # ifndef HAVE_SYS_PARAM_H
1911 #  define HAVE_SYS_PARAM_H 1
1912 # endif
1913
1914 # ifdef _SC_PAGESIZE
1915 #  define getpagesize() sysconf(_SC_PAGESIZE)
1916 # else /* no _SC_PAGESIZE */
1917 #  ifdef HAVE_SYS_PARAM_H
1918 #   include <sys/param.h>
1919 #   ifdef EXEC_PAGESIZE
1920 #    define getpagesize() EXEC_PAGESIZE
1921 #   else /* no EXEC_PAGESIZE */
1922 #    ifdef NBPG
1923 #     define getpagesize() NBPG * CLSIZE
1924 #     ifndef CLSIZE
1925 #      define CLSIZE 1
1926 #     endif /* no CLSIZE */
1927 #    else /* no NBPG */
1928 #     ifdef NBPC
1929 #      define getpagesize() NBPC
1930 #     else /* no NBPC */
1931 #      ifdef PAGESIZE
1932 #       define getpagesize() PAGESIZE
1933 #      endif /* PAGESIZE */
1934 #     endif /* no NBPC */
1935 #    endif /* no NBPG */
1936 #   endif /* no EXEC_PAGESIZE */
1937 #  else /* no HAVE_SYS_PARAM_H */
1938 #   define getpagesize() 8192   /* punt totally */
1939 #  endif /* no HAVE_SYS_PARAM_H */
1940 # endif /* no _SC_PAGESIZE */
1941
1942 #endif /* no HAVE_GETPAGESIZE */
1943
1944 #ifdef __cplusplus
1945 extern "C" { void *malloc(unsigned); }
1946 #else
1947 char *malloc();
1948 #endif
1949
1950 int
1951 main()
1952 {
1953         char *data, *data2, *data3;
1954         int i, pagesize;
1955         int fd;
1956
1957         pagesize = getpagesize();
1958
1959         /*
1960          * First, make a file with some known garbage in it.
1961          */
1962         data = malloc(pagesize);
1963         if (!data)
1964                 exit(1);
1965         for (i = 0; i < pagesize; ++i)
1966                 *(data + i) = rand();
1967         umask(0);
1968         fd = creat("conftestmmap", 0600);
1969         if (fd < 0)
1970                 exit(1);
1971         if (write(fd, data, pagesize) != pagesize)
1972                 exit(1);
1973         close(fd);
1974
1975         /*
1976          * Next, try to mmap the file at a fixed address which
1977          * already has something else allocated at it.  If we can,
1978          * also make sure that we see the same garbage.
1979          */
1980         fd = open("conftestmmap", O_RDWR);
1981         if (fd < 0)
1982                 exit(1);
1983         data2 = malloc(2 * pagesize);
1984         if (!data2)
1985                 exit(1);
1986         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1987         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1988             MAP_PRIVATE | MAP_FIXED, fd, 0L))
1989                 exit(1);
1990         for (i = 0; i < pagesize; ++i)
1991                 if (*(data + i) != *(data2 + i))
1992                         exit(1);
1993
1994         /*
1995          * Finally, make sure that changes to the mapped area
1996          * do not percolate back to the file as seen by read().
1997          * (This is a bug on some variants of i386 svr4.0.)
1998          */
1999         for (i = 0; i < pagesize; ++i)
2000                 *(data2 + i) = *(data2 + i) + 1;
2001         data3 = malloc(pagesize);
2002         if (!data3)
2003                 exit(1);
2004         if (read(fd, data3, pagesize) != pagesize)
2005                 exit(1);
2006         for (i = 0; i < pagesize; ++i)
2007                 if (*(data + i) != *(data3 + i))
2008                         exit(1);
2009         close(fd);
2010         unlink("conftestmmap");
2011         exit(0);
2012 }
2013
2014 EOF
2015 if { (eval echo configure:2016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2016 then
2017   ac_cv_func_mmap_fixed_mapped=yes
2018 else
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021   rm -fr conftest*
2022   ac_cv_func_mmap_fixed_mapped=no
2023 fi
2024 rm -fr conftest*
2025 fi
2026
2027 fi
2028
2029 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2030 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2031   cat >> confdefs.h <<\EOF
2032 #define HAVE_MMAP 1
2033 EOF
2034
2035 fi
2036
2037                               
2038    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2039 unistd.h values.h sys/param.h
2040 do
2041 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2042 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2043 echo "configure:2044: checking for $ac_hdr" >&5
2044 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2045   echo $ac_n "(cached) $ac_c" 1>&6
2046 else
2047   cat > conftest.$ac_ext <<EOF
2048 #line 2049 "configure"
2049 #include "confdefs.h"
2050 #include <$ac_hdr>
2051 EOF
2052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2053 { (eval echo configure:2054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2055 if test -z "$ac_err"; then
2056   rm -rf conftest*
2057   eval "ac_cv_header_$ac_safe=yes"
2058 else
2059   echo "$ac_err" >&5
2060   echo "configure: failed program was:" >&5
2061   cat conftest.$ac_ext >&5
2062   rm -rf conftest*
2063   eval "ac_cv_header_$ac_safe=no"
2064 fi
2065 rm -f conftest*
2066 fi
2067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2068   echo "$ac_t""yes" 1>&6
2069     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2070   cat >> confdefs.h <<EOF
2071 #define $ac_tr_hdr 1
2072 EOF
2073  
2074 else
2075   echo "$ac_t""no" 1>&6
2076 fi
2077 done
2078
2079    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2080 __argz_count __argz_stringify __argz_next
2081 do
2082 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2083 echo "configure:2084: checking for $ac_func" >&5
2084 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2085   echo $ac_n "(cached) $ac_c" 1>&6
2086 else
2087   cat > conftest.$ac_ext <<EOF
2088 #line 2089 "configure"
2089 #include "confdefs.h"
2090 /* System header to define __stub macros and hopefully few prototypes,
2091     which can conflict with char $ac_func(); below.  */
2092 #include <assert.h>
2093 /* Override any gcc2 internal prototype to avoid an error.  */
2094 /* We use char because int might match the return type of a gcc2
2095     builtin and then its argument prototype would still apply.  */
2096 char $ac_func();
2097
2098 int main() {
2099
2100 /* The GNU C library defines this for functions which it implements
2101     to always fail with ENOSYS.  Some functions are actually named
2102     something starting with __ and the normal name is an alias.  */
2103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2104 choke me
2105 #else
2106 $ac_func();
2107 #endif
2108
2109 ; return 0; }
2110 EOF
2111 if { (eval echo configure:2112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2112   rm -rf conftest*
2113   eval "ac_cv_func_$ac_func=yes"
2114 else
2115   echo "configure: failed program was:" >&5
2116   cat conftest.$ac_ext >&5
2117   rm -rf conftest*
2118   eval "ac_cv_func_$ac_func=no"
2119 fi
2120 rm -f conftest*
2121 fi
2122
2123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2124   echo "$ac_t""yes" 1>&6
2125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2126   cat >> confdefs.h <<EOF
2127 #define $ac_tr_func 1
2128 EOF
2129  
2130 else
2131   echo "$ac_t""no" 1>&6
2132 fi
2133 done
2134
2135
2136    if test "${ac_cv_func_stpcpy+set}" != "set"; then
2137      for ac_func in stpcpy
2138 do
2139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2140 echo "configure:2141: checking for $ac_func" >&5
2141 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2142   echo $ac_n "(cached) $ac_c" 1>&6
2143 else
2144   cat > conftest.$ac_ext <<EOF
2145 #line 2146 "configure"
2146 #include "confdefs.h"
2147 /* System header to define __stub macros and hopefully few prototypes,
2148     which can conflict with char $ac_func(); below.  */
2149 #include <assert.h>
2150 /* Override any gcc2 internal prototype to avoid an error.  */
2151 /* We use char because int might match the return type of a gcc2
2152     builtin and then its argument prototype would still apply.  */
2153 char $ac_func();
2154
2155 int main() {
2156
2157 /* The GNU C library defines this for functions which it implements
2158     to always fail with ENOSYS.  Some functions are actually named
2159     something starting with __ and the normal name is an alias.  */
2160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2161 choke me
2162 #else
2163 $ac_func();
2164 #endif
2165
2166 ; return 0; }
2167 EOF
2168 if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2169   rm -rf conftest*
2170   eval "ac_cv_func_$ac_func=yes"
2171 else
2172   echo "configure: failed program was:" >&5
2173   cat conftest.$ac_ext >&5
2174   rm -rf conftest*
2175   eval "ac_cv_func_$ac_func=no"
2176 fi
2177 rm -f conftest*
2178 fi
2179
2180 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2181   echo "$ac_t""yes" 1>&6
2182     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2183   cat >> confdefs.h <<EOF
2184 #define $ac_tr_func 1
2185 EOF
2186  
2187 else
2188   echo "$ac_t""no" 1>&6
2189 fi
2190 done
2191
2192    fi
2193    if test "${ac_cv_func_stpcpy}" = "yes"; then
2194      cat >> confdefs.h <<\EOF
2195 #define HAVE_STPCPY 1
2196 EOF
2197
2198    fi
2199
2200    if test $ac_cv_header_locale_h = yes; then
2201     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2202 echo "configure:2203: checking for LC_MESSAGES" >&5
2203 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2204   echo $ac_n "(cached) $ac_c" 1>&6
2205 else
2206   cat > conftest.$ac_ext <<EOF
2207 #line 2208 "configure"
2208 #include "confdefs.h"
2209 #include <locale.h>
2210 int main() {
2211 return LC_MESSAGES
2212 ; return 0; }
2213 EOF
2214 if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2215   rm -rf conftest*
2216   am_cv_val_LC_MESSAGES=yes
2217 else
2218   echo "configure: failed program was:" >&5
2219   cat conftest.$ac_ext >&5
2220   rm -rf conftest*
2221   am_cv_val_LC_MESSAGES=no
2222 fi
2223 rm -f conftest*
2224 fi
2225
2226 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2227     if test $am_cv_val_LC_MESSAGES = yes; then
2228       cat >> confdefs.h <<\EOF
2229 #define HAVE_LC_MESSAGES 1
2230 EOF
2231
2232     fi
2233   fi
2234    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2235 echo "configure:2236: checking whether NLS is requested" >&5
2236         # Check whether --enable-nls or --disable-nls was given.
2237 if test "${enable_nls+set}" = set; then
2238   enableval="$enable_nls"
2239   USE_NLS=$enableval
2240 else
2241   USE_NLS=yes
2242 fi
2243
2244     echo "$ac_t""$USE_NLS" 1>&6
2245     
2246
2247     USE_INCLUDED_LIBINTL=no
2248
2249         if test "$USE_NLS" = "yes"; then
2250       cat >> confdefs.h <<\EOF
2251 #define ENABLE_NLS 1
2252 EOF
2253
2254       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2255 echo "configure:2256: checking whether included gettext is requested" >&5
2256       # Check whether --with-included-gettext or --without-included-gettext was given.
2257 if test "${with_included_gettext+set}" = set; then
2258   withval="$with_included_gettext"
2259   nls_cv_force_use_gnu_gettext=$withval
2260 else
2261   nls_cv_force_use_gnu_gettext=no
2262 fi
2263
2264       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2265
2266       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2267       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2268                                         nls_cv_header_intl=
2269         nls_cv_header_libgt=
2270         CATOBJEXT=NONE
2271
2272         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2273 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2274 echo "configure:2275: checking for libintl.h" >&5
2275 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2276   echo $ac_n "(cached) $ac_c" 1>&6
2277 else
2278   cat > conftest.$ac_ext <<EOF
2279 #line 2280 "configure"
2280 #include "confdefs.h"
2281 #include <libintl.h>
2282 EOF
2283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2284 { (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2286 if test -z "$ac_err"; then
2287   rm -rf conftest*
2288   eval "ac_cv_header_$ac_safe=yes"
2289 else
2290   echo "$ac_err" >&5
2291   echo "configure: failed program was:" >&5
2292   cat conftest.$ac_ext >&5
2293   rm -rf conftest*
2294   eval "ac_cv_header_$ac_safe=no"
2295 fi
2296 rm -f conftest*
2297 fi
2298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2299   echo "$ac_t""yes" 1>&6
2300   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2301 echo "configure:2302: checking for gettext in libc" >&5
2302 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2303   echo $ac_n "(cached) $ac_c" 1>&6
2304 else
2305   cat > conftest.$ac_ext <<EOF
2306 #line 2307 "configure"
2307 #include "confdefs.h"
2308 #include <libintl.h>
2309 int main() {
2310 return (int) gettext ("")
2311 ; return 0; }
2312 EOF
2313 if { (eval echo configure:2314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2314   rm -rf conftest*
2315   gt_cv_func_gettext_libc=yes
2316 else
2317   echo "configure: failed program was:" >&5
2318   cat conftest.$ac_ext >&5
2319   rm -rf conftest*
2320   gt_cv_func_gettext_libc=no
2321 fi
2322 rm -f conftest*
2323 fi
2324
2325 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2326
2327            if test "$gt_cv_func_gettext_libc" != "yes"; then
2328              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2329 echo "configure:2330: checking for bindtextdomain in -lintl" >&5
2330 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2331 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2332   echo $ac_n "(cached) $ac_c" 1>&6
2333 else
2334   ac_save_LIBS="$LIBS"
2335 LIBS="-lintl  $LIBS"
2336 cat > conftest.$ac_ext <<EOF
2337 #line 2338 "configure"
2338 #include "confdefs.h"
2339 /* Override any gcc2 internal prototype to avoid an error.  */
2340 /* We use char because int might match the return type of a gcc2
2341     builtin and then its argument prototype would still apply.  */
2342 char bindtextdomain();
2343
2344 int main() {
2345 bindtextdomain()
2346 ; return 0; }
2347 EOF
2348 if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2349   rm -rf conftest*
2350   eval "ac_cv_lib_$ac_lib_var=yes"
2351 else
2352   echo "configure: failed program was:" >&5
2353   cat conftest.$ac_ext >&5
2354   rm -rf conftest*
2355   eval "ac_cv_lib_$ac_lib_var=no"
2356 fi
2357 rm -f conftest*
2358 LIBS="$ac_save_LIBS"
2359
2360 fi
2361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2362   echo "$ac_t""yes" 1>&6
2363   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2364 echo "configure:2365: checking for gettext in libintl" >&5
2365 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2366   echo $ac_n "(cached) $ac_c" 1>&6
2367 else
2368   cat > conftest.$ac_ext <<EOF
2369 #line 2370 "configure"
2370 #include "confdefs.h"
2371
2372 int main() {
2373 return (int) gettext ("")
2374 ; return 0; }
2375 EOF
2376 if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2377   rm -rf conftest*
2378   gt_cv_func_gettext_libintl=yes
2379 else
2380   echo "configure: failed program was:" >&5
2381   cat conftest.$ac_ext >&5
2382   rm -rf conftest*
2383   gt_cv_func_gettext_libintl=no
2384 fi
2385 rm -f conftest*
2386 fi
2387
2388 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2389 else
2390   echo "$ac_t""no" 1>&6
2391 fi
2392
2393            fi
2394
2395            if test "$gt_cv_func_gettext_libc" = "yes" \
2396               || test "$gt_cv_func_gettext_libintl" = "yes"; then
2397               cat >> confdefs.h <<\EOF
2398 #define HAVE_GETTEXT 1
2399 EOF
2400
2401               # Extract the first word of "msgfmt", so it can be a program name with args.
2402 set dummy msgfmt; ac_word=$2
2403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2404 echo "configure:2405: checking for $ac_word" >&5
2405 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2406   echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408   case "$MSGFMT" in
2409   /*)
2410   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2411   ;;
2412   *)
2413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2414   for ac_dir in $PATH; do
2415     test -z "$ac_dir" && ac_dir=.
2416     if test -f $ac_dir/$ac_word; then
2417       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2418         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2419         break
2420       fi
2421     fi
2422   done
2423   IFS="$ac_save_ifs"
2424   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2425   ;;
2426 esac
2427 fi
2428 MSGFMT="$ac_cv_path_MSGFMT"
2429 if test -n "$MSGFMT"; then
2430   echo "$ac_t""$MSGFMT" 1>&6
2431 else
2432   echo "$ac_t""no" 1>&6
2433 fi
2434               if test "$MSGFMT" != "no"; then
2435                 for ac_func in dcgettext
2436 do
2437 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2438 echo "configure:2439: checking for $ac_func" >&5
2439 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2440   echo $ac_n "(cached) $ac_c" 1>&6
2441 else
2442   cat > conftest.$ac_ext <<EOF
2443 #line 2444 "configure"
2444 #include "confdefs.h"
2445 /* System header to define __stub macros and hopefully few prototypes,
2446     which can conflict with char $ac_func(); below.  */
2447 #include <assert.h>
2448 /* Override any gcc2 internal prototype to avoid an error.  */
2449 /* We use char because int might match the return type of a gcc2
2450     builtin and then its argument prototype would still apply.  */
2451 char $ac_func();
2452
2453 int main() {
2454
2455 /* The GNU C library defines this for functions which it implements
2456     to always fail with ENOSYS.  Some functions are actually named
2457     something starting with __ and the normal name is an alias.  */
2458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2459 choke me
2460 #else
2461 $ac_func();
2462 #endif
2463
2464 ; return 0; }
2465 EOF
2466 if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2467   rm -rf conftest*
2468   eval "ac_cv_func_$ac_func=yes"
2469 else
2470   echo "configure: failed program was:" >&5
2471   cat conftest.$ac_ext >&5
2472   rm -rf conftest*
2473   eval "ac_cv_func_$ac_func=no"
2474 fi
2475 rm -f conftest*
2476 fi
2477
2478 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2479   echo "$ac_t""yes" 1>&6
2480     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2481   cat >> confdefs.h <<EOF
2482 #define $ac_tr_func 1
2483 EOF
2484  
2485 else
2486   echo "$ac_t""no" 1>&6
2487 fi
2488 done
2489
2490                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2491 set dummy gmsgfmt; ac_word=$2
2492 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2493 echo "configure:2494: checking for $ac_word" >&5
2494 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2495   echo $ac_n "(cached) $ac_c" 1>&6
2496 else
2497   case "$GMSGFMT" in
2498   /*)
2499   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2500   ;;
2501   ?:/*)                  
2502   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2503   ;;
2504   *)
2505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2506   ac_dummy="$PATH"
2507   for ac_dir in $ac_dummy; do 
2508     test -z "$ac_dir" && ac_dir=.
2509     if test -f $ac_dir/$ac_word; then
2510       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2511       break
2512     fi
2513   done
2514   IFS="$ac_save_ifs"
2515   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2516   ;;
2517 esac
2518 fi
2519 GMSGFMT="$ac_cv_path_GMSGFMT"
2520 if test -n "$GMSGFMT"; then
2521   echo "$ac_t""$GMSGFMT" 1>&6
2522 else
2523   echo "$ac_t""no" 1>&6
2524 fi
2525
2526                 # Extract the first word of "xgettext", so it can be a program name with args.
2527 set dummy xgettext; ac_word=$2
2528 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2529 echo "configure:2530: checking for $ac_word" >&5
2530 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2531   echo $ac_n "(cached) $ac_c" 1>&6
2532 else
2533   case "$XGETTEXT" in
2534   /*)
2535   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2536   ;;
2537   *)
2538   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2539   for ac_dir in $PATH; do
2540     test -z "$ac_dir" && ac_dir=.
2541     if test -f $ac_dir/$ac_word; then
2542       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2543         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2544         break
2545       fi
2546     fi
2547   done
2548   IFS="$ac_save_ifs"
2549   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2550   ;;
2551 esac
2552 fi
2553 XGETTEXT="$ac_cv_path_XGETTEXT"
2554 if test -n "$XGETTEXT"; then
2555   echo "$ac_t""$XGETTEXT" 1>&6
2556 else
2557   echo "$ac_t""no" 1>&6
2558 fi
2559
2560                 cat > conftest.$ac_ext <<EOF
2561 #line 2562 "configure"
2562 #include "confdefs.h"
2563
2564 int main() {
2565 extern int _nl_msg_cat_cntr;
2566                                return _nl_msg_cat_cntr
2567 ; return 0; }
2568 EOF
2569 if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2570   rm -rf conftest*
2571   CATOBJEXT=.gmo
2572                    DATADIRNAME=share
2573 else
2574   echo "configure: failed program was:" >&5
2575   cat conftest.$ac_ext >&5
2576   rm -rf conftest*
2577   CATOBJEXT=.mo
2578                    DATADIRNAME=lib
2579 fi
2580 rm -f conftest*
2581                 INSTOBJEXT=.mo
2582               fi
2583             fi
2584         
2585 else
2586   echo "$ac_t""no" 1>&6
2587 fi
2588
2589
2590                 
2591         if test "$CATOBJEXT" = "NONE"; then
2592                           nls_cv_use_gnu_gettext=yes
2593         fi
2594       fi
2595
2596       if test "$nls_cv_use_gnu_gettext" = "yes"; then
2597                 INTLOBJS="\$(GETTOBJS)"
2598         # Extract the first word of "msgfmt", so it can be a program name with args.
2599 set dummy msgfmt; ac_word=$2
2600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2601 echo "configure:2602: checking for $ac_word" >&5
2602 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2603   echo $ac_n "(cached) $ac_c" 1>&6
2604 else
2605   case "$MSGFMT" in
2606   /*)
2607   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2608   ;;
2609   *)
2610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2611   for ac_dir in $PATH; do
2612     test -z "$ac_dir" && ac_dir=.
2613     if test -f $ac_dir/$ac_word; then
2614       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2615         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2616         break
2617       fi
2618     fi
2619   done
2620   IFS="$ac_save_ifs"
2621   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2622   ;;
2623 esac
2624 fi
2625 MSGFMT="$ac_cv_path_MSGFMT"
2626 if test -n "$MSGFMT"; then
2627   echo "$ac_t""$MSGFMT" 1>&6
2628 else
2629   echo "$ac_t""no" 1>&6
2630 fi
2631
2632         # Extract the first word of "gmsgfmt", so it can be a program name with args.
2633 set dummy gmsgfmt; ac_word=$2
2634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2635 echo "configure:2636: checking for $ac_word" >&5
2636 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2637   echo $ac_n "(cached) $ac_c" 1>&6
2638 else
2639   case "$GMSGFMT" in
2640   /*)
2641   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2642   ;;
2643   ?:/*)                  
2644   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2645   ;;
2646   *)
2647   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2648   ac_dummy="$PATH"
2649   for ac_dir in $ac_dummy; do 
2650     test -z "$ac_dir" && ac_dir=.
2651     if test -f $ac_dir/$ac_word; then
2652       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2653       break
2654     fi
2655   done
2656   IFS="$ac_save_ifs"
2657   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2658   ;;
2659 esac
2660 fi
2661 GMSGFMT="$ac_cv_path_GMSGFMT"
2662 if test -n "$GMSGFMT"; then
2663   echo "$ac_t""$GMSGFMT" 1>&6
2664 else
2665   echo "$ac_t""no" 1>&6
2666 fi
2667
2668         # Extract the first word of "xgettext", so it can be a program name with args.
2669 set dummy xgettext; ac_word=$2
2670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2671 echo "configure:2672: checking for $ac_word" >&5
2672 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2673   echo $ac_n "(cached) $ac_c" 1>&6
2674 else
2675   case "$XGETTEXT" in
2676   /*)
2677   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2678   ;;
2679   *)
2680   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2681   for ac_dir in $PATH; do
2682     test -z "$ac_dir" && ac_dir=.
2683     if test -f $ac_dir/$ac_word; then
2684       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2685         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2686         break
2687       fi
2688     fi
2689   done
2690   IFS="$ac_save_ifs"
2691   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2692   ;;
2693 esac
2694 fi
2695 XGETTEXT="$ac_cv_path_XGETTEXT"
2696 if test -n "$XGETTEXT"; then
2697   echo "$ac_t""$XGETTEXT" 1>&6
2698 else
2699   echo "$ac_t""no" 1>&6
2700 fi
2701
2702         
2703         USE_INCLUDED_LIBINTL=yes
2704         CATOBJEXT=.gmo
2705         INSTOBJEXT=.mo
2706         DATADIRNAME=share
2707         INTLDEPS='$(top_builddir)/../intl/libintl.a'
2708         INTLLIBS=$INTLDEPS
2709         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2710         nls_cv_header_intl=libintl.h
2711         nls_cv_header_libgt=libgettext.h
2712       fi
2713
2714             if test "$XGETTEXT" != ":"; then
2715                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2716           : ;
2717         else
2718           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2719           XGETTEXT=":"
2720         fi
2721       fi
2722
2723       # We need to process the po/ directory.
2724       POSUB=po
2725     else
2726       DATADIRNAME=share
2727       nls_cv_header_intl=libintl.h
2728       nls_cv_header_libgt=libgettext.h
2729     fi
2730
2731     # If this is used in GNU gettext we have to set USE_NLS to `yes'
2732     # because some of the sources are only built for this goal.
2733     if test "$PACKAGE" = gettext; then
2734       USE_NLS=yes
2735       USE_INCLUDED_LIBINTL=yes
2736     fi
2737
2738                 for lang in $ALL_LINGUAS; do
2739       GMOFILES="$GMOFILES $lang.gmo"
2740       POFILES="$POFILES $lang.po"
2741     done
2742
2743         
2744     
2745     
2746     
2747     
2748     
2749     
2750     
2751     
2752     
2753     
2754   
2755
2756    if test "x$CATOBJEXT" != "x"; then
2757      if test "x$ALL_LINGUAS" = "x"; then
2758        LINGUAS=
2759      else
2760        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2761 echo "configure:2762: checking for catalogs to be installed" >&5
2762        NEW_LINGUAS=
2763        for lang in ${LINGUAS=$ALL_LINGUAS}; do
2764          case "$ALL_LINGUAS" in
2765           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2766          esac
2767        done
2768        LINGUAS=$NEW_LINGUAS
2769        echo "$ac_t""$LINGUAS" 1>&6
2770      fi
2771
2772           if test -n "$LINGUAS"; then
2773        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2774      fi
2775    fi
2776
2777             if test $ac_cv_header_locale_h = yes; then
2778      INCLUDE_LOCALE_H="#include <locale.h>"
2779    else
2780      INCLUDE_LOCALE_H="\
2781 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
2782    fi
2783    
2784
2785             if test -f $srcdir/po2tbl.sed.in; then
2786       if test "$CATOBJEXT" = ".cat"; then
2787          ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2788 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2789 echo "configure:2790: checking for linux/version.h" >&5
2790 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2791   echo $ac_n "(cached) $ac_c" 1>&6
2792 else
2793   cat > conftest.$ac_ext <<EOF
2794 #line 2795 "configure"
2795 #include "confdefs.h"
2796 #include <linux/version.h>
2797 EOF
2798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2799 { (eval echo configure:2800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2801 if test -z "$ac_err"; then
2802   rm -rf conftest*
2803   eval "ac_cv_header_$ac_safe=yes"
2804 else
2805   echo "$ac_err" >&5
2806   echo "configure: failed program was:" >&5
2807   cat conftest.$ac_ext >&5
2808   rm -rf conftest*
2809   eval "ac_cv_header_$ac_safe=no"
2810 fi
2811 rm -f conftest*
2812 fi
2813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2814   echo "$ac_t""yes" 1>&6
2815   msgformat=linux
2816 else
2817   echo "$ac_t""no" 1>&6
2818 msgformat=xopen
2819 fi
2820
2821
2822                          sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2823       fi
2824             sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2825          $srcdir/po2tbl.sed.in > po2tbl.sed
2826    fi
2827
2828             if test "$PACKAGE" = "gettext"; then
2829      GT_NO="#NO#"
2830      GT_YES=
2831    else
2832      GT_NO=
2833      GT_YES="#YES#"
2834    fi
2835    
2836    
2837
2838    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2839    
2840
2841       l=
2842    
2843
2844             if test -d $srcdir/po; then
2845       test -d po || mkdir po
2846       if test "x$srcdir" != "x."; then
2847          if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2848             posrcprefix="$srcdir/"
2849          else
2850             posrcprefix="../$srcdir/"
2851          fi
2852       else
2853          posrcprefix="../"
2854       fi
2855       rm -f po/POTFILES
2856       sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2857          < $srcdir/po/POTFILES.in > po/POTFILES
2858    fi
2859   
2860
2861 for ac_hdr in stdlib.h time.h unistd.h
2862 do
2863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2865 echo "configure:2866: checking for $ac_hdr" >&5
2866 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2867   echo $ac_n "(cached) $ac_c" 1>&6
2868 else
2869   cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 #include <$ac_hdr>
2873 EOF
2874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2875 { (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2877 if test -z "$ac_err"; then
2878   rm -rf conftest*
2879   eval "ac_cv_header_$ac_safe=yes"
2880 else
2881   echo "$ac_err" >&5
2882   echo "configure: failed program was:" >&5
2883   cat conftest.$ac_ext >&5
2884   rm -rf conftest*
2885   eval "ac_cv_header_$ac_safe=no"
2886 fi
2887 rm -f conftest*
2888 fi
2889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2890   echo "$ac_t""yes" 1>&6
2891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2892   cat >> confdefs.h <<EOF
2893 #define $ac_tr_hdr 1
2894 EOF
2895  
2896 else
2897   echo "$ac_t""no" 1>&6
2898 fi
2899 done
2900
2901
2902 echo $ac_n "checking whether printf must be declared""... $ac_c" 1>&6
2903 echo "configure:2904: checking whether printf must be declared" >&5
2904 if eval "test \"`echo '$''{'sim_cv_decl_needed_printf'+set}'`\" = set"; then
2905   echo $ac_n "(cached) $ac_c" 1>&6
2906 else
2907   cat > conftest.$ac_ext <<EOF
2908 #line 2909 "configure"
2909 #include "confdefs.h"
2910 #include <stdio.h>
2911 int main() {
2912 int (*pfn) = (int (*)) printf
2913 ; return 0; }
2914 EOF
2915 if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2916   rm -rf conftest*
2917   sim_cv_decl_needed_printf=no
2918 else
2919   echo "configure: failed program was:" >&5
2920   cat conftest.$ac_ext >&5
2921   rm -rf conftest*
2922   sim_cv_decl_needed_printf=yes
2923 fi
2924 rm -f conftest*
2925 fi
2926
2927 echo "$ac_t""$sim_cv_decl_needed_printf" 1>&6
2928 if test $sim_cv_decl_needed_printf = yes; then
2929   cat >> confdefs.h <<\EOF
2930 #define NEED_DECLARATION_PRINTF 1
2931 EOF
2932
2933 fi
2934
2935 trap '' 1 2 15
2936 cat > confcache <<\EOF
2937 # This file is a shell script that caches the results of configure
2938 # tests run on this system so they can be shared between configure
2939 # scripts and configure runs.  It is not useful on other systems.
2940 # If it contains results you don't want to keep, you may remove or edit it.
2941 #
2942 # By default, configure uses ./config.cache as the cache file,
2943 # creating it if it does not exist already.  You can give configure
2944 # the --cache-file=FILE option to use a different cache file; that is
2945 # what configure does when it calls configure scripts in
2946 # subdirectories, so they share the cache.
2947 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2948 # config.status only pays attention to the cache file if you give it the
2949 # --recheck option to rerun configure.
2950 #
2951 EOF
2952 # The following way of writing the cache mishandles newlines in values,
2953 # but we know of no workaround that is simple, portable, and efficient.
2954 # So, don't put newlines in cache variables' values.
2955 # Ultrix sh set writes to stderr and can't be redirected directly,
2956 # and sets the high bit in the cache file unless we assign to the vars.
2957 (set) 2>&1 |
2958   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2959   *ac_space=\ *)
2960     # `set' does not quote correctly, so add quotes (double-quote substitution
2961     # turns \\\\ into \\, and sed turns \\ into \).
2962     sed -n \
2963       -e "s/'/'\\\\''/g" \
2964       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2965     ;;
2966   *)
2967     # `set' quotes correctly as required by POSIX, so do not add quotes.
2968     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2969     ;;
2970   esac >> confcache
2971 if cmp -s $cache_file confcache; then
2972   :
2973 else
2974   if test -w $cache_file; then
2975     echo "updating cache $cache_file"
2976     cat confcache > $cache_file
2977   else
2978     echo "not updating unwritable cache $cache_file"
2979   fi
2980 fi
2981 rm -f confcache
2982
2983 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2984
2985 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2986 # Let make expand exec_prefix.
2987 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2988
2989 # Any assignment to VPATH causes Sun make to only execute
2990 # the first set of double-colon rules, so remove it if not needed.
2991 # If there is a colon in the path, we need to keep it.
2992 if test "x$srcdir" = x.; then
2993   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2994 fi
2995
2996 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2997
2998 DEFS=-DHAVE_CONFIG_H
2999
3000 # Without the "./", some shells look in PATH for config.status.
3001 : ${CONFIG_STATUS=./config.status}
3002
3003 echo creating $CONFIG_STATUS
3004 rm -f $CONFIG_STATUS
3005 cat > $CONFIG_STATUS <<EOF
3006 #! /bin/sh
3007 # Generated automatically by configure.
3008 # Run this file to recreate the current configuration.
3009 # This directory was configured as follows,
3010 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3011 #
3012 # $0 $ac_configure_args
3013 #
3014 # Compiler output produced by configure, useful for debugging
3015 # configure, is in ./config.log if it exists.
3016
3017 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3018 for ac_option
3019 do
3020   case "\$ac_option" in
3021   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3022     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3023     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3024   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3025     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3026     exit 0 ;;
3027   -help | --help | --hel | --he | --h)
3028     echo "\$ac_cs_usage"; exit 0 ;;
3029   *) echo "\$ac_cs_usage"; exit 1 ;;
3030   esac
3031 done
3032
3033 ac_given_srcdir=$srcdir
3034 ac_given_INSTALL="$INSTALL"
3035
3036 trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3037 EOF
3038 cat >> $CONFIG_STATUS <<EOF
3039
3040 # Protect against being on the right side of a sed subst in config.status.
3041 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3042  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3043 $ac_vpsub
3044 $extrasub
3045 s%@sim_environment@%$sim_environment%g
3046 s%@sim_alignment@%$sim_alignment%g
3047 s%@sim_assert@%$sim_assert%g
3048 s%@sim_bitsize@%$sim_bitsize%g
3049 s%@sim_endian@%$sim_endian%g
3050 s%@sim_hostendian@%$sim_hostendian%g
3051 s%@sim_float@%$sim_float%g
3052 s%@sim_scache@%$sim_scache%g
3053 s%@sim_default_model@%$sim_default_model%g
3054 s%@sim_hw_cflags@%$sim_hw_cflags%g
3055 s%@sim_hw_objs@%$sim_hw_objs%g
3056 s%@sim_hw@%$sim_hw%g
3057 s%@sim_inline@%$sim_inline%g
3058 s%@sim_packages@%$sim_packages%g
3059 s%@sim_regparm@%$sim_regparm%g
3060 s%@sim_reserved_bits@%$sim_reserved_bits%g
3061 s%@sim_smp@%$sim_smp%g
3062 s%@sim_stdcall@%$sim_stdcall%g
3063 s%@sim_xor_endian@%$sim_xor_endian%g
3064 s%@build_warnings@%$build_warnings%g
3065 s%@SHELL@%$SHELL%g
3066 s%@CFLAGS@%$CFLAGS%g
3067 s%@CPPFLAGS@%$CPPFLAGS%g
3068 s%@CXXFLAGS@%$CXXFLAGS%g
3069 s%@FFLAGS@%$FFLAGS%g
3070 s%@DEFS@%$DEFS%g
3071 s%@LDFLAGS@%$LDFLAGS%g
3072 s%@LIBS@%$LIBS%g
3073 s%@exec_prefix@%$exec_prefix%g
3074 s%@prefix@%$prefix%g
3075 s%@program_transform_name@%$program_transform_name%g
3076 s%@bindir@%$bindir%g
3077 s%@sbindir@%$sbindir%g
3078 s%@libexecdir@%$libexecdir%g
3079 s%@datadir@%$datadir%g
3080 s%@sysconfdir@%$sysconfdir%g
3081 s%@sharedstatedir@%$sharedstatedir%g
3082 s%@localstatedir@%$localstatedir%g
3083 s%@libdir@%$libdir%g
3084 s%@includedir@%$includedir%g
3085 s%@oldincludedir@%$oldincludedir%g
3086 s%@infodir@%$infodir%g
3087 s%@mandir@%$mandir%g
3088 s%@host@%$host%g
3089 s%@host_alias@%$host_alias%g
3090 s%@host_cpu@%$host_cpu%g
3091 s%@host_vendor@%$host_vendor%g
3092 s%@host_os@%$host_os%g
3093 s%@target@%$target%g
3094 s%@target_alias@%$target_alias%g
3095 s%@target_cpu@%$target_cpu%g
3096 s%@target_vendor@%$target_vendor%g
3097 s%@target_os@%$target_os%g
3098 s%@build@%$build%g
3099 s%@build_alias@%$build_alias%g
3100 s%@build_cpu@%$build_cpu%g
3101 s%@build_vendor@%$build_vendor%g
3102 s%@build_os@%$build_os%g
3103 s%@CC@%$CC%g
3104 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3105 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3106 s%@INSTALL_DATA@%$INSTALL_DATA%g
3107 s%@HDEFINES@%$HDEFINES%g
3108 s%@AR@%$AR%g
3109 s%@RANLIB@%$RANLIB%g
3110 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
3111 s%@SET_MAKE@%$SET_MAKE%g
3112 s%@CPP@%$CPP%g
3113 s%@ALLOCA@%$ALLOCA%g
3114 s%@USE_NLS@%$USE_NLS%g
3115 s%@MSGFMT@%$MSGFMT%g
3116 s%@GMSGFMT@%$GMSGFMT%g
3117 s%@XGETTEXT@%$XGETTEXT%g
3118 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
3119 s%@CATALOGS@%$CATALOGS%g
3120 s%@CATOBJEXT@%$CATOBJEXT%g
3121 s%@DATADIRNAME@%$DATADIRNAME%g
3122 s%@GMOFILES@%$GMOFILES%g
3123 s%@INSTOBJEXT@%$INSTOBJEXT%g
3124 s%@INTLDEPS@%$INTLDEPS%g
3125 s%@INTLLIBS@%$INTLLIBS%g
3126 s%@INTLOBJS@%$INTLOBJS%g
3127 s%@POFILES@%$POFILES%g
3128 s%@POSUB@%$POSUB%g
3129 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
3130 s%@GT_NO@%$GT_NO%g
3131 s%@GT_YES@%$GT_YES%g
3132 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
3133 s%@l@%$l%g
3134
3135 CEOF
3136 EOF
3137
3138 cat >> $CONFIG_STATUS <<\EOF
3139
3140 # Split the substitutions into bite-sized pieces for seds with
3141 # small command number limits, like on Digital OSF/1 and HP-UX.
3142 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3143 ac_file=1 # Number of current file.
3144 ac_beg=1 # First line for current file.
3145 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3146 ac_more_lines=:
3147 ac_sed_cmds=""
3148 while $ac_more_lines; do
3149   if test $ac_beg -gt 1; then
3150     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3151   else
3152     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3153   fi
3154   if test ! -s conftest.s$ac_file; then
3155     ac_more_lines=false
3156     rm -f conftest.s$ac_file
3157   else
3158     if test -z "$ac_sed_cmds"; then
3159       ac_sed_cmds="sed -f conftest.s$ac_file"
3160     else
3161       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3162     fi
3163     ac_file=`expr $ac_file + 1`
3164     ac_beg=$ac_end
3165     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3166   fi
3167 done
3168 if test -z "$ac_sed_cmds"; then
3169   ac_sed_cmds=cat
3170 fi
3171 EOF
3172
3173 cat >> $CONFIG_STATUS <<EOF
3174
3175 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3176 EOF
3177 cat >> $CONFIG_STATUS <<\EOF
3178 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3179   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3180   case "$ac_file" in
3181   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3182        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3183   *) ac_file_in="${ac_file}.in" ;;
3184   esac
3185
3186   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3187
3188   # Remove last slash and all that follows it.  Not all systems have dirname.
3189   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3190   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3191     # The file is in a subdirectory.
3192     test ! -d "$ac_dir" && mkdir "$ac_dir"
3193     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3194     # A "../" for each directory in $ac_dir_suffix.
3195     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3196   else
3197     ac_dir_suffix= ac_dots=
3198   fi
3199
3200   case "$ac_given_srcdir" in
3201   .)  srcdir=.
3202       if test -z "$ac_dots"; then top_srcdir=.
3203       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3204   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3205   *) # Relative path.
3206     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3207     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3208   esac
3209
3210   case "$ac_given_INSTALL" in
3211   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3212   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3213   esac
3214
3215   echo creating "$ac_file"
3216   rm -f "$ac_file"
3217   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3218   case "$ac_file" in
3219   *Makefile*) ac_comsub="1i\\
3220 # $configure_input" ;;
3221   *) ac_comsub= ;;
3222   esac
3223
3224   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3225   sed -e "$ac_comsub
3226 s%@configure_input@%$configure_input%g
3227 s%@srcdir@%$srcdir%g
3228 s%@top_srcdir@%$top_srcdir%g
3229 s%@INSTALL@%$INSTALL%g
3230 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3231 fi; done
3232 rm -f conftest.s*
3233
3234 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3235 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3236 #
3237 # ac_d sets the value in "#define NAME VALUE" lines.
3238 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3239 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3240 ac_dC='\3'
3241 ac_dD='%g'
3242 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3243 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3244 ac_uB='\([      ]\)%\1#\2define\3'
3245 ac_uC=' '
3246 ac_uD='\4%g'
3247 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3248 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3249 ac_eB='$%\1#\2define\3'
3250 ac_eC=' '
3251 ac_eD='%g'
3252
3253 if test "${CONFIG_HEADERS+set}" != set; then
3254 EOF
3255 cat >> $CONFIG_STATUS <<EOF
3256   CONFIG_HEADERS="config.h:config.in"
3257 EOF
3258 cat >> $CONFIG_STATUS <<\EOF
3259 fi
3260 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3261   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3262   case "$ac_file" in
3263   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3264        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3265   *) ac_file_in="${ac_file}.in" ;;
3266   esac
3267
3268   echo creating $ac_file
3269
3270   rm -f conftest.frag conftest.in conftest.out
3271   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3272   cat $ac_file_inputs > conftest.in
3273
3274 EOF
3275
3276 # Transform confdefs.h into a sed script conftest.vals that substitutes
3277 # the proper values into config.h.in to produce config.h.  And first:
3278 # Protect against being on the right side of a sed subst in config.status.
3279 # Protect against being in an unquoted here document in config.status.
3280 rm -f conftest.vals
3281 cat > conftest.hdr <<\EOF
3282 s/[\\&%]/\\&/g
3283 s%[\\$`]%\\&%g
3284 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3285 s%ac_d%ac_u%gp
3286 s%ac_u%ac_e%gp
3287 EOF
3288 sed -n -f conftest.hdr confdefs.h > conftest.vals
3289 rm -f conftest.hdr
3290
3291 # This sed command replaces #undef with comments.  This is necessary, for
3292 # example, in the case of _POSIX_SOURCE, which is predefined and required
3293 # on some systems where configure will not decide to define it.
3294 cat >> conftest.vals <<\EOF
3295 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3296 EOF
3297
3298 # Break up conftest.vals because some shells have a limit on
3299 # the size of here documents, and old seds have small limits too.
3300
3301 rm -f conftest.tail
3302 while :
3303 do
3304   ac_lines=`grep -c . conftest.vals`
3305   # grep -c gives empty output for an empty file on some AIX systems.
3306   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3307   # Write a limited-size here document to conftest.frag.
3308   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3309   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3310   echo 'CEOF
3311   sed -f conftest.frag conftest.in > conftest.out
3312   rm -f conftest.in
3313   mv conftest.out conftest.in
3314 ' >> $CONFIG_STATUS
3315   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3316   rm -f conftest.vals
3317   mv conftest.tail conftest.vals
3318 done
3319 rm -f conftest.vals
3320
3321 cat >> $CONFIG_STATUS <<\EOF
3322   rm -f conftest.frag conftest.h
3323   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3324   cat conftest.in >> conftest.h
3325   rm -f conftest.in
3326   if cmp -s $ac_file conftest.h 2>/dev/null; then
3327     echo "$ac_file is unchanged"
3328     rm -f conftest.h
3329   else
3330     # Remove last slash and all that follows it.  Not all systems have dirname.
3331       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3332       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3333       # The file is in a subdirectory.
3334       test ! -d "$ac_dir" && mkdir "$ac_dir"
3335     fi
3336     rm -f $ac_file
3337     mv conftest.h $ac_file
3338   fi
3339 fi; done
3340
3341 EOF
3342 cat >> $CONFIG_STATUS <<EOF
3343
3344 EOF
3345 cat >> $CONFIG_STATUS <<\EOF
3346 case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
3347 exit 0
3348 EOF
3349 chmod +x $CONFIG_STATUS
3350 rm -fr confdefs* $ac_clean_files
3351 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3352