]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/dialog/configure
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / dialog / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20101002.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="dialog.h"
108 # Factoring default headers for most tests.
109 ac_includes_default="\
110 #include <stdio.h>
111 #if HAVE_SYS_TYPES_H
112 # include <sys/types.h>
113 #endif
114 #if HAVE_SYS_STAT_H
115 # include <sys/stat.h>
116 #endif
117 #if STDC_HEADERS
118 # include <stdlib.h>
119 # include <stddef.h>
120 #else
121 # if HAVE_STDLIB_H
122 #  include <stdlib.h>
123 # endif
124 #endif
125 #if HAVE_STRING_H
126 # if !STDC_HEADERS && HAVE_MEMORY_H
127 #  include <memory.h>
128 # endif
129 # include <string.h>
130 #endif
131 #if HAVE_STRINGS_H
132 # include <strings.h>
133 #endif
134 #if HAVE_INTTYPES_H
135 # include <inttypes.h>
136 #else
137 # if HAVE_STDINT_H
138 #  include <stdint.h>
139 # endif
140 #endif
141 #if HAVE_UNISTD_H
142 # include <unistd.h>
143 #endif"
144
145 # Initialize some variables set by options.
146 ac_init_help=
147 ac_init_version=false
148 # The variables have the same names as the options, with
149 # dashes changed to underlines.
150 cache_file=/dev/null
151 exec_prefix=NONE
152 no_create=
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 verbose=
162 x_includes=NONE
163 x_libraries=NONE
164
165 # Installation directory options.
166 # These are left unexpanded so users can "make install exec_prefix=/foo"
167 # and all the variables that are supposed to be based on exec_prefix
168 # by default will actually change.
169 # Use braces instead of parens because sh, perl, etc. also accept them.
170 bindir='${exec_prefix}/bin'
171 sbindir='${exec_prefix}/sbin'
172 libexecdir='${exec_prefix}/libexec'
173 datadir='${prefix}/share'
174 sysconfdir='${prefix}/etc'
175 sharedstatedir='${prefix}/com'
176 localstatedir='${prefix}/var'
177 libdir='${exec_prefix}/lib'
178 includedir='${prefix}/include'
179 oldincludedir='/usr/include'
180 infodir='${prefix}/info'
181 mandir='${prefix}/man'
182
183 # Identity of this package.
184 PACKAGE_NAME=
185 PACKAGE_TARNAME=
186 PACKAGE_VERSION=
187 PACKAGE_STRING=
188 PACKAGE_BUGREPORT=
189
190 ac_prev=
191 for ac_option
192 do
193   # If the previous option needs an argument, assign it.
194   if test -n "$ac_prev"; then
195     eval "$ac_prev=\$ac_option"
196     ac_prev=
197     continue
198   fi
199
200   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
201
202   # Accept the important Cygnus configure options, so we can diagnose typos.
203
204   case $ac_option in
205
206   -bindir | --bindir | --bindi | --bind | --bin | --bi)
207     ac_prev=bindir ;;
208   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
209     bindir=$ac_optarg ;;
210
211   -build | --build | --buil | --bui | --bu)
212     ac_prev=build_alias ;;
213   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
214     build_alias=$ac_optarg ;;
215
216   -cache-file | --cache-file | --cache-fil | --cache-fi \
217   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218     ac_prev=cache_file ;;
219   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
221     cache_file=$ac_optarg ;;
222
223   --config-cache | -C)
224     cache_file=config.cache ;;
225
226   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227     ac_prev=datadir ;;
228   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229   | --da=*)
230     datadir=$ac_optarg ;;
231
232   -disable-* | --disable-*)
233     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
234     # Reject names that are not valid shell variable names.
235     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237    { (exit 1); exit 1; }; }
238     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239     eval "enable_$ac_feature=no" ;;
240
241   -enable-* | --enable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     case $ac_option in
249       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
250       *) ac_optarg=yes ;;
251     esac
252     eval "enable_$ac_feature='$ac_optarg'" ;;
253
254   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256   | --exec | --exe | --ex)
257     ac_prev=exec_prefix ;;
258   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260   | --exec=* | --exe=* | --ex=*)
261     exec_prefix=$ac_optarg ;;
262
263   -gas | --gas | --ga | --g)
264     # Obsolete; use --with-gas.
265     with_gas=yes ;;
266
267   -help | --help | --hel | --he | -h)
268     ac_init_help=long ;;
269   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270     ac_init_help=recursive ;;
271   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272     ac_init_help=short ;;
273
274   -host | --host | --hos | --ho)
275     ac_prev=host_alias ;;
276   -host=* | --host=* | --hos=* | --ho=*)
277     host_alias=$ac_optarg ;;
278
279   -includedir | --includedir | --includedi | --included | --include \
280   | --includ | --inclu | --incl | --inc)
281     ac_prev=includedir ;;
282   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283   | --includ=* | --inclu=* | --incl=* | --inc=*)
284     includedir=$ac_optarg ;;
285
286   -infodir | --infodir | --infodi | --infod | --info | --inf)
287     ac_prev=infodir ;;
288   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289     infodir=$ac_optarg ;;
290
291   -libdir | --libdir | --libdi | --libd)
292     ac_prev=libdir ;;
293   -libdir=* | --libdir=* | --libdi=* | --libd=*)
294     libdir=$ac_optarg ;;
295
296   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297   | --libexe | --libex | --libe)
298     ac_prev=libexecdir ;;
299   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300   | --libexe=* | --libex=* | --libe=*)
301     libexecdir=$ac_optarg ;;
302
303   -localstatedir | --localstatedir | --localstatedi | --localstated \
304   | --localstate | --localstat | --localsta | --localst \
305   | --locals | --local | --loca | --loc | --lo)
306     ac_prev=localstatedir ;;
307   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310     localstatedir=$ac_optarg ;;
311
312   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313     ac_prev=mandir ;;
314   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315     mandir=$ac_optarg ;;
316
317   -nfp | --nfp | --nf)
318     # Obsolete; use --without-fp.
319     with_fp=no ;;
320
321   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322   | --no-cr | --no-c)
323     no_create=yes ;;
324
325   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327     no_recursion=yes ;;
328
329   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331   | --oldin | --oldi | --old | --ol | --o)
332     ac_prev=oldincludedir ;;
333   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336     oldincludedir=$ac_optarg ;;
337
338   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339     ac_prev=prefix ;;
340   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341     prefix=$ac_optarg ;;
342
343   -program-prefix | --program-prefix | --program-prefi | --program-pref \
344   | --program-pre | --program-pr | --program-p)
345     ac_prev=program_prefix ;;
346   -program-prefix=* | --program-prefix=* | --program-prefi=* \
347   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348     program_prefix=$ac_optarg ;;
349
350   -program-suffix | --program-suffix | --program-suffi | --program-suff \
351   | --program-suf | --program-su | --program-s)
352     ac_prev=program_suffix ;;
353   -program-suffix=* | --program-suffix=* | --program-suffi=* \
354   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355     program_suffix=$ac_optarg ;;
356
357   -program-transform-name | --program-transform-name \
358   | --program-transform-nam | --program-transform-na \
359   | --program-transform-n | --program-transform- \
360   | --program-transform | --program-transfor \
361   | --program-transfo | --program-transf \
362   | --program-trans | --program-tran \
363   | --progr-tra | --program-tr | --program-t)
364     ac_prev=program_transform_name ;;
365   -program-transform-name=* | --program-transform-name=* \
366   | --program-transform-nam=* | --program-transform-na=* \
367   | --program-transform-n=* | --program-transform-=* \
368   | --program-transform=* | --program-transfor=* \
369   | --program-transfo=* | --program-transf=* \
370   | --program-trans=* | --program-tran=* \
371   | --progr-tra=* | --program-tr=* | --program-t=*)
372     program_transform_name=$ac_optarg ;;
373
374   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375   | -silent | --silent | --silen | --sile | --sil)
376     silent=yes ;;
377
378   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379     ac_prev=sbindir ;;
380   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381   | --sbi=* | --sb=*)
382     sbindir=$ac_optarg ;;
383
384   -sharedstatedir | --sharedstatedir | --sharedstatedi \
385   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386   | --sharedst | --shareds | --shared | --share | --shar \
387   | --sha | --sh)
388     ac_prev=sharedstatedir ;;
389   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392   | --sha=* | --sh=*)
393     sharedstatedir=$ac_optarg ;;
394
395   -site | --site | --sit)
396     ac_prev=site ;;
397   -site=* | --site=* | --sit=*)
398     site=$ac_optarg ;;
399
400   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401     ac_prev=srcdir ;;
402   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403     srcdir=$ac_optarg ;;
404
405   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406   | --syscon | --sysco | --sysc | --sys | --sy)
407     ac_prev=sysconfdir ;;
408   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410     sysconfdir=$ac_optarg ;;
411
412   -target | --target | --targe | --targ | --tar | --ta | --t)
413     ac_prev=target_alias ;;
414   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415     target_alias=$ac_optarg ;;
416
417   -v | -verbose | --verbose | --verbos | --verbo | --verb)
418     verbose=yes ;;
419
420   -version | --version | --versio | --versi | --vers | -V)
421     ac_init_version=: ;;
422
423   -with-* | --with-*)
424     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
425     # Reject names that are not valid shell variable names.
426     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427       { echo "$as_me: error: invalid package name: $ac_package" >&2
428    { (exit 1); exit 1; }; }
429     ac_package=`echo $ac_package| sed 's/-/_/g'`
430     case $ac_option in
431       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "with_$ac_package='$ac_optarg'" ;;
435
436   -without-* | --without-*)
437     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
438     # Reject names that are not valid shell variable names.
439     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440       { echo "$as_me: error: invalid package name: $ac_package" >&2
441    { (exit 1); exit 1; }; }
442     ac_package=`echo $ac_package | sed 's/-/_/g'`
443     eval "with_$ac_package=no" ;;
444
445   --x)
446     # Obsolete; use --with-x.
447     with_x=yes ;;
448
449   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450   | --x-incl | --x-inc | --x-in | --x-i)
451     ac_prev=x_includes ;;
452   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454     x_includes=$ac_optarg ;;
455
456   -x-libraries | --x-libraries | --x-librarie | --x-librari \
457   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458     ac_prev=x_libraries ;;
459   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461     x_libraries=$ac_optarg ;;
462
463   -*) { echo "$as_me: error: unrecognized option: $ac_option
464 Try \`$0 --help' for more information." >&2
465    { (exit 1); exit 1; }; }
466     ;;
467
468   *=*)
469     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470     # Reject names that are not valid shell variable names.
471     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473    { (exit 1); exit 1; }; }
474     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475     eval "$ac_envvar='$ac_optarg'"
476     export $ac_envvar ;;
477
478   *)
479     # FIXME: should be removed in autoconf 3.0.
480     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
484     ;;
485
486   esac
487 done
488
489 if test -n "$ac_prev"; then
490   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491   { echo "$as_me: error: missing argument to $ac_option" >&2
492    { (exit 1); exit 1; }; }
493 fi
494
495 # Be sure to have absolute paths.
496 for ac_var in exec_prefix prefix
497 do
498   eval ac_val=$`echo $ac_var`
499   case $ac_val in
500     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
502    { (exit 1); exit 1; }; };;
503   esac
504 done
505
506 # Be sure to have absolute paths.
507 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508               localstatedir libdir includedir oldincludedir infodir mandir
509 do
510   eval ac_val=$`echo $ac_var`
511   case $ac_val in
512     [\\/$]* | ?:[\\/]* ) ;;
513     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
514    { (exit 1); exit 1; }; };;
515   esac
516 done
517
518 # There might be people who depend on the old broken behavior: `$host'
519 # used to hold the argument of --host etc.
520 build=$build_alias
521 host=$host_alias
522 target=$target_alias
523
524 # FIXME: should be removed in autoconf 3.0.
525 if test "x$host_alias" != x; then
526   if test "x$build_alias" = x; then
527     cross_compiling=maybe
528     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529     If a cross compiler is detected then cross compile mode will be used." >&2
530   elif test "x$build_alias" != "x$host_alias"; then
531     cross_compiling=yes
532   fi
533 fi
534
535 ac_tool_prefix=
536 test -n "$host_alias" && ac_tool_prefix=$host_alias-
537
538 test "$silent" = yes && exec 6>/dev/null
539
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542   ac_srcdir_defaulted=yes
543   # Try the directory containing this script, then its parent.
544   ac_prog=$0
545   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
546   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547   srcdir=$ac_confdir
548   if test ! -r $srcdir/$ac_unique_file; then
549     srcdir=..
550   fi
551 else
552   ac_srcdir_defaulted=no
553 fi
554 if test ! -r $srcdir/$ac_unique_file; then
555   if test "$ac_srcdir_defaulted" = yes; then
556     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557    { (exit 1); exit 1; }; }
558   else
559     { echo "$as_me: error: cannot find sources in $srcdir" >&2
560    { (exit 1); exit 1; }; }
561   fi
562 fi
563 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564 ac_env_build_alias_set=${build_alias+set}
565 ac_env_build_alias_value=$build_alias
566 ac_cv_env_build_alias_set=${build_alias+set}
567 ac_cv_env_build_alias_value=$build_alias
568 ac_env_host_alias_set=${host_alias+set}
569 ac_env_host_alias_value=$host_alias
570 ac_cv_env_host_alias_set=${host_alias+set}
571 ac_cv_env_host_alias_value=$host_alias
572 ac_env_target_alias_set=${target_alias+set}
573 ac_env_target_alias_value=$target_alias
574 ac_cv_env_target_alias_set=${target_alias+set}
575 ac_cv_env_target_alias_value=$target_alias
576 ac_env_CC_set=${CC+set}
577 ac_env_CC_value=$CC
578 ac_cv_env_CC_set=${CC+set}
579 ac_cv_env_CC_value=$CC
580 ac_env_CFLAGS_set=${CFLAGS+set}
581 ac_env_CFLAGS_value=$CFLAGS
582 ac_cv_env_CFLAGS_set=${CFLAGS+set}
583 ac_cv_env_CFLAGS_value=$CFLAGS
584 ac_env_LDFLAGS_set=${LDFLAGS+set}
585 ac_env_LDFLAGS_value=$LDFLAGS
586 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587 ac_cv_env_LDFLAGS_value=$LDFLAGS
588 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589 ac_env_CPPFLAGS_value=$CPPFLAGS
590 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592 ac_env_CPP_set=${CPP+set}
593 ac_env_CPP_value=$CPP
594 ac_cv_env_CPP_set=${CPP+set}
595 ac_cv_env_CPP_value=$CPP
596
597 #
598 # Report the --help message.
599 #
600 if test "$ac_init_help" = "long"; then
601   # Omit some internal or obsolete options to make the list less imposing.
602   # This message is too long to be a string in the A/UX 3.1 sh.
603   cat <<EOF
604 \`configure' configures this package to adapt to many kinds of systems.
605
606 Usage: $0 [OPTION]... [VAR=VALUE]...
607
608 To assign environment variables (e.g., CC, CFLAGS...), specify them as
609 VAR=VALUE.  See below for descriptions of some of the useful variables.
610
611 Defaults for the options are specified in brackets.
612
613 Configuration:
614   -h, --help              display this help and exit
615       --help=short        display options specific to this package
616       --help=recursive    display the short help of all the included packages
617   -V, --version           display version information and exit
618   -q, --quiet, --silent   do not print \`checking...' messages
619       --cache-file=FILE   cache test results in FILE [disabled]
620   -C, --config-cache      alias for \`--cache-file=config.cache'
621   -n, --no-create         do not create output files
622       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
623
624 EOF
625
626   cat <<EOF
627 Installation directories:
628   --prefix=PREFIX         install architecture-independent files in PREFIX
629                           [$ac_default_prefix]
630   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
631                           [PREFIX]
632
633 By default, \`make install' will install all the files in
634 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
635 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636 for instance \`--prefix=\$HOME'.
637
638 For better control, use the options below.
639
640 Fine tuning of the installation directories:
641   --bindir=DIR            user executables [EPREFIX/bin]
642   --sbindir=DIR           system admin executables [EPREFIX/sbin]
643   --libexecdir=DIR        program executables [EPREFIX/libexec]
644   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
645   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
646   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
647   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
648   --libdir=DIR            object code libraries [EPREFIX/lib]
649   --includedir=DIR        C header files [PREFIX/include]
650   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
651   --infodir=DIR           info documentation [PREFIX/info]
652   --mandir=DIR            man documentation [PREFIX/man]
653 EOF
654
655   cat <<\EOF
656
657 Program names:
658   --program-prefix=PREFIX            prepend PREFIX to installed program names
659   --program-suffix=SUFFIX            append SUFFIX to installed program names
660   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
661
662 System types:
663   --build=BUILD           configure for building on BUILD [guessed]
664   --host=HOST       build programs to run on HOST [BUILD]
665 EOF
666 fi
667
668 if test -n "$ac_init_help"; then
669
670   cat <<\EOF
671
672 Optional Features:
673   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
674   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
675
676 Optional Packages:
677   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
678   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
679
680   --disable-echo          display "compiling" commands
681   --disable-largefile     omit support for large files
682   --with-warnings         test: turn on gcc warnings
683   --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
684   --enable-header-subdir  install dlg_XXX headers to subdirectory
685   --with-libiconv-prefix=DIR
686                           search for libiconv in DIR/include and DIR/lib
687   --enable-nls            use Native Language Support
688   --with-included-gettext use the GNU gettext library included here
689   --with-textdomain=PKG   NLS text-domain (default is package name)
690   --disable-included-msgs use included messages, for i18n support
691   --with-dmalloc          test: use Gray Watson's dmalloc library
692   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
693   --with-purify           test: use Purify
694   --with-valgrind         test: use valgrind
695   --with-no-leaks         test: free permanent memory, analyze leaks
696   --disable-trace         do not support --trace option
697   --disable-libtool-version  enable to use libtool's incompatible naming scheme
698   --with-libtool          generate libraries with libtool
699   --with-libtool-opts=XXX specify additional libtool options
700   --with-curses-dir=DIR   directory in which (n)curses is installed
701   --with-ncurses          compile/link with ncurses library
702   --with-ncursesw         compile/link with wide-char ncurses library
703   --disable-extras        do not include extra dialogs
704   --disable-rc-file       do not include config-file support
705   --disable-Xdialog       do not include Xdialog-style dialogs
706   --disable-form          do not include the form dialog
707   --disable-gauge         do not include the gauge dialogs
708   --disable-tailbox       do not include the tailbox dialog
709   --disable-mixedform     do not include the mixedform dialog
710   --disable-mixedgauge    do not include the mixedgauge dialog
711   --enable-widec          enable wide-curses features
712   --disable-rpath-hack    don't add rpath options for additional libraries
713
714 Some influential environment variables:
715   CC          C compiler command
716   CFLAGS      C compiler flags
717   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
718               nonstandard directory <lib dir>
719   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
720               headers in a nonstandard directory <include dir>
721   CPP         C preprocessor
722
723 Use these variables to override the choices made by `configure' or to help
724 it to find libraries and programs with nonstandard names/locations.
725
726 EOF
727 fi
728
729 if test "$ac_init_help" = "recursive"; then
730   # If there are subdirs, report their specific --help.
731   ac_popdir=`pwd`
732   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
733     cd $ac_subdir
734     # A "../" for each directory in /$ac_subdir.
735     ac_dots=`echo $ac_subdir |
736              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
737
738     case $srcdir in
739     .) # No --srcdir option.  We are building in place.
740       ac_sub_srcdir=$srcdir ;;
741     [\\/]* | ?:[\\/]* ) # Absolute path.
742       ac_sub_srcdir=$srcdir/$ac_subdir ;;
743     *) # Relative path.
744       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
745     esac
746
747     # Check for guested configure; otherwise get Cygnus style configure.
748     if test -f $ac_sub_srcdir/configure.gnu; then
749       echo
750       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
751     elif test -f $ac_sub_srcdir/configure; then
752       echo
753       $SHELL $ac_sub_srcdir/configure  --help=recursive
754     elif test -f $ac_sub_srcdir/configure.ac ||
755            test -f $ac_sub_srcdir/configure.in; then
756       echo
757       $ac_configure --help
758     else
759       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
760     fi
761     cd $ac_popdir
762   done
763 fi
764
765 test -n "$ac_init_help" && exit 0
766 if $ac_init_version; then
767   cat <<\EOF
768
769 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
770 Free Software Foundation, Inc.
771 This configure script is free software; the Free Software Foundation
772 gives unlimited permission to copy, distribute and modify it.
773 EOF
774   exit 0
775 fi
776 exec 5>config.log
777 cat >&5 <<EOF
778 This file contains any messages produced by compilers while
779 running configure, to aid debugging if configure makes a mistake.
780
781 It was created by $as_me, which was
782 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
783
784   $ $0 $@
785
786 EOF
787 {
788 cat <<_ASUNAME
789 ## ---------- ##
790 ## Platform.  ##
791 ## ---------- ##
792
793 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
794 uname -m = `(uname -m) 2>/dev/null || echo unknown`
795 uname -r = `(uname -r) 2>/dev/null || echo unknown`
796 uname -s = `(uname -s) 2>/dev/null || echo unknown`
797 uname -v = `(uname -v) 2>/dev/null || echo unknown`
798
799 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
800 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
801
802 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
803 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
804 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
805 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
806 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
807 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
808 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
809
810 PATH = $PATH
811
812 _ASUNAME
813 } >&5
814
815 cat >&5 <<EOF
816 ## ------------ ##
817 ## Core tests.  ##
818 ## ------------ ##
819
820 EOF
821
822 # Keep a trace of the command line.
823 # Strip out --no-create and --no-recursion so they do not pile up.
824 # Also quote any args containing shell meta-characters.
825 ac_configure_args=
826 ac_sep=
827 for ac_arg
828 do
829   case $ac_arg in
830   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
831   | --no-cr | --no-c) ;;
832   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
833   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
834   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
835     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
836     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
837     ac_sep=" " ;;
838   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
839      ac_sep=" " ;;
840   esac
841   # Get rid of the leading space.
842 done
843
844 # When interrupted or exit'd, cleanup temporary files, and complete
845 # config.log.  We remove comments because anyway the quotes in there
846 # would cause problems or look ugly.
847 trap 'exit_status=$?
848   # Save into config.log some information that might help in debugging.
849   echo >&5
850   echo "## ----------------- ##" >&5
851   echo "## Cache variables.  ##" >&5
852   echo "## ----------------- ##" >&5
853   echo >&5
854   # The following way of writing the cache mishandles newlines in values,
855 {
856   (set) 2>&1 |
857     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
858     *ac_space=\ *)
859       sed -n \
860         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
861           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
862       ;;
863     *)
864       sed -n \
865         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
866       ;;
867     esac;
868 } >&5
869   sed "/^$/d" confdefs.h >conftest.log
870   if test -s conftest.log; then
871     echo >&5
872     echo "## ------------ ##" >&5
873     echo "## confdefs.h.  ##" >&5
874     echo "## ------------ ##" >&5
875     echo >&5
876     cat conftest.log >&5
877   fi
878   (echo; echo) >&5
879   test "$ac_signal" != 0 &&
880     echo "$as_me: caught signal $ac_signal" >&5
881   echo "$as_me: exit $exit_status" >&5
882   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
883     exit $exit_status
884      ' 0
885 for ac_signal in 1 2 13 15; do
886   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
887 done
888 ac_signal=0
889
890 # confdefs.h avoids OS command line length limits that DEFS can exceed.
891 rm -rf conftest* confdefs.h
892 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
893 echo >confdefs.h
894
895 # Let the site file select an alternate cache file if it wants to.
896 # Prefer explicitly selected file to automatically selected ones.
897 if test -z "$CONFIG_SITE"; then
898   if test "x$prefix" != xNONE; then
899     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
900   else
901     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
902   fi
903 fi
904 for ac_site_file in $CONFIG_SITE; do
905   if test -r "$ac_site_file"; then
906     { echo "$as_me:906: loading site script $ac_site_file" >&5
907 echo "$as_me: loading site script $ac_site_file" >&6;}
908     cat "$ac_site_file" >&5
909     . "$ac_site_file"
910   fi
911 done
912
913 if test -r "$cache_file"; then
914   # Some versions of bash will fail to source /dev/null (special
915   # files actually), so we avoid doing that.
916   if test -f "$cache_file"; then
917     { echo "$as_me:917: loading cache $cache_file" >&5
918 echo "$as_me: loading cache $cache_file" >&6;}
919     case $cache_file in
920       [\\/]* | ?:[\\/]* ) . $cache_file;;
921       *)                      . ./$cache_file;;
922     esac
923   fi
924 else
925   { echo "$as_me:925: creating cache $cache_file" >&5
926 echo "$as_me: creating cache $cache_file" >&6;}
927   >$cache_file
928 fi
929
930 # Check that the precious variables saved in the cache have kept the same
931 # value.
932 ac_cache_corrupted=false
933 for ac_var in `(set) 2>&1 |
934                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
935   eval ac_old_set=\$ac_cv_env_${ac_var}_set
936   eval ac_new_set=\$ac_env_${ac_var}_set
937   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
938   eval ac_new_val="\$ac_env_${ac_var}_value"
939   case $ac_old_set,$ac_new_set in
940     set,)
941       { echo "$as_me:941: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
942 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
943       ac_cache_corrupted=: ;;
944     ,set)
945       { echo "$as_me:945: error: \`$ac_var' was not set in the previous run" >&5
946 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
947       ac_cache_corrupted=: ;;
948     ,);;
949     *)
950       if test "x$ac_old_val" != "x$ac_new_val"; then
951         { echo "$as_me:951: error: \`$ac_var' has changed since the previous run:" >&5
952 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
953         { echo "$as_me:953:   former value:  $ac_old_val" >&5
954 echo "$as_me:   former value:  $ac_old_val" >&2;}
955         { echo "$as_me:955:   current value: $ac_new_val" >&5
956 echo "$as_me:   current value: $ac_new_val" >&2;}
957         ac_cache_corrupted=:
958       fi;;
959   esac
960   # Pass precious variables to config.status.  It doesn't matter if
961   # we pass some twice (in addition to the command line arguments).
962   if test "$ac_new_set" = set; then
963     case $ac_new_val in
964     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
965       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
966       ac_configure_args="$ac_configure_args '$ac_arg'"
967       ;;
968     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
969        ;;
970     esac
971   fi
972 done
973 if $ac_cache_corrupted; then
974   { echo "$as_me:974: error: changes in the environment can compromise the build" >&5
975 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
976   { { echo "$as_me:976: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
977 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
978    { (exit 1); exit 1; }; }
979 fi
980
981 ac_ext=c
982 ac_cpp='$CPP $CPPFLAGS'
983 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
984 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
985 ac_compiler_gnu=$ac_cv_c_compiler_gnu
986 ac_main_return=return
987
988 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
989   *c*,-n*) ECHO_N= ECHO_C='
990 ' ECHO_T='      ' ;;
991   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
992   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
993 esac
994 echo "#! $SHELL" >conftest.sh
995 echo  "exit 0"   >>conftest.sh
996 chmod +x conftest.sh
997 if { (echo "$as_me:997: PATH=\".;.\"; conftest.sh") >&5
998   (PATH=".;."; conftest.sh) 2>&5
999   ac_status=$?
1000   echo "$as_me:1000: \$? = $ac_status" >&5
1001   (exit $ac_status); }; then
1002   ac_path_separator=';'
1003 else
1004   ac_path_separator=:
1005 fi
1006 PATH_SEPARATOR="$ac_path_separator"
1007 rm -f conftest.sh
1008
1009 ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1010
1011 test "$program_prefix" != NONE &&
1012   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1013 # Use a double $ so make ignores it.
1014 test "$program_suffix" != NONE &&
1015   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1016 # Double any \ or $.  echo might interpret backslashes.
1017 # By default was `s,x,x', remove it if useless.
1018 cat <<\_ACEOF >conftest.sed
1019 s/[\\$]/&&/g;s/;s,x,x,$//
1020 _ACEOF
1021 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1022 rm conftest.sed
1023
1024 DESTDIR=
1025
1026 ac_ext=c
1027 ac_cpp='$CPP $CPPFLAGS'
1028 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1029 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1030 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1031 ac_main_return=return
1032 if test -n "$ac_tool_prefix"; then
1033   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1034 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1035 echo "$as_me:1035: checking for $ac_word" >&5
1036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1037 if test "${ac_cv_prog_CC+set}" = set; then
1038   echo $ECHO_N "(cached) $ECHO_C" >&6
1039 else
1040   if test -n "$CC"; then
1041   ac_cv_prog_CC="$CC" # Let the user override the test.
1042 else
1043   ac_save_IFS=$IFS; IFS=$ac_path_separator
1044 ac_dummy="$PATH"
1045 for ac_dir in $ac_dummy; do
1046   IFS=$ac_save_IFS
1047   test -z "$ac_dir" && ac_dir=.
1048   $as_executable_p "$ac_dir/$ac_word" || continue
1049 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1050 echo "$as_me:1050: found $ac_dir/$ac_word" >&5
1051 break
1052 done
1053
1054 fi
1055 fi
1056 CC=$ac_cv_prog_CC
1057 if test -n "$CC"; then
1058   echo "$as_me:1058: result: $CC" >&5
1059 echo "${ECHO_T}$CC" >&6
1060 else
1061   echo "$as_me:1061: result: no" >&5
1062 echo "${ECHO_T}no" >&6
1063 fi
1064
1065 fi
1066 if test -z "$ac_cv_prog_CC"; then
1067   ac_ct_CC=$CC
1068   # Extract the first word of "gcc", so it can be a program name with args.
1069 set dummy gcc; ac_word=$2
1070 echo "$as_me:1070: checking for $ac_word" >&5
1071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1072 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1073   echo $ECHO_N "(cached) $ECHO_C" >&6
1074 else
1075   if test -n "$ac_ct_CC"; then
1076   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1077 else
1078   ac_save_IFS=$IFS; IFS=$ac_path_separator
1079 ac_dummy="$PATH"
1080 for ac_dir in $ac_dummy; do
1081   IFS=$ac_save_IFS
1082   test -z "$ac_dir" && ac_dir=.
1083   $as_executable_p "$ac_dir/$ac_word" || continue
1084 ac_cv_prog_ac_ct_CC="gcc"
1085 echo "$as_me:1085: found $ac_dir/$ac_word" >&5
1086 break
1087 done
1088
1089 fi
1090 fi
1091 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1092 if test -n "$ac_ct_CC"; then
1093   echo "$as_me:1093: result: $ac_ct_CC" >&5
1094 echo "${ECHO_T}$ac_ct_CC" >&6
1095 else
1096   echo "$as_me:1096: result: no" >&5
1097 echo "${ECHO_T}no" >&6
1098 fi
1099
1100   CC=$ac_ct_CC
1101 else
1102   CC="$ac_cv_prog_CC"
1103 fi
1104
1105 if test -z "$CC"; then
1106   if test -n "$ac_tool_prefix"; then
1107   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1108 set dummy ${ac_tool_prefix}cc; ac_word=$2
1109 echo "$as_me:1109: checking for $ac_word" >&5
1110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1111 if test "${ac_cv_prog_CC+set}" = set; then
1112   echo $ECHO_N "(cached) $ECHO_C" >&6
1113 else
1114   if test -n "$CC"; then
1115   ac_cv_prog_CC="$CC" # Let the user override the test.
1116 else
1117   ac_save_IFS=$IFS; IFS=$ac_path_separator
1118 ac_dummy="$PATH"
1119 for ac_dir in $ac_dummy; do
1120   IFS=$ac_save_IFS
1121   test -z "$ac_dir" && ac_dir=.
1122   $as_executable_p "$ac_dir/$ac_word" || continue
1123 ac_cv_prog_CC="${ac_tool_prefix}cc"
1124 echo "$as_me:1124: found $ac_dir/$ac_word" >&5
1125 break
1126 done
1127
1128 fi
1129 fi
1130 CC=$ac_cv_prog_CC
1131 if test -n "$CC"; then
1132   echo "$as_me:1132: result: $CC" >&5
1133 echo "${ECHO_T}$CC" >&6
1134 else
1135   echo "$as_me:1135: result: no" >&5
1136 echo "${ECHO_T}no" >&6
1137 fi
1138
1139 fi
1140 if test -z "$ac_cv_prog_CC"; then
1141   ac_ct_CC=$CC
1142   # Extract the first word of "cc", so it can be a program name with args.
1143 set dummy cc; ac_word=$2
1144 echo "$as_me:1144: checking for $ac_word" >&5
1145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1146 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1147   echo $ECHO_N "(cached) $ECHO_C" >&6
1148 else
1149   if test -n "$ac_ct_CC"; then
1150   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1151 else
1152   ac_save_IFS=$IFS; IFS=$ac_path_separator
1153 ac_dummy="$PATH"
1154 for ac_dir in $ac_dummy; do
1155   IFS=$ac_save_IFS
1156   test -z "$ac_dir" && ac_dir=.
1157   $as_executable_p "$ac_dir/$ac_word" || continue
1158 ac_cv_prog_ac_ct_CC="cc"
1159 echo "$as_me:1159: found $ac_dir/$ac_word" >&5
1160 break
1161 done
1162
1163 fi
1164 fi
1165 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1166 if test -n "$ac_ct_CC"; then
1167   echo "$as_me:1167: result: $ac_ct_CC" >&5
1168 echo "${ECHO_T}$ac_ct_CC" >&6
1169 else
1170   echo "$as_me:1170: result: no" >&5
1171 echo "${ECHO_T}no" >&6
1172 fi
1173
1174   CC=$ac_ct_CC
1175 else
1176   CC="$ac_cv_prog_CC"
1177 fi
1178
1179 fi
1180 if test -z "$CC"; then
1181   # Extract the first word of "cc", so it can be a program name with args.
1182 set dummy cc; ac_word=$2
1183 echo "$as_me:1183: checking for $ac_word" >&5
1184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1185 if test "${ac_cv_prog_CC+set}" = set; then
1186   echo $ECHO_N "(cached) $ECHO_C" >&6
1187 else
1188   if test -n "$CC"; then
1189   ac_cv_prog_CC="$CC" # Let the user override the test.
1190 else
1191   ac_prog_rejected=no
1192   ac_save_IFS=$IFS; IFS=$ac_path_separator
1193 ac_dummy="$PATH"
1194 for ac_dir in $ac_dummy; do
1195   IFS=$ac_save_IFS
1196   test -z "$ac_dir" && ac_dir=.
1197   $as_executable_p "$ac_dir/$ac_word" || continue
1198 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1199   ac_prog_rejected=yes
1200   continue
1201 fi
1202 ac_cv_prog_CC="cc"
1203 echo "$as_me:1203: found $ac_dir/$ac_word" >&5
1204 break
1205 done
1206
1207 if test $ac_prog_rejected = yes; then
1208   # We found a bogon in the path, so make sure we never use it.
1209   set dummy $ac_cv_prog_CC
1210   shift
1211   if test $# != 0; then
1212     # We chose a different compiler from the bogus one.
1213     # However, it has the same basename, so the bogon will be chosen
1214     # first if we set CC to just the basename; use the full file name.
1215     shift
1216     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1217     shift
1218     ac_cv_prog_CC="$@"
1219   fi
1220 fi
1221 fi
1222 fi
1223 CC=$ac_cv_prog_CC
1224 if test -n "$CC"; then
1225   echo "$as_me:1225: result: $CC" >&5
1226 echo "${ECHO_T}$CC" >&6
1227 else
1228   echo "$as_me:1228: result: no" >&5
1229 echo "${ECHO_T}no" >&6
1230 fi
1231
1232 fi
1233 if test -z "$CC"; then
1234   if test -n "$ac_tool_prefix"; then
1235   for ac_prog in cl
1236   do
1237     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1238 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1239 echo "$as_me:1239: checking for $ac_word" >&5
1240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1241 if test "${ac_cv_prog_CC+set}" = set; then
1242   echo $ECHO_N "(cached) $ECHO_C" >&6
1243 else
1244   if test -n "$CC"; then
1245   ac_cv_prog_CC="$CC" # Let the user override the test.
1246 else
1247   ac_save_IFS=$IFS; IFS=$ac_path_separator
1248 ac_dummy="$PATH"
1249 for ac_dir in $ac_dummy; do
1250   IFS=$ac_save_IFS
1251   test -z "$ac_dir" && ac_dir=.
1252   $as_executable_p "$ac_dir/$ac_word" || continue
1253 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1254 echo "$as_me:1254: found $ac_dir/$ac_word" >&5
1255 break
1256 done
1257
1258 fi
1259 fi
1260 CC=$ac_cv_prog_CC
1261 if test -n "$CC"; then
1262   echo "$as_me:1262: result: $CC" >&5
1263 echo "${ECHO_T}$CC" >&6
1264 else
1265   echo "$as_me:1265: result: no" >&5
1266 echo "${ECHO_T}no" >&6
1267 fi
1268
1269     test -n "$CC" && break
1270   done
1271 fi
1272 if test -z "$CC"; then
1273   ac_ct_CC=$CC
1274   for ac_prog in cl
1275 do
1276   # Extract the first word of "$ac_prog", so it can be a program name with args.
1277 set dummy $ac_prog; ac_word=$2
1278 echo "$as_me:1278: checking for $ac_word" >&5
1279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1280 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1281   echo $ECHO_N "(cached) $ECHO_C" >&6
1282 else
1283   if test -n "$ac_ct_CC"; then
1284   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1285 else
1286   ac_save_IFS=$IFS; IFS=$ac_path_separator
1287 ac_dummy="$PATH"
1288 for ac_dir in $ac_dummy; do
1289   IFS=$ac_save_IFS
1290   test -z "$ac_dir" && ac_dir=.
1291   $as_executable_p "$ac_dir/$ac_word" || continue
1292 ac_cv_prog_ac_ct_CC="$ac_prog"
1293 echo "$as_me:1293: found $ac_dir/$ac_word" >&5
1294 break
1295 done
1296
1297 fi
1298 fi
1299 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1300 if test -n "$ac_ct_CC"; then
1301   echo "$as_me:1301: result: $ac_ct_CC" >&5
1302 echo "${ECHO_T}$ac_ct_CC" >&6
1303 else
1304   echo "$as_me:1304: result: no" >&5
1305 echo "${ECHO_T}no" >&6
1306 fi
1307
1308   test -n "$ac_ct_CC" && break
1309 done
1310
1311   CC=$ac_ct_CC
1312 fi
1313
1314 fi
1315
1316 test -z "$CC" && { { echo "$as_me:1316: error: no acceptable cc found in \$PATH" >&5
1317 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1318    { (exit 1); exit 1; }; }
1319
1320 # Provide some information about the compiler.
1321 echo "$as_me:1321:" \
1322      "checking for C compiler version" >&5
1323 ac_compiler=`set X $ac_compile; echo $2`
1324 { (eval echo "$as_me:1324: \"$ac_compiler --version </dev/null >&5\"") >&5
1325   (eval $ac_compiler --version </dev/null >&5) 2>&5
1326   ac_status=$?
1327   echo "$as_me:1327: \$? = $ac_status" >&5
1328   (exit $ac_status); }
1329 { (eval echo "$as_me:1329: \"$ac_compiler -v </dev/null >&5\"") >&5
1330   (eval $ac_compiler -v </dev/null >&5) 2>&5
1331   ac_status=$?
1332   echo "$as_me:1332: \$? = $ac_status" >&5
1333   (exit $ac_status); }
1334 { (eval echo "$as_me:1334: \"$ac_compiler -V </dev/null >&5\"") >&5
1335   (eval $ac_compiler -V </dev/null >&5) 2>&5
1336   ac_status=$?
1337   echo "$as_me:1337: \$? = $ac_status" >&5
1338   (exit $ac_status); }
1339
1340 cat >conftest.$ac_ext <<_ACEOF
1341 #line 1341 "configure"
1342 #include "confdefs.h"
1343
1344 int
1345 main ()
1346 {
1347
1348   ;
1349   return 0;
1350 }
1351 _ACEOF
1352 ac_clean_files_save=$ac_clean_files
1353 ac_clean_files="$ac_clean_files a.out a.exe"
1354 # Try to create an executable without -o first, disregard a.out.
1355 # It will help us diagnose broken compilers, and finding out an intuition
1356 # of exeext.
1357 echo "$as_me:1357: checking for C compiler default output" >&5
1358 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1359 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1360 if { (eval echo "$as_me:1360: \"$ac_link_default\"") >&5
1361   (eval $ac_link_default) 2>&5
1362   ac_status=$?
1363   echo "$as_me:1363: \$? = $ac_status" >&5
1364   (exit $ac_status); }; then
1365   # Find the output, starting from the most likely.  This scheme is
1366 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1367 # resort.
1368 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1369                 ls a.out conftest 2>/dev/null;
1370                 ls a.* conftest.* 2>/dev/null`; do
1371   case $ac_file in
1372     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1373     a.out ) # We found the default executable, but exeext='' is most
1374             # certainly right.
1375             break;;
1376     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1377           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1378           export ac_cv_exeext
1379           break;;
1380     * ) break;;
1381   esac
1382 done
1383 else
1384   echo "$as_me: failed program was:" >&5
1385 cat conftest.$ac_ext >&5
1386 { { echo "$as_me:1386: error: C compiler cannot create executables" >&5
1387 echo "$as_me: error: C compiler cannot create executables" >&2;}
1388    { (exit 77); exit 77; }; }
1389 fi
1390
1391 ac_exeext=$ac_cv_exeext
1392 echo "$as_me:1392: result: $ac_file" >&5
1393 echo "${ECHO_T}$ac_file" >&6
1394
1395 # Check the compiler produces executables we can run.  If not, either
1396 # the compiler is broken, or we cross compile.
1397 echo "$as_me:1397: checking whether the C compiler works" >&5
1398 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1399 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1400 # If not cross compiling, check that we can run a simple program.
1401 if test "$cross_compiling" != yes; then
1402   if { ac_try='./$ac_file'
1403   { (eval echo "$as_me:1403: \"$ac_try\"") >&5
1404   (eval $ac_try) 2>&5
1405   ac_status=$?
1406   echo "$as_me:1406: \$? = $ac_status" >&5
1407   (exit $ac_status); }; }; then
1408     cross_compiling=no
1409   else
1410     if test "$cross_compiling" = maybe; then
1411         cross_compiling=yes
1412     else
1413         { { echo "$as_me:1413: error: cannot run C compiled programs.
1414 If you meant to cross compile, use \`--host'." >&5
1415 echo "$as_me: error: cannot run C compiled programs.
1416 If you meant to cross compile, use \`--host'." >&2;}
1417    { (exit 1); exit 1; }; }
1418     fi
1419   fi
1420 fi
1421 echo "$as_me:1421: result: yes" >&5
1422 echo "${ECHO_T}yes" >&6
1423
1424 rm -f a.out a.exe conftest$ac_cv_exeext
1425 ac_clean_files=$ac_clean_files_save
1426 # Check the compiler produces executables we can run.  If not, either
1427 # the compiler is broken, or we cross compile.
1428 echo "$as_me:1428: checking whether we are cross compiling" >&5
1429 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1430 echo "$as_me:1430: result: $cross_compiling" >&5
1431 echo "${ECHO_T}$cross_compiling" >&6
1432
1433 echo "$as_me:1433: checking for executable suffix" >&5
1434 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1435 if { (eval echo "$as_me:1435: \"$ac_link\"") >&5
1436   (eval $ac_link) 2>&5
1437   ac_status=$?
1438   echo "$as_me:1438: \$? = $ac_status" >&5
1439   (exit $ac_status); }; then
1440   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1441 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1442 # work properly (i.e., refer to `conftest.exe'), while it won't with
1443 # `rm'.
1444 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1445   case $ac_file in
1446     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1447     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1448           export ac_cv_exeext
1449           break;;
1450     * ) break;;
1451   esac
1452 done
1453 else
1454   { { echo "$as_me:1454: error: cannot compute EXEEXT: cannot compile and link" >&5
1455 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1456    { (exit 1); exit 1; }; }
1457 fi
1458
1459 rm -f conftest$ac_cv_exeext
1460 echo "$as_me:1460: result: $ac_cv_exeext" >&5
1461 echo "${ECHO_T}$ac_cv_exeext" >&6
1462
1463 rm -f conftest.$ac_ext
1464 EXEEXT=$ac_cv_exeext
1465 ac_exeext=$EXEEXT
1466 echo "$as_me:1466: checking for object suffix" >&5
1467 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1468 if test "${ac_cv_objext+set}" = set; then
1469   echo $ECHO_N "(cached) $ECHO_C" >&6
1470 else
1471   cat >conftest.$ac_ext <<_ACEOF
1472 #line 1472 "configure"
1473 #include "confdefs.h"
1474
1475 int
1476 main ()
1477 {
1478
1479   ;
1480   return 0;
1481 }
1482 _ACEOF
1483 rm -f conftest.o conftest.obj
1484 if { (eval echo "$as_me:1484: \"$ac_compile\"") >&5
1485   (eval $ac_compile) 2>&5
1486   ac_status=$?
1487   echo "$as_me:1487: \$? = $ac_status" >&5
1488   (exit $ac_status); }; then
1489   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1490   case $ac_file in
1491     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1492     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1493        break;;
1494   esac
1495 done
1496 else
1497   echo "$as_me: failed program was:" >&5
1498 cat conftest.$ac_ext >&5
1499 { { echo "$as_me:1499: error: cannot compute OBJEXT: cannot compile" >&5
1500 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1501    { (exit 1); exit 1; }; }
1502 fi
1503
1504 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1505 fi
1506 echo "$as_me:1506: result: $ac_cv_objext" >&5
1507 echo "${ECHO_T}$ac_cv_objext" >&6
1508 OBJEXT=$ac_cv_objext
1509 ac_objext=$OBJEXT
1510 echo "$as_me:1510: checking whether we are using the GNU C compiler" >&5
1511 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1512 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1513   echo $ECHO_N "(cached) $ECHO_C" >&6
1514 else
1515   cat >conftest.$ac_ext <<_ACEOF
1516 #line 1516 "configure"
1517 #include "confdefs.h"
1518
1519 int
1520 main ()
1521 {
1522 #ifndef __GNUC__
1523        choke me
1524 #endif
1525
1526   ;
1527   return 0;
1528 }
1529 _ACEOF
1530 rm -f conftest.$ac_objext
1531 if { (eval echo "$as_me:1531: \"$ac_compile\"") >&5
1532   (eval $ac_compile) 2>&5
1533   ac_status=$?
1534   echo "$as_me:1534: \$? = $ac_status" >&5
1535   (exit $ac_status); } &&
1536          { ac_try='test -s conftest.$ac_objext'
1537   { (eval echo "$as_me:1537: \"$ac_try\"") >&5
1538   (eval $ac_try) 2>&5
1539   ac_status=$?
1540   echo "$as_me:1540: \$? = $ac_status" >&5
1541   (exit $ac_status); }; }; then
1542   ac_compiler_gnu=yes
1543 else
1544   echo "$as_me: failed program was:" >&5
1545 cat conftest.$ac_ext >&5
1546 ac_compiler_gnu=no
1547 fi
1548 rm -f conftest.$ac_objext conftest.$ac_ext
1549 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1550
1551 fi
1552 echo "$as_me:1552: result: $ac_cv_c_compiler_gnu" >&5
1553 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1554 GCC=`test $ac_compiler_gnu = yes && echo yes`
1555 ac_test_CFLAGS=${CFLAGS+set}
1556 ac_save_CFLAGS=$CFLAGS
1557 CFLAGS="-g"
1558 echo "$as_me:1558: checking whether $CC accepts -g" >&5
1559 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1560 if test "${ac_cv_prog_cc_g+set}" = set; then
1561   echo $ECHO_N "(cached) $ECHO_C" >&6
1562 else
1563   cat >conftest.$ac_ext <<_ACEOF
1564 #line 1564 "configure"
1565 #include "confdefs.h"
1566
1567 int
1568 main ()
1569 {
1570
1571   ;
1572   return 0;
1573 }
1574 _ACEOF
1575 rm -f conftest.$ac_objext
1576 if { (eval echo "$as_me:1576: \"$ac_compile\"") >&5
1577   (eval $ac_compile) 2>&5
1578   ac_status=$?
1579   echo "$as_me:1579: \$? = $ac_status" >&5
1580   (exit $ac_status); } &&
1581          { ac_try='test -s conftest.$ac_objext'
1582   { (eval echo "$as_me:1582: \"$ac_try\"") >&5
1583   (eval $ac_try) 2>&5
1584   ac_status=$?
1585   echo "$as_me:1585: \$? = $ac_status" >&5
1586   (exit $ac_status); }; }; then
1587   ac_cv_prog_cc_g=yes
1588 else
1589   echo "$as_me: failed program was:" >&5
1590 cat conftest.$ac_ext >&5
1591 ac_cv_prog_cc_g=no
1592 fi
1593 rm -f conftest.$ac_objext conftest.$ac_ext
1594 fi
1595 echo "$as_me:1595: result: $ac_cv_prog_cc_g" >&5
1596 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1597 if test "$ac_test_CFLAGS" = set; then
1598   CFLAGS=$ac_save_CFLAGS
1599 elif test $ac_cv_prog_cc_g = yes; then
1600   if test "$GCC" = yes; then
1601     CFLAGS="-g -O2"
1602   else
1603     CFLAGS="-g"
1604   fi
1605 else
1606   if test "$GCC" = yes; then
1607     CFLAGS="-O2"
1608   else
1609     CFLAGS=
1610   fi
1611 fi
1612 # Some people use a C++ compiler to compile C.  Since we use `exit',
1613 # in C++ we need to declare it.  In case someone uses the same compiler
1614 # for both compiling C and C++ we need to have the C++ compiler decide
1615 # the declaration of exit, since it's the most demanding environment.
1616 cat >conftest.$ac_ext <<_ACEOF
1617 #ifndef __cplusplus
1618   choke me
1619 #endif
1620 _ACEOF
1621 rm -f conftest.$ac_objext
1622 if { (eval echo "$as_me:1622: \"$ac_compile\"") >&5
1623   (eval $ac_compile) 2>&5
1624   ac_status=$?
1625   echo "$as_me:1625: \$? = $ac_status" >&5
1626   (exit $ac_status); } &&
1627          { ac_try='test -s conftest.$ac_objext'
1628   { (eval echo "$as_me:1628: \"$ac_try\"") >&5
1629   (eval $ac_try) 2>&5
1630   ac_status=$?
1631   echo "$as_me:1631: \$? = $ac_status" >&5
1632   (exit $ac_status); }; }; then
1633   for ac_declaration in \
1634    ''\
1635    '#include <stdlib.h>' \
1636    'extern "C" void std::exit (int) throw (); using std::exit;' \
1637    'extern "C" void std::exit (int); using std::exit;' \
1638    'extern "C" void exit (int) throw ();' \
1639    'extern "C" void exit (int);' \
1640    'void exit (int);'
1641 do
1642   cat >conftest.$ac_ext <<_ACEOF
1643 #line 1643 "configure"
1644 #include "confdefs.h"
1645 #include <stdlib.h>
1646 $ac_declaration
1647 int
1648 main ()
1649 {
1650 exit (42);
1651   ;
1652   return 0;
1653 }
1654 _ACEOF
1655 rm -f conftest.$ac_objext
1656 if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657   (eval $ac_compile) 2>&5
1658   ac_status=$?
1659   echo "$as_me:1659: \$? = $ac_status" >&5
1660   (exit $ac_status); } &&
1661          { ac_try='test -s conftest.$ac_objext'
1662   { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1663   (eval $ac_try) 2>&5
1664   ac_status=$?
1665   echo "$as_me:1665: \$? = $ac_status" >&5
1666   (exit $ac_status); }; }; then
1667   :
1668 else
1669   echo "$as_me: failed program was:" >&5
1670 cat conftest.$ac_ext >&5
1671 continue
1672 fi
1673 rm -f conftest.$ac_objext conftest.$ac_ext
1674   cat >conftest.$ac_ext <<_ACEOF
1675 #line 1675 "configure"
1676 #include "confdefs.h"
1677 $ac_declaration
1678 int
1679 main ()
1680 {
1681 exit (42);
1682   ;
1683   return 0;
1684 }
1685 _ACEOF
1686 rm -f conftest.$ac_objext
1687 if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5
1688   (eval $ac_compile) 2>&5
1689   ac_status=$?
1690   echo "$as_me:1690: \$? = $ac_status" >&5
1691   (exit $ac_status); } &&
1692          { ac_try='test -s conftest.$ac_objext'
1693   { (eval echo "$as_me:1693: \"$ac_try\"") >&5
1694   (eval $ac_try) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; }; then
1698   break
1699 else
1700   echo "$as_me: failed program was:" >&5
1701 cat conftest.$ac_ext >&5
1702 fi
1703 rm -f conftest.$ac_objext conftest.$ac_ext
1704 done
1705 rm -rf conftest*
1706 if test -n "$ac_declaration"; then
1707   echo '#ifdef __cplusplus' >>confdefs.h
1708   echo $ac_declaration      >>confdefs.h
1709   echo '#endif'             >>confdefs.h
1710 fi
1711
1712 else
1713   echo "$as_me: failed program was:" >&5
1714 cat conftest.$ac_ext >&5
1715 fi
1716 rm -f conftest.$ac_objext conftest.$ac_ext
1717 ac_ext=c
1718 ac_cpp='$CPP $CPPFLAGS'
1719 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1720 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1721 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1722 ac_main_return=return
1723
1724 ac_ext=c
1725 ac_cpp='$CPP $CPPFLAGS'
1726 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1727 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1728 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1729 ac_main_return=return
1730 echo "$as_me:1730: checking how to run the C preprocessor" >&5
1731 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1732 # On Suns, sometimes $CPP names a directory.
1733 if test -n "$CPP" && test -d "$CPP"; then
1734   CPP=
1735 fi
1736 if test -z "$CPP"; then
1737   if test "${ac_cv_prog_CPP+set}" = set; then
1738   echo $ECHO_N "(cached) $ECHO_C" >&6
1739 else
1740       # Double quotes because CPP needs to be expanded
1741     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1742     do
1743       ac_preproc_ok=false
1744 for ac_c_preproc_warn_flag in '' yes
1745 do
1746   # Use a header file that comes with gcc, so configuring glibc
1747   # with a fresh cross-compiler works.
1748   # On the NeXT, cc -E runs the code through the compiler's parser,
1749   # not just through cpp. "Syntax error" is here to catch this case.
1750   cat >conftest.$ac_ext <<_ACEOF
1751 #line 1751 "configure"
1752 #include "confdefs.h"
1753 #include <assert.h>
1754                      Syntax error
1755 _ACEOF
1756 if { (eval echo "$as_me:1756: \"$ac_cpp conftest.$ac_ext\"") >&5
1757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1758   ac_status=$?
1759   egrep -v '^ *\+' conftest.er1 >conftest.err
1760   rm -f conftest.er1
1761   cat conftest.err >&5
1762   echo "$as_me:1762: \$? = $ac_status" >&5
1763   (exit $ac_status); } >/dev/null; then
1764   if test -s conftest.err; then
1765     ac_cpp_err=$ac_c_preproc_warn_flag
1766   else
1767     ac_cpp_err=
1768   fi
1769 else
1770   ac_cpp_err=yes
1771 fi
1772 if test -z "$ac_cpp_err"; then
1773   :
1774 else
1775   echo "$as_me: failed program was:" >&5
1776   cat conftest.$ac_ext >&5
1777   # Broken: fails on valid input.
1778 continue
1779 fi
1780 rm -f conftest.err conftest.$ac_ext
1781
1782   # OK, works on sane cases.  Now check whether non-existent headers
1783   # can be detected and how.
1784   cat >conftest.$ac_ext <<_ACEOF
1785 #line 1785 "configure"
1786 #include "confdefs.h"
1787 #include <ac_nonexistent.h>
1788 _ACEOF
1789 if { (eval echo "$as_me:1789: \"$ac_cpp conftest.$ac_ext\"") >&5
1790   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1791   ac_status=$?
1792   egrep -v '^ *\+' conftest.er1 >conftest.err
1793   rm -f conftest.er1
1794   cat conftest.err >&5
1795   echo "$as_me:1795: \$? = $ac_status" >&5
1796   (exit $ac_status); } >/dev/null; then
1797   if test -s conftest.err; then
1798     ac_cpp_err=$ac_c_preproc_warn_flag
1799   else
1800     ac_cpp_err=
1801   fi
1802 else
1803   ac_cpp_err=yes
1804 fi
1805 if test -z "$ac_cpp_err"; then
1806   # Broken: success on invalid input.
1807 continue
1808 else
1809   echo "$as_me: failed program was:" >&5
1810   cat conftest.$ac_ext >&5
1811   # Passes both tests.
1812 ac_preproc_ok=:
1813 break
1814 fi
1815 rm -f conftest.err conftest.$ac_ext
1816
1817 done
1818 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1819 rm -f conftest.err conftest.$ac_ext
1820 if $ac_preproc_ok; then
1821   break
1822 fi
1823
1824     done
1825     ac_cv_prog_CPP=$CPP
1826
1827 fi
1828   CPP=$ac_cv_prog_CPP
1829 else
1830   ac_cv_prog_CPP=$CPP
1831 fi
1832 echo "$as_me:1832: result: $CPP" >&5
1833 echo "${ECHO_T}$CPP" >&6
1834 ac_preproc_ok=false
1835 for ac_c_preproc_warn_flag in '' yes
1836 do
1837   # Use a header file that comes with gcc, so configuring glibc
1838   # with a fresh cross-compiler works.
1839   # On the NeXT, cc -E runs the code through the compiler's parser,
1840   # not just through cpp. "Syntax error" is here to catch this case.
1841   cat >conftest.$ac_ext <<_ACEOF
1842 #line 1842 "configure"
1843 #include "confdefs.h"
1844 #include <assert.h>
1845                      Syntax error
1846 _ACEOF
1847 if { (eval echo "$as_me:1847: \"$ac_cpp conftest.$ac_ext\"") >&5
1848   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1849   ac_status=$?
1850   egrep -v '^ *\+' conftest.er1 >conftest.err
1851   rm -f conftest.er1
1852   cat conftest.err >&5
1853   echo "$as_me:1853: \$? = $ac_status" >&5
1854   (exit $ac_status); } >/dev/null; then
1855   if test -s conftest.err; then
1856     ac_cpp_err=$ac_c_preproc_warn_flag
1857   else
1858     ac_cpp_err=
1859   fi
1860 else
1861   ac_cpp_err=yes
1862 fi
1863 if test -z "$ac_cpp_err"; then
1864   :
1865 else
1866   echo "$as_me: failed program was:" >&5
1867   cat conftest.$ac_ext >&5
1868   # Broken: fails on valid input.
1869 continue
1870 fi
1871 rm -f conftest.err conftest.$ac_ext
1872
1873   # OK, works on sane cases.  Now check whether non-existent headers
1874   # can be detected and how.
1875   cat >conftest.$ac_ext <<_ACEOF
1876 #line 1876 "configure"
1877 #include "confdefs.h"
1878 #include <ac_nonexistent.h>
1879 _ACEOF
1880 if { (eval echo "$as_me:1880: \"$ac_cpp conftest.$ac_ext\"") >&5
1881   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1882   ac_status=$?
1883   egrep -v '^ *\+' conftest.er1 >conftest.err
1884   rm -f conftest.er1
1885   cat conftest.err >&5
1886   echo "$as_me:1886: \$? = $ac_status" >&5
1887   (exit $ac_status); } >/dev/null; then
1888   if test -s conftest.err; then
1889     ac_cpp_err=$ac_c_preproc_warn_flag
1890   else
1891     ac_cpp_err=
1892   fi
1893 else
1894   ac_cpp_err=yes
1895 fi
1896 if test -z "$ac_cpp_err"; then
1897   # Broken: success on invalid input.
1898 continue
1899 else
1900   echo "$as_me: failed program was:" >&5
1901   cat conftest.$ac_ext >&5
1902   # Passes both tests.
1903 ac_preproc_ok=:
1904 break
1905 fi
1906 rm -f conftest.err conftest.$ac_ext
1907
1908 done
1909 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1910 rm -f conftest.err conftest.$ac_ext
1911 if $ac_preproc_ok; then
1912   :
1913 else
1914   { { echo "$as_me:1914: error: C preprocessor \"$CPP\" fails sanity check" >&5
1915 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
1916    { (exit 1); exit 1; }; }
1917 fi
1918
1919 ac_ext=c
1920 ac_cpp='$CPP $CPPFLAGS'
1921 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1922 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1923 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1924 ac_main_return=return
1925
1926 if test $ac_cv_c_compiler_gnu = yes; then
1927     echo "$as_me:1927: checking whether $CC needs -traditional" >&5
1928 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
1929 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
1930   echo $ECHO_N "(cached) $ECHO_C" >&6
1931 else
1932     ac_pattern="Autoconf.*'x'"
1933   cat >conftest.$ac_ext <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1936 #include <sgtty.h>
1937 int Autoconf = TIOCGETP;
1938 _ACEOF
1939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1940   egrep "$ac_pattern" >/dev/null 2>&1; then
1941   ac_cv_prog_gcc_traditional=yes
1942 else
1943   ac_cv_prog_gcc_traditional=no
1944 fi
1945 rm -rf conftest*
1946
1947   if test $ac_cv_prog_gcc_traditional = no; then
1948     cat >conftest.$ac_ext <<_ACEOF
1949 #line 1949 "configure"
1950 #include "confdefs.h"
1951 #include <termio.h>
1952 int Autoconf = TCGETA;
1953 _ACEOF
1954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1955   egrep "$ac_pattern" >/dev/null 2>&1; then
1956   ac_cv_prog_gcc_traditional=yes
1957 fi
1958 rm -rf conftest*
1959
1960   fi
1961 fi
1962 echo "$as_me:1962: result: $ac_cv_prog_gcc_traditional" >&5
1963 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
1964   if test $ac_cv_prog_gcc_traditional = yes; then
1965     CC="$CC -traditional"
1966   fi
1967 fi
1968
1969 echo "$as_me:1969: checking whether ${MAKE-make} sets \${MAKE}" >&5
1970 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1971 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1972 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1973   echo $ECHO_N "(cached) $ECHO_C" >&6
1974 else
1975   cat >conftest.make <<\EOF
1976 all:
1977         @echo 'ac_maketemp="${MAKE}"'
1978 EOF
1979 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1980 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1981 if test -n "$ac_maketemp"; then
1982   eval ac_cv_prog_make_${ac_make}_set=yes
1983 else
1984   eval ac_cv_prog_make_${ac_make}_set=no
1985 fi
1986 rm -f conftest.make
1987 fi
1988 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1989   echo "$as_me:1989: result: yes" >&5
1990 echo "${ECHO_T}yes" >&6
1991   SET_MAKE=
1992 else
1993   echo "$as_me:1993: result: no" >&5
1994 echo "${ECHO_T}no" >&6
1995   SET_MAKE="MAKE=${MAKE-make}"
1996 fi
1997
1998 if test -n "$ac_tool_prefix"; then
1999   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2000 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2001 echo "$as_me:2001: checking for $ac_word" >&5
2002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2003 if test "${ac_cv_prog_RANLIB+set}" = set; then
2004   echo $ECHO_N "(cached) $ECHO_C" >&6
2005 else
2006   if test -n "$RANLIB"; then
2007   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2008 else
2009   ac_save_IFS=$IFS; IFS=$ac_path_separator
2010 ac_dummy="$PATH"
2011 for ac_dir in $ac_dummy; do
2012   IFS=$ac_save_IFS
2013   test -z "$ac_dir" && ac_dir=.
2014   $as_executable_p "$ac_dir/$ac_word" || continue
2015 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2016 echo "$as_me:2016: found $ac_dir/$ac_word" >&5
2017 break
2018 done
2019
2020 fi
2021 fi
2022 RANLIB=$ac_cv_prog_RANLIB
2023 if test -n "$RANLIB"; then
2024   echo "$as_me:2024: result: $RANLIB" >&5
2025 echo "${ECHO_T}$RANLIB" >&6
2026 else
2027   echo "$as_me:2027: result: no" >&5
2028 echo "${ECHO_T}no" >&6
2029 fi
2030
2031 fi
2032 if test -z "$ac_cv_prog_RANLIB"; then
2033   ac_ct_RANLIB=$RANLIB
2034   # Extract the first word of "ranlib", so it can be a program name with args.
2035 set dummy ranlib; ac_word=$2
2036 echo "$as_me:2036: checking for $ac_word" >&5
2037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2038 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2039   echo $ECHO_N "(cached) $ECHO_C" >&6
2040 else
2041   if test -n "$ac_ct_RANLIB"; then
2042   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2043 else
2044   ac_save_IFS=$IFS; IFS=$ac_path_separator
2045 ac_dummy="$PATH"
2046 for ac_dir in $ac_dummy; do
2047   IFS=$ac_save_IFS
2048   test -z "$ac_dir" && ac_dir=.
2049   $as_executable_p "$ac_dir/$ac_word" || continue
2050 ac_cv_prog_ac_ct_RANLIB="ranlib"
2051 echo "$as_me:2051: found $ac_dir/$ac_word" >&5
2052 break
2053 done
2054
2055   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2056 fi
2057 fi
2058 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2059 if test -n "$ac_ct_RANLIB"; then
2060   echo "$as_me:2060: result: $ac_ct_RANLIB" >&5
2061 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2062 else
2063   echo "$as_me:2063: result: no" >&5
2064 echo "${ECHO_T}no" >&6
2065 fi
2066
2067   RANLIB=$ac_ct_RANLIB
2068 else
2069   RANLIB="$ac_cv_prog_RANLIB"
2070 fi
2071
2072 ac_aux_dir=
2073 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2074   if test -f $ac_dir/install-sh; then
2075     ac_aux_dir=$ac_dir
2076     ac_install_sh="$ac_aux_dir/install-sh -c"
2077     break
2078   elif test -f $ac_dir/install.sh; then
2079     ac_aux_dir=$ac_dir
2080     ac_install_sh="$ac_aux_dir/install.sh -c"
2081     break
2082   elif test -f $ac_dir/shtool; then
2083     ac_aux_dir=$ac_dir
2084     ac_install_sh="$ac_aux_dir/shtool install -c"
2085     break
2086   fi
2087 done
2088 if test -z "$ac_aux_dir"; then
2089   { { echo "$as_me:2089: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2090 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2091    { (exit 1); exit 1; }; }
2092 fi
2093 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2094 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2095 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2096
2097 # Find a good install program.  We prefer a C program (faster),
2098 # so one script is as good as another.  But avoid the broken or
2099 # incompatible versions:
2100 # SysV /etc/install, /usr/sbin/install
2101 # SunOS /usr/etc/install
2102 # IRIX /sbin/install
2103 # AIX /bin/install
2104 # AmigaOS /C/install, which installs bootblocks on floppy discs
2105 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2106 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2107 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2108 # ./install, which can be erroneously created by make from ./install.sh.
2109 echo "$as_me:2109: checking for a BSD compatible install" >&5
2110 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2111 if test -z "$INSTALL"; then
2112 if test "${ac_cv_path_install+set}" = set; then
2113   echo $ECHO_N "(cached) $ECHO_C" >&6
2114 else
2115     ac_save_IFS=$IFS; IFS=$ac_path_separator
2116   for ac_dir in $PATH; do
2117     IFS=$ac_save_IFS
2118     # Account for people who put trailing slashes in PATH elements.
2119     case $ac_dir/ in
2120     / | ./ | .// | /cC/* \
2121     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2122     | /usr/ucb/* ) ;;
2123     *)
2124       # OSF1 and SCO ODT 3.0 have their own names for install.
2125       # Don't use installbsd from OSF since it installs stuff as root
2126       # by default.
2127       for ac_prog in ginstall scoinst install; do
2128         if $as_executable_p "$ac_dir/$ac_prog"; then
2129           if test $ac_prog = install &&
2130             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2131             # AIX install.  It has an incompatible calling convention.
2132             :
2133           elif test $ac_prog = install &&
2134             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2135             # program-specific install script used by HP pwplus--don't use.
2136             :
2137           else
2138             ac_cv_path_install="$ac_dir/$ac_prog -c"
2139             break 2
2140           fi
2141         fi
2142       done
2143       ;;
2144     esac
2145   done
2146
2147 fi
2148   if test "${ac_cv_path_install+set}" = set; then
2149     INSTALL=$ac_cv_path_install
2150   else
2151     # As a last resort, use the slow shell script.  We don't cache a
2152     # path for INSTALL within a source directory, because that will
2153     # break other packages using the cache if that directory is
2154     # removed, or if the path is relative.
2155     INSTALL=$ac_install_sh
2156   fi
2157 fi
2158 echo "$as_me:2158: result: $INSTALL" >&5
2159 echo "${ECHO_T}$INSTALL" >&6
2160
2161 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2162 # It thinks the first close brace ends the variable substitution.
2163 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2164
2165 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2166
2167 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2168
2169 if test -n "$ac_tool_prefix"; then
2170   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2171 set dummy ${ac_tool_prefix}ar; ac_word=$2
2172 echo "$as_me:2172: checking for $ac_word" >&5
2173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2174 if test "${ac_cv_prog_AR+set}" = set; then
2175   echo $ECHO_N "(cached) $ECHO_C" >&6
2176 else
2177   if test -n "$AR"; then
2178   ac_cv_prog_AR="$AR" # Let the user override the test.
2179 else
2180   ac_save_IFS=$IFS; IFS=$ac_path_separator
2181 ac_dummy="$PATH"
2182 for ac_dir in $ac_dummy; do
2183   IFS=$ac_save_IFS
2184   test -z "$ac_dir" && ac_dir=.
2185   $as_executable_p "$ac_dir/$ac_word" || continue
2186 ac_cv_prog_AR="${ac_tool_prefix}ar"
2187 echo "$as_me:2187: found $ac_dir/$ac_word" >&5
2188 break
2189 done
2190
2191 fi
2192 fi
2193 AR=$ac_cv_prog_AR
2194 if test -n "$AR"; then
2195   echo "$as_me:2195: result: $AR" >&5
2196 echo "${ECHO_T}$AR" >&6
2197 else
2198   echo "$as_me:2198: result: no" >&5
2199 echo "${ECHO_T}no" >&6
2200 fi
2201
2202 fi
2203 if test -z "$ac_cv_prog_AR"; then
2204   ac_ct_AR=$AR
2205   # Extract the first word of "ar", so it can be a program name with args.
2206 set dummy ar; ac_word=$2
2207 echo "$as_me:2207: checking for $ac_word" >&5
2208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2209 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
2210   echo $ECHO_N "(cached) $ECHO_C" >&6
2211 else
2212   if test -n "$ac_ct_AR"; then
2213   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
2214 else
2215   ac_save_IFS=$IFS; IFS=$ac_path_separator
2216 ac_dummy="$PATH"
2217 for ac_dir in $ac_dummy; do
2218   IFS=$ac_save_IFS
2219   test -z "$ac_dir" && ac_dir=.
2220   $as_executable_p "$ac_dir/$ac_word" || continue
2221 ac_cv_prog_ac_ct_AR="ar"
2222 echo "$as_me:2222: found $ac_dir/$ac_word" >&5
2223 break
2224 done
2225
2226   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
2227 fi
2228 fi
2229 ac_ct_AR=$ac_cv_prog_ac_ct_AR
2230 if test -n "$ac_ct_AR"; then
2231   echo "$as_me:2231: result: $ac_ct_AR" >&5
2232 echo "${ECHO_T}$ac_ct_AR" >&6
2233 else
2234   echo "$as_me:2234: result: no" >&5
2235 echo "${ECHO_T}no" >&6
2236 fi
2237
2238   AR=$ac_ct_AR
2239 else
2240   AR="$ac_cv_prog_AR"
2241 fi
2242
2243 echo "$as_me:2243: checking for POSIXized ISC" >&5
2244 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2245 if test -d /etc/conf/kconfig.d &&
2246    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2247 then
2248   echo "$as_me:2248: result: yes" >&5
2249 echo "${ECHO_T}yes" >&6
2250   ISC=yes # If later tests want to check for ISC.
2251
2252 cat >>confdefs.h <<\EOF
2253 #define _POSIX_SOURCE 1
2254 EOF
2255
2256   if test "$GCC" = yes; then
2257     CC="$CC -posix"
2258   else
2259     CC="$CC -Xp"
2260   fi
2261 else
2262   echo "$as_me:2262: result: no" >&5
2263 echo "${ECHO_T}no" >&6
2264   ISC=
2265 fi
2266
2267 echo "$as_me:2267: checking for $CC option to accept ANSI C" >&5
2268 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2269 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2270   echo $ECHO_N "(cached) $ECHO_C" >&6
2271 else
2272   ac_cv_prog_cc_stdc=no
2273 ac_save_CC=$CC
2274 cat >conftest.$ac_ext <<_ACEOF
2275 #line 2275 "configure"
2276 #include "confdefs.h"
2277 #include <stdarg.h>
2278 #include <stdio.h>
2279 #include <sys/types.h>
2280 #include <sys/stat.h>
2281 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2282 struct buf { int x; };
2283 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2284 static char *e (p, i)
2285      char **p;
2286      int i;
2287 {
2288   return p[i];
2289 }
2290 static char *f (char * (*g) (char **, int), char **p, ...)
2291 {
2292   char *s;
2293   va_list v;
2294   va_start (v,p);
2295   s = g (p, va_arg (v,int));
2296   va_end (v);
2297   return s;
2298 }
2299 int test (int i, double x);
2300 struct s1 {int (*f) (int a);};
2301 struct s2 {int (*f) (double a);};
2302 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2303 int argc;
2304 char **argv;
2305 int
2306 main ()
2307 {
2308 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2309   ;
2310   return 0;
2311 }
2312 _ACEOF
2313 # Don't try gcc -ansi; that turns off useful extensions and
2314 # breaks some systems' header files.
2315 # AIX                   -qlanglvl=ansi
2316 # Ultrix and OSF/1      -std1
2317 # HP-UX 10.20 and later -Ae
2318 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2319 # SVR4                  -Xc -D__EXTENSIONS__
2320 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2321 do
2322   CC="$ac_save_CC $ac_arg"
2323   rm -f conftest.$ac_objext
2324 if { (eval echo "$as_me:2324: \"$ac_compile\"") >&5
2325   (eval $ac_compile) 2>&5
2326   ac_status=$?
2327   echo "$as_me:2327: \$? = $ac_status" >&5
2328   (exit $ac_status); } &&
2329          { ac_try='test -s conftest.$ac_objext'
2330   { (eval echo "$as_me:2330: \"$ac_try\"") >&5
2331   (eval $ac_try) 2>&5
2332   ac_status=$?
2333   echo "$as_me:2333: \$? = $ac_status" >&5
2334   (exit $ac_status); }; }; then
2335   ac_cv_prog_cc_stdc=$ac_arg
2336 break
2337 else
2338   echo "$as_me: failed program was:" >&5
2339 cat conftest.$ac_ext >&5
2340 fi
2341 rm -f conftest.$ac_objext
2342 done
2343 rm -f conftest.$ac_ext conftest.$ac_objext
2344 CC=$ac_save_CC
2345
2346 fi
2347
2348 case "x$ac_cv_prog_cc_stdc" in
2349   x|xno)
2350     echo "$as_me:2350: result: none needed" >&5
2351 echo "${ECHO_T}none needed" >&6 ;;
2352   *)
2353     echo "$as_me:2353: result: $ac_cv_prog_cc_stdc" >&5
2354 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2355     CC="$CC $ac_cv_prog_cc_stdc" ;;
2356 esac
2357
2358 echo "$as_me:2358: checking for an ANSI C-conforming const" >&5
2359 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
2360 if test "${ac_cv_c_const+set}" = set; then
2361   echo $ECHO_N "(cached) $ECHO_C" >&6
2362 else
2363   cat >conftest.$ac_ext <<_ACEOF
2364 #line 2364 "configure"
2365 #include "confdefs.h"
2366
2367 int
2368 main ()
2369 {
2370 /* FIXME: Include the comments suggested by Paul. */
2371 #ifndef __cplusplus
2372   /* Ultrix mips cc rejects this.  */
2373   typedef int charset[2];
2374   const charset x;
2375   /* SunOS 4.1.1 cc rejects this.  */
2376   char const *const *ccp;
2377   char **p;
2378   /* NEC SVR4.0.2 mips cc rejects this.  */
2379   struct point {int x, y;};
2380   static struct point const zero = {0,0};
2381   /* AIX XL C 1.02.0.0 rejects this.
2382      It does not let you subtract one const X* pointer from another in
2383      an arm of an if-expression whose if-part is not a constant
2384      expression */
2385   const char *g = "string";
2386   ccp = &g + (g ? g-g : 0);
2387   /* HPUX 7.0 cc rejects these. */
2388   ++ccp;
2389   p = (char**) ccp;
2390   ccp = (char const *const *) p;
2391   { /* SCO 3.2v4 cc rejects this.  */
2392     char *t;
2393     char const *s = 0 ? (char *) 0 : (char const *) 0;
2394
2395     *t++ = 0;
2396   }
2397   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2398     int x[] = {25, 17};
2399     const int *foo = &x[0];
2400     ++foo;
2401   }
2402   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2403     typedef const int *iptr;
2404     iptr p = 0;
2405     ++p;
2406   }
2407   { /* AIX XL C 1.02.0.0 rejects this saying
2408        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2409     struct s { int j; const int *ap[3]; };
2410     struct s *b; b->j = 5;
2411   }
2412   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2413     const int foo = 10;
2414   }
2415 #endif
2416
2417   ;
2418   return 0;
2419 }
2420 _ACEOF
2421 rm -f conftest.$ac_objext
2422 if { (eval echo "$as_me:2422: \"$ac_compile\"") >&5
2423   (eval $ac_compile) 2>&5
2424   ac_status=$?
2425   echo "$as_me:2425: \$? = $ac_status" >&5
2426   (exit $ac_status); } &&
2427          { ac_try='test -s conftest.$ac_objext'
2428   { (eval echo "$as_me:2428: \"$ac_try\"") >&5
2429   (eval $ac_try) 2>&5
2430   ac_status=$?
2431   echo "$as_me:2431: \$? = $ac_status" >&5
2432   (exit $ac_status); }; }; then
2433   ac_cv_c_const=yes
2434 else
2435   echo "$as_me: failed program was:" >&5
2436 cat conftest.$ac_ext >&5
2437 ac_cv_c_const=no
2438 fi
2439 rm -f conftest.$ac_objext conftest.$ac_ext
2440 fi
2441 echo "$as_me:2441: result: $ac_cv_c_const" >&5
2442 echo "${ECHO_T}$ac_cv_c_const" >&6
2443 if test $ac_cv_c_const = no; then
2444
2445 cat >>confdefs.h <<\EOF
2446 #define const
2447 EOF
2448
2449 fi
2450
2451 echo "$as_me:2451: checking for makeflags variable" >&5
2452 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2453 if test "${cf_cv_makeflags+set}" = set; then
2454   echo $ECHO_N "(cached) $ECHO_C" >&6
2455 else
2456
2457         cf_cv_makeflags=''
2458         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2459         do
2460                 cat >cf_makeflags.tmp <<CF_EOF
2461 SHELL = /bin/sh
2462 all :
2463         @ echo '.$cf_option'
2464 CF_EOF
2465                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
2466                 case "$cf_result" in
2467                 .*k)
2468                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2469                         case "$cf_result" in
2470                         .*CC=*) cf_cv_makeflags=
2471                                 ;;
2472                         *)      cf_cv_makeflags=$cf_option
2473                                 ;;
2474                         esac
2475                         break
2476                         ;;
2477                 .-)     ;;
2478                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
2479                         ;;
2480                 esac
2481         done
2482         rm -f cf_makeflags.tmp
2483
2484 fi
2485 echo "$as_me:2485: result: $cf_cv_makeflags" >&5
2486 echo "${ECHO_T}$cf_cv_makeflags" >&6
2487
2488 echo "$as_me:2488: checking if filesystem supports mixed-case filenames" >&5
2489 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2490 if test "${cf_cv_mixedcase+set}" = set; then
2491   echo $ECHO_N "(cached) $ECHO_C" >&6
2492 else
2493
2494 if test "$cross_compiling" = yes ; then
2495         case $target_alias in #(vi
2496         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2497                 cf_cv_mixedcase=no
2498                 ;;
2499         *)
2500                 cf_cv_mixedcase=yes
2501                 ;;
2502         esac
2503 else
2504         rm -f conftest CONFTEST
2505         echo test >conftest
2506         if test -f CONFTEST ; then
2507                 cf_cv_mixedcase=no
2508         else
2509                 cf_cv_mixedcase=yes
2510         fi
2511         rm -f conftest CONFTEST
2512 fi
2513
2514 fi
2515 echo "$as_me:2515: result: $cf_cv_mixedcase" >&5
2516 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2517 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2518 #define MIXEDCASE_FILENAMES 1
2519 EOF
2520
2521 for ac_prog in exctags ctags
2522 do
2523   # Extract the first word of "$ac_prog", so it can be a program name with args.
2524 set dummy $ac_prog; ac_word=$2
2525 echo "$as_me:2525: checking for $ac_word" >&5
2526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2527 if test "${ac_cv_prog_CTAGS+set}" = set; then
2528   echo $ECHO_N "(cached) $ECHO_C" >&6
2529 else
2530   if test -n "$CTAGS"; then
2531   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2532 else
2533   ac_save_IFS=$IFS; IFS=$ac_path_separator
2534 ac_dummy="$PATH"
2535 for ac_dir in $ac_dummy; do
2536   IFS=$ac_save_IFS
2537   test -z "$ac_dir" && ac_dir=.
2538   $as_executable_p "$ac_dir/$ac_word" || continue
2539 ac_cv_prog_CTAGS="$ac_prog"
2540 echo "$as_me:2540: found $ac_dir/$ac_word" >&5
2541 break
2542 done
2543
2544 fi
2545 fi
2546 CTAGS=$ac_cv_prog_CTAGS
2547 if test -n "$CTAGS"; then
2548   echo "$as_me:2548: result: $CTAGS" >&5
2549 echo "${ECHO_T}$CTAGS" >&6
2550 else
2551   echo "$as_me:2551: result: no" >&5
2552 echo "${ECHO_T}no" >&6
2553 fi
2554
2555   test -n "$CTAGS" && break
2556 done
2557
2558 for ac_prog in exetags etags
2559 do
2560   # Extract the first word of "$ac_prog", so it can be a program name with args.
2561 set dummy $ac_prog; ac_word=$2
2562 echo "$as_me:2562: checking for $ac_word" >&5
2563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2564 if test "${ac_cv_prog_ETAGS+set}" = set; then
2565   echo $ECHO_N "(cached) $ECHO_C" >&6
2566 else
2567   if test -n "$ETAGS"; then
2568   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2569 else
2570   ac_save_IFS=$IFS; IFS=$ac_path_separator
2571 ac_dummy="$PATH"
2572 for ac_dir in $ac_dummy; do
2573   IFS=$ac_save_IFS
2574   test -z "$ac_dir" && ac_dir=.
2575   $as_executable_p "$ac_dir/$ac_word" || continue
2576 ac_cv_prog_ETAGS="$ac_prog"
2577 echo "$as_me:2577: found $ac_dir/$ac_word" >&5
2578 break
2579 done
2580
2581 fi
2582 fi
2583 ETAGS=$ac_cv_prog_ETAGS
2584 if test -n "$ETAGS"; then
2585   echo "$as_me:2585: result: $ETAGS" >&5
2586 echo "${ECHO_T}$ETAGS" >&6
2587 else
2588   echo "$as_me:2588: result: no" >&5
2589 echo "${ECHO_T}no" >&6
2590 fi
2591
2592   test -n "$ETAGS" && break
2593 done
2594
2595 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2596 set dummy ${CTAGS:-ctags}; ac_word=$2
2597 echo "$as_me:2597: checking for $ac_word" >&5
2598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2599 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   if test -n "$MAKE_LOWER_TAGS"; then
2603   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2604 else
2605   ac_save_IFS=$IFS; IFS=$ac_path_separator
2606 ac_dummy="$PATH"
2607 for ac_dir in $ac_dummy; do
2608   IFS=$ac_save_IFS
2609   test -z "$ac_dir" && ac_dir=.
2610   $as_executable_p "$ac_dir/$ac_word" || continue
2611 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2612 echo "$as_me:2612: found $ac_dir/$ac_word" >&5
2613 break
2614 done
2615
2616   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2617 fi
2618 fi
2619 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2620 if test -n "$MAKE_LOWER_TAGS"; then
2621   echo "$as_me:2621: result: $MAKE_LOWER_TAGS" >&5
2622 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2623 else
2624   echo "$as_me:2624: result: no" >&5
2625 echo "${ECHO_T}no" >&6
2626 fi
2627
2628 if test "$cf_cv_mixedcase" = yes ; then
2629         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2630 set dummy ${ETAGS:-etags}; ac_word=$2
2631 echo "$as_me:2631: checking for $ac_word" >&5
2632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2633 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2634   echo $ECHO_N "(cached) $ECHO_C" >&6
2635 else
2636   if test -n "$MAKE_UPPER_TAGS"; then
2637   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2638 else
2639   ac_save_IFS=$IFS; IFS=$ac_path_separator
2640 ac_dummy="$PATH"
2641 for ac_dir in $ac_dummy; do
2642   IFS=$ac_save_IFS
2643   test -z "$ac_dir" && ac_dir=.
2644   $as_executable_p "$ac_dir/$ac_word" || continue
2645 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2646 echo "$as_me:2646: found $ac_dir/$ac_word" >&5
2647 break
2648 done
2649
2650   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2651 fi
2652 fi
2653 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2654 if test -n "$MAKE_UPPER_TAGS"; then
2655   echo "$as_me:2655: result: $MAKE_UPPER_TAGS" >&5
2656 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2657 else
2658   echo "$as_me:2658: result: no" >&5
2659 echo "${ECHO_T}no" >&6
2660 fi
2661
2662 else
2663         MAKE_UPPER_TAGS=no
2664 fi
2665
2666 if test "$MAKE_UPPER_TAGS" = yes ; then
2667         MAKE_UPPER_TAGS=
2668 else
2669         MAKE_UPPER_TAGS="#"
2670 fi
2671
2672 if test "$MAKE_LOWER_TAGS" = yes ; then
2673         MAKE_LOWER_TAGS=
2674 else
2675         MAKE_LOWER_TAGS="#"
2676 fi
2677
2678 echo "$as_me:2678: checking if you want to see long compiling messages" >&5
2679 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
2680
2681 # Check whether --enable-echo or --disable-echo was given.
2682 if test "${enable_echo+set}" = set; then
2683   enableval="$enable_echo"
2684   test "$enableval" != no && enableval=yes
2685   if test "$enableval" != "yes" ; then
2686
2687     ECHO_LT='--silent'
2688     ECHO_LD='@echo linking $@;'
2689     RULE_CC='@echo compiling $<'
2690     SHOW_CC='@echo compiling $@'
2691     ECHO_CC='@'
2692
2693   else
2694
2695     ECHO_LT=''
2696     ECHO_LD=''
2697     RULE_CC=''
2698     SHOW_CC=''
2699     ECHO_CC=''
2700
2701   fi
2702 else
2703   enableval=yes
2704
2705     ECHO_LT=''
2706     ECHO_LD=''
2707     RULE_CC=''
2708     SHOW_CC=''
2709     ECHO_CC=''
2710
2711 fi;
2712 echo "$as_me:2712: result: $enableval" >&5
2713 echo "${ECHO_T}$enableval" >&6
2714
2715 # Make sure we can run config.sub.
2716 $ac_config_sub sun4 >/dev/null 2>&1 ||
2717   { { echo "$as_me:2717: error: cannot run $ac_config_sub" >&5
2718 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
2719    { (exit 1); exit 1; }; }
2720
2721 echo "$as_me:2721: checking build system type" >&5
2722 echo $ECHO_N "checking build system type... $ECHO_C" >&6
2723 if test "${ac_cv_build+set}" = set; then
2724   echo $ECHO_N "(cached) $ECHO_C" >&6
2725 else
2726   ac_cv_build_alias=$build_alias
2727 test -z "$ac_cv_build_alias" &&
2728   ac_cv_build_alias=`$ac_config_guess`
2729 test -z "$ac_cv_build_alias" &&
2730   { { echo "$as_me:2730: error: cannot guess build type; you must specify one" >&5
2731 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2732    { (exit 1); exit 1; }; }
2733 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
2734   { { echo "$as_me:2734: error: $ac_config_sub $ac_cv_build_alias failed." >&5
2735 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
2736    { (exit 1); exit 1; }; }
2737
2738 fi
2739 echo "$as_me:2739: result: $ac_cv_build" >&5
2740 echo "${ECHO_T}$ac_cv_build" >&6
2741 build=$ac_cv_build
2742 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2743 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2744 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2745
2746 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
2747         echo "$as_me:2747: checking host system type" >&5
2748 echo $ECHO_N "checking host system type... $ECHO_C" >&6
2749 if test "${ac_cv_host+set}" = set; then
2750   echo $ECHO_N "(cached) $ECHO_C" >&6
2751 else
2752   ac_cv_host_alias=$host_alias
2753 test -z "$ac_cv_host_alias" &&
2754   ac_cv_host_alias=$ac_cv_build_alias
2755 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
2756   { { echo "$as_me:2756: error: $ac_config_sub $ac_cv_host_alias failed" >&5
2757 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
2758    { (exit 1); exit 1; }; }
2759
2760 fi
2761 echo "$as_me:2761: result: $ac_cv_host" >&5
2762 echo "${ECHO_T}$ac_cv_host" >&6
2763 host=$ac_cv_host
2764 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
2765 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
2766 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
2767
2768         system_name="$host_os"
2769 else
2770         system_name="`(uname -s -r) 2>/dev/null`"
2771         if test -z "$system_name" ; then
2772                 system_name="`(hostname) 2>/dev/null`"
2773         fi
2774 fi
2775 test -n "$system_name" && cat >>confdefs.h <<EOF
2776 #define SYSTEM_NAME "$system_name"
2777 EOF
2778
2779 if test "${cf_cv_system_name+set}" = set; then
2780   echo $ECHO_N "(cached) $ECHO_C" >&6
2781 else
2782   cf_cv_system_name="$system_name"
2783 fi
2784
2785 test -z "$system_name" && system_name="$cf_cv_system_name"
2786 test -n "$cf_cv_system_name" && echo "$as_me:2786: result: Configuring for $cf_cv_system_name" >&5
2787 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
2788
2789 if test ".$system_name" != ".$cf_cv_system_name" ; then
2790         echo "$as_me:2790: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
2791 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
2792         { { echo "$as_me:2792: error: \"Please remove config.cache and try again.\"" >&5
2793 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
2794    { (exit 1); exit 1; }; }
2795 fi
2796
2797 case $cf_cv_system_name in
2798 os2*)
2799     CFLAGS="$CFLAGS -Zmt"
2800     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2801     CXXFLAGS="$CXXFLAGS -Zmt"
2802     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2803     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2804     ac_cv_exeext=.exe
2805     ;;
2806 esac
2807
2808 PROG_EXT="$EXEEXT"
2809
2810 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2811 #define PROG_EXT "$PROG_EXT"
2812 EOF
2813
2814         case $cf_cv_system_name in
2815         os2*)   PATH_SEPARATOR=';'  ;;
2816         *)      PATH_SEPARATOR=':'  ;;
2817         esac
2818
2819         case $cf_cv_system_name in #(vi
2820         OS/2*|os2*) #(vi
2821         LIB_PREFIX=''
2822         ;;
2823         *)      LIB_PREFIX='lib'
2824         ;;
2825         esac
2826
2827 cf_XOPEN_SOURCE=500
2828 cf_POSIX_C_SOURCE=199506L
2829 cf_xopen_source=
2830
2831 case $host_os in #(vi
2832 aix[456]*) #(vi
2833         cf_xopen_source="-D_ALL_SOURCE"
2834         ;;
2835 cygwin) #(vi
2836         cf_XOPEN_SOURCE=600
2837         ;;
2838 darwin[0-8].*) #(vi
2839         cf_xopen_source="-D_APPLE_C_SOURCE"
2840         ;;
2841 darwin*) #(vi
2842         cf_xopen_source="-D_DARWIN_C_SOURCE"
2843         ;;
2844 freebsd*|dragonfly*) #(vi
2845         # 5.x headers associate
2846         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2847         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2848         cf_POSIX_C_SOURCE=200112L
2849         cf_XOPEN_SOURCE=600
2850         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2851         ;;
2852 hpux11*) #(vi
2853         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2854         ;;
2855 hpux*) #(vi
2856         cf_xopen_source="-D_HPUX_SOURCE"
2857         ;;
2858 irix[56].*) #(vi
2859         cf_xopen_source="-D_SGI_SOURCE"
2860         ;;
2861 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2862
2863 echo "$as_me:2863: checking if we must define _GNU_SOURCE" >&5
2864 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2865 if test "${cf_cv_gnu_source+set}" = set; then
2866   echo $ECHO_N "(cached) $ECHO_C" >&6
2867 else
2868
2869 cat >conftest.$ac_ext <<_ACEOF
2870 #line 2870 "configure"
2871 #include "confdefs.h"
2872 #include <sys/types.h>
2873 int
2874 main ()
2875 {
2876
2877 #ifndef _XOPEN_SOURCE
2878 make an error
2879 #endif
2880   ;
2881   return 0;
2882 }
2883 _ACEOF
2884 rm -f conftest.$ac_objext
2885 if { (eval echo "$as_me:2885: \"$ac_compile\"") >&5
2886   (eval $ac_compile) 2>&5
2887   ac_status=$?
2888   echo "$as_me:2888: \$? = $ac_status" >&5
2889   (exit $ac_status); } &&
2890          { ac_try='test -s conftest.$ac_objext'
2891   { (eval echo "$as_me:2891: \"$ac_try\"") >&5
2892   (eval $ac_try) 2>&5
2893   ac_status=$?
2894   echo "$as_me:2894: \$? = $ac_status" >&5
2895   (exit $ac_status); }; }; then
2896   cf_cv_gnu_source=no
2897 else
2898   echo "$as_me: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
2900 cf_save="$CPPFLAGS"
2901          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2902          cat >conftest.$ac_ext <<_ACEOF
2903 #line 2903 "configure"
2904 #include "confdefs.h"
2905 #include <sys/types.h>
2906 int
2907 main ()
2908 {
2909
2910 #ifdef _XOPEN_SOURCE
2911 make an error
2912 #endif
2913   ;
2914   return 0;
2915 }
2916 _ACEOF
2917 rm -f conftest.$ac_objext
2918 if { (eval echo "$as_me:2918: \"$ac_compile\"") >&5
2919   (eval $ac_compile) 2>&5
2920   ac_status=$?
2921   echo "$as_me:2921: \$? = $ac_status" >&5
2922   (exit $ac_status); } &&
2923          { ac_try='test -s conftest.$ac_objext'
2924   { (eval echo "$as_me:2924: \"$ac_try\"") >&5
2925   (eval $ac_try) 2>&5
2926   ac_status=$?
2927   echo "$as_me:2927: \$? = $ac_status" >&5
2928   (exit $ac_status); }; }; then
2929   cf_cv_gnu_source=no
2930 else
2931   echo "$as_me: failed program was:" >&5
2932 cat conftest.$ac_ext >&5
2933 cf_cv_gnu_source=yes
2934 fi
2935 rm -f conftest.$ac_objext conftest.$ac_ext
2936         CPPFLAGS="$cf_save"
2937
2938 fi
2939 rm -f conftest.$ac_objext conftest.$ac_ext
2940
2941 fi
2942 echo "$as_me:2942: result: $cf_cv_gnu_source" >&5
2943 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2944 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2945
2946         ;;
2947 mirbsd*) #(vi
2948         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2949         ;;
2950 netbsd*) #(vi
2951         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2952         ;;
2953 openbsd*) #(vi
2954         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2955         ;;
2956 osf[45]*) #(vi
2957         cf_xopen_source="-D_OSF_SOURCE"
2958         ;;
2959 nto-qnx*) #(vi
2960         cf_xopen_source="-D_QNX_SOURCE"
2961         ;;
2962 sco*) #(vi
2963         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2964         ;;
2965 solaris2.1[0-9]) #(vi
2966         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2967         ;;
2968 solaris2.[1-9]) #(vi
2969         cf_xopen_source="-D__EXTENSIONS__"
2970         ;;
2971 *)
2972         echo "$as_me:2972: checking if we should define _XOPEN_SOURCE" >&5
2973 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2974 if test "${cf_cv_xopen_source+set}" = set; then
2975   echo $ECHO_N "(cached) $ECHO_C" >&6
2976 else
2977
2978         cat >conftest.$ac_ext <<_ACEOF
2979 #line 2979 "configure"
2980 #include "confdefs.h"
2981 #include <sys/types.h>
2982 int
2983 main ()
2984 {
2985
2986 #ifndef _XOPEN_SOURCE
2987 make an error
2988 #endif
2989   ;
2990   return 0;
2991 }
2992 _ACEOF
2993 rm -f conftest.$ac_objext
2994 if { (eval echo "$as_me:2994: \"$ac_compile\"") >&5
2995   (eval $ac_compile) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); } &&
2999          { ac_try='test -s conftest.$ac_objext'
3000   { (eval echo "$as_me:3000: \"$ac_try\"") >&5
3001   (eval $ac_try) 2>&5
3002   ac_status=$?
3003   echo "$as_me:3003: \$? = $ac_status" >&5
3004   (exit $ac_status); }; }; then
3005   cf_cv_xopen_source=no
3006 else
3007   echo "$as_me: failed program was:" >&5
3008 cat conftest.$ac_ext >&5
3009 cf_save="$CPPFLAGS"
3010          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3011          cat >conftest.$ac_ext <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 #include <sys/types.h>
3015 int
3016 main ()
3017 {
3018
3019 #ifdef _XOPEN_SOURCE
3020 make an error
3021 #endif
3022   ;
3023   return 0;
3024 }
3025 _ACEOF
3026 rm -f conftest.$ac_objext
3027 if { (eval echo "$as_me:3027: \"$ac_compile\"") >&5
3028   (eval $ac_compile) 2>&5
3029   ac_status=$?
3030   echo "$as_me:3030: \$? = $ac_status" >&5
3031   (exit $ac_status); } &&
3032          { ac_try='test -s conftest.$ac_objext'
3033   { (eval echo "$as_me:3033: \"$ac_try\"") >&5
3034   (eval $ac_try) 2>&5
3035   ac_status=$?
3036   echo "$as_me:3036: \$? = $ac_status" >&5
3037   (exit $ac_status); }; }; then
3038   cf_cv_xopen_source=no
3039 else
3040   echo "$as_me: failed program was:" >&5
3041 cat conftest.$ac_ext >&5
3042 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3043 fi
3044 rm -f conftest.$ac_objext conftest.$ac_ext
3045         CPPFLAGS="$cf_save"
3046
3047 fi
3048 rm -f conftest.$ac_objext conftest.$ac_ext
3049
3050 fi
3051 echo "$as_me:3051: result: $cf_cv_xopen_source" >&5
3052 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3053         if test "$cf_cv_xopen_source" != no ; then
3054
3055 CFLAGS=`echo "$CFLAGS" | \
3056         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3057                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3058
3059 CPPFLAGS=`echo "$CPPFLAGS" | \
3060         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3061                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3062
3063                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3064
3065 cf_fix_cppflags=no
3066 cf_new_cflags=
3067 cf_new_cppflags=
3068 cf_new_extra_cppflags=
3069
3070 for cf_add_cflags in $cf_temp_xopen_source
3071 do
3072 case $cf_fix_cppflags in
3073 no)
3074         case $cf_add_cflags in #(vi
3075         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3076                 case $cf_add_cflags in
3077                 -D*)
3078                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3079
3080                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3081                                 && test -z "${cf_tst_cflags}" \
3082                                 && cf_fix_cppflags=yes
3083
3084                         if test $cf_fix_cppflags = yes ; then
3085                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3086                                 continue
3087                         elif test "${cf_tst_cflags}" = "\"'" ; then
3088                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3089                                 continue
3090                         fi
3091                         ;;
3092                 esac
3093                 case "$CPPFLAGS" in
3094                 *$cf_add_cflags) #(vi
3095                         ;;
3096                 *) #(vi
3097                         case $cf_add_cflags in #(vi
3098                         -D*)
3099                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3100
3101 CPPFLAGS=`echo "$CPPFLAGS" | \
3102         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3103                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3104
3105                                 ;;
3106                         esac
3107                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3108                         ;;
3109                 esac
3110                 ;;
3111         *)
3112                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3113                 ;;
3114         esac
3115         ;;
3116 yes)
3117         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3118
3119         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3120
3121         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3122                 && test -z "${cf_tst_cflags}" \
3123                 && cf_fix_cppflags=no
3124         ;;
3125 esac
3126 done
3127
3128 if test -n "$cf_new_cflags" ; then
3129
3130         CFLAGS="$CFLAGS $cf_new_cflags"
3131 fi
3132
3133 if test -n "$cf_new_cppflags" ; then
3134
3135         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3136 fi
3137
3138 if test -n "$cf_new_extra_cppflags" ; then
3139
3140         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3141 fi
3142
3143         fi
3144
3145 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3146
3147 cf_save_CFLAGS="$CFLAGS"
3148 cf_save_CPPFLAGS="$CPPFLAGS"
3149
3150 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3151         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3152                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3153
3154 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3155         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3156                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3157
3158 echo "$as_me:3158: checking if we should define _POSIX_C_SOURCE" >&5
3159 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3160 if test "${cf_cv_posix_c_source+set}" = set; then
3161   echo $ECHO_N "(cached) $ECHO_C" >&6
3162 else
3163
3164 echo "${as_me:-configure}:3164: testing if the symbol is already defined go no further ..." 1>&5
3165
3166         cat >conftest.$ac_ext <<_ACEOF
3167 #line 3167 "configure"
3168 #include "confdefs.h"
3169 #include <sys/types.h>
3170 int
3171 main ()
3172 {
3173
3174 #ifndef _POSIX_C_SOURCE
3175 make an error
3176 #endif
3177   ;
3178   return 0;
3179 }
3180 _ACEOF
3181 rm -f conftest.$ac_objext
3182 if { (eval echo "$as_me:3182: \"$ac_compile\"") >&5
3183   (eval $ac_compile) 2>&5
3184   ac_status=$?
3185   echo "$as_me:3185: \$? = $ac_status" >&5
3186   (exit $ac_status); } &&
3187          { ac_try='test -s conftest.$ac_objext'
3188   { (eval echo "$as_me:3188: \"$ac_try\"") >&5
3189   (eval $ac_try) 2>&5
3190   ac_status=$?
3191   echo "$as_me:3191: \$? = $ac_status" >&5
3192   (exit $ac_status); }; }; then
3193   cf_cv_posix_c_source=no
3194 else
3195   echo "$as_me: failed program was:" >&5
3196 cat conftest.$ac_ext >&5
3197 cf_want_posix_source=no
3198          case .$cf_POSIX_C_SOURCE in #(vi
3199          .[12]??*) #(vi
3200                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3201                 ;;
3202          .2) #(vi
3203                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3204                 cf_want_posix_source=yes
3205                 ;;
3206          .*)
3207                 cf_want_posix_source=yes
3208                 ;;
3209          esac
3210          if test "$cf_want_posix_source" = yes ; then
3211                 cat >conftest.$ac_ext <<_ACEOF
3212 #line 3212 "configure"
3213 #include "confdefs.h"
3214 #include <sys/types.h>
3215 int
3216 main ()
3217 {
3218
3219 #ifdef _POSIX_SOURCE
3220 make an error
3221 #endif
3222   ;
3223   return 0;
3224 }
3225 _ACEOF
3226 rm -f conftest.$ac_objext
3227 if { (eval echo "$as_me:3227: \"$ac_compile\"") >&5
3228   (eval $ac_compile) 2>&5
3229   ac_status=$?
3230   echo "$as_me:3230: \$? = $ac_status" >&5
3231   (exit $ac_status); } &&
3232          { ac_try='test -s conftest.$ac_objext'
3233   { (eval echo "$as_me:3233: \"$ac_try\"") >&5
3234   (eval $ac_try) 2>&5
3235   ac_status=$?
3236   echo "$as_me:3236: \$? = $ac_status" >&5
3237   (exit $ac_status); }; }; then
3238   :
3239 else
3240   echo "$as_me: failed program was:" >&5
3241 cat conftest.$ac_ext >&5
3242 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3243 fi
3244 rm -f conftest.$ac_objext conftest.$ac_ext
3245          fi
3246
3247 echo "${as_me:-configure}:3247: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3248
3249          CFLAGS="$cf_trim_CFLAGS"
3250          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3251
3252 echo "${as_me:-configure}:3252: testing if the second compile does not leave our definition intact error ..." 1>&5
3253
3254          cat >conftest.$ac_ext <<_ACEOF
3255 #line 3255 "configure"
3256 #include "confdefs.h"
3257 #include <sys/types.h>
3258 int
3259 main ()
3260 {
3261
3262 #ifndef _POSIX_C_SOURCE
3263 make an error
3264 #endif
3265   ;
3266   return 0;
3267 }
3268 _ACEOF
3269 rm -f conftest.$ac_objext
3270 if { (eval echo "$as_me:3270: \"$ac_compile\"") >&5
3271   (eval $ac_compile) 2>&5
3272   ac_status=$?
3273   echo "$as_me:3273: \$? = $ac_status" >&5
3274   (exit $ac_status); } &&
3275          { ac_try='test -s conftest.$ac_objext'
3276   { (eval echo "$as_me:3276: \"$ac_try\"") >&5
3277   (eval $ac_try) 2>&5
3278   ac_status=$?
3279   echo "$as_me:3279: \$? = $ac_status" >&5
3280   (exit $ac_status); }; }; then
3281   :
3282 else
3283   echo "$as_me: failed program was:" >&5
3284 cat conftest.$ac_ext >&5
3285 cf_cv_posix_c_source=no
3286 fi
3287 rm -f conftest.$ac_objext conftest.$ac_ext
3288          CFLAGS="$cf_save_CFLAGS"
3289          CPPFLAGS="$cf_save_CPPFLAGS"
3290
3291 fi
3292 rm -f conftest.$ac_objext conftest.$ac_ext
3293
3294 fi
3295 echo "$as_me:3295: result: $cf_cv_posix_c_source" >&5
3296 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3297
3298 if test "$cf_cv_posix_c_source" != no ; then
3299         CFLAGS="$cf_trim_CFLAGS"
3300         CPPFLAGS="$cf_trim_CPPFLAGS"
3301
3302 cf_fix_cppflags=no
3303 cf_new_cflags=
3304 cf_new_cppflags=
3305 cf_new_extra_cppflags=
3306
3307 for cf_add_cflags in $cf_cv_posix_c_source
3308 do
3309 case $cf_fix_cppflags in
3310 no)
3311         case $cf_add_cflags in #(vi
3312         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3313                 case $cf_add_cflags in
3314                 -D*)
3315                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3316
3317                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3318                                 && test -z "${cf_tst_cflags}" \
3319                                 && cf_fix_cppflags=yes
3320
3321                         if test $cf_fix_cppflags = yes ; then
3322                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3323                                 continue
3324                         elif test "${cf_tst_cflags}" = "\"'" ; then
3325                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3326                                 continue
3327                         fi
3328                         ;;
3329                 esac
3330                 case "$CPPFLAGS" in
3331                 *$cf_add_cflags) #(vi
3332                         ;;
3333                 *) #(vi
3334                         case $cf_add_cflags in #(vi
3335                         -D*)
3336                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3337
3338 CPPFLAGS=`echo "$CPPFLAGS" | \
3339         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3340                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3341
3342                                 ;;
3343                         esac
3344                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3345                         ;;
3346                 esac
3347                 ;;
3348         *)
3349                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3350                 ;;
3351         esac
3352         ;;
3353 yes)
3354         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3355
3356         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3357
3358         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3359                 && test -z "${cf_tst_cflags}" \
3360                 && cf_fix_cppflags=no
3361         ;;
3362 esac
3363 done
3364
3365 if test -n "$cf_new_cflags" ; then
3366
3367         CFLAGS="$CFLAGS $cf_new_cflags"
3368 fi
3369
3370 if test -n "$cf_new_cppflags" ; then
3371
3372         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3373 fi
3374
3375 if test -n "$cf_new_extra_cppflags" ; then
3376
3377         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3378 fi
3379
3380 fi
3381
3382         ;;
3383 esac
3384
3385 if test -n "$cf_xopen_source" ; then
3386
3387 cf_fix_cppflags=no
3388 cf_new_cflags=
3389 cf_new_cppflags=
3390 cf_new_extra_cppflags=
3391
3392 for cf_add_cflags in $cf_xopen_source
3393 do
3394 case $cf_fix_cppflags in
3395 no)
3396         case $cf_add_cflags in #(vi
3397         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3398                 case $cf_add_cflags in
3399                 -D*)
3400                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3401
3402                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3403                                 && test -z "${cf_tst_cflags}" \
3404                                 && cf_fix_cppflags=yes
3405
3406                         if test $cf_fix_cppflags = yes ; then
3407                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3408                                 continue
3409                         elif test "${cf_tst_cflags}" = "\"'" ; then
3410                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3411                                 continue
3412                         fi
3413                         ;;
3414                 esac
3415                 case "$CPPFLAGS" in
3416                 *$cf_add_cflags) #(vi
3417                         ;;
3418                 *) #(vi
3419                         case $cf_add_cflags in #(vi
3420                         -D*)
3421                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3422
3423 CPPFLAGS=`echo "$CPPFLAGS" | \
3424         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3425                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3426
3427                                 ;;
3428                         esac
3429                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3430                         ;;
3431                 esac
3432                 ;;
3433         *)
3434                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3435                 ;;
3436         esac
3437         ;;
3438 yes)
3439         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3440
3441         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3442
3443         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3444                 && test -z "${cf_tst_cflags}" \
3445                 && cf_fix_cppflags=no
3446         ;;
3447 esac
3448 done
3449
3450 if test -n "$cf_new_cflags" ; then
3451
3452         CFLAGS="$CFLAGS $cf_new_cflags"
3453 fi
3454
3455 if test -n "$cf_new_cppflags" ; then
3456
3457         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3458 fi
3459
3460 if test -n "$cf_new_extra_cppflags" ; then
3461
3462         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3463 fi
3464
3465 fi
3466
3467 # Check whether --enable-largefile or --disable-largefile was given.
3468 if test "${enable_largefile+set}" = set; then
3469   enableval="$enable_largefile"
3470
3471 fi;
3472 if test "$enable_largefile" != no; then
3473
3474   echo "$as_me:3474: checking for special C compiler options needed for large files" >&5
3475 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
3476 if test "${ac_cv_sys_largefile_CC+set}" = set; then
3477   echo $ECHO_N "(cached) $ECHO_C" >&6
3478 else
3479   ac_cv_sys_largefile_CC=no
3480      if test "$GCC" != yes; then
3481        ac_save_CC=$CC
3482        while :; do
3483          # IRIX 6.2 and later do not support large files by default,
3484          # so use the C compiler's -n32 option if that helps.
3485          cat >conftest.$ac_ext <<_ACEOF
3486 #line 3486 "configure"
3487 #include "confdefs.h"
3488 #include <sys/types.h>
3489  /* Check that off_t can represent 2**63 - 1 correctly.
3490     We can't simply define LARGE_OFF_T to be 9223372036854775807,
3491     since some C++ compilers masquerading as C compilers
3492     incorrectly reject 9223372036854775807.  */
3493 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3494   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3495                        && LARGE_OFF_T % 2147483647 == 1)
3496                       ? 1 : -1];
3497 int
3498 main ()
3499 {
3500
3501   ;
3502   return 0;
3503 }
3504 _ACEOF
3505          rm -f conftest.$ac_objext
3506 if { (eval echo "$as_me:3506: \"$ac_compile\"") >&5
3507   (eval $ac_compile) 2>&5
3508   ac_status=$?
3509   echo "$as_me:3509: \$? = $ac_status" >&5
3510   (exit $ac_status); } &&
3511          { ac_try='test -s conftest.$ac_objext'
3512   { (eval echo "$as_me:3512: \"$ac_try\"") >&5
3513   (eval $ac_try) 2>&5
3514   ac_status=$?
3515   echo "$as_me:3515: \$? = $ac_status" >&5
3516   (exit $ac_status); }; }; then
3517   break
3518 else
3519   echo "$as_me: failed program was:" >&5
3520 cat conftest.$ac_ext >&5
3521 fi
3522 rm -f conftest.$ac_objext
3523          CC="$CC -n32"
3524          rm -f conftest.$ac_objext
3525 if { (eval echo "$as_me:3525: \"$ac_compile\"") >&5
3526   (eval $ac_compile) 2>&5
3527   ac_status=$?
3528   echo "$as_me:3528: \$? = $ac_status" >&5
3529   (exit $ac_status); } &&
3530          { ac_try='test -s conftest.$ac_objext'
3531   { (eval echo "$as_me:3531: \"$ac_try\"") >&5
3532   (eval $ac_try) 2>&5
3533   ac_status=$?
3534   echo "$as_me:3534: \$? = $ac_status" >&5
3535   (exit $ac_status); }; }; then
3536   ac_cv_sys_largefile_CC=' -n32'; break
3537 else
3538   echo "$as_me: failed program was:" >&5
3539 cat conftest.$ac_ext >&5
3540 fi
3541 rm -f conftest.$ac_objext
3542          break
3543        done
3544        CC=$ac_save_CC
3545        rm -f conftest.$ac_ext
3546     fi
3547 fi
3548 echo "$as_me:3548: result: $ac_cv_sys_largefile_CC" >&5
3549 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
3550   if test "$ac_cv_sys_largefile_CC" != no; then
3551     CC=$CC$ac_cv_sys_largefile_CC
3552   fi
3553
3554   echo "$as_me:3554: checking for _FILE_OFFSET_BITS value needed for large files" >&5
3555 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
3556 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
3557   echo $ECHO_N "(cached) $ECHO_C" >&6
3558 else
3559   while :; do
3560   ac_cv_sys_file_offset_bits=no
3561   cat >conftest.$ac_ext <<_ACEOF
3562 #line 3562 "configure"
3563 #include "confdefs.h"
3564 #include <sys/types.h>
3565  /* Check that off_t can represent 2**63 - 1 correctly.
3566     We can't simply define LARGE_OFF_T to be 9223372036854775807,
3567     since some C++ compilers masquerading as C compilers
3568     incorrectly reject 9223372036854775807.  */
3569 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3570   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3571                        && LARGE_OFF_T % 2147483647 == 1)
3572                       ? 1 : -1];
3573 int
3574 main ()
3575 {
3576
3577   ;
3578   return 0;
3579 }
3580 _ACEOF
3581 rm -f conftest.$ac_objext
3582 if { (eval echo "$as_me:3582: \"$ac_compile\"") >&5
3583   (eval $ac_compile) 2>&5
3584   ac_status=$?
3585   echo "$as_me:3585: \$? = $ac_status" >&5
3586   (exit $ac_status); } &&
3587          { ac_try='test -s conftest.$ac_objext'
3588   { (eval echo "$as_me:3588: \"$ac_try\"") >&5
3589   (eval $ac_try) 2>&5
3590   ac_status=$?
3591   echo "$as_me:3591: \$? = $ac_status" >&5
3592   (exit $ac_status); }; }; then
3593   break
3594 else
3595   echo "$as_me: failed program was:" >&5
3596 cat conftest.$ac_ext >&5
3597 fi
3598 rm -f conftest.$ac_objext conftest.$ac_ext
3599   cat >conftest.$ac_ext <<_ACEOF
3600 #line 3600 "configure"
3601 #include "confdefs.h"
3602 #define _FILE_OFFSET_BITS 64
3603 #include <sys/types.h>
3604  /* Check that off_t can represent 2**63 - 1 correctly.
3605     We can't simply define LARGE_OFF_T to be 9223372036854775807,
3606     since some C++ compilers masquerading as C compilers
3607     incorrectly reject 9223372036854775807.  */
3608 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3609   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3610                        && LARGE_OFF_T % 2147483647 == 1)
3611                       ? 1 : -1];
3612 int
3613 main ()
3614 {
3615
3616   ;
3617   return 0;
3618 }
3619 _ACEOF
3620 rm -f conftest.$ac_objext
3621 if { (eval echo "$as_me:3621: \"$ac_compile\"") >&5
3622   (eval $ac_compile) 2>&5
3623   ac_status=$?
3624   echo "$as_me:3624: \$? = $ac_status" >&5
3625   (exit $ac_status); } &&
3626          { ac_try='test -s conftest.$ac_objext'
3627   { (eval echo "$as_me:3627: \"$ac_try\"") >&5
3628   (eval $ac_try) 2>&5
3629   ac_status=$?
3630   echo "$as_me:3630: \$? = $ac_status" >&5
3631   (exit $ac_status); }; }; then
3632   ac_cv_sys_file_offset_bits=64; break
3633 else
3634   echo "$as_me: failed program was:" >&5
3635 cat conftest.$ac_ext >&5
3636 fi
3637 rm -f conftest.$ac_objext conftest.$ac_ext
3638   break
3639 done
3640 fi
3641 echo "$as_me:3641: result: $ac_cv_sys_file_offset_bits" >&5
3642 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
3643 if test "$ac_cv_sys_file_offset_bits" != no; then
3644
3645 cat >>confdefs.h <<EOF
3646 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
3647 EOF
3648
3649 fi
3650 rm -rf conftest*
3651   echo "$as_me:3651: checking for _LARGE_FILES value needed for large files" >&5
3652 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
3653 if test "${ac_cv_sys_large_files+set}" = set; then
3654   echo $ECHO_N "(cached) $ECHO_C" >&6
3655 else
3656   while :; do
3657   ac_cv_sys_large_files=no
3658   cat >conftest.$ac_ext <<_ACEOF
3659 #line 3659 "configure"
3660 #include "confdefs.h"
3661 #include <sys/types.h>
3662  /* Check that off_t can represent 2**63 - 1 correctly.
3663     We can't simply define LARGE_OFF_T to be 9223372036854775807,
3664     since some C++ compilers masquerading as C compilers
3665     incorrectly reject 9223372036854775807.  */
3666 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3667   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3668                        && LARGE_OFF_T % 2147483647 == 1)
3669                       ? 1 : -1];
3670 int
3671 main ()
3672 {
3673
3674   ;
3675   return 0;
3676 }
3677 _ACEOF
3678 rm -f conftest.$ac_objext
3679 if { (eval echo "$as_me:3679: \"$ac_compile\"") >&5
3680   (eval $ac_compile) 2>&5
3681   ac_status=$?
3682   echo "$as_me:3682: \$? = $ac_status" >&5
3683   (exit $ac_status); } &&
3684          { ac_try='test -s conftest.$ac_objext'
3685   { (eval echo "$as_me:3685: \"$ac_try\"") >&5
3686   (eval $ac_try) 2>&5
3687   ac_status=$?
3688   echo "$as_me:3688: \$? = $ac_status" >&5
3689   (exit $ac_status); }; }; then
3690   break
3691 else
3692   echo "$as_me: failed program was:" >&5
3693 cat conftest.$ac_ext >&5
3694 fi
3695 rm -f conftest.$ac_objext conftest.$ac_ext
3696   cat >conftest.$ac_ext <<_ACEOF
3697 #line 3697 "configure"
3698 #include "confdefs.h"
3699 #define _LARGE_FILES 1
3700 #include <sys/types.h>
3701  /* Check that off_t can represent 2**63 - 1 correctly.
3702     We can't simply define LARGE_OFF_T to be 9223372036854775807,
3703     since some C++ compilers masquerading as C compilers
3704     incorrectly reject 9223372036854775807.  */
3705 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
3706   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
3707                        && LARGE_OFF_T % 2147483647 == 1)
3708                       ? 1 : -1];
3709 int
3710 main ()
3711 {
3712
3713   ;
3714   return 0;
3715 }
3716 _ACEOF
3717 rm -f conftest.$ac_objext
3718 if { (eval echo "$as_me:3718: \"$ac_compile\"") >&5
3719   (eval $ac_compile) 2>&5
3720   ac_status=$?
3721   echo "$as_me:3721: \$? = $ac_status" >&5
3722   (exit $ac_status); } &&
3723          { ac_try='test -s conftest.$ac_objext'
3724   { (eval echo "$as_me:3724: \"$ac_try\"") >&5
3725   (eval $ac_try) 2>&5
3726   ac_status=$?
3727   echo "$as_me:3727: \$? = $ac_status" >&5
3728   (exit $ac_status); }; }; then
3729   ac_cv_sys_large_files=1; break
3730 else
3731   echo "$as_me: failed program was:" >&5
3732 cat conftest.$ac_ext >&5
3733 fi
3734 rm -f conftest.$ac_objext conftest.$ac_ext
3735   break
3736 done
3737 fi
3738 echo "$as_me:3738: result: $ac_cv_sys_large_files" >&5
3739 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
3740 if test "$ac_cv_sys_large_files" != no; then
3741
3742 cat >>confdefs.h <<EOF
3743 #define _LARGE_FILES $ac_cv_sys_large_files
3744 EOF
3745
3746 fi
3747 rm -rf conftest*
3748 fi
3749
3750     if test "$enable_largefile" != no ; then
3751         echo "$as_me:3751: checking for _LARGEFILE_SOURCE value needed for large files" >&5
3752 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
3753 if test "${ac_cv_sys_largefile_source+set}" = set; then
3754   echo $ECHO_N "(cached) $ECHO_C" >&6
3755 else
3756   while :; do
3757   ac_cv_sys_largefile_source=no
3758   cat >conftest.$ac_ext <<_ACEOF
3759 #line 3759 "configure"
3760 #include "confdefs.h"
3761 #include <stdio.h>
3762 int
3763 main ()
3764 {
3765 return !fseeko;
3766   ;
3767   return 0;
3768 }
3769 _ACEOF
3770 rm -f conftest.$ac_objext
3771 if { (eval echo "$as_me:3771: \"$ac_compile\"") >&5
3772   (eval $ac_compile) 2>&5
3773   ac_status=$?
3774   echo "$as_me:3774: \$? = $ac_status" >&5
3775   (exit $ac_status); } &&
3776          { ac_try='test -s conftest.$ac_objext'
3777   { (eval echo "$as_me:3777: \"$ac_try\"") >&5
3778   (eval $ac_try) 2>&5
3779   ac_status=$?
3780   echo "$as_me:3780: \$? = $ac_status" >&5
3781   (exit $ac_status); }; }; then
3782   break
3783 else
3784   echo "$as_me: failed program was:" >&5
3785 cat conftest.$ac_ext >&5
3786 fi
3787 rm -f conftest.$ac_objext conftest.$ac_ext
3788   cat >conftest.$ac_ext <<_ACEOF
3789 #line 3789 "configure"
3790 #include "confdefs.h"
3791 #define _LARGEFILE_SOURCE 1
3792 #include <stdio.h>
3793 int
3794 main ()
3795 {
3796 return !fseeko;
3797   ;
3798   return 0;
3799 }
3800 _ACEOF
3801 rm -f conftest.$ac_objext
3802 if { (eval echo "$as_me:3802: \"$ac_compile\"") >&5
3803   (eval $ac_compile) 2>&5
3804   ac_status=$?
3805   echo "$as_me:3805: \$? = $ac_status" >&5
3806   (exit $ac_status); } &&
3807          { ac_try='test -s conftest.$ac_objext'
3808   { (eval echo "$as_me:3808: \"$ac_try\"") >&5
3809   (eval $ac_try) 2>&5
3810   ac_status=$?
3811   echo "$as_me:3811: \$? = $ac_status" >&5
3812   (exit $ac_status); }; }; then
3813   ac_cv_sys_largefile_source=1; break
3814 else
3815   echo "$as_me: failed program was:" >&5
3816 cat conftest.$ac_ext >&5
3817 fi
3818 rm -f conftest.$ac_objext conftest.$ac_ext
3819   break
3820 done
3821 fi
3822 echo "$as_me:3822: result: $ac_cv_sys_largefile_source" >&5
3823 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
3824 if test "$ac_cv_sys_largefile_source" != no; then
3825
3826 cat >>confdefs.h <<EOF
3827 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
3828 EOF
3829
3830 fi
3831 rm -rf conftest*
3832
3833 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
3834 # in glibc 2.1.3, but that breaks too many other things.
3835 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
3836 echo "$as_me:3836: checking for fseeko" >&5
3837 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
3838 if test "${ac_cv_func_fseeko+set}" = set; then
3839   echo $ECHO_N "(cached) $ECHO_C" >&6
3840 else
3841   cat >conftest.$ac_ext <<_ACEOF
3842 #line 3842 "configure"
3843 #include "confdefs.h"
3844 #include <stdio.h>
3845 int
3846 main ()
3847 {
3848 return fseeko && fseeko (stdin, 0, 0);
3849   ;
3850   return 0;
3851 }
3852 _ACEOF
3853 rm -f conftest.$ac_objext conftest$ac_exeext
3854 if { (eval echo "$as_me:3854: \"$ac_link\"") >&5
3855   (eval $ac_link) 2>&5
3856   ac_status=$?
3857   echo "$as_me:3857: \$? = $ac_status" >&5
3858   (exit $ac_status); } &&
3859          { ac_try='test -s conftest$ac_exeext'
3860   { (eval echo "$as_me:3860: \"$ac_try\"") >&5
3861   (eval $ac_try) 2>&5
3862   ac_status=$?
3863   echo "$as_me:3863: \$? = $ac_status" >&5
3864   (exit $ac_status); }; }; then
3865   ac_cv_func_fseeko=yes
3866 else
3867   echo "$as_me: failed program was:" >&5
3868 cat conftest.$ac_ext >&5
3869 ac_cv_func_fseeko=no
3870 fi
3871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3872 fi
3873 echo "$as_me:3873: result: $ac_cv_func_fseeko" >&5
3874 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
3875 if test $ac_cv_func_fseeko = yes; then
3876
3877 cat >>confdefs.h <<\EOF
3878 #define HAVE_FSEEKO 1
3879 EOF
3880
3881 fi
3882
3883         # Normally we would collect these definitions in the config.h,
3884         # but (like _XOPEN_SOURCE), some environments rely on having these
3885         # defined before any of the system headers are included.  Another
3886         # case comes up with C++, e.g., on AIX the compiler compiles the
3887         # header files by themselves before looking at the body files it is
3888         # told to compile.  For ncurses, those header files do not include
3889         # the config.h
3890         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
3891         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
3892         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
3893
3894         echo "$as_me:3894: checking whether to use struct dirent64" >&5
3895 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
3896 if test "${cf_cv_struct_dirent64+set}" = set; then
3897   echo $ECHO_N "(cached) $ECHO_C" >&6
3898 else
3899
3900                 cat >conftest.$ac_ext <<_ACEOF
3901 #line 3901 "configure"
3902 #include "confdefs.h"
3903
3904 #include <sys/types.h>
3905 #include <dirent.h>
3906
3907 int
3908 main ()
3909 {
3910
3911                 /* if transitional largefile support is setup, this is true */
3912                 extern struct dirent64 * readdir(DIR *);
3913                 struct dirent64 *x = readdir((DIR *)0);
3914                 struct dirent *y = readdir((DIR *)0);
3915                 int z = x - y;
3916
3917   ;
3918   return 0;
3919 }
3920 _ACEOF
3921 rm -f conftest.$ac_objext
3922 if { (eval echo "$as_me:3922: \"$ac_compile\"") >&5
3923   (eval $ac_compile) 2>&5
3924   ac_status=$?
3925   echo "$as_me:3925: \$? = $ac_status" >&5
3926   (exit $ac_status); } &&
3927          { ac_try='test -s conftest.$ac_objext'
3928   { (eval echo "$as_me:3928: \"$ac_try\"") >&5
3929   (eval $ac_try) 2>&5
3930   ac_status=$?
3931   echo "$as_me:3931: \$? = $ac_status" >&5
3932   (exit $ac_status); }; }; then
3933   cf_cv_struct_dirent64=yes
3934 else
3935   echo "$as_me: failed program was:" >&5
3936 cat conftest.$ac_ext >&5
3937 cf_cv_struct_dirent64=no
3938 fi
3939 rm -f conftest.$ac_objext conftest.$ac_ext
3940
3941 fi
3942 echo "$as_me:3942: result: $cf_cv_struct_dirent64" >&5
3943 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
3944         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
3945 #define HAVE_STRUCT_DIRENT64 1
3946 EOF
3947
3948     fi
3949
3950 GCC_VERSION=none
3951 if test "$GCC" = yes ; then
3952         echo "$as_me:3952: checking version of $CC" >&5
3953 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
3954         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3955         test -z "$GCC_VERSION" && GCC_VERSION=unknown
3956         echo "$as_me:3956: result: $GCC_VERSION" >&5
3957 echo "${ECHO_T}$GCC_VERSION" >&6
3958 fi
3959
3960 if ( test "$GCC" = yes || test "$GXX" = yes )
3961 then
3962 echo "$as_me:3962: checking if you want to check for gcc warnings" >&5
3963 echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
3964
3965 # Check whether --with-warnings or --without-warnings was given.
3966 if test "${with_warnings+set}" = set; then
3967   withval="$with_warnings"
3968   cf_opt_with_warnings=$withval
3969 else
3970   cf_opt_with_warnings=no
3971 fi;
3972 echo "$as_me:3972: result: $cf_opt_with_warnings" >&5
3973 echo "${ECHO_T}$cf_opt_with_warnings" >&6
3974 if test "$cf_opt_with_warnings" != no ; then
3975
3976 if test "$GCC" = yes
3977 then
3978 cat > conftest.i <<EOF
3979 #ifndef GCC_PRINTF
3980 #define GCC_PRINTF 0
3981 #endif
3982 #ifndef GCC_SCANF
3983 #define GCC_SCANF 0
3984 #endif
3985 #ifndef GCC_NORETURN
3986 #define GCC_NORETURN /* nothing */
3987 #endif
3988 #ifndef GCC_UNUSED
3989 #define GCC_UNUSED /* nothing */
3990 #endif
3991 EOF
3992 if test "$GCC" = yes
3993 then
3994         { echo "$as_me:3994: checking for $CC __attribute__ directives..." >&5
3995 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3996 cat > conftest.$ac_ext <<EOF
3997 #line 3997 "${as_me:-configure}"
3998 #include "confdefs.h"
3999 #include "conftest.h"
4000 #include "conftest.i"
4001 #if     GCC_PRINTF
4002 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4003 #else
4004 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4005 #endif
4006 #if     GCC_SCANF
4007 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4008 #else
4009 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
4010 #endif
4011 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4012 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4013 extern void foo(void) GCC_NORETURN;
4014 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4015 EOF
4016         cf_printf_attribute=no
4017         cf_scanf_attribute=no
4018         for cf_attribute in scanf printf unused noreturn
4019         do
4020
4021 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4022
4023                 cf_directive="__attribute__(($cf_attribute))"
4024                 echo "checking for $CC $cf_directive" 1>&5
4025
4026                 case $cf_attribute in #(vi
4027                 printf) #(vi
4028                         cf_printf_attribute=yes
4029                         cat >conftest.h <<EOF
4030 #define GCC_$cf_ATTRIBUTE 1
4031 EOF
4032                         ;;
4033                 scanf) #(vi
4034                         cf_scanf_attribute=yes
4035                         cat >conftest.h <<EOF
4036 #define GCC_$cf_ATTRIBUTE 1
4037 EOF
4038                         ;;
4039                 *) #(vi
4040                         cat >conftest.h <<EOF
4041 #define GCC_$cf_ATTRIBUTE $cf_directive
4042 EOF
4043                         ;;
4044                 esac
4045
4046                 if { (eval echo "$as_me:4046: \"$ac_compile\"") >&5
4047   (eval $ac_compile) 2>&5
4048   ac_status=$?
4049   echo "$as_me:4049: \$? = $ac_status" >&5
4050   (exit $ac_status); }; then
4051                         test -n "$verbose" && echo "$as_me:4051: result: ... $cf_attribute" >&5
4052 echo "${ECHO_T}... $cf_attribute" >&6
4053                         cat conftest.h >>confdefs.h
4054                         case $cf_attribute in #(vi
4055                         printf) #(vi
4056                                 if test "$cf_printf_attribute" = no ; then
4057                                         cat >>confdefs.h <<EOF
4058 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
4059 EOF
4060                                 else
4061                                         cat >>confdefs.h <<EOF
4062 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4063 EOF
4064                                 fi
4065                                 ;;
4066                         scanf) #(vi
4067                                 if test "$cf_scanf_attribute" = no ; then
4068                                         cat >>confdefs.h <<EOF
4069 #define GCC_SCANFLIKE(fmt,var) /* nothing */
4070 EOF
4071                                 else
4072                                         cat >>confdefs.h <<EOF
4073 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4074 EOF
4075                                 fi
4076                                 ;;
4077                         esac
4078                 fi
4079         done
4080 else
4081         fgrep define conftest.i >>confdefs.h
4082 fi
4083 rm -rf conftest*
4084 fi
4085
4086 INTEL_COMPILER=no
4087
4088 if test "$GCC" = yes ; then
4089         case $host_os in
4090         linux*|gnu*)
4091                 echo "$as_me:4091: checking if this is really Intel C compiler" >&5
4092 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4093                 cf_save_CFLAGS="$CFLAGS"
4094                 CFLAGS="$CFLAGS -no-gcc"
4095                 cat >conftest.$ac_ext <<_ACEOF
4096 #line 4096 "configure"
4097 #include "confdefs.h"
4098
4099 int
4100 main ()
4101 {
4102
4103 #ifdef __INTEL_COMPILER
4104 #else
4105 make an error
4106 #endif
4107
4108   ;
4109   return 0;
4110 }
4111 _ACEOF
4112 rm -f conftest.$ac_objext
4113 if { (eval echo "$as_me:4113: \"$ac_compile\"") >&5
4114   (eval $ac_compile) 2>&5
4115   ac_status=$?
4116   echo "$as_me:4116: \$? = $ac_status" >&5
4117   (exit $ac_status); } &&
4118          { ac_try='test -s conftest.$ac_objext'
4119   { (eval echo "$as_me:4119: \"$ac_try\"") >&5
4120   (eval $ac_try) 2>&5
4121   ac_status=$?
4122   echo "$as_me:4122: \$? = $ac_status" >&5
4123   (exit $ac_status); }; }; then
4124   INTEL_COMPILER=yes
4125 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4126
4127 else
4128   echo "$as_me: failed program was:" >&5
4129 cat conftest.$ac_ext >&5
4130 fi
4131 rm -f conftest.$ac_objext conftest.$ac_ext
4132                 CFLAGS="$cf_save_CFLAGS"
4133                 echo "$as_me:4133: result: $INTEL_COMPILER" >&5
4134 echo "${ECHO_T}$INTEL_COMPILER" >&6
4135                 ;;
4136         esac
4137 fi
4138
4139 cat > conftest.$ac_ext <<EOF
4140 #line 4140 "${as_me:-configure}"
4141 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4142 EOF
4143
4144 if test "$INTEL_COMPILER" = yes
4145 then
4146 # The "-wdXXX" options suppress warnings:
4147 # remark #1419: external declaration in primary source file
4148 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4149 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4150 # remark #193: zero used for undefined preprocessing identifier
4151 # remark #593: variable "curs_sb_left_arrow" was set but never used
4152 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4153 # remark #869: parameter "tw" was never referenced
4154 # remark #981: operands are evaluated in unspecified order
4155 # warning #279: controlling expression is constant
4156
4157         { echo "$as_me:4157: checking for $CC warning options..." >&5
4158 echo "$as_me: checking for $CC warning options..." >&6;}
4159         cf_save_CFLAGS="$CFLAGS"
4160         EXTRA_CFLAGS="-Wall"
4161         for cf_opt in \
4162                 wd1419 \
4163                 wd1683 \
4164                 wd1684 \
4165                 wd193 \
4166                 wd593 \
4167                 wd279 \
4168                 wd810 \
4169                 wd869 \
4170                 wd981
4171         do
4172                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4173                 if { (eval echo "$as_me:4173: \"$ac_compile\"") >&5
4174   (eval $ac_compile) 2>&5
4175   ac_status=$?
4176   echo "$as_me:4176: \$? = $ac_status" >&5
4177   (exit $ac_status); }; then
4178                         test -n "$verbose" && echo "$as_me:4178: result: ... -$cf_opt" >&5
4179 echo "${ECHO_T}... -$cf_opt" >&6
4180                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4181                 fi
4182         done
4183         CFLAGS="$cf_save_CFLAGS"
4184
4185 elif test "$GCC" = yes
4186 then
4187         { echo "$as_me:4187: checking for $CC warning options..." >&5
4188 echo "$as_me: checking for $CC warning options..." >&6;}
4189         cf_save_CFLAGS="$CFLAGS"
4190         EXTRA_CFLAGS=
4191         cf_warn_CONST=""
4192         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4193         for cf_opt in W Wall \
4194                 Wbad-function-cast \
4195                 Wcast-align \
4196                 Wcast-qual \
4197                 Winline \
4198                 Wmissing-declarations \
4199                 Wmissing-prototypes \
4200                 Wnested-externs \
4201                 Wpointer-arith \
4202                 Wshadow \
4203                 Wstrict-prototypes \
4204                 Wundef $cf_warn_CONST
4205         do
4206                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4207                 if { (eval echo "$as_me:4207: \"$ac_compile\"") >&5
4208   (eval $ac_compile) 2>&5
4209   ac_status=$?
4210   echo "$as_me:4210: \$? = $ac_status" >&5
4211   (exit $ac_status); }; then
4212                         test -n "$verbose" && echo "$as_me:4212: result: ... -$cf_opt" >&5
4213 echo "${ECHO_T}... -$cf_opt" >&6
4214                         case $cf_opt in #(vi
4215                         Wcast-qual) #(vi
4216                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4217                                 ;;
4218                         Winline) #(vi
4219                                 case $GCC_VERSION in
4220                                 [34].*)
4221                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4222
4223 echo "${as_me:-configure}:4223: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4224
4225                                         continue;;
4226                                 esac
4227                                 ;;
4228                         esac
4229                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4230                 fi
4231         done
4232         CFLAGS="$cf_save_CFLAGS"
4233 fi
4234 rm -rf conftest*
4235
4236 fi
4237 fi
4238
4239 # Check whether --with-package or --without-package was given.
4240 if test "${with_package+set}" = set; then
4241   withval="$with_package"
4242   PACKAGE=$withval
4243 else
4244   PACKAGE=dialog
4245 fi;
4246
4247 if test -f $srcdir/VERSION ; then
4248         echo "$as_me:4248: checking for package version" >&5
4249 echo $ECHO_N "checking for package version... $ECHO_C" >&6
4250
4251         # if there are not enough fields, cut returns the last one...
4252         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
4253         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
4254         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
4255
4256         # this is how CF_BUNDLED_INTL uses $VERSION:
4257         VERSION="$cf_field1"
4258
4259         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
4260         test -z "$VERSION_MAJOR" && { { echo "$as_me:4260: error: missing major-version" >&5
4261 echo "$as_me: error: missing major-version" >&2;}
4262    { (exit 1); exit 1; }; }
4263
4264         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
4265         test -z "$VERSION_MINOR" && { { echo "$as_me:4265: error: missing minor-version" >&5
4266 echo "$as_me: error: missing minor-version" >&2;}
4267    { (exit 1); exit 1; }; }
4268
4269         echo "$as_me:4269: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
4270 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
4271
4272         echo "$as_me:4272: checking for package patch date" >&5
4273 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
4274         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
4275         case .$VERSION_PATCH in
4276         .)
4277                 { { echo "$as_me:4277: error: missing patch-date $VERSION_PATCH" >&5
4278 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
4279    { (exit 1); exit 1; }; }
4280                 ;;
4281         .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
4282                 ;;
4283         *)
4284                 { { echo "$as_me:4284: error: illegal patch-date $VERSION_PATCH" >&5
4285 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
4286    { (exit 1); exit 1; }; }
4287                 ;;
4288         esac
4289         echo "$as_me:4289: result: $VERSION_PATCH" >&5
4290 echo "${ECHO_T}$VERSION_PATCH" >&6
4291 else
4292         { { echo "$as_me:4292: error: did not find $srcdir/VERSION" >&5
4293 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
4294    { (exit 1); exit 1; }; }
4295 fi
4296
4297 # show the actual data that we have for versions:
4298 test -n "$verbose" && echo "    VERSION $VERSION" 1>&6
4299
4300 echo "${as_me:-configure}:4300: testing VERSION $VERSION ..." 1>&5
4301
4302 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
4303
4304 echo "${as_me:-configure}:4304: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
4305
4306 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
4307
4308 echo "${as_me:-configure}:4308: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
4309
4310 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
4311
4312 echo "${as_me:-configure}:4312: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
4313
4314         cf_PACKAGE=dialog
4315         PACKAGE=$PACKAGE
4316         cat >>confdefs.h <<EOF
4317 #define PACKAGE "$PACKAGE"
4318 EOF
4319
4320 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4321
4322         cat >>confdefs.h <<EOF
4323 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
4324 EOF
4325
4326         cat >>confdefs.h <<EOF
4327 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
4328 EOF
4329
4330 # Check whether --enable-header-subdir or --disable-header-subdir was given.
4331 if test "${enable_header_subdir+set}" = set; then
4332   enableval="$enable_header_subdir"
4333   SUB_INC=$enableval
4334 else
4335   SUB_INC=no
4336 fi;
4337
4338 EXTRAOBJS=""
4339 echo "$as_me:4339: checking for ANSI C header files" >&5
4340 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4341 if test "${ac_cv_header_stdc+set}" = set; then
4342   echo $ECHO_N "(cached) $ECHO_C" >&6
4343 else
4344   cat >conftest.$ac_ext <<_ACEOF
4345 #line 4345 "configure"
4346 #include "confdefs.h"
4347 #include <stdlib.h>
4348 #include <stdarg.h>
4349 #include <string.h>
4350 #include <float.h>
4351
4352 _ACEOF
4353 if { (eval echo "$as_me:4353: \"$ac_cpp conftest.$ac_ext\"") >&5
4354   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4355   ac_status=$?
4356   egrep -v '^ *\+' conftest.er1 >conftest.err
4357   rm -f conftest.er1
4358   cat conftest.err >&5
4359   echo "$as_me:4359: \$? = $ac_status" >&5
4360   (exit $ac_status); } >/dev/null; then
4361   if test -s conftest.err; then
4362     ac_cpp_err=$ac_c_preproc_warn_flag
4363   else
4364     ac_cpp_err=
4365   fi
4366 else
4367   ac_cpp_err=yes
4368 fi
4369 if test -z "$ac_cpp_err"; then
4370   ac_cv_header_stdc=yes
4371 else
4372   echo "$as_me: failed program was:" >&5
4373   cat conftest.$ac_ext >&5
4374   ac_cv_header_stdc=no
4375 fi
4376 rm -f conftest.err conftest.$ac_ext
4377
4378 if test $ac_cv_header_stdc = yes; then
4379   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4380   cat >conftest.$ac_ext <<_ACEOF
4381 #line 4381 "configure"
4382 #include "confdefs.h"
4383 #include <string.h>
4384
4385 _ACEOF
4386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4387   egrep "memchr" >/dev/null 2>&1; then
4388   :
4389 else
4390   ac_cv_header_stdc=no
4391 fi
4392 rm -rf conftest*
4393
4394 fi
4395
4396 if test $ac_cv_header_stdc = yes; then
4397   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4398   cat >conftest.$ac_ext <<_ACEOF
4399 #line 4399 "configure"
4400 #include "confdefs.h"
4401 #include <stdlib.h>
4402
4403 _ACEOF
4404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4405   egrep "free" >/dev/null 2>&1; then
4406   :
4407 else
4408   ac_cv_header_stdc=no
4409 fi
4410 rm -rf conftest*
4411
4412 fi
4413
4414 if test $ac_cv_header_stdc = yes; then
4415   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4416   if test "$cross_compiling" = yes; then
4417   :
4418 else
4419   cat >conftest.$ac_ext <<_ACEOF
4420 #line 4420 "configure"
4421 #include "confdefs.h"
4422 #include <ctype.h>
4423 #if ((' ' & 0x0FF) == 0x020)
4424 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4425 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4426 #else
4427 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4428                      || ('j' <= (c) && (c) <= 'r') \
4429                      || ('s' <= (c) && (c) <= 'z'))
4430 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4431 #endif
4432
4433 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4434 int
4435 main ()
4436 {
4437   int i;
4438   for (i = 0; i < 256; i++)
4439     if (XOR (islower (i), ISLOWER (i))
4440         || toupper (i) != TOUPPER (i))
4441       $ac_main_return(2);
4442   $ac_main_return (0);
4443 }
4444 _ACEOF
4445 rm -f conftest$ac_exeext
4446 if { (eval echo "$as_me:4446: \"$ac_link\"") >&5
4447   (eval $ac_link) 2>&5
4448   ac_status=$?
4449   echo "$as_me:4449: \$? = $ac_status" >&5
4450   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4451   { (eval echo "$as_me:4451: \"$ac_try\"") >&5
4452   (eval $ac_try) 2>&5
4453   ac_status=$?
4454   echo "$as_me:4454: \$? = $ac_status" >&5
4455   (exit $ac_status); }; }; then
4456   :
4457 else
4458   echo "$as_me: program exited with status $ac_status" >&5
4459 echo "$as_me: failed program was:" >&5
4460 cat conftest.$ac_ext >&5
4461 ac_cv_header_stdc=no
4462 fi
4463 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4464 fi
4465 fi
4466 fi
4467 echo "$as_me:4467: result: $ac_cv_header_stdc" >&5
4468 echo "${ECHO_T}$ac_cv_header_stdc" >&6
4469 if test $ac_cv_header_stdc = yes; then
4470
4471 cat >>confdefs.h <<\EOF
4472 #define STDC_HEADERS 1
4473 EOF
4474
4475 fi
4476
4477 echo "$as_me:4477: checking for inline" >&5
4478 echo $ECHO_N "checking for inline... $ECHO_C" >&6
4479 if test "${ac_cv_c_inline+set}" = set; then
4480   echo $ECHO_N "(cached) $ECHO_C" >&6
4481 else
4482   ac_cv_c_inline=no
4483 for ac_kw in inline __inline__ __inline; do
4484   cat >conftest.$ac_ext <<_ACEOF
4485 #line 4485 "configure"
4486 #include "confdefs.h"
4487 #ifndef __cplusplus
4488 static $ac_kw int static_foo () {return 0; }
4489 $ac_kw int foo () {return 0; }
4490 #endif
4491
4492 _ACEOF
4493 rm -f conftest.$ac_objext
4494 if { (eval echo "$as_me:4494: \"$ac_compile\"") >&5
4495   (eval $ac_compile) 2>&5
4496   ac_status=$?
4497   echo "$as_me:4497: \$? = $ac_status" >&5
4498   (exit $ac_status); } &&
4499          { ac_try='test -s conftest.$ac_objext'
4500   { (eval echo "$as_me:4500: \"$ac_try\"") >&5
4501   (eval $ac_try) 2>&5
4502   ac_status=$?
4503   echo "$as_me:4503: \$? = $ac_status" >&5
4504   (exit $ac_status); }; }; then
4505   ac_cv_c_inline=$ac_kw; break
4506 else
4507   echo "$as_me: failed program was:" >&5
4508 cat conftest.$ac_ext >&5
4509 fi
4510 rm -f conftest.$ac_objext conftest.$ac_ext
4511 done
4512
4513 fi
4514 echo "$as_me:4514: result: $ac_cv_c_inline" >&5
4515 echo "${ECHO_T}$ac_cv_c_inline" >&6
4516 case $ac_cv_c_inline in
4517   inline | yes) ;;
4518   no)
4519 cat >>confdefs.h <<\EOF
4520 #define inline
4521 EOF
4522  ;;
4523   *)  cat >>confdefs.h <<EOF
4524 #define inline $ac_cv_c_inline
4525 EOF
4526  ;;
4527 esac
4528
4529 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4530
4531 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4532                   inttypes.h stdint.h unistd.h
4533 do
4534 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4535 echo "$as_me:4535: checking for $ac_header" >&5
4536 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4537 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4538   echo $ECHO_N "(cached) $ECHO_C" >&6
4539 else
4540   cat >conftest.$ac_ext <<_ACEOF
4541 #line 4541 "configure"
4542 #include "confdefs.h"
4543 $ac_includes_default
4544 #include <$ac_header>
4545 _ACEOF
4546 rm -f conftest.$ac_objext
4547 if { (eval echo "$as_me:4547: \"$ac_compile\"") >&5
4548   (eval $ac_compile) 2>&5
4549   ac_status=$?
4550   echo "$as_me:4550: \$? = $ac_status" >&5
4551   (exit $ac_status); } &&
4552          { ac_try='test -s conftest.$ac_objext'
4553   { (eval echo "$as_me:4553: \"$ac_try\"") >&5
4554   (eval $ac_try) 2>&5
4555   ac_status=$?
4556   echo "$as_me:4556: \$? = $ac_status" >&5
4557   (exit $ac_status); }; }; then
4558   eval "$as_ac_Header=yes"
4559 else
4560   echo "$as_me: failed program was:" >&5
4561 cat conftest.$ac_ext >&5
4562 eval "$as_ac_Header=no"
4563 fi
4564 rm -f conftest.$ac_objext conftest.$ac_ext
4565 fi
4566 echo "$as_me:4566: result: `eval echo '${'$as_ac_Header'}'`" >&5
4567 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4568 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4569   cat >>confdefs.h <<EOF
4570 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4571 EOF
4572
4573 fi
4574 done
4575
4576 echo "$as_me:4576: checking for off_t" >&5
4577 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4578 if test "${ac_cv_type_off_t+set}" = set; then
4579   echo $ECHO_N "(cached) $ECHO_C" >&6
4580 else
4581   cat >conftest.$ac_ext <<_ACEOF
4582 #line 4582 "configure"
4583 #include "confdefs.h"
4584 $ac_includes_default
4585 int
4586 main ()
4587 {
4588 if ((off_t *) 0)
4589   return 0;
4590 if (sizeof (off_t))
4591   return 0;
4592   ;
4593   return 0;
4594 }
4595 _ACEOF
4596 rm -f conftest.$ac_objext
4597 if { (eval echo "$as_me:4597: \"$ac_compile\"") >&5
4598   (eval $ac_compile) 2>&5
4599   ac_status=$?
4600   echo "$as_me:4600: \$? = $ac_status" >&5
4601   (exit $ac_status); } &&
4602          { ac_try='test -s conftest.$ac_objext'
4603   { (eval echo "$as_me:4603: \"$ac_try\"") >&5
4604   (eval $ac_try) 2>&5
4605   ac_status=$?
4606   echo "$as_me:4606: \$? = $ac_status" >&5
4607   (exit $ac_status); }; }; then
4608   ac_cv_type_off_t=yes
4609 else
4610   echo "$as_me: failed program was:" >&5
4611 cat conftest.$ac_ext >&5
4612 ac_cv_type_off_t=no
4613 fi
4614 rm -f conftest.$ac_objext conftest.$ac_ext
4615 fi
4616 echo "$as_me:4616: result: $ac_cv_type_off_t" >&5
4617 echo "${ECHO_T}$ac_cv_type_off_t" >&6
4618 if test $ac_cv_type_off_t = yes; then
4619   :
4620 else
4621
4622 cat >>confdefs.h <<EOF
4623 #define off_t long
4624 EOF
4625
4626 fi
4627
4628 echo "$as_me:4628: checking for size_t" >&5
4629 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
4630 if test "${ac_cv_type_size_t+set}" = set; then
4631   echo $ECHO_N "(cached) $ECHO_C" >&6
4632 else
4633   cat >conftest.$ac_ext <<_ACEOF
4634 #line 4634 "configure"
4635 #include "confdefs.h"
4636 $ac_includes_default
4637 int
4638 main ()
4639 {
4640 if ((size_t *) 0)
4641   return 0;
4642 if (sizeof (size_t))
4643   return 0;
4644   ;
4645   return 0;
4646 }
4647 _ACEOF
4648 rm -f conftest.$ac_objext
4649 if { (eval echo "$as_me:4649: \"$ac_compile\"") >&5
4650   (eval $ac_compile) 2>&5
4651   ac_status=$?
4652   echo "$as_me:4652: \$? = $ac_status" >&5
4653   (exit $ac_status); } &&
4654          { ac_try='test -s conftest.$ac_objext'
4655   { (eval echo "$as_me:4655: \"$ac_try\"") >&5
4656   (eval $ac_try) 2>&5
4657   ac_status=$?
4658   echo "$as_me:4658: \$? = $ac_status" >&5
4659   (exit $ac_status); }; }; then
4660   ac_cv_type_size_t=yes
4661 else
4662   echo "$as_me: failed program was:" >&5
4663 cat conftest.$ac_ext >&5
4664 ac_cv_type_size_t=no
4665 fi
4666 rm -f conftest.$ac_objext conftest.$ac_ext
4667 fi
4668 echo "$as_me:4668: result: $ac_cv_type_size_t" >&5
4669 echo "${ECHO_T}$ac_cv_type_size_t" >&6
4670 if test $ac_cv_type_size_t = yes; then
4671   :
4672 else
4673
4674 cat >>confdefs.h <<EOF
4675 #define size_t unsigned
4676 EOF
4677
4678 fi
4679
4680 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4681 # for constant arguments.  Useless!
4682 echo "$as_me:4682: checking for working alloca.h" >&5
4683 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
4684 if test "${ac_cv_working_alloca_h+set}" = set; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   cat >conftest.$ac_ext <<_ACEOF
4688 #line 4688 "configure"
4689 #include "confdefs.h"
4690 #include <alloca.h>
4691 int
4692 main ()
4693 {
4694 char *p = (char *) alloca (2 * sizeof (int));
4695   ;
4696   return 0;
4697 }
4698 _ACEOF
4699 rm -f conftest.$ac_objext conftest$ac_exeext
4700 if { (eval echo "$as_me:4700: \"$ac_link\"") >&5
4701   (eval $ac_link) 2>&5
4702   ac_status=$?
4703   echo "$as_me:4703: \$? = $ac_status" >&5
4704   (exit $ac_status); } &&
4705          { ac_try='test -s conftest$ac_exeext'
4706   { (eval echo "$as_me:4706: \"$ac_try\"") >&5
4707   (eval $ac_try) 2>&5
4708   ac_status=$?
4709   echo "$as_me:4709: \$? = $ac_status" >&5
4710   (exit $ac_status); }; }; then
4711   ac_cv_working_alloca_h=yes
4712 else
4713   echo "$as_me: failed program was:" >&5
4714 cat conftest.$ac_ext >&5
4715 ac_cv_working_alloca_h=no
4716 fi
4717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4718 fi
4719 echo "$as_me:4719: result: $ac_cv_working_alloca_h" >&5
4720 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
4721 if test $ac_cv_working_alloca_h = yes; then
4722
4723 cat >>confdefs.h <<\EOF
4724 #define HAVE_ALLOCA_H 1
4725 EOF
4726
4727 fi
4728
4729 echo "$as_me:4729: checking for alloca" >&5
4730 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
4731 if test "${ac_cv_func_alloca_works+set}" = set; then
4732   echo $ECHO_N "(cached) $ECHO_C" >&6
4733 else
4734   cat >conftest.$ac_ext <<_ACEOF
4735 #line 4735 "configure"
4736 #include "confdefs.h"
4737 #ifdef __GNUC__
4738 # define alloca __builtin_alloca
4739 #else
4740 # ifdef _MSC_VER
4741 #  include <malloc.h>
4742 #  define alloca _alloca
4743 # else
4744 #  if HAVE_ALLOCA_H
4745 #   include <alloca.h>
4746 #  else
4747 #   ifdef _AIX
4748  #pragma alloca
4749 #   else
4750 #    ifndef alloca /* predefined by HP cc +Olibcalls */
4751 char *alloca ();
4752 #    endif
4753 #   endif
4754 #  endif
4755 # endif
4756 #endif
4757
4758 int
4759 main ()
4760 {
4761 char *p = (char *) alloca (1);
4762   ;
4763   return 0;
4764 }
4765 _ACEOF
4766 rm -f conftest.$ac_objext conftest$ac_exeext
4767 if { (eval echo "$as_me:4767: \"$ac_link\"") >&5
4768   (eval $ac_link) 2>&5
4769   ac_status=$?
4770   echo "$as_me:4770: \$? = $ac_status" >&5
4771   (exit $ac_status); } &&
4772          { ac_try='test -s conftest$ac_exeext'
4773   { (eval echo "$as_me:4773: \"$ac_try\"") >&5
4774   (eval $ac_try) 2>&5
4775   ac_status=$?
4776   echo "$as_me:4776: \$? = $ac_status" >&5
4777   (exit $ac_status); }; }; then
4778   ac_cv_func_alloca_works=yes
4779 else
4780   echo "$as_me: failed program was:" >&5
4781 cat conftest.$ac_ext >&5
4782 ac_cv_func_alloca_works=no
4783 fi
4784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4785 fi
4786 echo "$as_me:4786: result: $ac_cv_func_alloca_works" >&5
4787 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
4788
4789 if test $ac_cv_func_alloca_works = yes; then
4790
4791 cat >>confdefs.h <<\EOF
4792 #define HAVE_ALLOCA 1
4793 EOF
4794
4795 else
4796   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4797 # that cause trouble.  Some versions do not even contain alloca or
4798 # contain a buggy version.  If you still want to use their alloca,
4799 # use ar to extract alloca.o from them instead of compiling alloca.c.
4800
4801 ALLOCA=alloca.$ac_objext
4802
4803 cat >>confdefs.h <<\EOF
4804 #define C_ALLOCA 1
4805 EOF
4806
4807 echo "$as_me:4807: checking whether \`alloca.c' needs Cray hooks" >&5
4808 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
4809 if test "${ac_cv_os_cray+set}" = set; then
4810   echo $ECHO_N "(cached) $ECHO_C" >&6
4811 else
4812   cat >conftest.$ac_ext <<_ACEOF
4813 #line 4813 "configure"
4814 #include "confdefs.h"
4815 #if defined(CRAY) && ! defined(CRAY2)
4816 webecray
4817 #else
4818 wenotbecray
4819 #endif
4820
4821 _ACEOF
4822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4823   egrep "webecray" >/dev/null 2>&1; then
4824   ac_cv_os_cray=yes
4825 else
4826   ac_cv_os_cray=no
4827 fi
4828 rm -rf conftest*
4829
4830 fi
4831 echo "$as_me:4831: result: $ac_cv_os_cray" >&5
4832 echo "${ECHO_T}$ac_cv_os_cray" >&6
4833 if test $ac_cv_os_cray = yes; then
4834   for ac_func in _getb67 GETB67 getb67; do
4835     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4836 echo "$as_me:4836: checking for $ac_func" >&5
4837 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4838 if eval "test \"\${$as_ac_var+set}\" = set"; then
4839   echo $ECHO_N "(cached) $ECHO_C" >&6
4840 else
4841   cat >conftest.$ac_ext <<_ACEOF
4842 #line 4842 "configure"
4843 #include "confdefs.h"
4844 /* System header to define __stub macros and hopefully few prototypes,
4845     which can conflict with char $ac_func (); below.  */
4846 #include <assert.h>
4847 /* Override any gcc2 internal prototype to avoid an error.  */
4848 #ifdef __cplusplus
4849 extern "C"
4850 #endif
4851 /* We use char because int might match the return type of a gcc2
4852    builtin and then its argument prototype would still apply.  */
4853 char $ac_func ();
4854 char (*f) ();
4855
4856 int
4857 main ()
4858 {
4859 /* The GNU C library defines this for functions which it implements
4860     to always fail with ENOSYS.  Some functions are actually named
4861     something starting with __ and the normal name is an alias.  */
4862 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4863 choke me
4864 #else
4865 f = $ac_func;
4866 #endif
4867
4868   ;
4869   return 0;
4870 }
4871 _ACEOF
4872 rm -f conftest.$ac_objext conftest$ac_exeext
4873 if { (eval echo "$as_me:4873: \"$ac_link\"") >&5
4874   (eval $ac_link) 2>&5
4875   ac_status=$?
4876   echo "$as_me:4876: \$? = $ac_status" >&5
4877   (exit $ac_status); } &&
4878          { ac_try='test -s conftest$ac_exeext'
4879   { (eval echo "$as_me:4879: \"$ac_try\"") >&5
4880   (eval $ac_try) 2>&5
4881   ac_status=$?
4882   echo "$as_me:4882: \$? = $ac_status" >&5
4883   (exit $ac_status); }; }; then
4884   eval "$as_ac_var=yes"
4885 else
4886   echo "$as_me: failed program was:" >&5
4887 cat conftest.$ac_ext >&5
4888 eval "$as_ac_var=no"
4889 fi
4890 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4891 fi
4892 echo "$as_me:4892: result: `eval echo '${'$as_ac_var'}'`" >&5
4893 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4894 if test `eval echo '${'$as_ac_var'}'` = yes; then
4895
4896 cat >>confdefs.h <<EOF
4897 #define CRAY_STACKSEG_END $ac_func
4898 EOF
4899
4900     break
4901 fi
4902
4903   done
4904 fi
4905
4906 echo "$as_me:4906: checking stack direction for C alloca" >&5
4907 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
4908 if test "${ac_cv_c_stack_direction+set}" = set; then
4909   echo $ECHO_N "(cached) $ECHO_C" >&6
4910 else
4911   if test "$cross_compiling" = yes; then
4912   ac_cv_c_stack_direction=0
4913 else
4914   cat >conftest.$ac_ext <<_ACEOF
4915 #line 4915 "configure"
4916 #include "confdefs.h"
4917 int
4918 find_stack_direction ()
4919 {
4920   static char *addr = 0;
4921   auto char dummy;
4922   if (addr == 0)
4923     {
4924       addr = &dummy;
4925       return find_stack_direction ();
4926     }
4927   else
4928     return (&dummy > addr) ? 1 : -1;
4929 }
4930
4931 int
4932 main ()
4933 {
4934   $ac_main_return (find_stack_direction () < 0);
4935 }
4936 _ACEOF
4937 rm -f conftest$ac_exeext
4938 if { (eval echo "$as_me:4938: \"$ac_link\"") >&5
4939   (eval $ac_link) 2>&5
4940   ac_status=$?
4941   echo "$as_me:4941: \$? = $ac_status" >&5
4942   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4943   { (eval echo "$as_me:4943: \"$ac_try\"") >&5
4944   (eval $ac_try) 2>&5
4945   ac_status=$?
4946   echo "$as_me:4946: \$? = $ac_status" >&5
4947   (exit $ac_status); }; }; then
4948   ac_cv_c_stack_direction=1
4949 else
4950   echo "$as_me: program exited with status $ac_status" >&5
4951 echo "$as_me: failed program was:" >&5
4952 cat conftest.$ac_ext >&5
4953 ac_cv_c_stack_direction=-1
4954 fi
4955 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4956 fi
4957 fi
4958 echo "$as_me:4958: result: $ac_cv_c_stack_direction" >&5
4959 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
4960
4961 cat >>confdefs.h <<EOF
4962 #define STACK_DIRECTION $ac_cv_c_stack_direction
4963 EOF
4964
4965 fi
4966
4967 for ac_header in stdlib.h unistd.h
4968 do
4969 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4970 echo "$as_me:4970: checking for $ac_header" >&5
4971 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4972 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4973   echo $ECHO_N "(cached) $ECHO_C" >&6
4974 else
4975   cat >conftest.$ac_ext <<_ACEOF
4976 #line 4976 "configure"
4977 #include "confdefs.h"
4978 #include <$ac_header>
4979 _ACEOF
4980 if { (eval echo "$as_me:4980: \"$ac_cpp conftest.$ac_ext\"") >&5
4981   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4982   ac_status=$?
4983   egrep -v '^ *\+' conftest.er1 >conftest.err
4984   rm -f conftest.er1
4985   cat conftest.err >&5
4986   echo "$as_me:4986: \$? = $ac_status" >&5
4987   (exit $ac_status); } >/dev/null; then
4988   if test -s conftest.err; then
4989     ac_cpp_err=$ac_c_preproc_warn_flag
4990   else
4991     ac_cpp_err=
4992   fi
4993 else
4994   ac_cpp_err=yes
4995 fi
4996 if test -z "$ac_cpp_err"; then
4997   eval "$as_ac_Header=yes"
4998 else
4999   echo "$as_me: failed program was:" >&5
5000   cat conftest.$ac_ext >&5
5001   eval "$as_ac_Header=no"
5002 fi
5003 rm -f conftest.err conftest.$ac_ext
5004 fi
5005 echo "$as_me:5005: result: `eval echo '${'$as_ac_Header'}'`" >&5
5006 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5007 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5008   cat >>confdefs.h <<EOF
5009 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5010 EOF
5011
5012 fi
5013 done
5014
5015 for ac_func in getpagesize
5016 do
5017 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5018 echo "$as_me:5018: checking for $ac_func" >&5
5019 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5020 if eval "test \"\${$as_ac_var+set}\" = set"; then
5021   echo $ECHO_N "(cached) $ECHO_C" >&6
5022 else
5023   cat >conftest.$ac_ext <<_ACEOF
5024 #line 5024 "configure"
5025 #include "confdefs.h"
5026 /* System header to define __stub macros and hopefully few prototypes,
5027     which can conflict with char $ac_func (); below.  */
5028 #include <assert.h>
5029 /* Override any gcc2 internal prototype to avoid an error.  */
5030 #ifdef __cplusplus
5031 extern "C"
5032 #endif
5033 /* We use char because int might match the return type of a gcc2
5034    builtin and then its argument prototype would still apply.  */
5035 char $ac_func ();
5036 char (*f) ();
5037
5038 int
5039 main ()
5040 {
5041 /* The GNU C library defines this for functions which it implements
5042     to always fail with ENOSYS.  Some functions are actually named
5043     something starting with __ and the normal name is an alias.  */
5044 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5045 choke me
5046 #else
5047 f = $ac_func;
5048 #endif
5049
5050   ;
5051   return 0;
5052 }
5053 _ACEOF
5054 rm -f conftest.$ac_objext conftest$ac_exeext
5055 if { (eval echo "$as_me:5055: \"$ac_link\"") >&5
5056   (eval $ac_link) 2>&5
5057   ac_status=$?
5058   echo "$as_me:5058: \$? = $ac_status" >&5
5059   (exit $ac_status); } &&
5060          { ac_try='test -s conftest$ac_exeext'
5061   { (eval echo "$as_me:5061: \"$ac_try\"") >&5
5062   (eval $ac_try) 2>&5
5063   ac_status=$?
5064   echo "$as_me:5064: \$? = $ac_status" >&5
5065   (exit $ac_status); }; }; then
5066   eval "$as_ac_var=yes"
5067 else
5068   echo "$as_me: failed program was:" >&5
5069 cat conftest.$ac_ext >&5
5070 eval "$as_ac_var=no"
5071 fi
5072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5073 fi
5074 echo "$as_me:5074: result: `eval echo '${'$as_ac_var'}'`" >&5
5075 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5076 if test `eval echo '${'$as_ac_var'}'` = yes; then
5077   cat >>confdefs.h <<EOF
5078 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5079 EOF
5080
5081 fi
5082 done
5083
5084 echo "$as_me:5084: checking for working mmap" >&5
5085 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
5086 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
5087   echo $ECHO_N "(cached) $ECHO_C" >&6
5088 else
5089   if test "$cross_compiling" = yes; then
5090   ac_cv_func_mmap_fixed_mapped=no
5091 else
5092   cat >conftest.$ac_ext <<_ACEOF
5093 #line 5093 "configure"
5094 #include "confdefs.h"
5095 $ac_includes_default
5096 /* Thanks to Mike Haertel and Jim Avera for this test.
5097    Here is a matrix of mmap possibilities:
5098         mmap private not fixed
5099         mmap private fixed at somewhere currently unmapped
5100         mmap private fixed at somewhere already mapped
5101         mmap shared not fixed
5102         mmap shared fixed at somewhere currently unmapped
5103         mmap shared fixed at somewhere already mapped
5104    For private mappings, we should verify that changes cannot be read()
5105    back from the file, nor mmap's back from the file at a different
5106    address.  (There have been systems where private was not correctly
5107    implemented like the infamous i386 svr4.0, and systems where the
5108    VM page cache was not coherent with the file system buffer cache
5109    like early versions of FreeBSD and possibly contemporary NetBSD.)
5110    For shared mappings, we should conversely verify that changes get
5111    propogated back to all the places they're supposed to be.
5112
5113    Grep wants private fixed already mapped.
5114    The main things grep needs to know about mmap are:
5115    * does it exist and is it safe to write into the mmap'd area
5116    * how to use it (BSD variants)  */
5117
5118 #include <fcntl.h>
5119 #include <sys/mman.h>
5120
5121 #if !STDC_HEADERS && !HAVE_STDLIB_H
5122 char *malloc ();
5123 #endif
5124
5125 /* This mess was copied from the GNU getpagesize.h.  */
5126 #if !HAVE_GETPAGESIZE
5127 /* Assume that all systems that can run configure have sys/param.h.  */
5128 # if !HAVE_SYS_PARAM_H
5129 #  define HAVE_SYS_PARAM_H 1
5130 # endif
5131
5132 # ifdef _SC_PAGESIZE
5133 #  define getpagesize() sysconf(_SC_PAGESIZE)
5134 # else /* no _SC_PAGESIZE */
5135 #  if HAVE_SYS_PARAM_H
5136 #   include <sys/param.h>
5137 #   ifdef EXEC_PAGESIZE
5138 #    define getpagesize() EXEC_PAGESIZE
5139 #   else /* no EXEC_PAGESIZE */
5140 #    ifdef NBPG
5141 #     define getpagesize() NBPG * CLSIZE
5142 #     ifndef CLSIZE
5143 #      define CLSIZE 1
5144 #     endif /* no CLSIZE */
5145 #    else /* no NBPG */
5146 #     ifdef NBPC
5147 #      define getpagesize() NBPC
5148 #     else /* no NBPC */
5149 #      ifdef PAGESIZE
5150 #       define getpagesize() PAGESIZE
5151 #      endif /* PAGESIZE */
5152 #     endif /* no NBPC */
5153 #    endif /* no NBPG */
5154 #   endif /* no EXEC_PAGESIZE */
5155 #  else /* no HAVE_SYS_PARAM_H */
5156 #   define getpagesize() 8192   /* punt totally */
5157 #  endif /* no HAVE_SYS_PARAM_H */
5158 # endif /* no _SC_PAGESIZE */
5159
5160 #endif /* no HAVE_GETPAGESIZE */
5161
5162 int
5163 main ()
5164 {
5165   char *data, *data2, *data3;
5166   int i, pagesize;
5167   int fd;
5168
5169   pagesize = getpagesize ();
5170
5171   /* First, make a file with some known garbage in it. */
5172   data = (char *) malloc (pagesize);
5173   if (!data)
5174     $ac_main_return (1);
5175   for (i = 0; i < pagesize; ++i)
5176     *(data + i) = rand ();
5177   umask (0);
5178   fd = creat ("conftest.mmap", 0600);
5179   if (fd < 0)
5180     $ac_main_return (1);
5181   if (write (fd, data, pagesize) != pagesize)
5182     $ac_main_return (1);
5183   close (fd);
5184
5185   /* Next, try to mmap the file at a fixed address which already has
5186      something else allocated at it.  If we can, also make sure that
5187      we see the same garbage.  */
5188   fd = open ("conftest.mmap", O_RDWR);
5189   if (fd < 0)
5190     $ac_main_return (1);
5191   data2 = (char *) malloc (2 * pagesize);
5192   if (!data2)
5193     $ac_main_return (1);
5194   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5195   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
5196                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
5197     $ac_main_return (1);
5198   for (i = 0; i < pagesize; ++i)
5199     if (*(data + i) != *(data2 + i))
5200       $ac_main_return (1);
5201
5202   /* Finally, make sure that changes to the mapped area do not
5203      percolate back to the file as seen by read().  (This is a bug on
5204      some variants of i386 svr4.0.)  */
5205   for (i = 0; i < pagesize; ++i)
5206     *(data2 + i) = *(data2 + i) + 1;
5207   data3 = (char *) malloc (pagesize);
5208   if (!data3)
5209     $ac_main_return (1);
5210   if (read (fd, data3, pagesize) != pagesize)
5211     $ac_main_return (1);
5212   for (i = 0; i < pagesize; ++i)
5213     if (*(data + i) != *(data3 + i))
5214       $ac_main_return (1);
5215   close (fd);
5216   $ac_main_return (0);
5217 }
5218 _ACEOF
5219 rm -f conftest$ac_exeext
5220 if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
5221   (eval $ac_link) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5225   { (eval echo "$as_me:5225: \"$ac_try\"") >&5
5226   (eval $ac_try) 2>&5
5227   ac_status=$?
5228   echo "$as_me:5228: \$? = $ac_status" >&5
5229   (exit $ac_status); }; }; then
5230   ac_cv_func_mmap_fixed_mapped=yes
5231 else
5232   echo "$as_me: program exited with status $ac_status" >&5
5233 echo "$as_me: failed program was:" >&5
5234 cat conftest.$ac_ext >&5
5235 ac_cv_func_mmap_fixed_mapped=no
5236 fi
5237 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5238 fi
5239 fi
5240 echo "$as_me:5240: result: $ac_cv_func_mmap_fixed_mapped" >&5
5241 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
5242 if test $ac_cv_func_mmap_fixed_mapped = yes; then
5243
5244 cat >>confdefs.h <<\EOF
5245 #define HAVE_MMAP 1
5246 EOF
5247
5248 fi
5249 rm -f conftest.mmap
5250
5251     echo "$as_me:5251: checking whether we are using the GNU C Library 2.1 or newer" >&5
5252 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
5253 if test "${ac_cv_gnu_library_2_1+set}" = set; then
5254   echo $ECHO_N "(cached) $ECHO_C" >&6
5255 else
5256   cat >conftest.$ac_ext <<_ACEOF
5257 #line 5257 "configure"
5258 #include "confdefs.h"
5259
5260 #include <features.h>
5261 #ifdef __GNU_LIBRARY__
5262  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5263   Lucky GNU user
5264  #endif
5265 #endif
5266
5267 _ACEOF
5268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5269   egrep "Lucky GNU user" >/dev/null 2>&1; then
5270   ac_cv_gnu_library_2_1=yes
5271 else
5272   ac_cv_gnu_library_2_1=no
5273 fi
5274 rm -rf conftest*
5275
5276 fi
5277 echo "$as_me:5277: result: $ac_cv_gnu_library_2_1" >&5
5278 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
5279
5280     GLIBC21="$ac_cv_gnu_library_2_1"
5281
5282 cf_makefile=makefile
5283
5284 test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
5285
5286 # Allow override of "config.h" definition:
5287 : ${CONFIG_H:=config.h}
5288
5289 if test -z "$PACKAGE" ; then
5290         { { echo "$as_me:5290: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
5291 echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
5292    { (exit 1); exit 1; }; }
5293 fi
5294
5295 if test -z "$VERSION" ; then
5296 if test -f $srcdir/VERSION ; then
5297         VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
5298 else
5299         VERSION=unknown
5300 fi
5301 fi
5302
5303 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5304 stdlib.h string.h unistd.h sys/param.h
5305 do
5306 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5307 echo "$as_me:5307: checking for $ac_header" >&5
5308 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5309 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5310   echo $ECHO_N "(cached) $ECHO_C" >&6
5311 else
5312   cat >conftest.$ac_ext <<_ACEOF
5313 #line 5313 "configure"
5314 #include "confdefs.h"
5315 #include <$ac_header>
5316 _ACEOF
5317 if { (eval echo "$as_me:5317: \"$ac_cpp conftest.$ac_ext\"") >&5
5318   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5319   ac_status=$?
5320   egrep -v '^ *\+' conftest.er1 >conftest.err
5321   rm -f conftest.er1
5322   cat conftest.err >&5
5323   echo "$as_me:5323: \$? = $ac_status" >&5
5324   (exit $ac_status); } >/dev/null; then
5325   if test -s conftest.err; then
5326     ac_cpp_err=$ac_c_preproc_warn_flag
5327   else
5328     ac_cpp_err=
5329   fi
5330 else
5331   ac_cpp_err=yes
5332 fi
5333 if test -z "$ac_cpp_err"; then
5334   eval "$as_ac_Header=yes"
5335 else
5336   echo "$as_me: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338   eval "$as_ac_Header=no"
5339 fi
5340 rm -f conftest.err conftest.$ac_ext
5341 fi
5342 echo "$as_me:5342: result: `eval echo '${'$as_ac_Header'}'`" >&5
5343 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5344 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5345   cat >>confdefs.h <<EOF
5346 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5347 EOF
5348
5349 fi
5350 done
5351
5352 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
5353 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
5354 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
5355 do
5356 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5357 echo "$as_me:5357: checking for $ac_func" >&5
5358 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5359 if eval "test \"\${$as_ac_var+set}\" = set"; then
5360   echo $ECHO_N "(cached) $ECHO_C" >&6
5361 else
5362   cat >conftest.$ac_ext <<_ACEOF
5363 #line 5363 "configure"
5364 #include "confdefs.h"
5365 /* System header to define __stub macros and hopefully few prototypes,
5366     which can conflict with char $ac_func (); below.  */
5367 #include <assert.h>
5368 /* Override any gcc2 internal prototype to avoid an error.  */
5369 #ifdef __cplusplus
5370 extern "C"
5371 #endif
5372 /* We use char because int might match the return type of a gcc2
5373    builtin and then its argument prototype would still apply.  */
5374 char $ac_func ();
5375 char (*f) ();
5376
5377 int
5378 main ()
5379 {
5380 /* The GNU C library defines this for functions which it implements
5381     to always fail with ENOSYS.  Some functions are actually named
5382     something starting with __ and the normal name is an alias.  */
5383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5384 choke me
5385 #else
5386 f = $ac_func;
5387 #endif
5388
5389   ;
5390   return 0;
5391 }
5392 _ACEOF
5393 rm -f conftest.$ac_objext conftest$ac_exeext
5394 if { (eval echo "$as_me:5394: \"$ac_link\"") >&5
5395   (eval $ac_link) 2>&5
5396   ac_status=$?
5397   echo "$as_me:5397: \$? = $ac_status" >&5
5398   (exit $ac_status); } &&
5399          { ac_try='test -s conftest$ac_exeext'
5400   { (eval echo "$as_me:5400: \"$ac_try\"") >&5
5401   (eval $ac_try) 2>&5
5402   ac_status=$?
5403   echo "$as_me:5403: \$? = $ac_status" >&5
5404   (exit $ac_status); }; }; then
5405   eval "$as_ac_var=yes"
5406 else
5407   echo "$as_me: failed program was:" >&5
5408 cat conftest.$ac_ext >&5
5409 eval "$as_ac_var=no"
5410 fi
5411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5412 fi
5413 echo "$as_me:5413: result: `eval echo '${'$as_ac_var'}'`" >&5
5414 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5415 if test `eval echo '${'$as_ac_var'}'` = yes; then
5416   cat >>confdefs.h <<EOF
5417 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5418 EOF
5419
5420 fi
5421 done
5422
5423 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5424 if test "${with_libiconv_prefix+set}" = set; then
5425   withval="$with_libiconv_prefix"
5426
5427   case "$withval" in #(vi
5428   no) #(vi
5429       ;;
5430   yes) #(vi
5431       ;;
5432   *)
5433
5434 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
5435         if test -d $cf_searchpath/include; then
5436
5437 if test -n "$cf_searchpath/include" ; then
5438   for cf_add_incdir in $cf_searchpath/include
5439   do
5440         while test $cf_add_incdir != /usr/include
5441         do
5442           if test -d $cf_add_incdir
5443           then
5444                 cf_have_incdir=no
5445                 if test -n "$CFLAGS$CPPFLAGS" ; then
5446                   # a loop is needed to ensure we can add subdirs of existing dirs
5447                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5448                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5449                           cf_have_incdir=yes; break
5450                         fi
5451                   done
5452                 fi
5453
5454                 if test "$cf_have_incdir" = no ; then
5455                   if test "$cf_add_incdir" = /usr/local/include ; then
5456                         if test "$GCC" = yes
5457                         then
5458                           cf_save_CPPFLAGS=$CPPFLAGS
5459                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5460                           cat >conftest.$ac_ext <<_ACEOF
5461 #line 5461 "configure"
5462 #include "confdefs.h"
5463 #include <stdio.h>
5464 int
5465 main ()
5466 {
5467 printf("Hello")
5468   ;
5469   return 0;
5470 }
5471 _ACEOF
5472 rm -f conftest.$ac_objext
5473 if { (eval echo "$as_me:5473: \"$ac_compile\"") >&5
5474   (eval $ac_compile) 2>&5
5475   ac_status=$?
5476   echo "$as_me:5476: \$? = $ac_status" >&5
5477   (exit $ac_status); } &&
5478          { ac_try='test -s conftest.$ac_objext'
5479   { (eval echo "$as_me:5479: \"$ac_try\"") >&5
5480   (eval $ac_try) 2>&5
5481   ac_status=$?
5482   echo "$as_me:5482: \$? = $ac_status" >&5
5483   (exit $ac_status); }; }; then
5484   :
5485 else
5486   echo "$as_me: failed program was:" >&5
5487 cat conftest.$ac_ext >&5
5488 cf_have_incdir=yes
5489 fi
5490 rm -f conftest.$ac_objext conftest.$ac_ext
5491                           CPPFLAGS=$cf_save_CPPFLAGS
5492                         fi
5493                   fi
5494                 fi
5495
5496                 if test "$cf_have_incdir" = no ; then
5497                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5498
5499 echo "${as_me:-configure}:5499: testing adding $cf_add_incdir to include-path ..." 1>&5
5500
5501                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5502
5503                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5504                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5505                   cf_add_incdir="$cf_top_incdir"
5506                 else
5507                   break
5508                 fi
5509           fi
5510         done
5511   done
5512 fi
5513
5514         elif test -d $cf_searchpath/../include ; then
5515
5516 if test -n "$cf_searchpath/../include" ; then
5517   for cf_add_incdir in $cf_searchpath/../include
5518   do
5519         while test $cf_add_incdir != /usr/include
5520         do
5521           if test -d $cf_add_incdir
5522           then
5523                 cf_have_incdir=no
5524                 if test -n "$CFLAGS$CPPFLAGS" ; then
5525                   # a loop is needed to ensure we can add subdirs of existing dirs
5526                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5527                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5528                           cf_have_incdir=yes; break
5529                         fi
5530                   done
5531                 fi
5532
5533                 if test "$cf_have_incdir" = no ; then
5534                   if test "$cf_add_incdir" = /usr/local/include ; then
5535                         if test "$GCC" = yes
5536                         then
5537                           cf_save_CPPFLAGS=$CPPFLAGS
5538                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5539                           cat >conftest.$ac_ext <<_ACEOF
5540 #line 5540 "configure"
5541 #include "confdefs.h"
5542 #include <stdio.h>
5543 int
5544 main ()
5545 {
5546 printf("Hello")
5547   ;
5548   return 0;
5549 }
5550 _ACEOF
5551 rm -f conftest.$ac_objext
5552 if { (eval echo "$as_me:5552: \"$ac_compile\"") >&5
5553   (eval $ac_compile) 2>&5
5554   ac_status=$?
5555   echo "$as_me:5555: \$? = $ac_status" >&5
5556   (exit $ac_status); } &&
5557          { ac_try='test -s conftest.$ac_objext'
5558   { (eval echo "$as_me:5558: \"$ac_try\"") >&5
5559   (eval $ac_try) 2>&5
5560   ac_status=$?
5561   echo "$as_me:5561: \$? = $ac_status" >&5
5562   (exit $ac_status); }; }; then
5563   :
5564 else
5565   echo "$as_me: failed program was:" >&5
5566 cat conftest.$ac_ext >&5
5567 cf_have_incdir=yes
5568 fi
5569 rm -f conftest.$ac_objext conftest.$ac_ext
5570                           CPPFLAGS=$cf_save_CPPFLAGS
5571                         fi
5572                   fi
5573                 fi
5574
5575                 if test "$cf_have_incdir" = no ; then
5576                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5577
5578 echo "${as_me:-configure}:5578: testing adding $cf_add_incdir to include-path ..." 1>&5
5579
5580                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5581
5582                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5583                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5584                   cf_add_incdir="$cf_top_incdir"
5585                 else
5586                   break
5587                 fi
5588           fi
5589         done
5590   done
5591 fi
5592
5593         else
5594 { { echo "$as_me:5594: error: cannot find libiconv under $withval" >&5
5595 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
5596    { (exit 1); exit 1; }; }
5597         fi
5598         if test -d $cf_searchpath/lib; then
5599
5600 if test -n "$cf_searchpath/lib" ; then
5601   for cf_add_libdir in $cf_searchpath/lib
5602   do
5603     if test $cf_add_libdir = /usr/lib ; then
5604       :
5605     elif test -d $cf_add_libdir
5606     then
5607       cf_have_libdir=no
5608       if test -n "$LDFLAGS$LIBS" ; then
5609         # a loop is needed to ensure we can add subdirs of existing dirs
5610         for cf_test_libdir in $LDFLAGS $LIBS ; do
5611           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5612             cf_have_libdir=yes; break
5613           fi
5614         done
5615       fi
5616       if test "$cf_have_libdir" = no ; then
5617         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5618
5619 echo "${as_me:-configure}:5619: testing adding $cf_add_libdir to library-path ..." 1>&5
5620
5621         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5622       fi
5623     fi
5624   done
5625 fi
5626
5627         elif test -d $cf_searchpath ; then
5628
5629 if test -n "$cf_searchpath" ; then
5630   for cf_add_libdir in $cf_searchpath
5631   do
5632     if test $cf_add_libdir = /usr/lib ; then
5633       :
5634     elif test -d $cf_add_libdir
5635     then
5636       cf_have_libdir=no
5637       if test -n "$LDFLAGS$LIBS" ; then
5638         # a loop is needed to ensure we can add subdirs of existing dirs
5639         for cf_test_libdir in $LDFLAGS $LIBS ; do
5640           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5641             cf_have_libdir=yes; break
5642           fi
5643         done
5644       fi
5645       if test "$cf_have_libdir" = no ; then
5646         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5647
5648 echo "${as_me:-configure}:5648: testing adding $cf_add_libdir to library-path ..." 1>&5
5649
5650         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5651       fi
5652     fi
5653   done
5654 fi
5655
5656         else
5657 { { echo "$as_me:5657: error: cannot find libiconv under $withval" >&5
5658 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
5659    { (exit 1); exit 1; }; }
5660         fi
5661 done
5662
5663       ;;
5664   esac
5665
5666 fi;
5667
5668   echo "$as_me:5668: checking for iconv" >&5
5669 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
5670 if test "${am_cv_func_iconv+set}" = set; then
5671   echo $ECHO_N "(cached) $ECHO_C" >&6
5672 else
5673
5674 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5675 # will be set on completion of the AC_TRY_LINK below.
5676 cf_cv_header_path_iconv=
5677 cf_cv_library_path_iconv=
5678
5679 echo "${as_me:-configure}:5679: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
5680
5681 cf_save_LIBS="$LIBS"
5682
5683 cat >conftest.$ac_ext <<_ACEOF
5684 #line 5684 "configure"
5685 #include "confdefs.h"
5686
5687 #include <stdlib.h>
5688 #include <iconv.h>
5689
5690 int
5691 main ()
5692 {
5693
5694         iconv_t cd = iconv_open("","");
5695         iconv(cd,NULL,NULL,NULL,NULL);
5696         iconv_close(cd);
5697
5698   ;
5699   return 0;
5700 }
5701 _ACEOF
5702 rm -f conftest.$ac_objext conftest$ac_exeext
5703 if { (eval echo "$as_me:5703: \"$ac_link\"") >&5
5704   (eval $ac_link) 2>&5
5705   ac_status=$?
5706   echo "$as_me:5706: \$? = $ac_status" >&5
5707   (exit $ac_status); } &&
5708          { ac_try='test -s conftest$ac_exeext'
5709   { (eval echo "$as_me:5709: \"$ac_try\"") >&5
5710   (eval $ac_try) 2>&5
5711   ac_status=$?
5712   echo "$as_me:5712: \$? = $ac_status" >&5
5713   (exit $ac_status); }; }; then
5714
5715         cf_cv_find_linkage_iconv=yes
5716         cf_cv_header_path_iconv=/usr/include
5717         cf_cv_library_path_iconv=/usr/lib
5718
5719 else
5720   echo "$as_me: failed program was:" >&5
5721 cat conftest.$ac_ext >&5
5722
5723 LIBS="-liconv  $cf_save_LIBS"
5724
5725 cat >conftest.$ac_ext <<_ACEOF
5726 #line 5726 "configure"
5727 #include "confdefs.h"
5728
5729 #include <stdlib.h>
5730 #include <iconv.h>
5731
5732 int
5733 main ()
5734 {
5735
5736         iconv_t cd = iconv_open("","");
5737         iconv(cd,NULL,NULL,NULL,NULL);
5738         iconv_close(cd);
5739
5740   ;
5741   return 0;
5742 }
5743 _ACEOF
5744 rm -f conftest.$ac_objext conftest$ac_exeext
5745 if { (eval echo "$as_me:5745: \"$ac_link\"") >&5
5746   (eval $ac_link) 2>&5
5747   ac_status=$?
5748   echo "$as_me:5748: \$? = $ac_status" >&5
5749   (exit $ac_status); } &&
5750          { ac_try='test -s conftest$ac_exeext'
5751   { (eval echo "$as_me:5751: \"$ac_try\"") >&5
5752   (eval $ac_try) 2>&5
5753   ac_status=$?
5754   echo "$as_me:5754: \$? = $ac_status" >&5
5755   (exit $ac_status); }; }; then
5756
5757         cf_cv_find_linkage_iconv=yes
5758         cf_cv_header_path_iconv=/usr/include
5759         cf_cv_library_path_iconv=/usr/lib
5760         cf_cv_library_file_iconv="-liconv"
5761
5762 else
5763   echo "$as_me: failed program was:" >&5
5764 cat conftest.$ac_ext >&5
5765
5766         cf_cv_find_linkage_iconv=no
5767         LIBS="$cf_save_LIBS"
5768
5769     test -n "$verbose" && echo "        find linkage for iconv library" 1>&6
5770
5771 echo "${as_me:-configure}:5771: testing find linkage for iconv library ..." 1>&5
5772
5773 echo "${as_me:-configure}:5773: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
5774
5775     cf_save_CPPFLAGS="$CPPFLAGS"
5776     cf_test_CPPFLAGS="$CPPFLAGS"
5777
5778 cf_search=
5779
5780 # collect the current set of include-directories from compiler flags
5781 cf_header_path_list=""
5782 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5783         for cf_header_path in $CPPFLAGS $CFLAGS
5784         do
5785                 case $cf_header_path in #(vi
5786                 -I*)
5787                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5788
5789 test "$cf_header_path" != "NONE" && \
5790 test -d "$cf_header_path" && \
5791  {
5792         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
5793         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
5794         test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
5795         test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
5796         test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
5797         test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
5798 }
5799
5800                         cf_header_path_list="$cf_header_path_list $cf_search"
5801                         ;;
5802                 esac
5803         done
5804 fi
5805
5806 # add the variations for the package we are looking for
5807
5808 cf_search=
5809
5810 test "/usr" != "$prefix" && \
5811 test -d "/usr" && \
5812 (test $prefix = NONE || test "/usr" != "$prefix") && {
5813         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
5814         test -d /usr/include &&          cf_search="$cf_search /usr/include"
5815         test -d /usr/include/iconv &&       cf_search="$cf_search /usr/include/iconv"
5816         test -d /usr/include/iconv/include &&    cf_search="$cf_search /usr/include/iconv/include"
5817         test -d /usr/iconv/include &&       cf_search="$cf_search /usr/iconv/include"
5818         test -d /usr/iconv/include/iconv &&    cf_search="$cf_search /usr/iconv/include/iconv"
5819 }
5820
5821 test "$prefix" != "NONE" && \
5822 test -d "$prefix" && \
5823  {
5824         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
5825         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
5826         test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
5827         test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
5828         test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
5829         test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
5830 }
5831
5832 test "/usr/local" != "$prefix" && \
5833 test -d "/usr/local" && \
5834 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5835         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
5836         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
5837         test -d /usr/local/include/iconv &&       cf_search="$cf_search /usr/local/include/iconv"
5838         test -d /usr/local/include/iconv/include &&    cf_search="$cf_search /usr/local/include/iconv/include"
5839         test -d /usr/local/iconv/include &&       cf_search="$cf_search /usr/local/iconv/include"
5840         test -d /usr/local/iconv/include/iconv &&    cf_search="$cf_search /usr/local/iconv/include/iconv"
5841 }
5842
5843 test "/opt" != "$prefix" && \
5844 test -d "/opt" && \
5845 (test $prefix = NONE || test "/opt" != "$prefix") && {
5846         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
5847         test -d /opt/include &&          cf_search="$cf_search /opt/include"
5848         test -d /opt/include/iconv &&       cf_search="$cf_search /opt/include/iconv"
5849         test -d /opt/include/iconv/include &&    cf_search="$cf_search /opt/include/iconv/include"
5850         test -d /opt/iconv/include &&       cf_search="$cf_search /opt/iconv/include"
5851         test -d /opt/iconv/include/iconv &&    cf_search="$cf_search /opt/iconv/include/iconv"
5852 }
5853
5854 test "$HOME" != "$prefix" && \
5855 test -d "$HOME" && \
5856 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5857         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
5858         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
5859         test -d $HOME/include/iconv &&       cf_search="$cf_search $HOME/include/iconv"
5860         test -d $HOME/include/iconv/include &&    cf_search="$cf_search $HOME/include/iconv/include"
5861         test -d $HOME/iconv/include &&       cf_search="$cf_search $HOME/iconv/include"
5862         test -d $HOME/iconv/include/iconv &&    cf_search="$cf_search $HOME/iconv/include/iconv"
5863 }
5864
5865 test "$includedir" != NONE && \
5866 test "$includedir" != "/usr/include" && \
5867 test -d "$includedir" && {
5868         test -d $includedir &&    cf_search="$cf_search $includedir"
5869         test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
5870 }
5871
5872 test "$oldincludedir" != NONE && \
5873 test "$oldincludedir" != "/usr/include" && \
5874 test -d "$oldincludedir" && {
5875         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5876         test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
5877 }
5878
5879 cf_search="$cf_search $cf_header_path_list"
5880
5881     for cf_cv_header_path_iconv in $cf_search
5882     do
5883       if test -d $cf_cv_header_path_iconv ; then
5884         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_iconv" 1>&6
5885
5886 echo "${as_me:-configure}:5886: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
5887
5888         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
5889         cat >conftest.$ac_ext <<_ACEOF
5890 #line 5890 "configure"
5891 #include "confdefs.h"
5892
5893 #include <stdlib.h>
5894 #include <iconv.h>
5895
5896 int
5897 main ()
5898 {
5899
5900         iconv_t cd = iconv_open("","");
5901         iconv(cd,NULL,NULL,NULL,NULL);
5902         iconv_close(cd);
5903
5904   ;
5905   return 0;
5906 }
5907 _ACEOF
5908 rm -f conftest.$ac_objext
5909 if { (eval echo "$as_me:5909: \"$ac_compile\"") >&5
5910   (eval $ac_compile) 2>&5
5911   ac_status=$?
5912   echo "$as_me:5912: \$? = $ac_status" >&5
5913   (exit $ac_status); } &&
5914          { ac_try='test -s conftest.$ac_objext'
5915   { (eval echo "$as_me:5915: \"$ac_try\"") >&5
5916   (eval $ac_try) 2>&5
5917   ac_status=$?
5918   echo "$as_me:5918: \$? = $ac_status" >&5
5919   (exit $ac_status); }; }; then
5920
5921             test -n "$verbose" && echo "        ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
5922
5923 echo "${as_me:-configure}:5923: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
5924
5925             cf_cv_find_linkage_iconv=maybe
5926             cf_test_CPPFLAGS="$CPPFLAGS"
5927             break
5928 else
5929   echo "$as_me: failed program was:" >&5
5930 cat conftest.$ac_ext >&5
5931
5932             CPPFLAGS="$cf_save_CPPFLAGS"
5933
5934 fi
5935 rm -f conftest.$ac_objext conftest.$ac_ext
5936       fi
5937     done
5938
5939     if test "$cf_cv_find_linkage_iconv" = maybe ; then
5940
5941 echo "${as_me:-configure}:5941: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
5942
5943       cf_save_LIBS="$LIBS"
5944       cf_save_LDFLAGS="$LDFLAGS"
5945
5946       if test "$cf_cv_find_linkage_iconv" != yes ; then
5947
5948 cf_search=
5949 cf_library_path_list=""
5950 if test -n "${LDFLAGS}${LIBS}" ; then
5951         for cf_library_path in $LDFLAGS $LIBS
5952         do
5953                 case $cf_library_path in #(vi
5954                 -L*)
5955                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5956
5957 test "$cf_library_path" != "NONE" && \
5958 test -d "$cf_library_path" && \
5959  {
5960         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5961         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5962         test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
5963         test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
5964         test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
5965         test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
5966 }
5967
5968                         cf_library_path_list="$cf_library_path_list $cf_search"
5969                         ;;
5970                 esac
5971         done
5972 fi
5973
5974 cf_search=
5975
5976 test "/usr" != "$prefix" && \
5977 test -d "/usr" && \
5978 (test $prefix = NONE || test "/usr" != "$prefix") && {
5979         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5980         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5981         test -d /usr/lib/iconv &&       cf_search="$cf_search /usr/lib/iconv"
5982         test -d /usr/lib/iconv/lib &&    cf_search="$cf_search /usr/lib/iconv/lib"
5983         test -d /usr/iconv/lib &&       cf_search="$cf_search /usr/iconv/lib"
5984         test -d /usr/iconv/lib/iconv &&    cf_search="$cf_search /usr/iconv/lib/iconv"
5985 }
5986
5987 test "$prefix" != "NONE" && \
5988 test -d "$prefix" && \
5989  {
5990         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5991         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5992         test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
5993         test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
5994         test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
5995         test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
5996 }
5997
5998 test "/usr/local" != "$prefix" && \
5999 test -d "/usr/local" && \
6000 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6001         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6002         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6003         test -d /usr/local/lib/iconv &&       cf_search="$cf_search /usr/local/lib/iconv"
6004         test -d /usr/local/lib/iconv/lib &&    cf_search="$cf_search /usr/local/lib/iconv/lib"
6005         test -d /usr/local/iconv/lib &&       cf_search="$cf_search /usr/local/iconv/lib"
6006         test -d /usr/local/iconv/lib/iconv &&    cf_search="$cf_search /usr/local/iconv/lib/iconv"
6007 }
6008
6009 test "/opt" != "$prefix" && \
6010 test -d "/opt" && \
6011 (test $prefix = NONE || test "/opt" != "$prefix") && {
6012         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6013         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6014         test -d /opt/lib/iconv &&       cf_search="$cf_search /opt/lib/iconv"
6015         test -d /opt/lib/iconv/lib &&    cf_search="$cf_search /opt/lib/iconv/lib"
6016         test -d /opt/iconv/lib &&       cf_search="$cf_search /opt/iconv/lib"
6017         test -d /opt/iconv/lib/iconv &&    cf_search="$cf_search /opt/iconv/lib/iconv"
6018 }
6019
6020 test "$HOME" != "$prefix" && \
6021 test -d "$HOME" && \
6022 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6023         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6024         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6025         test -d $HOME/lib/iconv &&       cf_search="$cf_search $HOME/lib/iconv"
6026         test -d $HOME/lib/iconv/lib &&    cf_search="$cf_search $HOME/lib/iconv/lib"
6027         test -d $HOME/iconv/lib &&       cf_search="$cf_search $HOME/iconv/lib"
6028         test -d $HOME/iconv/lib/iconv &&    cf_search="$cf_search $HOME/iconv/lib/iconv"
6029 }
6030
6031 cf_search="$cf_library_path_list $cf_search"
6032
6033         for cf_cv_library_path_iconv in $cf_search
6034         do
6035           if test -d $cf_cv_library_path_iconv ; then
6036             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_iconv" 1>&6
6037
6038 echo "${as_me:-configure}:6038: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
6039
6040             CPPFLAGS="$cf_test_CPPFLAGS"
6041             LIBS="-liconv  $cf_save_LIBS"
6042             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
6043             cat >conftest.$ac_ext <<_ACEOF
6044 #line 6044 "configure"
6045 #include "confdefs.h"
6046
6047 #include <stdlib.h>
6048 #include <iconv.h>
6049
6050 int
6051 main ()
6052 {
6053
6054         iconv_t cd = iconv_open("","");
6055         iconv(cd,NULL,NULL,NULL,NULL);
6056         iconv_close(cd);
6057
6058   ;
6059   return 0;
6060 }
6061 _ACEOF
6062 rm -f conftest.$ac_objext conftest$ac_exeext
6063 if { (eval echo "$as_me:6063: \"$ac_link\"") >&5
6064   (eval $ac_link) 2>&5
6065   ac_status=$?
6066   echo "$as_me:6066: \$? = $ac_status" >&5
6067   (exit $ac_status); } &&
6068          { ac_try='test -s conftest$ac_exeext'
6069   { (eval echo "$as_me:6069: \"$ac_try\"") >&5
6070   (eval $ac_try) 2>&5
6071   ac_status=$?
6072   echo "$as_me:6072: \$? = $ac_status" >&5
6073   (exit $ac_status); }; }; then
6074
6075                 test -n "$verbose" && echo "    ... found iconv library in $cf_cv_library_path_iconv" 1>&6
6076
6077 echo "${as_me:-configure}:6077: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
6078
6079                 cf_cv_find_linkage_iconv=yes
6080                 cf_cv_library_file_iconv="-liconv"
6081                 break
6082 else
6083   echo "$as_me: failed program was:" >&5
6084 cat conftest.$ac_ext >&5
6085
6086                 CPPFLAGS="$cf_save_CPPFLAGS"
6087                 LIBS="$cf_save_LIBS"
6088                 LDFLAGS="$cf_save_LDFLAGS"
6089
6090 fi
6091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6092           fi
6093         done
6094         CPPFLAGS="$cf_save_CPPFLAGS"
6095         LDFLAGS="$cf_save_LDFLAGS"
6096       fi
6097
6098     else
6099       cf_cv_find_linkage_iconv=no
6100     fi
6101
6102 fi
6103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6104
6105 fi
6106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6107
6108 LIBS="$cf_save_LIBS"
6109
6110 if test "$cf_cv_find_linkage_iconv" = yes ; then
6111 am_cv_func_iconv=yes
6112 else
6113 am_cv_func_iconv="no, consider installing GNU libiconv"
6114 fi
6115
6116 fi
6117 echo "$as_me:6117: result: $am_cv_func_iconv" >&5
6118 echo "${ECHO_T}$am_cv_func_iconv" >&6
6119
6120   if test "$am_cv_func_iconv" = yes; then
6121
6122 cat >>confdefs.h <<\EOF
6123 #define HAVE_ICONV 1
6124 EOF
6125
6126     echo "$as_me:6126: checking if the declaration of iconv() needs const." >&5
6127 echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
6128 if test "${am_cv_proto_iconv_const+set}" = set; then
6129   echo $ECHO_N "(cached) $ECHO_C" >&6
6130 else
6131
6132       cat >conftest.$ac_ext <<_ACEOF
6133 #line 6133 "configure"
6134 #include "confdefs.h"
6135
6136 #include <stdlib.h>
6137 #include <iconv.h>
6138
6139 extern
6140 #ifdef __cplusplus
6141 "C"
6142 #endif
6143 #if defined(__STDC__) || defined(__cplusplus)
6144 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6145 #else
6146 size_t iconv();
6147 #endif
6148
6149 int
6150 main ()
6151 {
6152
6153   ;
6154   return 0;
6155 }
6156 _ACEOF
6157 rm -f conftest.$ac_objext
6158 if { (eval echo "$as_me:6158: \"$ac_compile\"") >&5
6159   (eval $ac_compile) 2>&5
6160   ac_status=$?
6161   echo "$as_me:6161: \$? = $ac_status" >&5
6162   (exit $ac_status); } &&
6163          { ac_try='test -s conftest.$ac_objext'
6164   { (eval echo "$as_me:6164: \"$ac_try\"") >&5
6165   (eval $ac_try) 2>&5
6166   ac_status=$?
6167   echo "$as_me:6167: \$? = $ac_status" >&5
6168   (exit $ac_status); }; }; then
6169   am_cv_proto_iconv_const=no
6170 else
6171   echo "$as_me: failed program was:" >&5
6172 cat conftest.$ac_ext >&5
6173 am_cv_proto_iconv_const=yes
6174 fi
6175 rm -f conftest.$ac_objext conftest.$ac_ext
6176 fi
6177 echo "$as_me:6177: result: $am_cv_proto_iconv_const" >&5
6178 echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
6179
6180     if test "$am_cv_proto_iconv_const" = yes ; then
6181       am_cv_proto_iconv_arg1="const"
6182     else
6183       am_cv_proto_iconv_arg1=""
6184     fi
6185
6186 cat >>confdefs.h <<EOF
6187 #define ICONV_CONST $am_cv_proto_iconv_arg1
6188 EOF
6189
6190   fi
6191
6192   LIBICONV=
6193   if test "$cf_cv_find_linkage_iconv" = yes; then
6194
6195 if test -n "$cf_cv_header_path_iconv" ; then
6196   for cf_add_incdir in $cf_cv_header_path_iconv
6197   do
6198         while test $cf_add_incdir != /usr/include
6199         do
6200           if test -d $cf_add_incdir
6201           then
6202                 cf_have_incdir=no
6203                 if test -n "$CFLAGS$CPPFLAGS" ; then
6204                   # a loop is needed to ensure we can add subdirs of existing dirs
6205                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6206                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6207                           cf_have_incdir=yes; break
6208                         fi
6209                   done
6210                 fi
6211
6212                 if test "$cf_have_incdir" = no ; then
6213                   if test "$cf_add_incdir" = /usr/local/include ; then
6214                         if test "$GCC" = yes
6215                         then
6216                           cf_save_CPPFLAGS=$CPPFLAGS
6217                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6218                           cat >conftest.$ac_ext <<_ACEOF
6219 #line 6219 "configure"
6220 #include "confdefs.h"
6221 #include <stdio.h>
6222 int
6223 main ()
6224 {
6225 printf("Hello")
6226   ;
6227   return 0;
6228 }
6229 _ACEOF
6230 rm -f conftest.$ac_objext
6231 if { (eval echo "$as_me:6231: \"$ac_compile\"") >&5
6232   (eval $ac_compile) 2>&5
6233   ac_status=$?
6234   echo "$as_me:6234: \$? = $ac_status" >&5
6235   (exit $ac_status); } &&
6236          { ac_try='test -s conftest.$ac_objext'
6237   { (eval echo "$as_me:6237: \"$ac_try\"") >&5
6238   (eval $ac_try) 2>&5
6239   ac_status=$?
6240   echo "$as_me:6240: \$? = $ac_status" >&5
6241   (exit $ac_status); }; }; then
6242   :
6243 else
6244   echo "$as_me: failed program was:" >&5
6245 cat conftest.$ac_ext >&5
6246 cf_have_incdir=yes
6247 fi
6248 rm -f conftest.$ac_objext conftest.$ac_ext
6249                           CPPFLAGS=$cf_save_CPPFLAGS
6250                         fi
6251                   fi
6252                 fi
6253
6254                 if test "$cf_have_incdir" = no ; then
6255                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6256
6257 echo "${as_me:-configure}:6257: testing adding $cf_add_incdir to include-path ..." 1>&5
6258
6259                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6260
6261                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6262                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6263                   cf_add_incdir="$cf_top_incdir"
6264                 else
6265                   break
6266                 fi
6267           fi
6268         done
6269   done
6270 fi
6271
6272     if test -n "$cf_cv_library_file_iconv" ; then
6273       LIBICONV="-liconv"
6274
6275 if test -n "$cf_cv_library_path_iconv" ; then
6276   for cf_add_libdir in $cf_cv_library_path_iconv
6277   do
6278     if test $cf_add_libdir = /usr/lib ; then
6279       :
6280     elif test -d $cf_add_libdir
6281     then
6282       cf_have_libdir=no
6283       if test -n "$LDFLAGS$LIBS" ; then
6284         # a loop is needed to ensure we can add subdirs of existing dirs
6285         for cf_test_libdir in $LDFLAGS $LIBS ; do
6286           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6287             cf_have_libdir=yes; break
6288           fi
6289         done
6290       fi
6291       if test "$cf_have_libdir" = no ; then
6292         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing adding $cf_add_libdir to library-path ..." 1>&5
6295
6296         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6297       fi
6298     fi
6299   done
6300 fi
6301
6302     fi
6303   fi
6304
6305   echo "$as_me:6305: checking for nl_langinfo and CODESET" >&5
6306 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6307 if test "${am_cv_langinfo_codeset+set}" = set; then
6308   echo $ECHO_N "(cached) $ECHO_C" >&6
6309 else
6310   cat >conftest.$ac_ext <<_ACEOF
6311 #line 6311 "configure"
6312 #include "confdefs.h"
6313 #include <langinfo.h>
6314 int
6315 main ()
6316 {
6317 char* cs = nl_langinfo(CODESET);
6318   ;
6319   return 0;
6320 }
6321 _ACEOF
6322 rm -f conftest.$ac_objext conftest$ac_exeext
6323 if { (eval echo "$as_me:6323: \"$ac_link\"") >&5
6324   (eval $ac_link) 2>&5
6325   ac_status=$?
6326   echo "$as_me:6326: \$? = $ac_status" >&5
6327   (exit $ac_status); } &&
6328          { ac_try='test -s conftest$ac_exeext'
6329   { (eval echo "$as_me:6329: \"$ac_try\"") >&5
6330   (eval $ac_try) 2>&5
6331   ac_status=$?
6332   echo "$as_me:6332: \$? = $ac_status" >&5
6333   (exit $ac_status); }; }; then
6334   am_cv_langinfo_codeset=yes
6335 else
6336   echo "$as_me: failed program was:" >&5
6337 cat conftest.$ac_ext >&5
6338 am_cv_langinfo_codeset=no
6339 fi
6340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6341
6342 fi
6343 echo "$as_me:6343: result: $am_cv_langinfo_codeset" >&5
6344 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6345   if test $am_cv_langinfo_codeset = yes; then
6346
6347 cat >>confdefs.h <<\EOF
6348 #define HAVE_LANGINFO_CODESET 1
6349 EOF
6350
6351   fi
6352
6353    if test $ac_cv_header_locale_h = yes; then
6354     echo "$as_me:6354: checking for LC_MESSAGES" >&5
6355 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
6356 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
6357   echo $ECHO_N "(cached) $ECHO_C" >&6
6358 else
6359   cat >conftest.$ac_ext <<_ACEOF
6360 #line 6360 "configure"
6361 #include "confdefs.h"
6362 #include <locale.h>
6363 int
6364 main ()
6365 {
6366 return LC_MESSAGES
6367   ;
6368   return 0;
6369 }
6370 _ACEOF
6371 rm -f conftest.$ac_objext conftest$ac_exeext
6372 if { (eval echo "$as_me:6372: \"$ac_link\"") >&5
6373   (eval $ac_link) 2>&5
6374   ac_status=$?
6375   echo "$as_me:6375: \$? = $ac_status" >&5
6376   (exit $ac_status); } &&
6377          { ac_try='test -s conftest$ac_exeext'
6378   { (eval echo "$as_me:6378: \"$ac_try\"") >&5
6379   (eval $ac_try) 2>&5
6380   ac_status=$?
6381   echo "$as_me:6381: \$? = $ac_status" >&5
6382   (exit $ac_status); }; }; then
6383   am_cv_val_LC_MESSAGES=yes
6384 else
6385   echo "$as_me: failed program was:" >&5
6386 cat conftest.$ac_ext >&5
6387 am_cv_val_LC_MESSAGES=no
6388 fi
6389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6390 fi
6391 echo "$as_me:6391: result: $am_cv_val_LC_MESSAGES" >&5
6392 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
6393     if test $am_cv_val_LC_MESSAGES = yes; then
6394
6395 cat >>confdefs.h <<\EOF
6396 #define HAVE_LC_MESSAGES 1
6397 EOF
6398
6399     fi
6400   fi
6401    echo "$as_me:6401: checking whether NLS is requested" >&5
6402 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
6403
6404 # Check whether --enable-nls or --disable-nls was given.
6405 if test "${enable_nls+set}" = set; then
6406   enableval="$enable_nls"
6407   USE_NLS=$enableval
6408 else
6409   USE_NLS=no
6410 fi;
6411   echo "$as_me:6411: result: $USE_NLS" >&5
6412 echo "${ECHO_T}$USE_NLS" >&6
6413
6414   BUILD_INCLUDED_LIBINTL=no
6415   USE_INCLUDED_LIBINTL=no
6416   INTLLIBS=
6417
6418     if test "$USE_NLS" = "yes"; then
6419
6420 cat >>confdefs.h <<\EOF
6421 #define ENABLE_NLS 1
6422 EOF
6423
6424     echo "$as_me:6424: checking whether included gettext is requested" >&5
6425 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
6426
6427 # Check whether --with-included-gettext or --without-included-gettext was given.
6428 if test "${with_included_gettext+set}" = set; then
6429   withval="$with_included_gettext"
6430   nls_cv_force_use_gnu_gettext=$withval
6431 else
6432   nls_cv_force_use_gnu_gettext=no
6433 fi;
6434     echo "$as_me:6434: result: $nls_cv_force_use_gnu_gettext" >&5
6435 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
6436
6437     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
6438     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
6439                         CATOBJEXT=NONE
6440
6441       cf_save_LIBS_1="$LIBS"
6442       LIBS="$LIBICONV $LIBS"
6443       echo "$as_me:6443: checking for libintl.h and gettext()" >&5
6444 echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
6445 if test "${cf_cv_func_gettext+set}" = set; then
6446   echo $ECHO_N "(cached) $ECHO_C" >&6
6447 else
6448
6449 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6450 # will be set on completion of the AC_TRY_LINK below.
6451 cf_cv_header_path_intl=
6452 cf_cv_library_path_intl=
6453
6454 echo "${as_me:-configure}:6454: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
6455
6456 cf_save_LIBS="$LIBS"
6457
6458 cat >conftest.$ac_ext <<_ACEOF
6459 #line 6459 "configure"
6460 #include "confdefs.h"
6461
6462 #include <libintl.h>
6463 extern int _nl_msg_cat_cntr;
6464
6465 int
6466 main ()
6467 {
6468
6469     bindtextdomain ("", "");
6470     return (int) gettext ("")
6471
6472              + _nl_msg_cat_cntr
6473
6474   ;
6475   return 0;
6476 }
6477 _ACEOF
6478 rm -f conftest.$ac_objext conftest$ac_exeext
6479 if { (eval echo "$as_me:6479: \"$ac_link\"") >&5
6480   (eval $ac_link) 2>&5
6481   ac_status=$?
6482   echo "$as_me:6482: \$? = $ac_status" >&5
6483   (exit $ac_status); } &&
6484          { ac_try='test -s conftest$ac_exeext'
6485   { (eval echo "$as_me:6485: \"$ac_try\"") >&5
6486   (eval $ac_try) 2>&5
6487   ac_status=$?
6488   echo "$as_me:6488: \$? = $ac_status" >&5
6489   (exit $ac_status); }; }; then
6490
6491         cf_cv_find_linkage_intl=yes
6492         cf_cv_header_path_intl=/usr/include
6493         cf_cv_library_path_intl=/usr/lib
6494
6495 else
6496   echo "$as_me: failed program was:" >&5
6497 cat conftest.$ac_ext >&5
6498
6499 LIBS="-lintl  $cf_save_LIBS"
6500
6501 cat >conftest.$ac_ext <<_ACEOF
6502 #line 6502 "configure"
6503 #include "confdefs.h"
6504
6505 #include <libintl.h>
6506 extern int _nl_msg_cat_cntr;
6507
6508 int
6509 main ()
6510 {
6511
6512     bindtextdomain ("", "");
6513     return (int) gettext ("")
6514
6515              + _nl_msg_cat_cntr
6516
6517   ;
6518   return 0;
6519 }
6520 _ACEOF
6521 rm -f conftest.$ac_objext conftest$ac_exeext
6522 if { (eval echo "$as_me:6522: \"$ac_link\"") >&5
6523   (eval $ac_link) 2>&5
6524   ac_status=$?
6525   echo "$as_me:6525: \$? = $ac_status" >&5
6526   (exit $ac_status); } &&
6527          { ac_try='test -s conftest$ac_exeext'
6528   { (eval echo "$as_me:6528: \"$ac_try\"") >&5
6529   (eval $ac_try) 2>&5
6530   ac_status=$?
6531   echo "$as_me:6531: \$? = $ac_status" >&5
6532   (exit $ac_status); }; }; then
6533
6534         cf_cv_find_linkage_intl=yes
6535         cf_cv_header_path_intl=/usr/include
6536         cf_cv_library_path_intl=/usr/lib
6537         cf_cv_library_file_intl="-lintl"
6538
6539 else
6540   echo "$as_me: failed program was:" >&5
6541 cat conftest.$ac_ext >&5
6542
6543         cf_cv_find_linkage_intl=no
6544         LIBS="$cf_save_LIBS"
6545
6546     test -n "$verbose" && echo "        find linkage for intl library" 1>&6
6547
6548 echo "${as_me:-configure}:6548: testing find linkage for intl library ..." 1>&5
6549
6550 echo "${as_me:-configure}:6550: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
6551
6552     cf_save_CPPFLAGS="$CPPFLAGS"
6553     cf_test_CPPFLAGS="$CPPFLAGS"
6554
6555 cf_search=
6556
6557 # collect the current set of include-directories from compiler flags
6558 cf_header_path_list=""
6559 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6560         for cf_header_path in $CPPFLAGS $CFLAGS
6561         do
6562                 case $cf_header_path in #(vi
6563                 -I*)
6564                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6565
6566 test "$cf_header_path" != "NONE" && \
6567 test -d "$cf_header_path" && \
6568  {
6569         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6570         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6571         test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
6572         test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
6573         test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
6574         test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
6575 }
6576
6577                         cf_header_path_list="$cf_header_path_list $cf_search"
6578                         ;;
6579                 esac
6580         done
6581 fi
6582
6583 # add the variations for the package we are looking for
6584
6585 cf_search=
6586
6587 test "/usr" != "$prefix" && \
6588 test -d "/usr" && \
6589 (test $prefix = NONE || test "/usr" != "$prefix") && {
6590         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6591         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6592         test -d /usr/include/intl &&       cf_search="$cf_search /usr/include/intl"
6593         test -d /usr/include/intl/include &&    cf_search="$cf_search /usr/include/intl/include"
6594         test -d /usr/intl/include &&       cf_search="$cf_search /usr/intl/include"
6595         test -d /usr/intl/include/intl &&    cf_search="$cf_search /usr/intl/include/intl"
6596 }
6597
6598 test "$prefix" != "NONE" && \
6599 test -d "$prefix" && \
6600  {
6601         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6602         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6603         test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
6604         test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
6605         test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
6606         test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
6607 }
6608
6609 test "/usr/local" != "$prefix" && \
6610 test -d "/usr/local" && \
6611 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6612         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6613         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6614         test -d /usr/local/include/intl &&       cf_search="$cf_search /usr/local/include/intl"
6615         test -d /usr/local/include/intl/include &&    cf_search="$cf_search /usr/local/include/intl/include"
6616         test -d /usr/local/intl/include &&       cf_search="$cf_search /usr/local/intl/include"
6617         test -d /usr/local/intl/include/intl &&    cf_search="$cf_search /usr/local/intl/include/intl"
6618 }
6619
6620 test "/opt" != "$prefix" && \
6621 test -d "/opt" && \
6622 (test $prefix = NONE || test "/opt" != "$prefix") && {
6623         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6624         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6625         test -d /opt/include/intl &&       cf_search="$cf_search /opt/include/intl"
6626         test -d /opt/include/intl/include &&    cf_search="$cf_search /opt/include/intl/include"
6627         test -d /opt/intl/include &&       cf_search="$cf_search /opt/intl/include"
6628         test -d /opt/intl/include/intl &&    cf_search="$cf_search /opt/intl/include/intl"
6629 }
6630
6631 test "$HOME" != "$prefix" && \
6632 test -d "$HOME" && \
6633 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6634         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6635         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6636         test -d $HOME/include/intl &&       cf_search="$cf_search $HOME/include/intl"
6637         test -d $HOME/include/intl/include &&    cf_search="$cf_search $HOME/include/intl/include"
6638         test -d $HOME/intl/include &&       cf_search="$cf_search $HOME/intl/include"
6639         test -d $HOME/intl/include/intl &&    cf_search="$cf_search $HOME/intl/include/intl"
6640 }
6641
6642 test "$includedir" != NONE && \
6643 test "$includedir" != "/usr/include" && \
6644 test -d "$includedir" && {
6645         test -d $includedir &&    cf_search="$cf_search $includedir"
6646         test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
6647 }
6648
6649 test "$oldincludedir" != NONE && \
6650 test "$oldincludedir" != "/usr/include" && \
6651 test -d "$oldincludedir" && {
6652         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6653         test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
6654 }
6655
6656 cf_search="$cf_search $cf_header_path_list"
6657
6658     for cf_cv_header_path_intl in $cf_search
6659     do
6660       if test -d $cf_cv_header_path_intl ; then
6661         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_intl" 1>&6
6662
6663 echo "${as_me:-configure}:6663: testing ... testing $cf_cv_header_path_intl ..." 1>&5
6664
6665         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
6666         cat >conftest.$ac_ext <<_ACEOF
6667 #line 6667 "configure"
6668 #include "confdefs.h"
6669
6670 #include <libintl.h>
6671 extern int _nl_msg_cat_cntr;
6672
6673 int
6674 main ()
6675 {
6676
6677     bindtextdomain ("", "");
6678     return (int) gettext ("")
6679
6680              + _nl_msg_cat_cntr
6681
6682   ;
6683   return 0;
6684 }
6685 _ACEOF
6686 rm -f conftest.$ac_objext
6687 if { (eval echo "$as_me:6687: \"$ac_compile\"") >&5
6688   (eval $ac_compile) 2>&5
6689   ac_status=$?
6690   echo "$as_me:6690: \$? = $ac_status" >&5
6691   (exit $ac_status); } &&
6692          { ac_try='test -s conftest.$ac_objext'
6693   { (eval echo "$as_me:6693: \"$ac_try\"") >&5
6694   (eval $ac_try) 2>&5
6695   ac_status=$?
6696   echo "$as_me:6696: \$? = $ac_status" >&5
6697   (exit $ac_status); }; }; then
6698
6699             test -n "$verbose" && echo "        ... found intl headers in $cf_cv_header_path_intl" 1>&6
6700
6701 echo "${as_me:-configure}:6701: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
6702
6703             cf_cv_find_linkage_intl=maybe
6704             cf_test_CPPFLAGS="$CPPFLAGS"
6705             break
6706 else
6707   echo "$as_me: failed program was:" >&5
6708 cat conftest.$ac_ext >&5
6709
6710             CPPFLAGS="$cf_save_CPPFLAGS"
6711
6712 fi
6713 rm -f conftest.$ac_objext conftest.$ac_ext
6714       fi
6715     done
6716
6717     if test "$cf_cv_find_linkage_intl" = maybe ; then
6718
6719 echo "${as_me:-configure}:6719: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
6720
6721       cf_save_LIBS="$LIBS"
6722       cf_save_LDFLAGS="$LDFLAGS"
6723
6724       if test "$cf_cv_find_linkage_intl" != yes ; then
6725
6726 cf_search=
6727 cf_library_path_list=""
6728 if test -n "${LDFLAGS}${LIBS}" ; then
6729         for cf_library_path in $LDFLAGS $LIBS
6730         do
6731                 case $cf_library_path in #(vi
6732                 -L*)
6733                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6734
6735 test "$cf_library_path" != "NONE" && \
6736 test -d "$cf_library_path" && \
6737  {
6738         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6739         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6740         test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
6741         test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
6742         test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
6743         test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
6744 }
6745
6746                         cf_library_path_list="$cf_library_path_list $cf_search"
6747                         ;;
6748                 esac
6749         done
6750 fi
6751
6752 cf_search=
6753
6754 test "/usr" != "$prefix" && \
6755 test -d "/usr" && \
6756 (test $prefix = NONE || test "/usr" != "$prefix") && {
6757         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6758         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6759         test -d /usr/lib/intl &&       cf_search="$cf_search /usr/lib/intl"
6760         test -d /usr/lib/intl/lib &&    cf_search="$cf_search /usr/lib/intl/lib"
6761         test -d /usr/intl/lib &&       cf_search="$cf_search /usr/intl/lib"
6762         test -d /usr/intl/lib/intl &&    cf_search="$cf_search /usr/intl/lib/intl"
6763 }
6764
6765 test "$prefix" != "NONE" && \
6766 test -d "$prefix" && \
6767  {
6768         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6769         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6770         test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
6771         test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
6772         test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
6773         test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
6774 }
6775
6776 test "/usr/local" != "$prefix" && \
6777 test -d "/usr/local" && \
6778 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6779         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6780         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6781         test -d /usr/local/lib/intl &&       cf_search="$cf_search /usr/local/lib/intl"
6782         test -d /usr/local/lib/intl/lib &&    cf_search="$cf_search /usr/local/lib/intl/lib"
6783         test -d /usr/local/intl/lib &&       cf_search="$cf_search /usr/local/intl/lib"
6784         test -d /usr/local/intl/lib/intl &&    cf_search="$cf_search /usr/local/intl/lib/intl"
6785 }
6786
6787 test "/opt" != "$prefix" && \
6788 test -d "/opt" && \
6789 (test $prefix = NONE || test "/opt" != "$prefix") && {
6790         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6791         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6792         test -d /opt/lib/intl &&       cf_search="$cf_search /opt/lib/intl"
6793         test -d /opt/lib/intl/lib &&    cf_search="$cf_search /opt/lib/intl/lib"
6794         test -d /opt/intl/lib &&       cf_search="$cf_search /opt/intl/lib"
6795         test -d /opt/intl/lib/intl &&    cf_search="$cf_search /opt/intl/lib/intl"
6796 }
6797
6798 test "$HOME" != "$prefix" && \
6799 test -d "$HOME" && \
6800 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6801         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6802         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6803         test -d $HOME/lib/intl &&       cf_search="$cf_search $HOME/lib/intl"
6804         test -d $HOME/lib/intl/lib &&    cf_search="$cf_search $HOME/lib/intl/lib"
6805         test -d $HOME/intl/lib &&       cf_search="$cf_search $HOME/intl/lib"
6806         test -d $HOME/intl/lib/intl &&    cf_search="$cf_search $HOME/intl/lib/intl"
6807 }
6808
6809 cf_search="$cf_library_path_list $cf_search"
6810
6811         for cf_cv_library_path_intl in $cf_search
6812         do
6813           if test -d $cf_cv_library_path_intl ; then
6814             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_intl" 1>&6
6815
6816 echo "${as_me:-configure}:6816: testing ... testing $cf_cv_library_path_intl ..." 1>&5
6817
6818             CPPFLAGS="$cf_test_CPPFLAGS"
6819             LIBS="-lintl  $cf_save_LIBS"
6820             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
6821             cat >conftest.$ac_ext <<_ACEOF
6822 #line 6822 "configure"
6823 #include "confdefs.h"
6824
6825 #include <libintl.h>
6826 extern int _nl_msg_cat_cntr;
6827
6828 int
6829 main ()
6830 {
6831
6832     bindtextdomain ("", "");
6833     return (int) gettext ("")
6834
6835              + _nl_msg_cat_cntr
6836
6837   ;
6838   return 0;
6839 }
6840 _ACEOF
6841 rm -f conftest.$ac_objext conftest$ac_exeext
6842 if { (eval echo "$as_me:6842: \"$ac_link\"") >&5
6843   (eval $ac_link) 2>&5
6844   ac_status=$?
6845   echo "$as_me:6845: \$? = $ac_status" >&5
6846   (exit $ac_status); } &&
6847          { ac_try='test -s conftest$ac_exeext'
6848   { (eval echo "$as_me:6848: \"$ac_try\"") >&5
6849   (eval $ac_try) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); }; }; then
6853
6854                 test -n "$verbose" && echo "    ... found intl library in $cf_cv_library_path_intl" 1>&6
6855
6856 echo "${as_me:-configure}:6856: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
6857
6858                 cf_cv_find_linkage_intl=yes
6859                 cf_cv_library_file_intl="-lintl"
6860                 break
6861 else
6862   echo "$as_me: failed program was:" >&5
6863 cat conftest.$ac_ext >&5
6864
6865                 CPPFLAGS="$cf_save_CPPFLAGS"
6866                 LIBS="$cf_save_LIBS"
6867                 LDFLAGS="$cf_save_LDFLAGS"
6868
6869 fi
6870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6871           fi
6872         done
6873         CPPFLAGS="$cf_save_CPPFLAGS"
6874         LDFLAGS="$cf_save_LDFLAGS"
6875       fi
6876
6877     else
6878       cf_cv_find_linkage_intl=no
6879     fi
6880
6881 fi
6882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6883
6884 fi
6885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6886
6887 LIBS="$cf_save_LIBS"
6888
6889 if test "$cf_cv_find_linkage_intl" = yes ; then
6890 cf_cv_func_gettext=yes
6891 else
6892 cf_cv_func_gettext=no
6893 fi
6894
6895 fi
6896 echo "$as_me:6896: result: $cf_cv_func_gettext" >&5
6897 echo "${ECHO_T}$cf_cv_func_gettext" >&6
6898       LIBS="$cf_save_LIBS_1"
6899
6900       if test "$cf_cv_func_gettext" = yes ; then
6901         cat >>confdefs.h <<\EOF
6902 #define HAVE_LIBINTL_H 1
6903 EOF
6904
6905                                         if test "$PACKAGE" != gettext; then
6906
6907 cat >>confdefs.h <<\EOF
6908 #define HAVE_GETTEXT 1
6909 EOF
6910
6911 if test -n "$cf_cv_header_path_intl" ; then
6912   for cf_add_incdir in $cf_cv_header_path_intl
6913   do
6914         while test $cf_add_incdir != /usr/include
6915         do
6916           if test -d $cf_add_incdir
6917           then
6918                 cf_have_incdir=no
6919                 if test -n "$CFLAGS$CPPFLAGS" ; then
6920                   # a loop is needed to ensure we can add subdirs of existing dirs
6921                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6922                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6923                           cf_have_incdir=yes; break
6924                         fi
6925                   done
6926                 fi
6927
6928                 if test "$cf_have_incdir" = no ; then
6929                   if test "$cf_add_incdir" = /usr/local/include ; then
6930                         if test "$GCC" = yes
6931                         then
6932                           cf_save_CPPFLAGS=$CPPFLAGS
6933                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6934                           cat >conftest.$ac_ext <<_ACEOF
6935 #line 6935 "configure"
6936 #include "confdefs.h"
6937 #include <stdio.h>
6938 int
6939 main ()
6940 {
6941 printf("Hello")
6942   ;
6943   return 0;
6944 }
6945 _ACEOF
6946 rm -f conftest.$ac_objext
6947 if { (eval echo "$as_me:6947: \"$ac_compile\"") >&5
6948   (eval $ac_compile) 2>&5
6949   ac_status=$?
6950   echo "$as_me:6950: \$? = $ac_status" >&5
6951   (exit $ac_status); } &&
6952          { ac_try='test -s conftest.$ac_objext'
6953   { (eval echo "$as_me:6953: \"$ac_try\"") >&5
6954   (eval $ac_try) 2>&5
6955   ac_status=$?
6956   echo "$as_me:6956: \$? = $ac_status" >&5
6957   (exit $ac_status); }; }; then
6958   :
6959 else
6960   echo "$as_me: failed program was:" >&5
6961 cat conftest.$ac_ext >&5
6962 cf_have_incdir=yes
6963 fi
6964 rm -f conftest.$ac_objext conftest.$ac_ext
6965                           CPPFLAGS=$cf_save_CPPFLAGS
6966                         fi
6967                   fi
6968                 fi
6969
6970                 if test "$cf_have_incdir" = no ; then
6971                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6972
6973 echo "${as_me:-configure}:6973: testing adding $cf_add_incdir to include-path ..." 1>&5
6974
6975                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6976
6977                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6978                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6979                   cf_add_incdir="$cf_top_incdir"
6980                 else
6981                   break
6982                 fi
6983           fi
6984         done
6985   done
6986 fi
6987
6988           if test -n "$cf_cv_library_file_intl" ; then
6989                                                 INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
6990
6991 if test -n "$cf_cv_library_path_intl" ; then
6992   for cf_add_libdir in $cf_cv_library_path_intl
6993   do
6994     if test $cf_add_libdir = /usr/lib ; then
6995       :
6996     elif test -d $cf_add_libdir
6997     then
6998       cf_have_libdir=no
6999       if test -n "$LDFLAGS$LIBS" ; then
7000         # a loop is needed to ensure we can add subdirs of existing dirs
7001         for cf_test_libdir in $LDFLAGS $LIBS ; do
7002           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7003             cf_have_libdir=yes; break
7004           fi
7005         done
7006       fi
7007       if test "$cf_have_libdir" = no ; then
7008         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7009
7010 echo "${as_me:-configure}:7010: testing adding $cf_add_libdir to library-path ..." 1>&5
7011
7012         INTLLIBS="-L$cf_add_libdir $INTLLIBS"
7013       fi
7014     fi
7015   done
7016 fi
7017
7018           fi
7019
7020           gt_save_LIBS="$LIBS"
7021           LIBS="$LIBS $INTLLIBS"
7022
7023 for ac_func in dcgettext
7024 do
7025 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7026 echo "$as_me:7026: checking for $ac_func" >&5
7027 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7028 if eval "test \"\${$as_ac_var+set}\" = set"; then
7029   echo $ECHO_N "(cached) $ECHO_C" >&6
7030 else
7031   cat >conftest.$ac_ext <<_ACEOF
7032 #line 7032 "configure"
7033 #include "confdefs.h"
7034 /* System header to define __stub macros and hopefully few prototypes,
7035     which can conflict with char $ac_func (); below.  */
7036 #include <assert.h>
7037 /* Override any gcc2 internal prototype to avoid an error.  */
7038 #ifdef __cplusplus
7039 extern "C"
7040 #endif
7041 /* We use char because int might match the return type of a gcc2
7042    builtin and then its argument prototype would still apply.  */
7043 char $ac_func ();
7044 char (*f) ();
7045
7046 int
7047 main ()
7048 {
7049 /* The GNU C library defines this for functions which it implements
7050     to always fail with ENOSYS.  Some functions are actually named
7051     something starting with __ and the normal name is an alias.  */
7052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7053 choke me
7054 #else
7055 f = $ac_func;
7056 #endif
7057
7058   ;
7059   return 0;
7060 }
7061 _ACEOF
7062 rm -f conftest.$ac_objext conftest$ac_exeext
7063 if { (eval echo "$as_me:7063: \"$ac_link\"") >&5
7064   (eval $ac_link) 2>&5
7065   ac_status=$?
7066   echo "$as_me:7066: \$? = $ac_status" >&5
7067   (exit $ac_status); } &&
7068          { ac_try='test -s conftest$ac_exeext'
7069   { (eval echo "$as_me:7069: \"$ac_try\"") >&5
7070   (eval $ac_try) 2>&5
7071   ac_status=$?
7072   echo "$as_me:7072: \$? = $ac_status" >&5
7073   (exit $ac_status); }; }; then
7074   eval "$as_ac_var=yes"
7075 else
7076   echo "$as_me: failed program was:" >&5
7077 cat conftest.$ac_ext >&5
7078 eval "$as_ac_var=no"
7079 fi
7080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7081 fi
7082 echo "$as_me:7082: result: `eval echo '${'$as_ac_var'}'`" >&5
7083 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7084 if test `eval echo '${'$as_ac_var'}'` = yes; then
7085   cat >>confdefs.h <<EOF
7086 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7087 EOF
7088
7089 fi
7090 done
7091
7092           LIBS="$gt_save_LIBS"
7093
7094                     # Extract the first word of "msgfmt", so it can be a program name with args.
7095
7096 set dummy msgfmt; ac_word=$2
7097 echo "$as_me:7097: checking for $ac_word" >&5
7098 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7099 if test "${ac_cv_path_MSGFMT+set}" = set; then
7100   echo $ECHO_N "(cached) $ECHO_C" >&6
7101 else
7102   case "$MSGFMT" in
7103   [\\/]*|?:[\\/]*)
7104   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7105   ;;
7106   *)
7107   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7108   for ac_dir in $PATH; do
7109     test -z "$ac_dir" && ac_dir=.
7110     if test -f $ac_dir/$ac_word$ac_exeext; then
7111       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7112         ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
7113         break
7114       fi
7115     fi
7116   done
7117   IFS="$ac_save_ifs"
7118   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7119   ;;
7120 esac
7121 fi
7122 MSGFMT="$ac_cv_path_MSGFMT"
7123 if test "$MSGFMT" != ":"; then
7124   echo "$as_me:7124: result: $MSGFMT" >&5
7125 echo "${ECHO_T}$MSGFMT" >&6
7126 else
7127   echo "$as_me:7127: result: no" >&5
7128 echo "${ECHO_T}no" >&6
7129 fi
7130
7131           # Extract the first word of "gmsgfmt", so it can be a program name with args.
7132 set dummy gmsgfmt; ac_word=$2
7133 echo "$as_me:7133: checking for $ac_word" >&5
7134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7135 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7136   echo $ECHO_N "(cached) $ECHO_C" >&6
7137 else
7138   case $GMSGFMT in
7139   [\\/]* | ?:[\\/]*)
7140   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7141   ;;
7142   *)
7143   ac_save_IFS=$IFS; IFS=$ac_path_separator
7144 ac_dummy="$PATH"
7145 for ac_dir in $ac_dummy; do
7146   IFS=$ac_save_IFS
7147   test -z "$ac_dir" && ac_dir=.
7148   if $as_executable_p "$ac_dir/$ac_word"; then
7149    ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7150    echo "$as_me:7150: found $ac_dir/$ac_word" >&5
7151    break
7152 fi
7153 done
7154
7155   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7156   ;;
7157 esac
7158 fi
7159 GMSGFMT=$ac_cv_path_GMSGFMT
7160
7161 if test -n "$GMSGFMT"; then
7162   echo "$as_me:7162: result: $GMSGFMT" >&5
7163 echo "${ECHO_T}$GMSGFMT" >&6
7164 else
7165   echo "$as_me:7165: result: no" >&5
7166 echo "${ECHO_T}no" >&6
7167 fi
7168
7169                     # Extract the first word of "xgettext", so it can be a program name with args.
7170
7171 set dummy xgettext; ac_word=$2
7172 echo "$as_me:7172: checking for $ac_word" >&5
7173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7174 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7175   echo $ECHO_N "(cached) $ECHO_C" >&6
7176 else
7177   case "$XGETTEXT" in
7178   [\\/]*|?:[\\/]*)
7179   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7180   ;;
7181   *)
7182   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7183   for ac_dir in $PATH; do
7184     test -z "$ac_dir" && ac_dir=.
7185     if test -f $ac_dir/$ac_word$ac_exeext; then
7186       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7187         ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
7188         break
7189       fi
7190     fi
7191   done
7192   IFS="$ac_save_ifs"
7193   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7194   ;;
7195 esac
7196 fi
7197 XGETTEXT="$ac_cv_path_XGETTEXT"
7198 if test "$XGETTEXT" != ":"; then
7199   echo "$as_me:7199: result: $XGETTEXT" >&5
7200 echo "${ECHO_T}$XGETTEXT" >&6
7201 else
7202   echo "$as_me:7202: result: no" >&5
7203 echo "${ECHO_T}no" >&6
7204 fi
7205
7206           CATOBJEXT=.gmo
7207         fi
7208       fi
7209
7210       if test "$CATOBJEXT" = "NONE"; then
7211                         nls_cv_use_gnu_gettext=yes
7212       fi
7213     fi
7214
7215     if test "$nls_cv_use_gnu_gettext" = "yes"; then
7216       if test ! -d $srcdir/intl ; then
7217         { { echo "$as_me:7217: error: no NLS library is packaged with this application" >&5
7218 echo "$as_me: error: no NLS library is packaged with this application" >&2;}
7219    { (exit 1); exit 1; }; }
7220       fi
7221             INTLOBJS="\$(GETTOBJS)"
7222       # Extract the first word of "msgfmt", so it can be a program name with args.
7223
7224 set dummy msgfmt; ac_word=$2
7225 echo "$as_me:7225: checking for $ac_word" >&5
7226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7227 if test "${ac_cv_path_MSGFMT+set}" = set; then
7228   echo $ECHO_N "(cached) $ECHO_C" >&6
7229 else
7230   case "$MSGFMT" in
7231   [\\/]*|?:[\\/]*)
7232   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
7233   ;;
7234   *)
7235   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7236   for ac_dir in $PATH; do
7237     test -z "$ac_dir" && ac_dir=.
7238     if test -f $ac_dir/$ac_word$ac_exeext; then
7239       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
7240         ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
7241         break
7242       fi
7243     fi
7244   done
7245   IFS="$ac_save_ifs"
7246   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
7247   ;;
7248 esac
7249 fi
7250 MSGFMT="$ac_cv_path_MSGFMT"
7251 if test "$MSGFMT" != ":"; then
7252   echo "$as_me:7252: result: $MSGFMT" >&5
7253 echo "${ECHO_T}$MSGFMT" >&6
7254 else
7255   echo "$as_me:7255: result: no" >&5
7256 echo "${ECHO_T}no" >&6
7257 fi
7258
7259       # Extract the first word of "gmsgfmt", so it can be a program name with args.
7260 set dummy gmsgfmt; ac_word=$2
7261 echo "$as_me:7261: checking for $ac_word" >&5
7262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7263 if test "${ac_cv_path_GMSGFMT+set}" = set; then
7264   echo $ECHO_N "(cached) $ECHO_C" >&6
7265 else
7266   case $GMSGFMT in
7267   [\\/]* | ?:[\\/]*)
7268   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
7269   ;;
7270   *)
7271   ac_save_IFS=$IFS; IFS=$ac_path_separator
7272 ac_dummy="$PATH"
7273 for ac_dir in $ac_dummy; do
7274   IFS=$ac_save_IFS
7275   test -z "$ac_dir" && ac_dir=.
7276   if $as_executable_p "$ac_dir/$ac_word"; then
7277    ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
7278    echo "$as_me:7278: found $ac_dir/$ac_word" >&5
7279    break
7280 fi
7281 done
7282
7283   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
7284   ;;
7285 esac
7286 fi
7287 GMSGFMT=$ac_cv_path_GMSGFMT
7288
7289 if test -n "$GMSGFMT"; then
7290   echo "$as_me:7290: result: $GMSGFMT" >&5
7291 echo "${ECHO_T}$GMSGFMT" >&6
7292 else
7293   echo "$as_me:7293: result: no" >&5
7294 echo "${ECHO_T}no" >&6
7295 fi
7296
7297       # Extract the first word of "xgettext", so it can be a program name with args.
7298
7299 set dummy xgettext; ac_word=$2
7300 echo "$as_me:7300: checking for $ac_word" >&5
7301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7302 if test "${ac_cv_path_XGETTEXT+set}" = set; then
7303   echo $ECHO_N "(cached) $ECHO_C" >&6
7304 else
7305   case "$XGETTEXT" in
7306   [\\/]*|?:[\\/]*)
7307   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
7308   ;;
7309   *)
7310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7311   for ac_dir in $PATH; do
7312     test -z "$ac_dir" && ac_dir=.
7313     if test -f $ac_dir/$ac_word$ac_exeext; then
7314       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
7315         ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
7316         break
7317       fi
7318     fi
7319   done
7320   IFS="$ac_save_ifs"
7321   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
7322   ;;
7323 esac
7324 fi
7325 XGETTEXT="$ac_cv_path_XGETTEXT"
7326 if test "$XGETTEXT" != ":"; then
7327   echo "$as_me:7327: result: $XGETTEXT" >&5
7328 echo "${ECHO_T}$XGETTEXT" >&6
7329 else
7330   echo "$as_me:7330: result: no" >&5
7331 echo "${ECHO_T}no" >&6
7332 fi
7333
7334       BUILD_INCLUDED_LIBINTL=yes
7335       USE_INCLUDED_LIBINTL=yes
7336       CATOBJEXT=.gmo
7337       INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
7338       LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
7339     fi
7340
7341             if test "$GMSGFMT" != ":"; then
7342                   if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
7343         : ;
7344       else
7345         echo "$as_me:7345: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
7346 echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
7347         GMSGFMT=":"
7348       fi
7349     fi
7350
7351             if test "$XGETTEXT" != ":"; then
7352                       if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
7353         : ;
7354       else
7355         echo "$as_me:7355: result: found xgettext program is not GNU xgettext; ignore it" >&5
7356 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
7357         XGETTEXT=":"
7358       fi
7359     fi
7360
7361         POSUB=po
7362   fi
7363
7364   ac_config_commands="$ac_config_commands default-1"
7365
7366       if test "$PACKAGE" = gettext; then
7367     BUILD_INCLUDED_LIBINTL=yes
7368   fi
7369
7370                       if test "$nls_cv_use_gnu_gettext" = "yes"; then
7371     for ac_prog in bison
7372 do
7373   # Extract the first word of "$ac_prog", so it can be a program name with args.
7374 set dummy $ac_prog; ac_word=$2
7375 echo "$as_me:7375: checking for $ac_word" >&5
7376 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7377 if test "${ac_cv_prog_INTLBISON+set}" = set; then
7378   echo $ECHO_N "(cached) $ECHO_C" >&6
7379 else
7380   if test -n "$INTLBISON"; then
7381   ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
7382 else
7383   ac_save_IFS=$IFS; IFS=$ac_path_separator
7384 ac_dummy="$PATH"
7385 for ac_dir in $ac_dummy; do
7386   IFS=$ac_save_IFS
7387   test -z "$ac_dir" && ac_dir=.
7388   $as_executable_p "$ac_dir/$ac_word" || continue
7389 ac_cv_prog_INTLBISON="$ac_prog"
7390 echo "$as_me:7390: found $ac_dir/$ac_word" >&5
7391 break
7392 done
7393
7394 fi
7395 fi
7396 INTLBISON=$ac_cv_prog_INTLBISON
7397 if test -n "$INTLBISON"; then
7398   echo "$as_me:7398: result: $INTLBISON" >&5
7399 echo "${ECHO_T}$INTLBISON" >&6
7400 else
7401   echo "$as_me:7401: result: no" >&5
7402 echo "${ECHO_T}no" >&6
7403 fi
7404
7405   test -n "$INTLBISON" && break
7406 done
7407
7408     if test -z "$INTLBISON"; then
7409       ac_verc_fail=yes
7410     else
7411             echo "$as_me:7411: checking version of bison" >&5
7412 echo $ECHO_N "checking version of bison... $ECHO_C" >&6
7413       ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
7414       case $ac_prog_version in
7415         '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
7416         1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
7417            ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
7418         *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
7419       esac
7420     echo "$as_me:7420: result: $ac_prog_version" >&5
7421 echo "${ECHO_T}$ac_prog_version" >&6
7422     fi
7423     if test $ac_verc_fail = yes; then
7424       INTLBISON=:
7425     fi
7426   fi
7427
7428         for lang in $ALL_LINGUAS; do
7429     GMOFILES="$GMOFILES $lang.gmo"
7430     POFILES="$POFILES $lang.po"
7431   done
7432
7433     nls_cv_header_intl=
7434   nls_cv_header_libgt=
7435
7436     DATADIRNAME=share
7437
7438     INSTOBJEXT=.mo
7439
7440     GENCAT=gencat
7441
7442    if test "x$CATOBJEXT" != "x"; then
7443      if test "x$ALL_LINGUAS" = "x"; then
7444        LINGUAS=
7445      else
7446        echo "$as_me:7446: checking for catalogs to be installed" >&5
7447 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
7448        NEW_LINGUAS=
7449        for presentlang in $ALL_LINGUAS; do
7450          useit=no
7451          for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
7452            # Use the presentlang catalog if desiredlang is
7453            #   a. equal to presentlang, or
7454            #   b. a variant of presentlang (because in this case,
7455            #      presentlang can be used as a fallback for messages
7456            #      which are not translated in the desiredlang catalog).
7457            case "$desiredlang" in
7458              "$presentlang"*) useit=yes;;
7459            esac
7460          done
7461          if test $useit = yes; then
7462            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
7463          fi
7464        done
7465        LINGUAS=$NEW_LINGUAS
7466        echo "$as_me:7466: result: $LINGUAS" >&5
7467 echo "${ECHO_T}$LINGUAS" >&6
7468      fi
7469
7470           if test -n "$LINGUAS"; then
7471        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
7472      fi
7473    fi
7474
7475       INTL_LIBTOOL_SUFFIX_PREFIX=
7476
7477 if test "$USE_NLS" = yes ; then
7478
7479 # Check whether --with-textdomain or --without-textdomain was given.
7480 if test "${with_textdomain+set}" = set; then
7481   withval="$with_textdomain"
7482   NLS_TEXTDOMAIN=$withval
7483 else
7484   NLS_TEXTDOMAIN=$PACKAGE
7485 fi;
7486         cat >>confdefs.h <<EOF
7487 #define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
7488 EOF
7489
7490 fi
7491
7492 INTLDIR_MAKE=
7493 MSG_DIR_MAKE=
7494 SUB_MAKEFILE=
7495
7496 cf_makefile=makefile
7497
7498 use_our_messages=no
7499 if test "$USE_NLS" = yes ; then
7500 if test -d $srcdir/po ; then
7501 echo "$as_me:7501: checking if we should use included message-library" >&5
7502 echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
7503
7504 # Check whether --enable-included-msgs or --disable-included-msgs was given.
7505 if test "${enable_included_msgs+set}" = set; then
7506   enableval="$enable_included_msgs"
7507   use_our_messages=$enableval
7508 else
7509   use_our_messages=yes
7510 fi;
7511 fi
7512 echo "$as_me:7512: result: $use_our_messages" >&5
7513 echo "${ECHO_T}$use_our_messages" >&6
7514 fi
7515
7516 MSG_DIR_MAKE="#"
7517 if test "$use_our_messages" = yes
7518 then
7519         SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
7520         MSG_DIR_MAKE=
7521 fi
7522
7523 if test "$USE_INCLUDED_LIBINTL" = yes ; then
7524         if test "$nls_cv_force_use_gnu_gettext" = yes ; then
7525                 :
7526         elif test "$nls_cv_use_gnu_gettext" = yes ; then
7527                 :
7528         else
7529                 INTLDIR_MAKE="#"
7530         fi
7531         if test -z "$INTLDIR_MAKE"; then
7532                 cat >>confdefs.h <<\EOF
7533 #define HAVE_LIBGETTEXT_H 1
7534 EOF
7535
7536                 for cf_makefile in \
7537                         $srcdir/intl/Makefile.in \
7538                         $srcdir/intl/makefile.in
7539                 do
7540                         if test -f "$cf_makefile" ; then
7541                                 SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
7542                                 break
7543                         fi
7544                 done
7545         fi
7546 else
7547         INTLDIR_MAKE="#"
7548         if test "$USE_NLS" = yes ; then
7549
7550 for ac_header in libintl.h
7551 do
7552 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7553 echo "$as_me:7553: checking for $ac_header" >&5
7554 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7555 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7556   echo $ECHO_N "(cached) $ECHO_C" >&6
7557 else
7558   cat >conftest.$ac_ext <<_ACEOF
7559 #line 7559 "configure"
7560 #include "confdefs.h"
7561 #include <$ac_header>
7562 _ACEOF
7563 if { (eval echo "$as_me:7563: \"$ac_cpp conftest.$ac_ext\"") >&5
7564   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7565   ac_status=$?
7566   egrep -v '^ *\+' conftest.er1 >conftest.err
7567   rm -f conftest.er1
7568   cat conftest.err >&5
7569   echo "$as_me:7569: \$? = $ac_status" >&5
7570   (exit $ac_status); } >/dev/null; then
7571   if test -s conftest.err; then
7572     ac_cpp_err=$ac_c_preproc_warn_flag
7573   else
7574     ac_cpp_err=
7575   fi
7576 else
7577   ac_cpp_err=yes
7578 fi
7579 if test -z "$ac_cpp_err"; then
7580   eval "$as_ac_Header=yes"
7581 else
7582   echo "$as_me: failed program was:" >&5
7583   cat conftest.$ac_ext >&5
7584   eval "$as_ac_Header=no"
7585 fi
7586 rm -f conftest.err conftest.$ac_ext
7587 fi
7588 echo "$as_me:7588: result: `eval echo '${'$as_ac_Header'}'`" >&5
7589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7590 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7591   cat >>confdefs.h <<EOF
7592 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7593 EOF
7594
7595 fi
7596 done
7597
7598         fi
7599 fi
7600
7601 if test -z "$INTLDIR_MAKE" ; then
7602         CPPFLAGS="$CPPFLAGS -I../intl"
7603 fi
7604
7605 if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
7606         GT_YES="#"
7607         GT_NO=
7608 else
7609         GT_YES=
7610         GT_NO="#"
7611 fi
7612
7613 if test "$USE_INCLUDED_LIBINTL" = yes ; then
7614         if test "$nls_cv_force_use_gnu_gettext" = yes ; then
7615                 cat >>confdefs.h <<\EOF
7616 #define HAVE_GETTEXT 1
7617 EOF
7618
7619         elif test "$nls_cv_use_gnu_gettext" = yes ; then
7620                 cat >>confdefs.h <<\EOF
7621 #define HAVE_GETTEXT 1
7622 EOF
7623
7624         fi
7625         if test -n "$nls_cv_header_intl" ; then
7626                 cat >>confdefs.h <<\EOF
7627 #define HAVE_LIBINTL_H 1
7628 EOF
7629
7630         fi
7631 fi
7632
7633 echo "$as_me:7633: checking if -lm needed for math functions" >&5
7634 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
7635 if test "${cf_cv_need_libm+set}" = set; then
7636   echo $ECHO_N "(cached) $ECHO_C" >&6
7637 else
7638
7639         cat >conftest.$ac_ext <<_ACEOF
7640 #line 7640 "configure"
7641 #include "confdefs.h"
7642
7643         #include <stdio.h>
7644         #include <math.h>
7645
7646 int
7647 main ()
7648 {
7649 double x = rand(); printf("result = %g\n", sqrt(x))
7650   ;
7651   return 0;
7652 }
7653 _ACEOF
7654 rm -f conftest.$ac_objext conftest$ac_exeext
7655 if { (eval echo "$as_me:7655: \"$ac_link\"") >&5
7656   (eval $ac_link) 2>&5
7657   ac_status=$?
7658   echo "$as_me:7658: \$? = $ac_status" >&5
7659   (exit $ac_status); } &&
7660          { ac_try='test -s conftest$ac_exeext'
7661   { (eval echo "$as_me:7661: \"$ac_try\"") >&5
7662   (eval $ac_try) 2>&5
7663   ac_status=$?
7664   echo "$as_me:7664: \$? = $ac_status" >&5
7665   (exit $ac_status); }; }; then
7666   cf_cv_need_libm=no
7667 else
7668   echo "$as_me: failed program was:" >&5
7669 cat conftest.$ac_ext >&5
7670 cf_cv_need_libm=yes
7671 fi
7672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7673 fi
7674 echo "$as_me:7674: result: $cf_cv_need_libm" >&5
7675 echo "${ECHO_T}$cf_cv_need_libm" >&6
7676 if test "$cf_cv_need_libm" = yes
7677 then
7678
7679         LIBS="-lm $LIBS"
7680
7681 fi
7682
7683 echo "$as_me:7683: checking if you want to use dmalloc for testing" >&5
7684 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
7685
7686 # Check whether --with-dmalloc or --without-dmalloc was given.
7687 if test "${with_dmalloc+set}" = set; then
7688   withval="$with_dmalloc"
7689   cat >>confdefs.h <<\EOF
7690 #define USE_DMALLOC 1
7691 EOF
7692
7693         : ${with_cflags:=-g}
7694         : ${with_no_leaks:=yes}
7695          with_dmalloc=yes
7696 else
7697   with_dmalloc=
7698 fi;
7699 echo "$as_me:7699: result: ${with_dmalloc:-no}" >&5
7700 echo "${ECHO_T}${with_dmalloc:-no}" >&6
7701
7702 case .$with_cflags in #(vi
7703 .*-g*)
7704         case .$CFLAGS in #(vi
7705         .*-g*) #(vi
7706                 ;;
7707         *)
7708
7709 cf_fix_cppflags=no
7710 cf_new_cflags=
7711 cf_new_cppflags=
7712 cf_new_extra_cppflags=
7713
7714 for cf_add_cflags in -g
7715 do
7716 case $cf_fix_cppflags in
7717 no)
7718         case $cf_add_cflags in #(vi
7719         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7720                 case $cf_add_cflags in
7721                 -D*)
7722                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7723
7724                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7725                                 && test -z "${cf_tst_cflags}" \
7726                                 && cf_fix_cppflags=yes
7727
7728                         if test $cf_fix_cppflags = yes ; then
7729                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7730                                 continue
7731                         elif test "${cf_tst_cflags}" = "\"'" ; then
7732                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7733                                 continue
7734                         fi
7735                         ;;
7736                 esac
7737                 case "$CPPFLAGS" in
7738                 *$cf_add_cflags) #(vi
7739                         ;;
7740                 *) #(vi
7741                         case $cf_add_cflags in #(vi
7742                         -D*)
7743                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7744
7745 CPPFLAGS=`echo "$CPPFLAGS" | \
7746         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7747                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7748
7749                                 ;;
7750                         esac
7751                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7752                         ;;
7753                 esac
7754                 ;;
7755         *)
7756                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7757                 ;;
7758         esac
7759         ;;
7760 yes)
7761         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7762
7763         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7764
7765         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7766                 && test -z "${cf_tst_cflags}" \
7767                 && cf_fix_cppflags=no
7768         ;;
7769 esac
7770 done
7771
7772 if test -n "$cf_new_cflags" ; then
7773
7774         CFLAGS="$CFLAGS $cf_new_cflags"
7775 fi
7776
7777 if test -n "$cf_new_cppflags" ; then
7778
7779         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7780 fi
7781
7782 if test -n "$cf_new_extra_cppflags" ; then
7783
7784         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7785 fi
7786
7787                 ;;
7788         esac
7789         ;;
7790 esac
7791
7792 if test "$with_dmalloc" = yes ; then
7793         echo "$as_me:7793: checking for dmalloc.h" >&5
7794 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
7795 if test "${ac_cv_header_dmalloc_h+set}" = set; then
7796   echo $ECHO_N "(cached) $ECHO_C" >&6
7797 else
7798   cat >conftest.$ac_ext <<_ACEOF
7799 #line 7799 "configure"
7800 #include "confdefs.h"
7801 #include <dmalloc.h>
7802 _ACEOF
7803 if { (eval echo "$as_me:7803: \"$ac_cpp conftest.$ac_ext\"") >&5
7804   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7805   ac_status=$?
7806   egrep -v '^ *\+' conftest.er1 >conftest.err
7807   rm -f conftest.er1
7808   cat conftest.err >&5
7809   echo "$as_me:7809: \$? = $ac_status" >&5
7810   (exit $ac_status); } >/dev/null; then
7811   if test -s conftest.err; then
7812     ac_cpp_err=$ac_c_preproc_warn_flag
7813   else
7814     ac_cpp_err=
7815   fi
7816 else
7817   ac_cpp_err=yes
7818 fi
7819 if test -z "$ac_cpp_err"; then
7820   ac_cv_header_dmalloc_h=yes
7821 else
7822   echo "$as_me: failed program was:" >&5
7823   cat conftest.$ac_ext >&5
7824   ac_cv_header_dmalloc_h=no
7825 fi
7826 rm -f conftest.err conftest.$ac_ext
7827 fi
7828 echo "$as_me:7828: result: $ac_cv_header_dmalloc_h" >&5
7829 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
7830 if test $ac_cv_header_dmalloc_h = yes; then
7831
7832 echo "$as_me:7832: checking for dmalloc_debug in -ldmalloc" >&5
7833 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
7834 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
7835   echo $ECHO_N "(cached) $ECHO_C" >&6
7836 else
7837   ac_check_lib_save_LIBS=$LIBS
7838 LIBS="-ldmalloc  $LIBS"
7839 cat >conftest.$ac_ext <<_ACEOF
7840 #line 7840 "configure"
7841 #include "confdefs.h"
7842
7843 /* Override any gcc2 internal prototype to avoid an error.  */
7844 #ifdef __cplusplus
7845 extern "C"
7846 #endif
7847 /* We use char because int might match the return type of a gcc2
7848    builtin and then its argument prototype would still apply.  */
7849 char dmalloc_debug ();
7850 int
7851 main ()
7852 {
7853 dmalloc_debug ();
7854   ;
7855   return 0;
7856 }
7857 _ACEOF
7858 rm -f conftest.$ac_objext conftest$ac_exeext
7859 if { (eval echo "$as_me:7859: \"$ac_link\"") >&5
7860   (eval $ac_link) 2>&5
7861   ac_status=$?
7862   echo "$as_me:7862: \$? = $ac_status" >&5
7863   (exit $ac_status); } &&
7864          { ac_try='test -s conftest$ac_exeext'
7865   { (eval echo "$as_me:7865: \"$ac_try\"") >&5
7866   (eval $ac_try) 2>&5
7867   ac_status=$?
7868   echo "$as_me:7868: \$? = $ac_status" >&5
7869   (exit $ac_status); }; }; then
7870   ac_cv_lib_dmalloc_dmalloc_debug=yes
7871 else
7872   echo "$as_me: failed program was:" >&5
7873 cat conftest.$ac_ext >&5
7874 ac_cv_lib_dmalloc_dmalloc_debug=no
7875 fi
7876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7877 LIBS=$ac_check_lib_save_LIBS
7878 fi
7879 echo "$as_me:7879: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
7880 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
7881 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
7882   cat >>confdefs.h <<EOF
7883 #define HAVE_LIBDMALLOC 1
7884 EOF
7885
7886   LIBS="-ldmalloc $LIBS"
7887
7888 fi
7889
7890 fi
7891
7892 fi
7893
7894 echo "$as_me:7894: checking if you want to use dbmalloc for testing" >&5
7895 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
7896
7897 # Check whether --with-dbmalloc or --without-dbmalloc was given.
7898 if test "${with_dbmalloc+set}" = set; then
7899   withval="$with_dbmalloc"
7900   cat >>confdefs.h <<\EOF
7901 #define USE_DBMALLOC 1
7902 EOF
7903
7904         : ${with_cflags:=-g}
7905         : ${with_no_leaks:=yes}
7906          with_dbmalloc=yes
7907 else
7908   with_dbmalloc=
7909 fi;
7910 echo "$as_me:7910: result: ${with_dbmalloc:-no}" >&5
7911 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
7912
7913 case .$with_cflags in #(vi
7914 .*-g*)
7915         case .$CFLAGS in #(vi
7916         .*-g*) #(vi
7917                 ;;
7918         *)
7919
7920 cf_fix_cppflags=no
7921 cf_new_cflags=
7922 cf_new_cppflags=
7923 cf_new_extra_cppflags=
7924
7925 for cf_add_cflags in -g
7926 do
7927 case $cf_fix_cppflags in
7928 no)
7929         case $cf_add_cflags in #(vi
7930         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7931                 case $cf_add_cflags in
7932                 -D*)
7933                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7934
7935                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7936                                 && test -z "${cf_tst_cflags}" \
7937                                 && cf_fix_cppflags=yes
7938
7939                         if test $cf_fix_cppflags = yes ; then
7940                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7941                                 continue
7942                         elif test "${cf_tst_cflags}" = "\"'" ; then
7943                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7944                                 continue
7945                         fi
7946                         ;;
7947                 esac
7948                 case "$CPPFLAGS" in
7949                 *$cf_add_cflags) #(vi
7950                         ;;
7951                 *) #(vi
7952                         case $cf_add_cflags in #(vi
7953                         -D*)
7954                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7955
7956 CPPFLAGS=`echo "$CPPFLAGS" | \
7957         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7958                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7959
7960                                 ;;
7961                         esac
7962                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7963                         ;;
7964                 esac
7965                 ;;
7966         *)
7967                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7968                 ;;
7969         esac
7970         ;;
7971 yes)
7972         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7973
7974         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7975
7976         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7977                 && test -z "${cf_tst_cflags}" \
7978                 && cf_fix_cppflags=no
7979         ;;
7980 esac
7981 done
7982
7983 if test -n "$cf_new_cflags" ; then
7984
7985         CFLAGS="$CFLAGS $cf_new_cflags"
7986 fi
7987
7988 if test -n "$cf_new_cppflags" ; then
7989
7990         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7991 fi
7992
7993 if test -n "$cf_new_extra_cppflags" ; then
7994
7995         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7996 fi
7997
7998                 ;;
7999         esac
8000         ;;
8001 esac
8002
8003 if test "$with_dbmalloc" = yes ; then
8004         echo "$as_me:8004: checking for dbmalloc.h" >&5
8005 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
8006 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
8007   echo $ECHO_N "(cached) $ECHO_C" >&6
8008 else
8009   cat >conftest.$ac_ext <<_ACEOF
8010 #line 8010 "configure"
8011 #include "confdefs.h"
8012 #include <dbmalloc.h>
8013 _ACEOF
8014 if { (eval echo "$as_me:8014: \"$ac_cpp conftest.$ac_ext\"") >&5
8015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8016   ac_status=$?
8017   egrep -v '^ *\+' conftest.er1 >conftest.err
8018   rm -f conftest.er1
8019   cat conftest.err >&5
8020   echo "$as_me:8020: \$? = $ac_status" >&5
8021   (exit $ac_status); } >/dev/null; then
8022   if test -s conftest.err; then
8023     ac_cpp_err=$ac_c_preproc_warn_flag
8024   else
8025     ac_cpp_err=
8026   fi
8027 else
8028   ac_cpp_err=yes
8029 fi
8030 if test -z "$ac_cpp_err"; then
8031   ac_cv_header_dbmalloc_h=yes
8032 else
8033   echo "$as_me: failed program was:" >&5
8034   cat conftest.$ac_ext >&5
8035   ac_cv_header_dbmalloc_h=no
8036 fi
8037 rm -f conftest.err conftest.$ac_ext
8038 fi
8039 echo "$as_me:8039: result: $ac_cv_header_dbmalloc_h" >&5
8040 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
8041 if test $ac_cv_header_dbmalloc_h = yes; then
8042
8043 echo "$as_me:8043: checking for debug_malloc in -ldbmalloc" >&5
8044 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
8045 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
8046   echo $ECHO_N "(cached) $ECHO_C" >&6
8047 else
8048   ac_check_lib_save_LIBS=$LIBS
8049 LIBS="-ldbmalloc  $LIBS"
8050 cat >conftest.$ac_ext <<_ACEOF
8051 #line 8051 "configure"
8052 #include "confdefs.h"
8053
8054 /* Override any gcc2 internal prototype to avoid an error.  */
8055 #ifdef __cplusplus
8056 extern "C"
8057 #endif
8058 /* We use char because int might match the return type of a gcc2
8059    builtin and then its argument prototype would still apply.  */
8060 char debug_malloc ();
8061 int
8062 main ()
8063 {
8064 debug_malloc ();
8065   ;
8066   return 0;
8067 }
8068 _ACEOF
8069 rm -f conftest.$ac_objext conftest$ac_exeext
8070 if { (eval echo "$as_me:8070: \"$ac_link\"") >&5
8071   (eval $ac_link) 2>&5
8072   ac_status=$?
8073   echo "$as_me:8073: \$? = $ac_status" >&5
8074   (exit $ac_status); } &&
8075          { ac_try='test -s conftest$ac_exeext'
8076   { (eval echo "$as_me:8076: \"$ac_try\"") >&5
8077   (eval $ac_try) 2>&5
8078   ac_status=$?
8079   echo "$as_me:8079: \$? = $ac_status" >&5
8080   (exit $ac_status); }; }; then
8081   ac_cv_lib_dbmalloc_debug_malloc=yes
8082 else
8083   echo "$as_me: failed program was:" >&5
8084 cat conftest.$ac_ext >&5
8085 ac_cv_lib_dbmalloc_debug_malloc=no
8086 fi
8087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8088 LIBS=$ac_check_lib_save_LIBS
8089 fi
8090 echo "$as_me:8090: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
8091 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
8092 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
8093   cat >>confdefs.h <<EOF
8094 #define HAVE_LIBDBMALLOC 1
8095 EOF
8096
8097   LIBS="-ldbmalloc $LIBS"
8098
8099 fi
8100
8101 fi
8102
8103 fi
8104
8105 echo "$as_me:8105: checking if you want to use purify for testing" >&5
8106 echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
8107
8108 # Check whether --with-purify or --without-purify was given.
8109 if test "${with_purify+set}" = set; then
8110   withval="$with_purify"
8111   cat >>confdefs.h <<\EOF
8112 #define USE_PURIFY 1
8113 EOF
8114
8115         : ${with_cflags:=-g}
8116         : ${with_no_leaks:=yes}
8117          with_purify=yes
8118 else
8119   with_purify=
8120 fi;
8121 echo "$as_me:8121: result: ${with_purify:-no}" >&5
8122 echo "${ECHO_T}${with_purify:-no}" >&6
8123
8124 case .$with_cflags in #(vi
8125 .*-g*)
8126         case .$CFLAGS in #(vi
8127         .*-g*) #(vi
8128                 ;;
8129         *)
8130
8131 cf_fix_cppflags=no
8132 cf_new_cflags=
8133 cf_new_cppflags=
8134 cf_new_extra_cppflags=
8135
8136 for cf_add_cflags in -g
8137 do
8138 case $cf_fix_cppflags in
8139 no)
8140         case $cf_add_cflags in #(vi
8141         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8142                 case $cf_add_cflags in
8143                 -D*)
8144                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8145
8146                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8147                                 && test -z "${cf_tst_cflags}" \
8148                                 && cf_fix_cppflags=yes
8149
8150                         if test $cf_fix_cppflags = yes ; then
8151                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8152                                 continue
8153                         elif test "${cf_tst_cflags}" = "\"'" ; then
8154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8155                                 continue
8156                         fi
8157                         ;;
8158                 esac
8159                 case "$CPPFLAGS" in
8160                 *$cf_add_cflags) #(vi
8161                         ;;
8162                 *) #(vi
8163                         case $cf_add_cflags in #(vi
8164                         -D*)
8165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8166
8167 CPPFLAGS=`echo "$CPPFLAGS" | \
8168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8170
8171                                 ;;
8172                         esac
8173                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8174                         ;;
8175                 esac
8176                 ;;
8177         *)
8178                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8179                 ;;
8180         esac
8181         ;;
8182 yes)
8183         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8184
8185         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8186
8187         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8188                 && test -z "${cf_tst_cflags}" \
8189                 && cf_fix_cppflags=no
8190         ;;
8191 esac
8192 done
8193
8194 if test -n "$cf_new_cflags" ; then
8195
8196         CFLAGS="$CFLAGS $cf_new_cflags"
8197 fi
8198
8199 if test -n "$cf_new_cppflags" ; then
8200
8201         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8202 fi
8203
8204 if test -n "$cf_new_extra_cppflags" ; then
8205
8206         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8207 fi
8208
8209                 ;;
8210         esac
8211         ;;
8212 esac
8213
8214 echo "$as_me:8214: checking if you want to use valgrind for testing" >&5
8215 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
8216
8217 # Check whether --with-valgrind or --without-valgrind was given.
8218 if test "${with_valgrind+set}" = set; then
8219   withval="$with_valgrind"
8220   cat >>confdefs.h <<\EOF
8221 #define USE_VALGRIND 1
8222 EOF
8223
8224         : ${with_cflags:=-g}
8225         : ${with_no_leaks:=yes}
8226          with_valgrind=yes
8227 else
8228   with_valgrind=
8229 fi;
8230 echo "$as_me:8230: result: ${with_valgrind:-no}" >&5
8231 echo "${ECHO_T}${with_valgrind:-no}" >&6
8232
8233 case .$with_cflags in #(vi
8234 .*-g*)
8235         case .$CFLAGS in #(vi
8236         .*-g*) #(vi
8237                 ;;
8238         *)
8239
8240 cf_fix_cppflags=no
8241 cf_new_cflags=
8242 cf_new_cppflags=
8243 cf_new_extra_cppflags=
8244
8245 for cf_add_cflags in -g
8246 do
8247 case $cf_fix_cppflags in
8248 no)
8249         case $cf_add_cflags in #(vi
8250         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8251                 case $cf_add_cflags in
8252                 -D*)
8253                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8254
8255                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8256                                 && test -z "${cf_tst_cflags}" \
8257                                 && cf_fix_cppflags=yes
8258
8259                         if test $cf_fix_cppflags = yes ; then
8260                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8261                                 continue
8262                         elif test "${cf_tst_cflags}" = "\"'" ; then
8263                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8264                                 continue
8265                         fi
8266                         ;;
8267                 esac
8268                 case "$CPPFLAGS" in
8269                 *$cf_add_cflags) #(vi
8270                         ;;
8271                 *) #(vi
8272                         case $cf_add_cflags in #(vi
8273                         -D*)
8274                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8275
8276 CPPFLAGS=`echo "$CPPFLAGS" | \
8277         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8278                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8279
8280                                 ;;
8281                         esac
8282                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8283                         ;;
8284                 esac
8285                 ;;
8286         *)
8287                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8288                 ;;
8289         esac
8290         ;;
8291 yes)
8292         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8293
8294         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8295
8296         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8297                 && test -z "${cf_tst_cflags}" \
8298                 && cf_fix_cppflags=no
8299         ;;
8300 esac
8301 done
8302
8303 if test -n "$cf_new_cflags" ; then
8304
8305         CFLAGS="$CFLAGS $cf_new_cflags"
8306 fi
8307
8308 if test -n "$cf_new_cppflags" ; then
8309
8310         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8311 fi
8312
8313 if test -n "$cf_new_extra_cppflags" ; then
8314
8315         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8316 fi
8317
8318                 ;;
8319         esac
8320         ;;
8321 esac
8322
8323 echo "$as_me:8323: checking if you want to perform memory-leak testing" >&5
8324 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
8325
8326 # Check whether --with-no-leaks or --without-no-leaks was given.
8327 if test "${with_no_leaks+set}" = set; then
8328   withval="$with_no_leaks"
8329   cat >>confdefs.h <<\EOF
8330 #define NO_LEAKS 1
8331 EOF
8332
8333          cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
8334          case ${cf_doalloc} in #(vi
8335          *yes*) ;;
8336          *) cat >>confdefs.h <<\EOF
8337 #define DOALLOC 10000
8338 EOF
8339  ;;
8340          esac
8341          with_no_leaks=yes
8342 else
8343   with_no_leaks=
8344 fi;
8345 echo "$as_me:8345: result: $with_no_leaks" >&5
8346 echo "${ECHO_T}$with_no_leaks" >&6
8347
8348 echo "$as_me:8348: checking if you want --trace option" >&5
8349 echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
8350
8351 # Check whether --enable-trace or --disable-trace was given.
8352 if test "${enable_trace+set}" = set; then
8353   enableval="$enable_trace"
8354
8355 else
8356   enableval=yes
8357 fi;
8358 echo "$as_me:8358: result: $enableval" >&5
8359 echo "${ECHO_T}$enableval" >&6
8360 if test "$enableval" != no ; then
8361 EXTRAOBJS="$EXTRAOBJS trace\$o"
8362          cat >>confdefs.h <<\EOF
8363 #define HAVE_DLG_TRACE 1
8364 EOF
8365
8366 else
8367         :
8368 fi
8369
8370 LIBTOOL_MAKE="#"
8371
8372 echo "$as_me:8372: checking if libtool -version-number should be used" >&5
8373 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
8374
8375 # Check whether --enable-libtool-version or --disable-libtool-version was given.
8376 if test "${enable_libtool_version+set}" = set; then
8377   enableval="$enable_libtool_version"
8378   test "$enableval" != no && enableval=yes
8379   if test "$enableval" != "yes" ; then
8380     cf_libtool_version=no
8381   else
8382     cf_libtool_version=yes
8383   fi
8384 else
8385   enableval=yes
8386   cf_libtool_version=yes
8387
8388 fi;
8389 echo "$as_me:8389: result: $cf_libtool_version" >&5
8390 echo "${ECHO_T}$cf_libtool_version" >&6
8391
8392 if test "$cf_libtool_version" = yes ; then
8393         LIBTOOL_VERSION="-version-number"
8394 else
8395         LIBTOOL_VERSION="-version-info"
8396 fi
8397
8398 LIBTOOL=
8399
8400 # common library maintenance symbols that are convenient for libtool scripts:
8401 LIB_CREATE='${AR} -cr'
8402 LIB_OBJECT='${OBJECTS}'
8403 LIB_SUFFIX=.a
8404 LIB_PREP="$RANLIB"
8405
8406 # symbols used to prop libtool up to enable it to determine what it should be
8407 # doing:
8408 LIB_CLEAN=
8409 LIB_COMPILE=
8410 LIB_LINK='${CC}'
8411 LIB_INSTALL=
8412 LIB_UNINSTALL=
8413
8414 echo "$as_me:8414: checking if you want to build libraries with libtool" >&5
8415 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
8416
8417 # Check whether --with-libtool or --without-libtool was given.
8418 if test "${with_libtool+set}" = set; then
8419   withval="$with_libtool"
8420   with_libtool=$withval
8421 else
8422   with_libtool=no
8423 fi;
8424 echo "$as_me:8424: result: $with_libtool" >&5
8425 echo "${ECHO_T}$with_libtool" >&6
8426 if test "$with_libtool" != "no"; then
8427
8428         if test "$with_libtool" != "yes" ; then
8429
8430 if test "x$prefix" != xNONE; then
8431   cf_path_syntax="$prefix"
8432 else
8433   cf_path_syntax="$ac_default_prefix"
8434 fi
8435
8436 case ".$with_libtool" in #(vi
8437 .\$\(*\)*|.\'*\'*) #(vi
8438   ;;
8439 ..|./*|.\\*) #(vi
8440   ;;
8441 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8442   ;;
8443 .\${*prefix}*) #(vi
8444   eval with_libtool="$with_libtool"
8445   case ".$with_libtool" in #(vi
8446   .NONE/*)
8447     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
8448     ;;
8449   esac
8450   ;; #(vi
8451 .no|.NONE/*)
8452   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
8453   ;;
8454 *)
8455   { { echo "$as_me:8455: error: expected a pathname, not \"$with_libtool\"" >&5
8456 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
8457    { (exit 1); exit 1; }; }
8458   ;;
8459 esac
8460
8461                 LIBTOOL=$with_libtool
8462         else
8463                 # Extract the first word of "libtool", so it can be a program name with args.
8464 set dummy libtool; ac_word=$2
8465 echo "$as_me:8465: checking for $ac_word" >&5
8466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8467 if test "${ac_cv_path_LIBTOOL+set}" = set; then
8468   echo $ECHO_N "(cached) $ECHO_C" >&6
8469 else
8470   case $LIBTOOL in
8471   [\\/]* | ?:[\\/]*)
8472   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
8473   ;;
8474   *)
8475   ac_save_IFS=$IFS; IFS=$ac_path_separator
8476 ac_dummy="$PATH"
8477 for ac_dir in $ac_dummy; do
8478   IFS=$ac_save_IFS
8479   test -z "$ac_dir" && ac_dir=.
8480   if $as_executable_p "$ac_dir/$ac_word"; then
8481    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
8482    echo "$as_me:8482: found $ac_dir/$ac_word" >&5
8483    break
8484 fi
8485 done
8486
8487   ;;
8488 esac
8489 fi
8490 LIBTOOL=$ac_cv_path_LIBTOOL
8491
8492 if test -n "$LIBTOOL"; then
8493   echo "$as_me:8493: result: $LIBTOOL" >&5
8494 echo "${ECHO_T}$LIBTOOL" >&6
8495 else
8496   echo "$as_me:8496: result: no" >&5
8497 echo "${ECHO_T}no" >&6
8498 fi
8499
8500         fi
8501         if test -z "$LIBTOOL" ; then
8502                 { { echo "$as_me:8502: error: Cannot find libtool" >&5
8503 echo "$as_me: error: Cannot find libtool" >&2;}
8504    { (exit 1); exit 1; }; }
8505         fi
8506         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
8507         LIB_OBJECT='${OBJECTS:.o=.lo}'
8508         LIB_SUFFIX=.la
8509         LIB_CLEAN='${LIBTOOL} --mode=clean'
8510         LIB_COMPILE='${LIBTOOL} --mode=compile'
8511         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
8512         LIB_INSTALL='${LIBTOOL} --mode=install'
8513         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
8514         LIB_PREP=:
8515
8516         # Show the version of libtool
8517         echo "$as_me:8517: checking version of libtool" >&5
8518 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
8519
8520         # Save the version in a cache variable - this is not entirely a good
8521         # thing, but the version string from libtool is very ugly, and for
8522         # bug reports it might be useful to have the original string. "("
8523         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
8524         echo "$as_me:8524: result: $cf_cv_libtool_version" >&5
8525 echo "${ECHO_T}$cf_cv_libtool_version" >&6
8526         if test -z "$cf_cv_libtool_version" ; then
8527                 { { echo "$as_me:8527: error: This is not GNU libtool" >&5
8528 echo "$as_me: error: This is not GNU libtool" >&2;}
8529    { (exit 1); exit 1; }; }
8530         fi
8531
8532         # special hack to add -no-undefined (which libtool should do for itself)
8533         LT_UNDEF=
8534         case "$cf_cv_system_name" in #(vi
8535         cygwin*|mingw32*|uwin*|aix[456]) #(vi
8536                 LT_UNDEF=-no-undefined
8537                 ;;
8538         esac
8539
8540         # special hack to add --tag option for C++ compiler
8541         case $cf_cv_libtool_version in #(vi
8542         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
8543                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
8544                 LIBTOOL="$LIBTOOL --tag=CC"
8545                 ;;
8546         *)
8547                 LIBTOOL_CXX="$LIBTOOL"
8548                 ;;
8549         esac
8550 else
8551         LIBTOOL=""
8552         LIBTOOL_CXX=""
8553 fi
8554
8555 test -z "$LIBTOOL" && ECHO_LT=
8556
8557 if test "$with_libtool" = "yes" ; then
8558         OBJEXT="lo"
8559         LIBTOOL_MAKE=
8560
8561 echo "$as_me:8561: checking for additional libtool options" >&5
8562 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
8563
8564 # Check whether --with-libtool-opts or --without-libtool-opts was given.
8565 if test "${with_libtool_opts+set}" = set; then
8566   withval="$with_libtool_opts"
8567   with_libtool_opts=$withval
8568 else
8569   with_libtool_opts=no
8570 fi;
8571 echo "$as_me:8571: result: $with_libtool_opts" >&5
8572 echo "${ECHO_T}$with_libtool_opts" >&6
8573
8574 case .$with_libtool_opts in
8575 .yes|.no|.)
8576         ;;
8577 *)
8578         LIBTOOL_OPTS=$with_libtool_opts
8579         ;;
8580 esac
8581
8582 fi
8583
8584 echo "$as_me:8584: checking for specific curses-directory" >&5
8585 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
8586
8587 # Check whether --with-curses-dir or --without-curses-dir was given.
8588 if test "${with_curses_dir+set}" = set; then
8589   withval="$with_curses_dir"
8590   cf_cv_curses_dir=$withval
8591 else
8592   cf_cv_curses_dir=no
8593 fi;
8594 echo "$as_me:8594: result: $cf_cv_curses_dir" >&5
8595 echo "${ECHO_T}$cf_cv_curses_dir" >&6
8596
8597 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8598 then
8599
8600 if test "x$prefix" != xNONE; then
8601   cf_path_syntax="$prefix"
8602 else
8603   cf_path_syntax="$ac_default_prefix"
8604 fi
8605
8606 case ".$withval" in #(vi
8607 .\$\(*\)*|.\'*\'*) #(vi
8608   ;;
8609 ..|./*|.\\*) #(vi
8610   ;;
8611 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8612   ;;
8613 .\${*prefix}*) #(vi
8614   eval withval="$withval"
8615   case ".$withval" in #(vi
8616   .NONE/*)
8617     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8618     ;;
8619   esac
8620   ;; #(vi
8621 .no|.NONE/*)
8622   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8623   ;;
8624 *)
8625   { { echo "$as_me:8625: error: expected a pathname, not \"$withval\"" >&5
8626 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8627    { (exit 1); exit 1; }; }
8628   ;;
8629 esac
8630
8631         if test -d "$cf_cv_curses_dir"
8632         then
8633
8634 if test -n "$cf_cv_curses_dir/include" ; then
8635   for cf_add_incdir in $cf_cv_curses_dir/include
8636   do
8637         while test $cf_add_incdir != /usr/include
8638         do
8639           if test -d $cf_add_incdir
8640           then
8641                 cf_have_incdir=no
8642                 if test -n "$CFLAGS$CPPFLAGS" ; then
8643                   # a loop is needed to ensure we can add subdirs of existing dirs
8644                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8645                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8646                           cf_have_incdir=yes; break
8647                         fi
8648                   done
8649                 fi
8650
8651                 if test "$cf_have_incdir" = no ; then
8652                   if test "$cf_add_incdir" = /usr/local/include ; then
8653                         if test "$GCC" = yes
8654                         then
8655                           cf_save_CPPFLAGS=$CPPFLAGS
8656                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8657                           cat >conftest.$ac_ext <<_ACEOF
8658 #line 8658 "configure"
8659 #include "confdefs.h"
8660 #include <stdio.h>
8661 int
8662 main ()
8663 {
8664 printf("Hello")
8665   ;
8666   return 0;
8667 }
8668 _ACEOF
8669 rm -f conftest.$ac_objext
8670 if { (eval echo "$as_me:8670: \"$ac_compile\"") >&5
8671   (eval $ac_compile) 2>&5
8672   ac_status=$?
8673   echo "$as_me:8673: \$? = $ac_status" >&5
8674   (exit $ac_status); } &&
8675          { ac_try='test -s conftest.$ac_objext'
8676   { (eval echo "$as_me:8676: \"$ac_try\"") >&5
8677   (eval $ac_try) 2>&5
8678   ac_status=$?
8679   echo "$as_me:8679: \$? = $ac_status" >&5
8680   (exit $ac_status); }; }; then
8681   :
8682 else
8683   echo "$as_me: failed program was:" >&5
8684 cat conftest.$ac_ext >&5
8685 cf_have_incdir=yes
8686 fi
8687 rm -f conftest.$ac_objext conftest.$ac_ext
8688                           CPPFLAGS=$cf_save_CPPFLAGS
8689                         fi
8690                   fi
8691                 fi
8692
8693                 if test "$cf_have_incdir" = no ; then
8694                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8695
8696 echo "${as_me:-configure}:8696: testing adding $cf_add_incdir to include-path ..." 1>&5
8697
8698                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8699
8700                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8701                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8702                   cf_add_incdir="$cf_top_incdir"
8703                 else
8704                   break
8705                 fi
8706           fi
8707         done
8708   done
8709 fi
8710
8711 if test -n "$cf_cv_curses_dir/lib" ; then
8712   for cf_add_libdir in $cf_cv_curses_dir/lib
8713   do
8714     if test $cf_add_libdir = /usr/lib ; then
8715       :
8716     elif test -d $cf_add_libdir
8717     then
8718       cf_have_libdir=no
8719       if test -n "$LDFLAGS$LIBS" ; then
8720         # a loop is needed to ensure we can add subdirs of existing dirs
8721         for cf_test_libdir in $LDFLAGS $LIBS ; do
8722           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8723             cf_have_libdir=yes; break
8724           fi
8725         done
8726       fi
8727       if test "$cf_have_libdir" = no ; then
8728         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8729
8730 echo "${as_me:-configure}:8730: testing adding $cf_add_libdir to library-path ..." 1>&5
8731
8732         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8733       fi
8734     fi
8735   done
8736 fi
8737
8738         fi
8739 fi
8740
8741 use_ncurses=no
8742
8743 # Check whether --with-ncurses or --without-ncurses was given.
8744 if test "${with_ncurses+set}" = set; then
8745   withval="$with_ncurses"
8746   use_ncurses=ncurses
8747 fi;
8748
8749 # Check whether --with-ncursesw or --without-ncursesw was given.
8750 if test "${with_ncursesw+set}" = set; then
8751   withval="$with_ncursesw"
8752   use_ncurses=ncursesw
8753 fi;
8754 if test $use_ncurses != no ; then
8755         cf_wide_curses=yes
8756         if test $use_ncurses = ncursesw ; then
8757
8758 echo "$as_me:8758: checking for multibyte character support" >&5
8759 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8760 if test "${cf_cv_utf8_lib+set}" = set; then
8761   echo $ECHO_N "(cached) $ECHO_C" >&6
8762 else
8763
8764         cf_save_LIBS="$LIBS"
8765         cat >conftest.$ac_ext <<_ACEOF
8766 #line 8766 "configure"
8767 #include "confdefs.h"
8768
8769 #include <stdlib.h>
8770 int
8771 main ()
8772 {
8773 putwc(0,0);
8774   ;
8775   return 0;
8776 }
8777 _ACEOF
8778 rm -f conftest.$ac_objext conftest$ac_exeext
8779 if { (eval echo "$as_me:8779: \"$ac_link\"") >&5
8780   (eval $ac_link) 2>&5
8781   ac_status=$?
8782   echo "$as_me:8782: \$? = $ac_status" >&5
8783   (exit $ac_status); } &&
8784          { ac_try='test -s conftest$ac_exeext'
8785   { (eval echo "$as_me:8785: \"$ac_try\"") >&5
8786   (eval $ac_try) 2>&5
8787   ac_status=$?
8788   echo "$as_me:8788: \$? = $ac_status" >&5
8789   (exit $ac_status); }; }; then
8790   cf_cv_utf8_lib=yes
8791 else
8792   echo "$as_me: failed program was:" >&5
8793 cat conftest.$ac_ext >&5
8794
8795 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8796 # will be set on completion of the AC_TRY_LINK below.
8797 cf_cv_header_path_utf8=
8798 cf_cv_library_path_utf8=
8799
8800 echo "${as_me:-configure}:8800: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8801
8802 cf_save_LIBS="$LIBS"
8803
8804 cat >conftest.$ac_ext <<_ACEOF
8805 #line 8805 "configure"
8806 #include "confdefs.h"
8807
8808 #include <libutf8.h>
8809 int
8810 main ()
8811 {
8812 putwc(0,0);
8813   ;
8814   return 0;
8815 }
8816 _ACEOF
8817 rm -f conftest.$ac_objext conftest$ac_exeext
8818 if { (eval echo "$as_me:8818: \"$ac_link\"") >&5
8819   (eval $ac_link) 2>&5
8820   ac_status=$?
8821   echo "$as_me:8821: \$? = $ac_status" >&5
8822   (exit $ac_status); } &&
8823          { ac_try='test -s conftest$ac_exeext'
8824   { (eval echo "$as_me:8824: \"$ac_try\"") >&5
8825   (eval $ac_try) 2>&5
8826   ac_status=$?
8827   echo "$as_me:8827: \$? = $ac_status" >&5
8828   (exit $ac_status); }; }; then
8829
8830         cf_cv_find_linkage_utf8=yes
8831         cf_cv_header_path_utf8=/usr/include
8832         cf_cv_library_path_utf8=/usr/lib
8833
8834 else
8835   echo "$as_me: failed program was:" >&5
8836 cat conftest.$ac_ext >&5
8837
8838 LIBS="-lutf8  $cf_save_LIBS"
8839
8840 cat >conftest.$ac_ext <<_ACEOF
8841 #line 8841 "configure"
8842 #include "confdefs.h"
8843
8844 #include <libutf8.h>
8845 int
8846 main ()
8847 {
8848 putwc(0,0);
8849   ;
8850   return 0;
8851 }
8852 _ACEOF
8853 rm -f conftest.$ac_objext conftest$ac_exeext
8854 if { (eval echo "$as_me:8854: \"$ac_link\"") >&5
8855   (eval $ac_link) 2>&5
8856   ac_status=$?
8857   echo "$as_me:8857: \$? = $ac_status" >&5
8858   (exit $ac_status); } &&
8859          { ac_try='test -s conftest$ac_exeext'
8860   { (eval echo "$as_me:8860: \"$ac_try\"") >&5
8861   (eval $ac_try) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); }; }; then
8865
8866         cf_cv_find_linkage_utf8=yes
8867         cf_cv_header_path_utf8=/usr/include
8868         cf_cv_library_path_utf8=/usr/lib
8869         cf_cv_library_file_utf8="-lutf8"
8870
8871 else
8872   echo "$as_me: failed program was:" >&5
8873 cat conftest.$ac_ext >&5
8874
8875         cf_cv_find_linkage_utf8=no
8876         LIBS="$cf_save_LIBS"
8877
8878     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8879
8880 echo "${as_me:-configure}:8880: testing find linkage for utf8 library ..." 1>&5
8881
8882 echo "${as_me:-configure}:8882: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8883
8884     cf_save_CPPFLAGS="$CPPFLAGS"
8885     cf_test_CPPFLAGS="$CPPFLAGS"
8886
8887 cf_search=
8888
8889 # collect the current set of include-directories from compiler flags
8890 cf_header_path_list=""
8891 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8892         for cf_header_path in $CPPFLAGS $CFLAGS
8893         do
8894                 case $cf_header_path in #(vi
8895                 -I*)
8896                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8897
8898 test "$cf_header_path" != "NONE" && \
8899 test -d "$cf_header_path" && \
8900  {
8901         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8902         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8903         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8904         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8905         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8906         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8907 }
8908
8909                         cf_header_path_list="$cf_header_path_list $cf_search"
8910                         ;;
8911                 esac
8912         done
8913 fi
8914
8915 # add the variations for the package we are looking for
8916
8917 cf_search=
8918
8919 test "/usr" != "$prefix" && \
8920 test -d "/usr" && \
8921 (test $prefix = NONE || test "/usr" != "$prefix") && {
8922         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8923         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8924         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8925         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8926         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8927         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8928 }
8929
8930 test "$prefix" != "NONE" && \
8931 test -d "$prefix" && \
8932  {
8933         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8934         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8935         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8936         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8937         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8938         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8939 }
8940
8941 test "/usr/local" != "$prefix" && \
8942 test -d "/usr/local" && \
8943 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8944         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8945         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8946         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8947         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8948         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8949         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8950 }
8951
8952 test "/opt" != "$prefix" && \
8953 test -d "/opt" && \
8954 (test $prefix = NONE || test "/opt" != "$prefix") && {
8955         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8956         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8957         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8958         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8959         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8960         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8961 }
8962
8963 test "$HOME" != "$prefix" && \
8964 test -d "$HOME" && \
8965 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8966         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8967         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8968         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8969         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8970         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8971         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8972 }
8973
8974 test "$includedir" != NONE && \
8975 test "$includedir" != "/usr/include" && \
8976 test -d "$includedir" && {
8977         test -d $includedir &&    cf_search="$cf_search $includedir"
8978         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8979 }
8980
8981 test "$oldincludedir" != NONE && \
8982 test "$oldincludedir" != "/usr/include" && \
8983 test -d "$oldincludedir" && {
8984         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8985         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8986 }
8987
8988 cf_search="$cf_search $cf_header_path_list"
8989
8990     for cf_cv_header_path_utf8 in $cf_search
8991     do
8992       if test -d $cf_cv_header_path_utf8 ; then
8993         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8994
8995 echo "${as_me:-configure}:8995: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8996
8997         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8998         cat >conftest.$ac_ext <<_ACEOF
8999 #line 8999 "configure"
9000 #include "confdefs.h"
9001
9002 #include <libutf8.h>
9003 int
9004 main ()
9005 {
9006 putwc(0,0);
9007   ;
9008   return 0;
9009 }
9010 _ACEOF
9011 rm -f conftest.$ac_objext
9012 if { (eval echo "$as_me:9012: \"$ac_compile\"") >&5
9013   (eval $ac_compile) 2>&5
9014   ac_status=$?
9015   echo "$as_me:9015: \$? = $ac_status" >&5
9016   (exit $ac_status); } &&
9017          { ac_try='test -s conftest.$ac_objext'
9018   { (eval echo "$as_me:9018: \"$ac_try\"") >&5
9019   (eval $ac_try) 2>&5
9020   ac_status=$?
9021   echo "$as_me:9021: \$? = $ac_status" >&5
9022   (exit $ac_status); }; }; then
9023
9024             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9025
9026 echo "${as_me:-configure}:9026: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9027
9028             cf_cv_find_linkage_utf8=maybe
9029             cf_test_CPPFLAGS="$CPPFLAGS"
9030             break
9031 else
9032   echo "$as_me: failed program was:" >&5
9033 cat conftest.$ac_ext >&5
9034
9035             CPPFLAGS="$cf_save_CPPFLAGS"
9036
9037 fi
9038 rm -f conftest.$ac_objext conftest.$ac_ext
9039       fi
9040     done
9041
9042     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9043
9044 echo "${as_me:-configure}:9044: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9045
9046       cf_save_LIBS="$LIBS"
9047       cf_save_LDFLAGS="$LDFLAGS"
9048
9049       if test "$cf_cv_find_linkage_utf8" != yes ; then
9050
9051 cf_search=
9052 cf_library_path_list=""
9053 if test -n "${LDFLAGS}${LIBS}" ; then
9054         for cf_library_path in $LDFLAGS $LIBS
9055         do
9056                 case $cf_library_path in #(vi
9057                 -L*)
9058                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9059
9060 test "$cf_library_path" != "NONE" && \
9061 test -d "$cf_library_path" && \
9062  {
9063         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9064         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9065         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9066         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9067         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9068         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9069 }
9070
9071                         cf_library_path_list="$cf_library_path_list $cf_search"
9072                         ;;
9073                 esac
9074         done
9075 fi
9076
9077 cf_search=
9078
9079 test "/usr" != "$prefix" && \
9080 test -d "/usr" && \
9081 (test $prefix = NONE || test "/usr" != "$prefix") && {
9082         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9083         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9084         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9085         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9086         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9087         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9088 }
9089
9090 test "$prefix" != "NONE" && \
9091 test -d "$prefix" && \
9092  {
9093         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9094         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9095         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9096         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9097         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9098         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9099 }
9100
9101 test "/usr/local" != "$prefix" && \
9102 test -d "/usr/local" && \
9103 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9104         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9105         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9106         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9107         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9108         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9109         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9110 }
9111
9112 test "/opt" != "$prefix" && \
9113 test -d "/opt" && \
9114 (test $prefix = NONE || test "/opt" != "$prefix") && {
9115         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9116         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9117         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9118         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9119         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9120         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9121 }
9122
9123 test "$HOME" != "$prefix" && \
9124 test -d "$HOME" && \
9125 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9126         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9127         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9128         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9129         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9130         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9131         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9132 }
9133
9134 cf_search="$cf_library_path_list $cf_search"
9135
9136         for cf_cv_library_path_utf8 in $cf_search
9137         do
9138           if test -d $cf_cv_library_path_utf8 ; then
9139             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9140
9141 echo "${as_me:-configure}:9141: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9142
9143             CPPFLAGS="$cf_test_CPPFLAGS"
9144             LIBS="-lutf8  $cf_save_LIBS"
9145             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9146             cat >conftest.$ac_ext <<_ACEOF
9147 #line 9147 "configure"
9148 #include "confdefs.h"
9149
9150 #include <libutf8.h>
9151 int
9152 main ()
9153 {
9154 putwc(0,0);
9155   ;
9156   return 0;
9157 }
9158 _ACEOF
9159 rm -f conftest.$ac_objext conftest$ac_exeext
9160 if { (eval echo "$as_me:9160: \"$ac_link\"") >&5
9161   (eval $ac_link) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit $ac_status); } &&
9165          { ac_try='test -s conftest$ac_exeext'
9166   { (eval echo "$as_me:9166: \"$ac_try\"") >&5
9167   (eval $ac_try) 2>&5
9168   ac_status=$?
9169   echo "$as_me:9169: \$? = $ac_status" >&5
9170   (exit $ac_status); }; }; then
9171
9172                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9173
9174 echo "${as_me:-configure}:9174: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9175
9176                 cf_cv_find_linkage_utf8=yes
9177                 cf_cv_library_file_utf8="-lutf8"
9178                 break
9179 else
9180   echo "$as_me: failed program was:" >&5
9181 cat conftest.$ac_ext >&5
9182
9183                 CPPFLAGS="$cf_save_CPPFLAGS"
9184                 LIBS="$cf_save_LIBS"
9185                 LDFLAGS="$cf_save_LDFLAGS"
9186
9187 fi
9188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9189           fi
9190         done
9191         CPPFLAGS="$cf_save_CPPFLAGS"
9192         LDFLAGS="$cf_save_LDFLAGS"
9193       fi
9194
9195     else
9196       cf_cv_find_linkage_utf8=no
9197     fi
9198
9199 fi
9200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9201
9202 fi
9203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9204
9205 LIBS="$cf_save_LIBS"
9206
9207 if test "$cf_cv_find_linkage_utf8" = yes ; then
9208 cf_cv_utf8_lib=add-on
9209 else
9210 cf_cv_utf8_lib=no
9211 fi
9212
9213 fi
9214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9215 fi
9216 echo "$as_me:9216: result: $cf_cv_utf8_lib" >&5
9217 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9218
9219 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9220 # ncurses/ncursesw:
9221 if test "$cf_cv_utf8_lib" = "add-on" ; then
9222         cat >>confdefs.h <<\EOF
9223 #define HAVE_LIBUTF8_H 1
9224 EOF
9225
9226 if test -n "$cf_cv_header_path_utf8" ; then
9227   for cf_add_incdir in $cf_cv_header_path_utf8
9228   do
9229         while test $cf_add_incdir != /usr/include
9230         do
9231           if test -d $cf_add_incdir
9232           then
9233                 cf_have_incdir=no
9234                 if test -n "$CFLAGS$CPPFLAGS" ; then
9235                   # a loop is needed to ensure we can add subdirs of existing dirs
9236                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9237                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9238                           cf_have_incdir=yes; break
9239                         fi
9240                   done
9241                 fi
9242
9243                 if test "$cf_have_incdir" = no ; then
9244                   if test "$cf_add_incdir" = /usr/local/include ; then
9245                         if test "$GCC" = yes
9246                         then
9247                           cf_save_CPPFLAGS=$CPPFLAGS
9248                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9249                           cat >conftest.$ac_ext <<_ACEOF
9250 #line 9250 "configure"
9251 #include "confdefs.h"
9252 #include <stdio.h>
9253 int
9254 main ()
9255 {
9256 printf("Hello")
9257   ;
9258   return 0;
9259 }
9260 _ACEOF
9261 rm -f conftest.$ac_objext
9262 if { (eval echo "$as_me:9262: \"$ac_compile\"") >&5
9263   (eval $ac_compile) 2>&5
9264   ac_status=$?
9265   echo "$as_me:9265: \$? = $ac_status" >&5
9266   (exit $ac_status); } &&
9267          { ac_try='test -s conftest.$ac_objext'
9268   { (eval echo "$as_me:9268: \"$ac_try\"") >&5
9269   (eval $ac_try) 2>&5
9270   ac_status=$?
9271   echo "$as_me:9271: \$? = $ac_status" >&5
9272   (exit $ac_status); }; }; then
9273   :
9274 else
9275   echo "$as_me: failed program was:" >&5
9276 cat conftest.$ac_ext >&5
9277 cf_have_incdir=yes
9278 fi
9279 rm -f conftest.$ac_objext conftest.$ac_ext
9280                           CPPFLAGS=$cf_save_CPPFLAGS
9281                         fi
9282                   fi
9283                 fi
9284
9285                 if test "$cf_have_incdir" = no ; then
9286                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9287
9288 echo "${as_me:-configure}:9288: testing adding $cf_add_incdir to include-path ..." 1>&5
9289
9290                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9291
9292                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9293                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9294                   cf_add_incdir="$cf_top_incdir"
9295                 else
9296                   break
9297                 fi
9298           fi
9299         done
9300   done
9301 fi
9302
9303 if test -n "$cf_cv_library_path_utf8" ; then
9304   for cf_add_libdir in $cf_cv_library_path_utf8
9305   do
9306     if test $cf_add_libdir = /usr/lib ; then
9307       :
9308     elif test -d $cf_add_libdir
9309     then
9310       cf_have_libdir=no
9311       if test -n "$LDFLAGS$LIBS" ; then
9312         # a loop is needed to ensure we can add subdirs of existing dirs
9313         for cf_test_libdir in $LDFLAGS $LIBS ; do
9314           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9315             cf_have_libdir=yes; break
9316           fi
9317         done
9318       fi
9319       if test "$cf_have_libdir" = no ; then
9320         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9321
9322 echo "${as_me:-configure}:9322: testing adding $cf_add_libdir to library-path ..." 1>&5
9323
9324         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9325       fi
9326     fi
9327   done
9328 fi
9329
9330         LIBS="$cf_cv_library_file_utf8 $LIBS"
9331 fi
9332
9333         fi
9334
9335 cf_ncuconfig_root=$use_ncurses
9336
9337 echo "Looking for ${cf_ncuconfig_root}-config"
9338 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9339 do
9340   # Extract the first word of "$ac_prog", so it can be a program name with args.
9341 set dummy $ac_prog; ac_word=$2
9342 echo "$as_me:9342: checking for $ac_word" >&5
9343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9344 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
9345   echo $ECHO_N "(cached) $ECHO_C" >&6
9346 else
9347   case $NCURSES_CONFIG in
9348   [\\/]* | ?:[\\/]*)
9349   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
9350   ;;
9351   *)
9352   ac_save_IFS=$IFS; IFS=$ac_path_separator
9353 ac_dummy="$PATH"
9354 for ac_dir in $ac_dummy; do
9355   IFS=$ac_save_IFS
9356   test -z "$ac_dir" && ac_dir=.
9357   if $as_executable_p "$ac_dir/$ac_word"; then
9358    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
9359    echo "$as_me:9359: found $ac_dir/$ac_word" >&5
9360    break
9361 fi
9362 done
9363
9364   ;;
9365 esac
9366 fi
9367 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
9368
9369 if test -n "$NCURSES_CONFIG"; then
9370   echo "$as_me:9370: result: $NCURSES_CONFIG" >&5
9371 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9372 else
9373   echo "$as_me:9373: result: no" >&5
9374 echo "${ECHO_T}no" >&6
9375 fi
9376
9377   test -n "$NCURSES_CONFIG" && break
9378 done
9379 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
9380
9381 if test "$NCURSES_CONFIG" != none ; then
9382
9383 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
9384 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
9385
9386 # even with config script, some packages use no-override for curses.h
9387
9388 echo "$as_me:9388: checking if we have identified curses headers" >&5
9389 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9390 if test "${cf_cv_ncurses_header+set}" = set; then
9391   echo $ECHO_N "(cached) $ECHO_C" >&6
9392 else
9393
9394 cf_cv_ncurses_header=none
9395 for cf_header in  \
9396     $use_ncurses/ncurses.h \
9397         $use_ncurses/curses.h \
9398         ncurses.h \
9399         curses.h
9400 do
9401 cat >conftest.$ac_ext <<_ACEOF
9402 #line 9402 "configure"
9403 #include "confdefs.h"
9404 #include <${cf_header}>
9405 int
9406 main ()
9407 {
9408 initscr(); tgoto("?", 0,0)
9409   ;
9410   return 0;
9411 }
9412 _ACEOF
9413 rm -f conftest.$ac_objext
9414 if { (eval echo "$as_me:9414: \"$ac_compile\"") >&5
9415   (eval $ac_compile) 2>&5
9416   ac_status=$?
9417   echo "$as_me:9417: \$? = $ac_status" >&5
9418   (exit $ac_status); } &&
9419          { ac_try='test -s conftest.$ac_objext'
9420   { (eval echo "$as_me:9420: \"$ac_try\"") >&5
9421   (eval $ac_try) 2>&5
9422   ac_status=$?
9423   echo "$as_me:9423: \$? = $ac_status" >&5
9424   (exit $ac_status); }; }; then
9425   cf_cv_ncurses_header=$cf_header; break
9426 else
9427   echo "$as_me: failed program was:" >&5
9428 cat conftest.$ac_ext >&5
9429 fi
9430 rm -f conftest.$ac_objext conftest.$ac_ext
9431 done
9432
9433 fi
9434 echo "$as_me:9434: result: $cf_cv_ncurses_header" >&5
9435 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9436
9437 if test "$cf_cv_ncurses_header" = none ; then
9438         { { echo "$as_me:9438: error: No curses header-files found" >&5
9439 echo "$as_me: error: No curses header-files found" >&2;}
9440    { (exit 1); exit 1; }; }
9441 fi
9442
9443 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9444
9445 for ac_header in $cf_cv_ncurses_header
9446 do
9447 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9448 echo "$as_me:9448: checking for $ac_header" >&5
9449 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9450 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9451   echo $ECHO_N "(cached) $ECHO_C" >&6
9452 else
9453   cat >conftest.$ac_ext <<_ACEOF
9454 #line 9454 "configure"
9455 #include "confdefs.h"
9456 #include <$ac_header>
9457 _ACEOF
9458 if { (eval echo "$as_me:9458: \"$ac_cpp conftest.$ac_ext\"") >&5
9459   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9460   ac_status=$?
9461   egrep -v '^ *\+' conftest.er1 >conftest.err
9462   rm -f conftest.er1
9463   cat conftest.err >&5
9464   echo "$as_me:9464: \$? = $ac_status" >&5
9465   (exit $ac_status); } >/dev/null; then
9466   if test -s conftest.err; then
9467     ac_cpp_err=$ac_c_preproc_warn_flag
9468   else
9469     ac_cpp_err=
9470   fi
9471 else
9472   ac_cpp_err=yes
9473 fi
9474 if test -z "$ac_cpp_err"; then
9475   eval "$as_ac_Header=yes"
9476 else
9477   echo "$as_me: failed program was:" >&5
9478   cat conftest.$ac_ext >&5
9479   eval "$as_ac_Header=no"
9480 fi
9481 rm -f conftest.err conftest.$ac_ext
9482 fi
9483 echo "$as_me:9483: result: `eval echo '${'$as_ac_Header'}'`" >&5
9484 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9485 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9486   cat >>confdefs.h <<EOF
9487 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9488 EOF
9489
9490 fi
9491 done
9492
9493 cat >>confdefs.h <<\EOF
9494 #define NCURSES 1
9495 EOF
9496
9497 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9498
9499 cat >>confdefs.h <<EOF
9500 #define $cf_nculib_ROOT 1
9501 EOF
9502
9503 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9504
9505 else
9506
9507 cf_ncuhdr_root=$use_ncurses
9508
9509 test -n "$cf_cv_curses_dir" && \
9510 test "$cf_cv_curses_dir" != "no" && { \
9511
9512 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9513   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9514   do
9515         while test $cf_add_incdir != /usr/include
9516         do
9517           if test -d $cf_add_incdir
9518           then
9519                 cf_have_incdir=no
9520                 if test -n "$CFLAGS$CPPFLAGS" ; then
9521                   # a loop is needed to ensure we can add subdirs of existing dirs
9522                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9523                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9524                           cf_have_incdir=yes; break
9525                         fi
9526                   done
9527                 fi
9528
9529                 if test "$cf_have_incdir" = no ; then
9530                   if test "$cf_add_incdir" = /usr/local/include ; then
9531                         if test "$GCC" = yes
9532                         then
9533                           cf_save_CPPFLAGS=$CPPFLAGS
9534                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9535                           cat >conftest.$ac_ext <<_ACEOF
9536 #line 9536 "configure"
9537 #include "confdefs.h"
9538 #include <stdio.h>
9539 int
9540 main ()
9541 {
9542 printf("Hello")
9543   ;
9544   return 0;
9545 }
9546 _ACEOF
9547 rm -f conftest.$ac_objext
9548 if { (eval echo "$as_me:9548: \"$ac_compile\"") >&5
9549   (eval $ac_compile) 2>&5
9550   ac_status=$?
9551   echo "$as_me:9551: \$? = $ac_status" >&5
9552   (exit $ac_status); } &&
9553          { ac_try='test -s conftest.$ac_objext'
9554   { (eval echo "$as_me:9554: \"$ac_try\"") >&5
9555   (eval $ac_try) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit $ac_status); }; }; then
9559   :
9560 else
9561   echo "$as_me: failed program was:" >&5
9562 cat conftest.$ac_ext >&5
9563 cf_have_incdir=yes
9564 fi
9565 rm -f conftest.$ac_objext conftest.$ac_ext
9566                           CPPFLAGS=$cf_save_CPPFLAGS
9567                         fi
9568                   fi
9569                 fi
9570
9571                 if test "$cf_have_incdir" = no ; then
9572                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9573
9574 echo "${as_me:-configure}:9574: testing adding $cf_add_incdir to include-path ..." 1>&5
9575
9576                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9577
9578                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9579                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9580                   cf_add_incdir="$cf_top_incdir"
9581                 else
9582                   break
9583                 fi
9584           fi
9585         done
9586   done
9587 fi
9588
9589 }
9590
9591 echo "$as_me:9591: checking for $cf_ncuhdr_root header in include-path" >&5
9592 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9593 if test "${cf_cv_ncurses_h+set}" = set; then
9594   echo $ECHO_N "(cached) $ECHO_C" >&6
9595 else
9596
9597         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9598         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9599         for cf_header in $cf_header_list
9600         do
9601
9602         cat >conftest.$ac_ext <<_ACEOF
9603 #line 9603 "configure"
9604 #include "confdefs.h"
9605
9606 #include <$cf_header>
9607 int
9608 main ()
9609 {
9610
9611 #ifdef NCURSES_VERSION
9612
9613 printf("%s\n", NCURSES_VERSION);
9614 #else
9615 #ifdef __NCURSES_H
9616 printf("old\n");
9617 #else
9618         make an error
9619 #endif
9620 #endif
9621
9622   ;
9623   return 0;
9624 }
9625 _ACEOF
9626 rm -f conftest.$ac_objext
9627 if { (eval echo "$as_me:9627: \"$ac_compile\"") >&5
9628   (eval $ac_compile) 2>&5
9629   ac_status=$?
9630   echo "$as_me:9630: \$? = $ac_status" >&5
9631   (exit $ac_status); } &&
9632          { ac_try='test -s conftest.$ac_objext'
9633   { (eval echo "$as_me:9633: \"$ac_try\"") >&5
9634   (eval $ac_try) 2>&5
9635   ac_status=$?
9636   echo "$as_me:9636: \$? = $ac_status" >&5
9637   (exit $ac_status); }; }; then
9638   cf_cv_ncurses_h=$cf_header
9639
9640 else
9641   echo "$as_me: failed program was:" >&5
9642 cat conftest.$ac_ext >&5
9643 cf_cv_ncurses_h=no
9644 fi
9645 rm -f conftest.$ac_objext conftest.$ac_ext
9646
9647                 test "$cf_cv_ncurses_h" != no && break
9648         done
9649
9650 fi
9651 echo "$as_me:9651: result: $cf_cv_ncurses_h" >&5
9652 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9653
9654 if test "$cf_cv_ncurses_h" != no ; then
9655         cf_cv_ncurses_header=$cf_cv_ncurses_h
9656 else
9657
9658 echo "$as_me:9658: checking for $cf_ncuhdr_root include-path" >&5
9659 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9660 if test "${cf_cv_ncurses_h2+set}" = set; then
9661   echo $ECHO_N "(cached) $ECHO_C" >&6
9662 else
9663
9664         test -n "$verbose" && echo
9665
9666 cf_search=
9667
9668 # collect the current set of include-directories from compiler flags
9669 cf_header_path_list=""
9670 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9671         for cf_header_path in $CPPFLAGS $CFLAGS
9672         do
9673                 case $cf_header_path in #(vi
9674                 -I*)
9675                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9676
9677 test "$cf_header_path" != "NONE" && \
9678 test -d "$cf_header_path" && \
9679  {
9680         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9681         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9682         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9683         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9684         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9685         test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9686 }
9687
9688                         cf_header_path_list="$cf_header_path_list $cf_search"
9689                         ;;
9690                 esac
9691         done
9692 fi
9693
9694 # add the variations for the package we are looking for
9695
9696 cf_search=
9697
9698 test "/usr" != "$prefix" && \
9699 test -d "/usr" && \
9700 (test $prefix = NONE || test "/usr" != "$prefix") && {
9701         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9702         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9703         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
9704         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
9705         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
9706         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9707 }
9708
9709 test "$prefix" != "NONE" && \
9710 test -d "$prefix" && \
9711  {
9712         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9713         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9714         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9715         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9716         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9717         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9718 }
9719
9720 test "/usr/local" != "$prefix" && \
9721 test -d "/usr/local" && \
9722 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9723         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9724         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9725         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
9726         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
9727         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
9728         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9729 }
9730
9731 test "/opt" != "$prefix" && \
9732 test -d "/opt" && \
9733 (test $prefix = NONE || test "/opt" != "$prefix") && {
9734         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9735         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9736         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
9737         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
9738         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
9739         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9740 }
9741
9742 test "$HOME" != "$prefix" && \
9743 test -d "$HOME" && \
9744 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9745         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9746         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9747         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
9748         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
9749         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
9750         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9751 }
9752
9753 test "$includedir" != NONE && \
9754 test "$includedir" != "/usr/include" && \
9755 test -d "$includedir" && {
9756         test -d $includedir &&    cf_search="$cf_search $includedir"
9757         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9758 }
9759
9760 test "$oldincludedir" != NONE && \
9761 test "$oldincludedir" != "/usr/include" && \
9762 test -d "$oldincludedir" && {
9763         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9764         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9765 }
9766
9767 cf_search="$cf_search $cf_header_path_list"
9768
9769         test -n "$verbose" && echo search path $cf_search
9770         cf_save2_CPPFLAGS="$CPPFLAGS"
9771         for cf_incdir in $cf_search
9772         do
9773
9774 if test -n "$cf_incdir" ; then
9775   for cf_add_incdir in $cf_incdir
9776   do
9777         while test $cf_add_incdir != /usr/include
9778         do
9779           if test -d $cf_add_incdir
9780           then
9781                 cf_have_incdir=no
9782                 if test -n "$CFLAGS$CPPFLAGS" ; then
9783                   # a loop is needed to ensure we can add subdirs of existing dirs
9784                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9785                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9786                           cf_have_incdir=yes; break
9787                         fi
9788                   done
9789                 fi
9790
9791                 if test "$cf_have_incdir" = no ; then
9792                   if test "$cf_add_incdir" = /usr/local/include ; then
9793                         if test "$GCC" = yes
9794                         then
9795                           cf_save_CPPFLAGS=$CPPFLAGS
9796                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9797                           cat >conftest.$ac_ext <<_ACEOF
9798 #line 9798 "configure"
9799 #include "confdefs.h"
9800 #include <stdio.h>
9801 int
9802 main ()
9803 {
9804 printf("Hello")
9805   ;
9806   return 0;
9807 }
9808 _ACEOF
9809 rm -f conftest.$ac_objext
9810 if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
9811   (eval $ac_compile) 2>&5
9812   ac_status=$?
9813   echo "$as_me:9813: \$? = $ac_status" >&5
9814   (exit $ac_status); } &&
9815          { ac_try='test -s conftest.$ac_objext'
9816   { (eval echo "$as_me:9816: \"$ac_try\"") >&5
9817   (eval $ac_try) 2>&5
9818   ac_status=$?
9819   echo "$as_me:9819: \$? = $ac_status" >&5
9820   (exit $ac_status); }; }; then
9821   :
9822 else
9823   echo "$as_me: failed program was:" >&5
9824 cat conftest.$ac_ext >&5
9825 cf_have_incdir=yes
9826 fi
9827 rm -f conftest.$ac_objext conftest.$ac_ext
9828                           CPPFLAGS=$cf_save_CPPFLAGS
9829                         fi
9830                   fi
9831                 fi
9832
9833                 if test "$cf_have_incdir" = no ; then
9834                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9835
9836 echo "${as_me:-configure}:9836: testing adding $cf_add_incdir to include-path ..." 1>&5
9837
9838                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9839
9840                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9841                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9842                   cf_add_incdir="$cf_top_incdir"
9843                 else
9844                   break
9845                 fi
9846           fi
9847         done
9848   done
9849 fi
9850
9851                 for cf_header in \
9852                         ncurses.h \
9853                         curses.h
9854                 do
9855
9856         cat >conftest.$ac_ext <<_ACEOF
9857 #line 9857 "configure"
9858 #include "confdefs.h"
9859
9860 #include <$cf_header>
9861 int
9862 main ()
9863 {
9864
9865 #ifdef NCURSES_VERSION
9866
9867 printf("%s\n", NCURSES_VERSION);
9868 #else
9869 #ifdef __NCURSES_H
9870 printf("old\n");
9871 #else
9872         make an error
9873 #endif
9874 #endif
9875
9876   ;
9877   return 0;
9878 }
9879 _ACEOF
9880 rm -f conftest.$ac_objext
9881 if { (eval echo "$as_me:9881: \"$ac_compile\"") >&5
9882   (eval $ac_compile) 2>&5
9883   ac_status=$?
9884   echo "$as_me:9884: \$? = $ac_status" >&5
9885   (exit $ac_status); } &&
9886          { ac_try='test -s conftest.$ac_objext'
9887   { (eval echo "$as_me:9887: \"$ac_try\"") >&5
9888   (eval $ac_try) 2>&5
9889   ac_status=$?
9890   echo "$as_me:9890: \$? = $ac_status" >&5
9891   (exit $ac_status); }; }; then
9892   cf_cv_ncurses_h2=$cf_header
9893
9894 else
9895   echo "$as_me: failed program was:" >&5
9896 cat conftest.$ac_ext >&5
9897 cf_cv_ncurses_h2=no
9898 fi
9899 rm -f conftest.$ac_objext conftest.$ac_ext
9900
9901                         if test "$cf_cv_ncurses_h2" != no ; then
9902                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9903                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
9904                                 break
9905                         fi
9906                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
9907                 done
9908                 CPPFLAGS="$cf_save2_CPPFLAGS"
9909                 test "$cf_cv_ncurses_h2" != no && break
9910         done
9911         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9911: error: not found" >&5
9912 echo "$as_me: error: not found" >&2;}
9913    { (exit 1); exit 1; }; }
9914
9915 fi
9916 echo "$as_me:9916: result: $cf_cv_ncurses_h2" >&5
9917 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9918
9919         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9920         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9921         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9922                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9923         fi
9924
9925 if test -n "$cf_1st_incdir" ; then
9926   for cf_add_incdir in $cf_1st_incdir
9927   do
9928         while test $cf_add_incdir != /usr/include
9929         do
9930           if test -d $cf_add_incdir
9931           then
9932                 cf_have_incdir=no
9933                 if test -n "$CFLAGS$CPPFLAGS" ; then
9934                   # a loop is needed to ensure we can add subdirs of existing dirs
9935                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9936                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9937                           cf_have_incdir=yes; break
9938                         fi
9939                   done
9940                 fi
9941
9942                 if test "$cf_have_incdir" = no ; then
9943                   if test "$cf_add_incdir" = /usr/local/include ; then
9944                         if test "$GCC" = yes
9945                         then
9946                           cf_save_CPPFLAGS=$CPPFLAGS
9947                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9948                           cat >conftest.$ac_ext <<_ACEOF
9949 #line 9949 "configure"
9950 #include "confdefs.h"
9951 #include <stdio.h>
9952 int
9953 main ()
9954 {
9955 printf("Hello")
9956   ;
9957   return 0;
9958 }
9959 _ACEOF
9960 rm -f conftest.$ac_objext
9961 if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
9962   (eval $ac_compile) 2>&5
9963   ac_status=$?
9964   echo "$as_me:9964: \$? = $ac_status" >&5
9965   (exit $ac_status); } &&
9966          { ac_try='test -s conftest.$ac_objext'
9967   { (eval echo "$as_me:9967: \"$ac_try\"") >&5
9968   (eval $ac_try) 2>&5
9969   ac_status=$?
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit $ac_status); }; }; then
9972   :
9973 else
9974   echo "$as_me: failed program was:" >&5
9975 cat conftest.$ac_ext >&5
9976 cf_have_incdir=yes
9977 fi
9978 rm -f conftest.$ac_objext conftest.$ac_ext
9979                           CPPFLAGS=$cf_save_CPPFLAGS
9980                         fi
9981                   fi
9982                 fi
9983
9984                 if test "$cf_have_incdir" = no ; then
9985                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9986
9987 echo "${as_me:-configure}:9987: testing adding $cf_add_incdir to include-path ..." 1>&5
9988
9989                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9990
9991                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9992                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9993                   cf_add_incdir="$cf_top_incdir"
9994                 else
9995                   break
9996                 fi
9997           fi
9998         done
9999   done
10000 fi
10001
10002 fi
10003
10004 # Set definitions to allow ifdef'ing for ncurses.h
10005
10006 case $cf_cv_ncurses_header in # (vi
10007 *ncurses.h)
10008         cat >>confdefs.h <<\EOF
10009 #define HAVE_NCURSES_H 1
10010 EOF
10011
10012         ;;
10013 esac
10014
10015 case $cf_cv_ncurses_header in # (vi
10016 ncurses/curses.h|ncurses/ncurses.h)
10017         cat >>confdefs.h <<\EOF
10018 #define HAVE_NCURSES_NCURSES_H 1
10019 EOF
10020
10021         ;;
10022 ncursesw/curses.h|ncursesw/ncurses.h)
10023         cat >>confdefs.h <<\EOF
10024 #define HAVE_NCURSESW_NCURSES_H 1
10025 EOF
10026
10027         ;;
10028 esac
10029
10030 echo "$as_me:10030: checking for terminfo header" >&5
10031 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10032 if test "${cf_cv_term_header+set}" = set; then
10033   echo $ECHO_N "(cached) $ECHO_C" >&6
10034 else
10035
10036 case ${cf_cv_ncurses_header} in #(vi
10037 */ncurses.h|*/ncursesw.h) #(vi
10038         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10039         ;;
10040 *)
10041         cf_term_header=term.h
10042         ;;
10043 esac
10044
10045 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10046 do
10047 cat >conftest.$ac_ext <<_ACEOF
10048 #line 10048 "configure"
10049 #include "confdefs.h"
10050 #include <stdio.h>
10051 #include <${cf_cv_ncurses_header:-curses.h}>
10052 #include <$cf_test>
10053
10054 int
10055 main ()
10056 {
10057 int x = auto_left_margin
10058   ;
10059   return 0;
10060 }
10061 _ACEOF
10062 rm -f conftest.$ac_objext
10063 if { (eval echo "$as_me:10063: \"$ac_compile\"") >&5
10064   (eval $ac_compile) 2>&5
10065   ac_status=$?
10066   echo "$as_me:10066: \$? = $ac_status" >&5
10067   (exit $ac_status); } &&
10068          { ac_try='test -s conftest.$ac_objext'
10069   { (eval echo "$as_me:10069: \"$ac_try\"") >&5
10070   (eval $ac_try) 2>&5
10071   ac_status=$?
10072   echo "$as_me:10072: \$? = $ac_status" >&5
10073   (exit $ac_status); }; }; then
10074
10075         cf_cv_term_header="$cf_test"
10076 else
10077   echo "$as_me: failed program was:" >&5
10078 cat conftest.$ac_ext >&5
10079
10080         cf_cv_term_header=unknown
10081
10082 fi
10083 rm -f conftest.$ac_objext conftest.$ac_ext
10084         test "$cf_cv_term_header" != unknown && break
10085 done
10086
10087 fi
10088 echo "$as_me:10088: result: $cf_cv_term_header" >&5
10089 echo "${ECHO_T}$cf_cv_term_header" >&6
10090
10091 # Set definitions to allow ifdef'ing to accommodate subdirectories
10092
10093 case $cf_cv_term_header in # (vi
10094 *term.h)
10095         cat >>confdefs.h <<\EOF
10096 #define HAVE_TERM_H 1
10097 EOF
10098
10099         ;;
10100 esac
10101
10102 case $cf_cv_term_header in # (vi
10103 ncurses/term.h) #(vi
10104         cat >>confdefs.h <<\EOF
10105 #define HAVE_NCURSES_TERM_H 1
10106 EOF
10107
10108         ;;
10109 ncursesw/term.h)
10110         cat >>confdefs.h <<\EOF
10111 #define HAVE_NCURSESW_TERM_H 1
10112 EOF
10113
10114         ;;
10115 esac
10116
10117 # some applications need this, but should check for NCURSES_VERSION
10118 cat >>confdefs.h <<\EOF
10119 #define NCURSES 1
10120 EOF
10121
10122 echo "$as_me:10122: checking for ncurses version" >&5
10123 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10124 if test "${cf_cv_ncurses_version+set}" = set; then
10125   echo $ECHO_N "(cached) $ECHO_C" >&6
10126 else
10127
10128         cf_cv_ncurses_version=no
10129         cf_tempfile=out$$
10130         rm -f $cf_tempfile
10131         if test "$cross_compiling" = yes; then
10132
10133         # This will not work if the preprocessor splits the line after the
10134         # Autoconf token.  The 'unproto' program does that.
10135         cat > conftest.$ac_ext <<EOF
10136 #include <${cf_cv_ncurses_header:-curses.h}>
10137 #undef Autoconf
10138 #ifdef NCURSES_VERSION
10139 Autoconf NCURSES_VERSION
10140 #else
10141 #ifdef __NCURSES_H
10142 Autoconf "old"
10143 #endif
10144 ;
10145 #endif
10146 EOF
10147         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10148         { (eval echo "$as_me:10148: \"$cf_try\"") >&5
10149   (eval $cf_try) 2>&5
10150   ac_status=$?
10151   echo "$as_me:10151: \$? = $ac_status" >&5
10152   (exit $ac_status); }
10153         if test -f conftest.out ; then
10154                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10155                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10156                 rm -f conftest.out
10157         fi
10158
10159 else
10160   cat >conftest.$ac_ext <<_ACEOF
10161 #line 10161 "configure"
10162 #include "confdefs.h"
10163
10164 #include <${cf_cv_ncurses_header:-curses.h}>
10165 #include <stdio.h>
10166 int main()
10167 {
10168         FILE *fp = fopen("$cf_tempfile", "w");
10169 #ifdef NCURSES_VERSION
10170 # ifdef NCURSES_VERSION_PATCH
10171         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10172 # else
10173         fprintf(fp, "%s\n", NCURSES_VERSION);
10174 # endif
10175 #else
10176 # ifdef __NCURSES_H
10177         fprintf(fp, "old\n");
10178 # else
10179         make an error
10180 # endif
10181 #endif
10182         ${cf_cv_main_return:-return}(0);
10183 }
10184 _ACEOF
10185 rm -f conftest$ac_exeext
10186 if { (eval echo "$as_me:10186: \"$ac_link\"") >&5
10187   (eval $ac_link) 2>&5
10188   ac_status=$?
10189   echo "$as_me:10189: \$? = $ac_status" >&5
10190   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10191   { (eval echo "$as_me:10191: \"$ac_try\"") >&5
10192   (eval $ac_try) 2>&5
10193   ac_status=$?
10194   echo "$as_me:10194: \$? = $ac_status" >&5
10195   (exit $ac_status); }; }; then
10196
10197         cf_cv_ncurses_version=`cat $cf_tempfile`
10198 else
10199   echo "$as_me: program exited with status $ac_status" >&5
10200 echo "$as_me: failed program was:" >&5
10201 cat conftest.$ac_ext >&5
10202 fi
10203 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10204 fi
10205         rm -f $cf_tempfile
10206
10207 fi
10208 echo "$as_me:10208: result: $cf_cv_ncurses_version" >&5
10209 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10210 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
10211 #define NCURSES 1
10212 EOF
10213
10214 cf_nculib_root=$use_ncurses
10215         # This works, except for the special case where we find gpm, but
10216         # ncurses is in a nonstandard location via $LIBS, and we really want
10217         # to link gpm.
10218 cf_ncurses_LIBS=""
10219 cf_ncurses_SAVE="$LIBS"
10220 echo "$as_me:10220: checking for Gpm_Open in -lgpm" >&5
10221 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10222 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10223   echo $ECHO_N "(cached) $ECHO_C" >&6
10224 else
10225   ac_check_lib_save_LIBS=$LIBS
10226 LIBS="-lgpm  $LIBS"
10227 cat >conftest.$ac_ext <<_ACEOF
10228 #line 10228 "configure"
10229 #include "confdefs.h"
10230
10231 /* Override any gcc2 internal prototype to avoid an error.  */
10232 #ifdef __cplusplus
10233 extern "C"
10234 #endif
10235 /* We use char because int might match the return type of a gcc2
10236    builtin and then its argument prototype would still apply.  */
10237 char Gpm_Open ();
10238 int
10239 main ()
10240 {
10241 Gpm_Open ();
10242   ;
10243   return 0;
10244 }
10245 _ACEOF
10246 rm -f conftest.$ac_objext conftest$ac_exeext
10247 if { (eval echo "$as_me:10247: \"$ac_link\"") >&5
10248   (eval $ac_link) 2>&5
10249   ac_status=$?
10250   echo "$as_me:10250: \$? = $ac_status" >&5
10251   (exit $ac_status); } &&
10252          { ac_try='test -s conftest$ac_exeext'
10253   { (eval echo "$as_me:10253: \"$ac_try\"") >&5
10254   (eval $ac_try) 2>&5
10255   ac_status=$?
10256   echo "$as_me:10256: \$? = $ac_status" >&5
10257   (exit $ac_status); }; }; then
10258   ac_cv_lib_gpm_Gpm_Open=yes
10259 else
10260   echo "$as_me: failed program was:" >&5
10261 cat conftest.$ac_ext >&5
10262 ac_cv_lib_gpm_Gpm_Open=no
10263 fi
10264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10265 LIBS=$ac_check_lib_save_LIBS
10266 fi
10267 echo "$as_me:10267: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10268 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10269 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10270   echo "$as_me:10270: checking for initscr in -lgpm" >&5
10271 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10272 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10273   echo $ECHO_N "(cached) $ECHO_C" >&6
10274 else
10275   ac_check_lib_save_LIBS=$LIBS
10276 LIBS="-lgpm  $LIBS"
10277 cat >conftest.$ac_ext <<_ACEOF
10278 #line 10278 "configure"
10279 #include "confdefs.h"
10280
10281 /* Override any gcc2 internal prototype to avoid an error.  */
10282 #ifdef __cplusplus
10283 extern "C"
10284 #endif
10285 /* We use char because int might match the return type of a gcc2
10286    builtin and then its argument prototype would still apply.  */
10287 char initscr ();
10288 int
10289 main ()
10290 {
10291 initscr ();
10292   ;
10293   return 0;
10294 }
10295 _ACEOF
10296 rm -f conftest.$ac_objext conftest$ac_exeext
10297 if { (eval echo "$as_me:10297: \"$ac_link\"") >&5
10298   (eval $ac_link) 2>&5
10299   ac_status=$?
10300   echo "$as_me:10300: \$? = $ac_status" >&5
10301   (exit $ac_status); } &&
10302          { ac_try='test -s conftest$ac_exeext'
10303   { (eval echo "$as_me:10303: \"$ac_try\"") >&5
10304   (eval $ac_try) 2>&5
10305   ac_status=$?
10306   echo "$as_me:10306: \$? = $ac_status" >&5
10307   (exit $ac_status); }; }; then
10308   ac_cv_lib_gpm_initscr=yes
10309 else
10310   echo "$as_me: failed program was:" >&5
10311 cat conftest.$ac_ext >&5
10312 ac_cv_lib_gpm_initscr=no
10313 fi
10314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10315 LIBS=$ac_check_lib_save_LIBS
10316 fi
10317 echo "$as_me:10317: result: $ac_cv_lib_gpm_initscr" >&5
10318 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10319 if test $ac_cv_lib_gpm_initscr = yes; then
10320   LIBS="$cf_ncurses_SAVE"
10321 else
10322   cf_ncurses_LIBS="-lgpm"
10323 fi
10324
10325 fi
10326
10327 case $host_os in #(vi
10328 freebsd*)
10329         # This is only necessary if you are linking against an obsolete
10330         # version of ncurses (but it should do no harm, since it's static).
10331         if test "$cf_nculib_root" = ncurses ; then
10332                 echo "$as_me:10332: checking for tgoto in -lmytinfo" >&5
10333 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10334 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10335   echo $ECHO_N "(cached) $ECHO_C" >&6
10336 else
10337   ac_check_lib_save_LIBS=$LIBS
10338 LIBS="-lmytinfo  $LIBS"
10339 cat >conftest.$ac_ext <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342
10343 /* Override any gcc2 internal prototype to avoid an error.  */
10344 #ifdef __cplusplus
10345 extern "C"
10346 #endif
10347 /* We use char because int might match the return type of a gcc2
10348    builtin and then its argument prototype would still apply.  */
10349 char tgoto ();
10350 int
10351 main ()
10352 {
10353 tgoto ();
10354   ;
10355   return 0;
10356 }
10357 _ACEOF
10358 rm -f conftest.$ac_objext conftest$ac_exeext
10359 if { (eval echo "$as_me:10359: \"$ac_link\"") >&5
10360   (eval $ac_link) 2>&5
10361   ac_status=$?
10362   echo "$as_me:10362: \$? = $ac_status" >&5
10363   (exit $ac_status); } &&
10364          { ac_try='test -s conftest$ac_exeext'
10365   { (eval echo "$as_me:10365: \"$ac_try\"") >&5
10366   (eval $ac_try) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit $ac_status); }; }; then
10370   ac_cv_lib_mytinfo_tgoto=yes
10371 else
10372   echo "$as_me: failed program was:" >&5
10373 cat conftest.$ac_ext >&5
10374 ac_cv_lib_mytinfo_tgoto=no
10375 fi
10376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10377 LIBS=$ac_check_lib_save_LIBS
10378 fi
10379 echo "$as_me:10379: result: $ac_cv_lib_mytinfo_tgoto" >&5
10380 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10381 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10382   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10383 fi
10384
10385         fi
10386         ;;
10387 esac
10388
10389 LIBS="$cf_ncurses_LIBS $LIBS"
10390
10391 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10392 then
10393         LIBS="-l$cf_nculib_root $LIBS"
10394 else
10395
10396         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10397         cf_libdir=""
10398         echo "$as_me:10398: checking for initscr" >&5
10399 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10400 if test "${ac_cv_func_initscr+set}" = set; then
10401   echo $ECHO_N "(cached) $ECHO_C" >&6
10402 else
10403   cat >conftest.$ac_ext <<_ACEOF
10404 #line 10404 "configure"
10405 #include "confdefs.h"
10406 /* System header to define __stub macros and hopefully few prototypes,
10407     which can conflict with char initscr (); below.  */
10408 #include <assert.h>
10409 /* Override any gcc2 internal prototype to avoid an error.  */
10410 #ifdef __cplusplus
10411 extern "C"
10412 #endif
10413 /* We use char because int might match the return type of a gcc2
10414    builtin and then its argument prototype would still apply.  */
10415 char initscr ();
10416 char (*f) ();
10417
10418 int
10419 main ()
10420 {
10421 /* The GNU C library defines this for functions which it implements
10422     to always fail with ENOSYS.  Some functions are actually named
10423     something starting with __ and the normal name is an alias.  */
10424 #if defined (__stub_initscr) || defined (__stub___initscr)
10425 choke me
10426 #else
10427 f = initscr;
10428 #endif
10429
10430   ;
10431   return 0;
10432 }
10433 _ACEOF
10434 rm -f conftest.$ac_objext conftest$ac_exeext
10435 if { (eval echo "$as_me:10435: \"$ac_link\"") >&5
10436   (eval $ac_link) 2>&5
10437   ac_status=$?
10438   echo "$as_me:10438: \$? = $ac_status" >&5
10439   (exit $ac_status); } &&
10440          { ac_try='test -s conftest$ac_exeext'
10441   { (eval echo "$as_me:10441: \"$ac_try\"") >&5
10442   (eval $ac_try) 2>&5
10443   ac_status=$?
10444   echo "$as_me:10444: \$? = $ac_status" >&5
10445   (exit $ac_status); }; }; then
10446   ac_cv_func_initscr=yes
10447 else
10448   echo "$as_me: failed program was:" >&5
10449 cat conftest.$ac_ext >&5
10450 ac_cv_func_initscr=no
10451 fi
10452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10453 fi
10454 echo "$as_me:10454: result: $ac_cv_func_initscr" >&5
10455 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10456 if test $ac_cv_func_initscr = yes; then
10457   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10458 else
10459
10460                 cf_save_LIBS="$LIBS"
10461                 echo "$as_me:10461: checking for initscr in -l$cf_nculib_root" >&5
10462 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10463                 LIBS="-l$cf_nculib_root $LIBS"
10464                 cat >conftest.$ac_ext <<_ACEOF
10465 #line 10465 "configure"
10466 #include "confdefs.h"
10467 #include <${cf_cv_ncurses_header:-curses.h}>
10468 int
10469 main ()
10470 {
10471 initscr()
10472   ;
10473   return 0;
10474 }
10475 _ACEOF
10476 rm -f conftest.$ac_objext conftest$ac_exeext
10477 if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
10478   (eval $ac_link) 2>&5
10479   ac_status=$?
10480   echo "$as_me:10480: \$? = $ac_status" >&5
10481   (exit $ac_status); } &&
10482          { ac_try='test -s conftest$ac_exeext'
10483   { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484   (eval $ac_try) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); }; }; then
10488   echo "$as_me:10488: result: yes" >&5
10489 echo "${ECHO_T}yes" >&6
10490                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10491
10492 else
10493   echo "$as_me: failed program was:" >&5
10494 cat conftest.$ac_ext >&5
10495 echo "$as_me:10495: result: no" >&5
10496 echo "${ECHO_T}no" >&6
10497
10498 cf_search=
10499 cf_library_path_list=""
10500 if test -n "${LDFLAGS}${LIBS}" ; then
10501         for cf_library_path in $LDFLAGS $LIBS
10502         do
10503                 case $cf_library_path in #(vi
10504                 -L*)
10505                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10506
10507 test "$cf_library_path" != "NONE" && \
10508 test -d "$cf_library_path" && \
10509  {
10510         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10511         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10512         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10513         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10514         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10515         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
10516 }
10517
10518                         cf_library_path_list="$cf_library_path_list $cf_search"
10519                         ;;
10520                 esac
10521         done
10522 fi
10523
10524 cf_search=
10525
10526 test "/usr" != "$prefix" && \
10527 test -d "/usr" && \
10528 (test $prefix = NONE || test "/usr" != "$prefix") && {
10529         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
10530         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
10531         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
10532         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
10533         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
10534         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
10535 }
10536
10537 test "$prefix" != "NONE" && \
10538 test -d "$prefix" && \
10539  {
10540         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10541         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10542         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10543         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10544         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10545         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10546 }
10547
10548 test "/usr/local" != "$prefix" && \
10549 test -d "/usr/local" && \
10550 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
10551         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
10552         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
10553         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
10554         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
10555         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
10556         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
10557 }
10558
10559 test "/opt" != "$prefix" && \
10560 test -d "/opt" && \
10561 (test $prefix = NONE || test "/opt" != "$prefix") && {
10562         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
10563         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
10564         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
10565         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
10566         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
10567         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
10568 }
10569
10570 test "$HOME" != "$prefix" && \
10571 test -d "$HOME" && \
10572 (test $prefix = NONE || test "$HOME" != "$prefix") && {
10573         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
10574         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
10575         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
10576         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
10577         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
10578         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
10579 }
10580
10581 cf_search="$cf_library_path_list $cf_search"
10582
10583                         for cf_libdir in $cf_search
10584                         do
10585                                 echo "$as_me:10585: checking for -l$cf_nculib_root in $cf_libdir" >&5
10586 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10587                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10588                                 cat >conftest.$ac_ext <<_ACEOF
10589 #line 10589 "configure"
10590 #include "confdefs.h"
10591 #include <${cf_cv_ncurses_header:-curses.h}>
10592 int
10593 main ()
10594 {
10595 initscr()
10596   ;
10597   return 0;
10598 }
10599 _ACEOF
10600 rm -f conftest.$ac_objext conftest$ac_exeext
10601 if { (eval echo "$as_me:10601: \"$ac_link\"") >&5
10602   (eval $ac_link) 2>&5
10603   ac_status=$?
10604   echo "$as_me:10604: \$? = $ac_status" >&5
10605   (exit $ac_status); } &&
10606          { ac_try='test -s conftest$ac_exeext'
10607   { (eval echo "$as_me:10607: \"$ac_try\"") >&5
10608   (eval $ac_try) 2>&5
10609   ac_status=$?
10610   echo "$as_me:10610: \$? = $ac_status" >&5
10611   (exit $ac_status); }; }; then
10612   echo "$as_me:10612: result: yes" >&5
10613 echo "${ECHO_T}yes" >&6
10614                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10615                                          break
10616 else
10617   echo "$as_me: failed program was:" >&5
10618 cat conftest.$ac_ext >&5
10619 echo "$as_me:10619: result: no" >&5
10620 echo "${ECHO_T}no" >&6
10621                                          LIBS="$cf_save_LIBS"
10622 fi
10623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10624                         done
10625
10626 fi
10627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10628
10629 fi
10630
10631 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10632
10633 if test $cf_found_library = no ; then
10634         { { echo "$as_me:10634: error: Cannot link $cf_nculib_root library" >&5
10635 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10636    { (exit 1); exit 1; }; }
10637 fi
10638
10639 fi
10640
10641 if test -n "$cf_ncurses_LIBS" ; then
10642         echo "$as_me:10642: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10643 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10644         cf_ncurses_SAVE="$LIBS"
10645         for p in $cf_ncurses_LIBS ; do
10646                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10647                 if test "$q" != "$LIBS" ; then
10648                         LIBS="$q"
10649                 fi
10650         done
10651         cat >conftest.$ac_ext <<_ACEOF
10652 #line 10652 "configure"
10653 #include "confdefs.h"
10654 #include <${cf_cv_ncurses_header:-curses.h}>
10655 int
10656 main ()
10657 {
10658 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10659   ;
10660   return 0;
10661 }
10662 _ACEOF
10663 rm -f conftest.$ac_objext conftest$ac_exeext
10664 if { (eval echo "$as_me:10664: \"$ac_link\"") >&5
10665   (eval $ac_link) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit $ac_status); } &&
10669          { ac_try='test -s conftest$ac_exeext'
10670   { (eval echo "$as_me:10670: \"$ac_try\"") >&5
10671   (eval $ac_try) 2>&5
10672   ac_status=$?
10673   echo "$as_me:10673: \$? = $ac_status" >&5
10674   (exit $ac_status); }; }; then
10675   echo "$as_me:10675: result: yes" >&5
10676 echo "${ECHO_T}yes" >&6
10677 else
10678   echo "$as_me: failed program was:" >&5
10679 cat conftest.$ac_ext >&5
10680 echo "$as_me:10680: result: no" >&5
10681 echo "${ECHO_T}no" >&6
10682                  LIBS="$cf_ncurses_SAVE"
10683 fi
10684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10685 fi
10686
10687 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10688
10689 cat >>confdefs.h <<EOF
10690 #define $cf_nculib_ROOT 1
10691 EOF
10692
10693 fi
10694
10695 else
10696         cf_wide_curses=no
10697
10698 echo "$as_me:10698: checking for extra include directories" >&5
10699 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
10700 if test "${cf_cv_curses_incdir+set}" = set; then
10701   echo $ECHO_N "(cached) $ECHO_C" >&6
10702 else
10703
10704 cf_cv_curses_incdir=no
10705 case $host_os in #(vi
10706 hpux10.*) #(vi
10707         if test "x$cf_cv_screen" = "xcurses_colr"
10708         then
10709                 test -d /usr/include/curses_colr && \
10710                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
10711         fi
10712         ;;
10713 sunos3*|sunos4*)
10714         if test "x$cf_cv_screen" = "xcurses_5lib"
10715         then
10716                 test -d /usr/5lib && \
10717                 test -d /usr/5include && \
10718                 cf_cv_curses_incdir="-I/usr/5include"
10719         fi
10720         ;;
10721 esac
10722
10723 fi
10724 echo "$as_me:10724: result: $cf_cv_curses_incdir" >&5
10725 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
10726 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
10727
10728 echo "$as_me:10728: checking if we have identified curses headers" >&5
10729 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10730 if test "${cf_cv_ncurses_header+set}" = set; then
10731   echo $ECHO_N "(cached) $ECHO_C" >&6
10732 else
10733
10734 cf_cv_ncurses_header=none
10735 for cf_header in  \
10736         ncurses.h \
10737         curses.h ncurses/ncurses.h ncurses/curses.h
10738 do
10739 cat >conftest.$ac_ext <<_ACEOF
10740 #line 10740 "configure"
10741 #include "confdefs.h"
10742 #include <${cf_header}>
10743 int
10744 main ()
10745 {
10746 initscr(); tgoto("?", 0,0)
10747   ;
10748   return 0;
10749 }
10750 _ACEOF
10751 rm -f conftest.$ac_objext
10752 if { (eval echo "$as_me:10752: \"$ac_compile\"") >&5
10753   (eval $ac_compile) 2>&5
10754   ac_status=$?
10755   echo "$as_me:10755: \$? = $ac_status" >&5
10756   (exit $ac_status); } &&
10757          { ac_try='test -s conftest.$ac_objext'
10758   { (eval echo "$as_me:10758: \"$ac_try\"") >&5
10759   (eval $ac_try) 2>&5
10760   ac_status=$?
10761   echo "$as_me:10761: \$? = $ac_status" >&5
10762   (exit $ac_status); }; }; then
10763   cf_cv_ncurses_header=$cf_header; break
10764 else
10765   echo "$as_me: failed program was:" >&5
10766 cat conftest.$ac_ext >&5
10767 fi
10768 rm -f conftest.$ac_objext conftest.$ac_ext
10769 done
10770
10771 fi
10772 echo "$as_me:10772: result: $cf_cv_ncurses_header" >&5
10773 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10774
10775 if test "$cf_cv_ncurses_header" = none ; then
10776         { { echo "$as_me:10776: error: No curses header-files found" >&5
10777 echo "$as_me: error: No curses header-files found" >&2;}
10778    { (exit 1); exit 1; }; }
10779 fi
10780
10781 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10782
10783 for ac_header in $cf_cv_ncurses_header
10784 do
10785 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10786 echo "$as_me:10786: checking for $ac_header" >&5
10787 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10788 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10789   echo $ECHO_N "(cached) $ECHO_C" >&6
10790 else
10791   cat >conftest.$ac_ext <<_ACEOF
10792 #line 10792 "configure"
10793 #include "confdefs.h"
10794 #include <$ac_header>
10795 _ACEOF
10796 if { (eval echo "$as_me:10796: \"$ac_cpp conftest.$ac_ext\"") >&5
10797   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10798   ac_status=$?
10799   egrep -v '^ *\+' conftest.er1 >conftest.err
10800   rm -f conftest.er1
10801   cat conftest.err >&5
10802   echo "$as_me:10802: \$? = $ac_status" >&5
10803   (exit $ac_status); } >/dev/null; then
10804   if test -s conftest.err; then
10805     ac_cpp_err=$ac_c_preproc_warn_flag
10806   else
10807     ac_cpp_err=
10808   fi
10809 else
10810   ac_cpp_err=yes
10811 fi
10812 if test -z "$ac_cpp_err"; then
10813   eval "$as_ac_Header=yes"
10814 else
10815   echo "$as_me: failed program was:" >&5
10816   cat conftest.$ac_ext >&5
10817   eval "$as_ac_Header=no"
10818 fi
10819 rm -f conftest.err conftest.$ac_ext
10820 fi
10821 echo "$as_me:10821: result: `eval echo '${'$as_ac_Header'}'`" >&5
10822 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10823 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10824   cat >>confdefs.h <<EOF
10825 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10826 EOF
10827
10828 fi
10829 done
10830
10831 echo "$as_me:10831: checking for terminfo header" >&5
10832 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10833 if test "${cf_cv_term_header+set}" = set; then
10834   echo $ECHO_N "(cached) $ECHO_C" >&6
10835 else
10836
10837 case ${cf_cv_ncurses_header} in #(vi
10838 */ncurses.h|*/ncursesw.h) #(vi
10839         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10840         ;;
10841 *)
10842         cf_term_header=term.h
10843         ;;
10844 esac
10845
10846 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10847 do
10848 cat >conftest.$ac_ext <<_ACEOF
10849 #line 10849 "configure"
10850 #include "confdefs.h"
10851 #include <stdio.h>
10852 #include <${cf_cv_ncurses_header:-curses.h}>
10853 #include <$cf_test>
10854
10855 int
10856 main ()
10857 {
10858 int x = auto_left_margin
10859   ;
10860   return 0;
10861 }
10862 _ACEOF
10863 rm -f conftest.$ac_objext
10864 if { (eval echo "$as_me:10864: \"$ac_compile\"") >&5
10865   (eval $ac_compile) 2>&5
10866   ac_status=$?
10867   echo "$as_me:10867: \$? = $ac_status" >&5
10868   (exit $ac_status); } &&
10869          { ac_try='test -s conftest.$ac_objext'
10870   { (eval echo "$as_me:10870: \"$ac_try\"") >&5
10871   (eval $ac_try) 2>&5
10872   ac_status=$?
10873   echo "$as_me:10873: \$? = $ac_status" >&5
10874   (exit $ac_status); }; }; then
10875
10876         cf_cv_term_header="$cf_test"
10877 else
10878   echo "$as_me: failed program was:" >&5
10879 cat conftest.$ac_ext >&5
10880
10881         cf_cv_term_header=unknown
10882
10883 fi
10884 rm -f conftest.$ac_objext conftest.$ac_ext
10885         test "$cf_cv_term_header" != unknown && break
10886 done
10887
10888 fi
10889 echo "$as_me:10889: result: $cf_cv_term_header" >&5
10890 echo "${ECHO_T}$cf_cv_term_header" >&6
10891
10892 # Set definitions to allow ifdef'ing to accommodate subdirectories
10893
10894 case $cf_cv_term_header in # (vi
10895 *term.h)
10896         cat >>confdefs.h <<\EOF
10897 #define HAVE_TERM_H 1
10898 EOF
10899
10900         ;;
10901 esac
10902
10903 case $cf_cv_term_header in # (vi
10904 ncurses/term.h) #(vi
10905         cat >>confdefs.h <<\EOF
10906 #define HAVE_NCURSES_TERM_H 1
10907 EOF
10908
10909         ;;
10910 ncursesw/term.h)
10911         cat >>confdefs.h <<\EOF
10912 #define HAVE_NCURSESW_TERM_H 1
10913 EOF
10914
10915         ;;
10916 esac
10917
10918 echo "$as_me:10918: checking for ncurses version" >&5
10919 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10920 if test "${cf_cv_ncurses_version+set}" = set; then
10921   echo $ECHO_N "(cached) $ECHO_C" >&6
10922 else
10923
10924         cf_cv_ncurses_version=no
10925         cf_tempfile=out$$
10926         rm -f $cf_tempfile
10927         if test "$cross_compiling" = yes; then
10928
10929         # This will not work if the preprocessor splits the line after the
10930         # Autoconf token.  The 'unproto' program does that.
10931         cat > conftest.$ac_ext <<EOF
10932 #include <${cf_cv_ncurses_header:-curses.h}>
10933 #undef Autoconf
10934 #ifdef NCURSES_VERSION
10935 Autoconf NCURSES_VERSION
10936 #else
10937 #ifdef __NCURSES_H
10938 Autoconf "old"
10939 #endif
10940 ;
10941 #endif
10942 EOF
10943         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10944         { (eval echo "$as_me:10944: \"$cf_try\"") >&5
10945   (eval $cf_try) 2>&5
10946   ac_status=$?
10947   echo "$as_me:10947: \$? = $ac_status" >&5
10948   (exit $ac_status); }
10949         if test -f conftest.out ; then
10950                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10951                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10952                 rm -f conftest.out
10953         fi
10954
10955 else
10956   cat >conftest.$ac_ext <<_ACEOF
10957 #line 10957 "configure"
10958 #include "confdefs.h"
10959
10960 #include <${cf_cv_ncurses_header:-curses.h}>
10961 #include <stdio.h>
10962 int main()
10963 {
10964         FILE *fp = fopen("$cf_tempfile", "w");
10965 #ifdef NCURSES_VERSION
10966 # ifdef NCURSES_VERSION_PATCH
10967         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10968 # else
10969         fprintf(fp, "%s\n", NCURSES_VERSION);
10970 # endif
10971 #else
10972 # ifdef __NCURSES_H
10973         fprintf(fp, "old\n");
10974 # else
10975         make an error
10976 # endif
10977 #endif
10978         ${cf_cv_main_return:-return}(0);
10979 }
10980 _ACEOF
10981 rm -f conftest$ac_exeext
10982 if { (eval echo "$as_me:10982: \"$ac_link\"") >&5
10983   (eval $ac_link) 2>&5
10984   ac_status=$?
10985   echo "$as_me:10985: \$? = $ac_status" >&5
10986   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10987   { (eval echo "$as_me:10987: \"$ac_try\"") >&5
10988   (eval $ac_try) 2>&5
10989   ac_status=$?
10990   echo "$as_me:10990: \$? = $ac_status" >&5
10991   (exit $ac_status); }; }; then
10992
10993         cf_cv_ncurses_version=`cat $cf_tempfile`
10994 else
10995   echo "$as_me: program exited with status $ac_status" >&5
10996 echo "$as_me: failed program was:" >&5
10997 cat conftest.$ac_ext >&5
10998 fi
10999 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11000 fi
11001         rm -f $cf_tempfile
11002
11003 fi
11004 echo "$as_me:11004: result: $cf_cv_ncurses_version" >&5
11005 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11006 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
11007 #define NCURSES 1
11008 EOF
11009
11010 echo "$as_me:11010: checking if we have identified curses libraries" >&5
11011 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
11012 cat >conftest.$ac_ext <<_ACEOF
11013 #line 11013 "configure"
11014 #include "confdefs.h"
11015 #include <${cf_cv_ncurses_header:-curses.h}>
11016 int
11017 main ()
11018 {
11019 initscr(); tgoto("?", 0,0)
11020   ;
11021   return 0;
11022 }
11023 _ACEOF
11024 rm -f conftest.$ac_objext conftest$ac_exeext
11025 if { (eval echo "$as_me:11025: \"$ac_link\"") >&5
11026   (eval $ac_link) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit $ac_status); } &&
11030          { ac_try='test -s conftest$ac_exeext'
11031   { (eval echo "$as_me:11031: \"$ac_try\"") >&5
11032   (eval $ac_try) 2>&5
11033   ac_status=$?
11034   echo "$as_me:11034: \$? = $ac_status" >&5
11035   (exit $ac_status); }; }; then
11036   cf_result=yes
11037 else
11038   echo "$as_me: failed program was:" >&5
11039 cat conftest.$ac_ext >&5
11040 cf_result=no
11041 fi
11042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11043 echo "$as_me:11043: result: $cf_result" >&5
11044 echo "${ECHO_T}$cf_result" >&6
11045
11046 if test "$cf_result" = no ; then
11047 case $host_os in #(vi
11048 freebsd*) #(vi
11049     echo "$as_me:11049: checking for tgoto in -lmytinfo" >&5
11050 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11051 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11052   echo $ECHO_N "(cached) $ECHO_C" >&6
11053 else
11054   ac_check_lib_save_LIBS=$LIBS
11055 LIBS="-lmytinfo  $LIBS"
11056 cat >conftest.$ac_ext <<_ACEOF
11057 #line 11057 "configure"
11058 #include "confdefs.h"
11059
11060 /* Override any gcc2 internal prototype to avoid an error.  */
11061 #ifdef __cplusplus
11062 extern "C"
11063 #endif
11064 /* We use char because int might match the return type of a gcc2
11065    builtin and then its argument prototype would still apply.  */
11066 char tgoto ();
11067 int
11068 main ()
11069 {
11070 tgoto ();
11071   ;
11072   return 0;
11073 }
11074 _ACEOF
11075 rm -f conftest.$ac_objext conftest$ac_exeext
11076 if { (eval echo "$as_me:11076: \"$ac_link\"") >&5
11077   (eval $ac_link) 2>&5
11078   ac_status=$?
11079   echo "$as_me:11079: \$? = $ac_status" >&5
11080   (exit $ac_status); } &&
11081          { ac_try='test -s conftest$ac_exeext'
11082   { (eval echo "$as_me:11082: \"$ac_try\"") >&5
11083   (eval $ac_try) 2>&5
11084   ac_status=$?
11085   echo "$as_me:11085: \$? = $ac_status" >&5
11086   (exit $ac_status); }; }; then
11087   ac_cv_lib_mytinfo_tgoto=yes
11088 else
11089   echo "$as_me: failed program was:" >&5
11090 cat conftest.$ac_ext >&5
11091 ac_cv_lib_mytinfo_tgoto=no
11092 fi
11093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11094 LIBS=$ac_check_lib_save_LIBS
11095 fi
11096 echo "$as_me:11096: result: $ac_cv_lib_mytinfo_tgoto" >&5
11097 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11098 if test $ac_cv_lib_mytinfo_tgoto = yes; then
11099   LIBS="-lmytinfo $LIBS"
11100 fi
11101
11102     ;;
11103 hpux10.*) #(vi
11104         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
11105         # next (1998), and xcurses "newer" (2000).  There is no header file for
11106         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
11107         # term.h) for cur_colr
11108         if test "x$cf_cv_screen" = "xcurses_colr"
11109         then
11110                 echo "$as_me:11110: checking for initscr in -lcur_colr" >&5
11111 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
11112 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
11113   echo $ECHO_N "(cached) $ECHO_C" >&6
11114 else
11115   ac_check_lib_save_LIBS=$LIBS
11116 LIBS="-lcur_colr  $LIBS"
11117 cat >conftest.$ac_ext <<_ACEOF
11118 #line 11118 "configure"
11119 #include "confdefs.h"
11120
11121 /* Override any gcc2 internal prototype to avoid an error.  */
11122 #ifdef __cplusplus
11123 extern "C"
11124 #endif
11125 /* We use char because int might match the return type of a gcc2
11126    builtin and then its argument prototype would still apply.  */
11127 char initscr ();
11128 int
11129 main ()
11130 {
11131 initscr ();
11132   ;
11133   return 0;
11134 }
11135 _ACEOF
11136 rm -f conftest.$ac_objext conftest$ac_exeext
11137 if { (eval echo "$as_me:11137: \"$ac_link\"") >&5
11138   (eval $ac_link) 2>&5
11139   ac_status=$?
11140   echo "$as_me:11140: \$? = $ac_status" >&5
11141   (exit $ac_status); } &&
11142          { ac_try='test -s conftest$ac_exeext'
11143   { (eval echo "$as_me:11143: \"$ac_try\"") >&5
11144   (eval $ac_try) 2>&5
11145   ac_status=$?
11146   echo "$as_me:11146: \$? = $ac_status" >&5
11147   (exit $ac_status); }; }; then
11148   ac_cv_lib_cur_colr_initscr=yes
11149 else
11150   echo "$as_me: failed program was:" >&5
11151 cat conftest.$ac_ext >&5
11152 ac_cv_lib_cur_colr_initscr=no
11153 fi
11154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11155 LIBS=$ac_check_lib_save_LIBS
11156 fi
11157 echo "$as_me:11157: result: $ac_cv_lib_cur_colr_initscr" >&5
11158 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
11159 if test $ac_cv_lib_cur_colr_initscr = yes; then
11160
11161                         LIBS="-lcur_colr $LIBS"
11162                         ac_cv_func_initscr=yes
11163
11164 else
11165
11166                 echo "$as_me:11166: checking for initscr in -lHcurses" >&5
11167 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
11168 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
11169   echo $ECHO_N "(cached) $ECHO_C" >&6
11170 else
11171   ac_check_lib_save_LIBS=$LIBS
11172 LIBS="-lHcurses  $LIBS"
11173 cat >conftest.$ac_ext <<_ACEOF
11174 #line 11174 "configure"
11175 #include "confdefs.h"
11176
11177 /* Override any gcc2 internal prototype to avoid an error.  */
11178 #ifdef __cplusplus
11179 extern "C"
11180 #endif
11181 /* We use char because int might match the return type of a gcc2
11182    builtin and then its argument prototype would still apply.  */
11183 char initscr ();
11184 int
11185 main ()
11186 {
11187 initscr ();
11188   ;
11189   return 0;
11190 }
11191 _ACEOF
11192 rm -f conftest.$ac_objext conftest$ac_exeext
11193 if { (eval echo "$as_me:11193: \"$ac_link\"") >&5
11194   (eval $ac_link) 2>&5
11195   ac_status=$?
11196   echo "$as_me:11196: \$? = $ac_status" >&5
11197   (exit $ac_status); } &&
11198          { ac_try='test -s conftest$ac_exeext'
11199   { (eval echo "$as_me:11199: \"$ac_try\"") >&5
11200   (eval $ac_try) 2>&5
11201   ac_status=$?
11202   echo "$as_me:11202: \$? = $ac_status" >&5
11203   (exit $ac_status); }; }; then
11204   ac_cv_lib_Hcurses_initscr=yes
11205 else
11206   echo "$as_me: failed program was:" >&5
11207 cat conftest.$ac_ext >&5
11208 ac_cv_lib_Hcurses_initscr=no
11209 fi
11210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11211 LIBS=$ac_check_lib_save_LIBS
11212 fi
11213 echo "$as_me:11213: result: $ac_cv_lib_Hcurses_initscr" >&5
11214 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
11215 if test $ac_cv_lib_Hcurses_initscr = yes; then
11216
11217                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
11218                         LIBS="-lHcurses $LIBS"
11219                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
11220                         ac_cv_func_initscr=yes
11221
11222 fi
11223
11224 fi
11225
11226         fi
11227     ;;
11228 linux*)
11229         case `arch 2>/dev/null` in
11230         x86_64)
11231                 if test -d /lib64
11232                 then
11233
11234 if test -n "/lib64" ; then
11235   for cf_add_libdir in /lib64
11236   do
11237     if test $cf_add_libdir = /usr/lib ; then
11238       :
11239     elif test -d $cf_add_libdir
11240     then
11241       cf_have_libdir=no
11242       if test -n "$LDFLAGS$LIBS" ; then
11243         # a loop is needed to ensure we can add subdirs of existing dirs
11244         for cf_test_libdir in $LDFLAGS $LIBS ; do
11245           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11246             cf_have_libdir=yes; break
11247           fi
11248         done
11249       fi
11250       if test "$cf_have_libdir" = no ; then
11251         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11252
11253 echo "${as_me:-configure}:11253: testing adding $cf_add_libdir to library-path ..." 1>&5
11254
11255         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11256       fi
11257     fi
11258   done
11259 fi
11260
11261                 else
11262
11263 if test -n "/lib" ; then
11264   for cf_add_libdir in /lib
11265   do
11266     if test $cf_add_libdir = /usr/lib ; then
11267       :
11268     elif test -d $cf_add_libdir
11269     then
11270       cf_have_libdir=no
11271       if test -n "$LDFLAGS$LIBS" ; then
11272         # a loop is needed to ensure we can add subdirs of existing dirs
11273         for cf_test_libdir in $LDFLAGS $LIBS ; do
11274           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11275             cf_have_libdir=yes; break
11276           fi
11277         done
11278       fi
11279       if test "$cf_have_libdir" = no ; then
11280         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11281
11282 echo "${as_me:-configure}:11282: testing adding $cf_add_libdir to library-path ..." 1>&5
11283
11284         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11285       fi
11286     fi
11287   done
11288 fi
11289
11290                 fi
11291                 ;;
11292         *)
11293
11294 if test -n "/lib" ; then
11295   for cf_add_libdir in /lib
11296   do
11297     if test $cf_add_libdir = /usr/lib ; then
11298       :
11299     elif test -d $cf_add_libdir
11300     then
11301       cf_have_libdir=no
11302       if test -n "$LDFLAGS$LIBS" ; then
11303         # a loop is needed to ensure we can add subdirs of existing dirs
11304         for cf_test_libdir in $LDFLAGS $LIBS ; do
11305           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11306             cf_have_libdir=yes; break
11307           fi
11308         done
11309       fi
11310       if test "$cf_have_libdir" = no ; then
11311         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11312
11313 echo "${as_me:-configure}:11313: testing adding $cf_add_libdir to library-path ..." 1>&5
11314
11315         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11316       fi
11317     fi
11318   done
11319 fi
11320
11321                 ;;
11322         esac
11323     ;;
11324 sunos3*|sunos4*)
11325         if test "x$cf_cv_screen" = "xcurses_5lib"
11326         then
11327                 if test -d /usr/5lib ; then
11328
11329 if test -n "/usr/5lib" ; then
11330   for cf_add_libdir in /usr/5lib
11331   do
11332     if test $cf_add_libdir = /usr/lib ; then
11333       :
11334     elif test -d $cf_add_libdir
11335     then
11336       cf_have_libdir=no
11337       if test -n "$LDFLAGS$LIBS" ; then
11338         # a loop is needed to ensure we can add subdirs of existing dirs
11339         for cf_test_libdir in $LDFLAGS $LIBS ; do
11340           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11341             cf_have_libdir=yes; break
11342           fi
11343         done
11344       fi
11345       if test "$cf_have_libdir" = no ; then
11346         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11347
11348 echo "${as_me:-configure}:11348: testing adding $cf_add_libdir to library-path ..." 1>&5
11349
11350         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11351       fi
11352     fi
11353   done
11354 fi
11355
11356                         LIBS="-lcurses -ltermcap $LIBS"
11357                 fi
11358     fi
11359     ac_cv_func_initscr=yes
11360     ;;
11361 esac
11362
11363 if test ".$ac_cv_func_initscr" != .yes ; then
11364     cf_save_LIBS="$LIBS"
11365     cf_term_lib=""
11366     cf_curs_lib=""
11367
11368     if test ".${cf_cv_ncurses_version:-no}" != .no
11369     then
11370         cf_check_list="ncurses curses cursesX"
11371     else
11372         cf_check_list="cursesX curses ncurses"
11373     fi
11374
11375     # Check for library containing tgoto.  Do this before curses library
11376     # because it may be needed to link the test-case for initscr.
11377     echo "$as_me:11377: checking for tgoto" >&5
11378 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
11379 if test "${ac_cv_func_tgoto+set}" = set; then
11380   echo $ECHO_N "(cached) $ECHO_C" >&6
11381 else
11382   cat >conftest.$ac_ext <<_ACEOF
11383 #line 11383 "configure"
11384 #include "confdefs.h"
11385 /* System header to define __stub macros and hopefully few prototypes,
11386     which can conflict with char tgoto (); below.  */
11387 #include <assert.h>
11388 /* Override any gcc2 internal prototype to avoid an error.  */
11389 #ifdef __cplusplus
11390 extern "C"
11391 #endif
11392 /* We use char because int might match the return type of a gcc2
11393    builtin and then its argument prototype would still apply.  */
11394 char tgoto ();
11395 char (*f) ();
11396
11397 int
11398 main ()
11399 {
11400 /* The GNU C library defines this for functions which it implements
11401     to always fail with ENOSYS.  Some functions are actually named
11402     something starting with __ and the normal name is an alias.  */
11403 #if defined (__stub_tgoto) || defined (__stub___tgoto)
11404 choke me
11405 #else
11406 f = tgoto;
11407 #endif
11408
11409   ;
11410   return 0;
11411 }
11412 _ACEOF
11413 rm -f conftest.$ac_objext conftest$ac_exeext
11414 if { (eval echo "$as_me:11414: \"$ac_link\"") >&5
11415   (eval $ac_link) 2>&5
11416   ac_status=$?
11417   echo "$as_me:11417: \$? = $ac_status" >&5
11418   (exit $ac_status); } &&
11419          { ac_try='test -s conftest$ac_exeext'
11420   { (eval echo "$as_me:11420: \"$ac_try\"") >&5
11421   (eval $ac_try) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit $ac_status); }; }; then
11425   ac_cv_func_tgoto=yes
11426 else
11427   echo "$as_me: failed program was:" >&5
11428 cat conftest.$ac_ext >&5
11429 ac_cv_func_tgoto=no
11430 fi
11431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11432 fi
11433 echo "$as_me:11433: result: $ac_cv_func_tgoto" >&5
11434 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
11435 if test $ac_cv_func_tgoto = yes; then
11436   cf_term_lib=predefined
11437 else
11438
11439         for cf_term_lib in $cf_check_list termcap termlib unknown
11440         do
11441             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
11442 echo "$as_me:11442: checking for tgoto in -l$cf_term_lib" >&5
11443 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
11444 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
11445   echo $ECHO_N "(cached) $ECHO_C" >&6
11446 else
11447   ac_check_lib_save_LIBS=$LIBS
11448 LIBS="-l$cf_term_lib  $LIBS"
11449 cat >conftest.$ac_ext <<_ACEOF
11450 #line 11450 "configure"
11451 #include "confdefs.h"
11452
11453 /* Override any gcc2 internal prototype to avoid an error.  */
11454 #ifdef __cplusplus
11455 extern "C"
11456 #endif
11457 /* We use char because int might match the return type of a gcc2
11458    builtin and then its argument prototype would still apply.  */
11459 char tgoto ();
11460 int
11461 main ()
11462 {
11463 tgoto ();
11464   ;
11465   return 0;
11466 }
11467 _ACEOF
11468 rm -f conftest.$ac_objext conftest$ac_exeext
11469 if { (eval echo "$as_me:11469: \"$ac_link\"") >&5
11470   (eval $ac_link) 2>&5
11471   ac_status=$?
11472   echo "$as_me:11472: \$? = $ac_status" >&5
11473   (exit $ac_status); } &&
11474          { ac_try='test -s conftest$ac_exeext'
11475   { (eval echo "$as_me:11475: \"$ac_try\"") >&5
11476   (eval $ac_try) 2>&5
11477   ac_status=$?
11478   echo "$as_me:11478: \$? = $ac_status" >&5
11479   (exit $ac_status); }; }; then
11480   eval "$as_ac_Lib=yes"
11481 else
11482   echo "$as_me: failed program was:" >&5
11483 cat conftest.$ac_ext >&5
11484 eval "$as_ac_Lib=no"
11485 fi
11486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11487 LIBS=$ac_check_lib_save_LIBS
11488 fi
11489 echo "$as_me:11489: result: `eval echo '${'$as_ac_Lib'}'`" >&5
11490 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
11491 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
11492   break
11493 fi
11494
11495         done
11496
11497 fi
11498
11499     # Check for library containing initscr
11500     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
11501         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
11502     do
11503         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
11504 echo "$as_me:11504: checking for initscr in -l$cf_curs_lib" >&5
11505 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
11506 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
11507   echo $ECHO_N "(cached) $ECHO_C" >&6
11508 else
11509   ac_check_lib_save_LIBS=$LIBS
11510 LIBS="-l$cf_curs_lib  $LIBS"
11511 cat >conftest.$ac_ext <<_ACEOF
11512 #line 11512 "configure"
11513 #include "confdefs.h"
11514
11515 /* Override any gcc2 internal prototype to avoid an error.  */
11516 #ifdef __cplusplus
11517 extern "C"
11518 #endif
11519 /* We use char because int might match the return type of a gcc2
11520    builtin and then its argument prototype would still apply.  */
11521 char initscr ();
11522 int
11523 main ()
11524 {
11525 initscr ();
11526   ;
11527   return 0;
11528 }
11529 _ACEOF
11530 rm -f conftest.$ac_objext conftest$ac_exeext
11531 if { (eval echo "$as_me:11531: \"$ac_link\"") >&5
11532   (eval $ac_link) 2>&5
11533   ac_status=$?
11534   echo "$as_me:11534: \$? = $ac_status" >&5
11535   (exit $ac_status); } &&
11536          { ac_try='test -s conftest$ac_exeext'
11537   { (eval echo "$as_me:11537: \"$ac_try\"") >&5
11538   (eval $ac_try) 2>&5
11539   ac_status=$?
11540   echo "$as_me:11540: \$? = $ac_status" >&5
11541   (exit $ac_status); }; }; then
11542   eval "$as_ac_Lib=yes"
11543 else
11544   echo "$as_me: failed program was:" >&5
11545 cat conftest.$ac_ext >&5
11546 eval "$as_ac_Lib=no"
11547 fi
11548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11549 LIBS=$ac_check_lib_save_LIBS
11550 fi
11551 echo "$as_me:11551: result: `eval echo '${'$as_ac_Lib'}'`" >&5
11552 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
11553 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
11554   break
11555 fi
11556
11557     done
11558     test $cf_curs_lib = unknown && { { echo "$as_me:11558: error: no curses library found" >&5
11559 echo "$as_me: error: no curses library found" >&2;}
11560    { (exit 1); exit 1; }; }
11561
11562     LIBS="-l$cf_curs_lib $cf_save_LIBS"
11563     if test "$cf_term_lib" = unknown ; then
11564         echo "$as_me:11564: checking if we can link with $cf_curs_lib library" >&5
11565 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
11566         cat >conftest.$ac_ext <<_ACEOF
11567 #line 11567 "configure"
11568 #include "confdefs.h"
11569 #include <${cf_cv_ncurses_header:-curses.h}>
11570 int
11571 main ()
11572 {
11573 initscr()
11574   ;
11575   return 0;
11576 }
11577 _ACEOF
11578 rm -f conftest.$ac_objext conftest$ac_exeext
11579 if { (eval echo "$as_me:11579: \"$ac_link\"") >&5
11580   (eval $ac_link) 2>&5
11581   ac_status=$?
11582   echo "$as_me:11582: \$? = $ac_status" >&5
11583   (exit $ac_status); } &&
11584          { ac_try='test -s conftest$ac_exeext'
11585   { (eval echo "$as_me:11585: \"$ac_try\"") >&5
11586   (eval $ac_try) 2>&5
11587   ac_status=$?
11588   echo "$as_me:11588: \$? = $ac_status" >&5
11589   (exit $ac_status); }; }; then
11590   cf_result=yes
11591 else
11592   echo "$as_me: failed program was:" >&5
11593 cat conftest.$ac_ext >&5
11594 cf_result=no
11595 fi
11596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11597         echo "$as_me:11597: result: $cf_result" >&5
11598 echo "${ECHO_T}$cf_result" >&6
11599         test $cf_result = no && { { echo "$as_me:11599: error: Cannot link curses library" >&5
11600 echo "$as_me: error: Cannot link curses library" >&2;}
11601    { (exit 1); exit 1; }; }
11602     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
11603         :
11604     elif test "$cf_term_lib" != predefined ; then
11605         echo "$as_me:11605: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
11606 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
11607         cat >conftest.$ac_ext <<_ACEOF
11608 #line 11608 "configure"
11609 #include "confdefs.h"
11610 #include <${cf_cv_ncurses_header:-curses.h}>
11611 int
11612 main ()
11613 {
11614 initscr(); tgoto((char *)0, 0, 0);
11615   ;
11616   return 0;
11617 }
11618 _ACEOF
11619 rm -f conftest.$ac_objext conftest$ac_exeext
11620 if { (eval echo "$as_me:11620: \"$ac_link\"") >&5
11621   (eval $ac_link) 2>&5
11622   ac_status=$?
11623   echo "$as_me:11623: \$? = $ac_status" >&5
11624   (exit $ac_status); } &&
11625          { ac_try='test -s conftest$ac_exeext'
11626   { (eval echo "$as_me:11626: \"$ac_try\"") >&5
11627   (eval $ac_try) 2>&5
11628   ac_status=$?
11629   echo "$as_me:11629: \$? = $ac_status" >&5
11630   (exit $ac_status); }; }; then
11631   cf_result=no
11632 else
11633   echo "$as_me: failed program was:" >&5
11634 cat conftest.$ac_ext >&5
11635
11636             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
11637             cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640 #include <${cf_cv_ncurses_header:-curses.h}>
11641 int
11642 main ()
11643 {
11644 initscr()
11645   ;
11646   return 0;
11647 }
11648 _ACEOF
11649 rm -f conftest.$ac_objext conftest$ac_exeext
11650 if { (eval echo "$as_me:11650: \"$ac_link\"") >&5
11651   (eval $ac_link) 2>&5
11652   ac_status=$?
11653   echo "$as_me:11653: \$? = $ac_status" >&5
11654   (exit $ac_status); } &&
11655          { ac_try='test -s conftest$ac_exeext'
11656   { (eval echo "$as_me:11656: \"$ac_try\"") >&5
11657   (eval $ac_try) 2>&5
11658   ac_status=$?
11659   echo "$as_me:11659: \$? = $ac_status" >&5
11660   (exit $ac_status); }; }; then
11661   cf_result=yes
11662 else
11663   echo "$as_me: failed program was:" >&5
11664 cat conftest.$ac_ext >&5
11665 cf_result=error
11666 fi
11667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11668
11669 fi
11670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11671         echo "$as_me:11671: result: $cf_result" >&5
11672 echo "${ECHO_T}$cf_result" >&6
11673     fi
11674 fi
11675 fi
11676
11677 fi
11678
11679 cf_all_widgets=yes
11680
11681 echo "$as_me:11681: checking if you want extra dialogs" >&5
11682 echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
11683
11684 # Check whether --enable-extras or --disable-extras was given.
11685 if test "${enable_extras+set}" = set; then
11686   enableval="$enable_extras"
11687
11688 else
11689   enableval=yes
11690 fi;
11691 echo "$as_me:11691: result: $enableval" >&5
11692 echo "${ECHO_T}$enableval" >&6
11693 if test "$enableval" != no ; then
11694 cf_all_widgets=yes
11695 else
11696 cf_all_widgets=no
11697 fi
11698
11699 echo "$as_me:11699: checking if you want config-file support" >&5
11700 echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
11701
11702 # Check whether --enable-rc-file or --disable-rc-file was given.
11703 if test "${enable_rc_file+set}" = set; then
11704   enableval="$enable_rc_file"
11705
11706 else
11707   enableval=$cf_all_widgets
11708 fi;
11709 echo "$as_me:11709: result: $enableval" >&5
11710 echo "${ECHO_T}$enableval" >&6
11711 if test "$enableval" != no ; then
11712 EXTRAOBJS="$EXTRAOBJS rc\$o"
11713          cat >>confdefs.h <<\EOF
11714 #define HAVE_RC_FILE 1
11715 EOF
11716
11717 else
11718         :
11719 fi
11720
11721 echo "$as_me:11721: checking if you want Xdialog-style dialogs" >&5
11722 echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
11723
11724 # Check whether --enable-Xdialog or --disable-Xdialog was given.
11725 if test "${enable_Xdialog+set}" = set; then
11726   enableval="$enable_Xdialog"
11727
11728 else
11729   enableval=$cf_all_widgets
11730 fi;
11731 echo "$as_me:11731: result: $enableval" >&5
11732 echo "${ECHO_T}$enableval" >&6
11733 if test "$enableval" != no ; then
11734 EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
11735          cat >>confdefs.h <<\EOF
11736 #define HAVE_XDIALOG 1
11737 EOF
11738
11739 else
11740         :
11741 fi
11742
11743 echo "$as_me:11743: checking if you want the form dialog" >&5
11744 echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
11745
11746 # Check whether --enable-form or --disable-form was given.
11747 if test "${enable_form+set}" = set; then
11748   enableval="$enable_form"
11749
11750 else
11751   enableval=$cf_all_widgets
11752 fi;
11753 echo "$as_me:11753: result: $enableval" >&5
11754 echo "${ECHO_T}$enableval" >&6
11755 if test "$enableval" != no ; then
11756 EXTRAOBJS="$EXTRAOBJS formbox\$o"
11757          cat >>confdefs.h <<\EOF
11758 #define HAVE_DLG_FORMBOX 1
11759 EOF
11760
11761 else
11762         :
11763 fi
11764
11765 echo "$as_me:11765: checking if you want the gauge dialog" >&5
11766 echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
11767
11768 # Check whether --enable-gauge or --disable-gauge was given.
11769 if test "${enable_gauge+set}" = set; then
11770   enableval="$enable_gauge"
11771
11772 else
11773   enableval=$cf_all_widgets
11774 fi;
11775 echo "$as_me:11775: result: $enableval" >&5
11776 echo "${ECHO_T}$enableval" >&6
11777 if test "$enableval" != no ; then
11778 EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
11779          cat >>confdefs.h <<\EOF
11780 #define HAVE_DLG_GAUGE 1
11781 EOF
11782
11783 else
11784         :
11785 fi
11786
11787 echo "$as_me:11787: checking if you want the tailbox dialog" >&5
11788 echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
11789
11790 # Check whether --enable-tailbox or --disable-tailbox was given.
11791 if test "${enable_tailbox+set}" = set; then
11792   enableval="$enable_tailbox"
11793
11794 else
11795   enableval=$cf_all_widgets
11796 fi;
11797 echo "$as_me:11797: result: $enableval" >&5
11798 echo "${ECHO_T}$enableval" >&6
11799 if test "$enableval" != no ; then
11800 EXTRAOBJS="$EXTRAOBJS tailbox\$o"
11801          cat >>confdefs.h <<\EOF
11802 #define HAVE_DLG_TAILBOX 1
11803 EOF
11804
11805 else
11806         :
11807 fi
11808
11809 echo "$as_me:11809: checking if you want the mixedform dialog" >&5
11810 echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
11811
11812 # Check whether --enable-mixedform or --disable-mixedform was given.
11813 if test "${enable_mixedform+set}" = set; then
11814   enableval="$enable_mixedform"
11815
11816 else
11817   enableval=$cf_all_widgets
11818 fi;
11819 echo "$as_me:11819: result: $enableval" >&5
11820 echo "${ECHO_T}$enableval" >&6
11821 if test "$enableval" != no ; then
11822 EXTRAOBJS="$EXTRAOBJS mixedform\$o"
11823          cat >>confdefs.h <<\EOF
11824 #define HAVE_DLG_MIXEDFORM 1
11825 EOF
11826
11827 else
11828         :
11829 fi
11830
11831 echo "$as_me:11831: checking if you want the mixedgauge dialog" >&5
11832 echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
11833
11834 # Check whether --enable-mixedgauge or --disable-mixedgauge was given.
11835 if test "${enable_mixedgauge+set}" = set; then
11836   enableval="$enable_mixedgauge"
11837
11838 else
11839   enableval=$cf_all_widgets
11840 fi;
11841 echo "$as_me:11841: result: $enableval" >&5
11842 echo "${ECHO_T}$enableval" >&6
11843 if test "$enableval" != no ; then
11844 EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
11845          cat >>confdefs.h <<\EOF
11846 #define HAVE_MIXEDGAUGE 1
11847 EOF
11848
11849 else
11850         :
11851 fi
11852
11853 echo "$as_me:11853: checking if you want the wide-curses features" >&5
11854 echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
11855
11856 # Check whether --enable-widec or --disable-widec was given.
11857 if test "${enable_widec+set}" = set; then
11858   enableval="$enable_widec"
11859
11860 else
11861   enableval=$cf_wide_curses
11862 fi;
11863 echo "$as_me:11863: result: $enableval" >&5
11864 echo "${ECHO_T}$enableval" >&6
11865 if test "$enableval" != no ; then
11866 cat >>confdefs.h <<\EOF
11867 #define USE_WIDE_CURSES 1
11868 EOF
11869
11870 else
11871         :
11872 fi
11873
11874 echo "$as_me:11874: checking for ANSI C header files" >&5
11875 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11876 if test "${ac_cv_header_stdc+set}" = set; then
11877   echo $ECHO_N "(cached) $ECHO_C" >&6
11878 else
11879   cat >conftest.$ac_ext <<_ACEOF
11880 #line 11880 "configure"
11881 #include "confdefs.h"
11882 #include <stdlib.h>
11883 #include <stdarg.h>
11884 #include <string.h>
11885 #include <float.h>
11886
11887 _ACEOF
11888 if { (eval echo "$as_me:11888: \"$ac_cpp conftest.$ac_ext\"") >&5
11889   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11890   ac_status=$?
11891   egrep -v '^ *\+' conftest.er1 >conftest.err
11892   rm -f conftest.er1
11893   cat conftest.err >&5
11894   echo "$as_me:11894: \$? = $ac_status" >&5
11895   (exit $ac_status); } >/dev/null; then
11896   if test -s conftest.err; then
11897     ac_cpp_err=$ac_c_preproc_warn_flag
11898   else
11899     ac_cpp_err=
11900   fi
11901 else
11902   ac_cpp_err=yes
11903 fi
11904 if test -z "$ac_cpp_err"; then
11905   ac_cv_header_stdc=yes
11906 else
11907   echo "$as_me: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   ac_cv_header_stdc=no
11910 fi
11911 rm -f conftest.err conftest.$ac_ext
11912
11913 if test $ac_cv_header_stdc = yes; then
11914   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11915   cat >conftest.$ac_ext <<_ACEOF
11916 #line 11916 "configure"
11917 #include "confdefs.h"
11918 #include <string.h>
11919
11920 _ACEOF
11921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11922   egrep "memchr" >/dev/null 2>&1; then
11923   :
11924 else
11925   ac_cv_header_stdc=no
11926 fi
11927 rm -rf conftest*
11928
11929 fi
11930
11931 if test $ac_cv_header_stdc = yes; then
11932   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11933   cat >conftest.$ac_ext <<_ACEOF
11934 #line 11934 "configure"
11935 #include "confdefs.h"
11936 #include <stdlib.h>
11937
11938 _ACEOF
11939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11940   egrep "free" >/dev/null 2>&1; then
11941   :
11942 else
11943   ac_cv_header_stdc=no
11944 fi
11945 rm -rf conftest*
11946
11947 fi
11948
11949 if test $ac_cv_header_stdc = yes; then
11950   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11951   if test "$cross_compiling" = yes; then
11952   :
11953 else
11954   cat >conftest.$ac_ext <<_ACEOF
11955 #line 11955 "configure"
11956 #include "confdefs.h"
11957 #include <ctype.h>
11958 #if ((' ' & 0x0FF) == 0x020)
11959 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11960 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11961 #else
11962 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11963                      || ('j' <= (c) && (c) <= 'r') \
11964                      || ('s' <= (c) && (c) <= 'z'))
11965 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11966 #endif
11967
11968 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11969 int
11970 main ()
11971 {
11972   int i;
11973   for (i = 0; i < 256; i++)
11974     if (XOR (islower (i), ISLOWER (i))
11975         || toupper (i) != TOUPPER (i))
11976       $ac_main_return(2);
11977   $ac_main_return (0);
11978 }
11979 _ACEOF
11980 rm -f conftest$ac_exeext
11981 if { (eval echo "$as_me:11981: \"$ac_link\"") >&5
11982   (eval $ac_link) 2>&5
11983   ac_status=$?
11984   echo "$as_me:11984: \$? = $ac_status" >&5
11985   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11986   { (eval echo "$as_me:11986: \"$ac_try\"") >&5
11987   (eval $ac_try) 2>&5
11988   ac_status=$?
11989   echo "$as_me:11989: \$? = $ac_status" >&5
11990   (exit $ac_status); }; }; then
11991   :
11992 else
11993   echo "$as_me: program exited with status $ac_status" >&5
11994 echo "$as_me: failed program was:" >&5
11995 cat conftest.$ac_ext >&5
11996 ac_cv_header_stdc=no
11997 fi
11998 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11999 fi
12000 fi
12001 fi
12002 echo "$as_me:12002: result: $ac_cv_header_stdc" >&5
12003 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12004 if test $ac_cv_header_stdc = yes; then
12005
12006 cat >>confdefs.h <<\EOF
12007 #define STDC_HEADERS 1
12008 EOF
12009
12010 fi
12011
12012 echo "$as_me:12012: checking whether time.h and sys/time.h may both be included" >&5
12013 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12014 if test "${ac_cv_header_time+set}" = set; then
12015   echo $ECHO_N "(cached) $ECHO_C" >&6
12016 else
12017   cat >conftest.$ac_ext <<_ACEOF
12018 #line 12018 "configure"
12019 #include "confdefs.h"
12020 #include <sys/types.h>
12021 #include <sys/time.h>
12022 #include <time.h>
12023
12024 int
12025 main ()
12026 {
12027 if ((struct tm *) 0)
12028 return 0;
12029   ;
12030   return 0;
12031 }
12032 _ACEOF
12033 rm -f conftest.$ac_objext
12034 if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5
12035   (eval $ac_compile) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit $ac_status); } &&
12039          { ac_try='test -s conftest.$ac_objext'
12040   { (eval echo "$as_me:12040: \"$ac_try\"") >&5
12041   (eval $ac_try) 2>&5
12042   ac_status=$?
12043   echo "$as_me:12043: \$? = $ac_status" >&5
12044   (exit $ac_status); }; }; then
12045   ac_cv_header_time=yes
12046 else
12047   echo "$as_me: failed program was:" >&5
12048 cat conftest.$ac_ext >&5
12049 ac_cv_header_time=no
12050 fi
12051 rm -f conftest.$ac_objext conftest.$ac_ext
12052 fi
12053 echo "$as_me:12053: result: $ac_cv_header_time" >&5
12054 echo "${ECHO_T}$ac_cv_header_time" >&6
12055 if test $ac_cv_header_time = yes; then
12056
12057 cat >>confdefs.h <<\EOF
12058 #define TIME_WITH_SYS_TIME 1
12059 EOF
12060
12061 fi
12062
12063 ac_header_dirent=no
12064 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12065   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12066 echo "$as_me:12066: checking for $ac_hdr that defines DIR" >&5
12067 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12068 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12069   echo $ECHO_N "(cached) $ECHO_C" >&6
12070 else
12071   cat >conftest.$ac_ext <<_ACEOF
12072 #line 12072 "configure"
12073 #include "confdefs.h"
12074 #include <sys/types.h>
12075 #include <$ac_hdr>
12076
12077 int
12078 main ()
12079 {
12080 if ((DIR *) 0)
12081 return 0;
12082   ;
12083   return 0;
12084 }
12085 _ACEOF
12086 rm -f conftest.$ac_objext
12087 if { (eval echo "$as_me:12087: \"$ac_compile\"") >&5
12088   (eval $ac_compile) 2>&5
12089   ac_status=$?
12090   echo "$as_me:12090: \$? = $ac_status" >&5
12091   (exit $ac_status); } &&
12092          { ac_try='test -s conftest.$ac_objext'
12093   { (eval echo "$as_me:12093: \"$ac_try\"") >&5
12094   (eval $ac_try) 2>&5
12095   ac_status=$?
12096   echo "$as_me:12096: \$? = $ac_status" >&5
12097   (exit $ac_status); }; }; then
12098   eval "$as_ac_Header=yes"
12099 else
12100   echo "$as_me: failed program was:" >&5
12101 cat conftest.$ac_ext >&5
12102 eval "$as_ac_Header=no"
12103 fi
12104 rm -f conftest.$ac_objext conftest.$ac_ext
12105 fi
12106 echo "$as_me:12106: result: `eval echo '${'$as_ac_Header'}'`" >&5
12107 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12108 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12109   cat >>confdefs.h <<EOF
12110 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12111 EOF
12112
12113 ac_header_dirent=$ac_hdr; break
12114 fi
12115
12116 done
12117 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12118 if test $ac_header_dirent = dirent.h; then
12119   echo "$as_me:12119: checking for opendir in -ldir" >&5
12120 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12121 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12122   echo $ECHO_N "(cached) $ECHO_C" >&6
12123 else
12124   ac_check_lib_save_LIBS=$LIBS
12125 LIBS="-ldir  $LIBS"
12126 cat >conftest.$ac_ext <<_ACEOF
12127 #line 12127 "configure"
12128 #include "confdefs.h"
12129
12130 /* Override any gcc2 internal prototype to avoid an error.  */
12131 #ifdef __cplusplus
12132 extern "C"
12133 #endif
12134 /* We use char because int might match the return type of a gcc2
12135    builtin and then its argument prototype would still apply.  */
12136 char opendir ();
12137 int
12138 main ()
12139 {
12140 opendir ();
12141   ;
12142   return 0;
12143 }
12144 _ACEOF
12145 rm -f conftest.$ac_objext conftest$ac_exeext
12146 if { (eval echo "$as_me:12146: \"$ac_link\"") >&5
12147   (eval $ac_link) 2>&5
12148   ac_status=$?
12149   echo "$as_me:12149: \$? = $ac_status" >&5
12150   (exit $ac_status); } &&
12151          { ac_try='test -s conftest$ac_exeext'
12152   { (eval echo "$as_me:12152: \"$ac_try\"") >&5
12153   (eval $ac_try) 2>&5
12154   ac_status=$?
12155   echo "$as_me:12155: \$? = $ac_status" >&5
12156   (exit $ac_status); }; }; then
12157   ac_cv_lib_dir_opendir=yes
12158 else
12159   echo "$as_me: failed program was:" >&5
12160 cat conftest.$ac_ext >&5
12161 ac_cv_lib_dir_opendir=no
12162 fi
12163 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12164 LIBS=$ac_check_lib_save_LIBS
12165 fi
12166 echo "$as_me:12166: result: $ac_cv_lib_dir_opendir" >&5
12167 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12168 if test $ac_cv_lib_dir_opendir = yes; then
12169   LIBS="$LIBS -ldir"
12170 fi
12171
12172 else
12173   echo "$as_me:12173: checking for opendir in -lx" >&5
12174 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12175 if test "${ac_cv_lib_x_opendir+set}" = set; then
12176   echo $ECHO_N "(cached) $ECHO_C" >&6
12177 else
12178   ac_check_lib_save_LIBS=$LIBS
12179 LIBS="-lx  $LIBS"
12180 cat >conftest.$ac_ext <<_ACEOF
12181 #line 12181 "configure"
12182 #include "confdefs.h"
12183
12184 /* Override any gcc2 internal prototype to avoid an error.  */
12185 #ifdef __cplusplus
12186 extern "C"
12187 #endif
12188 /* We use char because int might match the return type of a gcc2
12189    builtin and then its argument prototype would still apply.  */
12190 char opendir ();
12191 int
12192 main ()
12193 {
12194 opendir ();
12195   ;
12196   return 0;
12197 }
12198 _ACEOF
12199 rm -f conftest.$ac_objext conftest$ac_exeext
12200 if { (eval echo "$as_me:12200: \"$ac_link\"") >&5
12201   (eval $ac_link) 2>&5
12202   ac_status=$?
12203   echo "$as_me:12203: \$? = $ac_status" >&5
12204   (exit $ac_status); } &&
12205          { ac_try='test -s conftest$ac_exeext'
12206   { (eval echo "$as_me:12206: \"$ac_try\"") >&5
12207   (eval $ac_try) 2>&5
12208   ac_status=$?
12209   echo "$as_me:12209: \$? = $ac_status" >&5
12210   (exit $ac_status); }; }; then
12211   ac_cv_lib_x_opendir=yes
12212 else
12213   echo "$as_me: failed program was:" >&5
12214 cat conftest.$ac_ext >&5
12215 ac_cv_lib_x_opendir=no
12216 fi
12217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12218 LIBS=$ac_check_lib_save_LIBS
12219 fi
12220 echo "$as_me:12220: result: $ac_cv_lib_x_opendir" >&5
12221 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12222 if test $ac_cv_lib_x_opendir = yes; then
12223   LIBS="$LIBS -lx"
12224 fi
12225
12226 fi
12227
12228 for ac_header in search.h unctrl.h unistd.h
12229 do
12230 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12231 echo "$as_me:12231: checking for $ac_header" >&5
12232 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12233 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12234   echo $ECHO_N "(cached) $ECHO_C" >&6
12235 else
12236   cat >conftest.$ac_ext <<_ACEOF
12237 #line 12237 "configure"
12238 #include "confdefs.h"
12239 #include <$ac_header>
12240 _ACEOF
12241 if { (eval echo "$as_me:12241: \"$ac_cpp conftest.$ac_ext\"") >&5
12242   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12243   ac_status=$?
12244   egrep -v '^ *\+' conftest.er1 >conftest.err
12245   rm -f conftest.er1
12246   cat conftest.err >&5
12247   echo "$as_me:12247: \$? = $ac_status" >&5
12248   (exit $ac_status); } >/dev/null; then
12249   if test -s conftest.err; then
12250     ac_cpp_err=$ac_c_preproc_warn_flag
12251   else
12252     ac_cpp_err=
12253   fi
12254 else
12255   ac_cpp_err=yes
12256 fi
12257 if test -z "$ac_cpp_err"; then
12258   eval "$as_ac_Header=yes"
12259 else
12260   echo "$as_me: failed program was:" >&5
12261   cat conftest.$ac_ext >&5
12262   eval "$as_ac_Header=no"
12263 fi
12264 rm -f conftest.err conftest.$ac_ext
12265 fi
12266 echo "$as_me:12266: result: `eval echo '${'$as_ac_Header'}'`" >&5
12267 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12268 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12269   cat >>confdefs.h <<EOF
12270 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12271 EOF
12272
12273 fi
12274 done
12275
12276 echo "$as_me:12276: checking for term.h" >&5
12277 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
12278 if test "${cf_cv_term_header+set}" = set; then
12279   echo $ECHO_N "(cached) $ECHO_C" >&6
12280 else
12281
12282 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
12283 # for <term.h> if we do not find the variant.
12284
12285 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
12286
12287 case ${cf_cv_ncurses_header:-curses.h} in #(vi
12288 */*)
12289         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
12290         cf_header_list="$cf_header_item $cf_header_list"
12291         ;;
12292 esac
12293
12294 for cf_header in $cf_header_list
12295 do
12296         cat >conftest.$ac_ext <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12299
12300 #include <${cf_cv_ncurses_header:-curses.h}>
12301 #include <${cf_header}>
12302 int
12303 main ()
12304 {
12305 WINDOW *x
12306   ;
12307   return 0;
12308 }
12309 _ACEOF
12310 rm -f conftest.$ac_objext
12311 if { (eval echo "$as_me:12311: \"$ac_compile\"") >&5
12312   (eval $ac_compile) 2>&5
12313   ac_status=$?
12314   echo "$as_me:12314: \$? = $ac_status" >&5
12315   (exit $ac_status); } &&
12316          { ac_try='test -s conftest.$ac_objext'
12317   { (eval echo "$as_me:12317: \"$ac_try\"") >&5
12318   (eval $ac_try) 2>&5
12319   ac_status=$?
12320   echo "$as_me:12320: \$? = $ac_status" >&5
12321   (exit $ac_status); }; }; then
12322   cf_cv_term_header=$cf_header
12323          break
12324 else
12325   echo "$as_me: failed program was:" >&5
12326 cat conftest.$ac_ext >&5
12327 cf_cv_term_header=no
12328 fi
12329 rm -f conftest.$ac_objext conftest.$ac_ext
12330 done
12331
12332 case $cf_cv_term_header in #(vi
12333 no)
12334         # If curses is ncurses, some packagers still mess it up by trying to make
12335         # us use GNU termcap.  This handles the most common case.
12336         for cf_header in ncurses/term.h ncursesw/term.h
12337         do
12338                 cat >conftest.$ac_ext <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12341
12342 #include <${cf_cv_ncurses_header:-curses.h}>
12343 #ifdef NCURSES_VERSION
12344 #include <${cf_header}>
12345 #else
12346 make an error
12347 #endif
12348 int
12349 main ()
12350 {
12351 WINDOW *x
12352   ;
12353   return 0;
12354 }
12355 _ACEOF
12356 rm -f conftest.$ac_objext
12357 if { (eval echo "$as_me:12357: \"$ac_compile\"") >&5
12358   (eval $ac_compile) 2>&5
12359   ac_status=$?
12360   echo "$as_me:12360: \$? = $ac_status" >&5
12361   (exit $ac_status); } &&
12362          { ac_try='test -s conftest.$ac_objext'
12363   { (eval echo "$as_me:12363: \"$ac_try\"") >&5
12364   (eval $ac_try) 2>&5
12365   ac_status=$?
12366   echo "$as_me:12366: \$? = $ac_status" >&5
12367   (exit $ac_status); }; }; then
12368   cf_cv_term_header=$cf_header
12369                          break
12370 else
12371   echo "$as_me: failed program was:" >&5
12372 cat conftest.$ac_ext >&5
12373 cf_cv_term_header=no
12374 fi
12375 rm -f conftest.$ac_objext conftest.$ac_ext
12376         done
12377         ;;
12378 esac
12379
12380 fi
12381 echo "$as_me:12381: result: $cf_cv_term_header" >&5
12382 echo "${ECHO_T}$cf_cv_term_header" >&6
12383
12384 case $cf_cv_term_header in #(vi
12385 term.h) #(vi
12386         cat >>confdefs.h <<\EOF
12387 #define HAVE_TERM_H 1
12388 EOF
12389
12390         ;;
12391 ncurses/term.h) #(vi
12392         cat >>confdefs.h <<\EOF
12393 #define HAVE_NCURSES_TERM_H 1
12394 EOF
12395
12396         ;;
12397 ncursesw/term.h)
12398         cat >>confdefs.h <<\EOF
12399 #define HAVE_NCURSESW_TERM_H 1
12400 EOF
12401
12402         ;;
12403 esac
12404
12405 echo "$as_me:12405: checking return type of signal handlers" >&5
12406 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12407 if test "${ac_cv_type_signal+set}" = set; then
12408   echo $ECHO_N "(cached) $ECHO_C" >&6
12409 else
12410   cat >conftest.$ac_ext <<_ACEOF
12411 #line 12411 "configure"
12412 #include "confdefs.h"
12413 #include <sys/types.h>
12414 #include <signal.h>
12415 #ifdef signal
12416 # undef signal
12417 #endif
12418 #ifdef __cplusplus
12419 extern "C" void (*signal (int, void (*)(int)))(int);
12420 #else
12421 void (*signal ()) ();
12422 #endif
12423
12424 int
12425 main ()
12426 {
12427 int i;
12428   ;
12429   return 0;
12430 }
12431 _ACEOF
12432 rm -f conftest.$ac_objext
12433 if { (eval echo "$as_me:12433: \"$ac_compile\"") >&5
12434   (eval $ac_compile) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); } &&
12438          { ac_try='test -s conftest.$ac_objext'
12439   { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440   (eval $ac_try) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); }; }; then
12444   ac_cv_type_signal=void
12445 else
12446   echo "$as_me: failed program was:" >&5
12447 cat conftest.$ac_ext >&5
12448 ac_cv_type_signal=int
12449 fi
12450 rm -f conftest.$ac_objext conftest.$ac_ext
12451 fi
12452 echo "$as_me:12452: result: $ac_cv_type_signal" >&5
12453 echo "${ECHO_T}$ac_cv_type_signal" >&6
12454
12455 cat >>confdefs.h <<EOF
12456 #define RETSIGTYPE $ac_cv_type_signal
12457 EOF
12458
12459 for ac_func in \
12460 _nc_free_and_exit \
12461 btowc \
12462 mblen \
12463 mbrlen \
12464 mbrtowc \
12465 mbtowc \
12466 strcasecmp \
12467 strftime \
12468 tsearch \
12469 waitpid \
12470 wcsrtombs \
12471 wcstombs \
12472 wctob \
12473 wctomb \
12474
12475 do
12476 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12477 echo "$as_me:12477: checking for $ac_func" >&5
12478 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12479 if eval "test \"\${$as_ac_var+set}\" = set"; then
12480   echo $ECHO_N "(cached) $ECHO_C" >&6
12481 else
12482   cat >conftest.$ac_ext <<_ACEOF
12483 #line 12483 "configure"
12484 #include "confdefs.h"
12485 /* System header to define __stub macros and hopefully few prototypes,
12486     which can conflict with char $ac_func (); below.  */
12487 #include <assert.h>
12488 /* Override any gcc2 internal prototype to avoid an error.  */
12489 #ifdef __cplusplus
12490 extern "C"
12491 #endif
12492 /* We use char because int might match the return type of a gcc2
12493    builtin and then its argument prototype would still apply.  */
12494 char $ac_func ();
12495 char (*f) ();
12496
12497 int
12498 main ()
12499 {
12500 /* The GNU C library defines this for functions which it implements
12501     to always fail with ENOSYS.  Some functions are actually named
12502     something starting with __ and the normal name is an alias.  */
12503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12504 choke me
12505 #else
12506 f = $ac_func;
12507 #endif
12508
12509   ;
12510   return 0;
12511 }
12512 _ACEOF
12513 rm -f conftest.$ac_objext conftest$ac_exeext
12514 if { (eval echo "$as_me:12514: \"$ac_link\"") >&5
12515   (eval $ac_link) 2>&5
12516   ac_status=$?
12517   echo "$as_me:12517: \$? = $ac_status" >&5
12518   (exit $ac_status); } &&
12519          { ac_try='test -s conftest$ac_exeext'
12520   { (eval echo "$as_me:12520: \"$ac_try\"") >&5
12521   (eval $ac_try) 2>&5
12522   ac_status=$?
12523   echo "$as_me:12523: \$? = $ac_status" >&5
12524   (exit $ac_status); }; }; then
12525   eval "$as_ac_var=yes"
12526 else
12527   echo "$as_me: failed program was:" >&5
12528 cat conftest.$ac_ext >&5
12529 eval "$as_ac_var=no"
12530 fi
12531 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12532 fi
12533 echo "$as_me:12533: result: `eval echo '${'$as_ac_var'}'`" >&5
12534 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12535 if test `eval echo '${'$as_ac_var'}'` = yes; then
12536   cat >>confdefs.h <<EOF
12537 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12538 EOF
12539
12540 fi
12541 done
12542
12543 echo "$as_me:12543: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12544 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12545 if test "${cf_cv_need_xopen_extension+set}" = set; then
12546   echo $ECHO_N "(cached) $ECHO_C" >&6
12547 else
12548
12549 cat >conftest.$ac_ext <<_ACEOF
12550 #line 12550 "configure"
12551 #include "confdefs.h"
12552
12553 #include <stdlib.h>
12554 #include <${cf_cv_ncurses_header:-curses.h}>
12555 int
12556 main ()
12557 {
12558
12559 #if defined(NCURSES_VERSION_PATCH)
12560 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
12561         make an error
12562 #endif
12563 #endif
12564         long x = winnstr(stdscr, "", 0);
12565         int x1, y1;
12566         getbegyx(stdscr, y1, x1)
12567   ;
12568   return 0;
12569 }
12570 _ACEOF
12571 rm -f conftest.$ac_objext conftest$ac_exeext
12572 if { (eval echo "$as_me:12572: \"$ac_link\"") >&5
12573   (eval $ac_link) 2>&5
12574   ac_status=$?
12575   echo "$as_me:12575: \$? = $ac_status" >&5
12576   (exit $ac_status); } &&
12577          { ac_try='test -s conftest$ac_exeext'
12578   { (eval echo "$as_me:12578: \"$ac_try\"") >&5
12579   (eval $ac_try) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit $ac_status); }; }; then
12583   cf_cv_need_xopen_extension=no
12584 else
12585   echo "$as_me: failed program was:" >&5
12586 cat conftest.$ac_ext >&5
12587 cat >conftest.$ac_ext <<_ACEOF
12588 #line 12588 "configure"
12589 #include "confdefs.h"
12590
12591 #define _XOPEN_SOURCE_EXTENDED
12592 #include <stdlib.h>
12593 #include <${cf_cv_ncurses_header:-curses.h}>
12594 int
12595 main ()
12596 {
12597
12598 #ifdef NCURSES_VERSION
12599         cchar_t check;
12600         int check2 = curs_set((int)sizeof(check));
12601 #endif
12602         long x = winnstr(stdscr, "", 0);
12603         int x1, y1;
12604         getbegyx(stdscr, y1, x1)
12605   ;
12606   return 0;
12607 }
12608 _ACEOF
12609 rm -f conftest.$ac_objext conftest$ac_exeext
12610 if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
12611   (eval $ac_link) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit $ac_status); } &&
12615          { ac_try='test -s conftest$ac_exeext'
12616   { (eval echo "$as_me:12616: \"$ac_try\"") >&5
12617   (eval $ac_try) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit $ac_status); }; }; then
12621   cf_cv_need_xopen_extension=yes
12622 else
12623   echo "$as_me: failed program was:" >&5
12624 cat conftest.$ac_ext >&5
12625 cf_cv_need_xopen_extension=unknown
12626 fi
12627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12628 fi
12629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12630 fi
12631 echo "$as_me:12631: result: $cf_cv_need_xopen_extension" >&5
12632 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
12633 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12634
12635 echo "$as_me:12635: checking for unctrl.h" >&5
12636 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
12637 if test "${cf_cv_unctrl_header+set}" = set; then
12638   echo $ECHO_N "(cached) $ECHO_C" >&6
12639 else
12640
12641 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
12642 # for <unctrl.h> if we do not find the variant.
12643
12644 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
12645
12646 case ${cf_cv_ncurses_header:-curses.h} in #(vi
12647 */*)
12648         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
12649         cf_header_list="$cf_header_item $cf_header_list"
12650         ;;
12651 esac
12652
12653 for cf_header in $cf_header_list
12654 do
12655         cat >conftest.$ac_ext <<_ACEOF
12656 #line 12656 "configure"
12657 #include "confdefs.h"
12658
12659 #include <${cf_cv_ncurses_header:-curses.h}>
12660 #include <${cf_header}>
12661 int
12662 main ()
12663 {
12664 WINDOW *x
12665   ;
12666   return 0;
12667 }
12668 _ACEOF
12669 rm -f conftest.$ac_objext
12670 if { (eval echo "$as_me:12670: \"$ac_compile\"") >&5
12671   (eval $ac_compile) 2>&5
12672   ac_status=$?
12673   echo "$as_me:12673: \$? = $ac_status" >&5
12674   (exit $ac_status); } &&
12675          { ac_try='test -s conftest.$ac_objext'
12676   { (eval echo "$as_me:12676: \"$ac_try\"") >&5
12677   (eval $ac_try) 2>&5
12678   ac_status=$?
12679   echo "$as_me:12679: \$? = $ac_status" >&5
12680   (exit $ac_status); }; }; then
12681   cf_cv_unctrl_header=$cf_header
12682          break
12683 else
12684   echo "$as_me: failed program was:" >&5
12685 cat conftest.$ac_ext >&5
12686 cf_cv_unctrl_header=no
12687 fi
12688 rm -f conftest.$ac_objext conftest.$ac_ext
12689 done
12690
12691 case $cf_cv_unctrl_header in #(vi
12692 no)
12693         { echo "$as_me:12693: WARNING: unctrl.h header not found" >&5
12694 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
12695         ;;
12696 esac
12697
12698 fi
12699 echo "$as_me:12699: result: $cf_cv_unctrl_header" >&5
12700 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
12701
12702 case $cf_cv_unctrl_header in #(vi
12703 unctrl.h) #(vi
12704         cat >>confdefs.h <<\EOF
12705 #define HAVE_UNCTRL_H 1
12706 EOF
12707
12708         ;;
12709 ncurses/unctrl.h) #(vi
12710         cat >>confdefs.h <<\EOF
12711 #define HAVE_NCURSES_UNCTRL_H 1
12712 EOF
12713
12714         ;;
12715 ncursesw/unctrl.h)
12716         cat >>confdefs.h <<\EOF
12717 #define HAVE_NCURSESW_UNCTRL_H 1
12718 EOF
12719
12720         ;;
12721 esac
12722
12723 for cf_func in \
12724 flushinp \
12725 getattrs \
12726 getbegx \
12727 getbegy \
12728 getbegyx \
12729 getcurx \
12730 getcury \
12731 getmaxx \
12732 getmaxy \
12733 getmaxyx \
12734 getparx \
12735 getpary \
12736 getparyx \
12737 use_default_colors \
12738 wchgat \
12739 wget_wch \
12740
12741 do
12742
12743 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12744
12745         echo "$as_me:12745: checking for ${cf_func}" >&5
12746 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
12747
12748 echo "${as_me:-configure}:12748: testing ${cf_func} ..." 1>&5
12749
12750         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
12751   echo $ECHO_N "(cached) $ECHO_C" >&6
12752 else
12753
12754                 eval cf_result='$ac_cv_func_'$cf_func
12755                 if test ".$cf_result" != ".no"; then
12756                         cat >conftest.$ac_ext <<_ACEOF
12757 #line 12757 "configure"
12758 #include "confdefs.h"
12759
12760 #ifdef HAVE_XCURSES
12761 #include <xcurses.h>
12762 char * XCursesProgramName = "test";
12763 #else
12764 #include <${cf_cv_ncurses_header:-curses.h}>
12765 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
12766 #include <ncursesw/term.h>
12767 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
12768 #include <ncurses/term.h>
12769 #elif defined(HAVE_TERM_H)
12770 #include <term.h>
12771 #endif
12772 #endif
12773
12774 int
12775 main ()
12776 {
12777
12778 #ifndef ${cf_func}
12779 long foo = (long)(&${cf_func});
12780 if (foo + 1234 > 5678)
12781         ${cf_cv_main_return:-return}(foo);
12782 #endif
12783
12784   ;
12785   return 0;
12786 }
12787 _ACEOF
12788 rm -f conftest.$ac_objext conftest$ac_exeext
12789 if { (eval echo "$as_me:12789: \"$ac_link\"") >&5
12790   (eval $ac_link) 2>&5
12791   ac_status=$?
12792   echo "$as_me:12792: \$? = $ac_status" >&5
12793   (exit $ac_status); } &&
12794          { ac_try='test -s conftest$ac_exeext'
12795   { (eval echo "$as_me:12795: \"$ac_try\"") >&5
12796   (eval $ac_try) 2>&5
12797   ac_status=$?
12798   echo "$as_me:12798: \$? = $ac_status" >&5
12799   (exit $ac_status); }; }; then
12800   cf_result=yes
12801 else
12802   echo "$as_me: failed program was:" >&5
12803 cat conftest.$ac_ext >&5
12804 cf_result=no
12805 fi
12806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12807                 fi
12808                 eval 'cf_cv_func_'$cf_func'=$cf_result'
12809
12810 fi
12811
12812         # use the computed/retrieved cache-value:
12813         eval 'cf_result=$cf_cv_func_'$cf_func
12814         echo "$as_me:12814: result: $cf_result" >&5
12815 echo "${ECHO_T}$cf_result" >&6
12816         if test $cf_result != no; then
12817                 cat >>confdefs.h <<EOF
12818 #define HAVE_${cf_tr_func} 1
12819 EOF
12820
12821         fi
12822 done
12823
12824 echo "$as_me:12824: checking for start_color" >&5
12825 echo $ECHO_N "checking for start_color... $ECHO_C" >&6
12826 if test "${ac_cv_func_start_color+set}" = set; then
12827   echo $ECHO_N "(cached) $ECHO_C" >&6
12828 else
12829   cat >conftest.$ac_ext <<_ACEOF
12830 #line 12830 "configure"
12831 #include "confdefs.h"
12832 /* System header to define __stub macros and hopefully few prototypes,
12833     which can conflict with char start_color (); below.  */
12834 #include <assert.h>
12835 /* Override any gcc2 internal prototype to avoid an error.  */
12836 #ifdef __cplusplus
12837 extern "C"
12838 #endif
12839 /* We use char because int might match the return type of a gcc2
12840    builtin and then its argument prototype would still apply.  */
12841 char start_color ();
12842 char (*f) ();
12843
12844 int
12845 main ()
12846 {
12847 /* The GNU C library defines this for functions which it implements
12848     to always fail with ENOSYS.  Some functions are actually named
12849     something starting with __ and the normal name is an alias.  */
12850 #if defined (__stub_start_color) || defined (__stub___start_color)
12851 choke me
12852 #else
12853 f = start_color;
12854 #endif
12855
12856   ;
12857   return 0;
12858 }
12859 _ACEOF
12860 rm -f conftest.$ac_objext conftest$ac_exeext
12861 if { (eval echo "$as_me:12861: \"$ac_link\"") >&5
12862   (eval $ac_link) 2>&5
12863   ac_status=$?
12864   echo "$as_me:12864: \$? = $ac_status" >&5
12865   (exit $ac_status); } &&
12866          { ac_try='test -s conftest$ac_exeext'
12867   { (eval echo "$as_me:12867: \"$ac_try\"") >&5
12868   (eval $ac_try) 2>&5
12869   ac_status=$?
12870   echo "$as_me:12870: \$? = $ac_status" >&5
12871   (exit $ac_status); }; }; then
12872   ac_cv_func_start_color=yes
12873 else
12874   echo "$as_me: failed program was:" >&5
12875 cat conftest.$ac_ext >&5
12876 ac_cv_func_start_color=no
12877 fi
12878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12879 fi
12880 echo "$as_me:12880: result: $ac_cv_func_start_color" >&5
12881 echo "${ECHO_T}$ac_cv_func_start_color" >&6
12882 if test $ac_cv_func_start_color = yes; then
12883   cat >>confdefs.h <<\EOF
12884 #define HAVE_COLOR 1
12885 EOF
12886
12887 fi
12888
12889 echo "$as_me:12889: checking for chtype typedef" >&5
12890 echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
12891 if test "${cf_cv_chtype_decl+set}" = set; then
12892   echo $ECHO_N "(cached) $ECHO_C" >&6
12893 else
12894
12895         cat >conftest.$ac_ext <<_ACEOF
12896 #line 12896 "configure"
12897 #include "confdefs.h"
12898 #include <${cf_cv_ncurses_header:-curses.h}>
12899 int
12900 main ()
12901 {
12902 chtype foo
12903   ;
12904   return 0;
12905 }
12906 _ACEOF
12907 rm -f conftest.$ac_objext
12908 if { (eval echo "$as_me:12908: \"$ac_compile\"") >&5
12909   (eval $ac_compile) 2>&5
12910   ac_status=$?
12911   echo "$as_me:12911: \$? = $ac_status" >&5
12912   (exit $ac_status); } &&
12913          { ac_try='test -s conftest.$ac_objext'
12914   { (eval echo "$as_me:12914: \"$ac_try\"") >&5
12915   (eval $ac_try) 2>&5
12916   ac_status=$?
12917   echo "$as_me:12917: \$? = $ac_status" >&5
12918   (exit $ac_status); }; }; then
12919   cf_cv_chtype_decl=yes
12920 else
12921   echo "$as_me: failed program was:" >&5
12922 cat conftest.$ac_ext >&5
12923 cf_cv_chtype_decl=no
12924 fi
12925 rm -f conftest.$ac_objext conftest.$ac_ext
12926 fi
12927 echo "$as_me:12927: result: $cf_cv_chtype_decl" >&5
12928 echo "${ECHO_T}$cf_cv_chtype_decl" >&6
12929 if test $cf_cv_chtype_decl = yes ; then
12930         cat >>confdefs.h <<\EOF
12931 #define HAVE_TYPE_CHTYPE 1
12932 EOF
12933
12934         echo "$as_me:12934: checking if chtype is scalar or struct" >&5
12935 echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
12936 if test "${cf_cv_chtype_type+set}" = set; then
12937   echo $ECHO_N "(cached) $ECHO_C" >&6
12938 else
12939
12940                 cat >conftest.$ac_ext <<_ACEOF
12941 #line 12941 "configure"
12942 #include "confdefs.h"
12943 #include <${cf_cv_ncurses_header:-curses.h}>
12944 int
12945 main ()
12946 {
12947 chtype foo; long x = foo
12948   ;
12949   return 0;
12950 }
12951 _ACEOF
12952 rm -f conftest.$ac_objext
12953 if { (eval echo "$as_me:12953: \"$ac_compile\"") >&5
12954   (eval $ac_compile) 2>&5
12955   ac_status=$?
12956   echo "$as_me:12956: \$? = $ac_status" >&5
12957   (exit $ac_status); } &&
12958          { ac_try='test -s conftest.$ac_objext'
12959   { (eval echo "$as_me:12959: \"$ac_try\"") >&5
12960   (eval $ac_try) 2>&5
12961   ac_status=$?
12962   echo "$as_me:12962: \$? = $ac_status" >&5
12963   (exit $ac_status); }; }; then
12964   cf_cv_chtype_type=scalar
12965 else
12966   echo "$as_me: failed program was:" >&5
12967 cat conftest.$ac_ext >&5
12968 cf_cv_chtype_type=struct
12969 fi
12970 rm -f conftest.$ac_objext conftest.$ac_ext
12971 fi
12972 echo "$as_me:12972: result: $cf_cv_chtype_type" >&5
12973 echo "${ECHO_T}$cf_cv_chtype_type" >&6
12974         if test $cf_cv_chtype_type = scalar ; then
12975                 cat >>confdefs.h <<\EOF
12976 #define TYPE_CHTYPE_IS_SCALAR 1
12977 EOF
12978
12979         fi
12980 fi
12981
12982 echo "$as_me:12982: checking for wide alternate character set array" >&5
12983 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
12984 if test "${cf_cv_curses_wacs_map+set}" = set; then
12985   echo $ECHO_N "(cached) $ECHO_C" >&6
12986 else
12987
12988         cf_cv_curses_wacs_map=unknown
12989         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
12990         do
12991         cat >conftest.$ac_ext <<_ACEOF
12992 #line 12992 "configure"
12993 #include "confdefs.h"
12994
12995 #ifndef _XOPEN_SOURCE_EXTENDED
12996 #define _XOPEN_SOURCE_EXTENDED
12997 #endif
12998 #include <${cf_cv_ncurses_header:-curses.h}>
12999 int
13000 main ()
13001 {
13002 void *foo = &($name['k'])
13003   ;
13004   return 0;
13005 }
13006 _ACEOF
13007 rm -f conftest.$ac_objext conftest$ac_exeext
13008 if { (eval echo "$as_me:13008: \"$ac_link\"") >&5
13009   (eval $ac_link) 2>&5
13010   ac_status=$?
13011   echo "$as_me:13011: \$? = $ac_status" >&5
13012   (exit $ac_status); } &&
13013          { ac_try='test -s conftest$ac_exeext'
13014   { (eval echo "$as_me:13014: \"$ac_try\"") >&5
13015   (eval $ac_try) 2>&5
13016   ac_status=$?
13017   echo "$as_me:13017: \$? = $ac_status" >&5
13018   (exit $ac_status); }; }; then
13019   cf_cv_curses_wacs_map=$name
13020          break
13021 else
13022   echo "$as_me: failed program was:" >&5
13023 cat conftest.$ac_ext >&5
13024 fi
13025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13026         done
13027 fi
13028 echo "$as_me:13028: result: $cf_cv_curses_wacs_map" >&5
13029 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
13030
13031 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
13032 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
13033 EOF
13034
13035 echo "$as_me:13035: checking for wide alternate character constants" >&5
13036 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
13037 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
13038   echo $ECHO_N "(cached) $ECHO_C" >&6
13039 else
13040
13041 cf_cv_curses_wacs_symbols=no
13042 if test "$cf_cv_curses_wacs_map" != unknown
13043 then
13044         cat >conftest.$ac_ext <<_ACEOF
13045 #line 13045 "configure"
13046 #include "confdefs.h"
13047
13048 #ifndef _XOPEN_SOURCE_EXTENDED
13049 #define _XOPEN_SOURCE_EXTENDED
13050 #endif
13051 #include <${cf_cv_ncurses_header:-curses.h}>
13052 int
13053 main ()
13054 {
13055 cchar_t *foo = WACS_PLUS;
13056          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
13057   ;
13058   return 0;
13059 }
13060 _ACEOF
13061 rm -f conftest.$ac_objext conftest$ac_exeext
13062 if { (eval echo "$as_me:13062: \"$ac_link\"") >&5
13063   (eval $ac_link) 2>&5
13064   ac_status=$?
13065   echo "$as_me:13065: \$? = $ac_status" >&5
13066   (exit $ac_status); } &&
13067          { ac_try='test -s conftest$ac_exeext'
13068   { (eval echo "$as_me:13068: \"$ac_try\"") >&5
13069   (eval $ac_try) 2>&5
13070   ac_status=$?
13071   echo "$as_me:13071: \$? = $ac_status" >&5
13072   (exit $ac_status); }; }; then
13073   cf_cv_curses_wacs_symbols=yes
13074 else
13075   echo "$as_me: failed program was:" >&5
13076 cat conftest.$ac_ext >&5
13077 fi
13078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13079 else
13080         cat >conftest.$ac_ext <<_ACEOF
13081 #line 13081 "configure"
13082 #include "confdefs.h"
13083
13084 #ifndef _XOPEN_SOURCE_EXTENDED
13085 #define _XOPEN_SOURCE_EXTENDED
13086 #endif
13087 #include <${cf_cv_ncurses_header:-curses.h}>
13088 int
13089 main ()
13090 {
13091 cchar_t *foo = WACS_PLUS
13092   ;
13093   return 0;
13094 }
13095 _ACEOF
13096 rm -f conftest.$ac_objext conftest$ac_exeext
13097 if { (eval echo "$as_me:13097: \"$ac_link\"") >&5
13098   (eval $ac_link) 2>&5
13099   ac_status=$?
13100   echo "$as_me:13100: \$? = $ac_status" >&5
13101   (exit $ac_status); } &&
13102          { ac_try='test -s conftest$ac_exeext'
13103   { (eval echo "$as_me:13103: \"$ac_try\"") >&5
13104   (eval $ac_try) 2>&5
13105   ac_status=$?
13106   echo "$as_me:13106: \$? = $ac_status" >&5
13107   (exit $ac_status); }; }; then
13108   cf_cv_curses_wacs_symbols=yes
13109 else
13110   echo "$as_me: failed program was:" >&5
13111 cat conftest.$ac_ext >&5
13112 fi
13113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13114 fi
13115
13116 fi
13117 echo "$as_me:13117: result: $cf_cv_curses_wacs_symbols" >&5
13118 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
13119
13120 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
13121 #define CURSES_WACS_SYMBOLS 1
13122 EOF
13123
13124 for ac_header in sys/wait.h
13125 do
13126 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13127 echo "$as_me:13127: checking for $ac_header" >&5
13128 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13129 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13130   echo $ECHO_N "(cached) $ECHO_C" >&6
13131 else
13132   cat >conftest.$ac_ext <<_ACEOF
13133 #line 13133 "configure"
13134 #include "confdefs.h"
13135 #include <$ac_header>
13136 _ACEOF
13137 if { (eval echo "$as_me:13137: \"$ac_cpp conftest.$ac_ext\"") >&5
13138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13139   ac_status=$?
13140   egrep -v '^ *\+' conftest.er1 >conftest.err
13141   rm -f conftest.er1
13142   cat conftest.err >&5
13143   echo "$as_me:13143: \$? = $ac_status" >&5
13144   (exit $ac_status); } >/dev/null; then
13145   if test -s conftest.err; then
13146     ac_cpp_err=$ac_c_preproc_warn_flag
13147   else
13148     ac_cpp_err=
13149   fi
13150 else
13151   ac_cpp_err=yes
13152 fi
13153 if test -z "$ac_cpp_err"; then
13154   eval "$as_ac_Header=yes"
13155 else
13156   echo "$as_me: failed program was:" >&5
13157   cat conftest.$ac_ext >&5
13158   eval "$as_ac_Header=no"
13159 fi
13160 rm -f conftest.err conftest.$ac_ext
13161 fi
13162 echo "$as_me:13162: result: `eval echo '${'$as_ac_Header'}'`" >&5
13163 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13164 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13165   cat >>confdefs.h <<EOF
13166 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13167 EOF
13168
13169 fi
13170 done
13171
13172 cf_wait_headers="#include <sys/types.h>
13173 "
13174 if test $ac_cv_header_sys_wait_h = yes; then
13175 cf_wait_headers="$cf_wait_headers
13176 #include <sys/wait.h>
13177 "
13178 else
13179
13180 for ac_header in wait.h
13181 do
13182 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13183 echo "$as_me:13183: checking for $ac_header" >&5
13184 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13185 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13186   echo $ECHO_N "(cached) $ECHO_C" >&6
13187 else
13188   cat >conftest.$ac_ext <<_ACEOF
13189 #line 13189 "configure"
13190 #include "confdefs.h"
13191 #include <$ac_header>
13192 _ACEOF
13193 if { (eval echo "$as_me:13193: \"$ac_cpp conftest.$ac_ext\"") >&5
13194   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13195   ac_status=$?
13196   egrep -v '^ *\+' conftest.er1 >conftest.err
13197   rm -f conftest.er1
13198   cat conftest.err >&5
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit $ac_status); } >/dev/null; then
13201   if test -s conftest.err; then
13202     ac_cpp_err=$ac_c_preproc_warn_flag
13203   else
13204     ac_cpp_err=
13205   fi
13206 else
13207   ac_cpp_err=yes
13208 fi
13209 if test -z "$ac_cpp_err"; then
13210   eval "$as_ac_Header=yes"
13211 else
13212   echo "$as_me: failed program was:" >&5
13213   cat conftest.$ac_ext >&5
13214   eval "$as_ac_Header=no"
13215 fi
13216 rm -f conftest.err conftest.$ac_ext
13217 fi
13218 echo "$as_me:13218: result: `eval echo '${'$as_ac_Header'}'`" >&5
13219 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13220 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13221   cat >>confdefs.h <<EOF
13222 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13223 EOF
13224
13225 fi
13226 done
13227
13228 for ac_header in waitstatus.h
13229 do
13230 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13231 echo "$as_me:13231: checking for $ac_header" >&5
13232 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13233 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13234   echo $ECHO_N "(cached) $ECHO_C" >&6
13235 else
13236   cat >conftest.$ac_ext <<_ACEOF
13237 #line 13237 "configure"
13238 #include "confdefs.h"
13239 #include <$ac_header>
13240 _ACEOF
13241 if { (eval echo "$as_me:13241: \"$ac_cpp conftest.$ac_ext\"") >&5
13242   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13243   ac_status=$?
13244   egrep -v '^ *\+' conftest.er1 >conftest.err
13245   rm -f conftest.er1
13246   cat conftest.err >&5
13247   echo "$as_me:13247: \$? = $ac_status" >&5
13248   (exit $ac_status); } >/dev/null; then
13249   if test -s conftest.err; then
13250     ac_cpp_err=$ac_c_preproc_warn_flag
13251   else
13252     ac_cpp_err=
13253   fi
13254 else
13255   ac_cpp_err=yes
13256 fi
13257 if test -z "$ac_cpp_err"; then
13258   eval "$as_ac_Header=yes"
13259 else
13260   echo "$as_me: failed program was:" >&5
13261   cat conftest.$ac_ext >&5
13262   eval "$as_ac_Header=no"
13263 fi
13264 rm -f conftest.err conftest.$ac_ext
13265 fi
13266 echo "$as_me:13266: result: `eval echo '${'$as_ac_Header'}'`" >&5
13267 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13268 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13269   cat >>confdefs.h <<EOF
13270 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13271 EOF
13272
13273 fi
13274 done
13275
13276 if test $ac_cv_header_wait_h = yes; then
13277 cf_wait_headers="$cf_wait_headers
13278 #include <wait.h>
13279 "
13280 fi
13281 if test $ac_cv_header_waitstatus_h = yes; then
13282 cf_wait_headers="$cf_wait_headers
13283 #include <waitstatus.h>
13284 "
13285 fi
13286 fi
13287
13288 echo "$as_me:13288: checking for union wait" >&5
13289 echo $ECHO_N "checking for union wait... $ECHO_C" >&6
13290 if test "${cf_cv_type_unionwait+set}" = set; then
13291   echo $ECHO_N "(cached) $ECHO_C" >&6
13292 else
13293
13294         cat >conftest.$ac_ext <<_ACEOF
13295 #line 13295 "configure"
13296 #include "confdefs.h"
13297 $cf_wait_headers
13298 int
13299 main ()
13300 {
13301 int x;
13302          int y = WEXITSTATUS(x);
13303          int z = WTERMSIG(x);
13304          wait(&x);
13305
13306   ;
13307   return 0;
13308 }
13309 _ACEOF
13310 rm -f conftest.$ac_objext conftest$ac_exeext
13311 if { (eval echo "$as_me:13311: \"$ac_link\"") >&5
13312   (eval $ac_link) 2>&5
13313   ac_status=$?
13314   echo "$as_me:13314: \$? = $ac_status" >&5
13315   (exit $ac_status); } &&
13316          { ac_try='test -s conftest$ac_exeext'
13317   { (eval echo "$as_me:13317: \"$ac_try\"") >&5
13318   (eval $ac_try) 2>&5
13319   ac_status=$?
13320   echo "$as_me:13320: \$? = $ac_status" >&5
13321   (exit $ac_status); }; }; then
13322   cf_cv_type_unionwait=no
13323          echo compiles ok w/o union wait 1>&5
13324
13325 else
13326   echo "$as_me: failed program was:" >&5
13327 cat conftest.$ac_ext >&5
13328
13329         cat >conftest.$ac_ext <<_ACEOF
13330 #line 13330 "configure"
13331 #include "confdefs.h"
13332 $cf_wait_headers
13333 int
13334 main ()
13335 {
13336 union wait x;
13337 #ifdef WEXITSTATUS
13338          int y = WEXITSTATUS(x);
13339 #endif
13340 #ifdef WTERMSIG
13341          int z = WTERMSIG(x);
13342 #endif
13343          wait(&x);
13344
13345   ;
13346   return 0;
13347 }
13348 _ACEOF
13349 rm -f conftest.$ac_objext conftest$ac_exeext
13350 if { (eval echo "$as_me:13350: \"$ac_link\"") >&5
13351   (eval $ac_link) 2>&5
13352   ac_status=$?
13353   echo "$as_me:13353: \$? = $ac_status" >&5
13354   (exit $ac_status); } &&
13355          { ac_try='test -s conftest$ac_exeext'
13356   { (eval echo "$as_me:13356: \"$ac_try\"") >&5
13357   (eval $ac_try) 2>&5
13358   ac_status=$?
13359   echo "$as_me:13359: \$? = $ac_status" >&5
13360   (exit $ac_status); }; }; then
13361   cf_cv_type_unionwait=yes
13362          echo compiles ok with union wait and possibly macros too 1>&5
13363
13364 else
13365   echo "$as_me: failed program was:" >&5
13366 cat conftest.$ac_ext >&5
13367 cf_cv_type_unionwait=no
13368 fi
13369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13370 fi
13371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13372 fi
13373
13374 echo "$as_me:13374: result: $cf_cv_type_unionwait" >&5
13375 echo "${ECHO_T}$cf_cv_type_unionwait" >&6
13376 test $cf_cv_type_unionwait = yes && cat >>confdefs.h <<\EOF
13377 #define HAVE_TYPE_UNIONWAIT 1
13378 EOF
13379
13380 if test $cf_cv_type_unionwait = yes; then
13381
13382         echo "$as_me:13382: checking if union wait can be used as wait-arg" >&5
13383 echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
13384         if test "${cf_cv_arg_union_wait+set}" = set; then
13385   echo $ECHO_N "(cached) $ECHO_C" >&6
13386 else
13387
13388                 cat >conftest.$ac_ext <<_ACEOF
13389 #line 13389 "configure"
13390 #include "confdefs.h"
13391 $cf_wait_headers
13392 int
13393 main ()
13394 {
13395 union wait x; wait(&x)
13396   ;
13397   return 0;
13398 }
13399 _ACEOF
13400 rm -f conftest.$ac_objext
13401 if { (eval echo "$as_me:13401: \"$ac_compile\"") >&5
13402   (eval $ac_compile) 2>&5
13403   ac_status=$?
13404   echo "$as_me:13404: \$? = $ac_status" >&5
13405   (exit $ac_status); } &&
13406          { ac_try='test -s conftest.$ac_objext'
13407   { (eval echo "$as_me:13407: \"$ac_try\"") >&5
13408   (eval $ac_try) 2>&5
13409   ac_status=$?
13410   echo "$as_me:13410: \$? = $ac_status" >&5
13411   (exit $ac_status); }; }; then
13412   cf_cv_arg_union_wait=yes
13413 else
13414   echo "$as_me: failed program was:" >&5
13415 cat conftest.$ac_ext >&5
13416 cf_cv_arg_union_wait=no
13417 fi
13418 rm -f conftest.$ac_objext conftest.$ac_ext
13419
13420 fi
13421
13422         echo "$as_me:13422: result: $cf_cv_arg_union_wait" >&5
13423 echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
13424         test $cf_cv_arg_union_wait = yes && cat >>confdefs.h <<\EOF
13425 #define WAIT_USES_UNION 1
13426 EOF
13427
13428         echo "$as_me:13428: checking if union wait can be used as waitpid-arg" >&5
13429 echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
13430         if test "${cf_cv_arg_union_waitpid+set}" = set; then
13431   echo $ECHO_N "(cached) $ECHO_C" >&6
13432 else
13433
13434                 cat >conftest.$ac_ext <<_ACEOF
13435 #line 13435 "configure"
13436 #include "confdefs.h"
13437 $cf_wait_headers
13438 int
13439 main ()
13440 {
13441 union wait x; waitpid(0, &x, 0)
13442   ;
13443   return 0;
13444 }
13445 _ACEOF
13446 rm -f conftest.$ac_objext
13447 if { (eval echo "$as_me:13447: \"$ac_compile\"") >&5
13448   (eval $ac_compile) 2>&5
13449   ac_status=$?
13450   echo "$as_me:13450: \$? = $ac_status" >&5
13451   (exit $ac_status); } &&
13452          { ac_try='test -s conftest.$ac_objext'
13453   { (eval echo "$as_me:13453: \"$ac_try\"") >&5
13454   (eval $ac_try) 2>&5
13455   ac_status=$?
13456   echo "$as_me:13456: \$? = $ac_status" >&5
13457   (exit $ac_status); }; }; then
13458   cf_cv_arg_union_waitpid=yes
13459 else
13460   echo "$as_me: failed program was:" >&5
13461 cat conftest.$ac_ext >&5
13462 cf_cv_arg_union_waitpid=no
13463 fi
13464 rm -f conftest.$ac_objext conftest.$ac_ext
13465
13466 fi
13467
13468         echo "$as_me:13468: result: $cf_cv_arg_union_waitpid" >&5
13469 echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
13470         test $cf_cv_arg_union_waitpid = yes && cat >>confdefs.h <<\EOF
13471 #define WAITPID_USES_UNION 1
13472 EOF
13473
13474 fi
13475
13476 echo "$as_me:13476: checking if we must include wchar.h to declare mbstate_t" >&5
13477 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13478 if test "${cf_cv_mbstate_t+set}" = set; then
13479   echo $ECHO_N "(cached) $ECHO_C" >&6
13480 else
13481
13482 cat >conftest.$ac_ext <<_ACEOF
13483 #line 13483 "configure"
13484 #include "confdefs.h"
13485
13486 #include <stdlib.h>
13487 #include <stdio.h>
13488 #ifdef HAVE_LIBUTF8_H
13489 #include <libutf8.h>
13490 #endif
13491 int
13492 main ()
13493 {
13494 mbstate_t state
13495   ;
13496   return 0;
13497 }
13498 _ACEOF
13499 rm -f conftest.$ac_objext
13500 if { (eval echo "$as_me:13500: \"$ac_compile\"") >&5
13501   (eval $ac_compile) 2>&5
13502   ac_status=$?
13503   echo "$as_me:13503: \$? = $ac_status" >&5
13504   (exit $ac_status); } &&
13505          { ac_try='test -s conftest.$ac_objext'
13506   { (eval echo "$as_me:13506: \"$ac_try\"") >&5
13507   (eval $ac_try) 2>&5
13508   ac_status=$?
13509   echo "$as_me:13509: \$? = $ac_status" >&5
13510   (exit $ac_status); }; }; then
13511   cf_cv_mbstate_t=no
13512 else
13513   echo "$as_me: failed program was:" >&5
13514 cat conftest.$ac_ext >&5
13515 cat >conftest.$ac_ext <<_ACEOF
13516 #line 13516 "configure"
13517 #include "confdefs.h"
13518
13519 #include <stdlib.h>
13520 #include <stdio.h>
13521 #include <wchar.h>
13522 #ifdef HAVE_LIBUTF8_H
13523 #include <libutf8.h>
13524 #endif
13525 int
13526 main ()
13527 {
13528 mbstate_t value
13529   ;
13530   return 0;
13531 }
13532 _ACEOF
13533 rm -f conftest.$ac_objext
13534 if { (eval echo "$as_me:13534: \"$ac_compile\"") >&5
13535   (eval $ac_compile) 2>&5
13536   ac_status=$?
13537   echo "$as_me:13537: \$? = $ac_status" >&5
13538   (exit $ac_status); } &&
13539          { ac_try='test -s conftest.$ac_objext'
13540   { (eval echo "$as_me:13540: \"$ac_try\"") >&5
13541   (eval $ac_try) 2>&5
13542   ac_status=$?
13543   echo "$as_me:13543: \$? = $ac_status" >&5
13544   (exit $ac_status); }; }; then
13545   cf_cv_mbstate_t=yes
13546 else
13547   echo "$as_me: failed program was:" >&5
13548 cat conftest.$ac_ext >&5
13549 cf_cv_mbstate_t=unknown
13550 fi
13551 rm -f conftest.$ac_objext conftest.$ac_ext
13552 fi
13553 rm -f conftest.$ac_objext conftest.$ac_ext
13554 fi
13555 echo "$as_me:13555: result: $cf_cv_mbstate_t" >&5
13556 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13557
13558 if test "$cf_cv_mbstate_t" = yes ; then
13559         cat >>confdefs.h <<\EOF
13560 #define NEED_WCHAR_H 1
13561 EOF
13562
13563 fi
13564
13565 if test "$cf_cv_mbstate_t" != unknown ; then
13566         cat >>confdefs.h <<\EOF
13567 #define HAVE_MBSTATE_T 1
13568 EOF
13569
13570 fi
13571
13572 PACKAGE_PREFIX=DLG
13573 PACKAGE_CONFIG=dlg_config.h
13574
13575 EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
13576
13577 cat >conftest.$ac_ext <<_ACEOF
13578 #line 13578 "configure"
13579 #include "confdefs.h"
13580 #include <locale.h>
13581 int
13582 main ()
13583 {
13584 setlocale(LC_ALL, "")
13585   ;
13586   return 0;
13587 }
13588 _ACEOF
13589 rm -f conftest.$ac_objext conftest$ac_exeext
13590 if { (eval echo "$as_me:13590: \"$ac_link\"") >&5
13591   (eval $ac_link) 2>&5
13592   ac_status=$?
13593   echo "$as_me:13593: \$? = $ac_status" >&5
13594   (exit $ac_status); } &&
13595          { ac_try='test -s conftest$ac_exeext'
13596   { (eval echo "$as_me:13596: \"$ac_try\"") >&5
13597   (eval $ac_try) 2>&5
13598   ac_status=$?
13599   echo "$as_me:13599: \$? = $ac_status" >&5
13600   (exit $ac_status); }; }; then
13601   cat >>confdefs.h <<\EOF
13602 #define HAVE_SETLOCALE 1
13603 EOF
13604
13605 else
13606   echo "$as_me: failed program was:" >&5
13607 cat conftest.$ac_ext >&5
13608 fi
13609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13610
13611 LD_RPATH_OPT=
13612 echo "$as_me:13612: checking for an rpath option" >&5
13613 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
13614 case $cf_cv_system_name in #(vi
13615 irix*) #(vi
13616         if test "$GCC" = yes; then
13617                 LD_RPATH_OPT="-Wl,-rpath,"
13618         else
13619                 LD_RPATH_OPT="-rpath "
13620         fi
13621         ;;
13622 linux*|gnu*|k*bsd*-gnu) #(vi
13623         LD_RPATH_OPT="-Wl,-rpath,"
13624         ;;
13625 openbsd[2-9].*|mirbsd*) #(vi
13626         LD_RPATH_OPT="-Wl,-rpath,"
13627         ;;
13628 freebsd*) #(vi
13629         LD_RPATH_OPT="-rpath "
13630         ;;
13631 netbsd*) #(vi
13632         LD_RPATH_OPT="-Wl,-rpath,"
13633         ;;
13634 osf*|mls+*) #(vi
13635         LD_RPATH_OPT="-rpath "
13636         ;;
13637 solaris2*) #(vi
13638         LD_RPATH_OPT="-R"
13639         ;;
13640 *)
13641         ;;
13642 esac
13643 echo "$as_me:13643: result: $LD_RPATH_OPT" >&5
13644 echo "${ECHO_T}$LD_RPATH_OPT" >&6
13645
13646 case "x$LD_RPATH_OPT" in #(vi
13647 x-R*)
13648         echo "$as_me:13648: checking if we need a space after rpath option" >&5
13649 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
13650         cf_save_LIBS="$LIBS"
13651         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
13652         cat >conftest.$ac_ext <<_ACEOF
13653 #line 13653 "configure"
13654 #include "confdefs.h"
13655
13656 int
13657 main ()
13658 {
13659
13660   ;
13661   return 0;
13662 }
13663 _ACEOF
13664 rm -f conftest.$ac_objext conftest$ac_exeext
13665 if { (eval echo "$as_me:13665: \"$ac_link\"") >&5
13666   (eval $ac_link) 2>&5
13667   ac_status=$?
13668   echo "$as_me:13668: \$? = $ac_status" >&5
13669   (exit $ac_status); } &&
13670          { ac_try='test -s conftest$ac_exeext'
13671   { (eval echo "$as_me:13671: \"$ac_try\"") >&5
13672   (eval $ac_try) 2>&5
13673   ac_status=$?
13674   echo "$as_me:13674: \$? = $ac_status" >&5
13675   (exit $ac_status); }; }; then
13676   cf_rpath_space=no
13677 else
13678   echo "$as_me: failed program was:" >&5
13679 cat conftest.$ac_ext >&5
13680 cf_rpath_space=yes
13681 fi
13682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13683         LIBS="$cf_save_LIBS"
13684         echo "$as_me:13684: result: $cf_rpath_space" >&5
13685 echo "${ECHO_T}$cf_rpath_space" >&6
13686         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
13687         ;;
13688 esac
13689
13690 echo "$as_me:13690: checking if rpath-hack should be disabled" >&5
13691 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
13692
13693 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
13694 if test "${enable_rpath_hack+set}" = set; then
13695   enableval="$enable_rpath_hack"
13696   test "$enableval" != no && enableval=yes
13697   if test "$enableval" != "yes" ; then
13698     cf_disable_rpath_hack=yes
13699   else
13700     cf_disable_rpath_hack=no
13701   fi
13702 else
13703   enableval=yes
13704   cf_disable_rpath_hack=no
13705
13706 fi;
13707 echo "$as_me:13707: result: $cf_disable_rpath_hack" >&5
13708 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
13709 if test "$cf_disable_rpath_hack" = no ; then
13710
13711 echo "$as_me:13711: checking for updated LDFLAGS" >&5
13712 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
13713 if test -n "$LD_RPATH_OPT" ; then
13714         echo "$as_me:13714: result: maybe" >&5
13715 echo "${ECHO_T}maybe" >&6
13716
13717         for ac_prog in ldd
13718 do
13719   # Extract the first word of "$ac_prog", so it can be a program name with args.
13720 set dummy $ac_prog; ac_word=$2
13721 echo "$as_me:13721: checking for $ac_word" >&5
13722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13723 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
13724   echo $ECHO_N "(cached) $ECHO_C" >&6
13725 else
13726   if test -n "$cf_ldd_prog"; then
13727   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
13728 else
13729   ac_save_IFS=$IFS; IFS=$ac_path_separator
13730 ac_dummy="$PATH"
13731 for ac_dir in $ac_dummy; do
13732   IFS=$ac_save_IFS
13733   test -z "$ac_dir" && ac_dir=.
13734   $as_executable_p "$ac_dir/$ac_word" || continue
13735 ac_cv_prog_cf_ldd_prog="$ac_prog"
13736 echo "$as_me:13736: found $ac_dir/$ac_word" >&5
13737 break
13738 done
13739
13740 fi
13741 fi
13742 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
13743 if test -n "$cf_ldd_prog"; then
13744   echo "$as_me:13744: result: $cf_ldd_prog" >&5
13745 echo "${ECHO_T}$cf_ldd_prog" >&6
13746 else
13747   echo "$as_me:13747: result: no" >&5
13748 echo "${ECHO_T}no" >&6
13749 fi
13750
13751   test -n "$cf_ldd_prog" && break
13752 done
13753 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
13754
13755         cf_rpath_list="/usr/lib /lib"
13756         if test "$cf_ldd_prog" != no
13757         then
13758                 cf_rpath_oops=
13759
13760 cat >conftest.$ac_ext <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763 #include <stdio.h>
13764 int
13765 main ()
13766 {
13767 printf("Hello");
13768   ;
13769   return 0;
13770 }
13771 _ACEOF
13772 rm -f conftest.$ac_objext conftest$ac_exeext
13773 if { (eval echo "$as_me:13773: \"$ac_link\"") >&5
13774   (eval $ac_link) 2>&5
13775   ac_status=$?
13776   echo "$as_me:13776: \$? = $ac_status" >&5
13777   (exit $ac_status); } &&
13778          { ac_try='test -s conftest$ac_exeext'
13779   { (eval echo "$as_me:13779: \"$ac_try\"") >&5
13780   (eval $ac_try) 2>&5
13781   ac_status=$?
13782   echo "$as_me:13782: \$? = $ac_status" >&5
13783   (exit $ac_status); }; }; then
13784   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
13785                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
13786 else
13787   echo "$as_me: failed program was:" >&5
13788 cat conftest.$ac_ext >&5
13789 fi
13790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13791
13792                 # If we passed the link-test, but get a "not found" on a given library,
13793                 # this could be due to inept reconfiguration of gcc to make it only
13794                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
13795                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
13796                 # /usr/local libraries.
13797                 if test -n "$cf_rpath_oops"
13798                 then
13799                         for cf_rpath_src in $cf_rpath_oops
13800                         do
13801                                 for cf_rpath_dir in \
13802                                         /usr/local \
13803                                         /usr/pkg \
13804                                         /opt/sfw
13805                                 do
13806                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
13807                                         then
13808                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
13809
13810 echo "${as_me:-configure}:13810: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
13811
13812                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
13813                                                 break
13814                                         fi
13815                                 done
13816                         done
13817                 fi
13818         fi
13819
13820         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
13821
13822 echo "${as_me:-configure}:13822: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
13823
13824 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
13825
13826 echo "${as_me:-configure}:13826: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
13827
13828 cf_rpath_dst=
13829 for cf_rpath_src in $LDFLAGS
13830 do
13831         case $cf_rpath_src in #(vi
13832         -L*) #(vi
13833
13834                 # check if this refers to a directory which we will ignore
13835                 cf_rpath_skip=no
13836                 if test -n "$cf_rpath_list"
13837                 then
13838                         for cf_rpath_item in $cf_rpath_list
13839                         do
13840                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
13841                                 then
13842                                         cf_rpath_skip=yes
13843                                         break
13844                                 fi
13845                         done
13846                 fi
13847
13848                 if test "$cf_rpath_skip" = no
13849                 then
13850                         # transform the option
13851                         if test "$LD_RPATH_OPT" = "-R " ; then
13852                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
13853                         else
13854                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
13855                         fi
13856
13857                         # if we have not already added this, add it now
13858                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
13859                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
13860                         then
13861                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
13862
13863 echo "${as_me:-configure}:13863: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
13864
13865                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
13866                         fi
13867                 fi
13868                 ;;
13869         esac
13870         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
13871 done
13872 LDFLAGS=$cf_rpath_dst
13873
13874 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
13875
13876 echo "${as_me:-configure}:13876: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
13877
13878 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
13879
13880 echo "${as_me:-configure}:13880: testing ...checking LIBS $LIBS ..." 1>&5
13881
13882 cf_rpath_dst=
13883 for cf_rpath_src in $LIBS
13884 do
13885         case $cf_rpath_src in #(vi
13886         -L*) #(vi
13887
13888                 # check if this refers to a directory which we will ignore
13889                 cf_rpath_skip=no
13890                 if test -n "$cf_rpath_list"
13891                 then
13892                         for cf_rpath_item in $cf_rpath_list
13893                         do
13894                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
13895                                 then
13896                                         cf_rpath_skip=yes
13897                                         break
13898                                 fi
13899                         done
13900                 fi
13901
13902                 if test "$cf_rpath_skip" = no
13903                 then
13904                         # transform the option
13905                         if test "$LD_RPATH_OPT" = "-R " ; then
13906                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
13907                         else
13908                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
13909                         fi
13910
13911                         # if we have not already added this, add it now
13912                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
13913                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
13914                         then
13915                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
13916
13917 echo "${as_me:-configure}:13917: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
13918
13919                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
13920                         fi
13921                 fi
13922                 ;;
13923         esac
13924         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
13925 done
13926 LIBS=$cf_rpath_dst
13927
13928 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
13929
13930 echo "${as_me:-configure}:13930: testing ...checked LIBS $LIBS ..." 1>&5
13931
13932         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
13933
13934 echo "${as_me:-configure}:13934: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
13935
13936 fi
13937
13938 fi
13939
13940 ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE samples/install/makefile"
13941 ac_config_commands="$ac_config_commands default"
13942 cat >confcache <<\_ACEOF
13943 # This file is a shell script that caches the results of configure
13944 # tests run on this system so they can be shared between configure
13945 # scripts and configure runs, see configure's option --config-cache.
13946 # It is not useful on other systems.  If it contains results you don't
13947 # want to keep, you may remove or edit it.
13948 #
13949 # config.status only pays attention to the cache file if you give it
13950 # the --recheck option to rerun configure.
13951 #
13952 # `ac_cv_env_foo' variables (set or unset) will be overriden when
13953 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13954 # following values.
13955
13956 _ACEOF
13957
13958 # The following way of writing the cache mishandles newlines in values,
13959 # but we know of no workaround that is simple, portable, and efficient.
13960 # So, don't put newlines in cache variables' values.
13961 # Ultrix sh set writes to stderr and can't be redirected directly,
13962 # and sets the high bit in the cache file unless we assign to the vars.
13963 {
13964   (set) 2>&1 |
13965     case `(ac_space=' '; set | grep ac_space) 2>&1` in
13966     *ac_space=\ *)
13967       # `set' does not quote correctly, so add quotes (double-quote
13968       # substitution turns \\\\ into \\, and sed turns \\ into \).
13969       sed -n \
13970         "s/'/'\\\\''/g;
13971           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13972       ;;
13973     *)
13974       # `set' quotes correctly as required by POSIX, so do not add quotes.
13975       sed -n \
13976         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13977       ;;
13978     esac;
13979 } |
13980   sed '
13981      t clear
13982      : clear
13983      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13984      t end
13985      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13986      : end' >>confcache
13987 if cmp -s $cache_file confcache; then :; else
13988   if test -w $cache_file; then
13989     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
13990     cat confcache >$cache_file
13991   else
13992     echo "not updating unwritable cache $cache_file"
13993   fi
13994 fi
13995 rm -f confcache
13996
13997 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13998 # Let make expand exec_prefix.
13999 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14000
14001 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14002 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14003 # trailing colons and then remove the whole line if VPATH becomes empty
14004 # (actually we leave an empty line to preserve line numbers).
14005 if test "x$srcdir" = x.; then
14006   ac_vpsub='/^[         ]*VPATH[        ]*=/{
14007 s/:*\$(srcdir):*/:/;
14008 s/:*\${srcdir}:*/:/;
14009 s/:*@srcdir@:*/:/;
14010 s/^\([^=]*=[    ]*\):*/\1/;
14011 s/:*$//;
14012 s/^[^=]*=[      ]*$//;
14013 }'
14014 fi
14015
14016 DEFS=-DHAVE_CONFIG_H
14017
14018 : ${CONFIG_STATUS=./config.status}
14019 ac_clean_files_save=$ac_clean_files
14020 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14021 { echo "$as_me:14021: creating $CONFIG_STATUS" >&5
14022 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14023 cat >$CONFIG_STATUS <<_ACEOF
14024 #! $SHELL
14025 # Generated automatically by configure.
14026 # Run this file to recreate the current configuration.
14027 # Compiler output produced by configure, useful for debugging
14028 # configure, is in config.log if it exists.
14029
14030 debug=false
14031 SHELL=\${CONFIG_SHELL-$SHELL}
14032 ac_cs_invocation="\$0 \$@"
14033
14034 _ACEOF
14035
14036 cat >>$CONFIG_STATUS <<\_ACEOF
14037 # Be Bourne compatible
14038 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14039   emulate sh
14040   NULLCMD=:
14041 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14042   set -o posix
14043 fi
14044
14045 # Name of the executable.
14046 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14047
14048 if expr a : '\(a\)' >/dev/null 2>&1; then
14049   as_expr=expr
14050 else
14051   as_expr=false
14052 fi
14053
14054 rm -f conf$$ conf$$.exe conf$$.file
14055 echo >conf$$.file
14056 if ln -s conf$$.file conf$$ 2>/dev/null; then
14057   # We could just check for DJGPP; but this test a) works b) is more generic
14058   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14059   if test -f conf$$.exe; then
14060     # Don't use ln at all; we don't have any links
14061     as_ln_s='cp -p'
14062   else
14063     as_ln_s='ln -s'
14064   fi
14065 elif ln conf$$.file conf$$ 2>/dev/null; then
14066   as_ln_s=ln
14067 else
14068   as_ln_s='cp -p'
14069 fi
14070 rm -f conf$$ conf$$.exe conf$$.file
14071
14072 as_executable_p="test -f"
14073
14074 # Support unset when possible.
14075 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14076   as_unset=unset
14077 else
14078   as_unset=false
14079 fi
14080
14081 # NLS nuisances.
14082 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14083 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14084 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14085 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14086 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14087 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14088 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14089 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14090
14091 # IFS
14092 # We need space, tab and new line, in precisely that order.
14093 as_nl='
14094 '
14095 IFS="   $as_nl"
14096
14097 # CDPATH.
14098 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14099
14100 exec 6>&1
14101
14102 _ACEOF
14103
14104 # Files that config.status was made for.
14105 if test -n "$ac_config_files"; then
14106   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14107 fi
14108
14109 if test -n "$ac_config_headers"; then
14110   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14111 fi
14112
14113 if test -n "$ac_config_links"; then
14114   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14115 fi
14116
14117 if test -n "$ac_config_commands"; then
14118   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14119 fi
14120
14121 cat >>$CONFIG_STATUS <<\EOF
14122
14123 ac_cs_usage="\
14124 \`$as_me' instantiates files from templates according to the
14125 current configuration.
14126
14127 Usage: $0 [OPTIONS] [FILE]...
14128
14129   -h, --help       print this help, then exit
14130   -V, --version    print version number, then exit
14131   -d, --debug      don't remove temporary files
14132       --recheck    update $as_me by reconfiguring in the same conditions
14133   --file=FILE[:TEMPLATE]
14134                    instantiate the configuration file FILE
14135   --header=FILE[:TEMPLATE]
14136                    instantiate the configuration header FILE
14137
14138 Configuration files:
14139 $config_files
14140
14141 Configuration headers:
14142 $config_headers
14143
14144 Configuration commands:
14145 $config_commands
14146
14147 Report bugs to <dickey@invisible-island.net>."
14148 EOF
14149
14150 cat >>$CONFIG_STATUS <<EOF
14151 ac_cs_version="\\
14152 config.status
14153 configured by $0, generated by GNU Autoconf 2.52.20101002,
14154   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14155
14156 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14157 Free Software Foundation, Inc.
14158 This config.status script is free software; the Free Software Foundation
14159 gives unlimited permission to copy, distribute and modify it."
14160 srcdir=$srcdir
14161 INSTALL="$INSTALL"
14162 EOF
14163
14164 cat >>$CONFIG_STATUS <<\EOF
14165 # If no file are specified by the user, then we need to provide default
14166 # value.  By we need to know if files were specified by the user.
14167 ac_need_defaults=:
14168 while test $# != 0
14169 do
14170   case $1 in
14171   --*=*)
14172     ac_option=`expr "x$1" : 'x\([^=]*\)='`
14173     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14174     shift
14175     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14176     shift
14177     ;;
14178   -*);;
14179   *) # This is not an option, so the user has probably given explicit
14180      # arguments.
14181      ac_need_defaults=false;;
14182   esac
14183
14184   case $1 in
14185   # Handling of the options.
14186 EOF
14187 cat >>$CONFIG_STATUS <<EOF
14188   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14189     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14190     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14191 EOF
14192 cat >>$CONFIG_STATUS <<\EOF
14193   --version | --vers* | -V )
14194     echo "$ac_cs_version"; exit 0 ;;
14195   --he | --h)
14196     # Conflict between --help and --header
14197     { { echo "$as_me:14197: error: ambiguous option: $1
14198 Try \`$0 --help' for more information." >&5
14199 echo "$as_me: error: ambiguous option: $1
14200 Try \`$0 --help' for more information." >&2;}
14201    { (exit 1); exit 1; }; };;
14202   --help | --hel | -h )
14203     echo "$ac_cs_usage"; exit 0 ;;
14204   --debug | --d* | -d )
14205     debug=: ;;
14206   --file | --fil | --fi | --f )
14207     shift
14208     CONFIG_FILES="$CONFIG_FILES $1"
14209     ac_need_defaults=false;;
14210   --header | --heade | --head | --hea )
14211     shift
14212     CONFIG_HEADERS="$CONFIG_HEADERS $1"
14213     ac_need_defaults=false;;
14214
14215   # This is an error.
14216   -*) { { echo "$as_me:14216: error: unrecognized option: $1
14217 Try \`$0 --help' for more information." >&5
14218 echo "$as_me: error: unrecognized option: $1
14219 Try \`$0 --help' for more information." >&2;}
14220    { (exit 1); exit 1; }; } ;;
14221
14222   *) ac_config_targets="$ac_config_targets $1" ;;
14223
14224   esac
14225   shift
14226 done
14227
14228 exec 5>>config.log
14229 cat >&5 << _ACEOF
14230
14231 ## ----------------------- ##
14232 ## Running config.status.  ##
14233 ## ----------------------- ##
14234
14235 This file was extended by $as_me 2.52.20101002, executed with
14236   CONFIG_FILES    = $CONFIG_FILES
14237   CONFIG_HEADERS  = $CONFIG_HEADERS
14238   CONFIG_LINKS    = $CONFIG_LINKS
14239   CONFIG_COMMANDS = $CONFIG_COMMANDS
14240   > $ac_cs_invocation
14241 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14242
14243 _ACEOF
14244 EOF
14245
14246 cat >>$CONFIG_STATUS <<EOF
14247 #
14248 # INIT-COMMANDS section.
14249 #
14250
14251 EOF
14252
14253 cat >>$CONFIG_STATUS <<\EOF
14254 for ac_config_target in $ac_config_targets
14255 do
14256   case "$ac_config_target" in
14257   # Handling of arguments.
14258   "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
14259   "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
14260   "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
14261   "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
14262   "samples/install/makefile" ) CONFIG_FILES="$CONFIG_FILES samples/install/makefile" ;;
14263   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
14264   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14265   "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
14266   *) { { echo "$as_me:14266: error: invalid argument: $ac_config_target" >&5
14267 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14268    { (exit 1); exit 1; }; };;
14269   esac
14270 done
14271
14272 # If the user did not use the arguments to specify the items to instantiate,
14273 # then the envvar interface is used.  Set only those that are not.
14274 # We use the long form for the default assignment because of an extremely
14275 # bizarre bug on SunOS 4.1.3.
14276 if $ac_need_defaults; then
14277   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14278   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14279   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14280 fi
14281
14282 # Create a temporary directory, and hook for its removal unless debugging.
14283 $debug ||
14284 {
14285   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14286   trap '{ (exit 1); exit 1; }' 1 2 13 15
14287 }
14288
14289 # Create a (secure) tmp directory for tmp files.
14290 : ${TMPDIR=/tmp}
14291 {
14292   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14293   test -n "$tmp" && test -d "$tmp"
14294 }  ||
14295 {
14296   tmp=$TMPDIR/cs$$-$RANDOM
14297   (umask 077 && mkdir $tmp)
14298 } ||
14299 {
14300    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14301    { (exit 1); exit 1; }
14302 }
14303
14304 EOF
14305
14306 cat >>$CONFIG_STATUS <<EOF
14307
14308 #
14309 # CONFIG_FILES section.
14310 #
14311
14312 # No need to generate the scripts if there are no CONFIG_FILES.
14313 # This happens for instance when ./config.status config.h
14314 if test -n "\$CONFIG_FILES"; then
14315   # Protect against being on the right side of a sed subst in config.status.
14316   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14317    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14318 s,@SHELL@,$SHELL,;t t
14319 s,@exec_prefix@,$exec_prefix,;t t
14320 s,@prefix@,$prefix,;t t
14321 s,@program_transform_name@,$program_transform_name,;t t
14322 s,@bindir@,$bindir,;t t
14323 s,@sbindir@,$sbindir,;t t
14324 s,@libexecdir@,$libexecdir,;t t
14325 s,@datadir@,$datadir,;t t
14326 s,@sysconfdir@,$sysconfdir,;t t
14327 s,@sharedstatedir@,$sharedstatedir,;t t
14328 s,@localstatedir@,$localstatedir,;t t
14329 s,@libdir@,$libdir,;t t
14330 s,@includedir@,$includedir,;t t
14331 s,@oldincludedir@,$oldincludedir,;t t
14332 s,@infodir@,$infodir,;t t
14333 s,@mandir@,$mandir,;t t
14334 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14335 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14336 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14337 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14338 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14339 s,@build_alias@,$build_alias,;t t
14340 s,@host_alias@,$host_alias,;t t
14341 s,@target_alias@,$target_alias,;t t
14342 s,@ECHO_C@,$ECHO_C,;t t
14343 s,@ECHO_N@,$ECHO_N,;t t
14344 s,@ECHO_T@,$ECHO_T,;t t
14345 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14346 s,@DEFS@,$DEFS,;t t
14347 s,@LIBS@,$LIBS,;t t
14348 s,@DESTDIR@,$DESTDIR,;t t
14349 s,@CC@,$CC,;t t
14350 s,@CFLAGS@,$CFLAGS,;t t
14351 s,@LDFLAGS@,$LDFLAGS,;t t
14352 s,@CPPFLAGS@,$CPPFLAGS,;t t
14353 s,@ac_ct_CC@,$ac_ct_CC,;t t
14354 s,@EXEEXT@,$EXEEXT,;t t
14355 s,@OBJEXT@,$OBJEXT,;t t
14356 s,@CPP@,$CPP,;t t
14357 s,@SET_MAKE@,$SET_MAKE,;t t
14358 s,@RANLIB@,$RANLIB,;t t
14359 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14360 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14361 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14362 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14363 s,@AR@,$AR,;t t
14364 s,@ac_ct_AR@,$ac_ct_AR,;t t
14365 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14366 s,@CTAGS@,$CTAGS,;t t
14367 s,@ETAGS@,$ETAGS,;t t
14368 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14369 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14370 s,@ECHO_LT@,$ECHO_LT,;t t
14371 s,@ECHO_LD@,$ECHO_LD,;t t
14372 s,@RULE_CC@,$RULE_CC,;t t
14373 s,@SHOW_CC@,$SHOW_CC,;t t
14374 s,@ECHO_CC@,$ECHO_CC,;t t
14375 s,@build@,$build,;t t
14376 s,@build_cpu@,$build_cpu,;t t
14377 s,@build_vendor@,$build_vendor,;t t
14378 s,@build_os@,$build_os,;t t
14379 s,@host@,$host,;t t
14380 s,@host_cpu@,$host_cpu,;t t
14381 s,@host_vendor@,$host_vendor,;t t
14382 s,@host_os@,$host_os,;t t
14383 s,@PROG_EXT@,$PROG_EXT,;t t
14384 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14385 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14386 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14387 s,@VERSION@,$VERSION,;t t
14388 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
14389 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
14390 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
14391 s,@PACKAGE@,$PACKAGE,;t t
14392 s,@SUB_INC@,$SUB_INC,;t t
14393 s,@CONFIG_H@,$CONFIG_H,;t t
14394 s,@ALLOCA@,$ALLOCA,;t t
14395 s,@GLIBC21@,$GLIBC21,;t t
14396 s,@LIBICONV@,$LIBICONV,;t t
14397 s,@USE_NLS@,$USE_NLS,;t t
14398 s,@MSGFMT@,$MSGFMT,;t t
14399 s,@GMSGFMT@,$GMSGFMT,;t t
14400 s,@XGETTEXT@,$XGETTEXT,;t t
14401 s,@INTLBISON@,$INTLBISON,;t t
14402 s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
14403 s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
14404 s,@CATALOGS@,$CATALOGS,;t t
14405 s,@CATOBJEXT@,$CATOBJEXT,;t t
14406 s,@GMOFILES@,$GMOFILES,;t t
14407 s,@INTLLIBS@,$INTLLIBS,;t t
14408 s,@INTLOBJS@,$INTLOBJS,;t t
14409 s,@POFILES@,$POFILES,;t t
14410 s,@POSUB@,$POSUB,;t t
14411 s,@DATADIRNAME@,$DATADIRNAME,;t t
14412 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
14413 s,@GENCAT@,$GENCAT,;t t
14414 s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
14415 s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
14416 s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
14417 s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
14418 s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
14419 s,@GT_YES@,$GT_YES,;t t
14420 s,@GT_NO@,$GT_NO,;t t
14421 s,@LINK_PREFIX@,$LINK_PREFIX,;t t
14422 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
14423 s,@LIBTOOL@,$LIBTOOL,;t t
14424 s,@LT_UNDEF@,$LT_UNDEF,;t t
14425 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
14426 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
14427 s,@LIB_CREATE@,$LIB_CREATE,;t t
14428 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
14429 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14430 s,@LIB_PREP@,$LIB_PREP,;t t
14431 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
14432 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
14433 s,@LIB_LINK@,$LIB_LINK,;t t
14434 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
14435 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
14436 s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
14437 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14438 s,@EXTRAOBJS@,$EXTRAOBJS,;t t
14439 s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
14440 s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
14441 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
14442 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14443 CEOF
14444
14445 EOF
14446
14447   cat >>$CONFIG_STATUS <<\EOF
14448   # Split the substitutions into bite-sized pieces for seds with
14449   # small command number limits, like on Digital OSF/1 and HP-UX.
14450   ac_max_sed_lines=48
14451   ac_sed_frag=1 # Number of current file.
14452   ac_beg=1 # First line for current file.
14453   ac_end=$ac_max_sed_lines # Line after last line for current file.
14454   ac_more_lines=:
14455   ac_sed_cmds=
14456   while $ac_more_lines; do
14457     if test $ac_beg -gt 1; then
14458       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14459     else
14460       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14461     fi
14462     if test ! -s $tmp/subs.frag; then
14463       ac_more_lines=false
14464     else
14465       # The purpose of the label and of the branching condition is to
14466       # speed up the sed processing (if there are no `@' at all, there
14467       # is no need to browse any of the substitutions).
14468       # These are the two extra sed commands mentioned above.
14469       (echo ':t
14470   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14471       if test -z "$ac_sed_cmds"; then
14472         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14473       else
14474         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14475       fi
14476       ac_sed_frag=`expr $ac_sed_frag + 1`
14477       ac_beg=$ac_end
14478       ac_end=`expr $ac_end + $ac_max_sed_lines`
14479     fi
14480   done
14481   if test -z "$ac_sed_cmds"; then
14482     ac_sed_cmds=cat
14483   fi
14484 fi # test -n "$CONFIG_FILES"
14485
14486 EOF
14487 cat >>$CONFIG_STATUS <<\EOF
14488 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14489   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14490   case $ac_file in
14491   - | *:- | *:-:* ) # input from stdin
14492         cat >$tmp/stdin
14493         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14494         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14495   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14496         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14497   * )   ac_file_in=$ac_file.in ;;
14498   esac
14499
14500   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14501   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14502          X"$ac_file" : 'X\(//\)[^/]' \| \
14503          X"$ac_file" : 'X\(//\)$' \| \
14504          X"$ac_file" : 'X\(/\)' \| \
14505          .     : '\(.\)' 2>/dev/null ||
14506 echo X"$ac_file" |
14507     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14508           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14509           /^X\(\/\/\)$/{ s//\1/; q; }
14510           /^X\(\/\).*/{ s//\1/; q; }
14511           s/.*/./; q'`
14512   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14513     { case "$ac_dir" in
14514   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14515   *)                      as_incr_dir=.;;
14516 esac
14517 as_dummy="$ac_dir"
14518 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14519   case $as_mkdir_dir in
14520     # Skip DOS drivespec
14521     ?:) as_incr_dir=$as_mkdir_dir ;;
14522     *)
14523       as_incr_dir=$as_incr_dir/$as_mkdir_dir
14524       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14525     ;;
14526   esac
14527 done; }
14528
14529     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14530     # A "../" for each directory in $ac_dir_suffix.
14531     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14532   else
14533     ac_dir_suffix= ac_dots=
14534   fi
14535
14536   case $srcdir in
14537   .)  ac_srcdir=.
14538       if test -z "$ac_dots"; then
14539          ac_top_srcdir=.
14540       else
14541          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14542       fi ;;
14543   [\\/]* | ?:[\\/]* )
14544       ac_srcdir=$srcdir$ac_dir_suffix;
14545       ac_top_srcdir=$srcdir ;;
14546   *) # Relative path.
14547     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14548     ac_top_srcdir=$ac_dots$srcdir ;;
14549   esac
14550
14551   case $INSTALL in
14552   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14553   *) ac_INSTALL=$ac_dots$INSTALL ;;
14554   esac
14555
14556   if test x"$ac_file" != x-; then
14557     { echo "$as_me:14557: creating $ac_file" >&5
14558 echo "$as_me: creating $ac_file" >&6;}
14559     rm -f "$ac_file"
14560   fi
14561   # Let's still pretend it is `configure' which instantiates (i.e., don't
14562   # use $as_me), people would be surprised to read:
14563   #    /* config.h.  Generated automatically by config.status.  */
14564   configure_input="Generated automatically from `echo $ac_file_in |
14565                                                  sed 's,.*/,,'` by configure."
14566
14567   # First look for the input files in the build tree, otherwise in the
14568   # src tree.
14569   ac_file_inputs=`IFS=:
14570     for f in $ac_file_in; do
14571       case $f in
14572       -) echo $tmp/stdin ;;
14573       [\\/$]*)
14574          # Absolute (can't be DOS-style, as IFS=:)
14575          test -f "$f" || { { echo "$as_me:14575: error: cannot find input file: $f" >&5
14576 echo "$as_me: error: cannot find input file: $f" >&2;}
14577    { (exit 1); exit 1; }; }
14578          echo $f;;
14579       *) # Relative
14580          if test -f "$f"; then
14581            # Build tree
14582            echo $f
14583          elif test -f "$srcdir/$f"; then
14584            # Source tree
14585            echo $srcdir/$f
14586          else
14587            # /dev/null tree
14588            { { echo "$as_me:14588: error: cannot find input file: $f" >&5
14589 echo "$as_me: error: cannot find input file: $f" >&2;}
14590    { (exit 1); exit 1; }; }
14591          fi;;
14592       esac
14593     done` || { (exit 1); exit 1; }
14594 EOF
14595 cat >>$CONFIG_STATUS <<EOF
14596   sed "$ac_vpsub
14597 $extrasub
14598 EOF
14599 cat >>$CONFIG_STATUS <<\EOF
14600 :t
14601 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14602 s,@configure_input@,$configure_input,;t t
14603 s,@srcdir@,$ac_srcdir,;t t
14604 s,@top_srcdir@,$ac_top_srcdir,;t t
14605 s,@INSTALL@,$ac_INSTALL,;t t
14606 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14607   rm -f $tmp/stdin
14608   if test x"$ac_file" != x-; then
14609     mv $tmp/out $ac_file
14610   else
14611     cat $tmp/out
14612     rm -f $tmp/out
14613   fi
14614
14615 done
14616 EOF
14617 cat >>$CONFIG_STATUS <<\EOF
14618
14619 #
14620 # CONFIG_HEADER section.
14621 #
14622
14623 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14624 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14625 #
14626 # ac_d sets the value in "#define NAME VALUE" lines.
14627 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14628 ac_dB='[        ].*$,\1#\2'
14629 ac_dC=' '
14630 ac_dD=',;t'
14631 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14632 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14633 ac_iB='\([      ]\),\1#\2define\3'
14634 ac_iC=' '
14635 ac_iD='\4,;t'
14636 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14637 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14638 ac_uB='$,\1#\2define\3'
14639 ac_uC=' '
14640 ac_uD=',;t'
14641
14642 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14643   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14644   case $ac_file in
14645   - | *:- | *:-:* ) # input from stdin
14646         cat >$tmp/stdin
14647         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14648         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14649   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14650         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14651   * )   ac_file_in=$ac_file.in ;;
14652   esac
14653
14654   test x"$ac_file" != x- && { echo "$as_me:14654: creating $ac_file" >&5
14655 echo "$as_me: creating $ac_file" >&6;}
14656
14657   # First look for the input files in the build tree, otherwise in the
14658   # src tree.
14659   ac_file_inputs=`IFS=:
14660     for f in $ac_file_in; do
14661       case $f in
14662       -) echo $tmp/stdin ;;
14663       [\\/$]*)
14664          # Absolute (can't be DOS-style, as IFS=:)
14665          test -f "$f" || { { echo "$as_me:14665: error: cannot find input file: $f" >&5
14666 echo "$as_me: error: cannot find input file: $f" >&2;}
14667    { (exit 1); exit 1; }; }
14668          echo $f;;
14669       *) # Relative
14670          if test -f "$f"; then
14671            # Build tree
14672            echo $f
14673          elif test -f "$srcdir/$f"; then
14674            # Source tree
14675            echo $srcdir/$f
14676          else
14677            # /dev/null tree
14678            { { echo "$as_me:14678: error: cannot find input file: $f" >&5
14679 echo "$as_me: error: cannot find input file: $f" >&2;}
14680    { (exit 1); exit 1; }; }
14681          fi;;
14682       esac
14683     done` || { (exit 1); exit 1; }
14684   # Remove the trailing spaces.
14685   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
14686
14687 EOF
14688
14689 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
14690 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
14691 # be either 'cat' or 'sort'.
14692 sort -u confdefs.h | uniq >conftest.vals
14693
14694 # Break up conftest.vals because some shells have a limit on
14695 # the size of here documents, and old seds have small limits too.
14696
14697 rm -f conftest.tail
14698 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
14699 while grep . conftest.vals >/dev/null
14700 do
14701   # Write chunks of a limited-size here document to conftest.frag.
14702   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14703   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
14704   echo 'CEOF' >> $CONFIG_STATUS
14705   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14706   rm -f conftest.vals
14707   mv conftest.tail conftest.vals
14708 done
14709 rm -f conftest.vals
14710
14711 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
14712 # marker @DEFS@.
14713 echo '  cat >> conftest.edit <<CEOF
14714 /@DEFS@/r conftest.frag
14715 /@DEFS@/d
14716 CEOF
14717 sed -f conftest.edit $tmp/in > $tmp/out
14718 rm -f $tmp/in
14719 mv $tmp/out $tmp/in
14720 rm -f conftest.edit conftest.frag
14721 ' >> $CONFIG_STATUS
14722
14723 cat >>$CONFIG_STATUS <<\EOF
14724   # Let's still pretend it is `configure' which instantiates (i.e., don't
14725   # use $as_me), people would be surprised to read:
14726   #    /* config.h.  Generated automatically by config.status.  */
14727   if test x"$ac_file" = x-; then
14728     echo "/* Generated automatically by configure.  */" >$tmp/config.h
14729   else
14730     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
14731   fi
14732   cat $tmp/in >>$tmp/config.h
14733   rm -f $tmp/in
14734   if test x"$ac_file" != x-; then
14735     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14736       { echo "$as_me:14736: $ac_file is unchanged" >&5
14737 echo "$as_me: $ac_file is unchanged" >&6;}
14738     else
14739       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14740          X"$ac_file" : 'X\(//\)[^/]' \| \
14741          X"$ac_file" : 'X\(//\)$' \| \
14742          X"$ac_file" : 'X\(/\)' \| \
14743          .     : '\(.\)' 2>/dev/null ||
14744 echo X"$ac_file" |
14745     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14746           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14747           /^X\(\/\/\)$/{ s//\1/; q; }
14748           /^X\(\/\).*/{ s//\1/; q; }
14749           s/.*/./; q'`
14750       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14751         { case "$ac_dir" in
14752   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14753   *)                      as_incr_dir=.;;
14754 esac
14755 as_dummy="$ac_dir"
14756 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14757   case $as_mkdir_dir in
14758     # Skip DOS drivespec
14759     ?:) as_incr_dir=$as_mkdir_dir ;;
14760     *)
14761       as_incr_dir=$as_incr_dir/$as_mkdir_dir
14762       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14763     ;;
14764   esac
14765 done; }
14766
14767       fi
14768       rm -f $ac_file
14769       mv $tmp/config.h $ac_file
14770     fi
14771   else
14772     cat $tmp/config.h
14773     rm -f $tmp/config.h
14774   fi
14775 done
14776 EOF
14777 cat >>$CONFIG_STATUS <<\EOF
14778 #
14779 # CONFIG_COMMANDS section.
14780 #
14781 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14782   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14783   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14784
14785   case $ac_dest in
14786     default-1 ) for ac_file in $CONFIG_FILES; do
14787
14788       # Support "outfile[:infile[:infile...]]"
14789       case "$ac_file" in
14790         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14791       esac
14792
14793       # PO directories have a Makefile.in generated from Makefile.inn.
14794       case "$ac_file" in */[Mm]akefile.in)
14795         # Adjust a relative srcdir.
14796         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
14797         ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
14798         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
14799         ac_base=`basename $ac_file .in`
14800         # In autoconf-2.13 it is called $ac_given_srcdir.
14801         # In autoconf-2.50 it is called $srcdir.
14802         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
14803
14804         case "$ac_given_srcdir" in
14805           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
14806           /*) top_srcdir="$ac_given_srcdir" ;;
14807           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
14808         esac
14809
14810         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
14811           rm -f "$ac_dir/POTFILES"
14812           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
14813           sed -e "/^#/d" -e "/^[        ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
14814           test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
14815           sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
14816         fi
14817         ;;
14818       esac
14819     done ;;
14820   esac
14821 done
14822 EOF
14823
14824 cat >>$CONFIG_STATUS <<\EOF
14825
14826 { (exit 0); exit 0; }
14827 EOF
14828 chmod +x $CONFIG_STATUS
14829 ac_clean_files=$ac_clean_files_save
14830
14831 # configure is writing to config.log, and then calls config.status.
14832 # config.status does its own redirection, appending to config.log.
14833 # Unfortunately, on DOS this fails, as config.log is still kept open
14834 # by configure, so config.status won't be able to write to it; its
14835 # output is simply discarded.  So we exec the FD to /dev/null,
14836 # effectively closing config.log, so it can be properly (re)opened and
14837 # appended to by config.status.  When coming back to configure, we
14838 # need to make the FD available again.
14839 if test "$no_create" != yes; then
14840   ac_cs_success=:
14841   exec 5>/dev/null
14842   $SHELL $CONFIG_STATUS || ac_cs_success=false
14843   exec 5>>config.log
14844   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14845   # would make configure fail if this is the last instruction.
14846   $ac_cs_success || { (exit 1); exit 1; }
14847 fi
14848