]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
3e4b5a3babad7056e3f59ce97d9aa8179218f179
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.491 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100320.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --disable-libtool-version  enable to use libtool's incompatible naming scheme
716   --with-libtool          generate libraries with libtool
717   --with-shared           generate shared-libraries
718   --with-normal           generate normal-libraries (default)
719   --with-debug            generate debug-libraries (default)
720   --with-profile          generate profile-libraries
721   --with-termlib          generate separate terminfo library
722   --with-ticlib           generate separate tic library
723   --with-gpm              use Alessandro Rubini's GPM library
724   --without-dlsym         do not use dlsym() to load GPM dynamically
725   --with-sysmouse         use sysmouse (FreeBSD console)
726   --enable-rpath          use rpath option when generating shared libraries
727   --disable-relink        relink shared libraries during install
728   --with-shlib-version=X  Specify rel or abi version for shared libs
729 Fine-Tuning Your Configuration:
730   --disable-overwrite     leave out the link to -lcurses
731   --disable-database      do not use terminfo, only fallbacks/termcap
732   --with-database=XXX     specify terminfo source to install
733   --with-hashed-db        specify hashed-database library
734   --with-fallbacks=XXX    specify list of fallback terminal descriptions
735   --without-xterm-new     specify if xterm terminfo should be old version
736   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
737   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
738   --disable-big-core      assume machine has little memory
739   --disable-big-strings   assume compiler has only standard-size strings
740   --enable-termcap        compile in termcap fallback support
741   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
742   --enable-getcap         fast termcap load, no xrefs to terminfo
743   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
744   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
745   --disable-root-environ  restrict environment when running as root
746   --enable-symlinks       make tic use symbolic links not hard links
747   --enable-broken_linker  compile with broken-linker support code
748   --enable-bsdpad         recognize BSD-style prefix padding
749   --enable-widec          compile with wide-char/UTF-8 code
750   --disable-lp64          allow chtype to be long (ignore _LP64)
751   --disable-largefile     omit support for large files
752   --disable-tparm-varargs compile tparm() without varargs interface
753   --disable-tic-depends   link tic library without explicit dependency on ncurses library
754   --with-bool=TYPE        override fallback type of bool variable
755   --with-caps=alt         compile with alternate Caps file
756   --with-chtype=TYPE      override type of chtype
757   --with-ospeed=TYPE      override type of ospeed variable
758   --with-mmask-t=TYPE     override type of mmask_t
759   --with-ccharw-max=XXX   override size CCHARW_MAX
760   --with-rcs-ids          compile-in RCS identifiers
761 Options to Specify How Manpages are Installed:
762   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
763                           optionally formatted/catonly, e.g., gzip,formatted
764   --with-manpage-renames  specify manpage-renaming
765   --with-manpage-aliases  specify manpage-aliases using .so
766   --with-manpage-symlinks specify manpage-aliases using symlinks
767   --with-manpage-tbl      specify manpage processing with tbl
768 Extensions:
769   --disable-ext-funcs     disable function-extensions
770   --enable-sp-funcs       enable experimental SCREEN-extensions
771   --enable-term-driver    enable experimental terminal-driver
772   --enable-const          compile with extra/non-standard const
773   --enable-ext-colors     compile for 256-color support
774   --enable-ext-mouse      compile for extended mouse-encoding
775   --enable-no-padding     compile with $NCURSES_NO_PADDING code
776   --enable-signed-char    compile using signed Boolean's in term.h
777   --enable-sigwinch       compile with SIGWINCH handler
778   --enable-tcap-names     compile with user-definable terminal capabilities
779 Development Code:
780   --without-develop       disable development options
781   --enable-hard-tabs      compile with hard-tabs code
782   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
783 Experimental Code:
784   --disable-assumed-color do not assume anything about default-colors
785   --disable-hashmap       compile without hashmap scrolling-optimization
786   --enable-colorfgbg      compile-in experimental $COLORFGBG code
787   --enable-interop        compile-in experimental interop bindings
788   --with-pthread          use POSIX thread library
789   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
790   --enable-weak-symbols   enable weak-symbols for pthreads
791   --enable-reentrant      compile with experimental reentrant code
792   --with-wrap-prefix=XXX  override prefix used for public variables
793   --enable-safe-sprintf   compile with experimental safe-sprintf code
794   --disable-scroll-hints  compile without scroll-hints code
795   --enable-wgetch-events  compile with experimental wgetch-events code
796 Testing/development Options:
797   --enable-echo           build: display "compiling" commands (default)
798   --enable-warnings       build: turn on GCC compiler warnings
799   --enable-assertions     test: turn on generation of assertion code
800   --with-dmalloc          test: use Gray Watson's dmalloc library
801   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
802   --with-valgrind         test: use valgrind
803   --disable-leaks         test: free permanent memory, analyze leaks
804   --enable-expanded       test: generate functions for certain macros
805   --disable-macros        test: use functions rather than macros
806   --with-trace            test: add trace() function to all models of ncurses
807 Ada95 Binding Options:
808   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
809   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
810   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
811   --disable-rpath-hack    don't add rpath options for additional libraries
812
813 Some influential environment variables:
814   CC          C compiler command
815   CFLAGS      C compiler flags
816   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
817               nonstandard directory <lib dir>
818   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
819               headers in a nonstandard directory <include dir>
820   CPP         C preprocessor
821   CXX         C++ compiler command
822   CXXFLAGS    C++ compiler flags
823   CXXCPP      C++ preprocessor
824
825 Use these variables to override the choices made by `configure' or to help
826 it to find libraries and programs with nonstandard names/locations.
827
828 EOF
829 fi
830
831 if test "$ac_init_help" = "recursive"; then
832   # If there are subdirs, report their specific --help.
833   ac_popdir=`pwd`
834   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
835     cd $ac_subdir
836     # A "../" for each directory in /$ac_subdir.
837     ac_dots=`echo $ac_subdir |
838              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
839
840     case $srcdir in
841     .) # No --srcdir option.  We are building in place.
842       ac_sub_srcdir=$srcdir ;;
843     [\\/]* | ?:[\\/]* ) # Absolute path.
844       ac_sub_srcdir=$srcdir/$ac_subdir ;;
845     *) # Relative path.
846       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
847     esac
848
849     # Check for guested configure; otherwise get Cygnus style configure.
850     if test -f $ac_sub_srcdir/configure.gnu; then
851       echo
852       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
853     elif test -f $ac_sub_srcdir/configure; then
854       echo
855       $SHELL $ac_sub_srcdir/configure  --help=recursive
856     elif test -f $ac_sub_srcdir/configure.ac ||
857            test -f $ac_sub_srcdir/configure.in; then
858       echo
859       $ac_configure --help
860     else
861       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
862     fi
863     cd $ac_popdir
864   done
865 fi
866
867 test -n "$ac_init_help" && exit 0
868 if $ac_init_version; then
869   cat <<\EOF
870
871 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
872 Free Software Foundation, Inc.
873 This configure script is free software; the Free Software Foundation
874 gives unlimited permission to copy, distribute and modify it.
875 EOF
876   exit 0
877 fi
878 exec 5>config.log
879 cat >&5 <<EOF
880 This file contains any messages produced by compilers while
881 running configure, to aid debugging if configure makes a mistake.
882
883 It was created by $as_me, which was
884 generated by GNU Autoconf 2.52.20100320.  Invocation command line was
885
886   $ $0 $@
887
888 EOF
889 {
890 cat <<_ASUNAME
891 ## ---------- ##
892 ## Platform.  ##
893 ## ---------- ##
894
895 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
896 uname -m = `(uname -m) 2>/dev/null || echo unknown`
897 uname -r = `(uname -r) 2>/dev/null || echo unknown`
898 uname -s = `(uname -s) 2>/dev/null || echo unknown`
899 uname -v = `(uname -v) 2>/dev/null || echo unknown`
900
901 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
902 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
903
904 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
905 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
906 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
907 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
908 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
909 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
910 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
911
912 PATH = $PATH
913
914 _ASUNAME
915 } >&5
916
917 cat >&5 <<EOF
918 ## ------------ ##
919 ## Core tests.  ##
920 ## ------------ ##
921
922 EOF
923
924 # Keep a trace of the command line.
925 # Strip out --no-create and --no-recursion so they do not pile up.
926 # Also quote any args containing shell meta-characters.
927 ac_configure_args=
928 ac_sep=
929 for ac_arg
930 do
931   case $ac_arg in
932   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
933   | --no-cr | --no-c) ;;
934   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
935   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
936   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
937     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
938     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
939     ac_sep=" " ;;
940   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
941      ac_sep=" " ;;
942   esac
943   # Get rid of the leading space.
944 done
945
946 # When interrupted or exit'd, cleanup temporary files, and complete
947 # config.log.  We remove comments because anyway the quotes in there
948 # would cause problems or look ugly.
949 trap 'exit_status=$?
950   # Save into config.log some information that might help in debugging.
951   echo >&5
952   echo "## ----------------- ##" >&5
953   echo "## Cache variables.  ##" >&5
954   echo "## ----------------- ##" >&5
955   echo >&5
956   # The following way of writing the cache mishandles newlines in values,
957 {
958   (set) 2>&1 |
959     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
960     *ac_space=\ *)
961       sed -n \
962         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
963           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
964       ;;
965     *)
966       sed -n \
967         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
968       ;;
969     esac;
970 } >&5
971   sed "/^$/d" confdefs.h >conftest.log
972   if test -s conftest.log; then
973     echo >&5
974     echo "## ------------ ##" >&5
975     echo "## confdefs.h.  ##" >&5
976     echo "## ------------ ##" >&5
977     echo >&5
978     cat conftest.log >&5
979   fi
980   (echo; echo) >&5
981   test "$ac_signal" != 0 &&
982     echo "$as_me: caught signal $ac_signal" >&5
983   echo "$as_me: exit $exit_status" >&5
984   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
985     exit $exit_status
986      ' 0
987 for ac_signal in 1 2 13 15; do
988   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
989 done
990 ac_signal=0
991
992 # confdefs.h avoids OS command line length limits that DEFS can exceed.
993 rm -rf conftest* confdefs.h
994 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
995 echo >confdefs.h
996
997 # Let the site file select an alternate cache file if it wants to.
998 # Prefer explicitly selected file to automatically selected ones.
999 if test -z "$CONFIG_SITE"; then
1000   if test "x$prefix" != xNONE; then
1001     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1002   else
1003     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1004   fi
1005 fi
1006 for ac_site_file in $CONFIG_SITE; do
1007   if test -r "$ac_site_file"; then
1008     { echo "$as_me:1008: loading site script $ac_site_file" >&5
1009 echo "$as_me: loading site script $ac_site_file" >&6;}
1010     cat "$ac_site_file" >&5
1011     . "$ac_site_file"
1012   fi
1013 done
1014
1015 if test -r "$cache_file"; then
1016   # Some versions of bash will fail to source /dev/null (special
1017   # files actually), so we avoid doing that.
1018   if test -f "$cache_file"; then
1019     { echo "$as_me:1019: loading cache $cache_file" >&5
1020 echo "$as_me: loading cache $cache_file" >&6;}
1021     case $cache_file in
1022       [\\/]* | ?:[\\/]* ) . $cache_file;;
1023       *)                      . ./$cache_file;;
1024     esac
1025   fi
1026 else
1027   { echo "$as_me:1027: creating cache $cache_file" >&5
1028 echo "$as_me: creating cache $cache_file" >&6;}
1029   >$cache_file
1030 fi
1031
1032 # Check that the precious variables saved in the cache have kept the same
1033 # value.
1034 ac_cache_corrupted=false
1035 for ac_var in `(set) 2>&1 |
1036                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1037   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1038   eval ac_new_set=\$ac_env_${ac_var}_set
1039   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1040   eval ac_new_val="\$ac_env_${ac_var}_value"
1041   case $ac_old_set,$ac_new_set in
1042     set,)
1043       { echo "$as_me:1043: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1044 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1045       ac_cache_corrupted=: ;;
1046     ,set)
1047       { echo "$as_me:1047: error: \`$ac_var' was not set in the previous run" >&5
1048 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1049       ac_cache_corrupted=: ;;
1050     ,);;
1051     *)
1052       if test "x$ac_old_val" != "x$ac_new_val"; then
1053         { echo "$as_me:1053: error: \`$ac_var' has changed since the previous run:" >&5
1054 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1055         { echo "$as_me:1055:   former value:  $ac_old_val" >&5
1056 echo "$as_me:   former value:  $ac_old_val" >&2;}
1057         { echo "$as_me:1057:   current value: $ac_new_val" >&5
1058 echo "$as_me:   current value: $ac_new_val" >&2;}
1059         ac_cache_corrupted=:
1060       fi;;
1061   esac
1062   # Pass precious variables to config.status.  It doesn't matter if
1063   # we pass some twice (in addition to the command line arguments).
1064   if test "$ac_new_set" = set; then
1065     case $ac_new_val in
1066     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1067       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1068       ac_configure_args="$ac_configure_args '$ac_arg'"
1069       ;;
1070     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1071        ;;
1072     esac
1073   fi
1074 done
1075 if $ac_cache_corrupted; then
1076   { echo "$as_me:1076: error: changes in the environment can compromise the build" >&5
1077 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1078   { { echo "$as_me:1078: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1079 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1080    { (exit 1); exit 1; }; }
1081 fi
1082
1083 ac_ext=c
1084 ac_cpp='$CPP $CPPFLAGS'
1085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1088 ac_main_return=return
1089
1090 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1091   *c*,-n*) ECHO_N= ECHO_C='
1092 ' ECHO_T='      ' ;;
1093   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1094   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1095 esac
1096 echo "#! $SHELL" >conftest.sh
1097 echo  "exit 0"   >>conftest.sh
1098 chmod +x conftest.sh
1099 if { (echo "$as_me:1099: PATH=\".;.\"; conftest.sh") >&5
1100   (PATH=".;."; conftest.sh) 2>&5
1101   ac_status=$?
1102   echo "$as_me:1102: \$? = $ac_status" >&5
1103   (exit $ac_status); }; then
1104   ac_path_separator=';'
1105 else
1106   ac_path_separator=:
1107 fi
1108 PATH_SEPARATOR="$ac_path_separator"
1109 rm -f conftest.sh
1110
1111 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1112
1113 top_builddir=`pwd`
1114
1115 echo "$as_me:1115: checking for egrep" >&5
1116 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1117 if test "${ac_cv_prog_egrep+set}" = set; then
1118   echo $ECHO_N "(cached) $ECHO_C" >&6
1119 else
1120   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1121     then ac_cv_prog_egrep='grep -E'
1122     else ac_cv_prog_egrep='egrep'
1123     fi
1124 fi
1125 echo "$as_me:1125: result: $ac_cv_prog_egrep" >&5
1126 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1127  EGREP=$ac_cv_prog_egrep
1128
1129 test -z "$EGREP" && { { echo "$as_me:1129: error: No egrep program found" >&5
1130 echo "$as_me: error: No egrep program found" >&2;}
1131    { (exit 1); exit 1; }; }
1132
1133 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1134 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1135 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 cf_cv_abi_version=${NCURSES_MAJOR}
1137 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1138 cf_cv_timestamp=`date`
1139 echo "$as_me:1139: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1140 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1141
1142 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1143
1144 # Check whether --with-rel-version or --without-rel-version was given.
1145 if test "${with_rel_version+set}" = set; then
1146   withval="$with_rel_version"
1147   { echo "$as_me:1147: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1148 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1149  cf_cv_rel_version=$withval
1150 fi;
1151
1152  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1153  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1154
1155 if test -n "$NCURSES_MAJOR" ; then
1156   case $NCURSES_MAJOR in #(vi
1157   [0-9]*) #(vi
1158         ;;
1159   *)
1160         { { echo "$as_me:1160: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1161 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1162    { (exit 1); exit 1; }; }
1163         ;;
1164   esac
1165 else
1166   { { echo "$as_me:1166: error: Release major-version value is empty" >&5
1167 echo "$as_me: error: Release major-version value is empty" >&2;}
1168    { (exit 1); exit 1; }; }
1169 fi
1170
1171 if test -n "$NCURSES_MINOR" ; then
1172   case $NCURSES_MINOR in #(vi
1173   [0-9]*) #(vi
1174         ;;
1175   *)
1176         { { echo "$as_me:1176: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1177 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1178    { (exit 1); exit 1; }; }
1179         ;;
1180   esac
1181 else
1182   { { echo "$as_me:1182: error: Release minor-version value is empty" >&5
1183 echo "$as_me: error: Release minor-version value is empty" >&2;}
1184    { (exit 1); exit 1; }; }
1185 fi
1186
1187 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1188
1189 # Check whether --with-abi-version or --without-abi-version was given.
1190 if test "${with_abi_version+set}" = set; then
1191   withval="$with_abi_version"
1192   { echo "$as_me:1192: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1193 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1194  cf_cv_abi_version=$withval
1195 fi;
1196
1197 if test -n "$cf_cv_abi_version" ; then
1198   case $cf_cv_abi_version in #(vi
1199   [0-9]*) #(vi
1200         ;;
1201   *)
1202         { { echo "$as_me:1202: error: ABI version is not a number: $cf_cv_abi_version" >&5
1203 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1204    { (exit 1); exit 1; }; }
1205         ;;
1206   esac
1207 else
1208   { { echo "$as_me:1208: error: ABI version value is empty" >&5
1209 echo "$as_me: error: ABI version value is empty" >&2;}
1210    { (exit 1); exit 1; }; }
1211 fi
1212
1213 ac_aux_dir=
1214 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1215   if test -f $ac_dir/install-sh; then
1216     ac_aux_dir=$ac_dir
1217     ac_install_sh="$ac_aux_dir/install-sh -c"
1218     break
1219   elif test -f $ac_dir/install.sh; then
1220     ac_aux_dir=$ac_dir
1221     ac_install_sh="$ac_aux_dir/install.sh -c"
1222     break
1223   elif test -f $ac_dir/shtool; then
1224     ac_aux_dir=$ac_dir
1225     ac_install_sh="$ac_aux_dir/shtool install -c"
1226     break
1227   fi
1228 done
1229 if test -z "$ac_aux_dir"; then
1230   { { echo "$as_me:1230: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1231 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1232    { (exit 1); exit 1; }; }
1233 fi
1234 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1235 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1236 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1237
1238 # Make sure we can run config.sub.
1239 $ac_config_sub sun4 >/dev/null 2>&1 ||
1240   { { echo "$as_me:1240: error: cannot run $ac_config_sub" >&5
1241 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1242    { (exit 1); exit 1; }; }
1243
1244 echo "$as_me:1244: checking build system type" >&5
1245 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1246 if test "${ac_cv_build+set}" = set; then
1247   echo $ECHO_N "(cached) $ECHO_C" >&6
1248 else
1249   ac_cv_build_alias=$build_alias
1250 test -z "$ac_cv_build_alias" &&
1251   ac_cv_build_alias=`$ac_config_guess`
1252 test -z "$ac_cv_build_alias" &&
1253   { { echo "$as_me:1253: error: cannot guess build type; you must specify one" >&5
1254 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1255    { (exit 1); exit 1; }; }
1256 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1257   { { echo "$as_me:1257: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1258 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1259    { (exit 1); exit 1; }; }
1260
1261 fi
1262 echo "$as_me:1262: result: $ac_cv_build" >&5
1263 echo "${ECHO_T}$ac_cv_build" >&6
1264 build=$ac_cv_build
1265 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1266 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1267 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1268
1269 echo "$as_me:1269: checking host system type" >&5
1270 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1271 if test "${ac_cv_host+set}" = set; then
1272   echo $ECHO_N "(cached) $ECHO_C" >&6
1273 else
1274   ac_cv_host_alias=$host_alias
1275 test -z "$ac_cv_host_alias" &&
1276   ac_cv_host_alias=$ac_cv_build_alias
1277 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1278   { { echo "$as_me:1278: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1279 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1280    { (exit 1); exit 1; }; }
1281
1282 fi
1283 echo "$as_me:1283: result: $ac_cv_host" >&5
1284 echo "${ECHO_T}$ac_cv_host" >&6
1285 host=$ac_cv_host
1286 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1287 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1288 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1289
1290 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1291         echo "$as_me:1291: checking target system type" >&5
1292 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1293 if test "${ac_cv_target+set}" = set; then
1294   echo $ECHO_N "(cached) $ECHO_C" >&6
1295 else
1296   ac_cv_target_alias=$target_alias
1297 test "x$ac_cv_target_alias" = "x" &&
1298   ac_cv_target_alias=$ac_cv_host_alias
1299 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1300   { { echo "$as_me:1300: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1301 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1302    { (exit 1); exit 1; }; }
1303
1304 fi
1305 echo "$as_me:1305: result: $ac_cv_target" >&5
1306 echo "${ECHO_T}$ac_cv_target" >&6
1307 target=$ac_cv_target
1308 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1309 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1310 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1311
1312 # The aliases save the names the user supplied, while $host etc.
1313 # will get canonicalized.
1314 test -n "$target_alias" &&
1315   test "$program_prefix$program_suffix$program_transform_name" = \
1316     NONENONEs,x,x, &&
1317   program_prefix=${target_alias}-
1318         system_name="$host_os"
1319 else
1320         system_name="`(uname -s -r) 2>/dev/null`"
1321         if test -z "$system_name" ; then
1322                 system_name="`(hostname) 2>/dev/null`"
1323         fi
1324 fi
1325 test -n "$system_name" && cat >>confdefs.h <<EOF
1326 #define SYSTEM_NAME "$system_name"
1327 EOF
1328
1329 if test "${cf_cv_system_name+set}" = set; then
1330   echo $ECHO_N "(cached) $ECHO_C" >&6
1331 else
1332   cf_cv_system_name="$system_name"
1333 fi
1334
1335 test -z "$system_name" && system_name="$cf_cv_system_name"
1336 test -n "$cf_cv_system_name" && echo "$as_me:1336: result: Configuring for $cf_cv_system_name" >&5
1337 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1338
1339 if test ".$system_name" != ".$cf_cv_system_name" ; then
1340         echo "$as_me:1340: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1341 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1342         { { echo "$as_me:1342: error: \"Please remove config.cache and try again.\"" >&5
1343 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1344    { (exit 1); exit 1; }; }
1345 fi
1346
1347 # Check whether --with-system-type or --without-system-type was given.
1348 if test "${with_system_type+set}" = set; then
1349   withval="$with_system_type"
1350   { echo "$as_me:1350: WARNING: overriding system type to $withval" >&5
1351 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1352  cf_cv_system_name=$withval
1353 fi;
1354
1355 ###     Save the given $CFLAGS to allow user-override.
1356 cf_user_CFLAGS="$CFLAGS"
1357
1358 ###     Default install-location
1359
1360 echo "$as_me:1360: checking for prefix" >&5
1361 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1362 if test "x$prefix" = "xNONE" ; then
1363         case "$cf_cv_system_name" in
1364                 # non-vendor systems don't have a conflict
1365         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1366                 prefix=/usr
1367                 ;;
1368         *)      prefix=$ac_default_prefix
1369                 ;;
1370         esac
1371 fi
1372 echo "$as_me:1372: result: $prefix" >&5
1373 echo "${ECHO_T}$prefix" >&6
1374
1375 if test "x$prefix" = "xNONE" ; then
1376 echo "$as_me:1376: checking for default include-directory" >&5
1377 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1378 test -n "$verbose" && echo 1>&6
1379 for cf_symbol in \
1380         $includedir \
1381         $includedir/ncurses \
1382         $prefix/include \
1383         $prefix/include/ncurses \
1384         /usr/local/include \
1385         /usr/local/include/ncurses \
1386         /usr/include \
1387         /usr/include/ncurses
1388 do
1389         cf_dir=`eval echo $cf_symbol`
1390         if test -f $cf_dir/curses.h ; then
1391         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1392                 includedir="$cf_symbol"
1393                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1394                 break
1395         fi
1396         fi
1397         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1398 done
1399 echo "$as_me:1399: result: $includedir" >&5
1400 echo "${ECHO_T}$includedir" >&6
1401 fi
1402
1403 ###     Checks for programs.
1404 ac_ext=c
1405 ac_cpp='$CPP $CPPFLAGS'
1406 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1407 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1408 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1409 ac_main_return=return
1410 if test -n "$ac_tool_prefix"; then
1411   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1412 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1413 echo "$as_me:1413: checking for $ac_word" >&5
1414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1415 if test "${ac_cv_prog_CC+set}" = set; then
1416   echo $ECHO_N "(cached) $ECHO_C" >&6
1417 else
1418   if test -n "$CC"; then
1419   ac_cv_prog_CC="$CC" # Let the user override the test.
1420 else
1421   ac_save_IFS=$IFS; IFS=$ac_path_separator
1422 ac_dummy="$PATH"
1423 for ac_dir in $ac_dummy; do
1424   IFS=$ac_save_IFS
1425   test -z "$ac_dir" && ac_dir=.
1426   $as_executable_p "$ac_dir/$ac_word" || continue
1427 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1428 echo "$as_me:1428: found $ac_dir/$ac_word" >&5
1429 break
1430 done
1431
1432 fi
1433 fi
1434 CC=$ac_cv_prog_CC
1435 if test -n "$CC"; then
1436   echo "$as_me:1436: result: $CC" >&5
1437 echo "${ECHO_T}$CC" >&6
1438 else
1439   echo "$as_me:1439: result: no" >&5
1440 echo "${ECHO_T}no" >&6
1441 fi
1442
1443 fi
1444 if test -z "$ac_cv_prog_CC"; then
1445   ac_ct_CC=$CC
1446   # Extract the first word of "gcc", so it can be a program name with args.
1447 set dummy gcc; ac_word=$2
1448 echo "$as_me:1448: checking for $ac_word" >&5
1449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1450 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1451   echo $ECHO_N "(cached) $ECHO_C" >&6
1452 else
1453   if test -n "$ac_ct_CC"; then
1454   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1455 else
1456   ac_save_IFS=$IFS; IFS=$ac_path_separator
1457 ac_dummy="$PATH"
1458 for ac_dir in $ac_dummy; do
1459   IFS=$ac_save_IFS
1460   test -z "$ac_dir" && ac_dir=.
1461   $as_executable_p "$ac_dir/$ac_word" || continue
1462 ac_cv_prog_ac_ct_CC="gcc"
1463 echo "$as_me:1463: found $ac_dir/$ac_word" >&5
1464 break
1465 done
1466
1467 fi
1468 fi
1469 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1470 if test -n "$ac_ct_CC"; then
1471   echo "$as_me:1471: result: $ac_ct_CC" >&5
1472 echo "${ECHO_T}$ac_ct_CC" >&6
1473 else
1474   echo "$as_me:1474: result: no" >&5
1475 echo "${ECHO_T}no" >&6
1476 fi
1477
1478   CC=$ac_ct_CC
1479 else
1480   CC="$ac_cv_prog_CC"
1481 fi
1482
1483 if test -z "$CC"; then
1484   if test -n "$ac_tool_prefix"; then
1485   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1486 set dummy ${ac_tool_prefix}cc; ac_word=$2
1487 echo "$as_me:1487: checking for $ac_word" >&5
1488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1489 if test "${ac_cv_prog_CC+set}" = set; then
1490   echo $ECHO_N "(cached) $ECHO_C" >&6
1491 else
1492   if test -n "$CC"; then
1493   ac_cv_prog_CC="$CC" # Let the user override the test.
1494 else
1495   ac_save_IFS=$IFS; IFS=$ac_path_separator
1496 ac_dummy="$PATH"
1497 for ac_dir in $ac_dummy; do
1498   IFS=$ac_save_IFS
1499   test -z "$ac_dir" && ac_dir=.
1500   $as_executable_p "$ac_dir/$ac_word" || continue
1501 ac_cv_prog_CC="${ac_tool_prefix}cc"
1502 echo "$as_me:1502: found $ac_dir/$ac_word" >&5
1503 break
1504 done
1505
1506 fi
1507 fi
1508 CC=$ac_cv_prog_CC
1509 if test -n "$CC"; then
1510   echo "$as_me:1510: result: $CC" >&5
1511 echo "${ECHO_T}$CC" >&6
1512 else
1513   echo "$as_me:1513: result: no" >&5
1514 echo "${ECHO_T}no" >&6
1515 fi
1516
1517 fi
1518 if test -z "$ac_cv_prog_CC"; then
1519   ac_ct_CC=$CC
1520   # Extract the first word of "cc", so it can be a program name with args.
1521 set dummy cc; ac_word=$2
1522 echo "$as_me:1522: checking for $ac_word" >&5
1523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1524 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1525   echo $ECHO_N "(cached) $ECHO_C" >&6
1526 else
1527   if test -n "$ac_ct_CC"; then
1528   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1529 else
1530   ac_save_IFS=$IFS; IFS=$ac_path_separator
1531 ac_dummy="$PATH"
1532 for ac_dir in $ac_dummy; do
1533   IFS=$ac_save_IFS
1534   test -z "$ac_dir" && ac_dir=.
1535   $as_executable_p "$ac_dir/$ac_word" || continue
1536 ac_cv_prog_ac_ct_CC="cc"
1537 echo "$as_me:1537: found $ac_dir/$ac_word" >&5
1538 break
1539 done
1540
1541 fi
1542 fi
1543 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1544 if test -n "$ac_ct_CC"; then
1545   echo "$as_me:1545: result: $ac_ct_CC" >&5
1546 echo "${ECHO_T}$ac_ct_CC" >&6
1547 else
1548   echo "$as_me:1548: result: no" >&5
1549 echo "${ECHO_T}no" >&6
1550 fi
1551
1552   CC=$ac_ct_CC
1553 else
1554   CC="$ac_cv_prog_CC"
1555 fi
1556
1557 fi
1558 if test -z "$CC"; then
1559   # Extract the first word of "cc", so it can be a program name with args.
1560 set dummy cc; ac_word=$2
1561 echo "$as_me:1561: checking for $ac_word" >&5
1562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1563 if test "${ac_cv_prog_CC+set}" = set; then
1564   echo $ECHO_N "(cached) $ECHO_C" >&6
1565 else
1566   if test -n "$CC"; then
1567   ac_cv_prog_CC="$CC" # Let the user override the test.
1568 else
1569   ac_prog_rejected=no
1570   ac_save_IFS=$IFS; IFS=$ac_path_separator
1571 ac_dummy="$PATH"
1572 for ac_dir in $ac_dummy; do
1573   IFS=$ac_save_IFS
1574   test -z "$ac_dir" && ac_dir=.
1575   $as_executable_p "$ac_dir/$ac_word" || continue
1576 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1577   ac_prog_rejected=yes
1578   continue
1579 fi
1580 ac_cv_prog_CC="cc"
1581 echo "$as_me:1581: found $ac_dir/$ac_word" >&5
1582 break
1583 done
1584
1585 if test $ac_prog_rejected = yes; then
1586   # We found a bogon in the path, so make sure we never use it.
1587   set dummy $ac_cv_prog_CC
1588   shift
1589   if test $# != 0; then
1590     # We chose a different compiler from the bogus one.
1591     # However, it has the same basename, so the bogon will be chosen
1592     # first if we set CC to just the basename; use the full file name.
1593     shift
1594     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1595     shift
1596     ac_cv_prog_CC="$@"
1597   fi
1598 fi
1599 fi
1600 fi
1601 CC=$ac_cv_prog_CC
1602 if test -n "$CC"; then
1603   echo "$as_me:1603: result: $CC" >&5
1604 echo "${ECHO_T}$CC" >&6
1605 else
1606   echo "$as_me:1606: result: no" >&5
1607 echo "${ECHO_T}no" >&6
1608 fi
1609
1610 fi
1611 if test -z "$CC"; then
1612   if test -n "$ac_tool_prefix"; then
1613   for ac_prog in cl
1614   do
1615     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1616 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1617 echo "$as_me:1617: checking for $ac_word" >&5
1618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1619 if test "${ac_cv_prog_CC+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if test -n "$CC"; then
1623   ac_cv_prog_CC="$CC" # Let the user override the test.
1624 else
1625   ac_save_IFS=$IFS; IFS=$ac_path_separator
1626 ac_dummy="$PATH"
1627 for ac_dir in $ac_dummy; do
1628   IFS=$ac_save_IFS
1629   test -z "$ac_dir" && ac_dir=.
1630   $as_executable_p "$ac_dir/$ac_word" || continue
1631 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1632 echo "$as_me:1632: found $ac_dir/$ac_word" >&5
1633 break
1634 done
1635
1636 fi
1637 fi
1638 CC=$ac_cv_prog_CC
1639 if test -n "$CC"; then
1640   echo "$as_me:1640: result: $CC" >&5
1641 echo "${ECHO_T}$CC" >&6
1642 else
1643   echo "$as_me:1643: result: no" >&5
1644 echo "${ECHO_T}no" >&6
1645 fi
1646
1647     test -n "$CC" && break
1648   done
1649 fi
1650 if test -z "$CC"; then
1651   ac_ct_CC=$CC
1652   for ac_prog in cl
1653 do
1654   # Extract the first word of "$ac_prog", so it can be a program name with args.
1655 set dummy $ac_prog; ac_word=$2
1656 echo "$as_me:1656: checking for $ac_word" >&5
1657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1658 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1659   echo $ECHO_N "(cached) $ECHO_C" >&6
1660 else
1661   if test -n "$ac_ct_CC"; then
1662   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1663 else
1664   ac_save_IFS=$IFS; IFS=$ac_path_separator
1665 ac_dummy="$PATH"
1666 for ac_dir in $ac_dummy; do
1667   IFS=$ac_save_IFS
1668   test -z "$ac_dir" && ac_dir=.
1669   $as_executable_p "$ac_dir/$ac_word" || continue
1670 ac_cv_prog_ac_ct_CC="$ac_prog"
1671 echo "$as_me:1671: found $ac_dir/$ac_word" >&5
1672 break
1673 done
1674
1675 fi
1676 fi
1677 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1678 if test -n "$ac_ct_CC"; then
1679   echo "$as_me:1679: result: $ac_ct_CC" >&5
1680 echo "${ECHO_T}$ac_ct_CC" >&6
1681 else
1682   echo "$as_me:1682: result: no" >&5
1683 echo "${ECHO_T}no" >&6
1684 fi
1685
1686   test -n "$ac_ct_CC" && break
1687 done
1688
1689   CC=$ac_ct_CC
1690 fi
1691
1692 fi
1693
1694 test -z "$CC" && { { echo "$as_me:1694: error: no acceptable cc found in \$PATH" >&5
1695 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1696    { (exit 1); exit 1; }; }
1697
1698 # Provide some information about the compiler.
1699 echo "$as_me:1699:" \
1700      "checking for C compiler version" >&5
1701 ac_compiler=`set X $ac_compile; echo $2`
1702 { (eval echo "$as_me:1702: \"$ac_compiler --version </dev/null >&5\"") >&5
1703   (eval $ac_compiler --version </dev/null >&5) 2>&5
1704   ac_status=$?
1705   echo "$as_me:1705: \$? = $ac_status" >&5
1706   (exit $ac_status); }
1707 { (eval echo "$as_me:1707: \"$ac_compiler -v </dev/null >&5\"") >&5
1708   (eval $ac_compiler -v </dev/null >&5) 2>&5
1709   ac_status=$?
1710   echo "$as_me:1710: \$? = $ac_status" >&5
1711   (exit $ac_status); }
1712 { (eval echo "$as_me:1712: \"$ac_compiler -V </dev/null >&5\"") >&5
1713   (eval $ac_compiler -V </dev/null >&5) 2>&5
1714   ac_status=$?
1715   echo "$as_me:1715: \$? = $ac_status" >&5
1716   (exit $ac_status); }
1717
1718 cat >conftest.$ac_ext <<_ACEOF
1719 #line 1719 "configure"
1720 #include "confdefs.h"
1721
1722 int
1723 main ()
1724 {
1725
1726   ;
1727   return 0;
1728 }
1729 _ACEOF
1730 ac_clean_files_save=$ac_clean_files
1731 ac_clean_files="$ac_clean_files a.out a.exe"
1732 # Try to create an executable without -o first, disregard a.out.
1733 # It will help us diagnose broken compilers, and finding out an intuition
1734 # of exeext.
1735 echo "$as_me:1735: checking for C compiler default output" >&5
1736 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1737 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1738 if { (eval echo "$as_me:1738: \"$ac_link_default\"") >&5
1739   (eval $ac_link_default) 2>&5
1740   ac_status=$?
1741   echo "$as_me:1741: \$? = $ac_status" >&5
1742   (exit $ac_status); }; then
1743   # Find the output, starting from the most likely.  This scheme is
1744 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1745 # resort.
1746 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1747                 ls a.out conftest 2>/dev/null;
1748                 ls a.* conftest.* 2>/dev/null`; do
1749   case $ac_file in
1750     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1751     a.out ) # We found the default executable, but exeext='' is most
1752             # certainly right.
1753             break;;
1754     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1755           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1756           export ac_cv_exeext
1757           break;;
1758     * ) break;;
1759   esac
1760 done
1761 else
1762   echo "$as_me: failed program was:" >&5
1763 cat conftest.$ac_ext >&5
1764 { { echo "$as_me:1764: error: C compiler cannot create executables" >&5
1765 echo "$as_me: error: C compiler cannot create executables" >&2;}
1766    { (exit 77); exit 77; }; }
1767 fi
1768
1769 ac_exeext=$ac_cv_exeext
1770 echo "$as_me:1770: result: $ac_file" >&5
1771 echo "${ECHO_T}$ac_file" >&6
1772
1773 # Check the compiler produces executables we can run.  If not, either
1774 # the compiler is broken, or we cross compile.
1775 echo "$as_me:1775: checking whether the C compiler works" >&5
1776 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1777 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1778 # If not cross compiling, check that we can run a simple program.
1779 if test "$cross_compiling" != yes; then
1780   if { ac_try='./$ac_file'
1781   { (eval echo "$as_me:1781: \"$ac_try\"") >&5
1782   (eval $ac_try) 2>&5
1783   ac_status=$?
1784   echo "$as_me:1784: \$? = $ac_status" >&5
1785   (exit $ac_status); }; }; then
1786     cross_compiling=no
1787   else
1788     if test "$cross_compiling" = maybe; then
1789         cross_compiling=yes
1790     else
1791         { { echo "$as_me:1791: error: cannot run C compiled programs.
1792 If you meant to cross compile, use \`--host'." >&5
1793 echo "$as_me: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&2;}
1795    { (exit 1); exit 1; }; }
1796     fi
1797   fi
1798 fi
1799 echo "$as_me:1799: result: yes" >&5
1800 echo "${ECHO_T}yes" >&6
1801
1802 rm -f a.out a.exe conftest$ac_cv_exeext
1803 ac_clean_files=$ac_clean_files_save
1804 # Check the compiler produces executables we can run.  If not, either
1805 # the compiler is broken, or we cross compile.
1806 echo "$as_me:1806: checking whether we are cross compiling" >&5
1807 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1808 echo "$as_me:1808: result: $cross_compiling" >&5
1809 echo "${ECHO_T}$cross_compiling" >&6
1810
1811 echo "$as_me:1811: checking for executable suffix" >&5
1812 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1813 if { (eval echo "$as_me:1813: \"$ac_link\"") >&5
1814   (eval $ac_link) 2>&5
1815   ac_status=$?
1816   echo "$as_me:1816: \$? = $ac_status" >&5
1817   (exit $ac_status); }; then
1818   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1819 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1820 # work properly (i.e., refer to `conftest.exe'), while it won't with
1821 # `rm'.
1822 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1823   case $ac_file in
1824     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1825     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1826           export ac_cv_exeext
1827           break;;
1828     * ) break;;
1829   esac
1830 done
1831 else
1832   { { echo "$as_me:1832: error: cannot compute EXEEXT: cannot compile and link" >&5
1833 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1834    { (exit 1); exit 1; }; }
1835 fi
1836
1837 rm -f conftest$ac_cv_exeext
1838 echo "$as_me:1838: result: $ac_cv_exeext" >&5
1839 echo "${ECHO_T}$ac_cv_exeext" >&6
1840
1841 rm -f conftest.$ac_ext
1842 EXEEXT=$ac_cv_exeext
1843 ac_exeext=$EXEEXT
1844 echo "$as_me:1844: checking for object suffix" >&5
1845 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1846 if test "${ac_cv_objext+set}" = set; then
1847   echo $ECHO_N "(cached) $ECHO_C" >&6
1848 else
1849   cat >conftest.$ac_ext <<_ACEOF
1850 #line 1850 "configure"
1851 #include "confdefs.h"
1852
1853 int
1854 main ()
1855 {
1856
1857   ;
1858   return 0;
1859 }
1860 _ACEOF
1861 rm -f conftest.o conftest.obj
1862 if { (eval echo "$as_me:1862: \"$ac_compile\"") >&5
1863   (eval $ac_compile) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit $ac_status); }; then
1867   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1868   case $ac_file in
1869     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1870     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1871        break;;
1872   esac
1873 done
1874 else
1875   echo "$as_me: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 { { echo "$as_me:1877: error: cannot compute OBJEXT: cannot compile" >&5
1878 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1879    { (exit 1); exit 1; }; }
1880 fi
1881
1882 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1883 fi
1884 echo "$as_me:1884: result: $ac_cv_objext" >&5
1885 echo "${ECHO_T}$ac_cv_objext" >&6
1886 OBJEXT=$ac_cv_objext
1887 ac_objext=$OBJEXT
1888 echo "$as_me:1888: checking whether we are using the GNU C compiler" >&5
1889 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1890 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1891   echo $ECHO_N "(cached) $ECHO_C" >&6
1892 else
1893   cat >conftest.$ac_ext <<_ACEOF
1894 #line 1894 "configure"
1895 #include "confdefs.h"
1896
1897 int
1898 main ()
1899 {
1900 #ifndef __GNUC__
1901        choke me
1902 #endif
1903
1904   ;
1905   return 0;
1906 }
1907 _ACEOF
1908 rm -f conftest.$ac_objext
1909 if { (eval echo "$as_me:1909: \"$ac_compile\"") >&5
1910   (eval $ac_compile) 2>&5
1911   ac_status=$?
1912   echo "$as_me:1912: \$? = $ac_status" >&5
1913   (exit $ac_status); } &&
1914          { ac_try='test -s conftest.$ac_objext'
1915   { (eval echo "$as_me:1915: \"$ac_try\"") >&5
1916   (eval $ac_try) 2>&5
1917   ac_status=$?
1918   echo "$as_me:1918: \$? = $ac_status" >&5
1919   (exit $ac_status); }; }; then
1920   ac_compiler_gnu=yes
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1924 ac_compiler_gnu=no
1925 fi
1926 rm -f conftest.$ac_objext conftest.$ac_ext
1927 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1928
1929 fi
1930 echo "$as_me:1930: result: $ac_cv_c_compiler_gnu" >&5
1931 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1932 GCC=`test $ac_compiler_gnu = yes && echo yes`
1933 ac_test_CFLAGS=${CFLAGS+set}
1934 ac_save_CFLAGS=$CFLAGS
1935 CFLAGS="-g"
1936 echo "$as_me:1936: checking whether $CC accepts -g" >&5
1937 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1938 if test "${ac_cv_prog_cc_g+set}" = set; then
1939   echo $ECHO_N "(cached) $ECHO_C" >&6
1940 else
1941   cat >conftest.$ac_ext <<_ACEOF
1942 #line 1942 "configure"
1943 #include "confdefs.h"
1944
1945 int
1946 main ()
1947 {
1948
1949   ;
1950   return 0;
1951 }
1952 _ACEOF
1953 rm -f conftest.$ac_objext
1954 if { (eval echo "$as_me:1954: \"$ac_compile\"") >&5
1955   (eval $ac_compile) 2>&5
1956   ac_status=$?
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit $ac_status); } &&
1959          { ac_try='test -s conftest.$ac_objext'
1960   { (eval echo "$as_me:1960: \"$ac_try\"") >&5
1961   (eval $ac_try) 2>&5
1962   ac_status=$?
1963   echo "$as_me:1963: \$? = $ac_status" >&5
1964   (exit $ac_status); }; }; then
1965   ac_cv_prog_cc_g=yes
1966 else
1967   echo "$as_me: failed program was:" >&5
1968 cat conftest.$ac_ext >&5
1969 ac_cv_prog_cc_g=no
1970 fi
1971 rm -f conftest.$ac_objext conftest.$ac_ext
1972 fi
1973 echo "$as_me:1973: result: $ac_cv_prog_cc_g" >&5
1974 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1975 if test "$ac_test_CFLAGS" = set; then
1976   CFLAGS=$ac_save_CFLAGS
1977 elif test $ac_cv_prog_cc_g = yes; then
1978   if test "$GCC" = yes; then
1979     CFLAGS="-g -O2"
1980   else
1981     CFLAGS="-g"
1982   fi
1983 else
1984   if test "$GCC" = yes; then
1985     CFLAGS="-O2"
1986   else
1987     CFLAGS=
1988   fi
1989 fi
1990 # Some people use a C++ compiler to compile C.  Since we use `exit',
1991 # in C++ we need to declare it.  In case someone uses the same compiler
1992 # for both compiling C and C++ we need to have the C++ compiler decide
1993 # the declaration of exit, since it's the most demanding environment.
1994 cat >conftest.$ac_ext <<_ACEOF
1995 #ifndef __cplusplus
1996   choke me
1997 #endif
1998 _ACEOF
1999 rm -f conftest.$ac_objext
2000 if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5
2001   (eval $ac_compile) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit $ac_status); } &&
2005          { ac_try='test -s conftest.$ac_objext'
2006   { (eval echo "$as_me:2006: \"$ac_try\"") >&5
2007   (eval $ac_try) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); }; }; then
2011   for ac_declaration in \
2012    ''\
2013    '#include <stdlib.h>' \
2014    'extern "C" void std::exit (int) throw (); using std::exit;' \
2015    'extern "C" void std::exit (int); using std::exit;' \
2016    'extern "C" void exit (int) throw ();' \
2017    'extern "C" void exit (int);' \
2018    'void exit (int);'
2019 do
2020   cat >conftest.$ac_ext <<_ACEOF
2021 #line 2021 "configure"
2022 #include "confdefs.h"
2023 #include <stdlib.h>
2024 $ac_declaration
2025 int
2026 main ()
2027 {
2028 exit (42);
2029   ;
2030   return 0;
2031 }
2032 _ACEOF
2033 rm -f conftest.$ac_objext
2034 if { (eval echo "$as_me:2034: \"$ac_compile\"") >&5
2035   (eval $ac_compile) 2>&5
2036   ac_status=$?
2037   echo "$as_me:2037: \$? = $ac_status" >&5
2038   (exit $ac_status); } &&
2039          { ac_try='test -s conftest.$ac_objext'
2040   { (eval echo "$as_me:2040: \"$ac_try\"") >&5
2041   (eval $ac_try) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit $ac_status); }; }; then
2045   :
2046 else
2047   echo "$as_me: failed program was:" >&5
2048 cat conftest.$ac_ext >&5
2049 continue
2050 fi
2051 rm -f conftest.$ac_objext conftest.$ac_ext
2052   cat >conftest.$ac_ext <<_ACEOF
2053 #line 2053 "configure"
2054 #include "confdefs.h"
2055 $ac_declaration
2056 int
2057 main ()
2058 {
2059 exit (42);
2060   ;
2061   return 0;
2062 }
2063 _ACEOF
2064 rm -f conftest.$ac_objext
2065 if { (eval echo "$as_me:2065: \"$ac_compile\"") >&5
2066   (eval $ac_compile) 2>&5
2067   ac_status=$?
2068   echo "$as_me:2068: \$? = $ac_status" >&5
2069   (exit $ac_status); } &&
2070          { ac_try='test -s conftest.$ac_objext'
2071   { (eval echo "$as_me:2071: \"$ac_try\"") >&5
2072   (eval $ac_try) 2>&5
2073   ac_status=$?
2074   echo "$as_me:2074: \$? = $ac_status" >&5
2075   (exit $ac_status); }; }; then
2076   break
2077 else
2078   echo "$as_me: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2080 fi
2081 rm -f conftest.$ac_objext conftest.$ac_ext
2082 done
2083 rm -f conftest*
2084 if test -n "$ac_declaration"; then
2085   echo '#ifdef __cplusplus' >>confdefs.h
2086   echo $ac_declaration      >>confdefs.h
2087   echo '#endif'             >>confdefs.h
2088 fi
2089
2090 else
2091   echo "$as_me: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 fi
2094 rm -f conftest.$ac_objext conftest.$ac_ext
2095 ac_ext=c
2096 ac_cpp='$CPP $CPPFLAGS'
2097 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2098 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2100 ac_main_return=return
2101
2102 GCC_VERSION=none
2103 if test "$GCC" = yes ; then
2104         echo "$as_me:2104: checking version of $CC" >&5
2105 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2106         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2107         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2108         echo "$as_me:2108: result: $GCC_VERSION" >&5
2109 echo "${ECHO_T}$GCC_VERSION" >&6
2110 fi
2111
2112 ac_ext=c
2113 ac_cpp='$CPP $CPPFLAGS'
2114 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2115 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2116 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2117 ac_main_return=return
2118 echo "$as_me:2118: checking how to run the C preprocessor" >&5
2119 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2120 # On Suns, sometimes $CPP names a directory.
2121 if test -n "$CPP" && test -d "$CPP"; then
2122   CPP=
2123 fi
2124 if test -z "$CPP"; then
2125   if test "${ac_cv_prog_CPP+set}" = set; then
2126   echo $ECHO_N "(cached) $ECHO_C" >&6
2127 else
2128       # Double quotes because CPP needs to be expanded
2129     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2130     do
2131       ac_preproc_ok=false
2132 for ac_c_preproc_warn_flag in '' yes
2133 do
2134   # Use a header file that comes with gcc, so configuring glibc
2135   # with a fresh cross-compiler works.
2136   # On the NeXT, cc -E runs the code through the compiler's parser,
2137   # not just through cpp. "Syntax error" is here to catch this case.
2138   cat >conftest.$ac_ext <<_ACEOF
2139 #line 2139 "configure"
2140 #include "confdefs.h"
2141 #include <assert.h>
2142                      Syntax error
2143 _ACEOF
2144 if { (eval echo "$as_me:2144: \"$ac_cpp conftest.$ac_ext\"") >&5
2145   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2146   ac_status=$?
2147   egrep -v '^ *\+' conftest.er1 >conftest.err
2148   rm -f conftest.er1
2149   cat conftest.err >&5
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } >/dev/null; then
2152   if test -s conftest.err; then
2153     ac_cpp_err=$ac_c_preproc_warn_flag
2154   else
2155     ac_cpp_err=
2156   fi
2157 else
2158   ac_cpp_err=yes
2159 fi
2160 if test -z "$ac_cpp_err"; then
2161   :
2162 else
2163   echo "$as_me: failed program was:" >&5
2164   cat conftest.$ac_ext >&5
2165   # Broken: fails on valid input.
2166 continue
2167 fi
2168 rm -f conftest.err conftest.$ac_ext
2169
2170   # OK, works on sane cases.  Now check whether non-existent headers
2171   # can be detected and how.
2172   cat >conftest.$ac_ext <<_ACEOF
2173 #line 2173 "configure"
2174 #include "confdefs.h"
2175 #include <ac_nonexistent.h>
2176 _ACEOF
2177 if { (eval echo "$as_me:2177: \"$ac_cpp conftest.$ac_ext\"") >&5
2178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2179   ac_status=$?
2180   egrep -v '^ *\+' conftest.er1 >conftest.err
2181   rm -f conftest.er1
2182   cat conftest.err >&5
2183   echo "$as_me:2183: \$? = $ac_status" >&5
2184   (exit $ac_status); } >/dev/null; then
2185   if test -s conftest.err; then
2186     ac_cpp_err=$ac_c_preproc_warn_flag
2187   else
2188     ac_cpp_err=
2189   fi
2190 else
2191   ac_cpp_err=yes
2192 fi
2193 if test -z "$ac_cpp_err"; then
2194   # Broken: success on invalid input.
2195 continue
2196 else
2197   echo "$as_me: failed program was:" >&5
2198   cat conftest.$ac_ext >&5
2199   # Passes both tests.
2200 ac_preproc_ok=:
2201 break
2202 fi
2203 rm -f conftest.err conftest.$ac_ext
2204
2205 done
2206 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2207 rm -f conftest.err conftest.$ac_ext
2208 if $ac_preproc_ok; then
2209   break
2210 fi
2211
2212     done
2213     ac_cv_prog_CPP=$CPP
2214
2215 fi
2216   CPP=$ac_cv_prog_CPP
2217 else
2218   ac_cv_prog_CPP=$CPP
2219 fi
2220 echo "$as_me:2220: result: $CPP" >&5
2221 echo "${ECHO_T}$CPP" >&6
2222 ac_preproc_ok=false
2223 for ac_c_preproc_warn_flag in '' yes
2224 do
2225   # Use a header file that comes with gcc, so configuring glibc
2226   # with a fresh cross-compiler works.
2227   # On the NeXT, cc -E runs the code through the compiler's parser,
2228   # not just through cpp. "Syntax error" is here to catch this case.
2229   cat >conftest.$ac_ext <<_ACEOF
2230 #line 2230 "configure"
2231 #include "confdefs.h"
2232 #include <assert.h>
2233                      Syntax error
2234 _ACEOF
2235 if { (eval echo "$as_me:2235: \"$ac_cpp conftest.$ac_ext\"") >&5
2236   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2237   ac_status=$?
2238   egrep -v '^ *\+' conftest.er1 >conftest.err
2239   rm -f conftest.er1
2240   cat conftest.err >&5
2241   echo "$as_me:2241: \$? = $ac_status" >&5
2242   (exit $ac_status); } >/dev/null; then
2243   if test -s conftest.err; then
2244     ac_cpp_err=$ac_c_preproc_warn_flag
2245   else
2246     ac_cpp_err=
2247   fi
2248 else
2249   ac_cpp_err=yes
2250 fi
2251 if test -z "$ac_cpp_err"; then
2252   :
2253 else
2254   echo "$as_me: failed program was:" >&5
2255   cat conftest.$ac_ext >&5
2256   # Broken: fails on valid input.
2257 continue
2258 fi
2259 rm -f conftest.err conftest.$ac_ext
2260
2261   # OK, works on sane cases.  Now check whether non-existent headers
2262   # can be detected and how.
2263   cat >conftest.$ac_ext <<_ACEOF
2264 #line 2264 "configure"
2265 #include "confdefs.h"
2266 #include <ac_nonexistent.h>
2267 _ACEOF
2268 if { (eval echo "$as_me:2268: \"$ac_cpp conftest.$ac_ext\"") >&5
2269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2270   ac_status=$?
2271   egrep -v '^ *\+' conftest.er1 >conftest.err
2272   rm -f conftest.er1
2273   cat conftest.err >&5
2274   echo "$as_me:2274: \$? = $ac_status" >&5
2275   (exit $ac_status); } >/dev/null; then
2276   if test -s conftest.err; then
2277     ac_cpp_err=$ac_c_preproc_warn_flag
2278   else
2279     ac_cpp_err=
2280   fi
2281 else
2282   ac_cpp_err=yes
2283 fi
2284 if test -z "$ac_cpp_err"; then
2285   # Broken: success on invalid input.
2286 continue
2287 else
2288   echo "$as_me: failed program was:" >&5
2289   cat conftest.$ac_ext >&5
2290   # Passes both tests.
2291 ac_preproc_ok=:
2292 break
2293 fi
2294 rm -f conftest.err conftest.$ac_ext
2295
2296 done
2297 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2298 rm -f conftest.err conftest.$ac_ext
2299 if $ac_preproc_ok; then
2300   :
2301 else
2302   { { echo "$as_me:2302: error: C preprocessor \"$CPP\" fails sanity check" >&5
2303 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2304    { (exit 1); exit 1; }; }
2305 fi
2306
2307 ac_ext=c
2308 ac_cpp='$CPP $CPPFLAGS'
2309 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2310 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2311 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2312 ac_main_return=return
2313
2314 if test $ac_cv_c_compiler_gnu = yes; then
2315     echo "$as_me:2315: checking whether $CC needs -traditional" >&5
2316 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2317 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2318   echo $ECHO_N "(cached) $ECHO_C" >&6
2319 else
2320     ac_pattern="Autoconf.*'x'"
2321   cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2324 #include <sgtty.h>
2325 int Autoconf = TIOCGETP;
2326 _ACEOF
2327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2328   egrep "$ac_pattern" >/dev/null 2>&1; then
2329   ac_cv_prog_gcc_traditional=yes
2330 else
2331   ac_cv_prog_gcc_traditional=no
2332 fi
2333 rm -f conftest*
2334
2335   if test $ac_cv_prog_gcc_traditional = no; then
2336     cat >conftest.$ac_ext <<_ACEOF
2337 #line 2337 "configure"
2338 #include "confdefs.h"
2339 #include <termio.h>
2340 int Autoconf = TCGETA;
2341 _ACEOF
2342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2343   egrep "$ac_pattern" >/dev/null 2>&1; then
2344   ac_cv_prog_gcc_traditional=yes
2345 fi
2346 rm -f conftest*
2347
2348   fi
2349 fi
2350 echo "$as_me:2350: result: $ac_cv_prog_gcc_traditional" >&5
2351 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2352   if test $ac_cv_prog_gcc_traditional = yes; then
2353     CC="$CC -traditional"
2354   fi
2355 fi
2356
2357 echo "$as_me:2357: checking whether $CC understands -c and -o together" >&5
2358 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2359 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2360   echo $ECHO_N "(cached) $ECHO_C" >&6
2361 else
2362
2363 cat > conftest.$ac_ext <<CF_EOF
2364 #include <stdio.h>
2365 int main()
2366 {
2367         ${cf_cv_main_return:-return}(0);
2368 }
2369 CF_EOF
2370 # We do the test twice because some compilers refuse to overwrite an
2371 # existing .o file with -o, though they will create one.
2372 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2373 if { (eval echo "$as_me:2373: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:2376: \$? = $ac_status" >&5
2377   (exit $ac_status); } &&
2378   test -f conftest2.$ac_objext && { (eval echo "$as_me:2378: \"$ac_try\"") >&5
2379   (eval $ac_try) 2>&5
2380   ac_status=$?
2381   echo "$as_me:2381: \$? = $ac_status" >&5
2382   (exit $ac_status); };
2383 then
2384   eval cf_cv_prog_CC_c_o=yes
2385 else
2386   eval cf_cv_prog_CC_c_o=no
2387 fi
2388 rm -f conftest*
2389
2390 fi
2391 if test $cf_cv_prog_CC_c_o = yes; then
2392   echo "$as_me:2392: result: yes" >&5
2393 echo "${ECHO_T}yes" >&6
2394 else
2395   echo "$as_me:2395: result: no" >&5
2396 echo "${ECHO_T}no" >&6
2397 fi
2398
2399 echo "$as_me:2399: checking for POSIXized ISC" >&5
2400 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2401 if test -d /etc/conf/kconfig.d &&
2402    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2403 then
2404   echo "$as_me:2404: result: yes" >&5
2405 echo "${ECHO_T}yes" >&6
2406   ISC=yes # If later tests want to check for ISC.
2407
2408 cat >>confdefs.h <<\EOF
2409 #define _POSIX_SOURCE 1
2410 EOF
2411
2412   if test "$GCC" = yes; then
2413     CC="$CC -posix"
2414   else
2415     CC="$CC -Xp"
2416   fi
2417 else
2418   echo "$as_me:2418: result: no" >&5
2419 echo "${ECHO_T}no" >&6
2420   ISC=
2421 fi
2422
2423 echo "$as_me:2423: checking for ${CC-cc} option to accept ANSI C" >&5
2424 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2425 if test "${cf_cv_ansi_cc+set}" = set; then
2426   echo $ECHO_N "(cached) $ECHO_C" >&6
2427 else
2428
2429 cf_cv_ansi_cc=no
2430 cf_save_CFLAGS="$CFLAGS"
2431 cf_save_CPPFLAGS="$CPPFLAGS"
2432 # Don't try gcc -ansi; that turns off useful extensions and
2433 # breaks some systems' header files.
2434 # AIX                   -qlanglvl=ansi
2435 # Ultrix and OSF/1      -std1
2436 # HP-UX                 -Aa -D_HPUX_SOURCE
2437 # SVR4                  -Xc
2438 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2439 for cf_arg in "-DCC_HAS_PROTOS" \
2440         "" \
2441         -qlanglvl=ansi \
2442         -std1 \
2443         -Ae \
2444         "-Aa -D_HPUX_SOURCE" \
2445         -Xc
2446 do
2447
2448 cf_fix_cppflags=no
2449 cf_new_cflags=
2450 cf_new_cppflags=
2451 cf_new_extra_cppflags=
2452
2453 for cf_add_cflags in $cf_arg
2454 do
2455 case $cf_fix_cppflags in
2456 no)
2457         case $cf_add_cflags in #(vi
2458         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2459                 case $cf_add_cflags in
2460                 -D*)
2461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2462
2463                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2464                                 && test -z "${cf_tst_cflags}" \
2465                                 && cf_fix_cppflags=yes
2466
2467                         if test $cf_fix_cppflags = yes ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         elif test "${cf_tst_cflags}" = "\"'" ; then
2471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2472                                 continue
2473                         fi
2474                         ;;
2475                 esac
2476                 case "$CPPFLAGS" in
2477                 *$cf_add_cflags) #(vi
2478                         ;;
2479                 *) #(vi
2480                         case $cf_add_cflags in #(vi
2481                         -D*)
2482                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2483
2484 CPPFLAGS=`echo "$CPPFLAGS" | \
2485         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2486                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2487
2488                                 ;;
2489                         esac
2490                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2491                         ;;
2492                 esac
2493                 ;;
2494         *)
2495                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2496                 ;;
2497         esac
2498         ;;
2499 yes)
2500         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2501
2502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2503
2504         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2505                 && test -z "${cf_tst_cflags}" \
2506                 && cf_fix_cppflags=no
2507         ;;
2508 esac
2509 done
2510
2511 if test -n "$cf_new_cflags" ; then
2512
2513         CFLAGS="$CFLAGS $cf_new_cflags"
2514 fi
2515
2516 if test -n "$cf_new_cppflags" ; then
2517
2518         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2519 fi
2520
2521 if test -n "$cf_new_extra_cppflags" ; then
2522
2523         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2524 fi
2525
2526         cat >conftest.$ac_ext <<_ACEOF
2527 #line 2527 "configure"
2528 #include "confdefs.h"
2529
2530 #ifndef CC_HAS_PROTOS
2531 #if !defined(__STDC__) || (__STDC__ != 1)
2532 choke me
2533 #endif
2534 #endif
2535
2536 int
2537 main ()
2538 {
2539
2540         int test (int i, double x);
2541         struct s1 {int (*f) (int a);};
2542         struct s2 {int (*f) (double a);};
2543   ;
2544   return 0;
2545 }
2546 _ACEOF
2547 rm -f conftest.$ac_objext
2548 if { (eval echo "$as_me:2548: \"$ac_compile\"") >&5
2549   (eval $ac_compile) 2>&5
2550   ac_status=$?
2551   echo "$as_me:2551: \$? = $ac_status" >&5
2552   (exit $ac_status); } &&
2553          { ac_try='test -s conftest.$ac_objext'
2554   { (eval echo "$as_me:2554: \"$ac_try\"") >&5
2555   (eval $ac_try) 2>&5
2556   ac_status=$?
2557   echo "$as_me:2557: \$? = $ac_status" >&5
2558   (exit $ac_status); }; }; then
2559   cf_cv_ansi_cc="$cf_arg"; break
2560 else
2561   echo "$as_me: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
2563 fi
2564 rm -f conftest.$ac_objext conftest.$ac_ext
2565 done
2566 CFLAGS="$cf_save_CFLAGS"
2567 CPPFLAGS="$cf_save_CPPFLAGS"
2568
2569 fi
2570 echo "$as_me:2570: result: $cf_cv_ansi_cc" >&5
2571 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2572
2573 if test "$cf_cv_ansi_cc" != "no"; then
2574 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2575
2576 cf_fix_cppflags=no
2577 cf_new_cflags=
2578 cf_new_cppflags=
2579 cf_new_extra_cppflags=
2580
2581 for cf_add_cflags in $cf_cv_ansi_cc
2582 do
2583 case $cf_fix_cppflags in
2584 no)
2585         case $cf_add_cflags in #(vi
2586         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2587                 case $cf_add_cflags in
2588                 -D*)
2589                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2590
2591                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2592                                 && test -z "${cf_tst_cflags}" \
2593                                 && cf_fix_cppflags=yes
2594
2595                         if test $cf_fix_cppflags = yes ; then
2596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597                                 continue
2598                         elif test "${cf_tst_cflags}" = "\"'" ; then
2599                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2600                                 continue
2601                         fi
2602                         ;;
2603                 esac
2604                 case "$CPPFLAGS" in
2605                 *$cf_add_cflags) #(vi
2606                         ;;
2607                 *) #(vi
2608                         case $cf_add_cflags in #(vi
2609                         -D*)
2610                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2611
2612 CPPFLAGS=`echo "$CPPFLAGS" | \
2613         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2614                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2615
2616                                 ;;
2617                         esac
2618                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2619                         ;;
2620                 esac
2621                 ;;
2622         *)
2623                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2624                 ;;
2625         esac
2626         ;;
2627 yes)
2628         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2629
2630         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2631
2632         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2633                 && test -z "${cf_tst_cflags}" \
2634                 && cf_fix_cppflags=no
2635         ;;
2636 esac
2637 done
2638
2639 if test -n "$cf_new_cflags" ; then
2640
2641         CFLAGS="$CFLAGS $cf_new_cflags"
2642 fi
2643
2644 if test -n "$cf_new_cppflags" ; then
2645
2646         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2647 fi
2648
2649 if test -n "$cf_new_extra_cppflags" ; then
2650
2651         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2652 fi
2653
2654 else
2655         cat >>confdefs.h <<\EOF
2656 #define CC_HAS_PROTOS 1
2657 EOF
2658
2659 fi
2660 fi
2661
2662 if test "$cf_cv_ansi_cc" = "no"; then
2663         { { echo "$as_me:2663: error: Your compiler does not appear to recognize prototypes.
2664 You have the following choices:
2665         a. adjust your compiler options
2666         b. get an up-to-date compiler
2667         c. use a wrapper such as unproto" >&5
2668 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2669 You have the following choices:
2670         a. adjust your compiler options
2671         b. get an up-to-date compiler
2672         c. use a wrapper such as unproto" >&2;}
2673    { (exit 1); exit 1; }; }
2674 fi
2675
2676 case $cf_cv_system_name in
2677 os2*)
2678     CFLAGS="$CFLAGS -Zmt"
2679     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2680     CXXFLAGS="$CXXFLAGS -Zmt"
2681     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2682     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2683     ac_cv_exeext=.exe
2684     ;;
2685 esac
2686
2687 PROG_EXT="$EXEEXT"
2688
2689 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2690 #define PROG_EXT "$PROG_EXT"
2691 EOF
2692
2693 if test "$cross_compiling" = yes ; then
2694   LDCONFIG=:
2695 else
2696 case "$cf_cv_system_name" in #(vi
2697 dragonfly*|freebsd*) #(vi
2698   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2699   ;;
2700 *) LDPATH=$PATH:/sbin:/usr/sbin
2701   # Extract the first word of "ldconfig", so it can be a program name with args.
2702 set dummy ldconfig; ac_word=$2
2703 echo "$as_me:2703: checking for $ac_word" >&5
2704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2705 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2706   echo $ECHO_N "(cached) $ECHO_C" >&6
2707 else
2708   case $LDCONFIG in
2709   [\\/]* | ?:[\\/]*)
2710   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2711   ;;
2712   *)
2713   ac_save_IFS=$IFS; IFS=$ac_path_separator
2714 ac_dummy="$LDPATH"
2715 for ac_dir in $ac_dummy; do
2716   IFS=$ac_save_IFS
2717   test -z "$ac_dir" && ac_dir=.
2718   if $as_executable_p "$ac_dir/$ac_word"; then
2719    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2720    echo "$as_me:2720: found $ac_dir/$ac_word" >&5
2721    break
2722 fi
2723 done
2724
2725   ;;
2726 esac
2727 fi
2728 LDCONFIG=$ac_cv_path_LDCONFIG
2729
2730 if test -n "$LDCONFIG"; then
2731   echo "$as_me:2731: result: $LDCONFIG" >&5
2732 echo "${ECHO_T}$LDCONFIG" >&6
2733 else
2734   echo "$as_me:2734: result: no" >&5
2735 echo "${ECHO_T}no" >&6
2736 fi
2737
2738   ;;
2739 esac
2740 fi
2741
2742 echo "$as_me:2742: checking if you want to ensure bool is consistent with C++" >&5
2743 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2744
2745 # Check whether --with-cxx or --without-cxx was given.
2746 if test "${with_cxx+set}" = set; then
2747   withval="$with_cxx"
2748   cf_with_cxx=$withval
2749 else
2750   cf_with_cxx=yes
2751 fi;
2752 echo "$as_me:2752: result: $cf_with_cxx" >&5
2753 echo "${ECHO_T}$cf_with_cxx" >&6
2754 if test "X$cf_with_cxx" = Xno ; then
2755         CXX=""
2756         GXX=""
2757 else
2758         # with autoconf 2.13, we can change the error to a warning:
2759                 ac_ext=cc
2760 ac_cpp='$CXXCPP $CPPFLAGS'
2761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2762 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2764 ac_main_return=return
2765 if test -n "$ac_tool_prefix"; then
2766   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2767   do
2768     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2769 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2770 echo "$as_me:2770: checking for $ac_word" >&5
2771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2772 if test "${ac_cv_prog_CXX+set}" = set; then
2773   echo $ECHO_N "(cached) $ECHO_C" >&6
2774 else
2775   if test -n "$CXX"; then
2776   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2777 else
2778   ac_save_IFS=$IFS; IFS=$ac_path_separator
2779 ac_dummy="$PATH"
2780 for ac_dir in $ac_dummy; do
2781   IFS=$ac_save_IFS
2782   test -z "$ac_dir" && ac_dir=.
2783   $as_executable_p "$ac_dir/$ac_word" || continue
2784 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2785 echo "$as_me:2785: found $ac_dir/$ac_word" >&5
2786 break
2787 done
2788
2789 fi
2790 fi
2791 CXX=$ac_cv_prog_CXX
2792 if test -n "$CXX"; then
2793   echo "$as_me:2793: result: $CXX" >&5
2794 echo "${ECHO_T}$CXX" >&6
2795 else
2796   echo "$as_me:2796: result: no" >&5
2797 echo "${ECHO_T}no" >&6
2798 fi
2799
2800     test -n "$CXX" && break
2801   done
2802 fi
2803 if test -z "$CXX"; then
2804   ac_ct_CXX=$CXX
2805   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2806 do
2807   # Extract the first word of "$ac_prog", so it can be a program name with args.
2808 set dummy $ac_prog; ac_word=$2
2809 echo "$as_me:2809: checking for $ac_word" >&5
2810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2811 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2812   echo $ECHO_N "(cached) $ECHO_C" >&6
2813 else
2814   if test -n "$ac_ct_CXX"; then
2815   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2816 else
2817   ac_save_IFS=$IFS; IFS=$ac_path_separator
2818 ac_dummy="$PATH"
2819 for ac_dir in $ac_dummy; do
2820   IFS=$ac_save_IFS
2821   test -z "$ac_dir" && ac_dir=.
2822   $as_executable_p "$ac_dir/$ac_word" || continue
2823 ac_cv_prog_ac_ct_CXX="$ac_prog"
2824 echo "$as_me:2824: found $ac_dir/$ac_word" >&5
2825 break
2826 done
2827
2828 fi
2829 fi
2830 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2831 if test -n "$ac_ct_CXX"; then
2832   echo "$as_me:2832: result: $ac_ct_CXX" >&5
2833 echo "${ECHO_T}$ac_ct_CXX" >&6
2834 else
2835   echo "$as_me:2835: result: no" >&5
2836 echo "${ECHO_T}no" >&6
2837 fi
2838
2839   test -n "$ac_ct_CXX" && break
2840 done
2841 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2842
2843   CXX=$ac_ct_CXX
2844 fi
2845
2846 # Provide some information about the compiler.
2847 echo "$as_me:2847:" \
2848      "checking for C++ compiler version" >&5
2849 ac_compiler=`set X $ac_compile; echo $2`
2850 { (eval echo "$as_me:2850: \"$ac_compiler --version </dev/null >&5\"") >&5
2851   (eval $ac_compiler --version </dev/null >&5) 2>&5
2852   ac_status=$?
2853   echo "$as_me:2853: \$? = $ac_status" >&5
2854   (exit $ac_status); }
2855 { (eval echo "$as_me:2855: \"$ac_compiler -v </dev/null >&5\"") >&5
2856   (eval $ac_compiler -v </dev/null >&5) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); }
2860 { (eval echo "$as_me:2860: \"$ac_compiler -V </dev/null >&5\"") >&5
2861   (eval $ac_compiler -V </dev/null >&5) 2>&5
2862   ac_status=$?
2863   echo "$as_me:2863: \$? = $ac_status" >&5
2864   (exit $ac_status); }
2865
2866 echo "$as_me:2866: checking whether we are using the GNU C++ compiler" >&5
2867 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2868 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871   cat >conftest.$ac_ext <<_ACEOF
2872 #line 2872 "configure"
2873 #include "confdefs.h"
2874
2875 int
2876 main ()
2877 {
2878 #ifndef __GNUC__
2879        choke me
2880 #endif
2881
2882   ;
2883   return 0;
2884 }
2885 _ACEOF
2886 rm -f conftest.$ac_objext
2887 if { (eval echo "$as_me:2887: \"$ac_compile\"") >&5
2888   (eval $ac_compile) 2>&5
2889   ac_status=$?
2890   echo "$as_me:2890: \$? = $ac_status" >&5
2891   (exit $ac_status); } &&
2892          { ac_try='test -s conftest.$ac_objext'
2893   { (eval echo "$as_me:2893: \"$ac_try\"") >&5
2894   (eval $ac_try) 2>&5
2895   ac_status=$?
2896   echo "$as_me:2896: \$? = $ac_status" >&5
2897   (exit $ac_status); }; }; then
2898   ac_compiler_gnu=yes
2899 else
2900   echo "$as_me: failed program was:" >&5
2901 cat conftest.$ac_ext >&5
2902 ac_compiler_gnu=no
2903 fi
2904 rm -f conftest.$ac_objext conftest.$ac_ext
2905 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2906
2907 fi
2908 echo "$as_me:2908: result: $ac_cv_cxx_compiler_gnu" >&5
2909 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2910 GXX=`test $ac_compiler_gnu = yes && echo yes`
2911 ac_test_CXXFLAGS=${CXXFLAGS+set}
2912 ac_save_CXXFLAGS=$CXXFLAGS
2913 CXXFLAGS="-g"
2914 echo "$as_me:2914: checking whether $CXX accepts -g" >&5
2915 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2916 if test "${ac_cv_prog_cxx_g+set}" = set; then
2917   echo $ECHO_N "(cached) $ECHO_C" >&6
2918 else
2919   cat >conftest.$ac_ext <<_ACEOF
2920 #line 2920 "configure"
2921 #include "confdefs.h"
2922
2923 int
2924 main ()
2925 {
2926
2927   ;
2928   return 0;
2929 }
2930 _ACEOF
2931 rm -f conftest.$ac_objext
2932 if { (eval echo "$as_me:2932: \"$ac_compile\"") >&5
2933   (eval $ac_compile) 2>&5
2934   ac_status=$?
2935   echo "$as_me:2935: \$? = $ac_status" >&5
2936   (exit $ac_status); } &&
2937          { ac_try='test -s conftest.$ac_objext'
2938   { (eval echo "$as_me:2938: \"$ac_try\"") >&5
2939   (eval $ac_try) 2>&5
2940   ac_status=$?
2941   echo "$as_me:2941: \$? = $ac_status" >&5
2942   (exit $ac_status); }; }; then
2943   ac_cv_prog_cxx_g=yes
2944 else
2945   echo "$as_me: failed program was:" >&5
2946 cat conftest.$ac_ext >&5
2947 ac_cv_prog_cxx_g=no
2948 fi
2949 rm -f conftest.$ac_objext conftest.$ac_ext
2950 fi
2951 echo "$as_me:2951: result: $ac_cv_prog_cxx_g" >&5
2952 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2953 if test "$ac_test_CXXFLAGS" = set; then
2954   CXXFLAGS=$ac_save_CXXFLAGS
2955 elif test $ac_cv_prog_cxx_g = yes; then
2956   if test "$GXX" = yes; then
2957     CXXFLAGS="-g -O2"
2958   else
2959     CXXFLAGS="-g"
2960   fi
2961 else
2962   if test "$GXX" = yes; then
2963     CXXFLAGS="-O2"
2964   else
2965     CXXFLAGS=
2966   fi
2967 fi
2968 for ac_declaration in \
2969    ''\
2970    '#include <stdlib.h>' \
2971    'extern "C" void std::exit (int) throw (); using std::exit;' \
2972    'extern "C" void std::exit (int); using std::exit;' \
2973    'extern "C" void exit (int) throw ();' \
2974    'extern "C" void exit (int);' \
2975    'void exit (int);'
2976 do
2977   cat >conftest.$ac_ext <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 #include <stdlib.h>
2981 $ac_declaration
2982 int
2983 main ()
2984 {
2985 exit (42);
2986   ;
2987   return 0;
2988 }
2989 _ACEOF
2990 rm -f conftest.$ac_objext
2991 if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
2992   (eval $ac_compile) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); } &&
2996          { ac_try='test -s conftest.$ac_objext'
2997   { (eval echo "$as_me:2997: \"$ac_try\"") >&5
2998   (eval $ac_try) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); }; }; then
3002   :
3003 else
3004   echo "$as_me: failed program was:" >&5
3005 cat conftest.$ac_ext >&5
3006 continue
3007 fi
3008 rm -f conftest.$ac_objext conftest.$ac_ext
3009   cat >conftest.$ac_ext <<_ACEOF
3010 #line 3010 "configure"
3011 #include "confdefs.h"
3012 $ac_declaration
3013 int
3014 main ()
3015 {
3016 exit (42);
3017   ;
3018   return 0;
3019 }
3020 _ACEOF
3021 rm -f conftest.$ac_objext
3022 if { (eval echo "$as_me:3022: \"$ac_compile\"") >&5
3023   (eval $ac_compile) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); } &&
3027          { ac_try='test -s conftest.$ac_objext'
3028   { (eval echo "$as_me:3028: \"$ac_try\"") >&5
3029   (eval $ac_try) 2>&5
3030   ac_status=$?
3031   echo "$as_me:3031: \$? = $ac_status" >&5
3032   (exit $ac_status); }; }; then
3033   break
3034 else
3035   echo "$as_me: failed program was:" >&5
3036 cat conftest.$ac_ext >&5
3037 fi
3038 rm -f conftest.$ac_objext conftest.$ac_ext
3039 done
3040 rm -f conftest*
3041 if test -n "$ac_declaration"; then
3042   echo '#ifdef __cplusplus' >>confdefs.h
3043   echo $ac_declaration      >>confdefs.h
3044   echo '#endif'             >>confdefs.h
3045 fi
3046
3047 ac_ext=c
3048 ac_cpp='$CPP $CPPFLAGS'
3049 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3050 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3051 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3052 ac_main_return=return
3053
3054                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3055         if test "$CXX" = "g++" ; then
3056                 # Extract the first word of "g++", so it can be a program name with args.
3057 set dummy g++; ac_word=$2
3058 echo "$as_me:3058: checking for $ac_word" >&5
3059 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3060 if test "${ac_cv_path_CXX+set}" = set; then
3061   echo $ECHO_N "(cached) $ECHO_C" >&6
3062 else
3063   case $CXX in
3064   [\\/]* | ?:[\\/]*)
3065   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3066   ;;
3067   *)
3068   ac_save_IFS=$IFS; IFS=$ac_path_separator
3069 ac_dummy="$PATH"
3070 for ac_dir in $ac_dummy; do
3071   IFS=$ac_save_IFS
3072   test -z "$ac_dir" && ac_dir=.
3073   if $as_executable_p "$ac_dir/$ac_word"; then
3074    ac_cv_path_CXX="$ac_dir/$ac_word"
3075    echo "$as_me:3075: found $ac_dir/$ac_word" >&5
3076    break
3077 fi
3078 done
3079
3080   ;;
3081 esac
3082 fi
3083 CXX=$ac_cv_path_CXX
3084
3085 if test -n "$CXX"; then
3086   echo "$as_me:3086: result: $CXX" >&5
3087 echo "${ECHO_T}$CXX" >&6
3088 else
3089   echo "$as_me:3089: result: no" >&5
3090 echo "${ECHO_T}no" >&6
3091 fi
3092
3093         fi
3094         if test "$CXX" = "g++" ; then
3095                 { echo "$as_me:3095: WARNING: ignoring hardcoded g++" >&5
3096 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3097                 cf_with_cxx=no; CXX=""; GXX="";
3098         fi
3099 fi
3100
3101 GXX_VERSION=none
3102 if test "$GXX" = yes; then
3103         echo "$as_me:3103: checking version of g++" >&5
3104 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3105         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3106         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3107         echo "$as_me:3107: result: $GXX_VERSION" >&5
3108 echo "${ECHO_T}$GXX_VERSION" >&6
3109 fi
3110
3111 case $GXX_VERSION in
3112 1*|2.[0-6]*)
3113         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3114         # cf_cxx_library=no
3115         { echo "$as_me:3115: WARNING: templates do not work" >&5
3116 echo "$as_me: WARNING: templates do not work" >&2;}
3117         ;;
3118 esac
3119
3120 echo "$as_me:3120: checking if you want to build C++ binding and demo" >&5
3121 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3122
3123 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3124 if test "${with_cxx_binding+set}" = set; then
3125   withval="$with_cxx_binding"
3126   cf_with_cxx_binding=$withval
3127 else
3128   cf_with_cxx_binding=$cf_with_cxx
3129 fi;
3130 echo "$as_me:3130: result: $cf_with_cxx_binding" >&5
3131 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3132
3133 echo "$as_me:3133: checking if you want to build with Ada95" >&5
3134 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3135
3136 # Check whether --with-ada or --without-ada was given.
3137 if test "${with_ada+set}" = set; then
3138   withval="$with_ada"
3139   cf_with_ada=$withval
3140 else
3141   cf_with_ada=yes
3142 fi;
3143 echo "$as_me:3143: result: $cf_with_ada" >&5
3144 echo "${ECHO_T}$cf_with_ada" >&6
3145
3146 echo "$as_me:3146: checking if you want to install manpages" >&5
3147 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3148
3149 # Check whether --with-manpages or --without-manpages was given.
3150 if test "${with_manpages+set}" = set; then
3151   withval="$with_manpages"
3152   cf_with_manpages=$withval
3153 else
3154   cf_with_manpages=yes
3155 fi;
3156 echo "$as_me:3156: result: $cf_with_manpages" >&5
3157 echo "${ECHO_T}$cf_with_manpages" >&6
3158
3159 echo "$as_me:3159: checking if you want to build programs such as tic" >&5
3160 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3161
3162 # Check whether --with-progs or --without-progs was given.
3163 if test "${with_progs+set}" = set; then
3164   withval="$with_progs"
3165   cf_with_progs=$withval
3166 else
3167   cf_with_progs=yes
3168 fi;
3169 echo "$as_me:3169: result: $cf_with_progs" >&5
3170 echo "${ECHO_T}$cf_with_progs" >&6
3171
3172 echo "$as_me:3172: checking if you wish to install curses.h" >&5
3173 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3174
3175 # Check whether --with-curses-h or --without-curses-h was given.
3176 if test "${with_curses_h+set}" = set; then
3177   withval="$with_curses_h"
3178   with_curses_h=$withval
3179 else
3180   with_curses_h=yes
3181 fi;
3182 echo "$as_me:3182: result: $with_curses_h" >&5
3183 echo "${ECHO_T}$with_curses_h" >&6
3184
3185 modules_to_build="ncurses"
3186 if test "X$cf_with_progs" != Xno ; then
3187 modules_to_build="$modules_to_build progs tack"
3188 fi
3189 modules_to_build="$modules_to_build panel menu form"
3190
3191 test "$program_prefix" != NONE &&
3192   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3193 # Use a double $ so make ignores it.
3194 test "$program_suffix" != NONE &&
3195   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3196 # Double any \ or $.  echo might interpret backslashes.
3197 # By default was `s,x,x', remove it if useless.
3198 cat <<\_ACEOF >conftest.sed
3199 s/[\\$]/&&/g;s/;s,x,x,$//
3200 _ACEOF
3201 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3202 rm conftest.sed
3203
3204 for ac_prog in mawk gawk nawk awk
3205 do
3206   # Extract the first word of "$ac_prog", so it can be a program name with args.
3207 set dummy $ac_prog; ac_word=$2
3208 echo "$as_me:3208: checking for $ac_word" >&5
3209 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3210 if test "${ac_cv_prog_AWK+set}" = set; then
3211   echo $ECHO_N "(cached) $ECHO_C" >&6
3212 else
3213   if test -n "$AWK"; then
3214   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3215 else
3216   ac_save_IFS=$IFS; IFS=$ac_path_separator
3217 ac_dummy="$PATH"
3218 for ac_dir in $ac_dummy; do
3219   IFS=$ac_save_IFS
3220   test -z "$ac_dir" && ac_dir=.
3221   $as_executable_p "$ac_dir/$ac_word" || continue
3222 ac_cv_prog_AWK="$ac_prog"
3223 echo "$as_me:3223: found $ac_dir/$ac_word" >&5
3224 break
3225 done
3226
3227 fi
3228 fi
3229 AWK=$ac_cv_prog_AWK
3230 if test -n "$AWK"; then
3231   echo "$as_me:3231: result: $AWK" >&5
3232 echo "${ECHO_T}$AWK" >&6
3233 else
3234   echo "$as_me:3234: result: no" >&5
3235 echo "${ECHO_T}no" >&6
3236 fi
3237
3238   test -n "$AWK" && break
3239 done
3240
3241 test -z "$AWK" && { { echo "$as_me:3241: error: No awk program found" >&5
3242 echo "$as_me: error: No awk program found" >&2;}
3243    { (exit 1); exit 1; }; }
3244
3245 echo "$as_me:3245: checking for egrep" >&5
3246 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3247 if test "${ac_cv_prog_egrep+set}" = set; then
3248   echo $ECHO_N "(cached) $ECHO_C" >&6
3249 else
3250   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3251     then ac_cv_prog_egrep='grep -E'
3252     else ac_cv_prog_egrep='egrep'
3253     fi
3254 fi
3255 echo "$as_me:3255: result: $ac_cv_prog_egrep" >&5
3256 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3257  EGREP=$ac_cv_prog_egrep
3258
3259 test -z "$EGREP" && { { echo "$as_me:3259: error: No egrep program found" >&5
3260 echo "$as_me: error: No egrep program found" >&2;}
3261    { (exit 1); exit 1; }; }
3262
3263 # Find a good install program.  We prefer a C program (faster),
3264 # so one script is as good as another.  But avoid the broken or
3265 # incompatible versions:
3266 # SysV /etc/install, /usr/sbin/install
3267 # SunOS /usr/etc/install
3268 # IRIX /sbin/install
3269 # AIX /bin/install
3270 # AmigaOS /C/install, which installs bootblocks on floppy discs
3271 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3272 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3273 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3274 # ./install, which can be erroneously created by make from ./install.sh.
3275 echo "$as_me:3275: checking for a BSD compatible install" >&5
3276 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3277 if test -z "$INSTALL"; then
3278 if test "${ac_cv_path_install+set}" = set; then
3279   echo $ECHO_N "(cached) $ECHO_C" >&6
3280 else
3281     ac_save_IFS=$IFS; IFS=$ac_path_separator
3282   for ac_dir in $PATH; do
3283     IFS=$ac_save_IFS
3284     # Account for people who put trailing slashes in PATH elements.
3285     case $ac_dir/ in
3286     / | ./ | .// | /cC/* \
3287     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3288     | /usr/ucb/* ) ;;
3289     *)
3290       # OSF1 and SCO ODT 3.0 have their own names for install.
3291       # Don't use installbsd from OSF since it installs stuff as root
3292       # by default.
3293       for ac_prog in ginstall scoinst install; do
3294         if $as_executable_p "$ac_dir/$ac_prog"; then
3295           if test $ac_prog = install &&
3296             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3297             # AIX install.  It has an incompatible calling convention.
3298             :
3299           elif test $ac_prog = install &&
3300             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3301             # program-specific install script used by HP pwplus--don't use.
3302             :
3303           else
3304             ac_cv_path_install="$ac_dir/$ac_prog -c"
3305             break 2
3306           fi
3307         fi
3308       done
3309       ;;
3310     esac
3311   done
3312
3313 fi
3314   if test "${ac_cv_path_install+set}" = set; then
3315     INSTALL=$ac_cv_path_install
3316   else
3317     # As a last resort, use the slow shell script.  We don't cache a
3318     # path for INSTALL within a source directory, because that will
3319     # break other packages using the cache if that directory is
3320     # removed, or if the path is relative.
3321     INSTALL=$ac_install_sh
3322   fi
3323 fi
3324 echo "$as_me:3324: result: $INSTALL" >&5
3325 echo "${ECHO_T}$INSTALL" >&6
3326
3327 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3328 # It thinks the first close brace ends the variable substitution.
3329 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3330
3331 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3332
3333 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3334
3335 case $INSTALL in
3336 /*)
3337   ;;
3338 *)
3339   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3340   test -z "$cf_dir" && cf_dir=.
3341   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3342   ;;
3343 esac
3344
3345 for ac_prog in tdlint lint alint splint lclint
3346 do
3347   # Extract the first word of "$ac_prog", so it can be a program name with args.
3348 set dummy $ac_prog; ac_word=$2
3349 echo "$as_me:3349: checking for $ac_word" >&5
3350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3351 if test "${ac_cv_prog_LINT+set}" = set; then
3352   echo $ECHO_N "(cached) $ECHO_C" >&6
3353 else
3354   if test -n "$LINT"; then
3355   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3356 else
3357   ac_save_IFS=$IFS; IFS=$ac_path_separator
3358 ac_dummy="$PATH"
3359 for ac_dir in $ac_dummy; do
3360   IFS=$ac_save_IFS
3361   test -z "$ac_dir" && ac_dir=.
3362   $as_executable_p "$ac_dir/$ac_word" || continue
3363 ac_cv_prog_LINT="$ac_prog"
3364 echo "$as_me:3364: found $ac_dir/$ac_word" >&5
3365 break
3366 done
3367
3368 fi
3369 fi
3370 LINT=$ac_cv_prog_LINT
3371 if test -n "$LINT"; then
3372   echo "$as_me:3372: result: $LINT" >&5
3373 echo "${ECHO_T}$LINT" >&6
3374 else
3375   echo "$as_me:3375: result: no" >&5
3376 echo "${ECHO_T}no" >&6
3377 fi
3378
3379   test -n "$LINT" && break
3380 done
3381
3382 echo "$as_me:3382: checking whether ln -s works" >&5
3383 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3384 LN_S=$as_ln_s
3385 if test "$LN_S" = "ln -s"; then
3386   echo "$as_me:3386: result: yes" >&5
3387 echo "${ECHO_T}yes" >&6
3388 else
3389   echo "$as_me:3389: result: no, using $LN_S" >&5
3390 echo "${ECHO_T}no, using $LN_S" >&6
3391 fi
3392
3393 echo "$as_me:3393: checking for long file names" >&5
3394 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3395 if test "${ac_cv_sys_long_file_names+set}" = set; then
3396   echo $ECHO_N "(cached) $ECHO_C" >&6
3397 else
3398   ac_cv_sys_long_file_names=yes
3399 # Test for long file names in all the places we know might matter:
3400 #      .                the current directory, where building will happen
3401 #      $prefix/lib      where we will be installing things
3402 #      $exec_prefix/lib likewise
3403 # eval it to expand exec_prefix.
3404 #      $TMPDIR          if set, where it might want to write temporary files
3405 # if $TMPDIR is not set:
3406 #      /tmp             where it might want to write temporary files
3407 #      /var/tmp         likewise
3408 #      /usr/tmp         likewise
3409 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3410   ac_tmpdirs=$TMPDIR
3411 else
3412   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3413 fi
3414 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3415   test -d $ac_dir || continue
3416   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3417   ac_xdir=$ac_dir/cf$$
3418   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3419   ac_tf1=$ac_xdir/conftest9012345
3420   ac_tf2=$ac_xdir/conftest9012346
3421   (echo 1 >$ac_tf1) 2>/dev/null
3422   (echo 2 >$ac_tf2) 2>/dev/null
3423   ac_val=`cat $ac_tf1 2>/dev/null`
3424   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3425     ac_cv_sys_long_file_names=no
3426     rm -rf $ac_xdir 2>/dev/null
3427     break
3428   fi
3429   rm -rf $ac_xdir 2>/dev/null
3430 done
3431 fi
3432 echo "$as_me:3432: result: $ac_cv_sys_long_file_names" >&5
3433 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3434 if test $ac_cv_sys_long_file_names = yes; then
3435
3436 cat >>confdefs.h <<\EOF
3437 #define HAVE_LONG_FILE_NAMES 1
3438 EOF
3439
3440 fi
3441
3442 # if we find pkg-config, check if we should install the ".pc" files.
3443
3444 echo "$as_me:3444: checking if you want to use pkg-config" >&5
3445 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3446
3447 # Check whether --with-pkg-config or --without-pkg-config was given.
3448 if test "${with_pkg_config+set}" = set; then
3449   withval="$with_pkg_config"
3450   cf_pkg_config=$withval
3451 else
3452   cf_pkg_config=yes
3453 fi;
3454 echo "$as_me:3454: result: $cf_pkg_config" >&5
3455 echo "${ECHO_T}$cf_pkg_config" >&6
3456
3457 case $cf_pkg_config in #(vi
3458 no) #(vi
3459         PKG_CONFIG=none
3460         ;;
3461 yes) #(vi
3462         # Extract the first word of "pkg-config", so it can be a program name with args.
3463 set dummy pkg-config; ac_word=$2
3464 echo "$as_me:3464: checking for $ac_word" >&5
3465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3466 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3467   echo $ECHO_N "(cached) $ECHO_C" >&6
3468 else
3469   case $PKG_CONFIG in
3470   [\\/]* | ?:[\\/]*)
3471   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3472   ;;
3473   *)
3474   ac_save_IFS=$IFS; IFS=$ac_path_separator
3475 ac_dummy="$PATH"
3476 for ac_dir in $ac_dummy; do
3477   IFS=$ac_save_IFS
3478   test -z "$ac_dir" && ac_dir=.
3479   if $as_executable_p "$ac_dir/$ac_word"; then
3480    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3481    echo "$as_me:3481: found $ac_dir/$ac_word" >&5
3482    break
3483 fi
3484 done
3485
3486   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3487   ;;
3488 esac
3489 fi
3490 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3491
3492 if test -n "$PKG_CONFIG"; then
3493   echo "$as_me:3493: result: $PKG_CONFIG" >&5
3494 echo "${ECHO_T}$PKG_CONFIG" >&6
3495 else
3496   echo "$as_me:3496: result: no" >&5
3497 echo "${ECHO_T}no" >&6
3498 fi
3499
3500         ;;
3501 *)
3502         PKG_CONFIG=$withval
3503         ;;
3504 esac
3505
3506 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3507 if test "$PKG_CONFIG" != none ; then
3508
3509 if test "x$prefix" != xNONE; then
3510   cf_path_syntax="$prefix"
3511 else
3512   cf_path_syntax="$ac_default_prefix"
3513 fi
3514
3515 case ".$PKG_CONFIG" in #(vi
3516 .\$\(*\)*|.\'*\'*) #(vi
3517   ;;
3518 ..|./*|.\\*) #(vi
3519   ;;
3520 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3521   ;;
3522 .\${*prefix}*) #(vi
3523   eval PKG_CONFIG="$PKG_CONFIG"
3524   case ".$PKG_CONFIG" in #(vi
3525   .NONE/*)
3526     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3527     ;;
3528   esac
3529   ;; #(vi
3530 .no|.NONE/*)
3531   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3532   ;;
3533 *)
3534   { { echo "$as_me:3534: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3535 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3536    { (exit 1); exit 1; }; }
3537   ;;
3538 esac
3539
3540 fi
3541
3542 if test "$PKG_CONFIG" != no ; then
3543         echo "$as_me:3543: checking if we should install .pc files for $PKG_CONFIG" >&5
3544 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3545
3546         # Leave this as something that can be overridden in the environment.
3547         if test -z "$PKG_CONFIG_LIBDIR" ; then
3548                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3549         fi
3550         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3551         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3552
3553 # Check whether --enable-pc-files or --disable-pc-files was given.
3554 if test "${enable_pc_files+set}" = set; then
3555   enableval="$enable_pc_files"
3556   enable_pc_files=$enableval
3557 else
3558   enable_pc_files=no
3559 fi;
3560                 echo "$as_me:3560: result: $enable_pc_files" >&5
3561 echo "${ECHO_T}$enable_pc_files" >&6
3562         else
3563                 echo "$as_me:3563: result: no" >&5
3564 echo "${ECHO_T}no" >&6
3565                 { echo "$as_me:3565: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3566 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3567                 enable_pc_files=no
3568         fi
3569 fi
3570
3571 echo "$as_me:3571: checking if we should assume mixed-case filenames" >&5
3572 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3573
3574 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3575 if test "${enable_mixed_case+set}" = set; then
3576   enableval="$enable_mixed_case"
3577   enable_mixedcase=$enableval
3578 else
3579   enable_mixedcase=auto
3580 fi;
3581 echo "$as_me:3581: result: $enable_mixedcase" >&5
3582 echo "${ECHO_T}$enable_mixedcase" >&6
3583 if test "$enable_mixedcase" = "auto" ; then
3584
3585 echo "$as_me:3585: checking if filesystem supports mixed-case filenames" >&5
3586 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3587 if test "${cf_cv_mixedcase+set}" = set; then
3588   echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590
3591 if test "$cross_compiling" = yes ; then
3592         case $target_alias in #(vi
3593         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3594                 cf_cv_mixedcase=no
3595                 ;;
3596         *)
3597                 cf_cv_mixedcase=yes
3598                 ;;
3599         esac
3600 else
3601         rm -f conftest CONFTEST
3602         echo test >conftest
3603         if test -f CONFTEST ; then
3604                 cf_cv_mixedcase=no
3605         else
3606                 cf_cv_mixedcase=yes
3607         fi
3608         rm -f conftest CONFTEST
3609 fi
3610
3611 fi
3612 echo "$as_me:3612: result: $cf_cv_mixedcase" >&5
3613 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3614 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3615 #define MIXEDCASE_FILENAMES 1
3616 EOF
3617
3618 else
3619     cf_cv_mixedcase=$enable_mixedcase
3620     if test "$enable_mixedcase" = "yes" ; then
3621         cat >>confdefs.h <<\EOF
3622 #define MIXEDCASE_FILENAMES 1
3623 EOF
3624
3625     fi
3626 fi
3627
3628 # do this after mixed-case option (tags/TAGS is not as important as tic).
3629 echo "$as_me:3629: checking whether ${MAKE-make} sets \${MAKE}" >&5
3630 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3631 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3632 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3633   echo $ECHO_N "(cached) $ECHO_C" >&6
3634 else
3635   cat >conftest.make <<\EOF
3636 all:
3637         @echo 'ac_maketemp="${MAKE}"'
3638 EOF
3639 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3640 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3641 if test -n "$ac_maketemp"; then
3642   eval ac_cv_prog_make_${ac_make}_set=yes
3643 else
3644   eval ac_cv_prog_make_${ac_make}_set=no
3645 fi
3646 rm -f conftest.make
3647 fi
3648 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3649   echo "$as_me:3649: result: yes" >&5
3650 echo "${ECHO_T}yes" >&6
3651   SET_MAKE=
3652 else
3653   echo "$as_me:3653: result: no" >&5
3654 echo "${ECHO_T}no" >&6
3655   SET_MAKE="MAKE=${MAKE-make}"
3656 fi
3657
3658 for ac_prog in exctags ctags
3659 do
3660   # Extract the first word of "$ac_prog", so it can be a program name with args.
3661 set dummy $ac_prog; ac_word=$2
3662 echo "$as_me:3662: checking for $ac_word" >&5
3663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3664 if test "${ac_cv_prog_CTAGS+set}" = set; then
3665   echo $ECHO_N "(cached) $ECHO_C" >&6
3666 else
3667   if test -n "$CTAGS"; then
3668   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3669 else
3670   ac_save_IFS=$IFS; IFS=$ac_path_separator
3671 ac_dummy="$PATH"
3672 for ac_dir in $ac_dummy; do
3673   IFS=$ac_save_IFS
3674   test -z "$ac_dir" && ac_dir=.
3675   $as_executable_p "$ac_dir/$ac_word" || continue
3676 ac_cv_prog_CTAGS="$ac_prog"
3677 echo "$as_me:3677: found $ac_dir/$ac_word" >&5
3678 break
3679 done
3680
3681 fi
3682 fi
3683 CTAGS=$ac_cv_prog_CTAGS
3684 if test -n "$CTAGS"; then
3685   echo "$as_me:3685: result: $CTAGS" >&5
3686 echo "${ECHO_T}$CTAGS" >&6
3687 else
3688   echo "$as_me:3688: result: no" >&5
3689 echo "${ECHO_T}no" >&6
3690 fi
3691
3692   test -n "$CTAGS" && break
3693 done
3694
3695 for ac_prog in exetags etags
3696 do
3697   # Extract the first word of "$ac_prog", so it can be a program name with args.
3698 set dummy $ac_prog; ac_word=$2
3699 echo "$as_me:3699: checking for $ac_word" >&5
3700 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3701 if test "${ac_cv_prog_ETAGS+set}" = set; then
3702   echo $ECHO_N "(cached) $ECHO_C" >&6
3703 else
3704   if test -n "$ETAGS"; then
3705   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3706 else
3707   ac_save_IFS=$IFS; IFS=$ac_path_separator
3708 ac_dummy="$PATH"
3709 for ac_dir in $ac_dummy; do
3710   IFS=$ac_save_IFS
3711   test -z "$ac_dir" && ac_dir=.
3712   $as_executable_p "$ac_dir/$ac_word" || continue
3713 ac_cv_prog_ETAGS="$ac_prog"
3714 echo "$as_me:3714: found $ac_dir/$ac_word" >&5
3715 break
3716 done
3717
3718 fi
3719 fi
3720 ETAGS=$ac_cv_prog_ETAGS
3721 if test -n "$ETAGS"; then
3722   echo "$as_me:3722: result: $ETAGS" >&5
3723 echo "${ECHO_T}$ETAGS" >&6
3724 else
3725   echo "$as_me:3725: result: no" >&5
3726 echo "${ECHO_T}no" >&6
3727 fi
3728
3729   test -n "$ETAGS" && break
3730 done
3731
3732 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3733 set dummy ${CTAGS-ctags}; ac_word=$2
3734 echo "$as_me:3734: checking for $ac_word" >&5
3735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3736 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3737   echo $ECHO_N "(cached) $ECHO_C" >&6
3738 else
3739   if test -n "$MAKE_LOWER_TAGS"; then
3740   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3741 else
3742   ac_save_IFS=$IFS; IFS=$ac_path_separator
3743 ac_dummy="$PATH"
3744 for ac_dir in $ac_dummy; do
3745   IFS=$ac_save_IFS
3746   test -z "$ac_dir" && ac_dir=.
3747   $as_executable_p "$ac_dir/$ac_word" || continue
3748 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3749 echo "$as_me:3749: found $ac_dir/$ac_word" >&5
3750 break
3751 done
3752
3753   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3754 fi
3755 fi
3756 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3757 if test -n "$MAKE_LOWER_TAGS"; then
3758   echo "$as_me:3758: result: $MAKE_LOWER_TAGS" >&5
3759 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3760 else
3761   echo "$as_me:3761: result: no" >&5
3762 echo "${ECHO_T}no" >&6
3763 fi
3764
3765 if test "$cf_cv_mixedcase" = yes ; then
3766         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3767 set dummy ${ETAGS-etags}; ac_word=$2
3768 echo "$as_me:3768: checking for $ac_word" >&5
3769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3770 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3771   echo $ECHO_N "(cached) $ECHO_C" >&6
3772 else
3773   if test -n "$MAKE_UPPER_TAGS"; then
3774   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3775 else
3776   ac_save_IFS=$IFS; IFS=$ac_path_separator
3777 ac_dummy="$PATH"
3778 for ac_dir in $ac_dummy; do
3779   IFS=$ac_save_IFS
3780   test -z "$ac_dir" && ac_dir=.
3781   $as_executable_p "$ac_dir/$ac_word" || continue
3782 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3783 echo "$as_me:3783: found $ac_dir/$ac_word" >&5
3784 break
3785 done
3786
3787   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3788 fi
3789 fi
3790 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3791 if test -n "$MAKE_UPPER_TAGS"; then
3792   echo "$as_me:3792: result: $MAKE_UPPER_TAGS" >&5
3793 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3794 else
3795   echo "$as_me:3795: result: no" >&5
3796 echo "${ECHO_T}no" >&6
3797 fi
3798
3799 else
3800         MAKE_UPPER_TAGS=no
3801 fi
3802
3803 if test "$MAKE_UPPER_TAGS" = yes ; then
3804         MAKE_UPPER_TAGS=
3805 else
3806         MAKE_UPPER_TAGS="#"
3807 fi
3808
3809 if test "$MAKE_LOWER_TAGS" = yes ; then
3810         MAKE_LOWER_TAGS=
3811 else
3812         MAKE_LOWER_TAGS="#"
3813 fi
3814
3815 echo "$as_me:3815: checking for makeflags variable" >&5
3816 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3817 if test "${cf_cv_makeflags+set}" = set; then
3818   echo $ECHO_N "(cached) $ECHO_C" >&6
3819 else
3820
3821         cf_cv_makeflags=''
3822         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3823         do
3824                 cat >cf_makeflags.tmp <<CF_EOF
3825 SHELL = /bin/sh
3826 all :
3827         @ echo '.$cf_option'
3828 CF_EOF
3829                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3830                 case "$cf_result" in
3831                 .*k)
3832                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3833                         case "$cf_result" in
3834                         .*CC=*) cf_cv_makeflags=
3835                                 ;;
3836                         *)      cf_cv_makeflags=$cf_option
3837                                 ;;
3838                         esac
3839                         break
3840                         ;;
3841                 .-)     ;;
3842                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3843                         ;;
3844                 esac
3845         done
3846         rm -f cf_makeflags.tmp
3847
3848 fi
3849 echo "$as_me:3849: result: $cf_cv_makeflags" >&5
3850 echo "${ECHO_T}$cf_cv_makeflags" >&6
3851
3852 if test -n "$ac_tool_prefix"; then
3853   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3854 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3855 echo "$as_me:3855: checking for $ac_word" >&5
3856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3857 if test "${ac_cv_prog_RANLIB+set}" = set; then
3858   echo $ECHO_N "(cached) $ECHO_C" >&6
3859 else
3860   if test -n "$RANLIB"; then
3861   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3862 else
3863   ac_save_IFS=$IFS; IFS=$ac_path_separator
3864 ac_dummy="$PATH"
3865 for ac_dir in $ac_dummy; do
3866   IFS=$ac_save_IFS
3867   test -z "$ac_dir" && ac_dir=.
3868   $as_executable_p "$ac_dir/$ac_word" || continue
3869 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3870 echo "$as_me:3870: found $ac_dir/$ac_word" >&5
3871 break
3872 done
3873
3874 fi
3875 fi
3876 RANLIB=$ac_cv_prog_RANLIB
3877 if test -n "$RANLIB"; then
3878   echo "$as_me:3878: result: $RANLIB" >&5
3879 echo "${ECHO_T}$RANLIB" >&6
3880 else
3881   echo "$as_me:3881: result: no" >&5
3882 echo "${ECHO_T}no" >&6
3883 fi
3884
3885 fi
3886 if test -z "$ac_cv_prog_RANLIB"; then
3887   ac_ct_RANLIB=$RANLIB
3888   # Extract the first word of "ranlib", so it can be a program name with args.
3889 set dummy ranlib; ac_word=$2
3890 echo "$as_me:3890: checking for $ac_word" >&5
3891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3892 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3893   echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895   if test -n "$ac_ct_RANLIB"; then
3896   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3897 else
3898   ac_save_IFS=$IFS; IFS=$ac_path_separator
3899 ac_dummy="$PATH"
3900 for ac_dir in $ac_dummy; do
3901   IFS=$ac_save_IFS
3902   test -z "$ac_dir" && ac_dir=.
3903   $as_executable_p "$ac_dir/$ac_word" || continue
3904 ac_cv_prog_ac_ct_RANLIB="ranlib"
3905 echo "$as_me:3905: found $ac_dir/$ac_word" >&5
3906 break
3907 done
3908
3909   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3910 fi
3911 fi
3912 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3913 if test -n "$ac_ct_RANLIB"; then
3914   echo "$as_me:3914: result: $ac_ct_RANLIB" >&5
3915 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3916 else
3917   echo "$as_me:3917: result: no" >&5
3918 echo "${ECHO_T}no" >&6
3919 fi
3920
3921   RANLIB=$ac_ct_RANLIB
3922 else
3923   RANLIB="$ac_cv_prog_RANLIB"
3924 fi
3925
3926 if test -n "$ac_tool_prefix"; then
3927   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3928 set dummy ${ac_tool_prefix}ld; ac_word=$2
3929 echo "$as_me:3929: checking for $ac_word" >&5
3930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3931 if test "${ac_cv_prog_LD+set}" = set; then
3932   echo $ECHO_N "(cached) $ECHO_C" >&6
3933 else
3934   if test -n "$LD"; then
3935   ac_cv_prog_LD="$LD" # Let the user override the test.
3936 else
3937   ac_save_IFS=$IFS; IFS=$ac_path_separator
3938 ac_dummy="$PATH"
3939 for ac_dir in $ac_dummy; do
3940   IFS=$ac_save_IFS
3941   test -z "$ac_dir" && ac_dir=.
3942   $as_executable_p "$ac_dir/$ac_word" || continue
3943 ac_cv_prog_LD="${ac_tool_prefix}ld"
3944 echo "$as_me:3944: found $ac_dir/$ac_word" >&5
3945 break
3946 done
3947
3948 fi
3949 fi
3950 LD=$ac_cv_prog_LD
3951 if test -n "$LD"; then
3952   echo "$as_me:3952: result: $LD" >&5
3953 echo "${ECHO_T}$LD" >&6
3954 else
3955   echo "$as_me:3955: result: no" >&5
3956 echo "${ECHO_T}no" >&6
3957 fi
3958
3959 fi
3960 if test -z "$ac_cv_prog_LD"; then
3961   ac_ct_LD=$LD
3962   # Extract the first word of "ld", so it can be a program name with args.
3963 set dummy ld; ac_word=$2
3964 echo "$as_me:3964: checking for $ac_word" >&5
3965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3966 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3967   echo $ECHO_N "(cached) $ECHO_C" >&6
3968 else
3969   if test -n "$ac_ct_LD"; then
3970   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3971 else
3972   ac_save_IFS=$IFS; IFS=$ac_path_separator
3973 ac_dummy="$PATH"
3974 for ac_dir in $ac_dummy; do
3975   IFS=$ac_save_IFS
3976   test -z "$ac_dir" && ac_dir=.
3977   $as_executable_p "$ac_dir/$ac_word" || continue
3978 ac_cv_prog_ac_ct_LD="ld"
3979 echo "$as_me:3979: found $ac_dir/$ac_word" >&5
3980 break
3981 done
3982
3983   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3984 fi
3985 fi
3986 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3987 if test -n "$ac_ct_LD"; then
3988   echo "$as_me:3988: result: $ac_ct_LD" >&5
3989 echo "${ECHO_T}$ac_ct_LD" >&6
3990 else
3991   echo "$as_me:3991: result: no" >&5
3992 echo "${ECHO_T}no" >&6
3993 fi
3994
3995   LD=$ac_ct_LD
3996 else
3997   LD="$ac_cv_prog_LD"
3998 fi
3999
4000 if test -n "$ac_tool_prefix"; then
4001   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4002 set dummy ${ac_tool_prefix}ar; ac_word=$2
4003 echo "$as_me:4003: checking for $ac_word" >&5
4004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4005 if test "${ac_cv_prog_AR+set}" = set; then
4006   echo $ECHO_N "(cached) $ECHO_C" >&6
4007 else
4008   if test -n "$AR"; then
4009   ac_cv_prog_AR="$AR" # Let the user override the test.
4010 else
4011   ac_save_IFS=$IFS; IFS=$ac_path_separator
4012 ac_dummy="$PATH"
4013 for ac_dir in $ac_dummy; do
4014   IFS=$ac_save_IFS
4015   test -z "$ac_dir" && ac_dir=.
4016   $as_executable_p "$ac_dir/$ac_word" || continue
4017 ac_cv_prog_AR="${ac_tool_prefix}ar"
4018 echo "$as_me:4018: found $ac_dir/$ac_word" >&5
4019 break
4020 done
4021
4022 fi
4023 fi
4024 AR=$ac_cv_prog_AR
4025 if test -n "$AR"; then
4026   echo "$as_me:4026: result: $AR" >&5
4027 echo "${ECHO_T}$AR" >&6
4028 else
4029   echo "$as_me:4029: result: no" >&5
4030 echo "${ECHO_T}no" >&6
4031 fi
4032
4033 fi
4034 if test -z "$ac_cv_prog_AR"; then
4035   ac_ct_AR=$AR
4036   # Extract the first word of "ar", so it can be a program name with args.
4037 set dummy ar; ac_word=$2
4038 echo "$as_me:4038: checking for $ac_word" >&5
4039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4040 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4041   echo $ECHO_N "(cached) $ECHO_C" >&6
4042 else
4043   if test -n "$ac_ct_AR"; then
4044   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4045 else
4046   ac_save_IFS=$IFS; IFS=$ac_path_separator
4047 ac_dummy="$PATH"
4048 for ac_dir in $ac_dummy; do
4049   IFS=$ac_save_IFS
4050   test -z "$ac_dir" && ac_dir=.
4051   $as_executable_p "$ac_dir/$ac_word" || continue
4052 ac_cv_prog_ac_ct_AR="ar"
4053 echo "$as_me:4053: found $ac_dir/$ac_word" >&5
4054 break
4055 done
4056
4057   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4058 fi
4059 fi
4060 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4061 if test -n "$ac_ct_AR"; then
4062   echo "$as_me:4062: result: $ac_ct_AR" >&5
4063 echo "${ECHO_T}$ac_ct_AR" >&6
4064 else
4065   echo "$as_me:4065: result: no" >&5
4066 echo "${ECHO_T}no" >&6
4067 fi
4068
4069   AR=$ac_ct_AR
4070 else
4071   AR="$ac_cv_prog_AR"
4072 fi
4073
4074 if test -n "$ac_tool_prefix"; then
4075   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4076 set dummy ${ac_tool_prefix}ar; ac_word=$2
4077 echo "$as_me:4077: checking for $ac_word" >&5
4078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4079 if test "${ac_cv_prog_AR+set}" = set; then
4080   echo $ECHO_N "(cached) $ECHO_C" >&6
4081 else
4082   if test -n "$AR"; then
4083   ac_cv_prog_AR="$AR" # Let the user override the test.
4084 else
4085   ac_save_IFS=$IFS; IFS=$ac_path_separator
4086 ac_dummy="$PATH"
4087 for ac_dir in $ac_dummy; do
4088   IFS=$ac_save_IFS
4089   test -z "$ac_dir" && ac_dir=.
4090   $as_executable_p "$ac_dir/$ac_word" || continue
4091 ac_cv_prog_AR="${ac_tool_prefix}ar"
4092 echo "$as_me:4092: found $ac_dir/$ac_word" >&5
4093 break
4094 done
4095
4096 fi
4097 fi
4098 AR=$ac_cv_prog_AR
4099 if test -n "$AR"; then
4100   echo "$as_me:4100: result: $AR" >&5
4101 echo "${ECHO_T}$AR" >&6
4102 else
4103   echo "$as_me:4103: result: no" >&5
4104 echo "${ECHO_T}no" >&6
4105 fi
4106
4107 fi
4108 if test -z "$ac_cv_prog_AR"; then
4109   ac_ct_AR=$AR
4110   # Extract the first word of "ar", so it can be a program name with args.
4111 set dummy ar; ac_word=$2
4112 echo "$as_me:4112: checking for $ac_word" >&5
4113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4114 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   if test -n "$ac_ct_AR"; then
4118   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4119 else
4120   ac_save_IFS=$IFS; IFS=$ac_path_separator
4121 ac_dummy="$PATH"
4122 for ac_dir in $ac_dummy; do
4123   IFS=$ac_save_IFS
4124   test -z "$ac_dir" && ac_dir=.
4125   $as_executable_p "$ac_dir/$ac_word" || continue
4126 ac_cv_prog_ac_ct_AR="ar"
4127 echo "$as_me:4127: found $ac_dir/$ac_word" >&5
4128 break
4129 done
4130
4131   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4132 fi
4133 fi
4134 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4135 if test -n "$ac_ct_AR"; then
4136   echo "$as_me:4136: result: $ac_ct_AR" >&5
4137 echo "${ECHO_T}$ac_ct_AR" >&6
4138 else
4139   echo "$as_me:4139: result: no" >&5
4140 echo "${ECHO_T}no" >&6
4141 fi
4142
4143   AR=$ac_ct_AR
4144 else
4145   AR="$ac_cv_prog_AR"
4146 fi
4147
4148 echo "$as_me:4148: checking for options to update archives" >&5
4149 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4150 if test "${cf_cv_ar_flags+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153
4154         cf_cv_ar_flags=unknown
4155         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4156         do
4157                 rm -f conftest.$ac_cv_objext
4158                 rm -f conftest.a
4159
4160                 cat >conftest.$ac_ext <<EOF
4161 #line 4161 "configure"
4162 int     testdata[3] = { 123, 456, 789 };
4163 EOF
4164                 if { (eval echo "$as_me:4164: \"$ac_compile\"") >&5
4165   (eval $ac_compile) 2>&5
4166   ac_status=$?
4167   echo "$as_me:4167: \$? = $ac_status" >&5
4168   (exit $ac_status); } ; then
4169                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4170                         if test -f conftest.a ; then
4171                                 cf_cv_ar_flags=$cf_ar_flags
4172                                 break
4173                         fi
4174                 else
4175                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4176
4177 echo "${as_me-configure}:4177: testing cannot compile test-program ..." 1>&5
4178
4179                         break
4180                 fi
4181         done
4182         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4183
4184 fi
4185 echo "$as_me:4185: result: $cf_cv_ar_flags" >&5
4186 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4187 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4188 ARFLAGS=$cf_cv_ar_flags
4189
4190 echo "$as_me:4190: checking if you have specified an install-prefix" >&5
4191 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4192
4193 # Check whether --with-install-prefix or --without-install-prefix was given.
4194 if test "${with_install_prefix+set}" = set; then
4195   withval="$with_install_prefix"
4196   case "$withval" in #(vi
4197         yes|no) #(vi
4198                 ;;
4199         *)      DESTDIR="$withval"
4200                 ;;
4201         esac
4202 fi;
4203 echo "$as_me:4203: result: $DESTDIR" >&5
4204 echo "${ECHO_T}$DESTDIR" >&6
4205
4206 ###############################################################################
4207
4208 # If we're cross-compiling, allow the user to override the tools and their
4209 # options.  The configure script is oriented toward identifying the host
4210 # compiler, etc., but we need a build compiler to generate parts of the source.
4211
4212 if test "$cross_compiling" = yes ; then
4213
4214         # defaults that we might want to override
4215         : ${BUILD_CFLAGS:=''}
4216         : ${BUILD_CPPFLAGS:=''}
4217         : ${BUILD_LDFLAGS:=''}
4218         : ${BUILD_LIBS:=''}
4219         : ${BUILD_EXEEXT:='$x'}
4220         : ${BUILD_OBJEXT:='o'}
4221
4222 # Check whether --with-build-cc or --without-build-cc was given.
4223 if test "${with_build_cc+set}" = set; then
4224   withval="$with_build_cc"
4225   BUILD_CC="$withval"
4226 else
4227   for ac_prog in gcc cc cl
4228 do
4229   # Extract the first word of "$ac_prog", so it can be a program name with args.
4230 set dummy $ac_prog; ac_word=$2
4231 echo "$as_me:4231: checking for $ac_word" >&5
4232 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4233 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4234   echo $ECHO_N "(cached) $ECHO_C" >&6
4235 else
4236   if test -n "$BUILD_CC"; then
4237   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4238 else
4239   ac_save_IFS=$IFS; IFS=$ac_path_separator
4240 ac_dummy="$PATH"
4241 for ac_dir in $ac_dummy; do
4242   IFS=$ac_save_IFS
4243   test -z "$ac_dir" && ac_dir=.
4244   $as_executable_p "$ac_dir/$ac_word" || continue
4245 ac_cv_prog_BUILD_CC="$ac_prog"
4246 echo "$as_me:4246: found $ac_dir/$ac_word" >&5
4247 break
4248 done
4249
4250 fi
4251 fi
4252 BUILD_CC=$ac_cv_prog_BUILD_CC
4253 if test -n "$BUILD_CC"; then
4254   echo "$as_me:4254: result: $BUILD_CC" >&5
4255 echo "${ECHO_T}$BUILD_CC" >&6
4256 else
4257   echo "$as_me:4257: result: no" >&5
4258 echo "${ECHO_T}no" >&6
4259 fi
4260
4261   test -n "$BUILD_CC" && break
4262 done
4263
4264 fi;
4265         echo "$as_me:4265: checking for native build C compiler" >&5
4266 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4267         echo "$as_me:4267: result: $BUILD_CC" >&5
4268 echo "${ECHO_T}$BUILD_CC" >&6
4269
4270         echo "$as_me:4270: checking for native build C preprocessor" >&5
4271 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4272
4273 # Check whether --with-build-cpp or --without-build-cpp was given.
4274 if test "${with_build_cpp+set}" = set; then
4275   withval="$with_build_cpp"
4276   BUILD_CPP="$withval"
4277 else
4278   BUILD_CPP='${BUILD_CC} -E'
4279 fi;
4280         echo "$as_me:4280: result: $BUILD_CPP" >&5
4281 echo "${ECHO_T}$BUILD_CPP" >&6
4282
4283         echo "$as_me:4283: checking for native build C flags" >&5
4284 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4285
4286 # Check whether --with-build-cflags or --without-build-cflags was given.
4287 if test "${with_build_cflags+set}" = set; then
4288   withval="$with_build_cflags"
4289   BUILD_CFLAGS="$withval"
4290 fi;
4291         echo "$as_me:4291: result: $BUILD_CFLAGS" >&5
4292 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4293
4294         echo "$as_me:4294: checking for native build C preprocessor-flags" >&5
4295 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4296
4297 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4298 if test "${with_build_cppflags+set}" = set; then
4299   withval="$with_build_cppflags"
4300   BUILD_CPPFLAGS="$withval"
4301 fi;
4302         echo "$as_me:4302: result: $BUILD_CPPFLAGS" >&5
4303 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4304
4305         echo "$as_me:4305: checking for native build linker-flags" >&5
4306 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4307
4308 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4309 if test "${with_build_ldflags+set}" = set; then
4310   withval="$with_build_ldflags"
4311   BUILD_LDFLAGS="$withval"
4312 fi;
4313         echo "$as_me:4313: result: $BUILD_LDFLAGS" >&5
4314 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4315
4316         echo "$as_me:4316: checking for native build linker-libraries" >&5
4317 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4318
4319 # Check whether --with-build-libs or --without-build-libs was given.
4320 if test "${with_build_libs+set}" = set; then
4321   withval="$with_build_libs"
4322   BUILD_LIBS="$withval"
4323 fi;
4324         echo "$as_me:4324: result: $BUILD_LIBS" >&5
4325 echo "${ECHO_T}$BUILD_LIBS" >&6
4326
4327         # this assumes we're on Unix.
4328         BUILD_EXEEXT=
4329         BUILD_OBJEXT=o
4330
4331         : ${BUILD_CC:='${CC}'}
4332
4333         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4334                 { { echo "$as_me:4334: error: Cross-build requires two compilers.
4335 Use --with-build-cc to specify the native compiler." >&5
4336 echo "$as_me: error: Cross-build requires two compilers.
4337 Use --with-build-cc to specify the native compiler." >&2;}
4338    { (exit 1); exit 1; }; }
4339         fi
4340
4341 else
4342         : ${BUILD_CC:='${CC}'}
4343         : ${BUILD_CPP:='${CPP}'}
4344         : ${BUILD_CFLAGS:='${CFLAGS}'}
4345         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4346         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4347         : ${BUILD_LIBS:='${LIBS}'}
4348         : ${BUILD_EXEEXT:='$x'}
4349         : ${BUILD_OBJEXT:='o'}
4350 fi
4351
4352 ###############################################################################
4353
4354 ### Options to allow the user to specify the set of libraries which are used.
4355 ### Use "--without-normal --with-shared" to allow the default model to be
4356 ### shared, for example.
4357 cf_list_models=""
4358
4359 echo "$as_me:4359: checking if libtool -version-number should be used" >&5
4360 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4361
4362 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4363 if test "${enable_libtool_version+set}" = set; then
4364   enableval="$enable_libtool_version"
4365   test "$enableval" != no && enableval=yes
4366   if test "$enableval" != "yes" ; then
4367     cf_libtool_version=no
4368   else
4369     cf_libtool_version=yes
4370   fi
4371 else
4372   enableval=yes
4373   cf_libtool_version=yes
4374
4375 fi;
4376 echo "$as_me:4376: result: $cf_libtool_version" >&5
4377 echo "${ECHO_T}$cf_libtool_version" >&6
4378
4379 if test "$cf_libtool_version" = yes ; then
4380         LIBTOOL_VERSION="-version-number"
4381 else
4382         LIBTOOL_VERSION="-version-info"
4383 fi
4384
4385 LIBTOOL=
4386
4387 # common library maintenance symbols that are convenient for libtool scripts:
4388 LIB_CREATE='${AR} -cr'
4389 LIB_OBJECT='${OBJECTS}'
4390 LIB_SUFFIX=.a
4391 LIB_PREP="$RANLIB"
4392
4393 # symbols used to prop libtool up to enable it to determine what it should be
4394 # doing:
4395 LIB_CLEAN=
4396 LIB_COMPILE=
4397 LIB_LINK='${CC}'
4398 LIB_INSTALL=
4399 LIB_UNINSTALL=
4400
4401 echo "$as_me:4401: checking if you want to build libraries with libtool" >&5
4402 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4403
4404 # Check whether --with-libtool or --without-libtool was given.
4405 if test "${with_libtool+set}" = set; then
4406   withval="$with_libtool"
4407   with_libtool=$withval
4408 else
4409   with_libtool=no
4410 fi;
4411 echo "$as_me:4411: result: $with_libtool" >&5
4412 echo "${ECHO_T}$with_libtool" >&6
4413 if test "$with_libtool" != "no"; then
4414
4415         if test "$with_libtool" != "yes" ; then
4416
4417 if test "x$prefix" != xNONE; then
4418   cf_path_syntax="$prefix"
4419 else
4420   cf_path_syntax="$ac_default_prefix"
4421 fi
4422
4423 case ".$with_libtool" in #(vi
4424 .\$\(*\)*|.\'*\'*) #(vi
4425   ;;
4426 ..|./*|.\\*) #(vi
4427   ;;
4428 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4429   ;;
4430 .\${*prefix}*) #(vi
4431   eval with_libtool="$with_libtool"
4432   case ".$with_libtool" in #(vi
4433   .NONE/*)
4434     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4435     ;;
4436   esac
4437   ;; #(vi
4438 .no|.NONE/*)
4439   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4440   ;;
4441 *)
4442   { { echo "$as_me:4442: error: expected a pathname, not \"$with_libtool\"" >&5
4443 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4444    { (exit 1); exit 1; }; }
4445   ;;
4446 esac
4447
4448                 LIBTOOL=$with_libtool
4449         else
4450                 # Extract the first word of "libtool", so it can be a program name with args.
4451 set dummy libtool; ac_word=$2
4452 echo "$as_me:4452: checking for $ac_word" >&5
4453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4454 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   case $LIBTOOL in
4458   [\\/]* | ?:[\\/]*)
4459   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4460   ;;
4461   *)
4462   ac_save_IFS=$IFS; IFS=$ac_path_separator
4463 ac_dummy="$PATH"
4464 for ac_dir in $ac_dummy; do
4465   IFS=$ac_save_IFS
4466   test -z "$ac_dir" && ac_dir=.
4467   if $as_executable_p "$ac_dir/$ac_word"; then
4468    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4469    echo "$as_me:4469: found $ac_dir/$ac_word" >&5
4470    break
4471 fi
4472 done
4473
4474   ;;
4475 esac
4476 fi
4477 LIBTOOL=$ac_cv_path_LIBTOOL
4478
4479 if test -n "$LIBTOOL"; then
4480   echo "$as_me:4480: result: $LIBTOOL" >&5
4481 echo "${ECHO_T}$LIBTOOL" >&6
4482 else
4483   echo "$as_me:4483: result: no" >&5
4484 echo "${ECHO_T}no" >&6
4485 fi
4486
4487         fi
4488         if test -z "$LIBTOOL" ; then
4489                 { { echo "$as_me:4489: error: Cannot find libtool" >&5
4490 echo "$as_me: error: Cannot find libtool" >&2;}
4491    { (exit 1); exit 1; }; }
4492         fi
4493         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4494         LIB_OBJECT='${OBJECTS:.o=.lo}'
4495         LIB_SUFFIX=.la
4496         LIB_CLEAN='${LIBTOOL} --mode=clean'
4497         LIB_COMPILE='${LIBTOOL} --mode=compile'
4498         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4499         LIB_INSTALL='${LIBTOOL} --mode=install'
4500         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4501         LIB_PREP=:
4502
4503         # Show the version of libtool
4504         echo "$as_me:4504: checking version of libtool" >&5
4505 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4506
4507         # Save the version in a cache variable - this is not entirely a good
4508         # thing, but the version string from libtool is very ugly, and for
4509         # bug reports it might be useful to have the original string. "("
4510         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.].*//'`
4511         echo "$as_me:4511: result: $cf_cv_libtool_version" >&5
4512 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4513         if test -z "$cf_cv_libtool_version" ; then
4514                 { { echo "$as_me:4514: error: This is not GNU libtool" >&5
4515 echo "$as_me: error: This is not GNU libtool" >&2;}
4516    { (exit 1); exit 1; }; }
4517         fi
4518
4519         # special hack to add -no-undefined (which libtool should do for itself)
4520         LT_UNDEF=
4521         case "$cf_cv_system_name" in #(vi
4522         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4523                 LT_UNDEF=-no-undefined
4524                 ;;
4525         esac
4526
4527         # special hack to add --tag option for C++ compiler
4528         case $cf_cv_libtool_version in #(vi
4529         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4530                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4531                 LIBTOOL="$LIBTOOL --tag=CC"
4532                 ;;
4533         *)
4534                 LIBTOOL_CXX="$LIBTOOL"
4535                 ;;
4536         esac
4537 else
4538         LIBTOOL=""
4539         LIBTOOL_CXX=""
4540 fi
4541
4542 test -z "$LIBTOOL" && ECHO_LT=
4543
4544 if test "$with_libtool" != "no" ; then
4545
4546 cf_list_models="$cf_list_models libtool"
4547
4548 else
4549
4550 echo "$as_me:4550: checking if you want to build shared libraries" >&5
4551 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4552
4553 # Check whether --with-shared or --without-shared was given.
4554 if test "${with_shared+set}" = set; then
4555   withval="$with_shared"
4556   with_shared=$withval
4557 else
4558   with_shared=no
4559 fi;
4560 echo "$as_me:4560: result: $with_shared" >&5
4561 echo "${ECHO_T}$with_shared" >&6
4562 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4563
4564 echo "$as_me:4564: checking if you want to build static libraries" >&5
4565 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4566
4567 # Check whether --with-normal or --without-normal was given.
4568 if test "${with_normal+set}" = set; then
4569   withval="$with_normal"
4570   with_normal=$withval
4571 else
4572   with_normal=yes
4573 fi;
4574 echo "$as_me:4574: result: $with_normal" >&5
4575 echo "${ECHO_T}$with_normal" >&6
4576 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4577
4578 echo "$as_me:4578: checking if you want to build debug libraries" >&5
4579 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4580
4581 # Check whether --with-debug or --without-debug was given.
4582 if test "${with_debug+set}" = set; then
4583   withval="$with_debug"
4584   with_debug=$withval
4585 else
4586   with_debug=yes
4587 fi;
4588 echo "$as_me:4588: result: $with_debug" >&5
4589 echo "${ECHO_T}$with_debug" >&6
4590 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4591
4592 echo "$as_me:4592: checking if you want to build profiling libraries" >&5
4593 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4594
4595 # Check whether --with-profile or --without-profile was given.
4596 if test "${with_profile+set}" = set; then
4597   withval="$with_profile"
4598   with_profile=$withval
4599 else
4600   with_profile=no
4601 fi;
4602 echo "$as_me:4602: result: $with_profile" >&5
4603 echo "${ECHO_T}$with_profile" >&6
4604 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4605
4606 fi
4607
4608 ###############################################################################
4609
4610 echo "$as_me:4610: checking for specified models" >&5
4611 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4612 test -z "$cf_list_models" && cf_list_models=normal
4613 test "$with_libtool" != "no" && cf_list_models=libtool
4614 echo "$as_me:4614: result: $cf_list_models" >&5
4615 echo "${ECHO_T}$cf_list_models" >&6
4616
4617 ### Use the first model as the default, and save its suffix for use in building
4618 ### up test-applications.
4619 echo "$as_me:4619: checking for default model" >&5
4620 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4621 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4622 echo "$as_me:4622: result: $DFT_LWR_MODEL" >&5
4623 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4624
4625 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4626
4627 TICS_NAME=tic
4628
4629 TINFO_NAME=tinfo
4630
4631 LIB_NAME=ncurses
4632
4633 LIB_DIR=../lib
4634 LIB_2ND=../../lib
4635
4636         case $cf_cv_system_name in #(vi
4637         OS/2*|os2*) #(vi
4638         LIB_PREFIX=''
4639         ;;
4640         *)      LIB_PREFIX='lib'
4641         ;;
4642         esac
4643 cf_prefix=$LIB_PREFIX
4644
4645 LIB_PREFIX=$cf_prefix
4646
4647 LIB_SUFFIX=
4648
4649 ###############################################################################
4650
4651 echo "$as_me:4651: checking if you want to build a separate terminfo library" >&5
4652 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4653
4654 # Check whether --with-termlib or --without-termlib was given.
4655 if test "${with_termlib+set}" = set; then
4656   withval="$with_termlib"
4657   with_termlib=$withval
4658 else
4659   with_termlib=no
4660 fi;
4661 echo "$as_me:4661: result: $with_termlib" >&5
4662 echo "${ECHO_T}$with_termlib" >&6
4663
4664 echo "$as_me:4664: checking if you want to build a separate tic library" >&5
4665 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4666
4667 # Check whether --with-ticlib or --without-ticlib was given.
4668 if test "${with_ticlib+set}" = set; then
4669   withval="$with_ticlib"
4670   with_ticlib=$withval
4671 else
4672   with_ticlib=no
4673 fi;
4674 echo "$as_me:4674: result: $with_ticlib" >&5
4675 echo "${ECHO_T}$with_ticlib" >&6
4676
4677 ### Checks for special libraries, must be done up-front.
4678 SHLIB_LIST=""
4679
4680 echo "$as_me:4680: checking if you want to link with the GPM mouse library" >&5
4681 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4682
4683 # Check whether --with-gpm or --without-gpm was given.
4684 if test "${with_gpm+set}" = set; then
4685   withval="$with_gpm"
4686   with_gpm=$withval
4687 else
4688   with_gpm=maybe
4689 fi;
4690 echo "$as_me:4690: result: $with_gpm" >&5
4691 echo "${ECHO_T}$with_gpm" >&6
4692
4693 if test "$with_gpm" != no ; then
4694         echo "$as_me:4694: checking for gpm.h" >&5
4695 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4696 if test "${ac_cv_header_gpm_h+set}" = set; then
4697   echo $ECHO_N "(cached) $ECHO_C" >&6
4698 else
4699   cat >conftest.$ac_ext <<_ACEOF
4700 #line 4700 "configure"
4701 #include "confdefs.h"
4702 #include <gpm.h>
4703 _ACEOF
4704 if { (eval echo "$as_me:4704: \"$ac_cpp conftest.$ac_ext\"") >&5
4705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4706   ac_status=$?
4707   egrep -v '^ *\+' conftest.er1 >conftest.err
4708   rm -f conftest.er1
4709   cat conftest.err >&5
4710   echo "$as_me:4710: \$? = $ac_status" >&5
4711   (exit $ac_status); } >/dev/null; then
4712   if test -s conftest.err; then
4713     ac_cpp_err=$ac_c_preproc_warn_flag
4714   else
4715     ac_cpp_err=
4716   fi
4717 else
4718   ac_cpp_err=yes
4719 fi
4720 if test -z "$ac_cpp_err"; then
4721   ac_cv_header_gpm_h=yes
4722 else
4723   echo "$as_me: failed program was:" >&5
4724   cat conftest.$ac_ext >&5
4725   ac_cv_header_gpm_h=no
4726 fi
4727 rm -f conftest.err conftest.$ac_ext
4728 fi
4729 echo "$as_me:4729: result: $ac_cv_header_gpm_h" >&5
4730 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4731 if test $ac_cv_header_gpm_h = yes; then
4732
4733                 cat >>confdefs.h <<\EOF
4734 #define HAVE_GPM_H 1
4735 EOF
4736
4737                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4738                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4739
4740 echo "${as_me-configure}:4740: testing assuming we really have GPM library ..." 1>&5
4741
4742                         cat >>confdefs.h <<\EOF
4743 #define HAVE_LIBGPM 1
4744 EOF
4745
4746                 else
4747                         echo "$as_me:4747: checking for Gpm_Open in -lgpm" >&5
4748 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4749 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4750   echo $ECHO_N "(cached) $ECHO_C" >&6
4751 else
4752   ac_check_lib_save_LIBS=$LIBS
4753 LIBS="-lgpm  $LIBS"
4754 cat >conftest.$ac_ext <<_ACEOF
4755 #line 4755 "configure"
4756 #include "confdefs.h"
4757
4758 /* Override any gcc2 internal prototype to avoid an error.  */
4759 #ifdef __cplusplus
4760 extern "C"
4761 #endif
4762 /* We use char because int might match the return type of a gcc2
4763    builtin and then its argument prototype would still apply.  */
4764 char Gpm_Open ();
4765 int
4766 main ()
4767 {
4768 Gpm_Open ();
4769   ;
4770   return 0;
4771 }
4772 _ACEOF
4773 rm -f conftest.$ac_objext conftest$ac_exeext
4774 if { (eval echo "$as_me:4774: \"$ac_link\"") >&5
4775   (eval $ac_link) 2>&5
4776   ac_status=$?
4777   echo "$as_me:4777: \$? = $ac_status" >&5
4778   (exit $ac_status); } &&
4779          { ac_try='test -s conftest$ac_exeext'
4780   { (eval echo "$as_me:4780: \"$ac_try\"") >&5
4781   (eval $ac_try) 2>&5
4782   ac_status=$?
4783   echo "$as_me:4783: \$? = $ac_status" >&5
4784   (exit $ac_status); }; }; then
4785   ac_cv_lib_gpm_Gpm_Open=yes
4786 else
4787   echo "$as_me: failed program was:" >&5
4788 cat conftest.$ac_ext >&5
4789 ac_cv_lib_gpm_Gpm_Open=no
4790 fi
4791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4792 LIBS=$ac_check_lib_save_LIBS
4793 fi
4794 echo "$as_me:4794: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4795 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4796 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4797   :
4798 else
4799
4800                                 { { echo "$as_me:4800: error: Cannot link with GPM library" >&5
4801 echo "$as_me: error: Cannot link with GPM library" >&2;}
4802    { (exit 1); exit 1; }; }
4803                 fi
4804                 with_gpm=yes
4805
4806 fi
4807
4808 else
4809
4810                 test "$with_gpm" != maybe && { echo "$as_me:4810: WARNING: Cannot find GPM header" >&5
4811 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4812                 with_gpm=no
4813
4814 fi
4815
4816 fi
4817
4818 if test "$with_gpm" != no ; then
4819         echo "$as_me:4819: checking if you want to load GPM dynamically" >&5
4820 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4821
4822 # Check whether --with-dlsym or --without-dlsym was given.
4823 if test "${with_dlsym+set}" = set; then
4824   withval="$with_dlsym"
4825   with_dlsym=$withval
4826 else
4827   with_dlsym=yes
4828 fi;
4829         echo "$as_me:4829: result: $with_dlsym" >&5
4830 echo "${ECHO_T}$with_dlsym" >&6
4831         if test "$with_dlsym" = yes ; then
4832
4833 cf_have_dlsym=no
4834 echo "$as_me:4834: checking for dlsym" >&5
4835 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4836 if test "${ac_cv_func_dlsym+set}" = set; then
4837   echo $ECHO_N "(cached) $ECHO_C" >&6
4838 else
4839   cat >conftest.$ac_ext <<_ACEOF
4840 #line 4840 "configure"
4841 #include "confdefs.h"
4842 /* System header to define __stub macros and hopefully few prototypes,
4843     which can conflict with char dlsym (); below.  */
4844 #include <assert.h>
4845 /* Override any gcc2 internal prototype to avoid an error.  */
4846 #ifdef __cplusplus
4847 extern "C"
4848 #endif
4849 /* We use char because int might match the return type of a gcc2
4850    builtin and then its argument prototype would still apply.  */
4851 char dlsym ();
4852 char (*f) ();
4853
4854 int
4855 main ()
4856 {
4857 /* The GNU C library defines this for functions which it implements
4858     to always fail with ENOSYS.  Some functions are actually named
4859     something starting with __ and the normal name is an alias.  */
4860 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4861 choke me
4862 #else
4863 f = dlsym;
4864 #endif
4865
4866   ;
4867   return 0;
4868 }
4869 _ACEOF
4870 rm -f conftest.$ac_objext conftest$ac_exeext
4871 if { (eval echo "$as_me:4871: \"$ac_link\"") >&5
4872   (eval $ac_link) 2>&5
4873   ac_status=$?
4874   echo "$as_me:4874: \$? = $ac_status" >&5
4875   (exit $ac_status); } &&
4876          { ac_try='test -s conftest$ac_exeext'
4877   { (eval echo "$as_me:4877: \"$ac_try\"") >&5
4878   (eval $ac_try) 2>&5
4879   ac_status=$?
4880   echo "$as_me:4880: \$? = $ac_status" >&5
4881   (exit $ac_status); }; }; then
4882   ac_cv_func_dlsym=yes
4883 else
4884   echo "$as_me: failed program was:" >&5
4885 cat conftest.$ac_ext >&5
4886 ac_cv_func_dlsym=no
4887 fi
4888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4889 fi
4890 echo "$as_me:4890: result: $ac_cv_func_dlsym" >&5
4891 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4892 if test $ac_cv_func_dlsym = yes; then
4893   cf_have_dlsym=yes
4894 else
4895
4896 cf_have_libdl=no
4897 echo "$as_me:4897: checking for dlsym in -ldl" >&5
4898 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4899 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4900   echo $ECHO_N "(cached) $ECHO_C" >&6
4901 else
4902   ac_check_lib_save_LIBS=$LIBS
4903 LIBS="-ldl  $LIBS"
4904 cat >conftest.$ac_ext <<_ACEOF
4905 #line 4905 "configure"
4906 #include "confdefs.h"
4907
4908 /* Override any gcc2 internal prototype to avoid an error.  */
4909 #ifdef __cplusplus
4910 extern "C"
4911 #endif
4912 /* We use char because int might match the return type of a gcc2
4913    builtin and then its argument prototype would still apply.  */
4914 char dlsym ();
4915 int
4916 main ()
4917 {
4918 dlsym ();
4919   ;
4920   return 0;
4921 }
4922 _ACEOF
4923 rm -f conftest.$ac_objext conftest$ac_exeext
4924 if { (eval echo "$as_me:4924: \"$ac_link\"") >&5
4925   (eval $ac_link) 2>&5
4926   ac_status=$?
4927   echo "$as_me:4927: \$? = $ac_status" >&5
4928   (exit $ac_status); } &&
4929          { ac_try='test -s conftest$ac_exeext'
4930   { (eval echo "$as_me:4930: \"$ac_try\"") >&5
4931   (eval $ac_try) 2>&5
4932   ac_status=$?
4933   echo "$as_me:4933: \$? = $ac_status" >&5
4934   (exit $ac_status); }; }; then
4935   ac_cv_lib_dl_dlsym=yes
4936 else
4937   echo "$as_me: failed program was:" >&5
4938 cat conftest.$ac_ext >&5
4939 ac_cv_lib_dl_dlsym=no
4940 fi
4941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4942 LIBS=$ac_check_lib_save_LIBS
4943 fi
4944 echo "$as_me:4944: result: $ac_cv_lib_dl_dlsym" >&5
4945 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4946 if test $ac_cv_lib_dl_dlsym = yes; then
4947
4948         cf_have_dlsym=yes
4949         cf_have_libdl=yes
4950 fi
4951
4952 fi
4953
4954 if test "$cf_have_dlsym" = yes ; then
4955         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4956
4957         echo "$as_me:4957: checking whether able to link to dl*() functions" >&5
4958 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4959         cat >conftest.$ac_ext <<_ACEOF
4960 #line 4960 "configure"
4961 #include "confdefs.h"
4962 #include <dlfcn.h>
4963 int
4964 main ()
4965 {
4966
4967                 void *obj;
4968                 if ((obj = dlopen("filename", 0)) != 0) {
4969                         if (dlsym(obj, "symbolname") == 0) {
4970                         dlclose(obj);
4971                         }
4972                 }
4973   ;
4974   return 0;
4975 }
4976 _ACEOF
4977 rm -f conftest.$ac_objext conftest$ac_exeext
4978 if { (eval echo "$as_me:4978: \"$ac_link\"") >&5
4979   (eval $ac_link) 2>&5
4980   ac_status=$?
4981   echo "$as_me:4981: \$? = $ac_status" >&5
4982   (exit $ac_status); } &&
4983          { ac_try='test -s conftest$ac_exeext'
4984   { (eval echo "$as_me:4984: \"$ac_try\"") >&5
4985   (eval $ac_try) 2>&5
4986   ac_status=$?
4987   echo "$as_me:4987: \$? = $ac_status" >&5
4988   (exit $ac_status); }; }; then
4989
4990                 cat >>confdefs.h <<\EOF
4991 #define HAVE_LIBDL 1
4992 EOF
4993
4994 else
4995   echo "$as_me: failed program was:" >&5
4996 cat conftest.$ac_ext >&5
4997
4998                 { { echo "$as_me:4998: error: Cannot link test program for libdl" >&5
4999 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5000    { (exit 1); exit 1; }; }
5001 fi
5002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5003         echo "$as_me:5003: result: ok" >&5
5004 echo "${ECHO_T}ok" >&6
5005 else
5006         { { echo "$as_me:5006: error: Cannot find dlsym function" >&5
5007 echo "$as_me: error: Cannot find dlsym function" >&2;}
5008    { (exit 1); exit 1; }; }
5009 fi
5010
5011                 if test "$with_gpm" != yes ; then
5012                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5013
5014 echo "${as_me-configure}:5014: testing assuming soname for gpm is $with_gpm ..." 1>&5
5015
5016                         cf_cv_gpm_soname="$with_gpm"
5017                 else
5018
5019 echo "$as_me:5019: checking for soname of gpm library" >&5
5020 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5021 if test "${cf_cv_gpm_soname+set}" = set; then
5022   echo $ECHO_N "(cached) $ECHO_C" >&6
5023 else
5024
5025 cf_cv_gpm_soname=unknown
5026 if test "$cross_compiling" != yes ; then
5027 cat >conftest.$ac_ext <<CF_EOF
5028 #include <gpm.h>
5029 int main()
5030 {
5031 if (Gpm_Open(0,0)) Gpm_Close();
5032         ${cf_cv_main_return:-return}(0);
5033 }
5034 CF_EOF
5035 cf_save_LIBS="$LIBS"
5036         LIBS="-lgpm $LIBS"
5037         if { (eval echo "$as_me:5037: \"$ac_compile\"") >&5
5038   (eval $ac_compile) 2>&5
5039   ac_status=$?
5040   echo "$as_me:5040: \$? = $ac_status" >&5
5041   (exit $ac_status); } ; then
5042                 if { (eval echo "$as_me:5042: \"$ac_link\"") >&5
5043   (eval $ac_link) 2>&5
5044   ac_status=$?
5045   echo "$as_me:5045: \$? = $ac_status" >&5
5046   (exit $ac_status); } ; then
5047                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5048                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5049                 fi
5050         fi
5051 rm -f conftest*
5052 LIBS="$cf_save_LIBS"
5053 fi
5054
5055 fi
5056 echo "$as_me:5056: result: $cf_cv_gpm_soname" >&5
5057 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5058
5059                 fi
5060                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5061 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5062 EOF
5063
5064                 SHLIB_LIST="-ldl $SHLIB_LIST"
5065         else
5066                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5067                 TEST_LIBS="-lgpm $TEST_LIBS"
5068         fi
5069         cat >>confdefs.h <<\EOF
5070 #define HAVE_LIBGPM 1
5071 EOF
5072
5073 echo "$as_me:5073: checking for Gpm_Wgetch in -lgpm" >&5
5074 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5075 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5076   echo $ECHO_N "(cached) $ECHO_C" >&6
5077 else
5078   ac_check_lib_save_LIBS=$LIBS
5079 LIBS="-lgpm  $LIBS"
5080 cat >conftest.$ac_ext <<_ACEOF
5081 #line 5081 "configure"
5082 #include "confdefs.h"
5083
5084 /* Override any gcc2 internal prototype to avoid an error.  */
5085 #ifdef __cplusplus
5086 extern "C"
5087 #endif
5088 /* We use char because int might match the return type of a gcc2
5089    builtin and then its argument prototype would still apply.  */
5090 char Gpm_Wgetch ();
5091 int
5092 main ()
5093 {
5094 Gpm_Wgetch ();
5095   ;
5096   return 0;
5097 }
5098 _ACEOF
5099 rm -f conftest.$ac_objext conftest$ac_exeext
5100 if { (eval echo "$as_me:5100: \"$ac_link\"") >&5
5101   (eval $ac_link) 2>&5
5102   ac_status=$?
5103   echo "$as_me:5103: \$? = $ac_status" >&5
5104   (exit $ac_status); } &&
5105          { ac_try='test -s conftest$ac_exeext'
5106   { (eval echo "$as_me:5106: \"$ac_try\"") >&5
5107   (eval $ac_try) 2>&5
5108   ac_status=$?
5109   echo "$as_me:5109: \$? = $ac_status" >&5
5110   (exit $ac_status); }; }; then
5111   ac_cv_lib_gpm_Gpm_Wgetch=yes
5112 else
5113   echo "$as_me: failed program was:" >&5
5114 cat conftest.$ac_ext >&5
5115 ac_cv_lib_gpm_Gpm_Wgetch=no
5116 fi
5117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5118 LIBS=$ac_check_lib_save_LIBS
5119 fi
5120 echo "$as_me:5120: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5121 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5122 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5123
5124 echo "$as_me:5124: checking if GPM is weakly bound to curses library" >&5
5125 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5126 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5127   echo $ECHO_N "(cached) $ECHO_C" >&6
5128 else
5129
5130 cf_cv_check_gpm_wgetch=unknown
5131 if test "$cross_compiling" != yes ; then
5132
5133 cat >conftest.$ac_ext <<CF_EOF
5134 #include <gpm.h>
5135 int main()
5136 {
5137         Gpm_Wgetch();
5138         ${cf_cv_main_return:-return}(0);
5139 }
5140 CF_EOF
5141
5142         cf_save_LIBS="$LIBS"
5143         # This only works if we can look at the symbol table.  If a shared
5144         # library is stripped for install, we cannot use that.  So we're forced
5145         # to rely on the static library, noting that some packagers may not
5146         # include it.
5147         LIBS="-static -lgpm -dynamic $LIBS"
5148         if { (eval echo "$as_me:5148: \"$ac_compile\"") >&5
5149   (eval $ac_compile) 2>&5
5150   ac_status=$?
5151   echo "$as_me:5151: \$? = $ac_status" >&5
5152   (exit $ac_status); } ; then
5153                 if { (eval echo "$as_me:5153: \"$ac_link\"") >&5
5154   (eval $ac_link) 2>&5
5155   ac_status=$?
5156   echo "$as_me:5156: \$? = $ac_status" >&5
5157   (exit $ac_status); } ; then
5158                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5159                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5160                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5161                 fi
5162         fi
5163         rm -f conftest*
5164         LIBS="$cf_save_LIBS"
5165 fi
5166
5167 fi
5168 echo "$as_me:5168: result: $cf_cv_check_gpm_wgetch" >&5
5169 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5170
5171 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5172         { echo "$as_me:5172: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5173 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5174 fi
5175
5176 fi
5177
5178 fi
5179
5180 # not everyone has "test -c"
5181 if test -c /dev/sysmouse 2>/dev/null ; then
5182 echo "$as_me:5182: checking if you want to use sysmouse" >&5
5183 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5184
5185 # Check whether --with-sysmouse or --without-sysmouse was given.
5186 if test "${with_sysmouse+set}" = set; then
5187   withval="$with_sysmouse"
5188   cf_with_sysmouse=$withval
5189 else
5190   cf_with_sysmouse=maybe
5191 fi;
5192         if test "$cf_with_sysmouse" != no ; then
5193         cat >conftest.$ac_ext <<_ACEOF
5194 #line 5194 "configure"
5195 #include "confdefs.h"
5196
5197 #include <osreldate.h>
5198 #if (__FreeBSD_version >= 400017)
5199 #include <sys/consio.h>
5200 #include <sys/fbio.h>
5201 #else
5202 #include <machine/console.h>
5203 #endif
5204
5205 int
5206 main ()
5207 {
5208
5209         struct mouse_info the_mouse;
5210         ioctl(0, CONS_MOUSECTL, &the_mouse);
5211
5212   ;
5213   return 0;
5214 }
5215 _ACEOF
5216 rm -f conftest.$ac_objext
5217 if { (eval echo "$as_me:5217: \"$ac_compile\"") >&5
5218   (eval $ac_compile) 2>&5
5219   ac_status=$?
5220   echo "$as_me:5220: \$? = $ac_status" >&5
5221   (exit $ac_status); } &&
5222          { ac_try='test -s conftest.$ac_objext'
5223   { (eval echo "$as_me:5223: \"$ac_try\"") >&5
5224   (eval $ac_try) 2>&5
5225   ac_status=$?
5226   echo "$as_me:5226: \$? = $ac_status" >&5
5227   (exit $ac_status); }; }; then
5228   cf_with_sysmouse=yes
5229 else
5230   echo "$as_me: failed program was:" >&5
5231 cat conftest.$ac_ext >&5
5232 cf_with_sysmouse=no
5233 fi
5234 rm -f conftest.$ac_objext conftest.$ac_ext
5235         fi
5236 echo "$as_me:5236: result: $cf_with_sysmouse" >&5
5237 echo "${ECHO_T}$cf_with_sysmouse" >&6
5238 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5239 #define USE_SYSMOUSE 1
5240 EOF
5241
5242 fi
5243
5244 if test X"$CC_G_OPT" = X"" ; then
5245         CC_G_OPT='-g'
5246         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5247 fi
5248
5249 if test X"$CXX_G_OPT" = X"" ; then
5250         CXX_G_OPT='-g'
5251         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5252 fi
5253
5254 echo "$as_me:5254: checking for default loader flags" >&5
5255 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5256 case $DFT_LWR_MODEL in
5257 libtool) LD_MODEL=''   ;;
5258 normal)  LD_MODEL=''   ;;
5259 debug)   LD_MODEL=$CC_G_OPT ;;
5260 profile) LD_MODEL='-pg';;
5261 shared)  LD_MODEL=''   ;;
5262 esac
5263 echo "$as_me:5263: result: $LD_MODEL" >&5
5264 echo "${ECHO_T}$LD_MODEL" >&6
5265
5266 case $DFT_LWR_MODEL in
5267 shared)
5268
5269 echo "$as_me:5269: checking if rpath option should be used" >&5
5270 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5271
5272 # Check whether --enable-rpath or --disable-rpath was given.
5273 if test "${enable_rpath+set}" = set; then
5274   enableval="$enable_rpath"
5275   cf_cv_enable_rpath=$enableval
5276 else
5277   cf_cv_enable_rpath=no
5278 fi;
5279 echo "$as_me:5279: result: $cf_cv_enable_rpath" >&5
5280 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5281
5282 echo "$as_me:5282: checking if shared libraries should be relinked during install" >&5
5283 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5284
5285 # Check whether --enable-relink or --disable-relink was given.
5286 if test "${enable_relink+set}" = set; then
5287   enableval="$enable_relink"
5288   cf_cv_do_relink=$enableval
5289 else
5290   cf_cv_do_relink=yes
5291 fi;
5292 echo "$as_me:5292: result: $cf_cv_do_relink" >&5
5293 echo "${ECHO_T}$cf_cv_do_relink" >&6
5294         ;;
5295 esac
5296
5297 LD_RPATH_OPT=
5298 echo "$as_me:5298: checking for an rpath option" >&5
5299 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5300 case $cf_cv_system_name in #(vi
5301 irix*) #(vi
5302         if test "$GCC" = yes; then
5303                 LD_RPATH_OPT="-Wl,-rpath,"
5304         else
5305                 LD_RPATH_OPT="-rpath "
5306         fi
5307         ;;
5308 linux*|gnu*|k*bsd*-gnu) #(vi
5309         LD_RPATH_OPT="-Wl,-rpath,"
5310         ;;
5311 openbsd[2-9].*) #(vi
5312         LD_RPATH_OPT="-Wl,-rpath,"
5313         ;;
5314 freebsd*) #(vi
5315         LD_RPATH_OPT="-rpath "
5316         ;;
5317 netbsd*) #(vi
5318         LD_RPATH_OPT="-Wl,-rpath,"
5319         ;;
5320 osf*|mls+*) #(vi
5321         LD_RPATH_OPT="-rpath "
5322         ;;
5323 solaris2*) #(vi
5324         LD_RPATH_OPT="-R"
5325         ;;
5326 *)
5327         ;;
5328 esac
5329 echo "$as_me:5329: result: $LD_RPATH_OPT" >&5
5330 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5331
5332 case "x$LD_RPATH_OPT" in #(vi
5333 x-R*)
5334         echo "$as_me:5334: checking if we need a space after rpath option" >&5
5335 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5336         cf_save_LIBS="$LIBS"
5337         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5338         cat >conftest.$ac_ext <<_ACEOF
5339 #line 5339 "configure"
5340 #include "confdefs.h"
5341
5342 int
5343 main ()
5344 {
5345
5346   ;
5347   return 0;
5348 }
5349 _ACEOF
5350 rm -f conftest.$ac_objext conftest$ac_exeext
5351 if { (eval echo "$as_me:5351: \"$ac_link\"") >&5
5352   (eval $ac_link) 2>&5
5353   ac_status=$?
5354   echo "$as_me:5354: \$? = $ac_status" >&5
5355   (exit $ac_status); } &&
5356          { ac_try='test -s conftest$ac_exeext'
5357   { (eval echo "$as_me:5357: \"$ac_try\"") >&5
5358   (eval $ac_try) 2>&5
5359   ac_status=$?
5360   echo "$as_me:5360: \$? = $ac_status" >&5
5361   (exit $ac_status); }; }; then
5362   cf_rpath_space=no
5363 else
5364   echo "$as_me: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 cf_rpath_space=yes
5367 fi
5368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5369         LIBS="$cf_save_LIBS"
5370         echo "$as_me:5370: result: $cf_rpath_space" >&5
5371 echo "${ECHO_T}$cf_rpath_space" >&6
5372         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5373         ;;
5374 esac
5375
5376         LOCAL_LDFLAGS=
5377         LOCAL_LDFLAGS2=
5378         LD_SHARED_OPTS=
5379         INSTALL_LIB="-m 644"
5380
5381         cf_cv_do_symlinks=no
5382         cf_ld_rpath_opt=
5383         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5384
5385         echo "$as_me:5385: checking if release/abi version should be used for shared libs" >&5
5386 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5387
5388 # Check whether --with-shlib-version or --without-shlib-version was given.
5389 if test "${with_shlib_version+set}" = set; then
5390   withval="$with_shlib_version"
5391   test -z "$withval" && withval=auto
5392         case $withval in #(vi
5393         yes) #(vi
5394                 cf_cv_shlib_version=auto
5395                 ;;
5396         rel|abi|auto|no) #(vi
5397                 cf_cv_shlib_version=$withval
5398                 ;;
5399         *)
5400                 { { echo "$as_me:5400: error: option value must be one of: rel, abi, auto or no" >&5
5401 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5402    { (exit 1); exit 1; }; }
5403                 ;;
5404         esac
5405
5406 else
5407   cf_cv_shlib_version=auto
5408 fi;
5409         echo "$as_me:5409: result: $cf_cv_shlib_version" >&5
5410 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5411
5412         cf_cv_rm_so_locs=no
5413
5414         # Some less-capable ports of gcc support only -fpic
5415         CC_SHARED_OPTS=
5416         if test "$GCC" = yes
5417         then
5418                 echo "$as_me:5418: checking which $CC option to use" >&5
5419 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5420                 cf_save_CFLAGS="$CFLAGS"
5421                 for CC_SHARED_OPTS in -fPIC -fpic ''
5422                 do
5423                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5424                         cat >conftest.$ac_ext <<_ACEOF
5425 #line 5425 "configure"
5426 #include "confdefs.h"
5427 #include <stdio.h>
5428 int
5429 main ()
5430 {
5431 int x = 1
5432   ;
5433   return 0;
5434 }
5435 _ACEOF
5436 rm -f conftest.$ac_objext
5437 if { (eval echo "$as_me:5437: \"$ac_compile\"") >&5
5438   (eval $ac_compile) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); } &&
5442          { ac_try='test -s conftest.$ac_objext'
5443   { (eval echo "$as_me:5443: \"$ac_try\"") >&5
5444   (eval $ac_try) 2>&5
5445   ac_status=$?
5446   echo "$as_me:5446: \$? = $ac_status" >&5
5447   (exit $ac_status); }; }; then
5448   break
5449 else
5450   echo "$as_me: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5452 fi
5453 rm -f conftest.$ac_objext conftest.$ac_ext
5454                 done
5455                 echo "$as_me:5455: result: $CC_SHARED_OPTS" >&5
5456 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5457                 CFLAGS="$cf_save_CFLAGS"
5458         fi
5459
5460         cf_cv_shlib_version_infix=no
5461
5462         case $cf_cv_system_name in #(vi
5463         aix[56]*) #(vi
5464                 if test "$GCC" = yes; then
5465                         CC_SHARED_OPTS=
5466                         MK_SHARED_LIB="$(CC) -shared"
5467                 fi
5468                 ;;
5469         beos*) #(vi
5470                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5471                 ;;
5472         cygwin*) #(vi
5473                 CC_SHARED_OPTS=
5474                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5475                 cf_cv_shlib_version=cygdll
5476                 cf_cv_shlib_version_infix=cygdll
5477                 cat >mk_shared_lib.sh <<-CF_EOF
5478                 #!/bin/sh
5479                 SHARED_LIB=\$1
5480                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5481                 shift
5482                 cat <<-EOF
5483                 Linking shared library
5484                 ** SHARED_LIB \$SHARED_LIB
5485                 ** IMPORT_LIB \$IMPORT_LIB
5486 EOF
5487                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5488 CF_EOF
5489                 chmod +x mk_shared_lib.sh
5490                 ;;
5491         darwin*) #(vi
5492                 EXTRA_CFLAGS="-no-cpp-precomp"
5493                 CC_SHARED_OPTS="-dynamic"
5494                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5495                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5496                 cf_cv_shlib_version_infix=yes
5497                 echo "$as_me:5497: checking if ld -search_paths_first works" >&5
5498 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5499 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5500   echo $ECHO_N "(cached) $ECHO_C" >&6
5501 else
5502
5503                         cf_save_LDFLAGS=$LDFLAGS
5504                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5505                         cat >conftest.$ac_ext <<_ACEOF
5506 #line 5506 "configure"
5507 #include "confdefs.h"
5508
5509 int
5510 main ()
5511 {
5512 int i;
5513   ;
5514   return 0;
5515 }
5516 _ACEOF
5517 rm -f conftest.$ac_objext conftest$ac_exeext
5518 if { (eval echo "$as_me:5518: \"$ac_link\"") >&5
5519   (eval $ac_link) 2>&5
5520   ac_status=$?
5521   echo "$as_me:5521: \$? = $ac_status" >&5
5522   (exit $ac_status); } &&
5523          { ac_try='test -s conftest$ac_exeext'
5524   { (eval echo "$as_me:5524: \"$ac_try\"") >&5
5525   (eval $ac_try) 2>&5
5526   ac_status=$?
5527   echo "$as_me:5527: \$? = $ac_status" >&5
5528   (exit $ac_status); }; }; then
5529   cf_cv_ldflags_search_paths_first=yes
5530 else
5531   echo "$as_me: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5533 cf_cv_ldflags_search_paths_first=no
5534 fi
5535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5536                                 LDFLAGS=$cf_save_LDFLAGS
5537 fi
5538 echo "$as_me:5538: result: $cf_cv_ldflags_search_paths_first" >&5
5539 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5540                 if test $cf_cv_ldflags_search_paths_first = yes; then
5541                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5542                 fi
5543                 ;;
5544         hpux*) #(vi
5545                 # (tested with gcc 2.7.2 -- I don't have c89)
5546                 if test "$GCC" = yes; then
5547                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5548                 else
5549                         CC_SHARED_OPTS='+Z'
5550                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5551                 fi
5552                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5553                 # HP-UX shared libraries must be executable, and should be
5554                 # readonly to exploit a quirk in the memory manager.
5555                 INSTALL_LIB="-m 555"
5556                 ;;
5557         irix*) #(vi
5558                 if test "$cf_cv_enable_rpath" = yes ; then
5559                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5560                 fi
5561                 # tested with IRIX 5.2 and 'cc'.
5562                 if test "$GCC" != yes; then
5563                         CC_SHARED_OPTS='-KPIC'
5564                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5565                 else
5566                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5567                 fi
5568                 cf_cv_rm_so_locs=yes
5569                 ;;
5570         linux*|gnu*|k*bsd*-gnu) #(vi
5571                 if test "$DFT_LWR_MODEL" = "shared" ; then
5572                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5573                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5574                 fi
5575                 if test "$cf_cv_enable_rpath" = yes ; then
5576                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5577                 fi
5578
5579         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5580         if test "$cf_cv_shlib_version" = rel; then
5581                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5582         else
5583                 cf_cv_shared_soname='`basename $@`'
5584         fi
5585
5586                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5587                 ;;
5588         openbsd[2-9].*) #(vi
5589                 if test "$DFT_LWR_MODEL" = "shared" ; then
5590                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5591                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5592                 fi
5593                 if test "$cf_cv_enable_rpath" = yes ; then
5594                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5595                 fi
5596                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5597
5598         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5599         if test "$cf_cv_shlib_version" = rel; then
5600                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5601         else
5602                 cf_cv_shared_soname='`basename $@`'
5603         fi
5604
5605                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5606                 ;;
5607         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5608                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5609                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5610                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5611                 ;;
5612         freebsd*) #(vi
5613                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5614                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5615                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5616                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5617                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5618                 fi
5619
5620         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5621         if test "$cf_cv_shlib_version" = rel; then
5622                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5623         else
5624                 cf_cv_shared_soname='`basename $@`'
5625         fi
5626
5627                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5628                 ;;
5629         netbsd*) #(vi
5630                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5631                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5632                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5633                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5634                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5635                         if test "$cf_cv_shlib_version" = auto; then
5636                         if test -f /usr/libexec/ld.elf_so; then
5637                                 cf_cv_shlib_version=abi
5638                         else
5639                                 cf_cv_shlib_version=rel
5640                         fi
5641                         fi
5642
5643         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5644         if test "$cf_cv_shlib_version" = rel; then
5645                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5646         else
5647                 cf_cv_shared_soname='`basename $@`'
5648         fi
5649
5650                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5651                 else
5652                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5653                 fi
5654                 ;;
5655         osf*|mls+*) #(vi
5656                 # tested with OSF/1 V3.2 and 'cc'
5657                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5658                 # link with shared libs).
5659                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5660                 case $host_os in #(vi
5661                 osf4*)
5662                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5663                         ;;
5664                 esac
5665                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5666                 if test "$DFT_LWR_MODEL" = "shared" ; then
5667                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5668                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5669                 fi
5670                 cf_cv_rm_so_locs=yes
5671                 ;;
5672         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5673                 # tested with osr5.0.5
5674                 if test "$GCC" != yes; then
5675                         CC_SHARED_OPTS='-belf -KPIC'
5676                 fi
5677                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5678                 if test "$cf_cv_enable_rpath" = yes ; then
5679                         # only way is to set LD_RUN_PATH but no switch for it
5680                         RUN_PATH=$libdir
5681                 fi
5682                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5683                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5684                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5685                 ;;
5686         sunos4*) #(vi
5687                 # tested with SunOS 4.1.1 and gcc 2.7.0
5688                 if test "$GCC" != yes; then
5689                         CC_SHARED_OPTS='-KPIC'
5690                 fi
5691                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5692                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5693                 ;;
5694         solaris2*) #(vi
5695                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5696                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5697                 if test "$DFT_LWR_MODEL" = "shared" ; then
5698                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5699                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5700                 fi
5701                 if test "$cf_cv_enable_rpath" = yes ; then
5702                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5703                 fi
5704
5705         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5706         if test "$cf_cv_shlib_version" = rel; then
5707                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5708         else
5709                 cf_cv_shared_soname='`basename $@`'
5710         fi
5711
5712                 if test "$GCC" != yes; then
5713                         cf_save_CFLAGS="$CFLAGS"
5714                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5715                         do
5716                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5717                                 cat >conftest.$ac_ext <<_ACEOF
5718 #line 5718 "configure"
5719 #include "confdefs.h"
5720 #include <stdio.h>
5721 int
5722 main ()
5723 {
5724 printf("Hello\n");
5725   ;
5726   return 0;
5727 }
5728 _ACEOF
5729 rm -f conftest.$ac_objext
5730 if { (eval echo "$as_me:5730: \"$ac_compile\"") >&5
5731   (eval $ac_compile) 2>&5
5732   ac_status=$?
5733   echo "$as_me:5733: \$? = $ac_status" >&5
5734   (exit $ac_status); } &&
5735          { ac_try='test -s conftest.$ac_objext'
5736   { (eval echo "$as_me:5736: \"$ac_try\"") >&5
5737   (eval $ac_try) 2>&5
5738   ac_status=$?
5739   echo "$as_me:5739: \$? = $ac_status" >&5
5740   (exit $ac_status); }; }; then
5741   break
5742 else
5743   echo "$as_me: failed program was:" >&5
5744 cat conftest.$ac_ext >&5
5745 fi
5746 rm -f conftest.$ac_objext conftest.$ac_ext
5747                         done
5748                         CFLAGS="$cf_save_CFLAGS"
5749                         CC_SHARED_OPTS=$cf_shared_opts
5750                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5751                 else
5752                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5753                 fi
5754                 ;;
5755         sysv5uw7*|unix_sv*) #(vi
5756                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5757                 if test "$GCC" != yes; then
5758                         CC_SHARED_OPTS='-KPIC'
5759                 fi
5760                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5761                 ;;
5762         *)
5763                 CC_SHARED_OPTS='unknown'
5764                 MK_SHARED_LIB='echo unknown'
5765                 ;;
5766         esac
5767
5768         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5769         case "$cf_cv_shlib_version" in #(vi
5770         rel|abi)
5771                 case "$MK_SHARED_LIB" in #(vi
5772                 *'-o $@') #(vi
5773                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5774                         ;;
5775                 *)
5776                         { echo "$as_me:5776: WARNING: ignored --with-shlib-version" >&5
5777 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5778                         ;;
5779                 esac
5780                 ;;
5781         esac
5782
5783         if test -n "$cf_ld_rpath_opt" ; then
5784                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5785         fi
5786
5787 if test "$CC_SHARED_OPTS" = "unknown"; then
5788         for model in $cf_list_models; do
5789                 if test "$model" = "shared"; then
5790                         { { echo "$as_me:5790: error: Shared libraries are not supported in this version" >&5
5791 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5792    { (exit 1); exit 1; }; }
5793                 fi
5794         done
5795 fi
5796
5797 ###############################################################################
5798
5799 ###     use option --disable-overwrite to leave out the link to -lcurses
5800 echo "$as_me:5800: checking if you wish to install ncurses overwriting curses" >&5
5801 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5802
5803 # Check whether --enable-overwrite or --disable-overwrite was given.
5804 if test "${enable_overwrite+set}" = set; then
5805   enableval="$enable_overwrite"
5806   with_overwrite=$enableval
5807 else
5808   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5809 fi;
5810 echo "$as_me:5810: result: $with_overwrite" >&5
5811 echo "${ECHO_T}$with_overwrite" >&6
5812
5813 echo "$as_me:5813: checking if external terminfo-database is used" >&5
5814 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5815
5816 # Check whether --enable-database or --disable-database was given.
5817 if test "${enable_database+set}" = set; then
5818   enableval="$enable_database"
5819   use_database=$enableval
5820 else
5821   use_database=yes
5822 fi;
5823 echo "$as_me:5823: result: $use_database" >&5
5824 echo "${ECHO_T}$use_database" >&6
5825
5826 case $host_os in #(vi
5827 os2*) #(vi
5828         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5829         ;;
5830 *) #(vi
5831         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5832         ;;
5833 esac
5834
5835         case $cf_cv_system_name in
5836         os2*)   PATH_SEPARATOR=';'  ;;
5837         *)      PATH_SEPARATOR=':'  ;;
5838         esac
5839
5840 if test "$use_database" != no ; then
5841         cat >>confdefs.h <<\EOF
5842 #define USE_DATABASE 1
5843 EOF
5844
5845         echo "$as_me:5845: checking which terminfo source-file will be installed" >&5
5846 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5847
5848 # Check whether --with-database or --without-database was given.
5849 if test "${with_database+set}" = set; then
5850   withval="$with_database"
5851   TERMINFO_SRC=$withval
5852 fi;
5853         echo "$as_me:5853: result: $TERMINFO_SRC" >&5
5854 echo "${ECHO_T}$TERMINFO_SRC" >&6
5855
5856         echo "$as_me:5856: checking whether to use hashed database instead of directory/tree" >&5
5857 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5858
5859 # Check whether --with-hashed-db or --without-hashed-db was given.
5860 if test "${with_hashed_db+set}" = set; then
5861   withval="$with_hashed_db"
5862
5863 else
5864   with_hashed_db=no
5865 fi;
5866         echo "$as_me:5866: result: $with_hashed_db" >&5
5867 echo "${ECHO_T}$with_hashed_db" >&6
5868 else
5869         with_hashed_db=no
5870 fi
5871
5872 echo "$as_me:5872: checking for list of fallback descriptions" >&5
5873 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5874
5875 # Check whether --with-fallbacks or --without-fallbacks was given.
5876 if test "${with_fallbacks+set}" = set; then
5877   withval="$with_fallbacks"
5878   with_fallback=$withval
5879 else
5880   with_fallback=
5881 fi;
5882 echo "$as_me:5882: result: $with_fallback" >&5
5883 echo "${ECHO_T}$with_fallback" >&6
5884 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5885
5886 echo "$as_me:5886: checking if you want modern xterm or antique" >&5
5887 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5888
5889 # Check whether --with-xterm-new or --without-xterm-new was given.
5890 if test "${with_xterm_new+set}" = set; then
5891   withval="$with_xterm_new"
5892   with_xterm_new=$withval
5893 else
5894   with_xterm_new=yes
5895 fi;
5896 case $with_xterm_new in
5897 no)     with_xterm_new=xterm-old;;
5898 *)      with_xterm_new=xterm-new;;
5899 esac
5900 echo "$as_me:5900: result: $with_xterm_new" >&5
5901 echo "${ECHO_T}$with_xterm_new" >&6
5902 WHICH_XTERM=$with_xterm_new
5903
5904 MAKE_TERMINFO=
5905 if test "$use_database" = no ; then
5906         TERMINFO="${datadir}/terminfo"
5907         MAKE_TERMINFO="#"
5908 else
5909
5910 echo "$as_me:5910: checking for list of terminfo directories" >&5
5911 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5912
5913 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5914 if test "${with_terminfo_dirs+set}" = set; then
5915   withval="$with_terminfo_dirs"
5916
5917 else
5918   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5919 fi;
5920 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5921 cf_dst_path=
5922 for cf_src_path in $withval
5923 do
5924
5925 if test "x$prefix" != xNONE; then
5926   cf_path_syntax="$prefix"
5927 else
5928   cf_path_syntax="$ac_default_prefix"
5929 fi
5930
5931 case ".$cf_src_path" in #(vi
5932 .\$\(*\)*|.\'*\'*) #(vi
5933   ;;
5934 ..|./*|.\\*) #(vi
5935   ;;
5936 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5937   ;;
5938 .\${*prefix}*) #(vi
5939   eval cf_src_path="$cf_src_path"
5940   case ".$cf_src_path" in #(vi
5941   .NONE/*)
5942     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5943     ;;
5944   esac
5945   ;; #(vi
5946 .no|.NONE/*)
5947   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5948   ;;
5949 *)
5950   { { echo "$as_me:5950: error: expected a pathname, not \"$cf_src_path\"" >&5
5951 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5952    { (exit 1); exit 1; }; }
5953   ;;
5954 esac
5955
5956   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5957   cf_dst_path="${cf_dst_path}${cf_src_path}"
5958 done
5959 IFS="$ac_save_ifs"
5960
5961 eval 'TERMINFO_DIRS="$cf_dst_path"'
5962
5963 echo "$as_me:5963: result: $TERMINFO_DIRS" >&5
5964 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5965 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5966 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5967 EOF
5968
5969 echo "$as_me:5969: checking for default terminfo directory" >&5
5970 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5971
5972 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5973 if test "${with_default_terminfo_dir+set}" = set; then
5974   withval="$with_default_terminfo_dir"
5975
5976 else
5977   withval="${TERMINFO-${datadir}/terminfo}"
5978 fi; if test -n "${datadir}/terminfo" ; then
5979
5980 if test "x$prefix" != xNONE; then
5981   cf_path_syntax="$prefix"
5982 else
5983   cf_path_syntax="$ac_default_prefix"
5984 fi
5985
5986 case ".$withval" in #(vi
5987 .\$\(*\)*|.\'*\'*) #(vi
5988   ;;
5989 ..|./*|.\\*) #(vi
5990   ;;
5991 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5992   ;;
5993 .\${*prefix}*) #(vi
5994   eval withval="$withval"
5995   case ".$withval" in #(vi
5996   .NONE/*)
5997     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5998     ;;
5999   esac
6000   ;; #(vi
6001 .no|.NONE/*)
6002   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6003   ;;
6004 *)
6005   { { echo "$as_me:6005: error: expected a pathname, not \"$withval\"" >&5
6006 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6007    { (exit 1); exit 1; }; }
6008   ;;
6009 esac
6010
6011 fi
6012 TERMINFO="$withval"
6013
6014 echo "$as_me:6014: result: $TERMINFO" >&5
6015 echo "${ECHO_T}$TERMINFO" >&6
6016 cat >>confdefs.h <<EOF
6017 #define TERMINFO "$TERMINFO"
6018 EOF
6019
6020 fi
6021
6022 ###     use option --disable-big-core to make tic run on small machines
6023 ###     We need 4Mb, check if we can allocate 50% more than that.
6024 echo "$as_me:6024: checking if big-core option selected" >&5
6025 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6026
6027 # Check whether --enable-big-core or --disable-big-core was given.
6028 if test "${enable_big_core+set}" = set; then
6029   enableval="$enable_big_core"
6030   with_big_core=$enableval
6031 else
6032   if test "$cross_compiling" = yes; then
6033   with_big_core=no
6034 else
6035   cat >conftest.$ac_ext <<_ACEOF
6036 #line 6036 "configure"
6037 #include "confdefs.h"
6038
6039 #include <stdlib.h>
6040 #include <string.h>
6041 int main() {
6042         unsigned long n = 6000000L;
6043         char *s = malloc(n);
6044         if (s != 0)
6045                 s[0] = s[n-1] = 0;
6046         ${cf_cv_main_return:-return}(s == 0);
6047 }
6048 _ACEOF
6049 rm -f conftest$ac_exeext
6050 if { (eval echo "$as_me:6050: \"$ac_link\"") >&5
6051   (eval $ac_link) 2>&5
6052   ac_status=$?
6053   echo "$as_me:6053: \$? = $ac_status" >&5
6054   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6055   { (eval echo "$as_me:6055: \"$ac_try\"") >&5
6056   (eval $ac_try) 2>&5
6057   ac_status=$?
6058   echo "$as_me:6058: \$? = $ac_status" >&5
6059   (exit $ac_status); }; }; then
6060   with_big_core=yes
6061 else
6062   echo "$as_me: program exited with status $ac_status" >&5
6063 echo "$as_me: failed program was:" >&5
6064 cat conftest.$ac_ext >&5
6065 with_big_core=no
6066 fi
6067 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6068 fi
6069 fi;
6070 echo "$as_me:6070: result: $with_big_core" >&5
6071 echo "${ECHO_T}$with_big_core" >&6
6072 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6073 #define HAVE_BIG_CORE 1
6074 EOF
6075
6076 ### ISO C only guarantees 512-char strings, we have tables which load faster
6077 ### when constructed using "big" strings.  More than the C compiler, the awk
6078 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6079 echo "$as_me:6079: checking if big-strings option selected" >&5
6080 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6081
6082 # Check whether --enable-big-strings or --disable-big-strings was given.
6083 if test "${enable_big_strings+set}" = set; then
6084   enableval="$enable_big_strings"
6085   with_big_strings=$enableval
6086 else
6087
6088         case x$AWK in #(vi
6089         x)
6090                 eval with_big_strings=no
6091                 ;;
6092         *) #(vi
6093                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6094                         | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6095                         eval with_big_strings=yes
6096                 else
6097                         eval with_big_strings=no
6098                 fi
6099                 ;;
6100         esac
6101
6102 fi;
6103 echo "$as_me:6103: result: $with_big_strings" >&5
6104 echo "${ECHO_T}$with_big_strings" >&6
6105
6106 USE_BIG_STRINGS=0
6107 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6108
6109 ###     use option --enable-termcap to compile in the termcap fallback support
6110 echo "$as_me:6110: checking if you want termcap-fallback support" >&5
6111 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6112
6113 # Check whether --enable-termcap or --disable-termcap was given.
6114 if test "${enable_termcap+set}" = set; then
6115   enableval="$enable_termcap"
6116   with_termcap=$enableval
6117 else
6118   with_termcap=no
6119 fi;
6120 echo "$as_me:6120: result: $with_termcap" >&5
6121 echo "${ECHO_T}$with_termcap" >&6
6122
6123 if test "$with_termcap" != "yes" ; then
6124         if test "$use_database" = no ; then
6125                 if test -z "$with_fallback" ; then
6126                         { { echo "$as_me:6126: error: You have disabled the database w/o specifying fallbacks" >&5
6127 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6128    { (exit 1); exit 1; }; }
6129                 fi
6130         fi
6131         cat >>confdefs.h <<\EOF
6132 #define PURE_TERMINFO 1
6133 EOF
6134
6135 else
6136
6137 if test "$with_ticlib" != no ; then
6138         { { echo "$as_me:6138: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6139 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6140    { (exit 1); exit 1; }; }
6141 fi
6142
6143 cat >>confdefs.h <<\EOF
6144 #define USE_TERMCAP 1
6145 EOF
6146
6147 echo "$as_me:6147: checking for list of termcap files" >&5
6148 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6149
6150 # Check whether --with-termpath or --without-termpath was given.
6151 if test "${with_termpath+set}" = set; then
6152   withval="$with_termpath"
6153
6154 else
6155   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6156 fi;
6157 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6158 cf_dst_path=
6159 for cf_src_path in $withval
6160 do
6161
6162 if test "x$prefix" != xNONE; then
6163   cf_path_syntax="$prefix"
6164 else
6165   cf_path_syntax="$ac_default_prefix"
6166 fi
6167
6168 case ".$cf_src_path" in #(vi
6169 .\$\(*\)*|.\'*\'*) #(vi
6170   ;;
6171 ..|./*|.\\*) #(vi
6172   ;;
6173 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6174   ;;
6175 .\${*prefix}*) #(vi
6176   eval cf_src_path="$cf_src_path"
6177   case ".$cf_src_path" in #(vi
6178   .NONE/*)
6179     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6180     ;;
6181   esac
6182   ;; #(vi
6183 .no|.NONE/*)
6184   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6185   ;;
6186 *)
6187   { { echo "$as_me:6187: error: expected a pathname, not \"$cf_src_path\"" >&5
6188 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6189    { (exit 1); exit 1; }; }
6190   ;;
6191 esac
6192
6193   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6194   cf_dst_path="${cf_dst_path}${cf_src_path}"
6195 done
6196 IFS="$ac_save_ifs"
6197
6198 eval 'TERMPATH="$cf_dst_path"'
6199
6200 echo "$as_me:6200: result: $TERMPATH" >&5
6201 echo "${ECHO_T}$TERMPATH" >&6
6202 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6203 #define TERMPATH "$TERMPATH"
6204 EOF
6205
6206 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6207 echo "$as_me:6207: checking if fast termcap-loader is needed" >&5
6208 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6209
6210 # Check whether --enable-getcap or --disable-getcap was given.
6211 if test "${enable_getcap+set}" = set; then
6212   enableval="$enable_getcap"
6213   with_getcap=$enableval
6214 else
6215   with_getcap=no
6216 fi;
6217 echo "$as_me:6217: result: $with_getcap" >&5
6218 echo "${ECHO_T}$with_getcap" >&6
6219 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6220 #define USE_GETCAP 1
6221 EOF
6222
6223 echo "$as_me:6223: checking if translated termcaps will be cached in ~/.terminfo" >&5
6224 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6225
6226 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6227 if test "${enable_getcap_cache+set}" = set; then
6228   enableval="$enable_getcap_cache"
6229   with_getcap_cache=$enableval
6230 else
6231   with_getcap_cache=no
6232 fi;
6233 echo "$as_me:6233: result: $with_getcap_cache" >&5
6234 echo "${ECHO_T}$with_getcap_cache" >&6
6235 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6236 #define USE_GETCAP_CACHE 1
6237 EOF
6238
6239 fi
6240
6241 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6242 echo "$as_me:6242: checking if ~/.terminfo is wanted" >&5
6243 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6244
6245 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6246 if test "${enable_home_terminfo+set}" = set; then
6247   enableval="$enable_home_terminfo"
6248   with_home_terminfo=$enableval
6249 else
6250   with_home_terminfo=yes
6251 fi;
6252 echo "$as_me:6252: result: $with_home_terminfo" >&5
6253 echo "${ECHO_T}$with_home_terminfo" >&6
6254 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6255 #define USE_HOME_TERMINFO 1
6256 EOF
6257
6258 echo "$as_me:6258: checking if you want to use restricted environment when running as root" >&5
6259 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6260
6261 # Check whether --enable-root-environ or --disable-root-environ was given.
6262 if test "${enable_root_environ+set}" = set; then
6263   enableval="$enable_root_environ"
6264   with_root_environ=$enableval
6265 else
6266   with_root_environ=yes
6267 fi;
6268 echo "$as_me:6268: result: $with_root_environ" >&5
6269 echo "${ECHO_T}$with_root_environ" >&6
6270 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6271 #define USE_ROOT_ENVIRON 1
6272 EOF
6273
6274 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6275 ###   to reduce storage requirements for the terminfo database.
6276
6277 for ac_func in \
6278         remove \
6279         unlink
6280 do
6281 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6282 echo "$as_me:6282: checking for $ac_func" >&5
6283 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6284 if eval "test \"\${$as_ac_var+set}\" = set"; then
6285   echo $ECHO_N "(cached) $ECHO_C" >&6
6286 else
6287   cat >conftest.$ac_ext <<_ACEOF
6288 #line 6288 "configure"
6289 #include "confdefs.h"
6290 /* System header to define __stub macros and hopefully few prototypes,
6291     which can conflict with char $ac_func (); below.  */
6292 #include <assert.h>
6293 /* Override any gcc2 internal prototype to avoid an error.  */
6294 #ifdef __cplusplus
6295 extern "C"
6296 #endif
6297 /* We use char because int might match the return type of a gcc2
6298    builtin and then its argument prototype would still apply.  */
6299 char $ac_func ();
6300 char (*f) ();
6301
6302 int
6303 main ()
6304 {
6305 /* The GNU C library defines this for functions which it implements
6306     to always fail with ENOSYS.  Some functions are actually named
6307     something starting with __ and the normal name is an alias.  */
6308 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6309 choke me
6310 #else
6311 f = $ac_func;
6312 #endif
6313
6314   ;
6315   return 0;
6316 }
6317 _ACEOF
6318 rm -f conftest.$ac_objext conftest$ac_exeext
6319 if { (eval echo "$as_me:6319: \"$ac_link\"") >&5
6320   (eval $ac_link) 2>&5
6321   ac_status=$?
6322   echo "$as_me:6322: \$? = $ac_status" >&5
6323   (exit $ac_status); } &&
6324          { ac_try='test -s conftest$ac_exeext'
6325   { (eval echo "$as_me:6325: \"$ac_try\"") >&5
6326   (eval $ac_try) 2>&5
6327   ac_status=$?
6328   echo "$as_me:6328: \$? = $ac_status" >&5
6329   (exit $ac_status); }; }; then
6330   eval "$as_ac_var=yes"
6331 else
6332   echo "$as_me: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6334 eval "$as_ac_var=no"
6335 fi
6336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6337 fi
6338 echo "$as_me:6338: result: `eval echo '${'$as_ac_var'}'`" >&5
6339 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6340 if test `eval echo '${'$as_ac_var'}'` = yes; then
6341   cat >>confdefs.h <<EOF
6342 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6343 EOF
6344
6345 fi
6346 done
6347
6348 if test "$cross_compiling" = yes ; then
6349
6350 for ac_func in \
6351                 link \
6352                 symlink
6353 do
6354 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6355 echo "$as_me:6355: checking for $ac_func" >&5
6356 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6357 if eval "test \"\${$as_ac_var+set}\" = set"; then
6358   echo $ECHO_N "(cached) $ECHO_C" >&6
6359 else
6360   cat >conftest.$ac_ext <<_ACEOF
6361 #line 6361 "configure"
6362 #include "confdefs.h"
6363 /* System header to define __stub macros and hopefully few prototypes,
6364     which can conflict with char $ac_func (); below.  */
6365 #include <assert.h>
6366 /* Override any gcc2 internal prototype to avoid an error.  */
6367 #ifdef __cplusplus
6368 extern "C"
6369 #endif
6370 /* We use char because int might match the return type of a gcc2
6371    builtin and then its argument prototype would still apply.  */
6372 char $ac_func ();
6373 char (*f) ();
6374
6375 int
6376 main ()
6377 {
6378 /* The GNU C library defines this for functions which it implements
6379     to always fail with ENOSYS.  Some functions are actually named
6380     something starting with __ and the normal name is an alias.  */
6381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6382 choke me
6383 #else
6384 f = $ac_func;
6385 #endif
6386
6387   ;
6388   return 0;
6389 }
6390 _ACEOF
6391 rm -f conftest.$ac_objext conftest$ac_exeext
6392 if { (eval echo "$as_me:6392: \"$ac_link\"") >&5
6393   (eval $ac_link) 2>&5
6394   ac_status=$?
6395   echo "$as_me:6395: \$? = $ac_status" >&5
6396   (exit $ac_status); } &&
6397          { ac_try='test -s conftest$ac_exeext'
6398   { (eval echo "$as_me:6398: \"$ac_try\"") >&5
6399   (eval $ac_try) 2>&5
6400   ac_status=$?
6401   echo "$as_me:6401: \$? = $ac_status" >&5
6402   (exit $ac_status); }; }; then
6403   eval "$as_ac_var=yes"
6404 else
6405   echo "$as_me: failed program was:" >&5
6406 cat conftest.$ac_ext >&5
6407 eval "$as_ac_var=no"
6408 fi
6409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6410 fi
6411 echo "$as_me:6411: result: `eval echo '${'$as_ac_var'}'`" >&5
6412 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6413 if test `eval echo '${'$as_ac_var'}'` = yes; then
6414   cat >>confdefs.h <<EOF
6415 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6416 EOF
6417
6418 fi
6419 done
6420
6421 else
6422         echo "$as_me:6422: checking if link/symlink functions work" >&5
6423 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6424 if test "${cf_cv_link_funcs+set}" = set; then
6425   echo $ECHO_N "(cached) $ECHO_C" >&6
6426 else
6427
6428                 cf_cv_link_funcs=
6429                 for cf_func in link symlink ; do
6430                         if test "$cross_compiling" = yes; then
6431
6432                         eval 'ac_cv_func_'$cf_func'=error'
6433 else
6434   cat >conftest.$ac_ext <<_ACEOF
6435 #line 6435 "configure"
6436 #include "confdefs.h"
6437
6438 #include <sys/types.h>
6439 #include <sys/stat.h>
6440 #ifdef HAVE_UNISTD_H
6441 #include <unistd.h>
6442 #endif
6443 int main()
6444 {
6445         int fail = 0;
6446         char *src = "config.log";
6447         char *dst = "conftest.chk";
6448         struct stat src_sb;
6449         struct stat dst_sb;
6450
6451         stat(src, &src_sb);
6452         fail = ($cf_func("config.log", "conftest.chk") < 0)
6453             || (stat(dst, &dst_sb) < 0)
6454             || (dst_sb.st_mtime != src_sb.st_mtime);
6455 #ifdef HAVE_UNLINK
6456         unlink(dst);
6457 #else
6458         remove(dst);
6459 #endif
6460         ${cf_cv_main_return:-return} (fail);
6461 }
6462
6463 _ACEOF
6464 rm -f conftest$ac_exeext
6465 if { (eval echo "$as_me:6465: \"$ac_link\"") >&5
6466   (eval $ac_link) 2>&5
6467   ac_status=$?
6468   echo "$as_me:6468: \$? = $ac_status" >&5
6469   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6470   { (eval echo "$as_me:6470: \"$ac_try\"") >&5
6471   (eval $ac_try) 2>&5
6472   ac_status=$?
6473   echo "$as_me:6473: \$? = $ac_status" >&5
6474   (exit $ac_status); }; }; then
6475
6476                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6477                         eval 'ac_cv_func_'$cf_func'=yes'
6478 else
6479   echo "$as_me: program exited with status $ac_status" >&5
6480 echo "$as_me: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482
6483                         eval 'ac_cv_func_'$cf_func'=no'
6484 fi
6485 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6486 fi
6487                 done
6488                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6489
6490 fi
6491 echo "$as_me:6491: result: $cf_cv_link_funcs" >&5
6492 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6493         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6494 #define HAVE_LINK 1
6495 EOF
6496
6497         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6498 #define HAVE_SYMLINK 1
6499 EOF
6500
6501 fi
6502
6503 with_links=no
6504 with_symlinks=no
6505
6506 # soft links (symbolic links) are useful for some systems where hard links do
6507 # not work, or to make it simpler to copy terminfo trees around.
6508 if test "$ac_cv_func_symlink" = yes ; then
6509     echo "$as_me:6509: checking if tic should use symbolic links" >&5
6510 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6511
6512 # Check whether --enable-symlinks or --disable-symlinks was given.
6513 if test "${enable_symlinks+set}" = set; then
6514   enableval="$enable_symlinks"
6515   with_symlinks=$enableval
6516 else
6517   with_symlinks=no
6518 fi;
6519     echo "$as_me:6519: result: $with_symlinks" >&5
6520 echo "${ECHO_T}$with_symlinks" >&6
6521 fi
6522
6523 # If we have hard links and did not choose to use soft links instead, there is
6524 # no reason to make this choice optional - use the hard links.
6525 if test "$with_symlinks" = no ; then
6526     echo "$as_me:6526: checking if tic should use hard links" >&5
6527 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6528     if test "$ac_cv_func_link" = yes ; then
6529         with_links=yes
6530     else
6531         with_links=no
6532     fi
6533     echo "$as_me:6533: result: $with_links" >&5
6534 echo "${ECHO_T}$with_links" >&6
6535 fi
6536
6537 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6538 #define USE_LINKS 1
6539 EOF
6540
6541 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6542 #define USE_SYMLINKS 1
6543 EOF
6544
6545 ###   use option --enable-broken-linker to force on use of broken-linker support
6546 echo "$as_me:6546: checking if you want broken-linker support code" >&5
6547 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6548
6549 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6550 if test "${enable_broken_linker+set}" = set; then
6551   enableval="$enable_broken_linker"
6552   with_broken_linker=$enableval
6553 else
6554   with_broken_linker=${BROKEN_LINKER-no}
6555 fi;
6556 echo "$as_me:6556: result: $with_broken_linker" >&5
6557 echo "${ECHO_T}$with_broken_linker" >&6
6558
6559 BROKEN_LINKER=0
6560 if test "$with_broken_linker" = yes ; then
6561         cat >>confdefs.h <<\EOF
6562 #define BROKEN_LINKER 1
6563 EOF
6564
6565         BROKEN_LINKER=1
6566 elif test "$DFT_LWR_MODEL" = shared ; then
6567         case $cf_cv_system_name in #(vi
6568         cygwin*)
6569                 cat >>confdefs.h <<\EOF
6570 #define BROKEN_LINKER 1
6571 EOF
6572
6573                 BROKEN_LINKER=1
6574                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6575
6576 echo "${as_me-configure}:6576: testing cygwin linker is broken anyway ..." 1>&5
6577
6578                 ;;
6579         esac
6580 fi
6581
6582 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6583 echo "$as_me:6583: checking if tputs should process BSD-style prefix padding" >&5
6584 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6585
6586 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6587 if test "${enable_bsdpad+set}" = set; then
6588   enableval="$enable_bsdpad"
6589   with_bsdpad=$enableval
6590 else
6591   with_bsdpad=no
6592 fi;
6593 echo "$as_me:6593: result: $with_bsdpad" >&5
6594 echo "${ECHO_T}$with_bsdpad" >&6
6595 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6596 #define BSD_TPUTS 1
6597 EOF
6598
6599 ###   use option --enable-widec to turn on use of wide-character support
6600 NCURSES_CH_T=chtype
6601 NCURSES_LIBUTF8=0
6602
6603 NEED_WCHAR_H=0
6604 NCURSES_MBSTATE_T=0
6605 NCURSES_WCHAR_T=0
6606 NCURSES_WINT_T=0
6607
6608 # Check to define _XOPEN_SOURCE "automatically"
6609
6610 cf_XOPEN_SOURCE=500
6611 cf_POSIX_C_SOURCE=199506L
6612 cf_xopen_source=
6613
6614 case $host_os in #(vi
6615 aix[456]*) #(vi
6616         cf_xopen_source="-D_ALL_SOURCE"
6617         ;;
6618 darwin[0-8].*) #(vi
6619         cf_xopen_source="-D_APPLE_C_SOURCE"
6620         ;;
6621 darwin*) #(vi
6622         cf_xopen_source="-D_DARWIN_C_SOURCE"
6623         ;;
6624 freebsd*|dragonfly*) #(vi
6625         # 5.x headers associate
6626         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6627         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6628         cf_POSIX_C_SOURCE=200112L
6629         cf_XOPEN_SOURCE=600
6630         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6631         ;;
6632 hpux11*) #(vi
6633         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6634         ;;
6635 hpux*) #(vi
6636         cf_xopen_source="-D_HPUX_SOURCE"
6637         ;;
6638 irix[56].*) #(vi
6639         cf_xopen_source="-D_SGI_SOURCE"
6640         ;;
6641 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6642
6643 echo "$as_me:6643: checking if we must define _GNU_SOURCE" >&5
6644 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6645 if test "${cf_cv_gnu_source+set}" = set; then
6646   echo $ECHO_N "(cached) $ECHO_C" >&6
6647 else
6648
6649 cat >conftest.$ac_ext <<_ACEOF
6650 #line 6650 "configure"
6651 #include "confdefs.h"
6652 #include <sys/types.h>
6653 int
6654 main ()
6655 {
6656
6657 #ifndef _XOPEN_SOURCE
6658 make an error
6659 #endif
6660   ;
6661   return 0;
6662 }
6663 _ACEOF
6664 rm -f conftest.$ac_objext
6665 if { (eval echo "$as_me:6665: \"$ac_compile\"") >&5
6666   (eval $ac_compile) 2>&5
6667   ac_status=$?
6668   echo "$as_me:6668: \$? = $ac_status" >&5
6669   (exit $ac_status); } &&
6670          { ac_try='test -s conftest.$ac_objext'
6671   { (eval echo "$as_me:6671: \"$ac_try\"") >&5
6672   (eval $ac_try) 2>&5
6673   ac_status=$?
6674   echo "$as_me:6674: \$? = $ac_status" >&5
6675   (exit $ac_status); }; }; then
6676   cf_cv_gnu_source=no
6677 else
6678   echo "$as_me: failed program was:" >&5
6679 cat conftest.$ac_ext >&5
6680 cf_save="$CPPFLAGS"
6681          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6682          cat >conftest.$ac_ext <<_ACEOF
6683 #line 6683 "configure"
6684 #include "confdefs.h"
6685 #include <sys/types.h>
6686 int
6687 main ()
6688 {
6689
6690 #ifdef _XOPEN_SOURCE
6691 make an error
6692 #endif
6693   ;
6694   return 0;
6695 }
6696 _ACEOF
6697 rm -f conftest.$ac_objext
6698 if { (eval echo "$as_me:6698: \"$ac_compile\"") >&5
6699   (eval $ac_compile) 2>&5
6700   ac_status=$?
6701   echo "$as_me:6701: \$? = $ac_status" >&5
6702   (exit $ac_status); } &&
6703          { ac_try='test -s conftest.$ac_objext'
6704   { (eval echo "$as_me:6704: \"$ac_try\"") >&5
6705   (eval $ac_try) 2>&5
6706   ac_status=$?
6707   echo "$as_me:6707: \$? = $ac_status" >&5
6708   (exit $ac_status); }; }; then
6709   cf_cv_gnu_source=no
6710 else
6711   echo "$as_me: failed program was:" >&5
6712 cat conftest.$ac_ext >&5
6713 cf_cv_gnu_source=yes
6714 fi
6715 rm -f conftest.$ac_objext conftest.$ac_ext
6716         CPPFLAGS="$cf_save"
6717
6718 fi
6719 rm -f conftest.$ac_objext conftest.$ac_ext
6720
6721 fi
6722 echo "$as_me:6722: result: $cf_cv_gnu_source" >&5
6723 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6724 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6725
6726         ;;
6727 mirbsd*) #(vi
6728         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6729         ;;
6730 netbsd*) #(vi
6731         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6732         ;;
6733 openbsd*) #(vi
6734         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6735         ;;
6736 osf[45]*) #(vi
6737         cf_xopen_source="-D_OSF_SOURCE"
6738         ;;
6739 nto-qnx*) #(vi
6740         cf_xopen_source="-D_QNX_SOURCE"
6741         ;;
6742 sco*) #(vi
6743         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6744         ;;
6745 solaris2.1[0-9]) #(vi
6746         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6747         ;;
6748 solaris2.[1-9]) #(vi
6749         cf_xopen_source="-D__EXTENSIONS__"
6750         ;;
6751 *)
6752         echo "$as_me:6752: checking if we should define _XOPEN_SOURCE" >&5
6753 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6754 if test "${cf_cv_xopen_source+set}" = set; then
6755   echo $ECHO_N "(cached) $ECHO_C" >&6
6756 else
6757
6758         cat >conftest.$ac_ext <<_ACEOF
6759 #line 6759 "configure"
6760 #include "confdefs.h"
6761 #include <sys/types.h>
6762 int
6763 main ()
6764 {
6765
6766 #ifndef _XOPEN_SOURCE
6767 make an error
6768 #endif
6769   ;
6770   return 0;
6771 }
6772 _ACEOF
6773 rm -f conftest.$ac_objext
6774 if { (eval echo "$as_me:6774: \"$ac_compile\"") >&5
6775   (eval $ac_compile) 2>&5
6776   ac_status=$?
6777   echo "$as_me:6777: \$? = $ac_status" >&5
6778   (exit $ac_status); } &&
6779          { ac_try='test -s conftest.$ac_objext'
6780   { (eval echo "$as_me:6780: \"$ac_try\"") >&5
6781   (eval $ac_try) 2>&5
6782   ac_status=$?
6783   echo "$as_me:6783: \$? = $ac_status" >&5
6784   (exit $ac_status); }; }; then
6785   cf_cv_xopen_source=no
6786 else
6787   echo "$as_me: failed program was:" >&5
6788 cat conftest.$ac_ext >&5
6789 cf_save="$CPPFLAGS"
6790          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6791          cat >conftest.$ac_ext <<_ACEOF
6792 #line 6792 "configure"
6793 #include "confdefs.h"
6794 #include <sys/types.h>
6795 int
6796 main ()
6797 {
6798
6799 #ifdef _XOPEN_SOURCE
6800 make an error
6801 #endif
6802   ;
6803   return 0;
6804 }
6805 _ACEOF
6806 rm -f conftest.$ac_objext
6807 if { (eval echo "$as_me:6807: \"$ac_compile\"") >&5
6808   (eval $ac_compile) 2>&5
6809   ac_status=$?
6810   echo "$as_me:6810: \$? = $ac_status" >&5
6811   (exit $ac_status); } &&
6812          { ac_try='test -s conftest.$ac_objext'
6813   { (eval echo "$as_me:6813: \"$ac_try\"") >&5
6814   (eval $ac_try) 2>&5
6815   ac_status=$?
6816   echo "$as_me:6816: \$? = $ac_status" >&5
6817   (exit $ac_status); }; }; then
6818   cf_cv_xopen_source=no
6819 else
6820   echo "$as_me: failed program was:" >&5
6821 cat conftest.$ac_ext >&5
6822 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6823 fi
6824 rm -f conftest.$ac_objext conftest.$ac_ext
6825         CPPFLAGS="$cf_save"
6826
6827 fi
6828 rm -f conftest.$ac_objext conftest.$ac_ext
6829
6830 fi
6831 echo "$as_me:6831: result: $cf_cv_xopen_source" >&5
6832 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6833         if test "$cf_cv_xopen_source" != no ; then
6834
6835 CFLAGS=`echo "$CFLAGS" | \
6836         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6837                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6838
6839 CPPFLAGS=`echo "$CPPFLAGS" | \
6840         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6841                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6842
6843                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
6844
6845 cf_fix_cppflags=no
6846 cf_new_cflags=
6847 cf_new_cppflags=
6848 cf_new_extra_cppflags=
6849
6850 for cf_add_cflags in $cf_temp_xopen_source
6851 do
6852 case $cf_fix_cppflags in
6853 no)
6854         case $cf_add_cflags in #(vi
6855         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6856                 case $cf_add_cflags in
6857                 -D*)
6858                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6859
6860                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6861                                 && test -z "${cf_tst_cflags}" \
6862                                 && cf_fix_cppflags=yes
6863
6864                         if test $cf_fix_cppflags = yes ; then
6865                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6866                                 continue
6867                         elif test "${cf_tst_cflags}" = "\"'" ; then
6868                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6869                                 continue
6870                         fi
6871                         ;;
6872                 esac
6873                 case "$CPPFLAGS" in
6874                 *$cf_add_cflags) #(vi
6875                         ;;
6876                 *) #(vi
6877                         case $cf_add_cflags in #(vi
6878                         -D*)
6879                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6880
6881 CPPFLAGS=`echo "$CPPFLAGS" | \
6882         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6883                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6884
6885                                 ;;
6886                         esac
6887                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6888                         ;;
6889                 esac
6890                 ;;
6891         *)
6892                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6893                 ;;
6894         esac
6895         ;;
6896 yes)
6897         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6898
6899         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6900
6901         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6902                 && test -z "${cf_tst_cflags}" \
6903                 && cf_fix_cppflags=no
6904         ;;
6905 esac
6906 done
6907
6908 if test -n "$cf_new_cflags" ; then
6909
6910         CFLAGS="$CFLAGS $cf_new_cflags"
6911 fi
6912
6913 if test -n "$cf_new_cppflags" ; then
6914
6915         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6916 fi
6917
6918 if test -n "$cf_new_extra_cppflags" ; then
6919
6920         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6921 fi
6922
6923         fi
6924
6925 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6926
6927 cf_save_CFLAGS="$CFLAGS"
6928 cf_save_CPPFLAGS="$CPPFLAGS"
6929
6930 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6931         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6932                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6933
6934 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6935         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6936                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6937
6938 echo "$as_me:6938: checking if we should define _POSIX_C_SOURCE" >&5
6939 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6940 if test "${cf_cv_posix_c_source+set}" = set; then
6941   echo $ECHO_N "(cached) $ECHO_C" >&6
6942 else
6943
6944 echo "${as_me-configure}:6944: testing if the symbol is already defined go no further ..." 1>&5
6945
6946         cat >conftest.$ac_ext <<_ACEOF
6947 #line 6947 "configure"
6948 #include "confdefs.h"
6949 #include <sys/types.h>
6950 int
6951 main ()
6952 {
6953
6954 #ifndef _POSIX_C_SOURCE
6955 make an error
6956 #endif
6957   ;
6958   return 0;
6959 }
6960 _ACEOF
6961 rm -f conftest.$ac_objext
6962 if { (eval echo "$as_me:6962: \"$ac_compile\"") >&5
6963   (eval $ac_compile) 2>&5
6964   ac_status=$?
6965   echo "$as_me:6965: \$? = $ac_status" >&5
6966   (exit $ac_status); } &&
6967          { ac_try='test -s conftest.$ac_objext'
6968   { (eval echo "$as_me:6968: \"$ac_try\"") >&5
6969   (eval $ac_try) 2>&5
6970   ac_status=$?
6971   echo "$as_me:6971: \$? = $ac_status" >&5
6972   (exit $ac_status); }; }; then
6973   cf_cv_posix_c_source=no
6974 else
6975   echo "$as_me: failed program was:" >&5
6976 cat conftest.$ac_ext >&5
6977 cf_want_posix_source=no
6978          case .$cf_POSIX_C_SOURCE in #(vi
6979          .[12]??*) #(vi
6980                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6981                 ;;
6982          .2) #(vi
6983                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6984                 cf_want_posix_source=yes
6985                 ;;
6986          .*)
6987                 cf_want_posix_source=yes
6988                 ;;
6989          esac
6990          if test "$cf_want_posix_source" = yes ; then
6991                 cat >conftest.$ac_ext <<_ACEOF
6992 #line 6992 "configure"
6993 #include "confdefs.h"
6994 #include <sys/types.h>
6995 int
6996 main ()
6997 {
6998
6999 #ifdef _POSIX_SOURCE
7000 make an error
7001 #endif
7002   ;
7003   return 0;
7004 }
7005 _ACEOF
7006 rm -f conftest.$ac_objext
7007 if { (eval echo "$as_me:7007: \"$ac_compile\"") >&5
7008   (eval $ac_compile) 2>&5
7009   ac_status=$?
7010   echo "$as_me:7010: \$? = $ac_status" >&5
7011   (exit $ac_status); } &&
7012          { ac_try='test -s conftest.$ac_objext'
7013   { (eval echo "$as_me:7013: \"$ac_try\"") >&5
7014   (eval $ac_try) 2>&5
7015   ac_status=$?
7016   echo "$as_me:7016: \$? = $ac_status" >&5
7017   (exit $ac_status); }; }; then
7018   :
7019 else
7020   echo "$as_me: failed program was:" >&5
7021 cat conftest.$ac_ext >&5
7022 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7023 fi
7024 rm -f conftest.$ac_objext conftest.$ac_ext
7025          fi
7026
7027 echo "${as_me-configure}:7027: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7028
7029          CFLAGS="$cf_trim_CFLAGS"
7030          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7031
7032 echo "${as_me-configure}:7032: testing if the second compile does not leave our definition intact error ..." 1>&5
7033
7034          cat >conftest.$ac_ext <<_ACEOF
7035 #line 7035 "configure"
7036 #include "confdefs.h"
7037 #include <sys/types.h>
7038 int
7039 main ()
7040 {
7041
7042 #ifndef _POSIX_C_SOURCE
7043 make an error
7044 #endif
7045   ;
7046   return 0;
7047 }
7048 _ACEOF
7049 rm -f conftest.$ac_objext
7050 if { (eval echo "$as_me:7050: \"$ac_compile\"") >&5
7051   (eval $ac_compile) 2>&5
7052   ac_status=$?
7053   echo "$as_me:7053: \$? = $ac_status" >&5
7054   (exit $ac_status); } &&
7055          { ac_try='test -s conftest.$ac_objext'
7056   { (eval echo "$as_me:7056: \"$ac_try\"") >&5
7057   (eval $ac_try) 2>&5
7058   ac_status=$?
7059   echo "$as_me:7059: \$? = $ac_status" >&5
7060   (exit $ac_status); }; }; then
7061   :
7062 else
7063   echo "$as_me: failed program was:" >&5
7064 cat conftest.$ac_ext >&5
7065 cf_cv_posix_c_source=no
7066 fi
7067 rm -f conftest.$ac_objext conftest.$ac_ext
7068          CFLAGS="$cf_save_CFLAGS"
7069          CPPFLAGS="$cf_save_CPPFLAGS"
7070
7071 fi
7072 rm -f conftest.$ac_objext conftest.$ac_ext
7073
7074 fi
7075 echo "$as_me:7075: result: $cf_cv_posix_c_source" >&5
7076 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7077
7078 if test "$cf_cv_posix_c_source" != no ; then
7079         CFLAGS="$cf_trim_CFLAGS"
7080         CPPFLAGS="$cf_trim_CPPFLAGS"
7081
7082 cf_fix_cppflags=no
7083 cf_new_cflags=
7084 cf_new_cppflags=
7085 cf_new_extra_cppflags=
7086
7087 for cf_add_cflags in $cf_cv_posix_c_source
7088 do
7089 case $cf_fix_cppflags in
7090 no)
7091         case $cf_add_cflags in #(vi
7092         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7093                 case $cf_add_cflags in
7094                 -D*)
7095                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7096
7097                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7098                                 && test -z "${cf_tst_cflags}" \
7099                                 && cf_fix_cppflags=yes
7100
7101                         if test $cf_fix_cppflags = yes ; then
7102                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7103                                 continue
7104                         elif test "${cf_tst_cflags}" = "\"'" ; then
7105                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7106                                 continue
7107                         fi
7108                         ;;
7109                 esac
7110                 case "$CPPFLAGS" in
7111                 *$cf_add_cflags) #(vi
7112                         ;;
7113                 *) #(vi
7114                         case $cf_add_cflags in #(vi
7115                         -D*)
7116                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7117
7118 CPPFLAGS=`echo "$CPPFLAGS" | \
7119         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7120                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7121
7122                                 ;;
7123                         esac
7124                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7125                         ;;
7126                 esac
7127                 ;;
7128         *)
7129                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7130                 ;;
7131         esac
7132         ;;
7133 yes)
7134         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7135
7136         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7137
7138         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7139                 && test -z "${cf_tst_cflags}" \
7140                 && cf_fix_cppflags=no
7141         ;;
7142 esac
7143 done
7144
7145 if test -n "$cf_new_cflags" ; then
7146
7147         CFLAGS="$CFLAGS $cf_new_cflags"
7148 fi
7149
7150 if test -n "$cf_new_cppflags" ; then
7151
7152         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7153 fi
7154
7155 if test -n "$cf_new_extra_cppflags" ; then
7156
7157         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7158 fi
7159
7160 fi
7161
7162         ;;
7163 esac
7164
7165 if test -n "$cf_xopen_source" ; then
7166
7167 cf_fix_cppflags=no
7168 cf_new_cflags=
7169 cf_new_cppflags=
7170 cf_new_extra_cppflags=
7171
7172 for cf_add_cflags in $cf_xopen_source
7173 do
7174 case $cf_fix_cppflags in
7175 no)
7176         case $cf_add_cflags in #(vi
7177         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7178                 case $cf_add_cflags in
7179                 -D*)
7180                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7181
7182                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7183                                 && test -z "${cf_tst_cflags}" \
7184                                 && cf_fix_cppflags=yes
7185
7186                         if test $cf_fix_cppflags = yes ; then
7187                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7188                                 continue
7189                         elif test "${cf_tst_cflags}" = "\"'" ; then
7190                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7191                                 continue
7192                         fi
7193                         ;;
7194                 esac
7195                 case "$CPPFLAGS" in
7196                 *$cf_add_cflags) #(vi
7197                         ;;
7198                 *) #(vi
7199                         case $cf_add_cflags in #(vi
7200                         -D*)
7201                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7202
7203 CPPFLAGS=`echo "$CPPFLAGS" | \
7204         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7205                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7206
7207                                 ;;
7208                         esac
7209                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7210                         ;;
7211                 esac
7212                 ;;
7213         *)
7214                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7215                 ;;
7216         esac
7217         ;;
7218 yes)
7219         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7220
7221         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7222
7223         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7224                 && test -z "${cf_tst_cflags}" \
7225                 && cf_fix_cppflags=no
7226         ;;
7227 esac
7228 done
7229
7230 if test -n "$cf_new_cflags" ; then
7231
7232         CFLAGS="$CFLAGS $cf_new_cflags"
7233 fi
7234
7235 if test -n "$cf_new_cppflags" ; then
7236
7237         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7238 fi
7239
7240 if test -n "$cf_new_extra_cppflags" ; then
7241
7242         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7243 fi
7244
7245 fi
7246
7247 # Work around breakage on OS X
7248
7249 echo "$as_me:7249: checking if SIGWINCH is defined" >&5
7250 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7251 if test "${cf_cv_define_sigwinch+set}" = set; then
7252   echo $ECHO_N "(cached) $ECHO_C" >&6
7253 else
7254
7255         cat >conftest.$ac_ext <<_ACEOF
7256 #line 7256 "configure"
7257 #include "confdefs.h"
7258
7259 #include <sys/types.h>
7260 #include <sys/signal.h>
7261
7262 int
7263 main ()
7264 {
7265 int x = SIGWINCH
7266   ;
7267   return 0;
7268 }
7269 _ACEOF
7270 rm -f conftest.$ac_objext
7271 if { (eval echo "$as_me:7271: \"$ac_compile\"") >&5
7272   (eval $ac_compile) 2>&5
7273   ac_status=$?
7274   echo "$as_me:7274: \$? = $ac_status" >&5
7275   (exit $ac_status); } &&
7276          { ac_try='test -s conftest.$ac_objext'
7277   { (eval echo "$as_me:7277: \"$ac_try\"") >&5
7278   (eval $ac_try) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); }; }; then
7282   cf_cv_define_sigwinch=yes
7283 else
7284   echo "$as_me: failed program was:" >&5
7285 cat conftest.$ac_ext >&5
7286 cat >conftest.$ac_ext <<_ACEOF
7287 #line 7287 "configure"
7288 #include "confdefs.h"
7289
7290 #undef _XOPEN_SOURCE
7291 #undef _POSIX_SOURCE
7292 #undef _POSIX_C_SOURCE
7293 #include <sys/types.h>
7294 #include <sys/signal.h>
7295
7296 int
7297 main ()
7298 {
7299 int x = SIGWINCH
7300   ;
7301   return 0;
7302 }
7303 _ACEOF
7304 rm -f conftest.$ac_objext
7305 if { (eval echo "$as_me:7305: \"$ac_compile\"") >&5
7306   (eval $ac_compile) 2>&5
7307   ac_status=$?
7308   echo "$as_me:7308: \$? = $ac_status" >&5
7309   (exit $ac_status); } &&
7310          { ac_try='test -s conftest.$ac_objext'
7311   { (eval echo "$as_me:7311: \"$ac_try\"") >&5
7312   (eval $ac_try) 2>&5
7313   ac_status=$?
7314   echo "$as_me:7314: \$? = $ac_status" >&5
7315   (exit $ac_status); }; }; then
7316   cf_cv_define_sigwinch=maybe
7317 else
7318   echo "$as_me: failed program was:" >&5
7319 cat conftest.$ac_ext >&5
7320 cf_cv_define_sigwinch=no
7321 fi
7322 rm -f conftest.$ac_objext conftest.$ac_ext
7323
7324 fi
7325 rm -f conftest.$ac_objext conftest.$ac_ext
7326
7327 fi
7328 echo "$as_me:7328: result: $cf_cv_define_sigwinch" >&5
7329 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7330
7331 if test "$cf_cv_define_sigwinch" = maybe ; then
7332 echo "$as_me:7332: checking for actual SIGWINCH definition" >&5
7333 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7334 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7335   echo $ECHO_N "(cached) $ECHO_C" >&6
7336 else
7337
7338 cf_cv_fixup_sigwinch=unknown
7339 cf_sigwinch=32
7340 while test $cf_sigwinch != 1
7341 do
7342         cat >conftest.$ac_ext <<_ACEOF
7343 #line 7343 "configure"
7344 #include "confdefs.h"
7345
7346 #undef _XOPEN_SOURCE
7347 #undef _POSIX_SOURCE
7348 #undef _POSIX_C_SOURCE
7349 #include <sys/types.h>
7350 #include <sys/signal.h>
7351
7352 int
7353 main ()
7354 {
7355
7356 #if SIGWINCH != $cf_sigwinch
7357 make an error
7358 #endif
7359 int x = SIGWINCH
7360   ;
7361   return 0;
7362 }
7363 _ACEOF
7364 rm -f conftest.$ac_objext
7365 if { (eval echo "$as_me:7365: \"$ac_compile\"") >&5
7366   (eval $ac_compile) 2>&5
7367   ac_status=$?
7368   echo "$as_me:7368: \$? = $ac_status" >&5
7369   (exit $ac_status); } &&
7370          { ac_try='test -s conftest.$ac_objext'
7371   { (eval echo "$as_me:7371: \"$ac_try\"") >&5
7372   (eval $ac_try) 2>&5
7373   ac_status=$?
7374   echo "$as_me:7374: \$? = $ac_status" >&5
7375   (exit $ac_status); }; }; then
7376   cf_cv_fixup_sigwinch=$cf_sigwinch
7377          break
7378 else
7379   echo "$as_me: failed program was:" >&5
7380 cat conftest.$ac_ext >&5
7381 fi
7382 rm -f conftest.$ac_objext conftest.$ac_ext
7383
7384 cf_sigwinch=`expr $cf_sigwinch - 1`
7385 done
7386
7387 fi
7388 echo "$as_me:7388: result: $cf_cv_fixup_sigwinch" >&5
7389 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7390
7391         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7392                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7393         fi
7394 fi
7395
7396 # Checks for CODESET support.
7397
7398   echo "$as_me:7398: checking for nl_langinfo and CODESET" >&5
7399 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7400 if test "${am_cv_langinfo_codeset+set}" = set; then
7401   echo $ECHO_N "(cached) $ECHO_C" >&6
7402 else
7403   cat >conftest.$ac_ext <<_ACEOF
7404 #line 7404 "configure"
7405 #include "confdefs.h"
7406 #include <langinfo.h>
7407 int
7408 main ()
7409 {
7410 char* cs = nl_langinfo(CODESET);
7411   ;
7412   return 0;
7413 }
7414 _ACEOF
7415 rm -f conftest.$ac_objext conftest$ac_exeext
7416 if { (eval echo "$as_me:7416: \"$ac_link\"") >&5
7417   (eval $ac_link) 2>&5
7418   ac_status=$?
7419   echo "$as_me:7419: \$? = $ac_status" >&5
7420   (exit $ac_status); } &&
7421          { ac_try='test -s conftest$ac_exeext'
7422   { (eval echo "$as_me:7422: \"$ac_try\"") >&5
7423   (eval $ac_try) 2>&5
7424   ac_status=$?
7425   echo "$as_me:7425: \$? = $ac_status" >&5
7426   (exit $ac_status); }; }; then
7427   am_cv_langinfo_codeset=yes
7428 else
7429   echo "$as_me: failed program was:" >&5
7430 cat conftest.$ac_ext >&5
7431 am_cv_langinfo_codeset=no
7432 fi
7433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7434
7435 fi
7436 echo "$as_me:7436: result: $am_cv_langinfo_codeset" >&5
7437 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7438   if test $am_cv_langinfo_codeset = yes; then
7439
7440 cat >>confdefs.h <<\EOF
7441 #define HAVE_LANGINFO_CODESET 1
7442 EOF
7443
7444   fi
7445
7446 # use these variables to work around a defect in gcc's fixincludes.
7447 NCURSES_OK_WCHAR_T=
7448 NCURSES_OK_WINT_T=
7449
7450 echo "$as_me:7450: checking if you want wide-character code" >&5
7451 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7452
7453 # Check whether --enable-widec or --disable-widec was given.
7454 if test "${enable_widec+set}" = set; then
7455   enableval="$enable_widec"
7456   with_widec=$enableval
7457 else
7458   with_widec=no
7459 fi;
7460 echo "$as_me:7460: result: $with_widec" >&5
7461 echo "${ECHO_T}$with_widec" >&6
7462 if test "$with_widec" = yes ; then
7463         LIB_SUFFIX="w${LIB_SUFFIX}"
7464         cat >>confdefs.h <<\EOF
7465 #define USE_WIDEC_SUPPORT 1
7466 EOF
7467
7468         case "$CFLAGS $CPPFLAGS" in #(vi
7469         *-D_XOPEN_SOURCE=500) #(vi
7470                 ;;
7471         *)
7472
7473 echo "$as_me:7473: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7474 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7475 cat >conftest.$ac_ext <<_ACEOF
7476 #line 7476 "configure"
7477 #include "confdefs.h"
7478 #include <sys/types.h>
7479
7480 int
7481 main ()
7482 {
7483
7484 #ifndef _XOPEN_SOURCE_EXTENDED
7485 make an error
7486 #endif
7487   ;
7488   return 0;
7489 }
7490 _ACEOF
7491 rm -f conftest.$ac_objext
7492 if { (eval echo "$as_me:7492: \"$ac_compile\"") >&5
7493   (eval $ac_compile) 2>&5
7494   ac_status=$?
7495   echo "$as_me:7495: \$? = $ac_status" >&5
7496   (exit $ac_status); } &&
7497          { ac_try='test -s conftest.$ac_objext'
7498   { (eval echo "$as_me:7498: \"$ac_try\"") >&5
7499   (eval $ac_try) 2>&5
7500   ac_status=$?
7501   echo "$as_me:7501: \$? = $ac_status" >&5
7502   (exit $ac_status); }; }; then
7503   cf_result=no
7504 else
7505   echo "$as_me: failed program was:" >&5
7506 cat conftest.$ac_ext >&5
7507 cf_result=yes
7508 fi
7509 rm -f conftest.$ac_objext conftest.$ac_ext
7510 echo "$as_me:7510: result: $cf_result" >&5
7511 echo "${ECHO_T}$cf_result" >&6
7512
7513 if test "$cf_result" = yes ; then
7514         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7515 elif test "x" != "x" ; then
7516         echo "$as_me:7516: checking checking for compatible value versus " >&5
7517 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7518         cat >conftest.$ac_ext <<_ACEOF
7519 #line 7519 "configure"
7520 #include "confdefs.h"
7521 #include <sys/types.h>
7522
7523 int
7524 main ()
7525 {
7526
7527 #if _XOPEN_SOURCE_EXTENDED- < 0
7528 make an error
7529 #endif
7530   ;
7531   return 0;
7532 }
7533 _ACEOF
7534 rm -f conftest.$ac_objext
7535 if { (eval echo "$as_me:7535: \"$ac_compile\"") >&5
7536   (eval $ac_compile) 2>&5
7537   ac_status=$?
7538   echo "$as_me:7538: \$? = $ac_status" >&5
7539   (exit $ac_status); } &&
7540          { ac_try='test -s conftest.$ac_objext'
7541   { (eval echo "$as_me:7541: \"$ac_try\"") >&5
7542   (eval $ac_try) 2>&5
7543   ac_status=$?
7544   echo "$as_me:7544: \$? = $ac_status" >&5
7545   (exit $ac_status); }; }; then
7546   cf_result=yes
7547 else
7548   echo "$as_me: failed program was:" >&5
7549 cat conftest.$ac_ext >&5
7550 cf_result=no
7551 fi
7552 rm -f conftest.$ac_objext conftest.$ac_ext
7553         echo "$as_me:7553: result: $cf_result" >&5
7554 echo "${ECHO_T}$cf_result" >&6
7555         if test "$cf_result" = no ; then
7556                 # perhaps we can override it - try...
7557                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7558         fi
7559 fi
7560
7561                 ;;
7562         esac
7563
7564         # with_overwrite=no
7565         NCURSES_CH_T=cchar_t
7566
7567 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7568 do
7569 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7570 echo "$as_me:7570: checking for $ac_func" >&5
7571 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7572 if eval "test \"\${$as_ac_var+set}\" = set"; then
7573   echo $ECHO_N "(cached) $ECHO_C" >&6
7574 else
7575   cat >conftest.$ac_ext <<_ACEOF
7576 #line 7576 "configure"
7577 #include "confdefs.h"
7578 /* System header to define __stub macros and hopefully few prototypes,
7579     which can conflict with char $ac_func (); below.  */
7580 #include <assert.h>
7581 /* Override any gcc2 internal prototype to avoid an error.  */
7582 #ifdef __cplusplus
7583 extern "C"
7584 #endif
7585 /* We use char because int might match the return type of a gcc2
7586    builtin and then its argument prototype would still apply.  */
7587 char $ac_func ();
7588 char (*f) ();
7589
7590 int
7591 main ()
7592 {
7593 /* The GNU C library defines this for functions which it implements
7594     to always fail with ENOSYS.  Some functions are actually named
7595     something starting with __ and the normal name is an alias.  */
7596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7597 choke me
7598 #else
7599 f = $ac_func;
7600 #endif
7601
7602   ;
7603   return 0;
7604 }
7605 _ACEOF
7606 rm -f conftest.$ac_objext conftest$ac_exeext
7607 if { (eval echo "$as_me:7607: \"$ac_link\"") >&5
7608   (eval $ac_link) 2>&5
7609   ac_status=$?
7610   echo "$as_me:7610: \$? = $ac_status" >&5
7611   (exit $ac_status); } &&
7612          { ac_try='test -s conftest$ac_exeext'
7613   { (eval echo "$as_me:7613: \"$ac_try\"") >&5
7614   (eval $ac_try) 2>&5
7615   ac_status=$?
7616   echo "$as_me:7616: \$? = $ac_status" >&5
7617   (exit $ac_status); }; }; then
7618   eval "$as_ac_var=yes"
7619 else
7620   echo "$as_me: failed program was:" >&5
7621 cat conftest.$ac_ext >&5
7622 eval "$as_ac_var=no"
7623 fi
7624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7625 fi
7626 echo "$as_me:7626: result: `eval echo '${'$as_ac_var'}'`" >&5
7627 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7628 if test `eval echo '${'$as_ac_var'}'` = yes; then
7629   cat >>confdefs.h <<EOF
7630 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7631 EOF
7632
7633 fi
7634 done
7635
7636         if test "$ac_cv_func_putwc" != yes ; then
7637
7638 echo "$as_me:7638: checking for multibyte character support" >&5
7639 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7640 if test "${cf_cv_utf8_lib+set}" = set; then
7641   echo $ECHO_N "(cached) $ECHO_C" >&6
7642 else
7643
7644         cf_save_LIBS="$LIBS"
7645         cat >conftest.$ac_ext <<_ACEOF
7646 #line 7646 "configure"
7647 #include "confdefs.h"
7648
7649 #include <stdlib.h>
7650 int
7651 main ()
7652 {
7653 putwc(0,0);
7654   ;
7655   return 0;
7656 }
7657 _ACEOF
7658 rm -f conftest.$ac_objext conftest$ac_exeext
7659 if { (eval echo "$as_me:7659: \"$ac_link\"") >&5
7660   (eval $ac_link) 2>&5
7661   ac_status=$?
7662   echo "$as_me:7662: \$? = $ac_status" >&5
7663   (exit $ac_status); } &&
7664          { ac_try='test -s conftest$ac_exeext'
7665   { (eval echo "$as_me:7665: \"$ac_try\"") >&5
7666   (eval $ac_try) 2>&5
7667   ac_status=$?
7668   echo "$as_me:7668: \$? = $ac_status" >&5
7669   (exit $ac_status); }; }; then
7670   cf_cv_utf8_lib=yes
7671 else
7672   echo "$as_me: failed program was:" >&5
7673 cat conftest.$ac_ext >&5
7674
7675 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7676 # will be set on completion of the AC_TRY_LINK below.
7677 cf_cv_header_path_utf8=
7678 cf_cv_library_path_utf8=
7679
7680 echo "${as_me-configure}:7680: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7681
7682 cf_save_LIBS="$LIBS"
7683
7684 cat >conftest.$ac_ext <<_ACEOF
7685 #line 7685 "configure"
7686 #include "confdefs.h"
7687
7688 #include <libutf8.h>
7689 int
7690 main ()
7691 {
7692 putwc(0,0);
7693   ;
7694   return 0;
7695 }
7696 _ACEOF
7697 rm -f conftest.$ac_objext conftest$ac_exeext
7698 if { (eval echo "$as_me:7698: \"$ac_link\"") >&5
7699   (eval $ac_link) 2>&5
7700   ac_status=$?
7701   echo "$as_me:7701: \$? = $ac_status" >&5
7702   (exit $ac_status); } &&
7703          { ac_try='test -s conftest$ac_exeext'
7704   { (eval echo "$as_me:7704: \"$ac_try\"") >&5
7705   (eval $ac_try) 2>&5
7706   ac_status=$?
7707   echo "$as_me:7707: \$? = $ac_status" >&5
7708   (exit $ac_status); }; }; then
7709
7710         cf_cv_find_linkage_utf8=yes
7711         cf_cv_header_path_utf8=/usr/include
7712         cf_cv_library_path_utf8=/usr/lib
7713
7714 else
7715   echo "$as_me: failed program was:" >&5
7716 cat conftest.$ac_ext >&5
7717
7718 LIBS="-lutf8  $cf_save_LIBS"
7719
7720 cat >conftest.$ac_ext <<_ACEOF
7721 #line 7721 "configure"
7722 #include "confdefs.h"
7723
7724 #include <libutf8.h>
7725 int
7726 main ()
7727 {
7728 putwc(0,0);
7729   ;
7730   return 0;
7731 }
7732 _ACEOF
7733 rm -f conftest.$ac_objext conftest$ac_exeext
7734 if { (eval echo "$as_me:7734: \"$ac_link\"") >&5
7735   (eval $ac_link) 2>&5
7736   ac_status=$?
7737   echo "$as_me:7737: \$? = $ac_status" >&5
7738   (exit $ac_status); } &&
7739          { ac_try='test -s conftest$ac_exeext'
7740   { (eval echo "$as_me:7740: \"$ac_try\"") >&5
7741   (eval $ac_try) 2>&5
7742   ac_status=$?
7743   echo "$as_me:7743: \$? = $ac_status" >&5
7744   (exit $ac_status); }; }; then
7745
7746         cf_cv_find_linkage_utf8=yes
7747         cf_cv_header_path_utf8=/usr/include
7748         cf_cv_library_path_utf8=/usr/lib
7749         cf_cv_library_file_utf8="-lutf8"
7750
7751 else
7752   echo "$as_me: failed program was:" >&5
7753 cat conftest.$ac_ext >&5
7754
7755         cf_cv_find_linkage_utf8=no
7756         LIBS="$cf_save_LIBS"
7757
7758     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7759
7760 echo "${as_me-configure}:7760: testing find linkage for utf8 library ..." 1>&5
7761
7762 echo "${as_me-configure}:7762: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7763
7764     cf_save_CPPFLAGS="$CPPFLAGS"
7765     cf_test_CPPFLAGS="$CPPFLAGS"
7766
7767 cf_search=
7768
7769 # collect the current set of include-directories from compiler flags
7770 cf_header_path_list=""
7771 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7772         for cf_header_path in $CPPFLAGS $CFLAGS
7773         do
7774                 case $cf_header_path in #(vi
7775                 -I*)
7776                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7777
7778 test "$cf_header_path" != "NONE" && \
7779 test -d "$cf_header_path" && \
7780  {
7781         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7782         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7783         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7784         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7785         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7786         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7787 }
7788
7789                         cf_header_path_list="$cf_header_path_list $cf_search"
7790                         ;;
7791                 esac
7792         done
7793 fi
7794
7795 # add the variations for the package we are looking for
7796
7797 cf_search=
7798
7799 test "/usr" != "$prefix" && \
7800 test -d "/usr" && \
7801 (test $prefix = NONE || test -d $prefix) && {
7802         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7803         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7804         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7805         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7806         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7807         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7808 }
7809
7810 test "$prefix" != "NONE" && \
7811 test -d "$prefix" && \
7812  {
7813         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7814         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7815         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7816         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7817         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7818         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7819 }
7820
7821 test "/usr/local" != "$prefix" && \
7822 test -d "/usr/local" && \
7823 (test $prefix = NONE || test -d $prefix) && {
7824         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7825         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7826         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7827         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7828         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7829         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7830 }
7831
7832 test "/opt" != "$prefix" && \
7833 test -d "/opt" && \
7834 (test $prefix = NONE || test -d $prefix) && {
7835         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7836         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7837         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7838         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7839         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7840         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7841 }
7842
7843 test "$HOME" != "$prefix" && \
7844 test -d "$HOME" && \
7845 (test $prefix = NONE || test -d $prefix) && {
7846         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7847         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7848         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7849         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7850         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7851         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7852 }
7853
7854 test "$includedir" != NONE && \
7855 test "$includedir" != "/usr/include" && \
7856 test -d "$includedir" && {
7857         test -d $includedir &&    cf_search="$cf_search $includedir"
7858         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7859 }
7860
7861 test "$oldincludedir" != NONE && \
7862 test "$oldincludedir" != "/usr/include" && \
7863 test -d "$oldincludedir" && {
7864         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7865         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7866 }
7867
7868 cf_search="$cf_search $cf_header_path_list"
7869
7870     for cf_cv_header_path_utf8 in $cf_search
7871     do
7872       if test -d $cf_cv_header_path_utf8 ; then
7873         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7874
7875 echo "${as_me-configure}:7875: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7876
7877         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7878         cat >conftest.$ac_ext <<_ACEOF
7879 #line 7879 "configure"
7880 #include "confdefs.h"
7881
7882 #include <libutf8.h>
7883 int
7884 main ()
7885 {
7886 putwc(0,0);
7887   ;
7888   return 0;
7889 }
7890 _ACEOF
7891 rm -f conftest.$ac_objext
7892 if { (eval echo "$as_me:7892: \"$ac_compile\"") >&5
7893   (eval $ac_compile) 2>&5
7894   ac_status=$?
7895   echo "$as_me:7895: \$? = $ac_status" >&5
7896   (exit $ac_status); } &&
7897          { ac_try='test -s conftest.$ac_objext'
7898   { (eval echo "$as_me:7898: \"$ac_try\"") >&5
7899   (eval $ac_try) 2>&5
7900   ac_status=$?
7901   echo "$as_me:7901: \$? = $ac_status" >&5
7902   (exit $ac_status); }; }; then
7903
7904             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7905
7906 echo "${as_me-configure}:7906: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7907
7908             cf_cv_find_linkage_utf8=maybe
7909             cf_test_CPPFLAGS="$CPPFLAGS"
7910             break
7911 else
7912   echo "$as_me: failed program was:" >&5
7913 cat conftest.$ac_ext >&5
7914
7915             CPPFLAGS="$cf_save_CPPFLAGS"
7916
7917 fi
7918 rm -f conftest.$ac_objext conftest.$ac_ext
7919       fi
7920     done
7921
7922     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7923
7924 echo "${as_me-configure}:7924: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7925
7926       cf_save_LIBS="$LIBS"
7927       cf_save_LDFLAGS="$LDFLAGS"
7928
7929       if test "$cf_cv_find_linkage_utf8" != yes ; then
7930
7931 cf_search=
7932 cf_library_path_list=""
7933 if test -n "${LDFLAGS}${LIBS}" ; then
7934         for cf_library_path in $LDFLAGS $LIBS
7935         do
7936                 case $cf_library_path in #(vi
7937                 -L*)
7938                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7939
7940 test "$cf_library_path" != "NONE" && \
7941 test -d "$cf_library_path" && \
7942  {
7943         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7944         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7945         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7946         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7947         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7948         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7949 }
7950
7951                         cf_library_path_list="$cf_library_path_list $cf_search"
7952                         ;;
7953                 esac
7954         done
7955 fi
7956
7957 cf_search=
7958
7959 test "/usr" != "$prefix" && \
7960 test -d "/usr" && \
7961 (test $prefix = NONE || test -d $prefix) && {
7962         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7963         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7964         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7965         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7966         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7967         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7968 }
7969
7970 test "$prefix" != "NONE" && \
7971 test -d "$prefix" && \
7972  {
7973         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7974         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7975         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7976         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7977         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7978         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7979 }
7980
7981 test "/usr/local" != "$prefix" && \
7982 test -d "/usr/local" && \
7983 (test $prefix = NONE || test -d $prefix) && {
7984         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7985         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7986         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7987         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7988         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7989         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7990 }
7991
7992 test "/opt" != "$prefix" && \
7993 test -d "/opt" && \
7994 (test $prefix = NONE || test -d $prefix) && {
7995         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7996         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7997         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7998         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7999         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8000         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8001 }
8002
8003 test "$HOME" != "$prefix" && \
8004 test -d "$HOME" && \
8005 (test $prefix = NONE || test -d $prefix) && {
8006         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8007         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8008         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8009         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8010         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8011         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8012 }
8013
8014 cf_search="$cf_library_path_list $cf_search"
8015
8016         for cf_cv_library_path_utf8 in $cf_search
8017         do
8018           if test -d $cf_cv_library_path_utf8 ; then
8019             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8020
8021 echo "${as_me-configure}:8021: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8022
8023             CPPFLAGS="$cf_test_CPPFLAGS"
8024             LIBS="-lutf8  $cf_save_LIBS"
8025             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8026             cat >conftest.$ac_ext <<_ACEOF
8027 #line 8027 "configure"
8028 #include "confdefs.h"
8029
8030 #include <libutf8.h>
8031 int
8032 main ()
8033 {
8034 putwc(0,0);
8035   ;
8036   return 0;
8037 }
8038 _ACEOF
8039 rm -f conftest.$ac_objext conftest$ac_exeext
8040 if { (eval echo "$as_me:8040: \"$ac_link\"") >&5
8041   (eval $ac_link) 2>&5
8042   ac_status=$?
8043   echo "$as_me:8043: \$? = $ac_status" >&5
8044   (exit $ac_status); } &&
8045          { ac_try='test -s conftest$ac_exeext'
8046   { (eval echo "$as_me:8046: \"$ac_try\"") >&5
8047   (eval $ac_try) 2>&5
8048   ac_status=$?
8049   echo "$as_me:8049: \$? = $ac_status" >&5
8050   (exit $ac_status); }; }; then
8051
8052                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8053
8054 echo "${as_me-configure}:8054: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8055
8056                 cf_cv_find_linkage_utf8=yes
8057                 cf_cv_library_file_utf8="-lutf8"
8058                 break
8059 else
8060   echo "$as_me: failed program was:" >&5
8061 cat conftest.$ac_ext >&5
8062
8063                 CPPFLAGS="$cf_save_CPPFLAGS"
8064                 LIBS="$cf_save_LIBS"
8065                 LDFLAGS="$cf_save_LDFLAGS"
8066
8067 fi
8068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8069           fi
8070         done
8071         CPPFLAGS="$cf_save_CPPFLAGS"
8072         LDFLAGS="$cf_save_LDFLAGS"
8073       fi
8074
8075     else
8076       cf_cv_find_linkage_utf8=no
8077     fi
8078
8079 fi
8080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8081
8082 fi
8083 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8084
8085 LIBS="$cf_save_LIBS"
8086
8087 if test "$cf_cv_find_linkage_utf8" = yes ; then
8088 cf_cv_utf8_lib=add-on
8089 else
8090 cf_cv_utf8_lib=no
8091 fi
8092
8093 fi
8094 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8095 fi
8096 echo "$as_me:8096: result: $cf_cv_utf8_lib" >&5
8097 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8098
8099 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8100 # ncurses/ncursesw:
8101 if test "$cf_cv_utf8_lib" = "add-on" ; then
8102         cat >>confdefs.h <<\EOF
8103 #define HAVE_LIBUTF8_H 1
8104 EOF
8105
8106 if test -n "$cf_cv_header_path_utf8" ; then
8107   for cf_add_incdir in $cf_cv_header_path_utf8
8108   do
8109         while test $cf_add_incdir != /usr/include
8110         do
8111           if test -d $cf_add_incdir
8112           then
8113                 cf_have_incdir=no
8114                 if test -n "$CFLAGS$CPPFLAGS" ; then
8115                   # a loop is needed to ensure we can add subdirs of existing dirs
8116                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8117                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8118                           cf_have_incdir=yes; break
8119                         fi
8120                   done
8121                 fi
8122
8123                 if test "$cf_have_incdir" = no ; then
8124                   if test "$cf_add_incdir" = /usr/local/include ; then
8125                         if test "$GCC" = yes
8126                         then
8127                           cf_save_CPPFLAGS=$CPPFLAGS
8128                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8129                           cat >conftest.$ac_ext <<_ACEOF
8130 #line 8130 "configure"
8131 #include "confdefs.h"
8132 #include <stdio.h>
8133 int
8134 main ()
8135 {
8136 printf("Hello")
8137   ;
8138   return 0;
8139 }
8140 _ACEOF
8141 rm -f conftest.$ac_objext
8142 if { (eval echo "$as_me:8142: \"$ac_compile\"") >&5
8143   (eval $ac_compile) 2>&5
8144   ac_status=$?
8145   echo "$as_me:8145: \$? = $ac_status" >&5
8146   (exit $ac_status); } &&
8147          { ac_try='test -s conftest.$ac_objext'
8148   { (eval echo "$as_me:8148: \"$ac_try\"") >&5
8149   (eval $ac_try) 2>&5
8150   ac_status=$?
8151   echo "$as_me:8151: \$? = $ac_status" >&5
8152   (exit $ac_status); }; }; then
8153   :
8154 else
8155   echo "$as_me: failed program was:" >&5
8156 cat conftest.$ac_ext >&5
8157 cf_have_incdir=yes
8158 fi
8159 rm -f conftest.$ac_objext conftest.$ac_ext
8160                           CPPFLAGS=$cf_save_CPPFLAGS
8161                         fi
8162                   fi
8163                 fi
8164
8165                 if test "$cf_have_incdir" = no ; then
8166                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8167
8168 echo "${as_me-configure}:8168: testing adding $cf_add_incdir to include-path ..." 1>&5
8169
8170                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8171
8172                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8173                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8174                   cf_add_incdir="$cf_top_incdir"
8175                 else
8176                   break
8177                 fi
8178           fi
8179         done
8180   done
8181 fi
8182
8183 if test -n "$cf_cv_library_path_utf8" ; then
8184   for cf_add_libdir in $cf_cv_library_path_utf8
8185   do
8186     if test $cf_add_libdir = /usr/lib ; then
8187       :
8188     elif test -d $cf_add_libdir
8189     then
8190       cf_have_libdir=no
8191       if test -n "$LDFLAGS$LIBS" ; then
8192         # a loop is needed to ensure we can add subdirs of existing dirs
8193         for cf_test_libdir in $LDFLAGS $LIBS ; do
8194           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8195             cf_have_libdir=yes; break
8196           fi
8197         done
8198       fi
8199       if test "$cf_have_libdir" = no ; then
8200         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8201
8202 echo "${as_me-configure}:8202: testing adding $cf_add_libdir to library-path ..." 1>&5
8203
8204         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8205       fi
8206     fi
8207   done
8208 fi
8209
8210         LIBS="$cf_cv_library_file_utf8 $LIBS"
8211 fi
8212
8213                 if test "$cf_cv_utf8_lib" != no ; then
8214                         NCURSES_LIBUTF8=1
8215                 fi
8216         fi
8217
8218 # This is needed on Tru64 5.0 to declare mbstate_t
8219 echo "$as_me:8219: checking if we must include wchar.h to declare mbstate_t" >&5
8220 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8221 if test "${cf_cv_mbstate_t+set}" = set; then
8222   echo $ECHO_N "(cached) $ECHO_C" >&6
8223 else
8224
8225 cat >conftest.$ac_ext <<_ACEOF
8226 #line 8226 "configure"
8227 #include "confdefs.h"
8228
8229 #include <stdlib.h>
8230 #include <stdarg.h>
8231 #include <stdio.h>
8232 #ifdef HAVE_LIBUTF8_H
8233 #include <libutf8.h>
8234 #endif
8235 int
8236 main ()
8237 {
8238 mbstate_t state
8239   ;
8240   return 0;
8241 }
8242 _ACEOF
8243 rm -f conftest.$ac_objext
8244 if { (eval echo "$as_me:8244: \"$ac_compile\"") >&5
8245   (eval $ac_compile) 2>&5
8246   ac_status=$?
8247   echo "$as_me:8247: \$? = $ac_status" >&5
8248   (exit $ac_status); } &&
8249          { ac_try='test -s conftest.$ac_objext'
8250   { (eval echo "$as_me:8250: \"$ac_try\"") >&5
8251   (eval $ac_try) 2>&5
8252   ac_status=$?
8253   echo "$as_me:8253: \$? = $ac_status" >&5
8254   (exit $ac_status); }; }; then
8255   cf_cv_mbstate_t=no
8256 else
8257   echo "$as_me: failed program was:" >&5
8258 cat conftest.$ac_ext >&5
8259 cat >conftest.$ac_ext <<_ACEOF
8260 #line 8260 "configure"
8261 #include "confdefs.h"
8262
8263 #include <stdlib.h>
8264 #include <stdarg.h>
8265 #include <stdio.h>
8266 #include <wchar.h>
8267 #ifdef HAVE_LIBUTF8_H
8268 #include <libutf8.h>
8269 #endif
8270 int
8271 main ()
8272 {
8273 mbstate_t value
8274   ;
8275   return 0;
8276 }
8277 _ACEOF
8278 rm -f conftest.$ac_objext
8279 if { (eval echo "$as_me:8279: \"$ac_compile\"") >&5
8280   (eval $ac_compile) 2>&5
8281   ac_status=$?
8282   echo "$as_me:8282: \$? = $ac_status" >&5
8283   (exit $ac_status); } &&
8284          { ac_try='test -s conftest.$ac_objext'
8285   { (eval echo "$as_me:8285: \"$ac_try\"") >&5
8286   (eval $ac_try) 2>&5
8287   ac_status=$?
8288   echo "$as_me:8288: \$? = $ac_status" >&5
8289   (exit $ac_status); }; }; then
8290   cf_cv_mbstate_t=yes
8291 else
8292   echo "$as_me: failed program was:" >&5
8293 cat conftest.$ac_ext >&5
8294 cf_cv_mbstate_t=unknown
8295 fi
8296 rm -f conftest.$ac_objext conftest.$ac_ext
8297 fi
8298 rm -f conftest.$ac_objext conftest.$ac_ext
8299 fi
8300 echo "$as_me:8300: result: $cf_cv_mbstate_t" >&5
8301 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8302
8303 if test "$cf_cv_mbstate_t" = yes ; then
8304         cat >>confdefs.h <<\EOF
8305 #define NEED_WCHAR_H 1
8306 EOF
8307
8308         NEED_WCHAR_H=1
8309 fi
8310
8311 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8312 if test "$cf_cv_mbstate_t" = unknown ; then
8313         NCURSES_MBSTATE_T=1
8314 fi
8315
8316 # This is needed on Tru64 5.0 to declare wchar_t
8317 echo "$as_me:8317: checking if we must include wchar.h to declare wchar_t" >&5
8318 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8319 if test "${cf_cv_wchar_t+set}" = set; then
8320   echo $ECHO_N "(cached) $ECHO_C" >&6
8321 else
8322
8323 cat >conftest.$ac_ext <<_ACEOF
8324 #line 8324 "configure"
8325 #include "confdefs.h"
8326
8327 #include <stdlib.h>
8328 #include <stdarg.h>
8329 #include <stdio.h>
8330 #ifdef HAVE_LIBUTF8_H
8331 #include <libutf8.h>
8332 #endif
8333 int
8334 main ()
8335 {
8336 wchar_t state
8337   ;
8338   return 0;
8339 }
8340 _ACEOF
8341 rm -f conftest.$ac_objext
8342 if { (eval echo "$as_me:8342: \"$ac_compile\"") >&5
8343   (eval $ac_compile) 2>&5
8344   ac_status=$?
8345   echo "$as_me:8345: \$? = $ac_status" >&5
8346   (exit $ac_status); } &&
8347          { ac_try='test -s conftest.$ac_objext'
8348   { (eval echo "$as_me:8348: \"$ac_try\"") >&5
8349   (eval $ac_try) 2>&5
8350   ac_status=$?
8351   echo "$as_me:8351: \$? = $ac_status" >&5
8352   (exit $ac_status); }; }; then
8353   cf_cv_wchar_t=no
8354 else
8355   echo "$as_me: failed program was:" >&5
8356 cat conftest.$ac_ext >&5
8357 cat >conftest.$ac_ext <<_ACEOF
8358 #line 8358 "configure"
8359 #include "confdefs.h"
8360
8361 #include <stdlib.h>
8362 #include <stdarg.h>
8363 #include <stdio.h>
8364 #include <wchar.h>
8365 #ifdef HAVE_LIBUTF8_H
8366 #include <libutf8.h>
8367 #endif
8368 int
8369 main ()
8370 {
8371 wchar_t value
8372   ;
8373   return 0;
8374 }
8375 _ACEOF
8376 rm -f conftest.$ac_objext
8377 if { (eval echo "$as_me:8377: \"$ac_compile\"") >&5
8378   (eval $ac_compile) 2>&5
8379   ac_status=$?
8380   echo "$as_me:8380: \$? = $ac_status" >&5
8381   (exit $ac_status); } &&
8382          { ac_try='test -s conftest.$ac_objext'
8383   { (eval echo "$as_me:8383: \"$ac_try\"") >&5
8384   (eval $ac_try) 2>&5
8385   ac_status=$?
8386   echo "$as_me:8386: \$? = $ac_status" >&5
8387   (exit $ac_status); }; }; then
8388   cf_cv_wchar_t=yes
8389 else
8390   echo "$as_me: failed program was:" >&5
8391 cat conftest.$ac_ext >&5
8392 cf_cv_wchar_t=unknown
8393 fi
8394 rm -f conftest.$ac_objext conftest.$ac_ext
8395 fi
8396 rm -f conftest.$ac_objext conftest.$ac_ext
8397 fi
8398 echo "$as_me:8398: result: $cf_cv_wchar_t" >&5
8399 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8400
8401 if test "$cf_cv_wchar_t" = yes ; then
8402         cat >>confdefs.h <<\EOF
8403 #define NEED_WCHAR_H 1
8404 EOF
8405
8406         NEED_WCHAR_H=1
8407 fi
8408
8409 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8410 if test "$cf_cv_wchar_t" = unknown ; then
8411         NCURSES_WCHAR_T=1
8412 fi
8413
8414 # if we find wchar_t in either place, use substitution to provide a fallback.
8415 if test "$cf_cv_wchar_t" != unknown ; then
8416         NCURSES_OK_WCHAR_T=1
8417 fi
8418
8419 # This is needed on Tru64 5.0 to declare wint_t
8420 echo "$as_me:8420: checking if we must include wchar.h to declare wint_t" >&5
8421 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8422 if test "${cf_cv_wint_t+set}" = set; then
8423   echo $ECHO_N "(cached) $ECHO_C" >&6
8424 else
8425
8426 cat >conftest.$ac_ext <<_ACEOF
8427 #line 8427 "configure"
8428 #include "confdefs.h"
8429
8430 #include <stdlib.h>
8431 #include <stdarg.h>
8432 #include <stdio.h>
8433 #ifdef HAVE_LIBUTF8_H
8434 #include <libutf8.h>
8435 #endif
8436 int
8437 main ()
8438 {
8439 wint_t state
8440   ;
8441   return 0;
8442 }
8443 _ACEOF
8444 rm -f conftest.$ac_objext
8445 if { (eval echo "$as_me:8445: \"$ac_compile\"") >&5
8446   (eval $ac_compile) 2>&5
8447   ac_status=$?
8448   echo "$as_me:8448: \$? = $ac_status" >&5
8449   (exit $ac_status); } &&
8450          { ac_try='test -s conftest.$ac_objext'
8451   { (eval echo "$as_me:8451: \"$ac_try\"") >&5
8452   (eval $ac_try) 2>&5
8453   ac_status=$?
8454   echo "$as_me:8454: \$? = $ac_status" >&5
8455   (exit $ac_status); }; }; then
8456   cf_cv_wint_t=no
8457 else
8458   echo "$as_me: failed program was:" >&5
8459 cat conftest.$ac_ext >&5
8460 cat >conftest.$ac_ext <<_ACEOF
8461 #line 8461 "configure"
8462 #include "confdefs.h"
8463
8464 #include <stdlib.h>
8465 #include <stdarg.h>
8466 #include <stdio.h>
8467 #include <wchar.h>
8468 #ifdef HAVE_LIBUTF8_H
8469 #include <libutf8.h>
8470 #endif
8471 int
8472 main ()
8473 {
8474 wint_t value
8475   ;
8476   return 0;
8477 }
8478 _ACEOF
8479 rm -f conftest.$ac_objext
8480 if { (eval echo "$as_me:8480: \"$ac_compile\"") >&5
8481   (eval $ac_compile) 2>&5
8482   ac_status=$?
8483   echo "$as_me:8483: \$? = $ac_status" >&5
8484   (exit $ac_status); } &&
8485          { ac_try='test -s conftest.$ac_objext'
8486   { (eval echo "$as_me:8486: \"$ac_try\"") >&5
8487   (eval $ac_try) 2>&5
8488   ac_status=$?
8489   echo "$as_me:8489: \$? = $ac_status" >&5
8490   (exit $ac_status); }; }; then
8491   cf_cv_wint_t=yes
8492 else
8493   echo "$as_me: failed program was:" >&5
8494 cat conftest.$ac_ext >&5
8495 cf_cv_wint_t=unknown
8496 fi
8497 rm -f conftest.$ac_objext conftest.$ac_ext
8498 fi
8499 rm -f conftest.$ac_objext conftest.$ac_ext
8500 fi
8501 echo "$as_me:8501: result: $cf_cv_wint_t" >&5
8502 echo "${ECHO_T}$cf_cv_wint_t" >&6
8503
8504 if test "$cf_cv_wint_t" = yes ; then
8505         cat >>confdefs.h <<\EOF
8506 #define NEED_WCHAR_H 1
8507 EOF
8508
8509         NEED_WCHAR_H=1
8510 fi
8511
8512 # if we do not find wint_t in either place, use substitution to provide a fallback.
8513 if test "$cf_cv_wint_t" = unknown ; then
8514         NCURSES_WINT_T=1
8515 fi
8516
8517 # if we find wint_t in either place, use substitution to provide a fallback.
8518 if test "$cf_cv_wint_t" != unknown ; then
8519         NCURSES_OK_WINT_T=1
8520 fi
8521
8522         if test "$NCURSES_MBSTATE_T" != 0; then
8523                 cat >>confdefs.h <<\EOF
8524 #define NEED_MBSTATE_T_DEF 1
8525 EOF
8526
8527         fi
8528 fi
8529
8530 ###   use option --disable-lp64 to allow long chtype
8531 case $cf_cv_abi_version in
8532 [345]*)
8533         default_with_lp64=no
8534         ;;
8535 *)
8536         default_with_lp64=yes
8537         ;;
8538 esac
8539
8540 echo "$as_me:8540: checking whether to enable _LP64 definition in curses.h" >&5
8541 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8542
8543 # Check whether --enable-lp64 or --disable-lp64 was given.
8544 if test "${enable_lp64+set}" = set; then
8545   enableval="$enable_lp64"
8546   with_lp64=$enableval
8547 else
8548   with_lp64=$default_with_lp64
8549 fi;
8550 echo "$as_me:8550: result: $with_lp64" >&5
8551 echo "${ECHO_T}$with_lp64" >&6
8552
8553 if test "$with_lp64" = yes ; then
8554         cf_cv_enable_lp64=1
8555 else
8556         cf_cv_enable_lp64=0
8557 fi
8558
8559 # Check whether --enable-largefile or --disable-largefile was given.
8560 if test "${enable_largefile+set}" = set; then
8561   enableval="$enable_largefile"
8562
8563 fi;
8564 if test "$enable_largefile" != no; then
8565
8566   echo "$as_me:8566: checking for special C compiler options needed for large files" >&5
8567 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8568 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8569   echo $ECHO_N "(cached) $ECHO_C" >&6
8570 else
8571   ac_cv_sys_largefile_CC=no
8572      if test "$GCC" != yes; then
8573        ac_save_CC=$CC
8574        while :; do
8575          # IRIX 6.2 and later do not support large files by default,
8576          # so use the C compiler's -n32 option if that helps.
8577          cat >conftest.$ac_ext <<_ACEOF
8578 #line 8578 "configure"
8579 #include "confdefs.h"
8580 #include <sys/types.h>
8581  /* Check that off_t can represent 2**63 - 1 correctly.
8582     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8583     since some C++ compilers masquerading as C compilers
8584     incorrectly reject 9223372036854775807.  */
8585 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8586   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8587                        && LARGE_OFF_T % 2147483647 == 1)
8588                       ? 1 : -1];
8589 int
8590 main ()
8591 {
8592
8593   ;
8594   return 0;
8595 }
8596 _ACEOF
8597          rm -f conftest.$ac_objext
8598 if { (eval echo "$as_me:8598: \"$ac_compile\"") >&5
8599   (eval $ac_compile) 2>&5
8600   ac_status=$?
8601   echo "$as_me:8601: \$? = $ac_status" >&5
8602   (exit $ac_status); } &&
8603          { ac_try='test -s conftest.$ac_objext'
8604   { (eval echo "$as_me:8604: \"$ac_try\"") >&5
8605   (eval $ac_try) 2>&5
8606   ac_status=$?
8607   echo "$as_me:8607: \$? = $ac_status" >&5
8608   (exit $ac_status); }; }; then
8609   break
8610 else
8611   echo "$as_me: failed program was:" >&5
8612 cat conftest.$ac_ext >&5
8613 fi
8614 rm -f conftest.$ac_objext
8615          CC="$CC -n32"
8616          rm -f conftest.$ac_objext
8617 if { (eval echo "$as_me:8617: \"$ac_compile\"") >&5
8618   (eval $ac_compile) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); } &&
8622          { ac_try='test -s conftest.$ac_objext'
8623   { (eval echo "$as_me:8623: \"$ac_try\"") >&5
8624   (eval $ac_try) 2>&5
8625   ac_status=$?
8626   echo "$as_me:8626: \$? = $ac_status" >&5
8627   (exit $ac_status); }; }; then
8628   ac_cv_sys_largefile_CC=' -n32'; break
8629 else
8630   echo "$as_me: failed program was:" >&5
8631 cat conftest.$ac_ext >&5
8632 fi
8633 rm -f conftest.$ac_objext
8634          break
8635        done
8636        CC=$ac_save_CC
8637        rm -f conftest.$ac_ext
8638     fi
8639 fi
8640 echo "$as_me:8640: result: $ac_cv_sys_largefile_CC" >&5
8641 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8642   if test "$ac_cv_sys_largefile_CC" != no; then
8643     CC=$CC$ac_cv_sys_largefile_CC
8644   fi
8645
8646   echo "$as_me:8646: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8647 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8648 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8649   echo $ECHO_N "(cached) $ECHO_C" >&6
8650 else
8651   while :; do
8652   ac_cv_sys_file_offset_bits=no
8653   cat >conftest.$ac_ext <<_ACEOF
8654 #line 8654 "configure"
8655 #include "confdefs.h"
8656 #include <sys/types.h>
8657  /* Check that off_t can represent 2**63 - 1 correctly.
8658     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8659     since some C++ compilers masquerading as C compilers
8660     incorrectly reject 9223372036854775807.  */
8661 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8662   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8663                        && LARGE_OFF_T % 2147483647 == 1)
8664                       ? 1 : -1];
8665 int
8666 main ()
8667 {
8668
8669   ;
8670   return 0;
8671 }
8672 _ACEOF
8673 rm -f conftest.$ac_objext
8674 if { (eval echo "$as_me:8674: \"$ac_compile\"") >&5
8675   (eval $ac_compile) 2>&5
8676   ac_status=$?
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit $ac_status); } &&
8679          { ac_try='test -s conftest.$ac_objext'
8680   { (eval echo "$as_me:8680: \"$ac_try\"") >&5
8681   (eval $ac_try) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); }; }; then
8685   break
8686 else
8687   echo "$as_me: failed program was:" >&5
8688 cat conftest.$ac_ext >&5
8689 fi
8690 rm -f conftest.$ac_objext conftest.$ac_ext
8691   cat >conftest.$ac_ext <<_ACEOF
8692 #line 8692 "configure"
8693 #include "confdefs.h"
8694 #define _FILE_OFFSET_BITS 64
8695 #include <sys/types.h>
8696  /* Check that off_t can represent 2**63 - 1 correctly.
8697     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8698     since some C++ compilers masquerading as C compilers
8699     incorrectly reject 9223372036854775807.  */
8700 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8701   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8702                        && LARGE_OFF_T % 2147483647 == 1)
8703                       ? 1 : -1];
8704 int
8705 main ()
8706 {
8707
8708   ;
8709   return 0;
8710 }
8711 _ACEOF
8712 rm -f conftest.$ac_objext
8713 if { (eval echo "$as_me:8713: \"$ac_compile\"") >&5
8714   (eval $ac_compile) 2>&5
8715   ac_status=$?
8716   echo "$as_me:8716: \$? = $ac_status" >&5
8717   (exit $ac_status); } &&
8718          { ac_try='test -s conftest.$ac_objext'
8719   { (eval echo "$as_me:8719: \"$ac_try\"") >&5
8720   (eval $ac_try) 2>&5
8721   ac_status=$?
8722   echo "$as_me:8722: \$? = $ac_status" >&5
8723   (exit $ac_status); }; }; then
8724   ac_cv_sys_file_offset_bits=64; break
8725 else
8726   echo "$as_me: failed program was:" >&5
8727 cat conftest.$ac_ext >&5
8728 fi
8729 rm -f conftest.$ac_objext conftest.$ac_ext
8730   break
8731 done
8732 fi
8733 echo "$as_me:8733: result: $ac_cv_sys_file_offset_bits" >&5
8734 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8735 if test "$ac_cv_sys_file_offset_bits" != no; then
8736
8737 cat >>confdefs.h <<EOF
8738 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8739 EOF
8740
8741 fi
8742 rm -f conftest*
8743   echo "$as_me:8743: checking for _LARGE_FILES value needed for large files" >&5
8744 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8745 if test "${ac_cv_sys_large_files+set}" = set; then
8746   echo $ECHO_N "(cached) $ECHO_C" >&6
8747 else
8748   while :; do
8749   ac_cv_sys_large_files=no
8750   cat >conftest.$ac_ext <<_ACEOF
8751 #line 8751 "configure"
8752 #include "confdefs.h"
8753 #include <sys/types.h>
8754  /* Check that off_t can represent 2**63 - 1 correctly.
8755     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8756     since some C++ compilers masquerading as C compilers
8757     incorrectly reject 9223372036854775807.  */
8758 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8759   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8760                        && LARGE_OFF_T % 2147483647 == 1)
8761                       ? 1 : -1];
8762 int
8763 main ()
8764 {
8765
8766   ;
8767   return 0;
8768 }
8769 _ACEOF
8770 rm -f conftest.$ac_objext
8771 if { (eval echo "$as_me:8771: \"$ac_compile\"") >&5
8772   (eval $ac_compile) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); } &&
8776          { ac_try='test -s conftest.$ac_objext'
8777   { (eval echo "$as_me:8777: \"$ac_try\"") >&5
8778   (eval $ac_try) 2>&5
8779   ac_status=$?
8780   echo "$as_me:8780: \$? = $ac_status" >&5
8781   (exit $ac_status); }; }; then
8782   break
8783 else
8784   echo "$as_me: failed program was:" >&5
8785 cat conftest.$ac_ext >&5
8786 fi
8787 rm -f conftest.$ac_objext conftest.$ac_ext
8788   cat >conftest.$ac_ext <<_ACEOF
8789 #line 8789 "configure"
8790 #include "confdefs.h"
8791 #define _LARGE_FILES 1
8792 #include <sys/types.h>
8793  /* Check that off_t can represent 2**63 - 1 correctly.
8794     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8795     since some C++ compilers masquerading as C compilers
8796     incorrectly reject 9223372036854775807.  */
8797 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8798   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8799                        && LARGE_OFF_T % 2147483647 == 1)
8800                       ? 1 : -1];
8801 int
8802 main ()
8803 {
8804
8805   ;
8806   return 0;
8807 }
8808 _ACEOF
8809 rm -f conftest.$ac_objext
8810 if { (eval echo "$as_me:8810: \"$ac_compile\"") >&5
8811   (eval $ac_compile) 2>&5
8812   ac_status=$?
8813   echo "$as_me:8813: \$? = $ac_status" >&5
8814   (exit $ac_status); } &&
8815          { ac_try='test -s conftest.$ac_objext'
8816   { (eval echo "$as_me:8816: \"$ac_try\"") >&5
8817   (eval $ac_try) 2>&5
8818   ac_status=$?
8819   echo "$as_me:8819: \$? = $ac_status" >&5
8820   (exit $ac_status); }; }; then
8821   ac_cv_sys_large_files=1; break
8822 else
8823   echo "$as_me: failed program was:" >&5
8824 cat conftest.$ac_ext >&5
8825 fi
8826 rm -f conftest.$ac_objext conftest.$ac_ext
8827   break
8828 done
8829 fi
8830 echo "$as_me:8830: result: $ac_cv_sys_large_files" >&5
8831 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8832 if test "$ac_cv_sys_large_files" != no; then
8833
8834 cat >>confdefs.h <<EOF
8835 #define _LARGE_FILES $ac_cv_sys_large_files
8836 EOF
8837
8838 fi
8839 rm -f conftest*
8840 fi
8841
8842     if test "$enable_largefile" != no ; then
8843         echo "$as_me:8843: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8844 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8845 if test "${ac_cv_sys_largefile_source+set}" = set; then
8846   echo $ECHO_N "(cached) $ECHO_C" >&6
8847 else
8848   while :; do
8849   ac_cv_sys_largefile_source=no
8850   cat >conftest.$ac_ext <<_ACEOF
8851 #line 8851 "configure"
8852 #include "confdefs.h"
8853 #include <stdio.h>
8854 int
8855 main ()
8856 {
8857 return !fseeko;
8858   ;
8859   return 0;
8860 }
8861 _ACEOF
8862 rm -f conftest.$ac_objext
8863 if { (eval echo "$as_me:8863: \"$ac_compile\"") >&5
8864   (eval $ac_compile) 2>&5
8865   ac_status=$?
8866   echo "$as_me:8866: \$? = $ac_status" >&5
8867   (exit $ac_status); } &&
8868          { ac_try='test -s conftest.$ac_objext'
8869   { (eval echo "$as_me:8869: \"$ac_try\"") >&5
8870   (eval $ac_try) 2>&5
8871   ac_status=$?
8872   echo "$as_me:8872: \$? = $ac_status" >&5
8873   (exit $ac_status); }; }; then
8874   break
8875 else
8876   echo "$as_me: failed program was:" >&5
8877 cat conftest.$ac_ext >&5
8878 fi
8879 rm -f conftest.$ac_objext conftest.$ac_ext
8880   cat >conftest.$ac_ext <<_ACEOF
8881 #line 8881 "configure"
8882 #include "confdefs.h"
8883 #define _LARGEFILE_SOURCE 1
8884 #include <stdio.h>
8885 int
8886 main ()
8887 {
8888 return !fseeko;
8889   ;
8890   return 0;
8891 }
8892 _ACEOF
8893 rm -f conftest.$ac_objext
8894 if { (eval echo "$as_me:8894: \"$ac_compile\"") >&5
8895   (eval $ac_compile) 2>&5
8896   ac_status=$?
8897   echo "$as_me:8897: \$? = $ac_status" >&5
8898   (exit $ac_status); } &&
8899          { ac_try='test -s conftest.$ac_objext'
8900   { (eval echo "$as_me:8900: \"$ac_try\"") >&5
8901   (eval $ac_try) 2>&5
8902   ac_status=$?
8903   echo "$as_me:8903: \$? = $ac_status" >&5
8904   (exit $ac_status); }; }; then
8905   ac_cv_sys_largefile_source=1; break
8906 else
8907   echo "$as_me: failed program was:" >&5
8908 cat conftest.$ac_ext >&5
8909 fi
8910 rm -f conftest.$ac_objext conftest.$ac_ext
8911   break
8912 done
8913 fi
8914 echo "$as_me:8914: result: $ac_cv_sys_largefile_source" >&5
8915 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8916 if test "$ac_cv_sys_largefile_source" != no; then
8917
8918 cat >>confdefs.h <<EOF
8919 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8920 EOF
8921
8922 fi
8923 rm -f conftest*
8924
8925 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8926 # in glibc 2.1.3, but that breaks too many other things.
8927 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8928 echo "$as_me:8928: checking for fseeko" >&5
8929 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8930 if test "${ac_cv_func_fseeko+set}" = set; then
8931   echo $ECHO_N "(cached) $ECHO_C" >&6
8932 else
8933   cat >conftest.$ac_ext <<_ACEOF
8934 #line 8934 "configure"
8935 #include "confdefs.h"
8936 #include <stdio.h>
8937 int
8938 main ()
8939 {
8940 return fseeko && fseeko (stdin, 0, 0);
8941   ;
8942   return 0;
8943 }
8944 _ACEOF
8945 rm -f conftest.$ac_objext conftest$ac_exeext
8946 if { (eval echo "$as_me:8946: \"$ac_link\"") >&5
8947   (eval $ac_link) 2>&5
8948   ac_status=$?
8949   echo "$as_me:8949: \$? = $ac_status" >&5
8950   (exit $ac_status); } &&
8951          { ac_try='test -s conftest$ac_exeext'
8952   { (eval echo "$as_me:8952: \"$ac_try\"") >&5
8953   (eval $ac_try) 2>&5
8954   ac_status=$?
8955   echo "$as_me:8955: \$? = $ac_status" >&5
8956   (exit $ac_status); }; }; then
8957   ac_cv_func_fseeko=yes
8958 else
8959   echo "$as_me: failed program was:" >&5
8960 cat conftest.$ac_ext >&5
8961 ac_cv_func_fseeko=no
8962 fi
8963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8964 fi
8965 echo "$as_me:8965: result: $ac_cv_func_fseeko" >&5
8966 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8967 if test $ac_cv_func_fseeko = yes; then
8968
8969 cat >>confdefs.h <<\EOF
8970 #define HAVE_FSEEKO 1
8971 EOF
8972
8973 fi
8974
8975         # Normally we would collect these definitions in the config.h,
8976         # but (like _XOPEN_SOURCE), some environments rely on having these
8977         # defined before any of the system headers are included.  Another
8978         # case comes up with C++, e.g., on AIX the compiler compiles the
8979         # header files by themselves before looking at the body files it is
8980         # told to compile.  For ncurses, those header files do not include
8981         # the config.h
8982         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8983         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8984         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8985
8986         echo "$as_me:8986: checking whether to use struct dirent64" >&5
8987 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8988 if test "${cf_cv_struct_dirent64+set}" = set; then
8989   echo $ECHO_N "(cached) $ECHO_C" >&6
8990 else
8991
8992                 cat >conftest.$ac_ext <<_ACEOF
8993 #line 8993 "configure"
8994 #include "confdefs.h"
8995
8996 #include <sys/types.h>
8997 #include <dirent.h>
8998
8999 int
9000 main ()
9001 {
9002
9003                 /* if transitional largefile support is setup, this is true */
9004                 extern struct dirent64 * readdir(DIR *);
9005                 struct dirent64 *x = readdir((DIR *)0);
9006                 struct dirent *y = readdir((DIR *)0);
9007                 int z = x - y;
9008
9009   ;
9010   return 0;
9011 }
9012 _ACEOF
9013 rm -f conftest.$ac_objext
9014 if { (eval echo "$as_me:9014: \"$ac_compile\"") >&5
9015   (eval $ac_compile) 2>&5
9016   ac_status=$?
9017   echo "$as_me:9017: \$? = $ac_status" >&5
9018   (exit $ac_status); } &&
9019          { ac_try='test -s conftest.$ac_objext'
9020   { (eval echo "$as_me:9020: \"$ac_try\"") >&5
9021   (eval $ac_try) 2>&5
9022   ac_status=$?
9023   echo "$as_me:9023: \$? = $ac_status" >&5
9024   (exit $ac_status); }; }; then
9025   cf_cv_struct_dirent64=yes
9026 else
9027   echo "$as_me: failed program was:" >&5
9028 cat conftest.$ac_ext >&5
9029 cf_cv_struct_dirent64=no
9030 fi
9031 rm -f conftest.$ac_objext conftest.$ac_ext
9032
9033 fi
9034 echo "$as_me:9034: result: $cf_cv_struct_dirent64" >&5
9035 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9036         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9037 #define HAVE_STRUCT_DIRENT64 1
9038 EOF
9039
9040     fi
9041
9042 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9043 echo "$as_me:9043: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9044 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9045
9046 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9047 if test "${enable_tparm_varargs+set}" = set; then
9048   enableval="$enable_tparm_varargs"
9049   with_tparm_varargs=$enableval
9050 else
9051   with_tparm_varargs=yes
9052 fi;
9053 echo "$as_me:9053: result: $with_tparm_varargs" >&5
9054 echo "${ECHO_T}$with_tparm_varargs" >&6
9055 NCURSES_TPARM_VARARGS=0
9056 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9057
9058 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9059 if test "$with_ticlib" != no ; then
9060 echo "$as_me:9060: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9061 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9062
9063 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9064 if test "${enable_tic_depends+set}" = set; then
9065   enableval="$enable_tic_depends"
9066   with_tic_depends=$enableval
9067 else
9068   with_tic_depends=yes
9069 fi;
9070 echo "$as_me:9070: result: $with_tic_depends" >&5
9071 echo "${ECHO_T}$with_tic_depends" >&6
9072 else
9073         with_tic_depends=no
9074 fi
9075
9076 ###   use option --with-bool to override bool's type
9077 echo "$as_me:9077: checking for type of bool" >&5
9078 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9079
9080 # Check whether --with-bool or --without-bool was given.
9081 if test "${with_bool+set}" = set; then
9082   withval="$with_bool"
9083   NCURSES_BOOL="$withval"
9084 else
9085   NCURSES_BOOL=auto
9086 fi;
9087 echo "$as_me:9087: result: $NCURSES_BOOL" >&5
9088 echo "${ECHO_T}$NCURSES_BOOL" >&6
9089
9090 echo "$as_me:9090: checking for alternate terminal capabilities file" >&5
9091 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9092
9093 # Check whether --with-caps or --without-caps was given.
9094 if test "${with_caps+set}" = set; then
9095   withval="$with_caps"
9096   TERMINFO_CAPS=Caps.$withval
9097 else
9098   TERMINFO_CAPS=Caps
9099 fi;
9100 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9101 echo "$as_me:9101: result: $TERMINFO_CAPS" >&5
9102 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9103
9104 ###   use option --with-chtype to override chtype's type
9105 echo "$as_me:9105: checking for type of chtype" >&5
9106 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9107
9108 # Check whether --with-chtype or --without-chtype was given.
9109 if test "${with_chtype+set}" = set; then
9110   withval="$with_chtype"
9111   NCURSES_CHTYPE="$withval"
9112 else
9113   NCURSES_CHTYPE=auto
9114 fi;
9115 echo "$as_me:9115: result: $NCURSES_CHTYPE" >&5
9116 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9117
9118 ###   use option --with-ospeed to override ospeed's type
9119 echo "$as_me:9119: checking for type of ospeed" >&5
9120 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9121
9122 # Check whether --with-ospeed or --without-ospeed was given.
9123 if test "${with_ospeed+set}" = set; then
9124   withval="$with_ospeed"
9125   NCURSES_OSPEED="$withval"
9126 else
9127   NCURSES_OSPEED=short
9128 fi;
9129 echo "$as_me:9129: result: $NCURSES_OSPEED" >&5
9130 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9131
9132 ###   use option --with-mmask-t to override mmask_t's type
9133 echo "$as_me:9133: checking for type of mmask_t" >&5
9134 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9135
9136 # Check whether --with-mmask-t or --without-mmask-t was given.
9137 if test "${with_mmask_t+set}" = set; then
9138   withval="$with_mmask_t"
9139   NCURSES_MMASK_T="$withval"
9140 else
9141   NCURSES_MMASK_T=auto
9142 fi;
9143 echo "$as_me:9143: result: $NCURSES_MMASK_T" >&5
9144 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9145
9146 ###   use option --with-ccharw-max to override CCHARW_MAX size
9147 echo "$as_me:9147: checking for size CCHARW_MAX" >&5
9148 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9149
9150 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9151 if test "${with_ccharw_max+set}" = set; then
9152   withval="$with_ccharw_max"
9153   NCURSES_CCHARW_MAX="$withval"
9154 else
9155   NCURSES_CCHARW_MAX=5
9156 fi;
9157 echo "$as_me:9157: result: $NCURSES_CCHARW_MAX" >&5
9158 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9159
9160 ### Enable compiling-in rcs id's
9161 echo "$as_me:9161: checking if RCS identifiers should be compiled-in" >&5
9162 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9163
9164 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9165 if test "${with_rcs_ids+set}" = set; then
9166   withval="$with_rcs_ids"
9167   with_rcs_ids=$withval
9168 else
9169   with_rcs_ids=no
9170 fi;
9171 echo "$as_me:9171: result: $with_rcs_ids" >&5
9172 echo "${ECHO_T}$with_rcs_ids" >&6
9173 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9174 #define USE_RCS_IDS 1
9175 EOF
9176
9177 ###############################################################################
9178
9179 echo "$as_me:9179: checking format of man-pages" >&5
9180 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9181
9182 # Check whether --with-manpage-format or --without-manpage-format was given.
9183 if test "${with_manpage_format+set}" = set; then
9184   withval="$with_manpage_format"
9185   MANPAGE_FORMAT=$withval
9186 else
9187   MANPAGE_FORMAT=unknown
9188 fi;
9189
9190 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9191 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9192
9193 cf_unknown=
9194
9195 case $MANPAGE_FORMAT in
9196 unknown)
9197   if test -z "$MANPATH" ; then
9198     MANPATH="/usr/man:/usr/share/man"
9199   fi
9200
9201   # look for the 'date' man-page (it's most likely to be installed!)
9202   MANPAGE_FORMAT=
9203   cf_preform=no
9204   cf_catonly=yes
9205   cf_example=date
9206
9207   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9208   for cf_dir in $MANPATH; do
9209     test -z "$cf_dir" && cf_dir=/usr/man
9210     for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
9211     do
9212       cf_test=`echo $cf_name | sed -e 's/*//'`
9213       if test "x$cf_test" = "x$cf_name" ; then
9214
9215         case "$cf_name" in
9216         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9217         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9218         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9219         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9220         esac
9221
9222         case "$cf_name" in
9223         $cf_dir/man*)
9224           cf_catonly=no
9225           ;;
9226         $cf_dir/cat*)
9227           cf_preform=yes
9228           ;;
9229         esac
9230         break
9231       fi
9232
9233       # if we found a match in either man* or cat*, stop looking
9234       if test -n "$MANPAGE_FORMAT" ; then
9235         cf_found=no
9236         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9237         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9238         case "$cf_name" in
9239         $cf_dir/cat*)
9240           cf_found=yes
9241           ;;
9242         esac
9243         test $cf_found=yes && break
9244       fi
9245     done
9246     # only check the first directory in $MANPATH where we find manpages
9247     if test -n "$MANPAGE_FORMAT" ; then
9248        break
9249     fi
9250   done
9251   # if we did not find the example, just assume it is normal
9252   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9253   IFS="$ac_save_ifs"
9254   ;;
9255 *)
9256   for cf_option in $MANPAGE_FORMAT; do
9257      case $cf_option in #(vi
9258      gzip|compress|BSDI|normal|formatted|catonly)
9259        ;;
9260      *)
9261        cf_unknown="$cf_unknown $cf_option"
9262        ;;
9263      esac
9264   done
9265   ;;
9266 esac
9267
9268 echo "$as_me:9268: result: $MANPAGE_FORMAT" >&5
9269 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9270 if test -n "$cf_unknown" ; then
9271   { echo "$as_me:9271: WARNING: Unexpected manpage-format $cf_unknown" >&5
9272 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9273 fi
9274
9275 echo "$as_me:9275: checking for manpage renaming" >&5
9276 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9277
9278 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9279 if test "${with_manpage_renames+set}" = set; then
9280   withval="$with_manpage_renames"
9281   MANPAGE_RENAMES=$withval
9282 else
9283   MANPAGE_RENAMES=yes
9284 fi;
9285
9286 case ".$MANPAGE_RENAMES" in #(vi
9287 .no) #(vi
9288   ;;
9289 .|.yes)
9290   # Debian 'man' program?
9291   if test -f /etc/debian_version ; then
9292     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9293   else
9294     MANPAGE_RENAMES=no
9295   fi
9296   ;;
9297 esac
9298
9299 if test "$MANPAGE_RENAMES" != no ; then
9300   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9301     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9302   elif test ! -f $MANPAGE_RENAMES ; then
9303     { { echo "$as_me:9303: error: not a filename: $MANPAGE_RENAMES" >&5
9304 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9305    { (exit 1); exit 1; }; }
9306   fi
9307
9308   test ! -d man && mkdir man
9309
9310   # Construct a sed-script to perform renaming within man-pages
9311   if test -n "$MANPAGE_RENAMES" ; then
9312     test ! -d man && mkdir man
9313     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9314   fi
9315 fi
9316
9317 echo "$as_me:9317: result: $MANPAGE_RENAMES" >&5
9318 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9319
9320 echo "$as_me:9320: checking if manpage aliases will be installed" >&5
9321 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9322
9323 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9324 if test "${with_manpage_aliases+set}" = set; then
9325   withval="$with_manpage_aliases"
9326   MANPAGE_ALIASES=$withval
9327 else
9328   MANPAGE_ALIASES=yes
9329 fi;
9330
9331 echo "$as_me:9331: result: $MANPAGE_ALIASES" >&5
9332 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9333
9334 if test "$LN_S" = "ln -s"; then
9335         cf_use_symlinks=yes
9336 else
9337         cf_use_symlinks=no
9338 fi
9339
9340 MANPAGE_SYMLINKS=no
9341 if test "$MANPAGE_ALIASES" = yes ; then
9342 echo "$as_me:9342: checking if manpage symlinks should be used" >&5
9343 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9344
9345 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9346 if test "${with_manpage_symlinks+set}" = set; then
9347   withval="$with_manpage_symlinks"
9348   MANPAGE_SYMLINKS=$withval
9349 else
9350   MANPAGE_SYMLINKS=$cf_use_symlinks
9351 fi;
9352
9353 if test "$$cf_use_symlinks" = no; then
9354 if test "$MANPAGE_SYMLINKS" = yes ; then
9355         { echo "$as_me:9355: WARNING: cannot make symlinks" >&5
9356 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9357         MANPAGE_SYMLINKS=no
9358 fi
9359 fi
9360
9361 echo "$as_me:9361: result: $MANPAGE_SYMLINKS" >&5
9362 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9363 fi
9364
9365 echo "$as_me:9365: checking for manpage tbl" >&5
9366 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9367
9368 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9369 if test "${with_manpage_tbl+set}" = set; then
9370   withval="$with_manpage_tbl"
9371   MANPAGE_TBL=$withval
9372 else
9373   MANPAGE_TBL=no
9374 fi;
9375
9376 echo "$as_me:9376: result: $MANPAGE_TBL" >&5
9377 echo "${ECHO_T}$MANPAGE_TBL" >&6
9378
9379   if test "$prefix" = "NONE" ; then
9380      cf_prefix="$ac_default_prefix"
9381   else
9382      cf_prefix="$prefix"
9383   fi
9384
9385   case "$MANPAGE_FORMAT" in # (vi
9386   *catonly*) # (vi
9387     cf_format=yes
9388     cf_inboth=no
9389     ;;
9390   *formatted*) # (vi
9391     cf_format=yes
9392     cf_inboth=yes
9393     ;;
9394   *)
9395     cf_format=no
9396     cf_inboth=no
9397     ;;
9398   esac
9399
9400 test ! -d man && mkdir man
9401
9402 cf_so_strip=
9403 cf_compress=
9404 case "$MANPAGE_FORMAT" in #(vi
9405 *compress*) #(vi
9406         cf_so_strip="Z"
9407         cf_compress=compress
9408   ;;
9409 *gzip*) #(vi
9410         cf_so_strip="gz"
9411         cf_compress=gzip
9412   ;;
9413 esac
9414
9415 cf_edit_man=./edit_man.sh
9416 cf_man_alias=`pwd`/man_alias.sed
9417
9418 cat >$cf_edit_man <<CF_EOF
9419 #! /bin/sh
9420 # this script is generated by the configure-script CF_MAN_PAGES macro.
9421
9422 prefix="$cf_prefix"
9423 datadir="$datadir"
9424
9425 NCURSES_MAJOR="$NCURSES_MAJOR"
9426 NCURSES_MINOR="$NCURSES_MINOR"
9427 NCURSES_PATCH="$NCURSES_PATCH"
9428
9429 NCURSES_OSPEED="$NCURSES_OSPEED"
9430 TERMINFO="$TERMINFO"
9431
9432 INSTALL="$INSTALL"
9433 INSTALL_DATA="$INSTALL_DATA"
9434
9435 transform="$program_transform_name"
9436
9437 TMP=\${TMPDIR-/tmp}/man\$\$
9438 trap "rm -f \$TMP" 0 1 2 5 15
9439
9440 form=\$1
9441 shift || exit 1
9442
9443 verb=\$1
9444 shift || exit 1
9445
9446 mandir=\$1
9447 shift || exit 1
9448
9449 srcdir=\$1
9450 top_srcdir=\$srcdir/..
9451 shift || exit 1
9452
9453 if test "\$form" = normal ; then
9454         if test "$cf_format" = yes ; then
9455         if test "$cf_inboth" = no ; then
9456                 sh \$0 format \$verb \$mandir \$srcdir \$*
9457                 exit $?
9458         fi
9459         fi
9460         cf_subdir=\$mandir/man
9461         cf_tables=$MANPAGE_TBL
9462 else
9463         cf_subdir=\$mandir/cat
9464         cf_tables=yes
9465 fi
9466
9467 # process the list of source-files
9468 for i in \$* ; do
9469 case \$i in #(vi
9470 *.orig|*.rej) ;; #(vi
9471 *.[0-9]*)
9472         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9473         if test \$verb = installing ; then
9474         if test ! -d \$cf_subdir\${section} ; then
9475                 mkdir -p \$cf_subdir\$section
9476         fi
9477         fi
9478
9479         # replace variables in man page
9480         if test ! -f $cf_man_alias ; then
9481 cat >>$cf_man_alias <<-CF_EOF2
9482                 s,@DATADIR@,\$datadir,g
9483                 s,@TERMINFO@,\$TERMINFO,g
9484                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9485                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9486                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9487                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9488 CF_EOF
9489
9490         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9491         do
9492                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9493                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9494 cat >>$cf_edit_man <<-CF_EOF
9495                 s,@$cf_NAME@,$cf_name,g
9496 CF_EOF
9497         done
9498
9499 cat >>$cf_edit_man <<CF_EOF
9500 CF_EOF2
9501                 echo "...made $cf_man_alias"
9502         fi
9503
9504         aliases=
9505         cf_source=\`basename \$i\`
9506         inalias=\$cf_source
9507         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9508         if test ! -f \$inalias ; then
9509                 echo .. skipped \$cf_source
9510                 continue
9511         fi
9512 CF_EOF
9513
9514 if test "$MANPAGE_ALIASES" != no ; then
9515 cat >>$cf_edit_man <<CF_EOF
9516         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9517 CF_EOF
9518 fi
9519
9520 if test "$MANPAGE_RENAMES" = no ; then
9521 cat >>$cf_edit_man <<CF_EOF
9522         # perform program transformations for section 1 man pages
9523         if test \$section = 1 ; then
9524                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9525         else
9526                 cf_target=\$cf_subdir\${section}/\$cf_source
9527         fi
9528 CF_EOF
9529 else
9530 cat >>$cf_edit_man <<CF_EOF
9531         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9532         if test -z "\$cf_target" ; then
9533                 echo '? missing rename for '\$cf_source
9534                 cf_target="\$cf_source"
9535         fi
9536         cf_target="\$cf_subdir\${section}/\${cf_target}"
9537
9538 CF_EOF
9539 fi
9540
9541 cat >>$cf_edit_man <<CF_EOF
9542         sed     -f $cf_man_alias \\
9543 CF_EOF
9544
9545 if test -f $MANPAGE_RENAMES ; then
9546 cat >>$cf_edit_man <<CF_EOF
9547                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9548 CF_EOF
9549 else
9550 cat >>$cf_edit_man <<CF_EOF
9551                 < \$i >\$TMP
9552 CF_EOF
9553 fi
9554
9555 cat >>$cf_edit_man <<CF_EOF
9556 if test \$cf_tables = yes ; then
9557         tbl \$TMP >\$TMP.out
9558         mv \$TMP.out \$TMP
9559 fi
9560 CF_EOF
9561
9562 if test $with_curses_h != yes ; then
9563 cat >>$cf_edit_man <<CF_EOF
9564         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9565         mv \$TMP.out \$TMP
9566 CF_EOF
9567 fi
9568
9569 cat >>$cf_edit_man <<CF_EOF
9570         if test \$form = format ; then
9571                 nroff -man \$TMP >\$TMP.out
9572                 mv \$TMP.out \$TMP
9573         fi
9574 CF_EOF
9575
9576 if test -n "$cf_compress" ; then
9577 cat >>$cf_edit_man <<CF_EOF
9578         if test \$verb = installing ; then
9579         if ( $cf_compress -f \$TMP )
9580         then
9581                 mv \$TMP.$cf_so_strip \$TMP
9582         fi
9583         fi
9584         cf_target="\$cf_target.$cf_so_strip"
9585 CF_EOF
9586 fi
9587
9588 case "$MANPAGE_FORMAT" in #(vi
9589 *BSDI*)
9590 cat >>$cf_edit_man <<CF_EOF
9591         if test \$form = format ; then
9592                 # BSDI installs only .0 suffixes in the cat directories
9593                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9594         fi
9595 CF_EOF
9596   ;;
9597 esac
9598
9599 cat >>$cf_edit_man <<CF_EOF
9600         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9601         if test \$verb = installing ; then
9602                 echo \$verb \$cf_target
9603                 \$INSTALL_DATA \$TMP \$cf_target
9604                 test -d \$cf_subdir\${section} &&
9605                 test -n "\$aliases" && (
9606                         cd \$cf_subdir\${section} && (
9607                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9608                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9609                                 cf_target=\`basename \$cf_target\`
9610                                 for cf_alias in \$aliases
9611                                 do
9612                                         if test \$section = 1 ; then
9613                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9614                                         fi
9615
9616                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9617                                                 if test -f \$cf_alias\${suffix} ; then
9618                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9619                                                         then
9620                                                                 continue
9621                                                         fi
9622                                                 fi
9623                                                 echo .. \$verb alias \$cf_alias\${suffix}
9624                                                 rm -f \$cf_alias\${suffix}
9625                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9626                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9627                                                 echo ".so \$cf_source" >\$TMP
9628 CF_EOF
9629 if test -n "$cf_compress" ; then
9630 cat >>$cf_edit_man <<CF_EOF
9631                                                 if test -n "$cf_so_strip" ; then
9632                                                         $cf_compress -f \$TMP
9633                                                         mv \$TMP.$cf_so_strip \$TMP
9634                                                 fi
9635 CF_EOF
9636 fi
9637 cat >>$cf_edit_man <<CF_EOF
9638                                                 echo .. \$verb alias \$cf_alias\${suffix}
9639                                                 rm -f \$cf_alias\${suffix}
9640                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9641                                         fi
9642                                 done
9643                         )
9644                 )
9645         elif test \$verb = removing ; then
9646                 test -f \$cf_target && (
9647                         echo \$verb \$cf_target
9648                         rm -f \$cf_target
9649                 )
9650                 test -d \$cf_subdir\${section} &&
9651                 test -n "\$aliases" && (
9652                         cd \$cf_subdir\${section} && (
9653                                 for cf_alias in \$aliases
9654                                 do
9655                                         if test \$section = 1 ; then
9656                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9657                                         fi
9658
9659                                         echo .. \$verb alias \$cf_alias\${suffix}
9660                                         rm -f \$cf_alias\${suffix}
9661                                 done
9662                         )
9663                 )
9664         else
9665 #               echo ".hy 0"
9666                 cat \$TMP
9667         fi
9668         ;;
9669 esac
9670 done
9671
9672 if test $cf_inboth = yes ; then
9673 if test \$form != format ; then
9674         sh \$0 format \$verb \$mandir \$srcdir \$*
9675 fi
9676 fi
9677
9678 exit 0
9679 CF_EOF
9680 chmod 755 $cf_edit_man
9681
9682 ###############################################################################
9683
9684 ### Note that some functions (such as const) are normally disabled anyway.
9685 echo "$as_me:9685: checking if you want to build with function extensions" >&5
9686 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9687
9688 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9689 if test "${enable_ext_funcs+set}" = set; then
9690   enableval="$enable_ext_funcs"
9691   with_ext_funcs=$enableval
9692 else
9693   with_ext_funcs=yes
9694 fi;
9695 echo "$as_me:9695: result: $with_ext_funcs" >&5
9696 echo "${ECHO_T}$with_ext_funcs" >&6
9697 if test "$with_ext_funcs" = yes ; then
9698         NCURSES_EXT_FUNCS=1
9699         cat >>confdefs.h <<\EOF
9700 #define HAVE_CURSES_VERSION 1
9701 EOF
9702
9703         cat >>confdefs.h <<\EOF
9704 #define HAVE_HAS_KEY 1
9705 EOF
9706
9707         cat >>confdefs.h <<\EOF
9708 #define HAVE_RESIZETERM 1
9709 EOF
9710
9711         cat >>confdefs.h <<\EOF
9712 #define HAVE_RESIZE_TERM 1
9713 EOF
9714
9715         cat >>confdefs.h <<\EOF
9716 #define HAVE_USE_DEFAULT_COLORS 1
9717 EOF
9718
9719         cat >>confdefs.h <<\EOF
9720 #define HAVE_WRESIZE 1
9721 EOF
9722
9723         cat >>confdefs.h <<\EOF
9724 #define NCURSES_EXT_FUNCS 1
9725 EOF
9726
9727         GENERATED_EXT_FUNCS=generated
9728 else
9729         NCURSES_EXT_FUNCS=0
9730         GENERATED_EXT_FUNCS=
9731 fi
9732
9733 echo "$as_me:9733: checking if you want to build with experimental SCREEN extensions" >&5
9734 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9735
9736 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9737 if test "${enable_sp_funcs+set}" = set; then
9738   enableval="$enable_sp_funcs"
9739   with_sp_funcs=$enableval
9740 else
9741   with_sp_funcs=no
9742 fi;
9743 echo "$as_me:9743: result: $with_sp_funcs" >&5
9744 echo "${ECHO_T}$with_sp_funcs" >&6
9745 if test "$with_sp_funcs" = yes ; then
9746         NCURSES_SP_FUNCS=1
9747         cat >>confdefs.h <<\EOF
9748 #define NCURSES_SP_FUNCS 1
9749 EOF
9750
9751         GENERATED_SP_FUNCS=generated
9752 else
9753         NCURSES_SP_FUNCS=0
9754         GENERATED_SP_FUNCS=
9755 fi
9756
9757 echo "$as_me:9757: checking if you want to build with experimental terminal-driver" >&5
9758 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9759
9760 # Check whether --enable-term-driver or --disable-term-driver was given.
9761 if test "${enable_term_driver+set}" = set; then
9762   enableval="$enable_term_driver"
9763   with_term_driver=$enableval
9764 else
9765   with_term_driver=no
9766 fi;
9767 echo "$as_me:9767: result: $with_term_driver" >&5
9768 echo "${ECHO_T}$with_term_driver" >&6
9769 if test "$with_term_driver" = yes ; then
9770         cat >>confdefs.h <<\EOF
9771 #define USE_TERM_DRIVER 1
9772 EOF
9773
9774         if test "$with_sp_funcs" != yes ; then
9775                 { { echo "$as_me:9775: error: The term-driver option relies upon sp-funcs" >&5
9776 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9777    { (exit 1); exit 1; }; }
9778         fi
9779 fi
9780
9781 ###   use option --enable-const to turn on use of const beyond that in XSI.
9782 echo "$as_me:9782: checking for extended use of const keyword" >&5
9783 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9784
9785 # Check whether --enable-const or --disable-const was given.
9786 if test "${enable_const+set}" = set; then
9787   enableval="$enable_const"
9788   with_ext_const=$enableval
9789 else
9790   with_ext_const=no
9791 fi;
9792 echo "$as_me:9792: result: $with_ext_const" >&5
9793 echo "${ECHO_T}$with_ext_const" >&6
9794 NCURSES_CONST='/*nothing*/'
9795 if test "$with_ext_const" = yes ; then
9796         NCURSES_CONST=const
9797 fi
9798
9799 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9800 echo "$as_me:9800: checking if you want to use extended colors" >&5
9801 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9802
9803 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9804 if test "${enable_ext_colors+set}" = set; then
9805   enableval="$enable_ext_colors"
9806   with_ext_colors=$enableval
9807 else
9808   with_ext_colors=no
9809 fi;
9810 echo "$as_me:9810: result: $with_ext_colors" >&5
9811 echo "${ECHO_T}$with_ext_colors" >&6
9812 NCURSES_EXT_COLORS=0
9813 if test "$with_ext_colors" = yes ; then
9814         if test "$with_widec" != yes ; then
9815                 { { echo "$as_me:9815: error: This option applies only to wide-character library" >&5
9816 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9817    { (exit 1); exit 1; }; }
9818         else
9819                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9820
9821 if test "${with_abi_version+set}" != set; then
9822         case $cf_cv_rel_version in
9823         5.*)
9824                 cf_cv_rel_version=6.0
9825                 cf_cv_abi_version=6
9826                 { echo "$as_me:9826: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9827 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9828                 ;;
9829         esac
9830 fi
9831
9832         fi
9833         NCURSES_EXT_COLORS=1
9834         cat >>confdefs.h <<\EOF
9835 #define NCURSES_EXT_COLORS 1
9836 EOF
9837
9838 fi
9839
9840 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9841 echo "$as_me:9841: checking if you want to use extended mouse encoding" >&5
9842 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9843
9844 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9845 if test "${enable_ext_mouse+set}" = set; then
9846   enableval="$enable_ext_mouse"
9847   with_ext_mouse=$enableval
9848 else
9849   with_ext_mouse=no
9850 fi;
9851 echo "$as_me:9851: result: $with_ext_mouse" >&5
9852 echo "${ECHO_T}$with_ext_mouse" >&6
9853 NCURSES_MOUSE_VERSION=1
9854 if test "$with_ext_mouse" = yes ; then
9855         NCURSES_MOUSE_VERSION=2
9856
9857 if test "${with_abi_version+set}" != set; then
9858         case $cf_cv_rel_version in
9859         5.*)
9860                 cf_cv_rel_version=6.0
9861                 cf_cv_abi_version=6
9862                 { echo "$as_me:9862: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9863 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9864                 ;;
9865         esac
9866 fi
9867
9868 fi
9869
9870 echo "$as_me:9870: checking if you want \$NCURSES_NO_PADDING code" >&5
9871 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9872
9873 # Check whether --enable-no-padding or --disable-no-padding was given.
9874 if test "${enable_no_padding+set}" = set; then
9875   enableval="$enable_no_padding"
9876   with_no_padding=$enableval
9877 else
9878   with_no_padding=$with_ext_funcs
9879 fi;
9880 echo "$as_me:9880: result: $with_no_padding" >&5
9881 echo "${ECHO_T}$with_no_padding" >&6
9882 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9883 #define NCURSES_NO_PADDING 1
9884 EOF
9885
9886 echo "$as_me:9886: checking for ANSI C header files" >&5
9887 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9888 if test "${ac_cv_header_stdc+set}" = set; then
9889   echo $ECHO_N "(cached) $ECHO_C" >&6
9890 else
9891   cat >conftest.$ac_ext <<_ACEOF
9892 #line 9892 "configure"
9893 #include "confdefs.h"
9894 #include <stdlib.h>
9895 #include <stdarg.h>
9896 #include <string.h>
9897 #include <float.h>
9898
9899 _ACEOF
9900 if { (eval echo "$as_me:9900: \"$ac_cpp conftest.$ac_ext\"") >&5
9901   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9902   ac_status=$?
9903   egrep -v '^ *\+' conftest.er1 >conftest.err
9904   rm -f conftest.er1
9905   cat conftest.err >&5
9906   echo "$as_me:9906: \$? = $ac_status" >&5
9907   (exit $ac_status); } >/dev/null; then
9908   if test -s conftest.err; then
9909     ac_cpp_err=$ac_c_preproc_warn_flag
9910   else
9911     ac_cpp_err=
9912   fi
9913 else
9914   ac_cpp_err=yes
9915 fi
9916 if test -z "$ac_cpp_err"; then
9917   ac_cv_header_stdc=yes
9918 else
9919   echo "$as_me: failed program was:" >&5
9920   cat conftest.$ac_ext >&5
9921   ac_cv_header_stdc=no
9922 fi
9923 rm -f conftest.err conftest.$ac_ext
9924
9925 if test $ac_cv_header_stdc = yes; then
9926   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9927   cat >conftest.$ac_ext <<_ACEOF
9928 #line 9928 "configure"
9929 #include "confdefs.h"
9930 #include <string.h>
9931
9932 _ACEOF
9933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9934   egrep "memchr" >/dev/null 2>&1; then
9935   :
9936 else
9937   ac_cv_header_stdc=no
9938 fi
9939 rm -f conftest*
9940
9941 fi
9942
9943 if test $ac_cv_header_stdc = yes; then
9944   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9945   cat >conftest.$ac_ext <<_ACEOF
9946 #line 9946 "configure"
9947 #include "confdefs.h"
9948 #include <stdlib.h>
9949
9950 _ACEOF
9951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9952   egrep "free" >/dev/null 2>&1; then
9953   :
9954 else
9955   ac_cv_header_stdc=no
9956 fi
9957 rm -f conftest*
9958
9959 fi
9960
9961 if test $ac_cv_header_stdc = yes; then
9962   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9963   if test "$cross_compiling" = yes; then
9964   :
9965 else
9966   cat >conftest.$ac_ext <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969 #include <ctype.h>
9970 #if ((' ' & 0x0FF) == 0x020)
9971 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9972 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9973 #else
9974 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9975                      || ('j' <= (c) && (c) <= 'r') \
9976                      || ('s' <= (c) && (c) <= 'z'))
9977 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9978 #endif
9979
9980 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9981 int
9982 main ()
9983 {
9984   int i;
9985   for (i = 0; i < 256; i++)
9986     if (XOR (islower (i), ISLOWER (i))
9987         || toupper (i) != TOUPPER (i))
9988       $ac_main_return(2);
9989   $ac_main_return (0);
9990 }
9991 _ACEOF
9992 rm -f conftest$ac_exeext
9993 if { (eval echo "$as_me:9993: \"$ac_link\"") >&5
9994   (eval $ac_link) 2>&5
9995   ac_status=$?
9996   echo "$as_me:9996: \$? = $ac_status" >&5
9997   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9998   { (eval echo "$as_me:9998: \"$ac_try\"") >&5
9999   (eval $ac_try) 2>&5
10000   ac_status=$?
10001   echo "$as_me:10001: \$? = $ac_status" >&5
10002   (exit $ac_status); }; }; then
10003   :
10004 else
10005   echo "$as_me: program exited with status $ac_status" >&5
10006 echo "$as_me: failed program was:" >&5
10007 cat conftest.$ac_ext >&5
10008 ac_cv_header_stdc=no
10009 fi
10010 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10011 fi
10012 fi
10013 fi
10014 echo "$as_me:10014: result: $ac_cv_header_stdc" >&5
10015 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10016 if test $ac_cv_header_stdc = yes; then
10017
10018 cat >>confdefs.h <<\EOF
10019 #define STDC_HEADERS 1
10020 EOF
10021
10022 fi
10023
10024 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10025
10026 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10027                   inttypes.h stdint.h unistd.h
10028 do
10029 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10030 echo "$as_me:10030: checking for $ac_header" >&5
10031 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10032 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10033   echo $ECHO_N "(cached) $ECHO_C" >&6
10034 else
10035   cat >conftest.$ac_ext <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10038 $ac_includes_default
10039 #include <$ac_header>
10040 _ACEOF
10041 rm -f conftest.$ac_objext
10042 if { (eval echo "$as_me:10042: \"$ac_compile\"") >&5
10043   (eval $ac_compile) 2>&5
10044   ac_status=$?
10045   echo "$as_me:10045: \$? = $ac_status" >&5
10046   (exit $ac_status); } &&
10047          { ac_try='test -s conftest.$ac_objext'
10048   { (eval echo "$as_me:10048: \"$ac_try\"") >&5
10049   (eval $ac_try) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit $ac_status); }; }; then
10053   eval "$as_ac_Header=yes"
10054 else
10055   echo "$as_me: failed program was:" >&5
10056 cat conftest.$ac_ext >&5
10057 eval "$as_ac_Header=no"
10058 fi
10059 rm -f conftest.$ac_objext conftest.$ac_ext
10060 fi
10061 echo "$as_me:10061: result: `eval echo '${'$as_ac_Header'}'`" >&5
10062 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10063 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10064   cat >>confdefs.h <<EOF
10065 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10066 EOF
10067
10068 fi
10069 done
10070
10071 echo "$as_me:10071: checking for signed char" >&5
10072 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10073 if test "${ac_cv_type_signed_char+set}" = set; then
10074   echo $ECHO_N "(cached) $ECHO_C" >&6
10075 else
10076   cat >conftest.$ac_ext <<_ACEOF
10077 #line 10077 "configure"
10078 #include "confdefs.h"
10079 $ac_includes_default
10080 int
10081 main ()
10082 {
10083 if ((signed char *) 0)
10084   return 0;
10085 if (sizeof (signed char))
10086   return 0;
10087   ;
10088   return 0;
10089 }
10090 _ACEOF
10091 rm -f conftest.$ac_objext
10092 if { (eval echo "$as_me:10092: \"$ac_compile\"") >&5
10093   (eval $ac_compile) 2>&5
10094   ac_status=$?
10095   echo "$as_me:10095: \$? = $ac_status" >&5
10096   (exit $ac_status); } &&
10097          { ac_try='test -s conftest.$ac_objext'
10098   { (eval echo "$as_me:10098: \"$ac_try\"") >&5
10099   (eval $ac_try) 2>&5
10100   ac_status=$?
10101   echo "$as_me:10101: \$? = $ac_status" >&5
10102   (exit $ac_status); }; }; then
10103   ac_cv_type_signed_char=yes
10104 else
10105   echo "$as_me: failed program was:" >&5
10106 cat conftest.$ac_ext >&5
10107 ac_cv_type_signed_char=no
10108 fi
10109 rm -f conftest.$ac_objext conftest.$ac_ext
10110 fi
10111 echo "$as_me:10111: result: $ac_cv_type_signed_char" >&5
10112 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10113
10114 echo "$as_me:10114: checking size of signed char" >&5
10115 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10116 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10117   echo $ECHO_N "(cached) $ECHO_C" >&6
10118 else
10119   if test "$ac_cv_type_signed_char" = yes; then
10120   if test "$cross_compiling" = yes; then
10121   # Depending upon the size, compute the lo and hi bounds.
10122 cat >conftest.$ac_ext <<_ACEOF
10123 #line 10123 "configure"
10124 #include "confdefs.h"
10125 $ac_includes_default
10126 int
10127 main ()
10128 {
10129 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10130   ;
10131   return 0;
10132 }
10133 _ACEOF
10134 rm -f conftest.$ac_objext
10135 if { (eval echo "$as_me:10135: \"$ac_compile\"") >&5
10136   (eval $ac_compile) 2>&5
10137   ac_status=$?
10138   echo "$as_me:10138: \$? = $ac_status" >&5
10139   (exit $ac_status); } &&
10140          { ac_try='test -s conftest.$ac_objext'
10141   { (eval echo "$as_me:10141: \"$ac_try\"") >&5
10142   (eval $ac_try) 2>&5
10143   ac_status=$?
10144   echo "$as_me:10144: \$? = $ac_status" >&5
10145   (exit $ac_status); }; }; then
10146   ac_lo=0 ac_mid=0
10147   while :; do
10148     cat >conftest.$ac_ext <<_ACEOF
10149 #line 10149 "configure"
10150 #include "confdefs.h"
10151 $ac_includes_default
10152 int
10153 main ()
10154 {
10155 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10156   ;
10157   return 0;
10158 }
10159 _ACEOF
10160 rm -f conftest.$ac_objext
10161 if { (eval echo "$as_me:10161: \"$ac_compile\"") >&5
10162   (eval $ac_compile) 2>&5
10163   ac_status=$?
10164   echo "$as_me:10164: \$? = $ac_status" >&5
10165   (exit $ac_status); } &&
10166          { ac_try='test -s conftest.$ac_objext'
10167   { (eval echo "$as_me:10167: \"$ac_try\"") >&5
10168   (eval $ac_try) 2>&5
10169   ac_status=$?
10170   echo "$as_me:10170: \$? = $ac_status" >&5
10171   (exit $ac_status); }; }; then
10172   ac_hi=$ac_mid; break
10173 else
10174   echo "$as_me: failed program was:" >&5
10175 cat conftest.$ac_ext >&5
10176 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10177 fi
10178 rm -f conftest.$ac_objext conftest.$ac_ext
10179   done
10180 else
10181   echo "$as_me: failed program was:" >&5
10182 cat conftest.$ac_ext >&5
10183 ac_hi=-1 ac_mid=-1
10184   while :; do
10185     cat >conftest.$ac_ext <<_ACEOF
10186 #line 10186 "configure"
10187 #include "confdefs.h"
10188 $ac_includes_default
10189 int
10190 main ()
10191 {
10192 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10193   ;
10194   return 0;
10195 }
10196 _ACEOF
10197 rm -f conftest.$ac_objext
10198 if { (eval echo "$as_me:10198: \"$ac_compile\"") >&5
10199   (eval $ac_compile) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit $ac_status); } &&
10203          { ac_try='test -s conftest.$ac_objext'
10204   { (eval echo "$as_me:10204: \"$ac_try\"") >&5
10205   (eval $ac_try) 2>&5
10206   ac_status=$?
10207   echo "$as_me:10207: \$? = $ac_status" >&5
10208   (exit $ac_status); }; }; then
10209   ac_lo=$ac_mid; break
10210 else
10211   echo "$as_me: failed program was:" >&5
10212 cat conftest.$ac_ext >&5
10213 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10214 fi
10215 rm -f conftest.$ac_objext conftest.$ac_ext
10216   done
10217 fi
10218 rm -f conftest.$ac_objext conftest.$ac_ext
10219 # Binary search between lo and hi bounds.
10220 while test "x$ac_lo" != "x$ac_hi"; do
10221   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10222   cat >conftest.$ac_ext <<_ACEOF
10223 #line 10223 "configure"
10224 #include "confdefs.h"
10225 $ac_includes_default
10226 int
10227 main ()
10228 {
10229 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10230   ;
10231   return 0;
10232 }
10233 _ACEOF
10234 rm -f conftest.$ac_objext
10235 if { (eval echo "$as_me:10235: \"$ac_compile\"") >&5
10236   (eval $ac_compile) 2>&5
10237   ac_status=$?
10238   echo "$as_me:10238: \$? = $ac_status" >&5
10239   (exit $ac_status); } &&
10240          { ac_try='test -s conftest.$ac_objext'
10241   { (eval echo "$as_me:10241: \"$ac_try\"") >&5
10242   (eval $ac_try) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); }; }; then
10246   ac_hi=$ac_mid
10247 else
10248   echo "$as_me: failed program was:" >&5
10249 cat conftest.$ac_ext >&5
10250 ac_lo=`expr $ac_mid + 1`
10251 fi
10252 rm -f conftest.$ac_objext conftest.$ac_ext
10253 done
10254 ac_cv_sizeof_signed_char=$ac_lo
10255 else
10256   if test "$cross_compiling" = yes; then
10257   { { echo "$as_me:10257: error: cannot run test program while cross compiling" >&5
10258 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10259    { (exit 1); exit 1; }; }
10260 else
10261   cat >conftest.$ac_ext <<_ACEOF
10262 #line 10262 "configure"
10263 #include "confdefs.h"
10264 $ac_includes_default
10265 int
10266 main ()
10267 {
10268 FILE *f = fopen ("conftest.val", "w");
10269 if (!f)
10270   $ac_main_return (1);
10271 fprintf (f, "%d", (sizeof (signed char)));
10272 fclose (f);
10273   ;
10274   return 0;
10275 }
10276 _ACEOF
10277 rm -f conftest$ac_exeext
10278 if { (eval echo "$as_me:10278: \"$ac_link\"") >&5
10279   (eval $ac_link) 2>&5
10280   ac_status=$?
10281   echo "$as_me:10281: \$? = $ac_status" >&5
10282   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10283   { (eval echo "$as_me:10283: \"$ac_try\"") >&5
10284   (eval $ac_try) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit $ac_status); }; }; then
10288   ac_cv_sizeof_signed_char=`cat conftest.val`
10289 else
10290   echo "$as_me: program exited with status $ac_status" >&5
10291 echo "$as_me: failed program was:" >&5
10292 cat conftest.$ac_ext >&5
10293 fi
10294 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10295 fi
10296 fi
10297 rm -f conftest.val
10298 else
10299   ac_cv_sizeof_signed_char=0
10300 fi
10301 fi
10302 echo "$as_me:10302: result: $ac_cv_sizeof_signed_char" >&5
10303 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10304 cat >>confdefs.h <<EOF
10305 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10306 EOF
10307
10308 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10309         NCURSES_SBOOL="signed char"
10310 else
10311         NCURSES_SBOOL="char"
10312 fi
10313 echo "$as_me:10313: checking if you want to use signed Boolean array in term.h" >&5
10314 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10315
10316 # Check whether --enable-signed-char or --disable-signed-char was given.
10317 if test "${enable_signed_char+set}" = set; then
10318   enableval="$enable_signed_char"
10319   with_signed_char=$enableval
10320 else
10321   with_signed_char=no
10322 fi;
10323 echo "$as_me:10323: result: $with_signed_char" >&5
10324 echo "${ECHO_T}$with_signed_char" >&6
10325 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10326
10327 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10328 echo "$as_me:10328: checking if you want SIGWINCH handler" >&5
10329 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10330
10331 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10332 if test "${enable_sigwinch+set}" = set; then
10333   enableval="$enable_sigwinch"
10334   with_sigwinch=$enableval
10335 else
10336   with_sigwinch=$with_ext_funcs
10337 fi;
10338 echo "$as_me:10338: result: $with_sigwinch" >&5
10339 echo "${ECHO_T}$with_sigwinch" >&6
10340 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10341 #define USE_SIGWINCH 1
10342 EOF
10343
10344 ###   use option --enable-tcap-names to allow user to define new capabilities
10345 echo "$as_me:10345: checking if you want user-definable terminal capabilities like termcap" >&5
10346 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10347
10348 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10349 if test "${enable_tcap_names+set}" = set; then
10350   enableval="$enable_tcap_names"
10351   with_tcap_names=$enableval
10352 else
10353   with_tcap_names=$with_ext_funcs
10354 fi;
10355 echo "$as_me:10355: result: $with_tcap_names" >&5
10356 echo "${ECHO_T}$with_tcap_names" >&6
10357 NCURSES_XNAMES=0
10358 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10359
10360 ###############################################################################
10361 # These options are relatively safe to experiment with.
10362
10363 echo "$as_me:10363: checking if you want all development code" >&5
10364 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10365
10366 # Check whether --with-develop or --without-develop was given.
10367 if test "${with_develop+set}" = set; then
10368   withval="$with_develop"
10369   with_develop=$withval
10370 else
10371   with_develop=no
10372 fi;
10373 echo "$as_me:10373: result: $with_develop" >&5
10374 echo "${ECHO_T}$with_develop" >&6
10375
10376 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10377 echo "$as_me:10377: checking if you want hard-tabs code" >&5
10378 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10379
10380 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10381 if test "${enable_hard_tabs+set}" = set; then
10382   enableval="$enable_hard_tabs"
10383
10384 else
10385   enable_hard_tabs=$with_develop
10386 fi;
10387 echo "$as_me:10387: result: $enable_hard_tabs" >&5
10388 echo "${ECHO_T}$enable_hard_tabs" >&6
10389 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10390 #define USE_HARD_TABS 1
10391 EOF
10392
10393 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10394 echo "$as_me:10394: checking if you want limited support for xmc" >&5
10395 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10396
10397 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10398 if test "${enable_xmc_glitch+set}" = set; then
10399   enableval="$enable_xmc_glitch"
10400
10401 else
10402   enable_xmc_glitch=$with_develop
10403 fi;
10404 echo "$as_me:10404: result: $enable_xmc_glitch" >&5
10405 echo "${ECHO_T}$enable_xmc_glitch" >&6
10406 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10407 #define USE_XMC_SUPPORT 1
10408 EOF
10409
10410 ###############################################################################
10411 # These are just experimental, probably should not be in a package:
10412
10413 echo "$as_me:10413: checking if you do not want to assume colors are white-on-black" >&5
10414 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10415
10416 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10417 if test "${enable_assumed_color+set}" = set; then
10418   enableval="$enable_assumed_color"
10419   with_assumed_color=$enableval
10420 else
10421   with_assumed_color=yes
10422 fi;
10423 echo "$as_me:10423: result: $with_assumed_color" >&5
10424 echo "${ECHO_T}$with_assumed_color" >&6
10425 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10426 #define USE_ASSUMED_COLOR 1
10427 EOF
10428
10429 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10430 echo "$as_me:10430: checking if you want hashmap scrolling-optimization code" >&5
10431 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10432
10433 # Check whether --enable-hashmap or --disable-hashmap was given.
10434 if test "${enable_hashmap+set}" = set; then
10435   enableval="$enable_hashmap"
10436   with_hashmap=$enableval
10437 else
10438   with_hashmap=yes
10439 fi;
10440 echo "$as_me:10440: result: $with_hashmap" >&5
10441 echo "${ECHO_T}$with_hashmap" >&6
10442 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10443 #define USE_HASHMAP 1
10444 EOF
10445
10446 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10447 echo "$as_me:10447: checking if you want colorfgbg code" >&5
10448 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10449
10450 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10451 if test "${enable_colorfgbg+set}" = set; then
10452   enableval="$enable_colorfgbg"
10453   with_colorfgbg=$enableval
10454 else
10455   with_colorfgbg=no
10456 fi;
10457 echo "$as_me:10457: result: $with_colorfgbg" >&5
10458 echo "${ECHO_T}$with_colorfgbg" >&6
10459 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10460 #define USE_COLORFGBG 1
10461 EOF
10462
10463 ###   use option --enable-interop to turn on use of bindings used for interop
10464 echo "$as_me:10464: checking if you want interop bindings" >&5
10465 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10466
10467 # Check whether --enable-interop or --disable-interop was given.
10468 if test "${enable_interop+set}" = set; then
10469   enableval="$enable_interop"
10470   with_exp_interop=$enableval
10471 else
10472   with_exp_interop=no
10473 fi;
10474 echo "$as_me:10474: result: $with_exp_interop" >&5
10475 echo "${ECHO_T}$with_exp_interop" >&6
10476
10477 NCURSES_INTEROP_FUNCS=0
10478 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10479
10480 # This is still experimental (20080329), but should ultimately be moved to
10481 # the script-block --with-normal, etc.
10482
10483 echo "$as_me:10483: checking if you want to link with the pthread library" >&5
10484 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10485
10486 # Check whether --with-pthread or --without-pthread was given.
10487 if test "${with_pthread+set}" = set; then
10488   withval="$with_pthread"
10489   with_pthread=$withval
10490 else
10491   with_pthread=no
10492 fi;
10493 echo "$as_me:10493: result: $with_pthread" >&5
10494 echo "${ECHO_T}$with_pthread" >&6
10495
10496 if test "$with_pthread" != no ; then
10497     echo "$as_me:10497: checking for pthread.h" >&5
10498 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10499 if test "${ac_cv_header_pthread_h+set}" = set; then
10500   echo $ECHO_N "(cached) $ECHO_C" >&6
10501 else
10502   cat >conftest.$ac_ext <<_ACEOF
10503 #line 10503 "configure"
10504 #include "confdefs.h"
10505 #include <pthread.h>
10506 _ACEOF
10507 if { (eval echo "$as_me:10507: \"$ac_cpp conftest.$ac_ext\"") >&5
10508   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10509   ac_status=$?
10510   egrep -v '^ *\+' conftest.er1 >conftest.err
10511   rm -f conftest.er1
10512   cat conftest.err >&5
10513   echo "$as_me:10513: \$? = $ac_status" >&5
10514   (exit $ac_status); } >/dev/null; then
10515   if test -s conftest.err; then
10516     ac_cpp_err=$ac_c_preproc_warn_flag
10517   else
10518     ac_cpp_err=
10519   fi
10520 else
10521   ac_cpp_err=yes
10522 fi
10523 if test -z "$ac_cpp_err"; then
10524   ac_cv_header_pthread_h=yes
10525 else
10526   echo "$as_me: failed program was:" >&5
10527   cat conftest.$ac_ext >&5
10528   ac_cv_header_pthread_h=no
10529 fi
10530 rm -f conftest.err conftest.$ac_ext
10531 fi
10532 echo "$as_me:10532: result: $ac_cv_header_pthread_h" >&5
10533 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10534 if test $ac_cv_header_pthread_h = yes; then
10535
10536         cat >>confdefs.h <<\EOF
10537 #define HAVE_PTHREADS_H 1
10538 EOF
10539
10540         echo "$as_me:10540: checking if we can link with the pthread library" >&5
10541 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10542         cf_save_LIBS="$LIBS"
10543         LIBS="-lpthread $LIBS"
10544         cat >conftest.$ac_ext <<_ACEOF
10545 #line 10545 "configure"
10546 #include "confdefs.h"
10547
10548 #include <pthread.h>
10549
10550 int
10551 main ()
10552 {
10553
10554         int rc = pthread_create(0,0,0,0);
10555
10556   ;
10557   return 0;
10558 }
10559 _ACEOF
10560 rm -f conftest.$ac_objext conftest$ac_exeext
10561 if { (eval echo "$as_me:10561: \"$ac_link\"") >&5
10562   (eval $ac_link) 2>&5
10563   ac_status=$?
10564   echo "$as_me:10564: \$? = $ac_status" >&5
10565   (exit $ac_status); } &&
10566          { ac_try='test -s conftest$ac_exeext'
10567   { (eval echo "$as_me:10567: \"$ac_try\"") >&5
10568   (eval $ac_try) 2>&5
10569   ac_status=$?
10570   echo "$as_me:10570: \$? = $ac_status" >&5
10571   (exit $ac_status); }; }; then
10572   with_pthread=yes
10573 else
10574   echo "$as_me: failed program was:" >&5
10575 cat conftest.$ac_ext >&5
10576 with_pthread=no
10577 fi
10578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10579         LIBS="$cf_save_LIBS"
10580         echo "$as_me:10580: result: $with_pthread" >&5
10581 echo "${ECHO_T}$with_pthread" >&6
10582
10583         if test "$with_pthread" = yes ; then
10584             LIBS="-lpthread $LIBS"
10585             cat >>confdefs.h <<\EOF
10586 #define HAVE_LIBPTHREADS 1
10587 EOF
10588
10589         else
10590             { { echo "$as_me:10590: error: Cannot link with pthread library" >&5
10591 echo "$as_me: error: Cannot link with pthread library" >&2;}
10592    { (exit 1); exit 1; }; }
10593         fi
10594
10595 fi
10596
10597 fi
10598
10599 echo "$as_me:10599: checking if you want to allow EINTR in wgetch with pthreads" >&5
10600 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
10601
10602 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
10603 if test "${enable_pthreads_eintr+set}" = set; then
10604   enableval="$enable_pthreads_eintr"
10605   use_pthreads_eintr=$enableval
10606 else
10607   use_pthreads_eintr=no
10608 fi;
10609 echo "$as_me:10609: result: $use_pthreads_eintr" >&5
10610 echo "${ECHO_T}$use_pthreads_eintr" >&6
10611 if test $use_pthreads_eintr = yes ; then
10612     cat >>confdefs.h <<\EOF
10613 #define USE_PTHREADS_EINTR 1
10614 EOF
10615
10616 fi
10617
10618 echo "$as_me:10618: checking if you want to use weak-symbols for pthreads" >&5
10619 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10620
10621 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10622 if test "${enable_weak_symbols+set}" = set; then
10623   enableval="$enable_weak_symbols"
10624   use_weak_symbols=$enableval
10625 else
10626   use_weak_symbols=no
10627 fi;
10628 echo "$as_me:10628: result: $use_weak_symbols" >&5
10629 echo "${ECHO_T}$use_weak_symbols" >&6
10630 if test "$use_weak_symbols" = yes ; then
10631
10632 echo "$as_me:10632: checking if $CC supports weak symbols" >&5
10633 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10634 if test "${cf_cv_weak_symbols+set}" = set; then
10635   echo $ECHO_N "(cached) $ECHO_C" >&6
10636 else
10637
10638 cat >conftest.$ac_ext <<_ACEOF
10639 #line 10639 "configure"
10640 #include "confdefs.h"
10641
10642 #include <stdio.h>
10643 int
10644 main ()
10645 {
10646
10647 #if defined(__GNUC__)
10648 #  if defined __USE_ISOC99
10649 #    define _cat_pragma(exp)    _Pragma(#exp)
10650 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10651 #  else
10652 #    define _weak_pragma(exp)
10653 #  endif
10654 #  define _declare(name)        __extension__ extern __typeof__(name) name
10655 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10656 #endif
10657
10658 weak_symbol(fopen);
10659
10660   ;
10661   return 0;
10662 }
10663 _ACEOF
10664 rm -f conftest.$ac_objext
10665 if { (eval echo "$as_me:10665: \"$ac_compile\"") >&5
10666   (eval $ac_compile) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); } &&
10670          { ac_try='test -s conftest.$ac_objext'
10671   { (eval echo "$as_me:10671: \"$ac_try\"") >&5
10672   (eval $ac_try) 2>&5
10673   ac_status=$?
10674   echo "$as_me:10674: \$? = $ac_status" >&5
10675   (exit $ac_status); }; }; then
10676   cf_cv_weak_symbols=yes
10677 else
10678   echo "$as_me: failed program was:" >&5
10679 cat conftest.$ac_ext >&5
10680 cf_cv_weak_symbols=no
10681 fi
10682 rm -f conftest.$ac_objext conftest.$ac_ext
10683
10684 fi
10685 echo "$as_me:10685: result: $cf_cv_weak_symbols" >&5
10686 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10687
10688 else
10689     cf_cv_weak_symbols=no
10690 fi
10691
10692 if test $cf_cv_weak_symbols = yes ; then
10693     cat >>confdefs.h <<\EOF
10694 #define USE_WEAK_SYMBOLS 1
10695 EOF
10696
10697 fi
10698
10699 PTHREAD=
10700 if test "$with_pthread" = "yes" ; then
10701     cat >>confdefs.h <<\EOF
10702 #define USE_PTHREADS 1
10703 EOF
10704
10705     enable_reentrant=yes
10706     if test $cf_cv_weak_symbols = yes ; then
10707         PTHREAD=-lpthread
10708     fi
10709 fi
10710
10711 # Reentrant code has to be opaque; there's little advantage to making ncurses
10712 # opaque outside of that, so there is no --enable-opaque option.  We can use
10713 # this option without --with-pthreads, but this will be always set for
10714 # pthreads.
10715 echo "$as_me:10715: checking if you want experimental reentrant code" >&5
10716 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10717
10718 # Check whether --enable-reentrant or --disable-reentrant was given.
10719 if test "${enable_reentrant+set}" = set; then
10720   enableval="$enable_reentrant"
10721   with_reentrant=$enableval
10722 else
10723   with_reentrant=no
10724 fi;
10725 echo "$as_me:10725: result: $with_reentrant" >&5
10726 echo "${ECHO_T}$with_reentrant" >&6
10727 if test "$with_reentrant" = yes ; then
10728         cf_cv_enable_reentrant=1
10729         cf_cv_enable_opaque="NCURSES_INTERNALS"
10730         NCURSES_OPAQUE=1
10731         NCURSES_SIZE_T=int
10732         if test $cf_cv_weak_symbols = yes ; then
10733
10734 # remove pthread library from $LIBS
10735 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10736
10737         else
10738                 LIB_SUFFIX="t${LIB_SUFFIX}"
10739         fi
10740         cat >>confdefs.h <<\EOF
10741 #define USE_REENTRANT 1
10742 EOF
10743
10744 if test "${with_abi_version+set}" != set; then
10745         case $cf_cv_rel_version in
10746         5.*)
10747                 cf_cv_rel_version=6.0
10748                 cf_cv_abi_version=6
10749                 { echo "$as_me:10749: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10750 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10751                 ;;
10752         esac
10753 fi
10754
10755 else
10756         cf_cv_enable_reentrant=0
10757         cf_cv_enable_opaque="NCURSES_OPAQUE"
10758         NCURSES_OPAQUE=0
10759         NCURSES_SIZE_T=short
10760 fi
10761
10762 ### Allow using a different wrap-prefix
10763 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10764         echo "$as_me:10764: checking for prefix used to wrap public variables" >&5
10765 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10766
10767 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10768 if test "${with_wrap_prefix+set}" = set; then
10769   withval="$with_wrap_prefix"
10770   NCURSES_WRAP_PREFIX=$withval
10771 else
10772   NCURSES_WRAP_PREFIX=_nc_
10773 fi;
10774         echo "$as_me:10774: result: $NCURSES_WRAP_PREFIX" >&5
10775 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10776 else
10777         NCURSES_WRAP_PREFIX=_nc_
10778 fi
10779
10780 cat >>confdefs.h <<EOF
10781 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10782 EOF
10783
10784 echo "$as_me:10784: checking if you want experimental safe-sprintf code" >&5
10785 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10786
10787 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10788 if test "${enable_safe_sprintf+set}" = set; then
10789   enableval="$enable_safe_sprintf"
10790   with_safe_sprintf=$enableval
10791 else
10792   with_safe_sprintf=no
10793 fi;
10794 echo "$as_me:10794: result: $with_safe_sprintf" >&5
10795 echo "${ECHO_T}$with_safe_sprintf" >&6
10796 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10797 #define USE_SAFE_SPRINTF 1
10798 EOF
10799
10800 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10801 # when hashmap is used scroll hints are useless
10802 if test "$with_hashmap" = no ; then
10803 echo "$as_me:10803: checking if you want to experiment without scrolling-hints code" >&5
10804 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10805
10806 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10807 if test "${enable_scroll_hints+set}" = set; then
10808   enableval="$enable_scroll_hints"
10809   with_scroll_hints=$enableval
10810 else
10811   with_scroll_hints=yes
10812 fi;
10813 echo "$as_me:10813: result: $with_scroll_hints" >&5
10814 echo "${ECHO_T}$with_scroll_hints" >&6
10815 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10816 #define USE_SCROLL_HINTS 1
10817 EOF
10818
10819 fi
10820
10821 echo "$as_me:10821: checking if you want experimental wgetch-events code" >&5
10822 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10823
10824 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10825 if test "${enable_wgetch_events+set}" = set; then
10826   enableval="$enable_wgetch_events"
10827   with_wgetch_events=$enableval
10828 else
10829   with_wgetch_events=no
10830 fi;
10831 echo "$as_me:10831: result: $with_wgetch_events" >&5
10832 echo "${ECHO_T}$with_wgetch_events" >&6
10833 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10834 #define NCURSES_WGETCH_EVENTS 1
10835 EOF
10836
10837 ###############################################################################
10838
10839 ###     use option --disable-echo to suppress full display compiling commands
10840 echo "$as_me:10840: checking if you want to display full commands during build" >&5
10841 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10842
10843 # Check whether --enable-echo or --disable-echo was given.
10844 if test "${enable_echo+set}" = set; then
10845   enableval="$enable_echo"
10846   with_echo=$enableval
10847 else
10848   with_echo=yes
10849 fi;
10850 if test "$with_echo" = yes; then
10851         ECHO_LINK=
10852 else
10853         ECHO_LINK='@ echo linking $@ ... ;'
10854         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10855         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10856 fi
10857 echo "$as_me:10857: result: $with_echo" >&5
10858 echo "${ECHO_T}$with_echo" >&6
10859
10860 ###     use option --enable-warnings to turn on all gcc warnings
10861 echo "$as_me:10861: checking if you want to see compiler warnings" >&5
10862 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10863
10864 # Check whether --enable-warnings or --disable-warnings was given.
10865 if test "${enable_warnings+set}" = set; then
10866   enableval="$enable_warnings"
10867   with_warnings=$enableval
10868 fi;
10869 echo "$as_me:10869: result: $with_warnings" >&5
10870 echo "${ECHO_T}$with_warnings" >&6
10871
10872 if test "x$with_warnings" = "xyes"; then
10873         ADAFLAGS="$ADAFLAGS -gnatg"
10874
10875 INTEL_COMPILER=no
10876
10877 if test "$GCC" = yes ; then
10878         case $host_os in
10879         linux*|gnu*)
10880                 echo "$as_me:10880: checking if this is really Intel C compiler" >&5
10881 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10882                 cf_save_CFLAGS="$CFLAGS"
10883                 CFLAGS="$CFLAGS -no-gcc"
10884                 cat >conftest.$ac_ext <<_ACEOF
10885 #line 10885 "configure"
10886 #include "confdefs.h"
10887
10888 int
10889 main ()
10890 {
10891
10892 #ifdef __INTEL_COMPILER
10893 #else
10894 make an error
10895 #endif
10896
10897   ;
10898   return 0;
10899 }
10900 _ACEOF
10901 rm -f conftest.$ac_objext
10902 if { (eval echo "$as_me:10902: \"$ac_compile\"") >&5
10903   (eval $ac_compile) 2>&5
10904   ac_status=$?
10905   echo "$as_me:10905: \$? = $ac_status" >&5
10906   (exit $ac_status); } &&
10907          { ac_try='test -s conftest.$ac_objext'
10908   { (eval echo "$as_me:10908: \"$ac_try\"") >&5
10909   (eval $ac_try) 2>&5
10910   ac_status=$?
10911   echo "$as_me:10911: \$? = $ac_status" >&5
10912   (exit $ac_status); }; }; then
10913   INTEL_COMPILER=yes
10914 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10915
10916 else
10917   echo "$as_me: failed program was:" >&5
10918 cat conftest.$ac_ext >&5
10919 fi
10920 rm -f conftest.$ac_objext conftest.$ac_ext
10921                 CFLAGS="$cf_save_CFLAGS"
10922                 echo "$as_me:10922: result: $INTEL_COMPILER" >&5
10923 echo "${ECHO_T}$INTEL_COMPILER" >&6
10924                 ;;
10925         esac
10926 fi
10927
10928 cat > conftest.$ac_ext <<EOF
10929 #line 10929 "${as_me-configure}"
10930 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10931 EOF
10932
10933 if test "$INTEL_COMPILER" = yes
10934 then
10935 # The "-wdXXX" options suppress warnings:
10936 # remark #1419: external declaration in primary source file
10937 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10938 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10939 # remark #193: zero used for undefined preprocessing identifier
10940 # remark #593: variable "curs_sb_left_arrow" was set but never used
10941 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10942 # remark #869: parameter "tw" was never referenced
10943 # remark #981: operands are evaluated in unspecified order
10944 # warning #279: controlling expression is constant
10945
10946         { echo "$as_me:10946: checking for $CC warning options..." >&5
10947 echo "$as_me: checking for $CC warning options..." >&6;}
10948         cf_save_CFLAGS="$CFLAGS"
10949         EXTRA_CFLAGS="-Wall"
10950         for cf_opt in \
10951                 wd1419 \
10952                 wd1683 \
10953                 wd1684 \
10954                 wd193 \
10955                 wd593 \
10956                 wd279 \
10957                 wd810 \
10958                 wd869 \
10959                 wd981
10960         do
10961                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10962                 if { (eval echo "$as_me:10962: \"$ac_compile\"") >&5
10963   (eval $ac_compile) 2>&5
10964   ac_status=$?
10965   echo "$as_me:10965: \$? = $ac_status" >&5
10966   (exit $ac_status); }; then
10967                         test -n "$verbose" && echo "$as_me:10967: result: ... -$cf_opt" >&5
10968 echo "${ECHO_T}... -$cf_opt" >&6
10969                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10970                 fi
10971         done
10972         CFLAGS="$cf_save_CFLAGS"
10973
10974 elif test "$GCC" = yes
10975 then
10976         { echo "$as_me:10976: checking for $CC warning options..." >&5
10977 echo "$as_me: checking for $CC warning options..." >&6;}
10978         cf_save_CFLAGS="$CFLAGS"
10979         EXTRA_CFLAGS=
10980         cf_warn_CONST=""
10981         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10982         for cf_opt in W Wall \
10983                 Wbad-function-cast \
10984                 Wcast-align \
10985                 Wcast-qual \
10986                 Winline \
10987                 Wmissing-declarations \
10988                 Wmissing-prototypes \
10989                 Wnested-externs \
10990                 Wpointer-arith \
10991                 Wshadow \
10992                 Wstrict-prototypes \
10993                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10994         do
10995                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10996                 if { (eval echo "$as_me:10996: \"$ac_compile\"") >&5
10997   (eval $ac_compile) 2>&5
10998   ac_status=$?
10999   echo "$as_me:10999: \$? = $ac_status" >&5
11000   (exit $ac_status); }; then
11001                         test -n "$verbose" && echo "$as_me:11001: result: ... -$cf_opt" >&5
11002 echo "${ECHO_T}... -$cf_opt" >&6
11003                         case $cf_opt in #(vi
11004                         Wcast-qual) #(vi
11005                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11006                                 ;;
11007                         Winline) #(vi
11008                                 case $GCC_VERSION in
11009                                 [34].*)
11010                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11011
11012 echo "${as_me-configure}:11012: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11013
11014                                         continue;;
11015                                 esac
11016                                 ;;
11017                         esac
11018                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11019                 fi
11020         done
11021         CFLAGS="$cf_save_CFLAGS"
11022 fi
11023 rm -f conftest*
11024
11025         if test "$cf_with_cxx" = yes ; then
11026
11027 INTEL_CPLUSPLUS=no
11028
11029 if test "$GCC" = yes ; then
11030         case $host_os in
11031         linux*|gnu*)
11032                 echo "$as_me:11032: checking if this is really Intel C++ compiler" >&5
11033 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11034                 cf_save_CFLAGS="$CXXFLAGS"
11035                 CXXFLAGS="$CXXFLAGS -no-gcc"
11036                 cat >conftest.$ac_ext <<_ACEOF
11037 #line 11037 "configure"
11038 #include "confdefs.h"
11039
11040 int
11041 main ()
11042 {
11043
11044 #ifdef __INTEL_COMPILER
11045 #else
11046 make an error
11047 #endif
11048
11049   ;
11050   return 0;
11051 }
11052 _ACEOF
11053 rm -f conftest.$ac_objext
11054 if { (eval echo "$as_me:11054: \"$ac_compile\"") >&5
11055   (eval $ac_compile) 2>&5
11056   ac_status=$?
11057   echo "$as_me:11057: \$? = $ac_status" >&5
11058   (exit $ac_status); } &&
11059          { ac_try='test -s conftest.$ac_objext'
11060   { (eval echo "$as_me:11060: \"$ac_try\"") >&5
11061   (eval $ac_try) 2>&5
11062   ac_status=$?
11063   echo "$as_me:11063: \$? = $ac_status" >&5
11064   (exit $ac_status); }; }; then
11065   INTEL_CPLUSPLUS=yes
11066 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11067
11068 else
11069   echo "$as_me: failed program was:" >&5
11070 cat conftest.$ac_ext >&5
11071 fi
11072 rm -f conftest.$ac_objext conftest.$ac_ext
11073                 CXXFLAGS="$cf_save_CFLAGS"
11074                 echo "$as_me:11074: result: $INTEL_CPLUSPLUS" >&5
11075 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11076                 ;;
11077         esac
11078 fi
11079
11080 ac_ext=cc
11081 ac_cpp='$CXXCPP $CPPFLAGS'
11082 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11083 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11084 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11085 ac_main_return=return
11086
11087 cat > conftest.$ac_ext <<EOF
11088 #line 11088 "configure"
11089 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11090 EOF
11091
11092 if test "$INTEL_CPLUSPLUS" = yes
11093 then
11094 # The "-wdXXX" options suppress warnings:
11095 # remark #1419: external declaration in primary source file
11096 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11097 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11098 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11099 # remark #193: zero used for undefined preprocessing identifier
11100 # remark #593: variable "curs_sb_left_arrow" was set but never used
11101 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11102 # remark #869: parameter "tw" was never referenced
11103 # remark #981: operands are evaluated in unspecified order
11104 # warning #269: invalid format string conversion
11105
11106         { echo "$as_me:11106: checking for $CC warning options..." >&5
11107 echo "$as_me: checking for $CC warning options..." >&6;}
11108         cf_save_CXXFLAGS="$CXXFLAGS"
11109         EXTRA_CXXFLAGS="-Wall"
11110         for cf_opt in \
11111                 wd1419 \
11112                 wd1682 \
11113                 wd1683 \
11114                 wd1684 \
11115                 wd193 \
11116                 wd279 \
11117                 wd593 \
11118                 wd810 \
11119                 wd869 \
11120                 wd981
11121         do
11122                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11123                 if { (eval echo "$as_me:11123: \"$ac_compile\"") >&5
11124   (eval $ac_compile) 2>&5
11125   ac_status=$?
11126   echo "$as_me:11126: \$? = $ac_status" >&5
11127   (exit $ac_status); }; then
11128                         test -n "$verbose" && echo "$as_me:11128: result: ... -$cf_opt" >&5
11129 echo "${ECHO_T}... -$cf_opt" >&6
11130                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11131                 fi
11132         done
11133         CXXFLAGS="$cf_save_CXXFLAGS"
11134
11135 elif test "$GXX" = yes
11136 then
11137         { echo "$as_me:11137: checking for $CXX warning options..." >&5
11138 echo "$as_me: checking for $CXX warning options..." >&6;}
11139         cf_save_CXXFLAGS="$CXXFLAGS"
11140         EXTRA_CXXFLAGS="-W -Wall"
11141         cf_gxx_extra_warnings=""
11142         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11143         case "$GCC_VERSION" in
11144         [1-2].*)
11145                 ;;
11146         *)
11147                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11148                 ;;
11149         esac
11150         for cf_opt in \
11151                 Wabi \
11152                 fabi-version=0 \
11153                 Woverloaded-virtual \
11154                 Wsign-promo \
11155                 Wsynth \
11156                 Wold-style-cast \
11157                 Wcast-align \
11158                 Wcast-qual \
11159                 Wmissing-prototypes \
11160                 Wpointer-arith \
11161                 Wshadow \
11162                 Wstrict-prototypes \
11163                 Wundef $cf_gxx_extra_warnings Wno-unused
11164         do
11165                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11166                 if { (eval echo "$as_me:11166: \"$ac_compile\"") >&5
11167   (eval $ac_compile) 2>&5
11168   ac_status=$?
11169   echo "$as_me:11169: \$? = $ac_status" >&5
11170   (exit $ac_status); }; then
11171                         test -n "$verbose" && echo "$as_me:11171: result: ... -$cf_opt" >&5
11172 echo "${ECHO_T}... -$cf_opt" >&6
11173                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11174                 else
11175                         test -n "$verbose" && echo "$as_me:11175: result: ... no -$cf_opt" >&5
11176 echo "${ECHO_T}... no -$cf_opt" >&6
11177                 fi
11178         done
11179         CXXFLAGS="$cf_save_CXXFLAGS"
11180 fi
11181
11182 rm -f conftest*
11183 ac_ext=c
11184 ac_cpp='$CPP $CPPFLAGS'
11185 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11186 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11187 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11188 ac_main_return=return
11189
11190         fi
11191 fi
11192
11193 if test "$GCC" = yes
11194 then
11195 cat > conftest.i <<EOF
11196 #ifndef GCC_PRINTF
11197 #define GCC_PRINTF 0
11198 #endif
11199 #ifndef GCC_SCANF
11200 #define GCC_SCANF 0
11201 #endif
11202 #ifndef GCC_NORETURN
11203 #define GCC_NORETURN /* nothing */
11204 #endif
11205 #ifndef GCC_UNUSED
11206 #define GCC_UNUSED /* nothing */
11207 #endif
11208 EOF
11209 if test "$GCC" = yes
11210 then
11211         { echo "$as_me:11211: checking for $CC __attribute__ directives..." >&5
11212 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11213 cat > conftest.$ac_ext <<EOF
11214 #line 11214 "${as_me-configure}"
11215 #include "confdefs.h"
11216 #include "conftest.h"
11217 #include "conftest.i"
11218 #if     GCC_PRINTF
11219 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11220 #else
11221 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11222 #endif
11223 #if     GCC_SCANF
11224 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11225 #else
11226 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11227 #endif
11228 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11229 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11230 extern void foo(void) GCC_NORETURN;
11231 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11232 EOF
11233         cf_printf_attribute=no
11234         cf_scanf_attribute=no
11235         for cf_attribute in scanf printf unused noreturn
11236         do
11237
11238 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11239
11240                 cf_directive="__attribute__(($cf_attribute))"
11241                 echo "checking for $CC $cf_directive" 1>&5
11242
11243                 case $cf_attribute in #(vi
11244                 printf) #(vi
11245                         cf_printf_attribute=yes
11246                         cat >conftest.h <<EOF
11247 #define GCC_$cf_ATTRIBUTE 1
11248 EOF
11249                         ;;
11250                 scanf) #(vi
11251                         cf_scanf_attribute=yes
11252                         cat >conftest.h <<EOF
11253 #define GCC_$cf_ATTRIBUTE 1
11254 EOF
11255                         ;;
11256                 *) #(vi
11257                         cat >conftest.h <<EOF
11258 #define GCC_$cf_ATTRIBUTE $cf_directive
11259 EOF
11260                         ;;
11261                 esac
11262
11263                 if { (eval echo "$as_me:11263: \"$ac_compile\"") >&5
11264   (eval $ac_compile) 2>&5
11265   ac_status=$?
11266   echo "$as_me:11266: \$? = $ac_status" >&5
11267   (exit $ac_status); }; then
11268                         test -n "$verbose" && echo "$as_me:11268: result: ... $cf_attribute" >&5
11269 echo "${ECHO_T}... $cf_attribute" >&6
11270                         cat conftest.h >>confdefs.h
11271                         case $cf_attribute in #(vi
11272                         printf) #(vi
11273                                 if test "$cf_printf_attribute" = no ; then
11274                                         cat >>confdefs.h <<EOF
11275 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11276 EOF
11277                                 else
11278                                         cat >>confdefs.h <<EOF
11279 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11280 EOF
11281                                 fi
11282                                 ;;
11283                         scanf) #(vi
11284                                 if test "$cf_scanf_attribute" = no ; then
11285                                         cat >>confdefs.h <<EOF
11286 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11287 EOF
11288                                 else
11289                                         cat >>confdefs.h <<EOF
11290 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11291 EOF
11292                                 fi
11293                                 ;;
11294                         esac
11295                 fi
11296         done
11297 else
11298         fgrep define conftest.i >>confdefs.h
11299 fi
11300 rm -rf conftest*
11301 fi
11302
11303 ###     use option --enable-assertions to turn on generation of assertion code
11304 echo "$as_me:11304: checking if you want to enable runtime assertions" >&5
11305 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11306
11307 # Check whether --enable-assertions or --disable-assertions was given.
11308 if test "${enable_assertions+set}" = set; then
11309   enableval="$enable_assertions"
11310   with_assertions=$enableval
11311 else
11312   with_assertions=no
11313 fi;
11314 echo "$as_me:11314: result: $with_assertions" >&5
11315 echo "${ECHO_T}$with_assertions" >&6
11316 if test -n "$GCC"
11317 then
11318         if test "$with_assertions" = no
11319         then
11320                 cat >>confdefs.h <<\EOF
11321 #define NDEBUG 1
11322 EOF
11323
11324                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11325         else
11326                 ADAFLAGS="$ADAFLAGS -gnata"
11327         fi
11328 fi
11329
11330 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11331
11332 echo "$as_me:11332: checking if you want to use dmalloc for testing" >&5
11333 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11334
11335 # Check whether --with-dmalloc or --without-dmalloc was given.
11336 if test "${with_dmalloc+set}" = set; then
11337   withval="$with_dmalloc"
11338   cat >>confdefs.h <<\EOF
11339 #define USE_DMALLOC 1
11340 EOF
11341
11342         : ${with_cflags:=-g}
11343         : ${with_no_leaks:=yes}
11344          with_dmalloc=yes
11345 else
11346   with_dmalloc=
11347 fi;
11348 echo "$as_me:11348: result: ${with_dmalloc:-no}" >&5
11349 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11350
11351 case .$with_cflags in #(vi
11352 .*-g*)
11353         case .$CFLAGS in #(vi
11354         .*-g*) #(vi
11355                 ;;
11356         *)
11357
11358 cf_fix_cppflags=no
11359 cf_new_cflags=
11360 cf_new_cppflags=
11361 cf_new_extra_cppflags=
11362
11363 for cf_add_cflags in -g
11364 do
11365 case $cf_fix_cppflags in
11366 no)
11367         case $cf_add_cflags in #(vi
11368         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11369                 case $cf_add_cflags in
11370                 -D*)
11371                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11372
11373                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11374                                 && test -z "${cf_tst_cflags}" \
11375                                 && cf_fix_cppflags=yes
11376
11377                         if test $cf_fix_cppflags = yes ; then
11378                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11379                                 continue
11380                         elif test "${cf_tst_cflags}" = "\"'" ; then
11381                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11382                                 continue
11383                         fi
11384                         ;;
11385                 esac
11386                 case "$CPPFLAGS" in
11387                 *$cf_add_cflags) #(vi
11388                         ;;
11389                 *) #(vi
11390                         case $cf_add_cflags in #(vi
11391                         -D*)
11392                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11393
11394 CPPFLAGS=`echo "$CPPFLAGS" | \
11395         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11396                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11397
11398                                 ;;
11399                         esac
11400                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11401                         ;;
11402                 esac
11403                 ;;
11404         *)
11405                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11406                 ;;
11407         esac
11408         ;;
11409 yes)
11410         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11411
11412         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11413
11414         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11415                 && test -z "${cf_tst_cflags}" \
11416                 && cf_fix_cppflags=no
11417         ;;
11418 esac
11419 done
11420
11421 if test -n "$cf_new_cflags" ; then
11422
11423         CFLAGS="$CFLAGS $cf_new_cflags"
11424 fi
11425
11426 if test -n "$cf_new_cppflags" ; then
11427
11428         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11429 fi
11430
11431 if test -n "$cf_new_extra_cppflags" ; then
11432
11433         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11434 fi
11435
11436                 ;;
11437         esac
11438         ;;
11439 esac
11440
11441 if test "$with_dmalloc" = yes ; then
11442         echo "$as_me:11442: checking for dmalloc.h" >&5
11443 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11444 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11445   echo $ECHO_N "(cached) $ECHO_C" >&6
11446 else
11447   cat >conftest.$ac_ext <<_ACEOF
11448 #line 11448 "configure"
11449 #include "confdefs.h"
11450 #include <dmalloc.h>
11451 _ACEOF
11452 if { (eval echo "$as_me:11452: \"$ac_cpp conftest.$ac_ext\"") >&5
11453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11454   ac_status=$?
11455   egrep -v '^ *\+' conftest.er1 >conftest.err
11456   rm -f conftest.er1
11457   cat conftest.err >&5
11458   echo "$as_me:11458: \$? = $ac_status" >&5
11459   (exit $ac_status); } >/dev/null; then
11460   if test -s conftest.err; then
11461     ac_cpp_err=$ac_c_preproc_warn_flag
11462   else
11463     ac_cpp_err=
11464   fi
11465 else
11466   ac_cpp_err=yes
11467 fi
11468 if test -z "$ac_cpp_err"; then
11469   ac_cv_header_dmalloc_h=yes
11470 else
11471   echo "$as_me: failed program was:" >&5
11472   cat conftest.$ac_ext >&5
11473   ac_cv_header_dmalloc_h=no
11474 fi
11475 rm -f conftest.err conftest.$ac_ext
11476 fi
11477 echo "$as_me:11477: result: $ac_cv_header_dmalloc_h" >&5
11478 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11479 if test $ac_cv_header_dmalloc_h = yes; then
11480
11481 echo "$as_me:11481: checking for dmalloc_debug in -ldmalloc" >&5
11482 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11483 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11484   echo $ECHO_N "(cached) $ECHO_C" >&6
11485 else
11486   ac_check_lib_save_LIBS=$LIBS
11487 LIBS="-ldmalloc  $LIBS"
11488 cat >conftest.$ac_ext <<_ACEOF
11489 #line 11489 "configure"
11490 #include "confdefs.h"
11491
11492 /* Override any gcc2 internal prototype to avoid an error.  */
11493 #ifdef __cplusplus
11494 extern "C"
11495 #endif
11496 /* We use char because int might match the return type of a gcc2
11497    builtin and then its argument prototype would still apply.  */
11498 char dmalloc_debug ();
11499 int
11500 main ()
11501 {
11502 dmalloc_debug ();
11503   ;
11504   return 0;
11505 }
11506 _ACEOF
11507 rm -f conftest.$ac_objext conftest$ac_exeext
11508 if { (eval echo "$as_me:11508: \"$ac_link\"") >&5
11509   (eval $ac_link) 2>&5
11510   ac_status=$?
11511   echo "$as_me:11511: \$? = $ac_status" >&5
11512   (exit $ac_status); } &&
11513          { ac_try='test -s conftest$ac_exeext'
11514   { (eval echo "$as_me:11514: \"$ac_try\"") >&5
11515   (eval $ac_try) 2>&5
11516   ac_status=$?
11517   echo "$as_me:11517: \$? = $ac_status" >&5
11518   (exit $ac_status); }; }; then
11519   ac_cv_lib_dmalloc_dmalloc_debug=yes
11520 else
11521   echo "$as_me: failed program was:" >&5
11522 cat conftest.$ac_ext >&5
11523 ac_cv_lib_dmalloc_dmalloc_debug=no
11524 fi
11525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11526 LIBS=$ac_check_lib_save_LIBS
11527 fi
11528 echo "$as_me:11528: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11529 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11530 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11531   cat >>confdefs.h <<EOF
11532 #define HAVE_LIBDMALLOC 1
11533 EOF
11534
11535   LIBS="-ldmalloc $LIBS"
11536
11537 fi
11538
11539 fi
11540
11541 fi
11542
11543 echo "$as_me:11543: checking if you want to use dbmalloc for testing" >&5
11544 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11545
11546 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11547 if test "${with_dbmalloc+set}" = set; then
11548   withval="$with_dbmalloc"
11549   cat >>confdefs.h <<\EOF
11550 #define USE_DBMALLOC 1
11551 EOF
11552
11553         : ${with_cflags:=-g}
11554         : ${with_no_leaks:=yes}
11555          with_dbmalloc=yes
11556 else
11557   with_dbmalloc=
11558 fi;
11559 echo "$as_me:11559: result: ${with_dbmalloc:-no}" >&5
11560 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11561
11562 case .$with_cflags in #(vi
11563 .*-g*)
11564         case .$CFLAGS in #(vi
11565         .*-g*) #(vi
11566                 ;;
11567         *)
11568
11569 cf_fix_cppflags=no
11570 cf_new_cflags=
11571 cf_new_cppflags=
11572 cf_new_extra_cppflags=
11573
11574 for cf_add_cflags in -g
11575 do
11576 case $cf_fix_cppflags in
11577 no)
11578         case $cf_add_cflags in #(vi
11579         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11580                 case $cf_add_cflags in
11581                 -D*)
11582                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11583
11584                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11585                                 && test -z "${cf_tst_cflags}" \
11586                                 && cf_fix_cppflags=yes
11587
11588                         if test $cf_fix_cppflags = yes ; then
11589                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11590                                 continue
11591                         elif test "${cf_tst_cflags}" = "\"'" ; then
11592                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11593                                 continue
11594                         fi
11595                         ;;
11596                 esac
11597                 case "$CPPFLAGS" in
11598                 *$cf_add_cflags) #(vi
11599                         ;;
11600                 *) #(vi
11601                         case $cf_add_cflags in #(vi
11602                         -D*)
11603                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11604
11605 CPPFLAGS=`echo "$CPPFLAGS" | \
11606         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11607                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11608
11609                                 ;;
11610                         esac
11611                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11612                         ;;
11613                 esac
11614                 ;;
11615         *)
11616                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11617                 ;;
11618         esac
11619         ;;
11620 yes)
11621         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11622
11623         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11624
11625         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11626                 && test -z "${cf_tst_cflags}" \
11627                 && cf_fix_cppflags=no
11628         ;;
11629 esac
11630 done
11631
11632 if test -n "$cf_new_cflags" ; then
11633
11634         CFLAGS="$CFLAGS $cf_new_cflags"
11635 fi
11636
11637 if test -n "$cf_new_cppflags" ; then
11638
11639         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11640 fi
11641
11642 if test -n "$cf_new_extra_cppflags" ; then
11643
11644         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11645 fi
11646
11647                 ;;
11648         esac
11649         ;;
11650 esac
11651
11652 if test "$with_dbmalloc" = yes ; then
11653         echo "$as_me:11653: checking for dbmalloc.h" >&5
11654 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11655 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11656   echo $ECHO_N "(cached) $ECHO_C" >&6
11657 else
11658   cat >conftest.$ac_ext <<_ACEOF
11659 #line 11659 "configure"
11660 #include "confdefs.h"
11661 #include <dbmalloc.h>
11662 _ACEOF
11663 if { (eval echo "$as_me:11663: \"$ac_cpp conftest.$ac_ext\"") >&5
11664   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11665   ac_status=$?
11666   egrep -v '^ *\+' conftest.er1 >conftest.err
11667   rm -f conftest.er1
11668   cat conftest.err >&5
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit $ac_status); } >/dev/null; then
11671   if test -s conftest.err; then
11672     ac_cpp_err=$ac_c_preproc_warn_flag
11673   else
11674     ac_cpp_err=
11675   fi
11676 else
11677   ac_cpp_err=yes
11678 fi
11679 if test -z "$ac_cpp_err"; then
11680   ac_cv_header_dbmalloc_h=yes
11681 else
11682   echo "$as_me: failed program was:" >&5
11683   cat conftest.$ac_ext >&5
11684   ac_cv_header_dbmalloc_h=no
11685 fi
11686 rm -f conftest.err conftest.$ac_ext
11687 fi
11688 echo "$as_me:11688: result: $ac_cv_header_dbmalloc_h" >&5
11689 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11690 if test $ac_cv_header_dbmalloc_h = yes; then
11691
11692 echo "$as_me:11692: checking for debug_malloc in -ldbmalloc" >&5
11693 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11694 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11695   echo $ECHO_N "(cached) $ECHO_C" >&6
11696 else
11697   ac_check_lib_save_LIBS=$LIBS
11698 LIBS="-ldbmalloc  $LIBS"
11699 cat >conftest.$ac_ext <<_ACEOF
11700 #line 11700 "configure"
11701 #include "confdefs.h"
11702
11703 /* Override any gcc2 internal prototype to avoid an error.  */
11704 #ifdef __cplusplus
11705 extern "C"
11706 #endif
11707 /* We use char because int might match the return type of a gcc2
11708    builtin and then its argument prototype would still apply.  */
11709 char debug_malloc ();
11710 int
11711 main ()
11712 {
11713 debug_malloc ();
11714   ;
11715   return 0;
11716 }
11717 _ACEOF
11718 rm -f conftest.$ac_objext conftest$ac_exeext
11719 if { (eval echo "$as_me:11719: \"$ac_link\"") >&5
11720   (eval $ac_link) 2>&5
11721   ac_status=$?
11722   echo "$as_me:11722: \$? = $ac_status" >&5
11723   (exit $ac_status); } &&
11724          { ac_try='test -s conftest$ac_exeext'
11725   { (eval echo "$as_me:11725: \"$ac_try\"") >&5
11726   (eval $ac_try) 2>&5
11727   ac_status=$?
11728   echo "$as_me:11728: \$? = $ac_status" >&5
11729   (exit $ac_status); }; }; then
11730   ac_cv_lib_dbmalloc_debug_malloc=yes
11731 else
11732   echo "$as_me: failed program was:" >&5
11733 cat conftest.$ac_ext >&5
11734 ac_cv_lib_dbmalloc_debug_malloc=no
11735 fi
11736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11737 LIBS=$ac_check_lib_save_LIBS
11738 fi
11739 echo "$as_me:11739: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11740 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11741 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11742   cat >>confdefs.h <<EOF
11743 #define HAVE_LIBDBMALLOC 1
11744 EOF
11745
11746   LIBS="-ldbmalloc $LIBS"
11747
11748 fi
11749
11750 fi
11751
11752 fi
11753
11754 echo "$as_me:11754: checking if you want to use valgrind for testing" >&5
11755 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11756
11757 # Check whether --with-valgrind or --without-valgrind was given.
11758 if test "${with_valgrind+set}" = set; then
11759   withval="$with_valgrind"
11760   cat >>confdefs.h <<\EOF
11761 #define USE_VALGRIND 1
11762 EOF
11763
11764         : ${with_cflags:=-g}
11765         : ${with_no_leaks:=yes}
11766          with_valgrind=yes
11767 else
11768   with_valgrind=
11769 fi;
11770 echo "$as_me:11770: result: ${with_valgrind:-no}" >&5
11771 echo "${ECHO_T}${with_valgrind:-no}" >&6
11772
11773 case .$with_cflags in #(vi
11774 .*-g*)
11775         case .$CFLAGS in #(vi
11776         .*-g*) #(vi
11777                 ;;
11778         *)
11779
11780 cf_fix_cppflags=no
11781 cf_new_cflags=
11782 cf_new_cppflags=
11783 cf_new_extra_cppflags=
11784
11785 for cf_add_cflags in -g
11786 do
11787 case $cf_fix_cppflags in
11788 no)
11789         case $cf_add_cflags in #(vi
11790         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11791                 case $cf_add_cflags in
11792                 -D*)
11793                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11794
11795                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11796                                 && test -z "${cf_tst_cflags}" \
11797                                 && cf_fix_cppflags=yes
11798
11799                         if test $cf_fix_cppflags = yes ; then
11800                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11801                                 continue
11802                         elif test "${cf_tst_cflags}" = "\"'" ; then
11803                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11804                                 continue
11805                         fi
11806                         ;;
11807                 esac
11808                 case "$CPPFLAGS" in
11809                 *$cf_add_cflags) #(vi
11810                         ;;
11811                 *) #(vi
11812                         case $cf_add_cflags in #(vi
11813                         -D*)
11814                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11815
11816 CPPFLAGS=`echo "$CPPFLAGS" | \
11817         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11818                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11819
11820                                 ;;
11821                         esac
11822                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11823                         ;;
11824                 esac
11825                 ;;
11826         *)
11827                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11828                 ;;
11829         esac
11830         ;;
11831 yes)
11832         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11833
11834         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11835
11836         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11837                 && test -z "${cf_tst_cflags}" \
11838                 && cf_fix_cppflags=no
11839         ;;
11840 esac
11841 done
11842
11843 if test -n "$cf_new_cflags" ; then
11844
11845         CFLAGS="$CFLAGS $cf_new_cflags"
11846 fi
11847
11848 if test -n "$cf_new_cppflags" ; then
11849
11850         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11851 fi
11852
11853 if test -n "$cf_new_extra_cppflags" ; then
11854
11855         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11856 fi
11857
11858                 ;;
11859         esac
11860         ;;
11861 esac
11862
11863 echo "$as_me:11863: checking if you want to perform memory-leak testing" >&5
11864 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11865
11866 # Check whether --enable-leaks or --disable-leaks was given.
11867 if test "${enable_leaks+set}" = set; then
11868   enableval="$enable_leaks"
11869   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
11870 else
11871   : ${with_no_leaks:=no}
11872 fi;
11873 echo "$as_me:11873: result: $with_no_leaks" >&5
11874 echo "${ECHO_T}$with_no_leaks" >&6
11875
11876 if test "$with_no_leaks" = yes ; then
11877         cat >>confdefs.h <<\EOF
11878 #define NO_LEAKS 1
11879 EOF
11880
11881 fi
11882
11883 cat >>confdefs.h <<\EOF
11884 #define HAVE_NC_ALLOC_H 1
11885 EOF
11886
11887 ###     use option --enable-expanded to generate certain macros as functions
11888
11889 # Check whether --enable-expanded or --disable-expanded was given.
11890 if test "${enable_expanded+set}" = set; then
11891   enableval="$enable_expanded"
11892   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11893 #define NCURSES_EXPANDED 1
11894 EOF
11895
11896 fi;
11897
11898 ###     use option --disable-macros to suppress macros in favor of functions
11899
11900 # Check whether --enable-macros or --disable-macros was given.
11901 if test "${enable_macros+set}" = set; then
11902   enableval="$enable_macros"
11903   test "$enableval" = no && cat >>confdefs.h <<\EOF
11904 #define NCURSES_NOMACROS 1
11905 EOF
11906
11907 fi;
11908
11909 # Normally we only add trace() to the debug-library.  Allow this to be
11910 # extended to all models of the ncurses library:
11911 cf_all_traces=no
11912 case "$CFLAGS $CPPFLAGS" in
11913 *-DTRACE*)
11914         cf_all_traces=yes
11915         ;;
11916 esac
11917
11918 echo "$as_me:11918: checking whether to add trace feature to all models" >&5
11919 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11920
11921 # Check whether --with-trace or --without-trace was given.
11922 if test "${with_trace+set}" = set; then
11923   withval="$with_trace"
11924   cf_with_trace=$withval
11925 else
11926   cf_with_trace=$cf_all_traces
11927 fi;
11928 echo "$as_me:11928: result: $cf_with_trace" >&5
11929 echo "${ECHO_T}$cf_with_trace" >&6
11930
11931 if test "$cf_with_trace" = yes ; then
11932         LIB_TRACING=all
11933         ADA_TRACE=TRUE
11934
11935 cf_fix_cppflags=no
11936 cf_new_cflags=
11937 cf_new_cppflags=
11938 cf_new_extra_cppflags=
11939
11940 for cf_add_cflags in -DTRACE
11941 do
11942 case $cf_fix_cppflags in
11943 no)
11944         case $cf_add_cflags in #(vi
11945         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11946                 case $cf_add_cflags in
11947                 -D*)
11948                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11949
11950                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11951                                 && test -z "${cf_tst_cflags}" \
11952                                 && cf_fix_cppflags=yes
11953
11954                         if test $cf_fix_cppflags = yes ; then
11955                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11956                                 continue
11957                         elif test "${cf_tst_cflags}" = "\"'" ; then
11958                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11959                                 continue
11960                         fi
11961                         ;;
11962                 esac
11963                 case "$CPPFLAGS" in
11964                 *$cf_add_cflags) #(vi
11965                         ;;
11966                 *) #(vi
11967                         case $cf_add_cflags in #(vi
11968                         -D*)
11969                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11970
11971 CPPFLAGS=`echo "$CPPFLAGS" | \
11972         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11973                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11974
11975                                 ;;
11976                         esac
11977                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11978                         ;;
11979                 esac
11980                 ;;
11981         *)
11982                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11983                 ;;
11984         esac
11985         ;;
11986 yes)
11987         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11988
11989         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11990
11991         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11992                 && test -z "${cf_tst_cflags}" \
11993                 && cf_fix_cppflags=no
11994         ;;
11995 esac
11996 done
11997
11998 if test -n "$cf_new_cflags" ; then
11999
12000         CFLAGS="$CFLAGS $cf_new_cflags"
12001 fi
12002
12003 if test -n "$cf_new_cppflags" ; then
12004
12005         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12006 fi
12007
12008 if test -n "$cf_new_extra_cppflags" ; then
12009
12010         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12011 fi
12012
12013 else
12014         LIB_TRACING=DEBUG
12015         ADA_TRACE=FALSE
12016 fi
12017
12018 ###     Checks for libraries.
12019 case $cf_cv_system_name in #(vi
12020 *mingw32*) #(vi
12021         ;;
12022 *)
12023 echo "$as_me:12023: checking for gettimeofday" >&5
12024 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12025 if test "${ac_cv_func_gettimeofday+set}" = set; then
12026   echo $ECHO_N "(cached) $ECHO_C" >&6
12027 else
12028   cat >conftest.$ac_ext <<_ACEOF
12029 #line 12029 "configure"
12030 #include "confdefs.h"
12031 /* System header to define __stub macros and hopefully few prototypes,
12032     which can conflict with char gettimeofday (); below.  */
12033 #include <assert.h>
12034 /* Override any gcc2 internal prototype to avoid an error.  */
12035 #ifdef __cplusplus
12036 extern "C"
12037 #endif
12038 /* We use char because int might match the return type of a gcc2
12039    builtin and then its argument prototype would still apply.  */
12040 char gettimeofday ();
12041 char (*f) ();
12042
12043 int
12044 main ()
12045 {
12046 /* The GNU C library defines this for functions which it implements
12047     to always fail with ENOSYS.  Some functions are actually named
12048     something starting with __ and the normal name is an alias.  */
12049 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12050 choke me
12051 #else
12052 f = gettimeofday;
12053 #endif
12054
12055   ;
12056   return 0;
12057 }
12058 _ACEOF
12059 rm -f conftest.$ac_objext conftest$ac_exeext
12060 if { (eval echo "$as_me:12060: \"$ac_link\"") >&5
12061   (eval $ac_link) 2>&5
12062   ac_status=$?
12063   echo "$as_me:12063: \$? = $ac_status" >&5
12064   (exit $ac_status); } &&
12065          { ac_try='test -s conftest$ac_exeext'
12066   { (eval echo "$as_me:12066: \"$ac_try\"") >&5
12067   (eval $ac_try) 2>&5
12068   ac_status=$?
12069   echo "$as_me:12069: \$? = $ac_status" >&5
12070   (exit $ac_status); }; }; then
12071   ac_cv_func_gettimeofday=yes
12072 else
12073   echo "$as_me: failed program was:" >&5
12074 cat conftest.$ac_ext >&5
12075 ac_cv_func_gettimeofday=no
12076 fi
12077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12078 fi
12079 echo "$as_me:12079: result: $ac_cv_func_gettimeofday" >&5
12080 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12081 if test $ac_cv_func_gettimeofday = yes; then
12082   cat >>confdefs.h <<\EOF
12083 #define HAVE_GETTIMEOFDAY 1
12084 EOF
12085
12086 else
12087
12088 echo "$as_me:12088: checking for gettimeofday in -lbsd" >&5
12089 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12090 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12091   echo $ECHO_N "(cached) $ECHO_C" >&6
12092 else
12093   ac_check_lib_save_LIBS=$LIBS
12094 LIBS="-lbsd  $LIBS"
12095 cat >conftest.$ac_ext <<_ACEOF
12096 #line 12096 "configure"
12097 #include "confdefs.h"
12098
12099 /* Override any gcc2 internal prototype to avoid an error.  */
12100 #ifdef __cplusplus
12101 extern "C"
12102 #endif
12103 /* We use char because int might match the return type of a gcc2
12104    builtin and then its argument prototype would still apply.  */
12105 char gettimeofday ();
12106 int
12107 main ()
12108 {
12109 gettimeofday ();
12110   ;
12111   return 0;
12112 }
12113 _ACEOF
12114 rm -f conftest.$ac_objext conftest$ac_exeext
12115 if { (eval echo "$as_me:12115: \"$ac_link\"") >&5
12116   (eval $ac_link) 2>&5
12117   ac_status=$?
12118   echo "$as_me:12118: \$? = $ac_status" >&5
12119   (exit $ac_status); } &&
12120          { ac_try='test -s conftest$ac_exeext'
12121   { (eval echo "$as_me:12121: \"$ac_try\"") >&5
12122   (eval $ac_try) 2>&5
12123   ac_status=$?
12124   echo "$as_me:12124: \$? = $ac_status" >&5
12125   (exit $ac_status); }; }; then
12126   ac_cv_lib_bsd_gettimeofday=yes
12127 else
12128   echo "$as_me: failed program was:" >&5
12129 cat conftest.$ac_ext >&5
12130 ac_cv_lib_bsd_gettimeofday=no
12131 fi
12132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12133 LIBS=$ac_check_lib_save_LIBS
12134 fi
12135 echo "$as_me:12135: result: $ac_cv_lib_bsd_gettimeofday" >&5
12136 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12137 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12138   cat >>confdefs.h <<\EOF
12139 #define HAVE_GETTIMEOFDAY 1
12140 EOF
12141
12142         LIBS="$LIBS -lbsd"
12143 fi
12144
12145 fi
12146         ;;
12147 esac
12148
12149 echo "$as_me:12149: checking if -lm needed for math functions" >&5
12150 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12151 if test "${cf_cv_need_libm+set}" = set; then
12152   echo $ECHO_N "(cached) $ECHO_C" >&6
12153 else
12154
12155         cat >conftest.$ac_ext <<_ACEOF
12156 #line 12156 "configure"
12157 #include "confdefs.h"
12158
12159         #include <stdio.h>
12160         #include <math.h>
12161
12162 int
12163 main ()
12164 {
12165 double x = rand(); printf("result = %g\n", sin(x))
12166   ;
12167   return 0;
12168 }
12169 _ACEOF
12170 rm -f conftest.$ac_objext conftest$ac_exeext
12171 if { (eval echo "$as_me:12171: \"$ac_link\"") >&5
12172   (eval $ac_link) 2>&5
12173   ac_status=$?
12174   echo "$as_me:12174: \$? = $ac_status" >&5
12175   (exit $ac_status); } &&
12176          { ac_try='test -s conftest$ac_exeext'
12177   { (eval echo "$as_me:12177: \"$ac_try\"") >&5
12178   (eval $ac_try) 2>&5
12179   ac_status=$?
12180   echo "$as_me:12180: \$? = $ac_status" >&5
12181   (exit $ac_status); }; }; then
12182   cf_cv_need_libm=no
12183 else
12184   echo "$as_me: failed program was:" >&5
12185 cat conftest.$ac_ext >&5
12186 cf_cv_need_libm=yes
12187 fi
12188 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12189 fi
12190 echo "$as_me:12190: result: $cf_cv_need_libm" >&5
12191 echo "${ECHO_T}$cf_cv_need_libm" >&6
12192 if test "$cf_cv_need_libm" = yes
12193 then
12194 MATH_LIB=-lm
12195 fi
12196
12197 ###     Checks for header files.
12198 echo "$as_me:12198: checking for ANSI C header files" >&5
12199 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12200 if test "${ac_cv_header_stdc+set}" = set; then
12201   echo $ECHO_N "(cached) $ECHO_C" >&6
12202 else
12203   cat >conftest.$ac_ext <<_ACEOF
12204 #line 12204 "configure"
12205 #include "confdefs.h"
12206 #include <stdlib.h>
12207 #include <stdarg.h>
12208 #include <string.h>
12209 #include <float.h>
12210
12211 _ACEOF
12212 if { (eval echo "$as_me:12212: \"$ac_cpp conftest.$ac_ext\"") >&5
12213   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12214   ac_status=$?
12215   egrep -v '^ *\+' conftest.er1 >conftest.err
12216   rm -f conftest.er1
12217   cat conftest.err >&5
12218   echo "$as_me:12218: \$? = $ac_status" >&5
12219   (exit $ac_status); } >/dev/null; then
12220   if test -s conftest.err; then
12221     ac_cpp_err=$ac_c_preproc_warn_flag
12222   else
12223     ac_cpp_err=
12224   fi
12225 else
12226   ac_cpp_err=yes
12227 fi
12228 if test -z "$ac_cpp_err"; then
12229   ac_cv_header_stdc=yes
12230 else
12231   echo "$as_me: failed program was:" >&5
12232   cat conftest.$ac_ext >&5
12233   ac_cv_header_stdc=no
12234 fi
12235 rm -f conftest.err conftest.$ac_ext
12236
12237 if test $ac_cv_header_stdc = yes; then
12238   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12239   cat >conftest.$ac_ext <<_ACEOF
12240 #line 12240 "configure"
12241 #include "confdefs.h"
12242 #include <string.h>
12243
12244 _ACEOF
12245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12246   egrep "memchr" >/dev/null 2>&1; then
12247   :
12248 else
12249   ac_cv_header_stdc=no
12250 fi
12251 rm -f conftest*
12252
12253 fi
12254
12255 if test $ac_cv_header_stdc = yes; then
12256   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12257   cat >conftest.$ac_ext <<_ACEOF
12258 #line 12258 "configure"
12259 #include "confdefs.h"
12260 #include <stdlib.h>
12261
12262 _ACEOF
12263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12264   egrep "free" >/dev/null 2>&1; then
12265   :
12266 else
12267   ac_cv_header_stdc=no
12268 fi
12269 rm -f conftest*
12270
12271 fi
12272
12273 if test $ac_cv_header_stdc = yes; then
12274   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12275   if test "$cross_compiling" = yes; then
12276   :
12277 else
12278   cat >conftest.$ac_ext <<_ACEOF
12279 #line 12279 "configure"
12280 #include "confdefs.h"
12281 #include <ctype.h>
12282 #if ((' ' & 0x0FF) == 0x020)
12283 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12284 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12285 #else
12286 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12287                      || ('j' <= (c) && (c) <= 'r') \
12288                      || ('s' <= (c) && (c) <= 'z'))
12289 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12290 #endif
12291
12292 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12293 int
12294 main ()
12295 {
12296   int i;
12297   for (i = 0; i < 256; i++)
12298     if (XOR (islower (i), ISLOWER (i))
12299         || toupper (i) != TOUPPER (i))
12300       $ac_main_return(2);
12301   $ac_main_return (0);
12302 }
12303 _ACEOF
12304 rm -f conftest$ac_exeext
12305 if { (eval echo "$as_me:12305: \"$ac_link\"") >&5
12306   (eval $ac_link) 2>&5
12307   ac_status=$?
12308   echo "$as_me:12308: \$? = $ac_status" >&5
12309   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12310   { (eval echo "$as_me:12310: \"$ac_try\"") >&5
12311   (eval $ac_try) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit $ac_status); }; }; then
12315   :
12316 else
12317   echo "$as_me: program exited with status $ac_status" >&5
12318 echo "$as_me: failed program was:" >&5
12319 cat conftest.$ac_ext >&5
12320 ac_cv_header_stdc=no
12321 fi
12322 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12323 fi
12324 fi
12325 fi
12326 echo "$as_me:12326: result: $ac_cv_header_stdc" >&5
12327 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12328 if test $ac_cv_header_stdc = yes; then
12329
12330 cat >>confdefs.h <<\EOF
12331 #define STDC_HEADERS 1
12332 EOF
12333
12334 fi
12335
12336 ac_header_dirent=no
12337 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12338   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12339 echo "$as_me:12339: checking for $ac_hdr that defines DIR" >&5
12340 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12341 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12342   echo $ECHO_N "(cached) $ECHO_C" >&6
12343 else
12344   cat >conftest.$ac_ext <<_ACEOF
12345 #line 12345 "configure"
12346 #include "confdefs.h"
12347 #include <sys/types.h>
12348 #include <$ac_hdr>
12349
12350 int
12351 main ()
12352 {
12353 if ((DIR *) 0)
12354 return 0;
12355   ;
12356   return 0;
12357 }
12358 _ACEOF
12359 rm -f conftest.$ac_objext
12360 if { (eval echo "$as_me:12360: \"$ac_compile\"") >&5
12361   (eval $ac_compile) 2>&5
12362   ac_status=$?
12363   echo "$as_me:12363: \$? = $ac_status" >&5
12364   (exit $ac_status); } &&
12365          { ac_try='test -s conftest.$ac_objext'
12366   { (eval echo "$as_me:12366: \"$ac_try\"") >&5
12367   (eval $ac_try) 2>&5
12368   ac_status=$?
12369   echo "$as_me:12369: \$? = $ac_status" >&5
12370   (exit $ac_status); }; }; then
12371   eval "$as_ac_Header=yes"
12372 else
12373   echo "$as_me: failed program was:" >&5
12374 cat conftest.$ac_ext >&5
12375 eval "$as_ac_Header=no"
12376 fi
12377 rm -f conftest.$ac_objext conftest.$ac_ext
12378 fi
12379 echo "$as_me:12379: result: `eval echo '${'$as_ac_Header'}'`" >&5
12380 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12381 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12382   cat >>confdefs.h <<EOF
12383 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12384 EOF
12385
12386 ac_header_dirent=$ac_hdr; break
12387 fi
12388
12389 done
12390 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12391 if test $ac_header_dirent = dirent.h; then
12392   echo "$as_me:12392: checking for opendir in -ldir" >&5
12393 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12394 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12395   echo $ECHO_N "(cached) $ECHO_C" >&6
12396 else
12397   ac_check_lib_save_LIBS=$LIBS
12398 LIBS="-ldir  $LIBS"
12399 cat >conftest.$ac_ext <<_ACEOF
12400 #line 12400 "configure"
12401 #include "confdefs.h"
12402
12403 /* Override any gcc2 internal prototype to avoid an error.  */
12404 #ifdef __cplusplus
12405 extern "C"
12406 #endif
12407 /* We use char because int might match the return type of a gcc2
12408    builtin and then its argument prototype would still apply.  */
12409 char opendir ();
12410 int
12411 main ()
12412 {
12413 opendir ();
12414   ;
12415   return 0;
12416 }
12417 _ACEOF
12418 rm -f conftest.$ac_objext conftest$ac_exeext
12419 if { (eval echo "$as_me:12419: \"$ac_link\"") >&5
12420   (eval $ac_link) 2>&5
12421   ac_status=$?
12422   echo "$as_me:12422: \$? = $ac_status" >&5
12423   (exit $ac_status); } &&
12424          { ac_try='test -s conftest$ac_exeext'
12425   { (eval echo "$as_me:12425: \"$ac_try\"") >&5
12426   (eval $ac_try) 2>&5
12427   ac_status=$?
12428   echo "$as_me:12428: \$? = $ac_status" >&5
12429   (exit $ac_status); }; }; then
12430   ac_cv_lib_dir_opendir=yes
12431 else
12432   echo "$as_me: failed program was:" >&5
12433 cat conftest.$ac_ext >&5
12434 ac_cv_lib_dir_opendir=no
12435 fi
12436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12437 LIBS=$ac_check_lib_save_LIBS
12438 fi
12439 echo "$as_me:12439: result: $ac_cv_lib_dir_opendir" >&5
12440 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12441 if test $ac_cv_lib_dir_opendir = yes; then
12442   LIBS="$LIBS -ldir"
12443 fi
12444
12445 else
12446   echo "$as_me:12446: checking for opendir in -lx" >&5
12447 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12448 if test "${ac_cv_lib_x_opendir+set}" = set; then
12449   echo $ECHO_N "(cached) $ECHO_C" >&6
12450 else
12451   ac_check_lib_save_LIBS=$LIBS
12452 LIBS="-lx  $LIBS"
12453 cat >conftest.$ac_ext <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12456
12457 /* Override any gcc2 internal prototype to avoid an error.  */
12458 #ifdef __cplusplus
12459 extern "C"
12460 #endif
12461 /* We use char because int might match the return type of a gcc2
12462    builtin and then its argument prototype would still apply.  */
12463 char opendir ();
12464 int
12465 main ()
12466 {
12467 opendir ();
12468   ;
12469   return 0;
12470 }
12471 _ACEOF
12472 rm -f conftest.$ac_objext conftest$ac_exeext
12473 if { (eval echo "$as_me:12473: \"$ac_link\"") >&5
12474   (eval $ac_link) 2>&5
12475   ac_status=$?
12476   echo "$as_me:12476: \$? = $ac_status" >&5
12477   (exit $ac_status); } &&
12478          { ac_try='test -s conftest$ac_exeext'
12479   { (eval echo "$as_me:12479: \"$ac_try\"") >&5
12480   (eval $ac_try) 2>&5
12481   ac_status=$?
12482   echo "$as_me:12482: \$? = $ac_status" >&5
12483   (exit $ac_status); }; }; then
12484   ac_cv_lib_x_opendir=yes
12485 else
12486   echo "$as_me: failed program was:" >&5
12487 cat conftest.$ac_ext >&5
12488 ac_cv_lib_x_opendir=no
12489 fi
12490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12491 LIBS=$ac_check_lib_save_LIBS
12492 fi
12493 echo "$as_me:12493: result: $ac_cv_lib_x_opendir" >&5
12494 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12495 if test $ac_cv_lib_x_opendir = yes; then
12496   LIBS="$LIBS -lx"
12497 fi
12498
12499 fi
12500
12501 echo "$as_me:12501: checking whether time.h and sys/time.h may both be included" >&5
12502 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12503 if test "${ac_cv_header_time+set}" = set; then
12504   echo $ECHO_N "(cached) $ECHO_C" >&6
12505 else
12506   cat >conftest.$ac_ext <<_ACEOF
12507 #line 12507 "configure"
12508 #include "confdefs.h"
12509 #include <sys/types.h>
12510 #include <sys/time.h>
12511 #include <time.h>
12512
12513 int
12514 main ()
12515 {
12516 if ((struct tm *) 0)
12517 return 0;
12518   ;
12519   return 0;
12520 }
12521 _ACEOF
12522 rm -f conftest.$ac_objext
12523 if { (eval echo "$as_me:12523: \"$ac_compile\"") >&5
12524   (eval $ac_compile) 2>&5
12525   ac_status=$?
12526   echo "$as_me:12526: \$? = $ac_status" >&5
12527   (exit $ac_status); } &&
12528          { ac_try='test -s conftest.$ac_objext'
12529   { (eval echo "$as_me:12529: \"$ac_try\"") >&5
12530   (eval $ac_try) 2>&5
12531   ac_status=$?
12532   echo "$as_me:12532: \$? = $ac_status" >&5
12533   (exit $ac_status); }; }; then
12534   ac_cv_header_time=yes
12535 else
12536   echo "$as_me: failed program was:" >&5
12537 cat conftest.$ac_ext >&5
12538 ac_cv_header_time=no
12539 fi
12540 rm -f conftest.$ac_objext conftest.$ac_ext
12541 fi
12542 echo "$as_me:12542: result: $ac_cv_header_time" >&5
12543 echo "${ECHO_T}$ac_cv_header_time" >&6
12544 if test $ac_cv_header_time = yes; then
12545
12546 cat >>confdefs.h <<\EOF
12547 #define TIME_WITH_SYS_TIME 1
12548 EOF
12549
12550 fi
12551
12552 cf_regex_func=no
12553
12554 echo "$as_me:12554: checking for regcomp" >&5
12555 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12556 if test "${ac_cv_func_regcomp+set}" = set; then
12557   echo $ECHO_N "(cached) $ECHO_C" >&6
12558 else
12559   cat >conftest.$ac_ext <<_ACEOF
12560 #line 12560 "configure"
12561 #include "confdefs.h"
12562 /* System header to define __stub macros and hopefully few prototypes,
12563     which can conflict with char regcomp (); below.  */
12564 #include <assert.h>
12565 /* Override any gcc2 internal prototype to avoid an error.  */
12566 #ifdef __cplusplus
12567 extern "C"
12568 #endif
12569 /* We use char because int might match the return type of a gcc2
12570    builtin and then its argument prototype would still apply.  */
12571 char regcomp ();
12572 char (*f) ();
12573
12574 int
12575 main ()
12576 {
12577 /* The GNU C library defines this for functions which it implements
12578     to always fail with ENOSYS.  Some functions are actually named
12579     something starting with __ and the normal name is an alias.  */
12580 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12581 choke me
12582 #else
12583 f = regcomp;
12584 #endif
12585
12586   ;
12587   return 0;
12588 }
12589 _ACEOF
12590 rm -f conftest.$ac_objext conftest$ac_exeext
12591 if { (eval echo "$as_me:12591: \"$ac_link\"") >&5
12592   (eval $ac_link) 2>&5
12593   ac_status=$?
12594   echo "$as_me:12594: \$? = $ac_status" >&5
12595   (exit $ac_status); } &&
12596          { ac_try='test -s conftest$ac_exeext'
12597   { (eval echo "$as_me:12597: \"$ac_try\"") >&5
12598   (eval $ac_try) 2>&5
12599   ac_status=$?
12600   echo "$as_me:12600: \$? = $ac_status" >&5
12601   (exit $ac_status); }; }; then
12602   ac_cv_func_regcomp=yes
12603 else
12604   echo "$as_me: failed program was:" >&5
12605 cat conftest.$ac_ext >&5
12606 ac_cv_func_regcomp=no
12607 fi
12608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12609 fi
12610 echo "$as_me:12610: result: $ac_cv_func_regcomp" >&5
12611 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12612 if test $ac_cv_func_regcomp = yes; then
12613   cf_regex_func=regcomp
12614 else
12615
12616         for cf_regex_lib in regex re
12617         do
12618                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12619 echo "$as_me:12619: checking for regcomp in -l$cf_regex_lib" >&5
12620 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12621 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12622   echo $ECHO_N "(cached) $ECHO_C" >&6
12623 else
12624   ac_check_lib_save_LIBS=$LIBS
12625 LIBS="-l$cf_regex_lib  $LIBS"
12626 cat >conftest.$ac_ext <<_ACEOF
12627 #line 12627 "configure"
12628 #include "confdefs.h"
12629
12630 /* Override any gcc2 internal prototype to avoid an error.  */
12631 #ifdef __cplusplus
12632 extern "C"
12633 #endif
12634 /* We use char because int might match the return type of a gcc2
12635    builtin and then its argument prototype would still apply.  */
12636 char regcomp ();
12637 int
12638 main ()
12639 {
12640 regcomp ();
12641   ;
12642   return 0;
12643 }
12644 _ACEOF
12645 rm -f conftest.$ac_objext conftest$ac_exeext
12646 if { (eval echo "$as_me:12646: \"$ac_link\"") >&5
12647   (eval $ac_link) 2>&5
12648   ac_status=$?
12649   echo "$as_me:12649: \$? = $ac_status" >&5
12650   (exit $ac_status); } &&
12651          { ac_try='test -s conftest$ac_exeext'
12652   { (eval echo "$as_me:12652: \"$ac_try\"") >&5
12653   (eval $ac_try) 2>&5
12654   ac_status=$?
12655   echo "$as_me:12655: \$? = $ac_status" >&5
12656   (exit $ac_status); }; }; then
12657   eval "$as_ac_Lib=yes"
12658 else
12659   echo "$as_me: failed program was:" >&5
12660 cat conftest.$ac_ext >&5
12661 eval "$as_ac_Lib=no"
12662 fi
12663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12664 LIBS=$ac_check_lib_save_LIBS
12665 fi
12666 echo "$as_me:12666: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12667 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12668 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12669
12670                                 LIBS="-l$cf_regex_lib $LIBS"
12671                                 cf_regex_func=regcomp
12672                                 break
12673 fi
12674
12675         done
12676
12677 fi
12678
12679 if test "$cf_regex_func" = no ; then
12680         echo "$as_me:12680: checking for compile" >&5
12681 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12682 if test "${ac_cv_func_compile+set}" = set; then
12683   echo $ECHO_N "(cached) $ECHO_C" >&6
12684 else
12685   cat >conftest.$ac_ext <<_ACEOF
12686 #line 12686 "configure"
12687 #include "confdefs.h"
12688 /* System header to define __stub macros and hopefully few prototypes,
12689     which can conflict with char compile (); below.  */
12690 #include <assert.h>
12691 /* Override any gcc2 internal prototype to avoid an error.  */
12692 #ifdef __cplusplus
12693 extern "C"
12694 #endif
12695 /* We use char because int might match the return type of a gcc2
12696    builtin and then its argument prototype would still apply.  */
12697 char compile ();
12698 char (*f) ();
12699
12700 int
12701 main ()
12702 {
12703 /* The GNU C library defines this for functions which it implements
12704     to always fail with ENOSYS.  Some functions are actually named
12705     something starting with __ and the normal name is an alias.  */
12706 #if defined (__stub_compile) || defined (__stub___compile)
12707 choke me
12708 #else
12709 f = compile;
12710 #endif
12711
12712   ;
12713   return 0;
12714 }
12715 _ACEOF
12716 rm -f conftest.$ac_objext conftest$ac_exeext
12717 if { (eval echo "$as_me:12717: \"$ac_link\"") >&5
12718   (eval $ac_link) 2>&5
12719   ac_status=$?
12720   echo "$as_me:12720: \$? = $ac_status" >&5
12721   (exit $ac_status); } &&
12722          { ac_try='test -s conftest$ac_exeext'
12723   { (eval echo "$as_me:12723: \"$ac_try\"") >&5
12724   (eval $ac_try) 2>&5
12725   ac_status=$?
12726   echo "$as_me:12726: \$? = $ac_status" >&5
12727   (exit $ac_status); }; }; then
12728   ac_cv_func_compile=yes
12729 else
12730   echo "$as_me: failed program was:" >&5
12731 cat conftest.$ac_ext >&5
12732 ac_cv_func_compile=no
12733 fi
12734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12735 fi
12736 echo "$as_me:12736: result: $ac_cv_func_compile" >&5
12737 echo "${ECHO_T}$ac_cv_func_compile" >&6
12738 if test $ac_cv_func_compile = yes; then
12739   cf_regex_func=compile
12740 else
12741
12742                 echo "$as_me:12742: checking for compile in -lgen" >&5
12743 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
12744 if test "${ac_cv_lib_gen_compile+set}" = set; then
12745   echo $ECHO_N "(cached) $ECHO_C" >&6
12746 else
12747   ac_check_lib_save_LIBS=$LIBS
12748 LIBS="-lgen  $LIBS"
12749 cat >conftest.$ac_ext <<_ACEOF
12750 #line 12750 "configure"
12751 #include "confdefs.h"
12752
12753 /* Override any gcc2 internal prototype to avoid an error.  */
12754 #ifdef __cplusplus
12755 extern "C"
12756 #endif
12757 /* We use char because int might match the return type of a gcc2
12758    builtin and then its argument prototype would still apply.  */
12759 char compile ();
12760 int
12761 main ()
12762 {
12763 compile ();
12764   ;
12765   return 0;
12766 }
12767 _ACEOF
12768 rm -f conftest.$ac_objext conftest$ac_exeext
12769 if { (eval echo "$as_me:12769: \"$ac_link\"") >&5
12770   (eval $ac_link) 2>&5
12771   ac_status=$?
12772   echo "$as_me:12772: \$? = $ac_status" >&5
12773   (exit $ac_status); } &&
12774          { ac_try='test -s conftest$ac_exeext'
12775   { (eval echo "$as_me:12775: \"$ac_try\"") >&5
12776   (eval $ac_try) 2>&5
12777   ac_status=$?
12778   echo "$as_me:12778: \$? = $ac_status" >&5
12779   (exit $ac_status); }; }; then
12780   ac_cv_lib_gen_compile=yes
12781 else
12782   echo "$as_me: failed program was:" >&5
12783 cat conftest.$ac_ext >&5
12784 ac_cv_lib_gen_compile=no
12785 fi
12786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12787 LIBS=$ac_check_lib_save_LIBS
12788 fi
12789 echo "$as_me:12789: result: $ac_cv_lib_gen_compile" >&5
12790 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
12791 if test $ac_cv_lib_gen_compile = yes; then
12792
12793                                 LIBS="-lgen $LIBS"
12794                                 cf_regex_func=compile
12795 fi
12796
12797 fi
12798
12799 fi
12800
12801 if test "$cf_regex_func" = no ; then
12802         { echo "$as_me:12802: WARNING: cannot find regular expression library" >&5
12803 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
12804 fi
12805
12806 echo "$as_me:12806: checking for regular-expression headers" >&5
12807 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12808 if test "${cf_cv_regex_hdrs+set}" = set; then
12809   echo $ECHO_N "(cached) $ECHO_C" >&6
12810 else
12811
12812 cf_cv_regex_hdrs=no
12813 case $cf_regex_func in #(vi
12814 compile) #(vi
12815         for cf_regex_hdr in regexp.h regexpr.h
12816         do
12817                 cat >conftest.$ac_ext <<_ACEOF
12818 #line 12818 "configure"
12819 #include "confdefs.h"
12820 #include <$cf_regex_hdr>
12821 int
12822 main ()
12823 {
12824
12825                         char *p = compile("", "", "", 0);
12826                         int x = step("", "");
12827
12828   ;
12829   return 0;
12830 }
12831 _ACEOF
12832 rm -f conftest.$ac_objext conftest$ac_exeext
12833 if { (eval echo "$as_me:12833: \"$ac_link\"") >&5
12834   (eval $ac_link) 2>&5
12835   ac_status=$?
12836   echo "$as_me:12836: \$? = $ac_status" >&5
12837   (exit $ac_status); } &&
12838          { ac_try='test -s conftest$ac_exeext'
12839   { (eval echo "$as_me:12839: \"$ac_try\"") >&5
12840   (eval $ac_try) 2>&5
12841   ac_status=$?
12842   echo "$as_me:12842: \$? = $ac_status" >&5
12843   (exit $ac_status); }; }; then
12844
12845                         cf_cv_regex_hdrs=$cf_regex_hdr
12846                         break
12847
12848 else
12849   echo "$as_me: failed program was:" >&5
12850 cat conftest.$ac_ext >&5
12851 fi
12852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12853         done
12854         ;;
12855 *)
12856         for cf_regex_hdr in regex.h
12857         do
12858                 cat >conftest.$ac_ext <<_ACEOF
12859 #line 12859 "configure"
12860 #include "confdefs.h"
12861 #include <sys/types.h>
12862 #include <$cf_regex_hdr>
12863 int
12864 main ()
12865 {
12866
12867                         regex_t *p;
12868                         int x = regcomp(p, "", 0);
12869                         int y = regexec(p, "", 0, 0, 0);
12870                         regfree(p);
12871
12872   ;
12873   return 0;
12874 }
12875 _ACEOF
12876 rm -f conftest.$ac_objext conftest$ac_exeext
12877 if { (eval echo "$as_me:12877: \"$ac_link\"") >&5
12878   (eval $ac_link) 2>&5
12879   ac_status=$?
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit $ac_status); } &&
12882          { ac_try='test -s conftest$ac_exeext'
12883   { (eval echo "$as_me:12883: \"$ac_try\"") >&5
12884   (eval $ac_try) 2>&5
12885   ac_status=$?
12886   echo "$as_me:12886: \$? = $ac_status" >&5
12887   (exit $ac_status); }; }; then
12888
12889                         cf_cv_regex_hdrs=$cf_regex_hdr
12890                         break
12891
12892 else
12893   echo "$as_me: failed program was:" >&5
12894 cat conftest.$ac_ext >&5
12895 fi
12896 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12897         done
12898         ;;
12899 esac
12900
12901 fi
12902 echo "$as_me:12902: result: $cf_cv_regex_hdrs" >&5
12903 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
12904
12905 case $cf_cv_regex_hdrs in #(vi
12906     no)        { echo "$as_me:12906: WARNING: no regular expression header found" >&5
12907 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
12908     regex.h)   cat >>confdefs.h <<\EOF
12909 #define HAVE_REGEX_H_FUNCS 1
12910 EOF
12911  ;; #(vi
12912     regexp.h)  cat >>confdefs.h <<\EOF
12913 #define HAVE_REGEXP_H_FUNCS 1
12914 EOF
12915  ;; #(vi
12916     regexpr.h) cat >>confdefs.h <<\EOF
12917 #define HAVE_REGEXPR_H_FUNCS 1
12918 EOF
12919  ;;
12920 esac
12921
12922 for ac_header in \
12923 fcntl.h \
12924 getopt.h \
12925 limits.h \
12926 locale.h \
12927 poll.h \
12928 sys/bsdtypes.h \
12929 sys/ioctl.h \
12930 sys/param.h \
12931 sys/poll.h \
12932 sys/select.h \
12933 sys/time.h \
12934 sys/times.h \
12935 ttyent.h \
12936 unistd.h \
12937 wctype.h \
12938
12939 do
12940 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12941 echo "$as_me:12941: checking for $ac_header" >&5
12942 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12943 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12944   echo $ECHO_N "(cached) $ECHO_C" >&6
12945 else
12946   cat >conftest.$ac_ext <<_ACEOF
12947 #line 12947 "configure"
12948 #include "confdefs.h"
12949 #include <$ac_header>
12950 _ACEOF
12951 if { (eval echo "$as_me:12951: \"$ac_cpp conftest.$ac_ext\"") >&5
12952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12953   ac_status=$?
12954   egrep -v '^ *\+' conftest.er1 >conftest.err
12955   rm -f conftest.er1
12956   cat conftest.err >&5
12957   echo "$as_me:12957: \$? = $ac_status" >&5
12958   (exit $ac_status); } >/dev/null; then
12959   if test -s conftest.err; then
12960     ac_cpp_err=$ac_c_preproc_warn_flag
12961   else
12962     ac_cpp_err=
12963   fi
12964 else
12965   ac_cpp_err=yes
12966 fi
12967 if test -z "$ac_cpp_err"; then
12968   eval "$as_ac_Header=yes"
12969 else
12970   echo "$as_me: failed program was:" >&5
12971   cat conftest.$ac_ext >&5
12972   eval "$as_ac_Header=no"
12973 fi
12974 rm -f conftest.err conftest.$ac_ext
12975 fi
12976 echo "$as_me:12976: result: `eval echo '${'$as_ac_Header'}'`" >&5
12977 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12978 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12979   cat >>confdefs.h <<EOF
12980 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12981 EOF
12982
12983 fi
12984 done
12985
12986 # check for ISC (this may also define _POSIX_SOURCE)
12987 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12988 if test "$ISC" = yes ; then
12989
12990 echo "$as_me:12990: checking for main in -lcposix" >&5
12991 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12992 if test "${ac_cv_lib_cposix_main+set}" = set; then
12993   echo $ECHO_N "(cached) $ECHO_C" >&6
12994 else
12995   ac_check_lib_save_LIBS=$LIBS
12996 LIBS="-lcposix  $LIBS"
12997 cat >conftest.$ac_ext <<_ACEOF
12998 #line 12998 "configure"
12999 #include "confdefs.h"
13000
13001 int
13002 main ()
13003 {
13004 main ();
13005   ;
13006   return 0;
13007 }
13008 _ACEOF
13009 rm -f conftest.$ac_objext conftest$ac_exeext
13010 if { (eval echo "$as_me:13010: \"$ac_link\"") >&5
13011   (eval $ac_link) 2>&5
13012   ac_status=$?
13013   echo "$as_me:13013: \$? = $ac_status" >&5
13014   (exit $ac_status); } &&
13015          { ac_try='test -s conftest$ac_exeext'
13016   { (eval echo "$as_me:13016: \"$ac_try\"") >&5
13017   (eval $ac_try) 2>&5
13018   ac_status=$?
13019   echo "$as_me:13019: \$? = $ac_status" >&5
13020   (exit $ac_status); }; }; then
13021   ac_cv_lib_cposix_main=yes
13022 else
13023   echo "$as_me: failed program was:" >&5
13024 cat conftest.$ac_ext >&5
13025 ac_cv_lib_cposix_main=no
13026 fi
13027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13028 LIBS=$ac_check_lib_save_LIBS
13029 fi
13030 echo "$as_me:13030: result: $ac_cv_lib_cposix_main" >&5
13031 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13032 if test $ac_cv_lib_cposix_main = yes; then
13033   cat >>confdefs.h <<EOF
13034 #define HAVE_LIBCPOSIX 1
13035 EOF
13036
13037   LIBS="-lcposix $LIBS"
13038
13039 fi
13040
13041         echo "$as_me:13041: checking for bzero in -linet" >&5
13042 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13043 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13044   echo $ECHO_N "(cached) $ECHO_C" >&6
13045 else
13046   ac_check_lib_save_LIBS=$LIBS
13047 LIBS="-linet  $LIBS"
13048 cat >conftest.$ac_ext <<_ACEOF
13049 #line 13049 "configure"
13050 #include "confdefs.h"
13051
13052 /* Override any gcc2 internal prototype to avoid an error.  */
13053 #ifdef __cplusplus
13054 extern "C"
13055 #endif
13056 /* We use char because int might match the return type of a gcc2
13057    builtin and then its argument prototype would still apply.  */
13058 char bzero ();
13059 int
13060 main ()
13061 {
13062 bzero ();
13063   ;
13064   return 0;
13065 }
13066 _ACEOF
13067 rm -f conftest.$ac_objext conftest$ac_exeext
13068 if { (eval echo "$as_me:13068: \"$ac_link\"") >&5
13069   (eval $ac_link) 2>&5
13070   ac_status=$?
13071   echo "$as_me:13071: \$? = $ac_status" >&5
13072   (exit $ac_status); } &&
13073          { ac_try='test -s conftest$ac_exeext'
13074   { (eval echo "$as_me:13074: \"$ac_try\"") >&5
13075   (eval $ac_try) 2>&5
13076   ac_status=$?
13077   echo "$as_me:13077: \$? = $ac_status" >&5
13078   (exit $ac_status); }; }; then
13079   ac_cv_lib_inet_bzero=yes
13080 else
13081   echo "$as_me: failed program was:" >&5
13082 cat conftest.$ac_ext >&5
13083 ac_cv_lib_inet_bzero=no
13084 fi
13085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13086 LIBS=$ac_check_lib_save_LIBS
13087 fi
13088 echo "$as_me:13088: result: $ac_cv_lib_inet_bzero" >&5
13089 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13090 if test $ac_cv_lib_inet_bzero = yes; then
13091   LIBS="$LIBS -linet"
13092 fi
13093 fi
13094
13095 echo "$as_me:13095: checking if sys/time.h works with sys/select.h" >&5
13096 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13097 if test "${cf_cv_sys_time_select+set}" = set; then
13098   echo $ECHO_N "(cached) $ECHO_C" >&6
13099 else
13100
13101 cat >conftest.$ac_ext <<_ACEOF
13102 #line 13102 "configure"
13103 #include "confdefs.h"
13104
13105 #include <sys/types.h>
13106 #ifdef HAVE_SYS_TIME_H
13107 #include <sys/time.h>
13108 #endif
13109 #ifdef HAVE_SYS_SELECT_H
13110 #include <sys/select.h>
13111 #endif
13112
13113 int
13114 main ()
13115 {
13116
13117   ;
13118   return 0;
13119 }
13120 _ACEOF
13121 rm -f conftest.$ac_objext
13122 if { (eval echo "$as_me:13122: \"$ac_compile\"") >&5
13123   (eval $ac_compile) 2>&5
13124   ac_status=$?
13125   echo "$as_me:13125: \$? = $ac_status" >&5
13126   (exit $ac_status); } &&
13127          { ac_try='test -s conftest.$ac_objext'
13128   { (eval echo "$as_me:13128: \"$ac_try\"") >&5
13129   (eval $ac_try) 2>&5
13130   ac_status=$?
13131   echo "$as_me:13131: \$? = $ac_status" >&5
13132   (exit $ac_status); }; }; then
13133   cf_cv_sys_time_select=yes
13134 else
13135   echo "$as_me: failed program was:" >&5
13136 cat conftest.$ac_ext >&5
13137 cf_cv_sys_time_select=no
13138 fi
13139 rm -f conftest.$ac_objext conftest.$ac_ext
13140
13141 fi
13142
13143 echo "$as_me:13143: result: $cf_cv_sys_time_select" >&5
13144 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13145 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13146 #define HAVE_SYS_TIME_SELECT 1
13147 EOF
13148
13149 ###     checks for compiler characteristics
13150 ac_ext=c
13151 ac_cpp='$CPP $CPPFLAGS'
13152 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13153 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13154 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13155 ac_main_return=return
13156
13157 echo "$as_me:13157: checking for $CC option to accept ANSI C" >&5
13158 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13159 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13160   echo $ECHO_N "(cached) $ECHO_C" >&6
13161 else
13162   ac_cv_prog_cc_stdc=no
13163 ac_save_CC=$CC
13164 cat >conftest.$ac_ext <<_ACEOF
13165 #line 13165 "configure"
13166 #include "confdefs.h"
13167 #include <stdarg.h>
13168 #include <stdio.h>
13169 #include <sys/types.h>
13170 #include <sys/stat.h>
13171 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13172 struct buf { int x; };
13173 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13174 static char *e (p, i)
13175      char **p;
13176      int i;
13177 {
13178   return p[i];
13179 }
13180 static char *f (char * (*g) (char **, int), char **p, ...)
13181 {
13182   char *s;
13183   va_list v;
13184   va_start (v,p);
13185   s = g (p, va_arg (v,int));
13186   va_end (v);
13187   return s;
13188 }
13189 int test (int i, double x);
13190 struct s1 {int (*f) (int a);};
13191 struct s2 {int (*f) (double a);};
13192 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13193 int argc;
13194 char **argv;
13195 int
13196 main ()
13197 {
13198 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13199   ;
13200   return 0;
13201 }
13202 _ACEOF
13203 # Don't try gcc -ansi; that turns off useful extensions and
13204 # breaks some systems' header files.
13205 # AIX                   -qlanglvl=ansi
13206 # Ultrix and OSF/1      -std1
13207 # HP-UX 10.20 and later -Ae
13208 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13209 # SVR4                  -Xc -D__EXTENSIONS__
13210 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13211 do
13212   CC="$ac_save_CC $ac_arg"
13213   rm -f conftest.$ac_objext
13214 if { (eval echo "$as_me:13214: \"$ac_compile\"") >&5
13215   (eval $ac_compile) 2>&5
13216   ac_status=$?
13217   echo "$as_me:13217: \$? = $ac_status" >&5
13218   (exit $ac_status); } &&
13219          { ac_try='test -s conftest.$ac_objext'
13220   { (eval echo "$as_me:13220: \"$ac_try\"") >&5
13221   (eval $ac_try) 2>&5
13222   ac_status=$?
13223   echo "$as_me:13223: \$? = $ac_status" >&5
13224   (exit $ac_status); }; }; then
13225   ac_cv_prog_cc_stdc=$ac_arg
13226 break
13227 else
13228   echo "$as_me: failed program was:" >&5
13229 cat conftest.$ac_ext >&5
13230 fi
13231 rm -f conftest.$ac_objext
13232 done
13233 rm -f conftest.$ac_ext conftest.$ac_objext
13234 CC=$ac_save_CC
13235
13236 fi
13237
13238 case "x$ac_cv_prog_cc_stdc" in
13239   x|xno)
13240     echo "$as_me:13240: result: none needed" >&5
13241 echo "${ECHO_T}none needed" >&6 ;;
13242   *)
13243     echo "$as_me:13243: result: $ac_cv_prog_cc_stdc" >&5
13244 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13245     CC="$CC $ac_cv_prog_cc_stdc" ;;
13246 esac
13247
13248 echo "$as_me:13248: checking for an ANSI C-conforming const" >&5
13249 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13250 if test "${ac_cv_c_const+set}" = set; then
13251   echo $ECHO_N "(cached) $ECHO_C" >&6
13252 else
13253   cat >conftest.$ac_ext <<_ACEOF
13254 #line 13254 "configure"
13255 #include "confdefs.h"
13256
13257 int
13258 main ()
13259 {
13260 /* FIXME: Include the comments suggested by Paul. */
13261 #ifndef __cplusplus
13262   /* Ultrix mips cc rejects this.  */
13263   typedef int charset[2];
13264   const charset x;
13265   /* SunOS 4.1.1 cc rejects this.  */
13266   char const *const *ccp;
13267   char **p;
13268   /* NEC SVR4.0.2 mips cc rejects this.  */
13269   struct point {int x, y;};
13270   static struct point const zero = {0,0};
13271   /* AIX XL C 1.02.0.0 rejects this.
13272      It does not let you subtract one const X* pointer from another in
13273      an arm of an if-expression whose if-part is not a constant
13274      expression */
13275   const char *g = "string";
13276   ccp = &g + (g ? g-g : 0);
13277   /* HPUX 7.0 cc rejects these. */
13278   ++ccp;
13279   p = (char**) ccp;
13280   ccp = (char const *const *) p;
13281   { /* SCO 3.2v4 cc rejects this.  */
13282     char *t;
13283     char const *s = 0 ? (char *) 0 : (char const *) 0;
13284
13285     *t++ = 0;
13286   }
13287   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13288     int x[] = {25, 17};
13289     const int *foo = &x[0];
13290     ++foo;
13291   }
13292   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13293     typedef const int *iptr;
13294     iptr p = 0;
13295     ++p;
13296   }
13297   { /* AIX XL C 1.02.0.0 rejects this saying
13298        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13299     struct s { int j; const int *ap[3]; };
13300     struct s *b; b->j = 5;
13301   }
13302   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13303     const int foo = 10;
13304   }
13305 #endif
13306
13307   ;
13308   return 0;
13309 }
13310 _ACEOF
13311 rm -f conftest.$ac_objext
13312 if { (eval echo "$as_me:13312: \"$ac_compile\"") >&5
13313   (eval $ac_compile) 2>&5
13314   ac_status=$?
13315   echo "$as_me:13315: \$? = $ac_status" >&5
13316   (exit $ac_status); } &&
13317          { ac_try='test -s conftest.$ac_objext'
13318   { (eval echo "$as_me:13318: \"$ac_try\"") >&5
13319   (eval $ac_try) 2>&5
13320   ac_status=$?
13321   echo "$as_me:13321: \$? = $ac_status" >&5
13322   (exit $ac_status); }; }; then
13323   ac_cv_c_const=yes
13324 else
13325   echo "$as_me: failed program was:" >&5
13326 cat conftest.$ac_ext >&5
13327 ac_cv_c_const=no
13328 fi
13329 rm -f conftest.$ac_objext conftest.$ac_ext
13330 fi
13331 echo "$as_me:13331: result: $ac_cv_c_const" >&5
13332 echo "${ECHO_T}$ac_cv_c_const" >&6
13333 if test $ac_cv_c_const = no; then
13334
13335 cat >>confdefs.h <<\EOF
13336 #define const
13337 EOF
13338
13339 fi
13340
13341 echo "$as_me:13341: checking for inline" >&5
13342 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13343 if test "${ac_cv_c_inline+set}" = set; then
13344   echo $ECHO_N "(cached) $ECHO_C" >&6
13345 else
13346   ac_cv_c_inline=no
13347 for ac_kw in inline __inline__ __inline; do
13348   cat >conftest.$ac_ext <<_ACEOF
13349 #line 13349 "configure"
13350 #include "confdefs.h"
13351 #ifndef __cplusplus
13352 static $ac_kw int static_foo () {return 0; }
13353 $ac_kw int foo () {return 0; }
13354 #endif
13355
13356 _ACEOF
13357 rm -f conftest.$ac_objext
13358 if { (eval echo "$as_me:13358: \"$ac_compile\"") >&5
13359   (eval $ac_compile) 2>&5
13360   ac_status=$?
13361   echo "$as_me:13361: \$? = $ac_status" >&5
13362   (exit $ac_status); } &&
13363          { ac_try='test -s conftest.$ac_objext'
13364   { (eval echo "$as_me:13364: \"$ac_try\"") >&5
13365   (eval $ac_try) 2>&5
13366   ac_status=$?
13367   echo "$as_me:13367: \$? = $ac_status" >&5
13368   (exit $ac_status); }; }; then
13369   ac_cv_c_inline=$ac_kw; break
13370 else
13371   echo "$as_me: failed program was:" >&5
13372 cat conftest.$ac_ext >&5
13373 fi
13374 rm -f conftest.$ac_objext conftest.$ac_ext
13375 done
13376
13377 fi
13378 echo "$as_me:13378: result: $ac_cv_c_inline" >&5
13379 echo "${ECHO_T}$ac_cv_c_inline" >&6
13380 case $ac_cv_c_inline in
13381   inline | yes) ;;
13382   no)
13383 cat >>confdefs.h <<\EOF
13384 #define inline
13385 EOF
13386  ;;
13387   *)  cat >>confdefs.h <<EOF
13388 #define inline $ac_cv_c_inline
13389 EOF
13390  ;;
13391 esac
13392
13393 NCURSES_INLINE=
13394 if test "$ac_cv_c_inline" != no ; then
13395   NCURSES_INLINE=inline
13396   if test "$INTEL_COMPILER" = yes
13397   then
13398     :
13399   elif test "$GCC" = yes
13400   then
13401     echo "$as_me:13401: checking if $CC supports options to tune inlining" >&5
13402 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13403 if test "${cf_cv_gcc_inline+set}" = set; then
13404   echo $ECHO_N "(cached) $ECHO_C" >&6
13405 else
13406
13407       cf_save_CFLAGS=$CFLAGS
13408       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13409       cat >conftest.$ac_ext <<_ACEOF
13410 #line 13410 "configure"
13411 #include "confdefs.h"
13412 inline int foo(void) { return 1; }
13413 int
13414 main ()
13415 {
13416 ${cf_cv_main_return:-return} foo()
13417   ;
13418   return 0;
13419 }
13420 _ACEOF
13421 rm -f conftest.$ac_objext
13422 if { (eval echo "$as_me:13422: \"$ac_compile\"") >&5
13423   (eval $ac_compile) 2>&5
13424   ac_status=$?
13425   echo "$as_me:13425: \$? = $ac_status" >&5
13426   (exit $ac_status); } &&
13427          { ac_try='test -s conftest.$ac_objext'
13428   { (eval echo "$as_me:13428: \"$ac_try\"") >&5
13429   (eval $ac_try) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit $ac_status); }; }; then
13433   cf_cv_gcc_inline=yes
13434 else
13435   echo "$as_me: failed program was:" >&5
13436 cat conftest.$ac_ext >&5
13437 cf_cv_gcc_inline=no
13438 fi
13439 rm -f conftest.$ac_objext conftest.$ac_ext
13440       CFLAGS=$cf_save_CFLAGS
13441
13442 fi
13443 echo "$as_me:13443: result: $cf_cv_gcc_inline" >&5
13444 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13445     if test "$cf_cv_gcc_inline" = yes ; then
13446
13447 cf_fix_cppflags=no
13448 cf_new_cflags=
13449 cf_new_cppflags=
13450 cf_new_extra_cppflags=
13451
13452 for cf_add_cflags in --param max-inline-insns-single=1200
13453 do
13454 case $cf_fix_cppflags in
13455 no)
13456         case $cf_add_cflags in #(vi
13457         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13458                 case $cf_add_cflags in
13459                 -D*)
13460                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13461
13462                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13463                                 && test -z "${cf_tst_cflags}" \
13464                                 && cf_fix_cppflags=yes
13465
13466                         if test $cf_fix_cppflags = yes ; then
13467                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13468                                 continue
13469                         elif test "${cf_tst_cflags}" = "\"'" ; then
13470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13471                                 continue
13472                         fi
13473                         ;;
13474                 esac
13475                 case "$CPPFLAGS" in
13476                 *$cf_add_cflags) #(vi
13477                         ;;
13478                 *) #(vi
13479                         case $cf_add_cflags in #(vi
13480                         -D*)
13481                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13482
13483 CPPFLAGS=`echo "$CPPFLAGS" | \
13484         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13485                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13486
13487                                 ;;
13488                         esac
13489                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13490                         ;;
13491                 esac
13492                 ;;
13493         *)
13494                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13495                 ;;
13496         esac
13497         ;;
13498 yes)
13499         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13500
13501         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13502
13503         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13504                 && test -z "${cf_tst_cflags}" \
13505                 && cf_fix_cppflags=no
13506         ;;
13507 esac
13508 done
13509
13510 if test -n "$cf_new_cflags" ; then
13511
13512         CFLAGS="$CFLAGS $cf_new_cflags"
13513 fi
13514
13515 if test -n "$cf_new_cppflags" ; then
13516
13517         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13518 fi
13519
13520 if test -n "$cf_new_extra_cppflags" ; then
13521
13522         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13523 fi
13524
13525     fi
13526   fi
13527 fi
13528
13529 echo "$as_me:13529: checking for signal global datatype" >&5
13530 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13531 if test "${cf_cv_sig_atomic_t+set}" = set; then
13532   echo $ECHO_N "(cached) $ECHO_C" >&6
13533 else
13534
13535         for cf_type in \
13536                 "volatile sig_atomic_t" \
13537                 "sig_atomic_t" \
13538                 "int"
13539         do
13540         cat >conftest.$ac_ext <<_ACEOF
13541 #line 13541 "configure"
13542 #include "confdefs.h"
13543
13544 #include <sys/types.h>
13545 #include <signal.h>
13546 #include <stdio.h>
13547
13548 extern $cf_type x;
13549 $cf_type x;
13550 static void handler(int sig)
13551 {
13552         x = 5;
13553 }
13554 int
13555 main ()
13556 {
13557 signal(SIGINT, handler);
13558                  x = 1
13559   ;
13560   return 0;
13561 }
13562 _ACEOF
13563 rm -f conftest.$ac_objext
13564 if { (eval echo "$as_me:13564: \"$ac_compile\"") >&5
13565   (eval $ac_compile) 2>&5
13566   ac_status=$?
13567   echo "$as_me:13567: \$? = $ac_status" >&5
13568   (exit $ac_status); } &&
13569          { ac_try='test -s conftest.$ac_objext'
13570   { (eval echo "$as_me:13570: \"$ac_try\"") >&5
13571   (eval $ac_try) 2>&5
13572   ac_status=$?
13573   echo "$as_me:13573: \$? = $ac_status" >&5
13574   (exit $ac_status); }; }; then
13575   cf_cv_sig_atomic_t=$cf_type
13576 else
13577   echo "$as_me: failed program was:" >&5
13578 cat conftest.$ac_ext >&5
13579 cf_cv_sig_atomic_t=no
13580 fi
13581 rm -f conftest.$ac_objext conftest.$ac_ext
13582                 test "$cf_cv_sig_atomic_t" != no && break
13583         done
13584
13585 fi
13586
13587 echo "$as_me:13587: result: $cf_cv_sig_atomic_t" >&5
13588 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13589 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13590 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13591 EOF
13592
13593 if test $NCURSES_CHTYPE = auto ; then
13594
13595 echo "$as_me:13595: checking for type of chtype" >&5
13596 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13597 if test "${cf_cv_typeof_chtype+set}" = set; then
13598   echo $ECHO_N "(cached) $ECHO_C" >&6
13599 else
13600
13601                 if test "$cross_compiling" = yes; then
13602   cf_cv_typeof_chtype=long
13603 else
13604   cat >conftest.$ac_ext <<_ACEOF
13605 #line 13605 "configure"
13606 #include "confdefs.h"
13607
13608 #define WANT_BITS 31
13609 #include <stdio.h>
13610 int main()
13611 {
13612         FILE *fp = fopen("cf_test.out", "w");
13613         if (fp != 0) {
13614                 char *result = "long";
13615                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13616                         int n;
13617                         unsigned int x, y;
13618                         for (n = 0; n < WANT_BITS; n++) {
13619                                 x = (1 << n);
13620                                 y = (x >> n);
13621                                 if (y != 1 || x == 0) {
13622                                         x = 0;
13623                                         break;
13624                                 }
13625                         }
13626                         /*
13627                          * If x is nonzero, an int is big enough for the bits
13628                          * that we want.
13629                          */
13630                         result = (x != 0) ? "int" : "long";
13631                 }
13632                 fputs(result, fp);
13633                 fclose(fp);
13634         }
13635         ${cf_cv_main_return:-return}(0);
13636 }
13637
13638 _ACEOF
13639 rm -f conftest$ac_exeext
13640 if { (eval echo "$as_me:13640: \"$ac_link\"") >&5
13641   (eval $ac_link) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13645   { (eval echo "$as_me:13645: \"$ac_try\"") >&5
13646   (eval $ac_try) 2>&5
13647   ac_status=$?
13648   echo "$as_me:13648: \$? = $ac_status" >&5
13649   (exit $ac_status); }; }; then
13650   cf_cv_typeof_chtype=`cat cf_test.out`
13651 else
13652   echo "$as_me: program exited with status $ac_status" >&5
13653 echo "$as_me: failed program was:" >&5
13654 cat conftest.$ac_ext >&5
13655 cf_cv_typeof_chtype=long
13656 fi
13657 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13658 fi
13659                 rm -f cf_test.out
13660
13661 fi
13662
13663 echo "$as_me:13663: result: $cf_cv_typeof_chtype" >&5
13664 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13665
13666 cat >>confdefs.h <<EOF
13667 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13668 EOF
13669
13670 else
13671         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13672 fi
13673 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13674
13675 echo "$as_me:13675: checking if unsigned literals are legal" >&5
13676 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13677 if test "${cf_cv_unsigned_literals+set}" = set; then
13678   echo $ECHO_N "(cached) $ECHO_C" >&6
13679 else
13680
13681         cat >conftest.$ac_ext <<_ACEOF
13682 #line 13682 "configure"
13683 #include "confdefs.h"
13684
13685 int
13686 main ()
13687 {
13688 long x = 1L + 1UL + 1U + 1
13689   ;
13690   return 0;
13691 }
13692 _ACEOF
13693 rm -f conftest.$ac_objext
13694 if { (eval echo "$as_me:13694: \"$ac_compile\"") >&5
13695   (eval $ac_compile) 2>&5
13696   ac_status=$?
13697   echo "$as_me:13697: \$? = $ac_status" >&5
13698   (exit $ac_status); } &&
13699          { ac_try='test -s conftest.$ac_objext'
13700   { (eval echo "$as_me:13700: \"$ac_try\"") >&5
13701   (eval $ac_try) 2>&5
13702   ac_status=$?
13703   echo "$as_me:13703: \$? = $ac_status" >&5
13704   (exit $ac_status); }; }; then
13705   cf_cv_unsigned_literals=yes
13706 else
13707   echo "$as_me: failed program was:" >&5
13708 cat conftest.$ac_ext >&5
13709 cf_cv_unsigned_literals=no
13710 fi
13711 rm -f conftest.$ac_objext conftest.$ac_ext
13712
13713 fi
13714
13715 echo "$as_me:13715: result: $cf_cv_unsigned_literals" >&5
13716 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13717
13718 cf_cv_1UL="1"
13719 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13720 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13721
13722 if test $NCURSES_MMASK_T = auto ; then
13723         cf_cv_typeof_mmask_t=long
13724 else
13725         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13726 fi
13727 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13728
13729 ###     Checks for external-data
13730
13731 echo "$as_me:13731: checking if external errno is declared" >&5
13732 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13733 if test "${cf_cv_dcl_errno+set}" = set; then
13734   echo $ECHO_N "(cached) $ECHO_C" >&6
13735 else
13736
13737     cat >conftest.$ac_ext <<_ACEOF
13738 #line 13738 "configure"
13739 #include "confdefs.h"
13740
13741 #ifdef HAVE_STDLIB_H
13742 #include <stdlib.h>
13743 #endif
13744 #include <stdio.h>
13745 #include <sys/types.h>
13746 #include <errno.h>
13747 int
13748 main ()
13749 {
13750 int x = (int) errno
13751   ;
13752   return 0;
13753 }
13754 _ACEOF
13755 rm -f conftest.$ac_objext
13756 if { (eval echo "$as_me:13756: \"$ac_compile\"") >&5
13757   (eval $ac_compile) 2>&5
13758   ac_status=$?
13759   echo "$as_me:13759: \$? = $ac_status" >&5
13760   (exit $ac_status); } &&
13761          { ac_try='test -s conftest.$ac_objext'
13762   { (eval echo "$as_me:13762: \"$ac_try\"") >&5
13763   (eval $ac_try) 2>&5
13764   ac_status=$?
13765   echo "$as_me:13765: \$? = $ac_status" >&5
13766   (exit $ac_status); }; }; then
13767   cf_cv_dcl_errno=yes
13768 else
13769   echo "$as_me: failed program was:" >&5
13770 cat conftest.$ac_ext >&5
13771 cf_cv_dcl_errno=no
13772 fi
13773 rm -f conftest.$ac_objext conftest.$ac_ext
13774
13775 fi
13776 echo "$as_me:13776: result: $cf_cv_dcl_errno" >&5
13777 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13778
13779 if test "$cf_cv_dcl_errno" = no ; then
13780
13781 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13782
13783     cat >>confdefs.h <<EOF
13784 #define $cf_result 1
13785 EOF
13786
13787 fi
13788
13789 # It's possible (for near-UNIX clones) that the data doesn't exist
13790
13791 echo "$as_me:13791: checking if external errno exists" >&5
13792 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13793 if test "${cf_cv_have_errno+set}" = set; then
13794   echo $ECHO_N "(cached) $ECHO_C" >&6
13795 else
13796
13797     cat >conftest.$ac_ext <<_ACEOF
13798 #line 13798 "configure"
13799 #include "confdefs.h"
13800
13801 #undef errno
13802 extern int errno;
13803
13804 int
13805 main ()
13806 {
13807 errno = 2
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 rm -f conftest.$ac_objext conftest$ac_exeext
13813 if { (eval echo "$as_me:13813: \"$ac_link\"") >&5
13814   (eval $ac_link) 2>&5
13815   ac_status=$?
13816   echo "$as_me:13816: \$? = $ac_status" >&5
13817   (exit $ac_status); } &&
13818          { ac_try='test -s conftest$ac_exeext'
13819   { (eval echo "$as_me:13819: \"$ac_try\"") >&5
13820   (eval $ac_try) 2>&5
13821   ac_status=$?
13822   echo "$as_me:13822: \$? = $ac_status" >&5
13823   (exit $ac_status); }; }; then
13824   cf_cv_have_errno=yes
13825 else
13826   echo "$as_me: failed program was:" >&5
13827 cat conftest.$ac_ext >&5
13828 cf_cv_have_errno=no
13829 fi
13830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13831
13832 fi
13833 echo "$as_me:13833: result: $cf_cv_have_errno" >&5
13834 echo "${ECHO_T}$cf_cv_have_errno" >&6
13835
13836 if test "$cf_cv_have_errno" = yes ; then
13837
13838 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13839
13840     cat >>confdefs.h <<EOF
13841 #define $cf_result 1
13842 EOF
13843
13844 fi
13845
13846 echo "$as_me:13846: checking if data-only library module links" >&5
13847 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13848 if test "${cf_cv_link_dataonly+set}" = set; then
13849   echo $ECHO_N "(cached) $ECHO_C" >&6
13850 else
13851
13852         rm -f conftest.a
13853         cat >conftest.$ac_ext <<EOF
13854 #line 13854 "configure"
13855 int     testdata[3] = { 123, 456, 789 };
13856 EOF
13857         if { (eval echo "$as_me:13857: \"$ac_compile\"") >&5
13858   (eval $ac_compile) 2>&5
13859   ac_status=$?
13860   echo "$as_me:13860: \$? = $ac_status" >&5
13861   (exit $ac_status); } ; then
13862                 mv conftest.o data.o && \
13863                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13864         fi
13865         rm -f conftest.$ac_ext data.o
13866         cat >conftest.$ac_ext <<EOF
13867 #line 13867 "configure"
13868 int     testfunc()
13869 {
13870 #if defined(NeXT)
13871         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13872 #else
13873         extern int testdata[3];
13874         return testdata[0] == 123
13875            &&  testdata[1] == 456
13876            &&  testdata[2] == 789;
13877 #endif
13878 }
13879 EOF
13880         if { (eval echo "$as_me:13880: \"$ac_compile\"") >&5
13881   (eval $ac_compile) 2>&5
13882   ac_status=$?
13883   echo "$as_me:13883: \$? = $ac_status" >&5
13884   (exit $ac_status); }; then
13885                 mv conftest.o func.o && \
13886                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13887         fi
13888         rm -f conftest.$ac_ext func.o
13889         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13890         cf_saveLIBS="$LIBS"
13891         LIBS="conftest.a $LIBS"
13892         if test "$cross_compiling" = yes; then
13893   cf_cv_link_dataonly=unknown
13894 else
13895   cat >conftest.$ac_ext <<_ACEOF
13896 #line 13896 "configure"
13897 #include "confdefs.h"
13898
13899         int main()
13900         {
13901                 extern int testfunc();
13902                 ${cf_cv_main_return:-return} (!testfunc());
13903         }
13904
13905 _ACEOF
13906 rm -f conftest$ac_exeext
13907 if { (eval echo "$as_me:13907: \"$ac_link\"") >&5
13908   (eval $ac_link) 2>&5
13909   ac_status=$?
13910   echo "$as_me:13910: \$? = $ac_status" >&5
13911   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13912   { (eval echo "$as_me:13912: \"$ac_try\"") >&5
13913   (eval $ac_try) 2>&5
13914   ac_status=$?
13915   echo "$as_me:13915: \$? = $ac_status" >&5
13916   (exit $ac_status); }; }; then
13917   cf_cv_link_dataonly=yes
13918 else
13919   echo "$as_me: program exited with status $ac_status" >&5
13920 echo "$as_me: failed program was:" >&5
13921 cat conftest.$ac_ext >&5
13922 cf_cv_link_dataonly=no
13923 fi
13924 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13925 fi
13926         LIBS="$cf_saveLIBS"
13927
13928 fi
13929
13930 echo "$as_me:13930: result: $cf_cv_link_dataonly" >&5
13931 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13932
13933 if test "$cf_cv_link_dataonly" = no ; then
13934         cat >>confdefs.h <<\EOF
13935 #define BROKEN_LINKER 1
13936 EOF
13937
13938         BROKEN_LINKER=1
13939 fi
13940
13941 ###     Checks for library functions.
13942
13943 for ac_func in \
13944 getcwd \
13945 getegid \
13946 geteuid \
13947 getttynam \
13948 issetugid \
13949 poll \
13950 remove \
13951 select \
13952 setbuf \
13953 setbuffer \
13954 setvbuf \
13955 sigaction \
13956 sigvec \
13957 strdup \
13958 strstr \
13959 tcgetpgrp \
13960 times \
13961 vsnprintf \
13962
13963 do
13964 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13965 echo "$as_me:13965: checking for $ac_func" >&5
13966 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13967 if eval "test \"\${$as_ac_var+set}\" = set"; then
13968   echo $ECHO_N "(cached) $ECHO_C" >&6
13969 else
13970   cat >conftest.$ac_ext <<_ACEOF
13971 #line 13971 "configure"
13972 #include "confdefs.h"
13973 /* System header to define __stub macros and hopefully few prototypes,
13974     which can conflict with char $ac_func (); below.  */
13975 #include <assert.h>
13976 /* Override any gcc2 internal prototype to avoid an error.  */
13977 #ifdef __cplusplus
13978 extern "C"
13979 #endif
13980 /* We use char because int might match the return type of a gcc2
13981    builtin and then its argument prototype would still apply.  */
13982 char $ac_func ();
13983 char (*f) ();
13984
13985 int
13986 main ()
13987 {
13988 /* The GNU C library defines this for functions which it implements
13989     to always fail with ENOSYS.  Some functions are actually named
13990     something starting with __ and the normal name is an alias.  */
13991 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13992 choke me
13993 #else
13994 f = $ac_func;
13995 #endif
13996
13997   ;
13998   return 0;
13999 }
14000 _ACEOF
14001 rm -f conftest.$ac_objext conftest$ac_exeext
14002 if { (eval echo "$as_me:14002: \"$ac_link\"") >&5
14003   (eval $ac_link) 2>&5
14004   ac_status=$?
14005   echo "$as_me:14005: \$? = $ac_status" >&5
14006   (exit $ac_status); } &&
14007          { ac_try='test -s conftest$ac_exeext'
14008   { (eval echo "$as_me:14008: \"$ac_try\"") >&5
14009   (eval $ac_try) 2>&5
14010   ac_status=$?
14011   echo "$as_me:14011: \$? = $ac_status" >&5
14012   (exit $ac_status); }; }; then
14013   eval "$as_ac_var=yes"
14014 else
14015   echo "$as_me: failed program was:" >&5
14016 cat conftest.$ac_ext >&5
14017 eval "$as_ac_var=no"
14018 fi
14019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14020 fi
14021 echo "$as_me:14021: result: `eval echo '${'$as_ac_var'}'`" >&5
14022 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14023 if test `eval echo '${'$as_ac_var'}'` = yes; then
14024   cat >>confdefs.h <<EOF
14025 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14026 EOF
14027
14028 fi
14029 done
14030
14031 if test "$with_getcap" = "yes" ; then
14032
14033 echo "$as_me:14033: checking for terminal-capability database functions" >&5
14034 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14035 if test "${cf_cv_cgetent+set}" = set; then
14036   echo $ECHO_N "(cached) $ECHO_C" >&6
14037 else
14038
14039 cat >conftest.$ac_ext <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14042
14043 #include <stdlib.h>
14044 int
14045 main ()
14046 {
14047
14048         char temp[128];
14049         char *buf = temp;
14050         char *db_array = temp;
14051         cgetent(&buf, /* int *, */ &db_array, "vt100");
14052         cgetcap(buf, "tc", '=');
14053         cgetmatch(buf, "tc");
14054
14055   ;
14056   return 0;
14057 }
14058 _ACEOF
14059 rm -f conftest.$ac_objext conftest$ac_exeext
14060 if { (eval echo "$as_me:14060: \"$ac_link\"") >&5
14061   (eval $ac_link) 2>&5
14062   ac_status=$?
14063   echo "$as_me:14063: \$? = $ac_status" >&5
14064   (exit $ac_status); } &&
14065          { ac_try='test -s conftest$ac_exeext'
14066   { (eval echo "$as_me:14066: \"$ac_try\"") >&5
14067   (eval $ac_try) 2>&5
14068   ac_status=$?
14069   echo "$as_me:14069: \$? = $ac_status" >&5
14070   (exit $ac_status); }; }; then
14071   cf_cv_cgetent=yes
14072 else
14073   echo "$as_me: failed program was:" >&5
14074 cat conftest.$ac_ext >&5
14075 cf_cv_cgetent=no
14076 fi
14077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14078
14079 fi
14080
14081 echo "$as_me:14081: result: $cf_cv_cgetent" >&5
14082 echo "${ECHO_T}$cf_cv_cgetent" >&6
14083 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14084 #define HAVE_BSD_CGETENT 1
14085 EOF
14086
14087 fi
14088
14089 echo "$as_me:14089: checking for isascii" >&5
14090 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14091 if test "${cf_cv_have_isascii+set}" = set; then
14092   echo $ECHO_N "(cached) $ECHO_C" >&6
14093 else
14094
14095         cat >conftest.$ac_ext <<_ACEOF
14096 #line 14096 "configure"
14097 #include "confdefs.h"
14098 #include <ctype.h>
14099 int
14100 main ()
14101 {
14102 int x = isascii(' ')
14103   ;
14104   return 0;
14105 }
14106 _ACEOF
14107 rm -f conftest.$ac_objext conftest$ac_exeext
14108 if { (eval echo "$as_me:14108: \"$ac_link\"") >&5
14109   (eval $ac_link) 2>&5
14110   ac_status=$?
14111   echo "$as_me:14111: \$? = $ac_status" >&5
14112   (exit $ac_status); } &&
14113          { ac_try='test -s conftest$ac_exeext'
14114   { (eval echo "$as_me:14114: \"$ac_try\"") >&5
14115   (eval $ac_try) 2>&5
14116   ac_status=$?
14117   echo "$as_me:14117: \$? = $ac_status" >&5
14118   (exit $ac_status); }; }; then
14119   cf_cv_have_isascii=yes
14120 else
14121   echo "$as_me: failed program was:" >&5
14122 cat conftest.$ac_ext >&5
14123 cf_cv_have_isascii=no
14124 fi
14125 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14126
14127 fi
14128 echo "$as_me:14128: result: $cf_cv_have_isascii" >&5
14129 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14130 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14131 #define HAVE_ISASCII 1
14132 EOF
14133
14134 if test "$ac_cv_func_sigaction" = yes; then
14135 echo "$as_me:14135: checking whether sigaction needs _POSIX_SOURCE" >&5
14136 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14137 cat >conftest.$ac_ext <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14140
14141 #include <sys/types.h>
14142 #include <signal.h>
14143 int
14144 main ()
14145 {
14146 struct sigaction act
14147   ;
14148   return 0;
14149 }
14150 _ACEOF
14151 rm -f conftest.$ac_objext
14152 if { (eval echo "$as_me:14152: \"$ac_compile\"") >&5
14153   (eval $ac_compile) 2>&5
14154   ac_status=$?
14155   echo "$as_me:14155: \$? = $ac_status" >&5
14156   (exit $ac_status); } &&
14157          { ac_try='test -s conftest.$ac_objext'
14158   { (eval echo "$as_me:14158: \"$ac_try\"") >&5
14159   (eval $ac_try) 2>&5
14160   ac_status=$?
14161   echo "$as_me:14161: \$? = $ac_status" >&5
14162   (exit $ac_status); }; }; then
14163   sigact_bad=no
14164 else
14165   echo "$as_me: failed program was:" >&5
14166 cat conftest.$ac_ext >&5
14167
14168 cat >conftest.$ac_ext <<_ACEOF
14169 #line 14169 "configure"
14170 #include "confdefs.h"
14171
14172 #define _POSIX_SOURCE
14173 #include <sys/types.h>
14174 #include <signal.h>
14175 int
14176 main ()
14177 {
14178 struct sigaction act
14179   ;
14180   return 0;
14181 }
14182 _ACEOF
14183 rm -f conftest.$ac_objext
14184 if { (eval echo "$as_me:14184: \"$ac_compile\"") >&5
14185   (eval $ac_compile) 2>&5
14186   ac_status=$?
14187   echo "$as_me:14187: \$? = $ac_status" >&5
14188   (exit $ac_status); } &&
14189          { ac_try='test -s conftest.$ac_objext'
14190   { (eval echo "$as_me:14190: \"$ac_try\"") >&5
14191   (eval $ac_try) 2>&5
14192   ac_status=$?
14193   echo "$as_me:14193: \$? = $ac_status" >&5
14194   (exit $ac_status); }; }; then
14195   sigact_bad=yes
14196          cat >>confdefs.h <<\EOF
14197 #define SVR4_ACTION 1
14198 EOF
14199
14200 else
14201   echo "$as_me: failed program was:" >&5
14202 cat conftest.$ac_ext >&5
14203 sigact_bad=unknown
14204 fi
14205 rm -f conftest.$ac_objext conftest.$ac_ext
14206 fi
14207 rm -f conftest.$ac_objext conftest.$ac_ext
14208 echo "$as_me:14208: result: $sigact_bad" >&5
14209 echo "${ECHO_T}$sigact_bad" >&6
14210 fi
14211
14212 echo "$as_me:14212: checking if nanosleep really works" >&5
14213 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14214 if test "${cf_cv_func_nanosleep+set}" = set; then
14215   echo $ECHO_N "(cached) $ECHO_C" >&6
14216 else
14217
14218 if test "$cross_compiling" = yes; then
14219   cf_cv_func_nanosleep=unknown
14220 else
14221   cat >conftest.$ac_ext <<_ACEOF
14222 #line 14222 "configure"
14223 #include "confdefs.h"
14224
14225 #include <stdio.h>
14226 #include <errno.h>
14227 #include <time.h>
14228
14229 #ifdef HAVE_SYS_TIME_H
14230 #include <sys/time.h>
14231 #endif
14232
14233 int main() {
14234         struct timespec ts1, ts2;
14235         int code;
14236         ts1.tv_sec  = 0;
14237         ts1.tv_nsec = 750000000;
14238         ts2.tv_sec  = 0;
14239         ts2.tv_nsec = 0;
14240         errno = 0;
14241         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14242         ${cf_cv_main_return:-return}(code != 0);
14243 }
14244
14245 _ACEOF
14246 rm -f conftest$ac_exeext
14247 if { (eval echo "$as_me:14247: \"$ac_link\"") >&5
14248   (eval $ac_link) 2>&5
14249   ac_status=$?
14250   echo "$as_me:14250: \$? = $ac_status" >&5
14251   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14252   { (eval echo "$as_me:14252: \"$ac_try\"") >&5
14253   (eval $ac_try) 2>&5
14254   ac_status=$?
14255   echo "$as_me:14255: \$? = $ac_status" >&5
14256   (exit $ac_status); }; }; then
14257   cf_cv_func_nanosleep=yes
14258 else
14259   echo "$as_me: program exited with status $ac_status" >&5
14260 echo "$as_me: failed program was:" >&5
14261 cat conftest.$ac_ext >&5
14262 cf_cv_func_nanosleep=no
14263 fi
14264 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14265 fi
14266 fi
14267 echo "$as_me:14267: result: $cf_cv_func_nanosleep" >&5
14268 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14269
14270 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14271 #define HAVE_NANOSLEEP 1
14272 EOF
14273
14274 for ac_header in \
14275 termio.h \
14276 termios.h \
14277 unistd.h \
14278
14279 do
14280 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14281 echo "$as_me:14281: checking for $ac_header" >&5
14282 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14283 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14284   echo $ECHO_N "(cached) $ECHO_C" >&6
14285 else
14286   cat >conftest.$ac_ext <<_ACEOF
14287 #line 14287 "configure"
14288 #include "confdefs.h"
14289 #include <$ac_header>
14290 _ACEOF
14291 if { (eval echo "$as_me:14291: \"$ac_cpp conftest.$ac_ext\"") >&5
14292   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14293   ac_status=$?
14294   egrep -v '^ *\+' conftest.er1 >conftest.err
14295   rm -f conftest.er1
14296   cat conftest.err >&5
14297   echo "$as_me:14297: \$? = $ac_status" >&5
14298   (exit $ac_status); } >/dev/null; then
14299   if test -s conftest.err; then
14300     ac_cpp_err=$ac_c_preproc_warn_flag
14301   else
14302     ac_cpp_err=
14303   fi
14304 else
14305   ac_cpp_err=yes
14306 fi
14307 if test -z "$ac_cpp_err"; then
14308   eval "$as_ac_Header=yes"
14309 else
14310   echo "$as_me: failed program was:" >&5
14311   cat conftest.$ac_ext >&5
14312   eval "$as_ac_Header=no"
14313 fi
14314 rm -f conftest.err conftest.$ac_ext
14315 fi
14316 echo "$as_me:14316: result: `eval echo '${'$as_ac_Header'}'`" >&5
14317 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14318 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14319   cat >>confdefs.h <<EOF
14320 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14321 EOF
14322
14323 fi
14324 done
14325
14326 if test "$ISC" = yes ; then
14327
14328 for ac_header in sys/termio.h
14329 do
14330 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14331 echo "$as_me:14331: checking for $ac_header" >&5
14332 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14333 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14334   echo $ECHO_N "(cached) $ECHO_C" >&6
14335 else
14336   cat >conftest.$ac_ext <<_ACEOF
14337 #line 14337 "configure"
14338 #include "confdefs.h"
14339 #include <$ac_header>
14340 _ACEOF
14341 if { (eval echo "$as_me:14341: \"$ac_cpp conftest.$ac_ext\"") >&5
14342   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14343   ac_status=$?
14344   egrep -v '^ *\+' conftest.er1 >conftest.err
14345   rm -f conftest.er1
14346   cat conftest.err >&5
14347   echo "$as_me:14347: \$? = $ac_status" >&5
14348   (exit $ac_status); } >/dev/null; then
14349   if test -s conftest.err; then
14350     ac_cpp_err=$ac_c_preproc_warn_flag
14351   else
14352     ac_cpp_err=
14353   fi
14354 else
14355   ac_cpp_err=yes
14356 fi
14357 if test -z "$ac_cpp_err"; then
14358   eval "$as_ac_Header=yes"
14359 else
14360   echo "$as_me: failed program was:" >&5
14361   cat conftest.$ac_ext >&5
14362   eval "$as_ac_Header=no"
14363 fi
14364 rm -f conftest.err conftest.$ac_ext
14365 fi
14366 echo "$as_me:14366: result: `eval echo '${'$as_ac_Header'}'`" >&5
14367 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14368 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14369   cat >>confdefs.h <<EOF
14370 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14371 EOF
14372
14373 fi
14374 done
14375
14376 fi
14377 if test "$ac_cv_header_termios_h" = yes ; then
14378         case "$CFLAGS $CPPFLAGS" in
14379         *-D_POSIX_SOURCE*)
14380                 termios_bad=dunno ;;
14381         *)      termios_bad=maybe ;;
14382         esac
14383         if test "$termios_bad" = maybe ; then
14384         echo "$as_me:14384: checking whether termios.h needs _POSIX_SOURCE" >&5
14385 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14386         cat >conftest.$ac_ext <<_ACEOF
14387 #line 14387 "configure"
14388 #include "confdefs.h"
14389 #include <termios.h>
14390 int
14391 main ()
14392 {
14393 struct termios foo; int x = foo.c_iflag
14394   ;
14395   return 0;
14396 }
14397 _ACEOF
14398 rm -f conftest.$ac_objext
14399 if { (eval echo "$as_me:14399: \"$ac_compile\"") >&5
14400   (eval $ac_compile) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); } &&
14404          { ac_try='test -s conftest.$ac_objext'
14405   { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406   (eval $ac_try) 2>&5
14407   ac_status=$?
14408   echo "$as_me:14408: \$? = $ac_status" >&5
14409   (exit $ac_status); }; }; then
14410   termios_bad=no
14411 else
14412   echo "$as_me: failed program was:" >&5
14413 cat conftest.$ac_ext >&5
14414
14415                 cat >conftest.$ac_ext <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418
14419 #define _POSIX_SOURCE
14420 #include <termios.h>
14421 int
14422 main ()
14423 {
14424 struct termios foo; int x = foo.c_iflag
14425   ;
14426   return 0;
14427 }
14428 _ACEOF
14429 rm -f conftest.$ac_objext
14430 if { (eval echo "$as_me:14430: \"$ac_compile\"") >&5
14431   (eval $ac_compile) 2>&5
14432   ac_status=$?
14433   echo "$as_me:14433: \$? = $ac_status" >&5
14434   (exit $ac_status); } &&
14435          { ac_try='test -s conftest.$ac_objext'
14436   { (eval echo "$as_me:14436: \"$ac_try\"") >&5
14437   (eval $ac_try) 2>&5
14438   ac_status=$?
14439   echo "$as_me:14439: \$? = $ac_status" >&5
14440   (exit $ac_status); }; }; then
14441   termios_bad=unknown
14442 else
14443   echo "$as_me: failed program was:" >&5
14444 cat conftest.$ac_ext >&5
14445 termios_bad=yes cat >>confdefs.h <<\EOF
14446 #define SVR4_TERMIO 1
14447 EOF
14448
14449 fi
14450 rm -f conftest.$ac_objext conftest.$ac_ext
14451
14452 fi
14453 rm -f conftest.$ac_objext conftest.$ac_ext
14454         echo "$as_me:14454: result: $termios_bad" >&5
14455 echo "${ECHO_T}$termios_bad" >&6
14456         fi
14457 fi
14458
14459 echo "$as_me:14459: checking for tcgetattr" >&5
14460 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14461 if test "${cf_cv_have_tcgetattr+set}" = set; then
14462   echo $ECHO_N "(cached) $ECHO_C" >&6
14463 else
14464
14465 cat >conftest.$ac_ext <<_ACEOF
14466 #line 14466 "configure"
14467 #include "confdefs.h"
14468
14469 #include <sys/types.h>
14470 #ifdef HAVE_UNISTD_H
14471 #include <unistd.h>
14472 #endif
14473 #ifdef HAVE_TERMIOS_H
14474 #include <termios.h>
14475 #define TTY struct termios
14476 #else
14477 #ifdef HAVE_TERMIO_H
14478 #include <termio.h>
14479 #define TTY struct termio
14480 #endif
14481 #endif
14482
14483 int
14484 main ()
14485 {
14486
14487 TTY foo;
14488 tcgetattr(1, &foo);
14489   ;
14490   return 0;
14491 }
14492 _ACEOF
14493 rm -f conftest.$ac_objext conftest$ac_exeext
14494 if { (eval echo "$as_me:14494: \"$ac_link\"") >&5
14495   (eval $ac_link) 2>&5
14496   ac_status=$?
14497   echo "$as_me:14497: \$? = $ac_status" >&5
14498   (exit $ac_status); } &&
14499          { ac_try='test -s conftest$ac_exeext'
14500   { (eval echo "$as_me:14500: \"$ac_try\"") >&5
14501   (eval $ac_try) 2>&5
14502   ac_status=$?
14503   echo "$as_me:14503: \$? = $ac_status" >&5
14504   (exit $ac_status); }; }; then
14505   cf_cv_have_tcgetattr=yes
14506 else
14507   echo "$as_me: failed program was:" >&5
14508 cat conftest.$ac_ext >&5
14509 cf_cv_have_tcgetattr=no
14510 fi
14511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14512 fi
14513 echo "$as_me:14513: result: $cf_cv_have_tcgetattr" >&5
14514 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14515 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14516 #define HAVE_TCGETATTR 1
14517 EOF
14518
14519 echo "$as_me:14519: checking for vsscanf function or workaround" >&5
14520 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14521 if test "${cf_cv_func_vsscanf+set}" = set; then
14522   echo $ECHO_N "(cached) $ECHO_C" >&6
14523 else
14524
14525 cat >conftest.$ac_ext <<_ACEOF
14526 #line 14526 "configure"
14527 #include "confdefs.h"
14528
14529 #include <stdarg.h>
14530 #include <stdio.h>
14531 int
14532 main ()
14533 {
14534
14535         va_list ap;
14536         vsscanf("from", "%d", ap)
14537   ;
14538   return 0;
14539 }
14540 _ACEOF
14541 rm -f conftest.$ac_objext conftest$ac_exeext
14542 if { (eval echo "$as_me:14542: \"$ac_link\"") >&5
14543   (eval $ac_link) 2>&5
14544   ac_status=$?
14545   echo "$as_me:14545: \$? = $ac_status" >&5
14546   (exit $ac_status); } &&
14547          { ac_try='test -s conftest$ac_exeext'
14548   { (eval echo "$as_me:14548: \"$ac_try\"") >&5
14549   (eval $ac_try) 2>&5
14550   ac_status=$?
14551   echo "$as_me:14551: \$? = $ac_status" >&5
14552   (exit $ac_status); }; }; then
14553   cf_cv_func_vsscanf=vsscanf
14554 else
14555   echo "$as_me: failed program was:" >&5
14556 cat conftest.$ac_ext >&5
14557
14558 cat >conftest.$ac_ext <<_ACEOF
14559 #line 14559 "configure"
14560 #include "confdefs.h"
14561
14562 #include <stdarg.h>
14563 #include <stdio.h>
14564 int
14565 main ()
14566 {
14567
14568     FILE strbuf;
14569     char *str = "from";
14570
14571     strbuf._flag = _IOREAD;
14572     strbuf._ptr = strbuf._base = (unsigned char *) str;
14573     strbuf._cnt = strlen(str);
14574     strbuf._file = _NFILE;
14575     return (vfscanf(&strbuf, "%d", ap))
14576   ;
14577   return 0;
14578 }
14579 _ACEOF
14580 rm -f conftest.$ac_objext conftest$ac_exeext
14581 if { (eval echo "$as_me:14581: \"$ac_link\"") >&5
14582   (eval $ac_link) 2>&5
14583   ac_status=$?
14584   echo "$as_me:14584: \$? = $ac_status" >&5
14585   (exit $ac_status); } &&
14586          { ac_try='test -s conftest$ac_exeext'
14587   { (eval echo "$as_me:14587: \"$ac_try\"") >&5
14588   (eval $ac_try) 2>&5
14589   ac_status=$?
14590   echo "$as_me:14590: \$? = $ac_status" >&5
14591   (exit $ac_status); }; }; then
14592   cf_cv_func_vsscanf=vfscanf
14593 else
14594   echo "$as_me: failed program was:" >&5
14595 cat conftest.$ac_ext >&5
14596
14597 cat >conftest.$ac_ext <<_ACEOF
14598 #line 14598 "configure"
14599 #include "confdefs.h"
14600
14601 #include <stdarg.h>
14602 #include <stdio.h>
14603 int
14604 main ()
14605 {
14606
14607     FILE strbuf;
14608     char *str = "from";
14609
14610     strbuf._flag = _IOREAD;
14611     strbuf._ptr = strbuf._base = (unsigned char *) str;
14612     strbuf._cnt = strlen(str);
14613     strbuf._file = _NFILE;
14614     return (_doscan(&strbuf, "%d", ap))
14615   ;
14616   return 0;
14617 }
14618 _ACEOF
14619 rm -f conftest.$ac_objext conftest$ac_exeext
14620 if { (eval echo "$as_me:14620: \"$ac_link\"") >&5
14621   (eval $ac_link) 2>&5
14622   ac_status=$?
14623   echo "$as_me:14623: \$? = $ac_status" >&5
14624   (exit $ac_status); } &&
14625          { ac_try='test -s conftest$ac_exeext'
14626   { (eval echo "$as_me:14626: \"$ac_try\"") >&5
14627   (eval $ac_try) 2>&5
14628   ac_status=$?
14629   echo "$as_me:14629: \$? = $ac_status" >&5
14630   (exit $ac_status); }; }; then
14631   cf_cv_func_vsscanf=_doscan
14632 else
14633   echo "$as_me: failed program was:" >&5
14634 cat conftest.$ac_ext >&5
14635
14636 cf_cv_func_vsscanf=no
14637 fi
14638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14639 fi
14640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14641 fi
14642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14643 fi
14644 echo "$as_me:14644: result: $cf_cv_func_vsscanf" >&5
14645 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14646
14647 case $cf_cv_func_vsscanf in #(vi
14648 vsscanf) cat >>confdefs.h <<\EOF
14649 #define HAVE_VSSCANF 1
14650 EOF
14651 ;; #(vi
14652 vfscanf) cat >>confdefs.h <<\EOF
14653 #define HAVE_VFSCANF 1
14654 EOF
14655 ;; #(vi
14656 _doscan) cat >>confdefs.h <<\EOF
14657 #define HAVE__DOSCAN 1
14658 EOF
14659 ;;
14660 esac
14661
14662 echo "$as_me:14662: checking for working mkstemp" >&5
14663 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14664 if test "${cf_cv_func_mkstemp+set}" = set; then
14665   echo $ECHO_N "(cached) $ECHO_C" >&6
14666 else
14667
14668 rm -f conftest*
14669 if test "$cross_compiling" = yes; then
14670   echo "$as_me:14670: checking for mkstemp" >&5
14671 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14672 if test "${ac_cv_func_mkstemp+set}" = set; then
14673   echo $ECHO_N "(cached) $ECHO_C" >&6
14674 else
14675   cat >conftest.$ac_ext <<_ACEOF
14676 #line 14676 "configure"
14677 #include "confdefs.h"
14678 /* System header to define __stub macros and hopefully few prototypes,
14679     which can conflict with char mkstemp (); below.  */
14680 #include <assert.h>
14681 /* Override any gcc2 internal prototype to avoid an error.  */
14682 #ifdef __cplusplus
14683 extern "C"
14684 #endif
14685 /* We use char because int might match the return type of a gcc2
14686    builtin and then its argument prototype would still apply.  */
14687 char mkstemp ();
14688 char (*f) ();
14689
14690 int
14691 main ()
14692 {
14693 /* The GNU C library defines this for functions which it implements
14694     to always fail with ENOSYS.  Some functions are actually named
14695     something starting with __ and the normal name is an alias.  */
14696 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14697 choke me
14698 #else
14699 f = mkstemp;
14700 #endif
14701
14702   ;
14703   return 0;
14704 }
14705 _ACEOF
14706 rm -f conftest.$ac_objext conftest$ac_exeext
14707 if { (eval echo "$as_me:14707: \"$ac_link\"") >&5
14708   (eval $ac_link) 2>&5
14709   ac_status=$?
14710   echo "$as_me:14710: \$? = $ac_status" >&5
14711   (exit $ac_status); } &&
14712          { ac_try='test -s conftest$ac_exeext'
14713   { (eval echo "$as_me:14713: \"$ac_try\"") >&5
14714   (eval $ac_try) 2>&5
14715   ac_status=$?
14716   echo "$as_me:14716: \$? = $ac_status" >&5
14717   (exit $ac_status); }; }; then
14718   ac_cv_func_mkstemp=yes
14719 else
14720   echo "$as_me: failed program was:" >&5
14721 cat conftest.$ac_ext >&5
14722 ac_cv_func_mkstemp=no
14723 fi
14724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14725 fi
14726 echo "$as_me:14726: result: $ac_cv_func_mkstemp" >&5
14727 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14728
14729 else
14730   cat >conftest.$ac_ext <<_ACEOF
14731 #line 14731 "configure"
14732 #include "confdefs.h"
14733
14734 #include <sys/types.h>
14735 #include <stdlib.h>
14736 #include <stdio.h>
14737 #include <string.h>
14738 #include <sys/stat.h>
14739 int main()
14740 {
14741         char *tmpl = "conftestXXXXXX";
14742         char name[2][80];
14743         int n;
14744         int result = 0;
14745         int fd;
14746         struct stat sb;
14747
14748         umask(077);
14749         for (n = 0; n < 2; ++n) {
14750                 strcpy(name[n], tmpl);
14751                 if ((fd = mkstemp(name[n])) >= 0) {
14752                         if (!strcmp(name[n], tmpl)
14753                          || stat(name[n], &sb) != 0
14754                          || (sb.st_mode & S_IFMT) != S_IFREG
14755                          || (sb.st_mode & 077) != 0) {
14756                                 result = 1;
14757                         }
14758                         close(fd);
14759                 }
14760         }
14761         if (result == 0
14762          && !strcmp(name[0], name[1]))
14763                 result = 1;
14764         ${cf_cv_main_return:-return}(result);
14765 }
14766
14767 _ACEOF
14768 rm -f conftest$ac_exeext
14769 if { (eval echo "$as_me:14769: \"$ac_link\"") >&5
14770   (eval $ac_link) 2>&5
14771   ac_status=$?
14772   echo "$as_me:14772: \$? = $ac_status" >&5
14773   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14774   { (eval echo "$as_me:14774: \"$ac_try\"") >&5
14775   (eval $ac_try) 2>&5
14776   ac_status=$?
14777   echo "$as_me:14777: \$? = $ac_status" >&5
14778   (exit $ac_status); }; }; then
14779   cf_cv_func_mkstemp=yes
14780
14781 else
14782   echo "$as_me: program exited with status $ac_status" >&5
14783 echo "$as_me: failed program was:" >&5
14784 cat conftest.$ac_ext >&5
14785 cf_cv_func_mkstemp=no
14786
14787 fi
14788 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14789 fi
14790
14791 fi
14792 echo "$as_me:14792: result: $cf_cv_func_mkstemp" >&5
14793 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14794 if test "$cf_cv_func_mkstemp" = yes ; then
14795         cat >>confdefs.h <<\EOF
14796 #define HAVE_MKSTEMP 1
14797 EOF
14798
14799 fi
14800
14801 # setup for prototype of fallback for vsscanf()
14802
14803 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14804         HAVE_VSSCANF=1
14805 else
14806         HAVE_VSSCANF=0
14807 fi
14808
14809 if test "$cross_compiling" = yes ; then
14810         { echo "$as_me:14810: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14811 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14812 else
14813         echo "$as_me:14813: checking whether setvbuf arguments are reversed" >&5
14814 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14815 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14816   echo $ECHO_N "(cached) $ECHO_C" >&6
14817 else
14818   if test "$cross_compiling" = yes; then
14819   { { echo "$as_me:14819: error: cannot run test program while cross compiling" >&5
14820 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14821    { (exit 1); exit 1; }; }
14822 else
14823   cat >conftest.$ac_ext <<_ACEOF
14824 #line 14824 "configure"
14825 #include "confdefs.h"
14826 #include <stdio.h>
14827 /* If setvbuf has the reversed format, exit 0. */
14828 int
14829 main ()
14830 {
14831   /* This call has the arguments reversed.
14832      A reversed system may check and see that the address of main
14833      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14834   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14835     $ac_main_return(1);
14836   putc('\r', stdout);
14837   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14838 }
14839 _ACEOF
14840 rm -f conftest$ac_exeext
14841 if { (eval echo "$as_me:14841: \"$ac_link\"") >&5
14842   (eval $ac_link) 2>&5
14843   ac_status=$?
14844   echo "$as_me:14844: \$? = $ac_status" >&5
14845   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14846   { (eval echo "$as_me:14846: \"$ac_try\"") >&5
14847   (eval $ac_try) 2>&5
14848   ac_status=$?
14849   echo "$as_me:14849: \$? = $ac_status" >&5
14850   (exit $ac_status); }; }; then
14851   ac_cv_func_setvbuf_reversed=yes
14852 else
14853   echo "$as_me: program exited with status $ac_status" >&5
14854 echo "$as_me: failed program was:" >&5
14855 cat conftest.$ac_ext >&5
14856 ac_cv_func_setvbuf_reversed=no
14857 fi
14858 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14859 fi
14860 rm -f core core.* *.core
14861 fi
14862 echo "$as_me:14862: result: $ac_cv_func_setvbuf_reversed" >&5
14863 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14864 if test $ac_cv_func_setvbuf_reversed = yes; then
14865
14866 cat >>confdefs.h <<\EOF
14867 #define SETVBUF_REVERSED 1
14868 EOF
14869
14870 fi
14871
14872 fi
14873 echo "$as_me:14873: checking return type of signal handlers" >&5
14874 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14875 if test "${ac_cv_type_signal+set}" = set; then
14876   echo $ECHO_N "(cached) $ECHO_C" >&6
14877 else
14878   cat >conftest.$ac_ext <<_ACEOF
14879 #line 14879 "configure"
14880 #include "confdefs.h"
14881 #include <sys/types.h>
14882 #include <signal.h>
14883 #ifdef signal
14884 # undef signal
14885 #endif
14886 #ifdef __cplusplus
14887 extern "C" void (*signal (int, void (*)(int)))(int);
14888 #else
14889 void (*signal ()) ();
14890 #endif
14891
14892 int
14893 main ()
14894 {
14895 int i;
14896   ;
14897   return 0;
14898 }
14899 _ACEOF
14900 rm -f conftest.$ac_objext
14901 if { (eval echo "$as_me:14901: \"$ac_compile\"") >&5
14902   (eval $ac_compile) 2>&5
14903   ac_status=$?
14904   echo "$as_me:14904: \$? = $ac_status" >&5
14905   (exit $ac_status); } &&
14906          { ac_try='test -s conftest.$ac_objext'
14907   { (eval echo "$as_me:14907: \"$ac_try\"") >&5
14908   (eval $ac_try) 2>&5
14909   ac_status=$?
14910   echo "$as_me:14910: \$? = $ac_status" >&5
14911   (exit $ac_status); }; }; then
14912   ac_cv_type_signal=void
14913 else
14914   echo "$as_me: failed program was:" >&5
14915 cat conftest.$ac_ext >&5
14916 ac_cv_type_signal=int
14917 fi
14918 rm -f conftest.$ac_objext conftest.$ac_ext
14919 fi
14920 echo "$as_me:14920: result: $ac_cv_type_signal" >&5
14921 echo "${ECHO_T}$ac_cv_type_signal" >&6
14922
14923 cat >>confdefs.h <<EOF
14924 #define RETSIGTYPE $ac_cv_type_signal
14925 EOF
14926
14927 echo "$as_me:14927: checking for type sigaction_t" >&5
14928 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14929 if test "${cf_cv_type_sigaction+set}" = set; then
14930   echo $ECHO_N "(cached) $ECHO_C" >&6
14931 else
14932
14933         cat >conftest.$ac_ext <<_ACEOF
14934 #line 14934 "configure"
14935 #include "confdefs.h"
14936
14937 #include <signal.h>
14938 int
14939 main ()
14940 {
14941 sigaction_t x
14942   ;
14943   return 0;
14944 }
14945 _ACEOF
14946 rm -f conftest.$ac_objext
14947 if { (eval echo "$as_me:14947: \"$ac_compile\"") >&5
14948   (eval $ac_compile) 2>&5
14949   ac_status=$?
14950   echo "$as_me:14950: \$? = $ac_status" >&5
14951   (exit $ac_status); } &&
14952          { ac_try='test -s conftest.$ac_objext'
14953   { (eval echo "$as_me:14953: \"$ac_try\"") >&5
14954   (eval $ac_try) 2>&5
14955   ac_status=$?
14956   echo "$as_me:14956: \$? = $ac_status" >&5
14957   (exit $ac_status); }; }; then
14958   cf_cv_type_sigaction=yes
14959 else
14960   echo "$as_me: failed program was:" >&5
14961 cat conftest.$ac_ext >&5
14962 cf_cv_type_sigaction=no
14963 fi
14964 rm -f conftest.$ac_objext conftest.$ac_ext
14965 fi
14966
14967 echo "$as_me:14967: result: $cf_cv_type_sigaction" >&5
14968 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14969 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14970 #define HAVE_TYPE_SIGACTION 1
14971 EOF
14972
14973 echo "$as_me:14973: checking declaration of size-change" >&5
14974 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14975 if test "${cf_cv_sizechange+set}" = set; then
14976   echo $ECHO_N "(cached) $ECHO_C" >&6
14977 else
14978
14979     cf_cv_sizechange=unknown
14980     cf_save_CPPFLAGS="$CPPFLAGS"
14981
14982 for cf_opts in "" "NEED_PTEM_H"
14983 do
14984
14985     CPPFLAGS="$cf_save_CPPFLAGS"
14986     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14987     cat >conftest.$ac_ext <<_ACEOF
14988 #line 14988 "configure"
14989 #include "confdefs.h"
14990 #include <sys/types.h>
14991 #ifdef HAVE_TERMIOS_H
14992 #include <termios.h>
14993 #else
14994 #ifdef HAVE_TERMIO_H
14995 #include <termio.h>
14996 #endif
14997 #endif
14998 #ifdef NEED_PTEM_H
14999 /* This is a workaround for SCO:  they neglected to define struct winsize in
15000  * termios.h -- it's only in termio.h and ptem.h
15001  */
15002 #include        <sys/stream.h>
15003 #include        <sys/ptem.h>
15004 #endif
15005 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15006 #include <sys/ioctl.h>
15007 #endif
15008
15009 int
15010 main ()
15011 {
15012
15013 #ifdef TIOCGSIZE
15014         struct ttysize win;     /* FIXME: what system is this? */
15015         int y = win.ts_lines;
15016         int x = win.ts_cols;
15017 #else
15018 #ifdef TIOCGWINSZ
15019         struct winsize win;
15020         int y = win.ws_row;
15021         int x = win.ws_col;
15022 #else
15023         no TIOCGSIZE or TIOCGWINSZ
15024 #endif /* TIOCGWINSZ */
15025 #endif /* TIOCGSIZE */
15026
15027   ;
15028   return 0;
15029 }
15030 _ACEOF
15031 rm -f conftest.$ac_objext
15032 if { (eval echo "$as_me:15032: \"$ac_compile\"") >&5
15033   (eval $ac_compile) 2>&5
15034   ac_status=$?
15035   echo "$as_me:15035: \$? = $ac_status" >&5
15036   (exit $ac_status); } &&
15037          { ac_try='test -s conftest.$ac_objext'
15038   { (eval echo "$as_me:15038: \"$ac_try\"") >&5
15039   (eval $ac_try) 2>&5
15040   ac_status=$?
15041   echo "$as_me:15041: \$? = $ac_status" >&5
15042   (exit $ac_status); }; }; then
15043   cf_cv_sizechange=yes
15044 else
15045   echo "$as_me: failed program was:" >&5
15046 cat conftest.$ac_ext >&5
15047 cf_cv_sizechange=no
15048 fi
15049 rm -f conftest.$ac_objext conftest.$ac_ext
15050
15051         CPPFLAGS="$cf_save_CPPFLAGS"
15052         if test "$cf_cv_sizechange" = yes ; then
15053                 echo "size-change succeeded ($cf_opts)" >&5
15054                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15055                 break
15056         fi
15057 done
15058
15059 fi
15060 echo "$as_me:15060: result: $cf_cv_sizechange" >&5
15061 echo "${ECHO_T}$cf_cv_sizechange" >&6
15062 if test "$cf_cv_sizechange" != no ; then
15063         cat >>confdefs.h <<\EOF
15064 #define HAVE_SIZECHANGE 1
15065 EOF
15066
15067         case $cf_cv_sizechange in #(vi
15068         NEED*)
15069                 cat >>confdefs.h <<EOF
15070 #define $cf_cv_sizechange  1
15071 EOF
15072
15073                 ;;
15074         esac
15075 fi
15076
15077 echo "$as_me:15077: checking for memmove" >&5
15078 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15079 if test "${ac_cv_func_memmove+set}" = set; then
15080   echo $ECHO_N "(cached) $ECHO_C" >&6
15081 else
15082   cat >conftest.$ac_ext <<_ACEOF
15083 #line 15083 "configure"
15084 #include "confdefs.h"
15085 /* System header to define __stub macros and hopefully few prototypes,
15086     which can conflict with char memmove (); below.  */
15087 #include <assert.h>
15088 /* Override any gcc2 internal prototype to avoid an error.  */
15089 #ifdef __cplusplus
15090 extern "C"
15091 #endif
15092 /* We use char because int might match the return type of a gcc2
15093    builtin and then its argument prototype would still apply.  */
15094 char memmove ();
15095 char (*f) ();
15096
15097 int
15098 main ()
15099 {
15100 /* The GNU C library defines this for functions which it implements
15101     to always fail with ENOSYS.  Some functions are actually named
15102     something starting with __ and the normal name is an alias.  */
15103 #if defined (__stub_memmove) || defined (__stub___memmove)
15104 choke me
15105 #else
15106 f = memmove;
15107 #endif
15108
15109   ;
15110   return 0;
15111 }
15112 _ACEOF
15113 rm -f conftest.$ac_objext conftest$ac_exeext
15114 if { (eval echo "$as_me:15114: \"$ac_link\"") >&5
15115   (eval $ac_link) 2>&5
15116   ac_status=$?
15117   echo "$as_me:15117: \$? = $ac_status" >&5
15118   (exit $ac_status); } &&
15119          { ac_try='test -s conftest$ac_exeext'
15120   { (eval echo "$as_me:15120: \"$ac_try\"") >&5
15121   (eval $ac_try) 2>&5
15122   ac_status=$?
15123   echo "$as_me:15123: \$? = $ac_status" >&5
15124   (exit $ac_status); }; }; then
15125   ac_cv_func_memmove=yes
15126 else
15127   echo "$as_me: failed program was:" >&5
15128 cat conftest.$ac_ext >&5
15129 ac_cv_func_memmove=no
15130 fi
15131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15132 fi
15133 echo "$as_me:15133: result: $ac_cv_func_memmove" >&5
15134 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15135 if test $ac_cv_func_memmove = yes; then
15136   :
15137 else
15138
15139 echo "$as_me:15139: checking for bcopy" >&5
15140 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15141 if test "${ac_cv_func_bcopy+set}" = set; then
15142   echo $ECHO_N "(cached) $ECHO_C" >&6
15143 else
15144   cat >conftest.$ac_ext <<_ACEOF
15145 #line 15145 "configure"
15146 #include "confdefs.h"
15147 /* System header to define __stub macros and hopefully few prototypes,
15148     which can conflict with char bcopy (); below.  */
15149 #include <assert.h>
15150 /* Override any gcc2 internal prototype to avoid an error.  */
15151 #ifdef __cplusplus
15152 extern "C"
15153 #endif
15154 /* We use char because int might match the return type of a gcc2
15155    builtin and then its argument prototype would still apply.  */
15156 char bcopy ();
15157 char (*f) ();
15158
15159 int
15160 main ()
15161 {
15162 /* The GNU C library defines this for functions which it implements
15163     to always fail with ENOSYS.  Some functions are actually named
15164     something starting with __ and the normal name is an alias.  */
15165 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15166 choke me
15167 #else
15168 f = bcopy;
15169 #endif
15170
15171   ;
15172   return 0;
15173 }
15174 _ACEOF
15175 rm -f conftest.$ac_objext conftest$ac_exeext
15176 if { (eval echo "$as_me:15176: \"$ac_link\"") >&5
15177   (eval $ac_link) 2>&5
15178   ac_status=$?
15179   echo "$as_me:15179: \$? = $ac_status" >&5
15180   (exit $ac_status); } &&
15181          { ac_try='test -s conftest$ac_exeext'
15182   { (eval echo "$as_me:15182: \"$ac_try\"") >&5
15183   (eval $ac_try) 2>&5
15184   ac_status=$?
15185   echo "$as_me:15185: \$? = $ac_status" >&5
15186   (exit $ac_status); }; }; then
15187   ac_cv_func_bcopy=yes
15188 else
15189   echo "$as_me: failed program was:" >&5
15190 cat conftest.$ac_ext >&5
15191 ac_cv_func_bcopy=no
15192 fi
15193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15194 fi
15195 echo "$as_me:15195: result: $ac_cv_func_bcopy" >&5
15196 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15197 if test $ac_cv_func_bcopy = yes; then
15198
15199         echo "$as_me:15199: checking if bcopy does overlapping moves" >&5
15200 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15201 if test "${cf_cv_good_bcopy+set}" = set; then
15202   echo $ECHO_N "(cached) $ECHO_C" >&6
15203 else
15204
15205                 if test "$cross_compiling" = yes; then
15206   cf_cv_good_bcopy=unknown
15207 else
15208   cat >conftest.$ac_ext <<_ACEOF
15209 #line 15209 "configure"
15210 #include "confdefs.h"
15211
15212 int main() {
15213         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15214         char temp[40];
15215         bcopy(data, temp, sizeof(data));
15216         bcopy(temp+10, temp, 15);
15217         bcopy(temp+5, temp+15, 10);
15218         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15219 }
15220
15221 _ACEOF
15222 rm -f conftest$ac_exeext
15223 if { (eval echo "$as_me:15223: \"$ac_link\"") >&5
15224   (eval $ac_link) 2>&5
15225   ac_status=$?
15226   echo "$as_me:15226: \$? = $ac_status" >&5
15227   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15228   { (eval echo "$as_me:15228: \"$ac_try\"") >&5
15229   (eval $ac_try) 2>&5
15230   ac_status=$?
15231   echo "$as_me:15231: \$? = $ac_status" >&5
15232   (exit $ac_status); }; }; then
15233   cf_cv_good_bcopy=yes
15234 else
15235   echo "$as_me: program exited with status $ac_status" >&5
15236 echo "$as_me: failed program was:" >&5
15237 cat conftest.$ac_ext >&5
15238 cf_cv_good_bcopy=no
15239 fi
15240 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15241 fi
15242
15243 fi
15244 echo "$as_me:15244: result: $cf_cv_good_bcopy" >&5
15245 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15246
15247 else
15248   cf_cv_good_bcopy=no
15249 fi
15250
15251         if test "$cf_cv_good_bcopy" = yes ; then
15252                 cat >>confdefs.h <<\EOF
15253 #define USE_OK_BCOPY 1
15254 EOF
15255
15256         else
15257                 cat >>confdefs.h <<\EOF
15258 #define USE_MY_MEMMOVE 1
15259 EOF
15260
15261         fi
15262
15263 fi
15264
15265 echo "$as_me:15265: checking if poll really works" >&5
15266 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15267 if test "${cf_cv_working_poll+set}" = set; then
15268   echo $ECHO_N "(cached) $ECHO_C" >&6
15269 else
15270
15271 if test "$cross_compiling" = yes; then
15272   cf_cv_working_poll=unknown
15273 else
15274   cat >conftest.$ac_ext <<_ACEOF
15275 #line 15275 "configure"
15276 #include "confdefs.h"
15277
15278 #include <stdio.h>
15279 #ifdef HAVE_POLL_H
15280 #include <poll.h>
15281 #else
15282 #include <sys/poll.h>
15283 #endif
15284 int main() {
15285         struct pollfd myfds;
15286         int ret;
15287
15288         myfds.fd = 0;
15289         myfds.events = POLLIN;
15290
15291         ret = poll(&myfds, 1, 100);
15292         ${cf_cv_main_return:-return}(ret != 0);
15293 }
15294 _ACEOF
15295 rm -f conftest$ac_exeext
15296 if { (eval echo "$as_me:15296: \"$ac_link\"") >&5
15297   (eval $ac_link) 2>&5
15298   ac_status=$?
15299   echo "$as_me:15299: \$? = $ac_status" >&5
15300   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15301   { (eval echo "$as_me:15301: \"$ac_try\"") >&5
15302   (eval $ac_try) 2>&5
15303   ac_status=$?
15304   echo "$as_me:15304: \$? = $ac_status" >&5
15305   (exit $ac_status); }; }; then
15306   cf_cv_working_poll=yes
15307 else
15308   echo "$as_me: program exited with status $ac_status" >&5
15309 echo "$as_me: failed program was:" >&5
15310 cat conftest.$ac_ext >&5
15311 cf_cv_working_poll=no
15312 fi
15313 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15314 fi
15315 fi
15316 echo "$as_me:15316: result: $cf_cv_working_poll" >&5
15317 echo "${ECHO_T}$cf_cv_working_poll" >&6
15318 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15319 #define HAVE_WORKING_POLL 1
15320 EOF
15321
15322 echo "$as_me:15322: checking for va_copy" >&5
15323 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15324 if test "${cf_cv_have_va_copy+set}" = set; then
15325   echo $ECHO_N "(cached) $ECHO_C" >&6
15326 else
15327
15328 cat >conftest.$ac_ext <<_ACEOF
15329 #line 15329 "configure"
15330 #include "confdefs.h"
15331
15332 #include <stdarg.h>
15333
15334 int
15335 main ()
15336 {
15337
15338         static va_list dst;
15339         static va_list src;
15340         va_copy(dst, src)
15341   ;
15342   return 0;
15343 }
15344 _ACEOF
15345 rm -f conftest.$ac_objext conftest$ac_exeext
15346 if { (eval echo "$as_me:15346: \"$ac_link\"") >&5
15347   (eval $ac_link) 2>&5
15348   ac_status=$?
15349   echo "$as_me:15349: \$? = $ac_status" >&5
15350   (exit $ac_status); } &&
15351          { ac_try='test -s conftest$ac_exeext'
15352   { (eval echo "$as_me:15352: \"$ac_try\"") >&5
15353   (eval $ac_try) 2>&5
15354   ac_status=$?
15355   echo "$as_me:15355: \$? = $ac_status" >&5
15356   (exit $ac_status); }; }; then
15357   cf_cv_have_va_copy=yes
15358 else
15359   echo "$as_me: failed program was:" >&5
15360 cat conftest.$ac_ext >&5
15361 cf_cv_have_va_copy=no
15362 fi
15363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15364 fi
15365 echo "$as_me:15365: result: $cf_cv_have_va_copy" >&5
15366 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15367
15368 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15369 #define HAVE_VA_COPY 1
15370 EOF
15371
15372 echo "$as_me:15372: checking for __va_copy" >&5
15373 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15374 if test "${cf_cv_have___va_copy+set}" = set; then
15375   echo $ECHO_N "(cached) $ECHO_C" >&6
15376 else
15377
15378 cat >conftest.$ac_ext <<_ACEOF
15379 #line 15379 "configure"
15380 #include "confdefs.h"
15381
15382 #include <stdarg.h>
15383
15384 int
15385 main ()
15386 {
15387
15388         static va_list dst;
15389         static va_list src;
15390         __va_copy(dst, src)
15391   ;
15392   return 0;
15393 }
15394 _ACEOF
15395 rm -f conftest.$ac_objext conftest$ac_exeext
15396 if { (eval echo "$as_me:15396: \"$ac_link\"") >&5
15397   (eval $ac_link) 2>&5
15398   ac_status=$?
15399   echo "$as_me:15399: \$? = $ac_status" >&5
15400   (exit $ac_status); } &&
15401          { ac_try='test -s conftest$ac_exeext'
15402   { (eval echo "$as_me:15402: \"$ac_try\"") >&5
15403   (eval $ac_try) 2>&5
15404   ac_status=$?
15405   echo "$as_me:15405: \$? = $ac_status" >&5
15406   (exit $ac_status); }; }; then
15407   cf_cv_have___va_copy=yes
15408 else
15409   echo "$as_me: failed program was:" >&5
15410 cat conftest.$ac_ext >&5
15411 cf_cv_have___va_copy=no
15412 fi
15413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15414 fi
15415 echo "$as_me:15415: result: $cf_cv_have___va_copy" >&5
15416 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15417
15418 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15419 #define HAVE___VA_COPY 1
15420 EOF
15421
15422 echo "$as_me:15422: checking for pid_t" >&5
15423 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15424 if test "${ac_cv_type_pid_t+set}" = set; then
15425   echo $ECHO_N "(cached) $ECHO_C" >&6
15426 else
15427   cat >conftest.$ac_ext <<_ACEOF
15428 #line 15428 "configure"
15429 #include "confdefs.h"
15430 $ac_includes_default
15431 int
15432 main ()
15433 {
15434 if ((pid_t *) 0)
15435   return 0;
15436 if (sizeof (pid_t))
15437   return 0;
15438   ;
15439   return 0;
15440 }
15441 _ACEOF
15442 rm -f conftest.$ac_objext
15443 if { (eval echo "$as_me:15443: \"$ac_compile\"") >&5
15444   (eval $ac_compile) 2>&5
15445   ac_status=$?
15446   echo "$as_me:15446: \$? = $ac_status" >&5
15447   (exit $ac_status); } &&
15448          { ac_try='test -s conftest.$ac_objext'
15449   { (eval echo "$as_me:15449: \"$ac_try\"") >&5
15450   (eval $ac_try) 2>&5
15451   ac_status=$?
15452   echo "$as_me:15452: \$? = $ac_status" >&5
15453   (exit $ac_status); }; }; then
15454   ac_cv_type_pid_t=yes
15455 else
15456   echo "$as_me: failed program was:" >&5
15457 cat conftest.$ac_ext >&5
15458 ac_cv_type_pid_t=no
15459 fi
15460 rm -f conftest.$ac_objext conftest.$ac_ext
15461 fi
15462 echo "$as_me:15462: result: $ac_cv_type_pid_t" >&5
15463 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15464 if test $ac_cv_type_pid_t = yes; then
15465   :
15466 else
15467
15468 cat >>confdefs.h <<EOF
15469 #define pid_t int
15470 EOF
15471
15472 fi
15473
15474 for ac_header in unistd.h vfork.h
15475 do
15476 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15477 echo "$as_me:15477: checking for $ac_header" >&5
15478 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15479 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15480   echo $ECHO_N "(cached) $ECHO_C" >&6
15481 else
15482   cat >conftest.$ac_ext <<_ACEOF
15483 #line 15483 "configure"
15484 #include "confdefs.h"
15485 #include <$ac_header>
15486 _ACEOF
15487 if { (eval echo "$as_me:15487: \"$ac_cpp conftest.$ac_ext\"") >&5
15488   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15489   ac_status=$?
15490   egrep -v '^ *\+' conftest.er1 >conftest.err
15491   rm -f conftest.er1
15492   cat conftest.err >&5
15493   echo "$as_me:15493: \$? = $ac_status" >&5
15494   (exit $ac_status); } >/dev/null; then
15495   if test -s conftest.err; then
15496     ac_cpp_err=$ac_c_preproc_warn_flag
15497   else
15498     ac_cpp_err=
15499   fi
15500 else
15501   ac_cpp_err=yes
15502 fi
15503 if test -z "$ac_cpp_err"; then
15504   eval "$as_ac_Header=yes"
15505 else
15506   echo "$as_me: failed program was:" >&5
15507   cat conftest.$ac_ext >&5
15508   eval "$as_ac_Header=no"
15509 fi
15510 rm -f conftest.err conftest.$ac_ext
15511 fi
15512 echo "$as_me:15512: result: `eval echo '${'$as_ac_Header'}'`" >&5
15513 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15514 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15515   cat >>confdefs.h <<EOF
15516 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15517 EOF
15518
15519 fi
15520 done
15521
15522 for ac_func in fork vfork
15523 do
15524 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15525 echo "$as_me:15525: checking for $ac_func" >&5
15526 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15527 if eval "test \"\${$as_ac_var+set}\" = set"; then
15528   echo $ECHO_N "(cached) $ECHO_C" >&6
15529 else
15530   cat >conftest.$ac_ext <<_ACEOF
15531 #line 15531 "configure"
15532 #include "confdefs.h"
15533 /* System header to define __stub macros and hopefully few prototypes,
15534     which can conflict with char $ac_func (); below.  */
15535 #include <assert.h>
15536 /* Override any gcc2 internal prototype to avoid an error.  */
15537 #ifdef __cplusplus
15538 extern "C"
15539 #endif
15540 /* We use char because int might match the return type of a gcc2
15541    builtin and then its argument prototype would still apply.  */
15542 char $ac_func ();
15543 char (*f) ();
15544
15545 int
15546 main ()
15547 {
15548 /* The GNU C library defines this for functions which it implements
15549     to always fail with ENOSYS.  Some functions are actually named
15550     something starting with __ and the normal name is an alias.  */
15551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15552 choke me
15553 #else
15554 f = $ac_func;
15555 #endif
15556
15557   ;
15558   return 0;
15559 }
15560 _ACEOF
15561 rm -f conftest.$ac_objext conftest$ac_exeext
15562 if { (eval echo "$as_me:15562: \"$ac_link\"") >&5
15563   (eval $ac_link) 2>&5
15564   ac_status=$?
15565   echo "$as_me:15565: \$? = $ac_status" >&5
15566   (exit $ac_status); } &&
15567          { ac_try='test -s conftest$ac_exeext'
15568   { (eval echo "$as_me:15568: \"$ac_try\"") >&5
15569   (eval $ac_try) 2>&5
15570   ac_status=$?
15571   echo "$as_me:15571: \$? = $ac_status" >&5
15572   (exit $ac_status); }; }; then
15573   eval "$as_ac_var=yes"
15574 else
15575   echo "$as_me: failed program was:" >&5
15576 cat conftest.$ac_ext >&5
15577 eval "$as_ac_var=no"
15578 fi
15579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15580 fi
15581 echo "$as_me:15581: result: `eval echo '${'$as_ac_var'}'`" >&5
15582 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15583 if test `eval echo '${'$as_ac_var'}'` = yes; then
15584   cat >>confdefs.h <<EOF
15585 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15586 EOF
15587
15588 fi
15589 done
15590
15591 ac_cv_func_fork_works=$ac_cv_func_fork
15592 if test "x$ac_cv_func_fork" = xyes; then
15593   echo "$as_me:15593: checking for working fork" >&5
15594 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15595 if test "${ac_cv_func_fork_works+set}" = set; then
15596   echo $ECHO_N "(cached) $ECHO_C" >&6
15597 else
15598   if test "$cross_compiling" = yes; then
15599   ac_cv_func_fork_works=cross
15600 else
15601   cat >conftest.$ac_ext <<_ACEOF
15602 /* By Rüdiger Kuhlmann. */
15603       #include <sys/types.h>
15604       #if HAVE_UNISTD_H
15605       # include <unistd.h>
15606       #endif
15607       /* Some systems only have a dummy stub for fork() */
15608       int main ()
15609       {
15610         if (fork() < 0)
15611           $ac_main_return (1);
15612         $ac_main_return (0);
15613       }
15614 _ACEOF
15615 rm -f conftest$ac_exeext
15616 if { (eval echo "$as_me:15616: \"$ac_link\"") >&5
15617   (eval $ac_link) 2>&5
15618   ac_status=$?
15619   echo "$as_me:15619: \$? = $ac_status" >&5
15620   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15621   { (eval echo "$as_me:15621: \"$ac_try\"") >&5
15622   (eval $ac_try) 2>&5
15623   ac_status=$?
15624   echo "$as_me:15624: \$? = $ac_status" >&5
15625   (exit $ac_status); }; }; then
15626   ac_cv_func_fork_works=yes
15627 else
15628   echo "$as_me: program exited with status $ac_status" >&5
15629 echo "$as_me: failed program was:" >&5
15630 cat conftest.$ac_ext >&5
15631 ac_cv_func_fork_works=no
15632 fi
15633 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15634 fi
15635 fi
15636 echo "$as_me:15636: result: $ac_cv_func_fork_works" >&5
15637 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15638
15639 fi
15640 if test "x$ac_cv_func_fork_works" = xcross; then
15641   case $host in
15642     *-*-amigaos* | *-*-msdosdjgpp*)
15643       # Override, as these systems have only a dummy fork() stub
15644       ac_cv_func_fork_works=no
15645       ;;
15646     *)
15647       ac_cv_func_fork_works=yes
15648       ;;
15649   esac
15650   { echo "$as_me:15650: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15651 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15652 fi
15653 ac_cv_func_vfork_works=$ac_cv_func_vfork
15654 if test "x$ac_cv_func_vfork" = xyes; then
15655   echo "$as_me:15655: checking for working vfork" >&5
15656 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15657 if test "${ac_cv_func_vfork_works+set}" = set; then
15658   echo $ECHO_N "(cached) $ECHO_C" >&6
15659 else
15660   if test "$cross_compiling" = yes; then
15661   ac_cv_func_vfork_works=cross
15662 else
15663   cat >conftest.$ac_ext <<_ACEOF
15664 #line 15664 "configure"
15665 #include "confdefs.h"
15666 /* Thanks to Paul Eggert for this test.  */
15667 #include <stdio.h>
15668 #include <sys/types.h>
15669 #include <sys/stat.h>
15670 #if HAVE_UNISTD_H
15671 # include <unistd.h>
15672 #endif
15673 #if HAVE_VFORK_H
15674 # include <vfork.h>
15675 #endif
15676 /* On some sparc systems, changes by the child to local and incoming
15677    argument registers are propagated back to the parent.  The compiler
15678    is told about this with #include <vfork.h>, but some compilers
15679    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15680    static variable whose address is put into a register that is
15681    clobbered by the vfork.  */
15682 static
15683 #ifdef __cplusplus
15684 sparc_address_test (int arg)
15685 # else
15686 sparc_address_test (arg) int arg;
15687 #endif
15688 {
15689   static pid_t child;
15690   if (!child) {
15691     child = vfork ();
15692     if (child < 0) {
15693       perror ("vfork");
15694       _exit(2);
15695     }
15696     if (!child) {
15697       arg = getpid();
15698       write(-1, "", 0);
15699       _exit (arg);
15700     }
15701   }
15702 }
15703
15704 int
15705 main ()
15706 {
15707   pid_t parent = getpid ();
15708   pid_t child;
15709
15710   sparc_address_test ();
15711
15712   child = vfork ();
15713
15714   if (child == 0) {
15715     /* Here is another test for sparc vfork register problems.  This
15716        test uses lots of local variables, at least as many local
15717        variables as main has allocated so far including compiler
15718        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15719        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15720        reuse the register of parent for one of the local variables,
15721        since it will think that parent can't possibly be used any more
15722        in this routine.  Assigning to the local variable will thus
15723        munge parent in the parent process.  */
15724     pid_t
15725       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15726       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15727     /* Convince the compiler that p..p7 are live; otherwise, it might
15728        use the same hardware register for all 8 local variables.  */
15729     if (p != p1 || p != p2 || p != p3 || p != p4
15730         || p != p5 || p != p6 || p != p7)
15731       _exit(1);
15732
15733     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15734        from child file descriptors.  If the child closes a descriptor
15735        before it execs or exits, this munges the parent's descriptor
15736        as well.  Test for this by closing stdout in the child.  */
15737     _exit(close(fileno(stdout)) != 0);
15738   } else {
15739     int status;
15740     struct stat st;
15741
15742     while (wait(&status) != child)
15743       ;
15744     $ac_main_return(
15745          /* Was there some problem with vforking?  */
15746          child < 0
15747
15748          /* Did the child fail?  (This shouldn't happen.)  */
15749          || status
15750
15751          /* Did the vfork/compiler bug occur?  */
15752          || parent != getpid()
15753
15754          /* Did the file descriptor bug occur?  */
15755          || fstat(fileno(stdout), &st) != 0
15756          );
15757   }
15758 }
15759 _ACEOF
15760 rm -f conftest$ac_exeext
15761 if { (eval echo "$as_me:15761: \"$ac_link\"") >&5
15762   (eval $ac_link) 2>&5
15763   ac_status=$?
15764   echo "$as_me:15764: \$? = $ac_status" >&5
15765   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15766   { (eval echo "$as_me:15766: \"$ac_try\"") >&5
15767   (eval $ac_try) 2>&5
15768   ac_status=$?
15769   echo "$as_me:15769: \$? = $ac_status" >&5
15770   (exit $ac_status); }; }; then
15771   ac_cv_func_vfork_works=yes
15772 else
15773   echo "$as_me: program exited with status $ac_status" >&5
15774 echo "$as_me: failed program was:" >&5
15775 cat conftest.$ac_ext >&5
15776 ac_cv_func_vfork_works=no
15777 fi
15778 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15779 fi
15780 fi
15781 echo "$as_me:15781: result: $ac_cv_func_vfork_works" >&5
15782 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15783
15784 fi;
15785 if test "x$ac_cv_func_fork_works" = xcross; then
15786   ac_cv_func_vfork_works=ac_cv_func_vfork
15787   { echo "$as_me:15787: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
15788 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
15789 fi
15790
15791 if test "x$ac_cv_func_vfork_works" = xyes; then
15792
15793 cat >>confdefs.h <<\EOF
15794 #define HAVE_WORKING_VFORK 1
15795 EOF
15796
15797 else
15798
15799 cat >>confdefs.h <<\EOF
15800 #define vfork fork
15801 EOF
15802
15803 fi
15804 if test "x$ac_cv_func_fork_works" = xyes; then
15805
15806 cat >>confdefs.h <<\EOF
15807 #define HAVE_WORKING_FORK 1
15808 EOF
15809
15810 fi
15811
15812 # special check for test/ditto.c
15813
15814 echo "$as_me:15814: checking for openpty in -lutil" >&5
15815 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15816 if test "${ac_cv_lib_util_openpty+set}" = set; then
15817   echo $ECHO_N "(cached) $ECHO_C" >&6
15818 else
15819   ac_check_lib_save_LIBS=$LIBS
15820 LIBS="-lutil  $LIBS"
15821 cat >conftest.$ac_ext <<_ACEOF
15822 #line 15822 "configure"
15823 #include "confdefs.h"
15824
15825 /* Override any gcc2 internal prototype to avoid an error.  */
15826 #ifdef __cplusplus
15827 extern "C"
15828 #endif
15829 /* We use char because int might match the return type of a gcc2
15830    builtin and then its argument prototype would still apply.  */
15831 char openpty ();
15832 int
15833 main ()
15834 {
15835 openpty ();
15836   ;
15837   return 0;
15838 }
15839 _ACEOF
15840 rm -f conftest.$ac_objext conftest$ac_exeext
15841 if { (eval echo "$as_me:15841: \"$ac_link\"") >&5
15842   (eval $ac_link) 2>&5
15843   ac_status=$?
15844   echo "$as_me:15844: \$? = $ac_status" >&5
15845   (exit $ac_status); } &&
15846          { ac_try='test -s conftest$ac_exeext'
15847   { (eval echo "$as_me:15847: \"$ac_try\"") >&5
15848   (eval $ac_try) 2>&5
15849   ac_status=$?
15850   echo "$as_me:15850: \$? = $ac_status" >&5
15851   (exit $ac_status); }; }; then
15852   ac_cv_lib_util_openpty=yes
15853 else
15854   echo "$as_me: failed program was:" >&5
15855 cat conftest.$ac_ext >&5
15856 ac_cv_lib_util_openpty=no
15857 fi
15858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15859 LIBS=$ac_check_lib_save_LIBS
15860 fi
15861 echo "$as_me:15861: result: $ac_cv_lib_util_openpty" >&5
15862 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15863 if test $ac_cv_lib_util_openpty = yes; then
15864   cf_cv_lib_util=yes
15865 else
15866   cf_cv_lib_util=no
15867 fi
15868
15869 echo "$as_me:15869: checking for openpty header" >&5
15870 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15871 if test "${cf_cv_func_openpty+set}" = set; then
15872   echo $ECHO_N "(cached) $ECHO_C" >&6
15873 else
15874
15875     cf_save_LIBS="$LIBS"
15876     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
15877     for cf_header in pty.h libutil.h util.h
15878     do
15879     cat >conftest.$ac_ext <<_ACEOF
15880 #line 15880 "configure"
15881 #include "confdefs.h"
15882
15883 #include <$cf_header>
15884
15885 int
15886 main ()
15887 {
15888
15889     int x = openpty((int *)0, (int *)0, (char *)0,
15890                    (struct termios *)0, (struct winsize *)0);
15891
15892   ;
15893   return 0;
15894 }
15895 _ACEOF
15896 rm -f conftest.$ac_objext conftest$ac_exeext
15897 if { (eval echo "$as_me:15897: \"$ac_link\"") >&5
15898   (eval $ac_link) 2>&5
15899   ac_status=$?
15900   echo "$as_me:15900: \$? = $ac_status" >&5
15901   (exit $ac_status); } &&
15902          { ac_try='test -s conftest$ac_exeext'
15903   { (eval echo "$as_me:15903: \"$ac_try\"") >&5
15904   (eval $ac_try) 2>&5
15905   ac_status=$?
15906   echo "$as_me:15906: \$? = $ac_status" >&5
15907   (exit $ac_status); }; }; then
15908
15909         cf_cv_func_openpty=$cf_header
15910         break
15911
15912 else
15913   echo "$as_me: failed program was:" >&5
15914 cat conftest.$ac_ext >&5
15915
15916         cf_cv_func_openpty=no
15917
15918 fi
15919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15920     done
15921     LIBS="$cf_save_LIBS"
15922
15923 fi
15924 echo "$as_me:15924: result: $cf_cv_func_openpty" >&5
15925 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15926
15927 if test "$cf_cv_func_openpty" != no ; then
15928     cat >>confdefs.h <<EOF
15929 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15930 EOF
15931
15932     cat >>confdefs.h <<\EOF
15933 #define USE_XTERM_PTY 1
15934 EOF
15935
15936     if test "$cf_cv_lib_util" = yes ; then
15937         TEST_LIBS="-lutil $TEST_LIBS"
15938     fi
15939 fi
15940
15941 if test "$with_hashed_db" != no ; then
15942         cat >>confdefs.h <<\EOF
15943 #define USE_HASHED_DB 1
15944 EOF
15945
15946 case $with_hashed_db in #(vi
15947 yes|*able*) #(vi
15948     ;;
15949 *)
15950     if test -d "$with_hashed_db" ; then
15951
15952 if test -n "$with_hashed_db/include" ; then
15953   for cf_add_incdir in $with_hashed_db/include
15954   do
15955         while test $cf_add_incdir != /usr/include
15956         do
15957           if test -d $cf_add_incdir
15958           then
15959                 cf_have_incdir=no
15960                 if test -n "$CFLAGS$CPPFLAGS" ; then
15961                   # a loop is needed to ensure we can add subdirs of existing dirs
15962                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15963                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15964                           cf_have_incdir=yes; break
15965                         fi
15966                   done
15967                 fi
15968
15969                 if test "$cf_have_incdir" = no ; then
15970                   if test "$cf_add_incdir" = /usr/local/include ; then
15971                         if test "$GCC" = yes
15972                         then
15973                           cf_save_CPPFLAGS=$CPPFLAGS
15974                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15975                           cat >conftest.$ac_ext <<_ACEOF
15976 #line 15976 "configure"
15977 #include "confdefs.h"
15978 #include <stdio.h>
15979 int
15980 main ()
15981 {
15982 printf("Hello")
15983   ;
15984   return 0;
15985 }
15986 _ACEOF
15987 rm -f conftest.$ac_objext
15988 if { (eval echo "$as_me:15988: \"$ac_compile\"") >&5
15989   (eval $ac_compile) 2>&5
15990   ac_status=$?
15991   echo "$as_me:15991: \$? = $ac_status" >&5
15992   (exit $ac_status); } &&
15993          { ac_try='test -s conftest.$ac_objext'
15994   { (eval echo "$as_me:15994: \"$ac_try\"") >&5
15995   (eval $ac_try) 2>&5
15996   ac_status=$?
15997   echo "$as_me:15997: \$? = $ac_status" >&5
15998   (exit $ac_status); }; }; then
15999   :
16000 else
16001   echo "$as_me: failed program was:" >&5
16002 cat conftest.$ac_ext >&5
16003 cf_have_incdir=yes
16004 fi
16005 rm -f conftest.$ac_objext conftest.$ac_ext
16006                           CPPFLAGS=$cf_save_CPPFLAGS
16007                         fi
16008                   fi
16009                 fi
16010
16011                 if test "$cf_have_incdir" = no ; then
16012                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16013
16014 echo "${as_me-configure}:16014: testing adding $cf_add_incdir to include-path ..." 1>&5
16015
16016                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16017
16018                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16019                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16020                   cf_add_incdir="$cf_top_incdir"
16021                 else
16022                   break
16023                 fi
16024           fi
16025         done
16026   done
16027 fi
16028
16029 if test -n "$with_hashed_db/lib" ; then
16030   for cf_add_libdir in $with_hashed_db/lib
16031   do
16032     if test $cf_add_libdir = /usr/lib ; then
16033       :
16034     elif test -d $cf_add_libdir
16035     then
16036       cf_have_libdir=no
16037       if test -n "$LDFLAGS$LIBS" ; then
16038         # a loop is needed to ensure we can add subdirs of existing dirs
16039         for cf_test_libdir in $LDFLAGS $LIBS ; do
16040           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16041             cf_have_libdir=yes; break
16042           fi
16043         done
16044       fi
16045       if test "$cf_have_libdir" = no ; then
16046         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16047
16048 echo "${as_me-configure}:16048: testing adding $cf_add_libdir to library-path ..." 1>&5
16049
16050         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16051       fi
16052     fi
16053   done
16054 fi
16055
16056     fi
16057 esac
16058
16059 echo "$as_me:16059: checking for db.h" >&5
16060 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16061 if test "${ac_cv_header_db_h+set}" = set; then
16062   echo $ECHO_N "(cached) $ECHO_C" >&6
16063 else
16064   cat >conftest.$ac_ext <<_ACEOF
16065 #line 16065 "configure"
16066 #include "confdefs.h"
16067 #include <db.h>
16068 _ACEOF
16069 if { (eval echo "$as_me:16069: \"$ac_cpp conftest.$ac_ext\"") >&5
16070   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16071   ac_status=$?
16072   egrep -v '^ *\+' conftest.er1 >conftest.err
16073   rm -f conftest.er1
16074   cat conftest.err >&5
16075   echo "$as_me:16075: \$? = $ac_status" >&5
16076   (exit $ac_status); } >/dev/null; then
16077   if test -s conftest.err; then
16078     ac_cpp_err=$ac_c_preproc_warn_flag
16079   else
16080     ac_cpp_err=
16081   fi
16082 else
16083   ac_cpp_err=yes
16084 fi
16085 if test -z "$ac_cpp_err"; then
16086   ac_cv_header_db_h=yes
16087 else
16088   echo "$as_me: failed program was:" >&5
16089   cat conftest.$ac_ext >&5
16090   ac_cv_header_db_h=no
16091 fi
16092 rm -f conftest.err conftest.$ac_ext
16093 fi
16094 echo "$as_me:16094: result: $ac_cv_header_db_h" >&5
16095 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16096 if test $ac_cv_header_db_h = yes; then
16097
16098 echo "$as_me:16098: checking for version of db" >&5
16099 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16100 if test "${cf_cv_hashed_db_version+set}" = set; then
16101   echo $ECHO_N "(cached) $ECHO_C" >&6
16102 else
16103
16104 cf_cv_hashed_db_version=unknown
16105
16106 for cf_db_version in 1 2 3 4 5
16107 do
16108
16109 echo "${as_me-configure}:16109: testing checking for db version $cf_db_version ..." 1>&5
16110
16111         cat >conftest.$ac_ext <<_ACEOF
16112 #line 16112 "configure"
16113 #include "confdefs.h"
16114
16115 $ac_includes_default
16116 #include <db.h>
16117
16118 #ifdef DB_VERSION_MAJOR
16119         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16120 #if $cf_db_version == DB_VERSION_MAJOR
16121         /* ok */
16122 #else
16123         make an error
16124 #endif
16125 #else
16126 #if $cf_db_version == 1
16127         /* ok: assuming this is DB 1.8.5 */
16128 #else
16129         make an error
16130 #endif
16131 #endif
16132
16133 int
16134 main ()
16135 {
16136 DBT *foo = 0
16137   ;
16138   return 0;
16139 }
16140 _ACEOF
16141 rm -f conftest.$ac_objext
16142 if { (eval echo "$as_me:16142: \"$ac_compile\"") >&5
16143   (eval $ac_compile) 2>&5
16144   ac_status=$?
16145   echo "$as_me:16145: \$? = $ac_status" >&5
16146   (exit $ac_status); } &&
16147          { ac_try='test -s conftest.$ac_objext'
16148   { (eval echo "$as_me:16148: \"$ac_try\"") >&5
16149   (eval $ac_try) 2>&5
16150   ac_status=$?
16151   echo "$as_me:16151: \$? = $ac_status" >&5
16152   (exit $ac_status); }; }; then
16153
16154         cf_cv_hashed_db_version=$cf_db_version
16155         break
16156
16157 else
16158   echo "$as_me: failed program was:" >&5
16159 cat conftest.$ac_ext >&5
16160 fi
16161 rm -f conftest.$ac_objext conftest.$ac_ext
16162 done
16163
16164 fi
16165 echo "$as_me:16165: result: $cf_cv_hashed_db_version" >&5
16166 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16167
16168 if test "$cf_cv_hashed_db_version" = unknown ; then
16169         { { echo "$as_me:16169: error: Cannot determine version of db" >&5
16170 echo "$as_me: error: Cannot determine version of db" >&2;}
16171    { (exit 1); exit 1; }; }
16172 else
16173
16174 echo "$as_me:16174: checking for db libraries" >&5
16175 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16176 if test "${cf_cv_hashed_db_libs+set}" = set; then
16177   echo $ECHO_N "(cached) $ECHO_C" >&6
16178 else
16179
16180 cf_cv_hashed_db_libs=unknown
16181 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16182 do
16183         cf_save_libs="$LIBS"
16184         if test -n "$cf_db_libs"; then
16185                 LIBS="-l$cf_db_libs $LIBS"
16186         fi
16187
16188 echo "${as_me-configure}:16188: testing checking for library "$cf_db_libs" ..." 1>&5
16189
16190         cat >conftest.$ac_ext <<_ACEOF
16191 #line 16191 "configure"
16192 #include "confdefs.h"
16193
16194 $ac_includes_default
16195 #include <db.h>
16196
16197 int
16198 main ()
16199 {
16200
16201         char *path = "/tmp/foo";
16202 #ifdef DB_VERSION_MAJOR
16203 #if DB_VERSION_MAJOR >= 4
16204         DB *result = 0;
16205         db_create(&result, NULL, 0);
16206         result->open(result,
16207                 NULL,
16208                 path,
16209                 path,
16210                 DB_HASH,
16211                 DB_CREATE,
16212                 0644);
16213 #elif DB_VERSION_MAJOR >= 3
16214         DB *result = 0;
16215         db_create(&result, NULL, 0);
16216         result->open(result,
16217                 path,
16218                 path,
16219                 DB_HASH,
16220                 DB_CREATE,
16221                 0644);
16222 #elif DB_VERSION_MAJOR >= 2
16223         DB *result = 0;
16224         db_open(path,
16225                 DB_HASH,
16226                 DB_CREATE,
16227                 0644,
16228                 (DB_ENV *) 0,
16229                 (DB_INFO *) 0,
16230                 &result);
16231 #endif /* DB_VERSION_MAJOR */
16232 #else
16233         DB *result = dbopen(path,
16234                      2,
16235                      0644,
16236                      DB_HASH,
16237                      0);
16238 #endif
16239         ${cf_cv_main_return:-return}(result != 0)
16240
16241   ;
16242   return 0;
16243 }
16244 _ACEOF
16245 rm -f conftest.$ac_objext conftest$ac_exeext
16246 if { (eval echo "$as_me:16246: \"$ac_link\"") >&5
16247   (eval $ac_link) 2>&5
16248   ac_status=$?
16249   echo "$as_me:16249: \$? = $ac_status" >&5
16250   (exit $ac_status); } &&
16251          { ac_try='test -s conftest$ac_exeext'
16252   { (eval echo "$as_me:16252: \"$ac_try\"") >&5
16253   (eval $ac_try) 2>&5
16254   ac_status=$?
16255   echo "$as_me:16255: \$? = $ac_status" >&5
16256   (exit $ac_status); }; }; then
16257
16258         if test -n "$cf_db_libs" ; then
16259                 cf_cv_hashed_db_libs=$cf_db_libs
16260         else
16261                 cf_cv_hashed_db_libs=default
16262         fi
16263         LIBS="$cf_save_libs"
16264         break
16265
16266 else
16267   echo "$as_me: failed program was:" >&5
16268 cat conftest.$ac_ext >&5
16269 fi
16270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16271         LIBS="$cf_save_libs"
16272 done
16273
16274 fi
16275 echo "$as_me:16275: result: $cf_cv_hashed_db_libs" >&5
16276 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16277
16278         if test "$cf_cv_hashed_db_libs" = unknown ; then
16279                 { { echo "$as_me:16279: error: Cannot determine library for db" >&5
16280 echo "$as_me: error: Cannot determine library for db" >&2;}
16281    { (exit 1); exit 1; }; }
16282         elif test "$cf_cv_hashed_db_libs" != default ; then
16283                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16284         fi
16285 fi
16286
16287 else
16288
16289         { { echo "$as_me:16289: error: Cannot find db.h" >&5
16290 echo "$as_me: error: Cannot find db.h" >&2;}
16291    { (exit 1); exit 1; }; }
16292
16293 fi
16294
16295 fi
16296
16297 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16298         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16299         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16300 fi
16301
16302 # Just in case, check if the C compiler has a bool type.
16303
16304 echo "$as_me:16304: checking if we should include stdbool.h" >&5
16305 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16306
16307 if test "${cf_cv_header_stdbool_h+set}" = set; then
16308   echo $ECHO_N "(cached) $ECHO_C" >&6
16309 else
16310
16311         cat >conftest.$ac_ext <<_ACEOF
16312 #line 16312 "configure"
16313 #include "confdefs.h"
16314
16315 int
16316 main ()
16317 {
16318 bool foo = false
16319   ;
16320   return 0;
16321 }
16322 _ACEOF
16323 rm -f conftest.$ac_objext
16324 if { (eval echo "$as_me:16324: \"$ac_compile\"") >&5
16325   (eval $ac_compile) 2>&5
16326   ac_status=$?
16327   echo "$as_me:16327: \$? = $ac_status" >&5
16328   (exit $ac_status); } &&
16329          { ac_try='test -s conftest.$ac_objext'
16330   { (eval echo "$as_me:16330: \"$ac_try\"") >&5
16331   (eval $ac_try) 2>&5
16332   ac_status=$?
16333   echo "$as_me:16333: \$? = $ac_status" >&5
16334   (exit $ac_status); }; }; then
16335   cf_cv_header_stdbool_h=0
16336 else
16337   echo "$as_me: failed program was:" >&5
16338 cat conftest.$ac_ext >&5
16339 cat >conftest.$ac_ext <<_ACEOF
16340 #line 16340 "configure"
16341 #include "confdefs.h"
16342
16343 #ifndef __BEOS__
16344 #include <stdbool.h>
16345 #endif
16346
16347 int
16348 main ()
16349 {
16350 bool foo = false
16351   ;
16352   return 0;
16353 }
16354 _ACEOF
16355 rm -f conftest.$ac_objext
16356 if { (eval echo "$as_me:16356: \"$ac_compile\"") >&5
16357   (eval $ac_compile) 2>&5
16358   ac_status=$?
16359   echo "$as_me:16359: \$? = $ac_status" >&5
16360   (exit $ac_status); } &&
16361          { ac_try='test -s conftest.$ac_objext'
16362   { (eval echo "$as_me:16362: \"$ac_try\"") >&5
16363   (eval $ac_try) 2>&5
16364   ac_status=$?
16365   echo "$as_me:16365: \$? = $ac_status" >&5
16366   (exit $ac_status); }; }; then
16367   cf_cv_header_stdbool_h=1
16368 else
16369   echo "$as_me: failed program was:" >&5
16370 cat conftest.$ac_ext >&5
16371 cf_cv_header_stdbool_h=0
16372 fi
16373 rm -f conftest.$ac_objext conftest.$ac_ext
16374 fi
16375 rm -f conftest.$ac_objext conftest.$ac_ext
16376 fi
16377
16378 if test "$cf_cv_header_stdbool_h" = 1
16379 then    echo "$as_me:16379: result: yes" >&5
16380 echo "${ECHO_T}yes" >&6
16381 else    echo "$as_me:16381: result: no" >&5
16382 echo "${ECHO_T}no" >&6
16383 fi
16384
16385 echo "$as_me:16385: checking for builtin bool type" >&5
16386 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16387
16388 if test "${cf_cv_cc_bool_type+set}" = set; then
16389   echo $ECHO_N "(cached) $ECHO_C" >&6
16390 else
16391
16392         cat >conftest.$ac_ext <<_ACEOF
16393 #line 16393 "configure"
16394 #include "confdefs.h"
16395
16396 #include <stdio.h>
16397 #include <sys/types.h>
16398
16399 int
16400 main ()
16401 {
16402 bool x = false
16403   ;
16404   return 0;
16405 }
16406 _ACEOF
16407 rm -f conftest.$ac_objext
16408 if { (eval echo "$as_me:16408: \"$ac_compile\"") >&5
16409   (eval $ac_compile) 2>&5
16410   ac_status=$?
16411   echo "$as_me:16411: \$? = $ac_status" >&5
16412   (exit $ac_status); } &&
16413          { ac_try='test -s conftest.$ac_objext'
16414   { (eval echo "$as_me:16414: \"$ac_try\"") >&5
16415   (eval $ac_try) 2>&5
16416   ac_status=$?
16417   echo "$as_me:16417: \$? = $ac_status" >&5
16418   (exit $ac_status); }; }; then
16419   cf_cv_cc_bool_type=1
16420 else
16421   echo "$as_me: failed program was:" >&5
16422 cat conftest.$ac_ext >&5
16423 cf_cv_cc_bool_type=0
16424 fi
16425 rm -f conftest.$ac_objext conftest.$ac_ext
16426
16427 fi
16428
16429 if test "$cf_cv_cc_bool_type" = 1
16430 then    echo "$as_me:16430: result: yes" >&5
16431 echo "${ECHO_T}yes" >&6
16432 else    echo "$as_me:16432: result: no" >&5
16433 echo "${ECHO_T}no" >&6
16434 fi
16435
16436 # Check for C++ compiler characteristics (and ensure that it's there!)
16437 if test -n "$CXX" ; then
16438         ac_ext=cc
16439 ac_cpp='$CXXCPP $CPPFLAGS'
16440 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16441 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16442 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16443 ac_main_return=return
16444
16445 if test -n "$GXX" ; then
16446 case $cf_cv_system_name in #(vi
16447 os2*) #(vi
16448         cf_stdcpp_libname=stdcpp
16449         ;;
16450 *)
16451         cf_stdcpp_libname=stdc++
16452         ;;
16453 esac
16454 echo "$as_me:16454: checking for library $cf_stdcpp_libname" >&5
16455 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16456 if test "${cf_cv_libstdcpp+set}" = set; then
16457   echo $ECHO_N "(cached) $ECHO_C" >&6
16458 else
16459
16460         cf_save="$LIBS"
16461         LIBS="-l$cf_stdcpp_libname $LIBS"
16462 cat >conftest.$ac_ext <<_ACEOF
16463 #line 16463 "configure"
16464 #include "confdefs.h"
16465
16466 #include <strstream.h>
16467 int
16468 main ()
16469 {
16470
16471 char buf[80];
16472 strstreambuf foo(buf, sizeof(buf))
16473
16474   ;
16475   return 0;
16476 }
16477 _ACEOF
16478 rm -f conftest.$ac_objext conftest$ac_exeext
16479 if { (eval echo "$as_me:16479: \"$ac_link\"") >&5
16480   (eval $ac_link) 2>&5
16481   ac_status=$?
16482   echo "$as_me:16482: \$? = $ac_status" >&5
16483   (exit $ac_status); } &&
16484          { ac_try='test -s conftest$ac_exeext'
16485   { (eval echo "$as_me:16485: \"$ac_try\"") >&5
16486   (eval $ac_try) 2>&5
16487   ac_status=$?
16488   echo "$as_me:16488: \$? = $ac_status" >&5
16489   (exit $ac_status); }; }; then
16490   cf_cv_libstdcpp=yes
16491 else
16492   echo "$as_me: failed program was:" >&5
16493 cat conftest.$ac_ext >&5
16494 cf_cv_libstdcpp=no
16495 fi
16496 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16497         LIBS="$cf_save"
16498
16499 fi
16500 echo "$as_me:16500: result: $cf_cv_libstdcpp" >&5
16501 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16502 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
16503 fi
16504
16505         echo "$as_me:16505: checking whether $CXX understands -c and -o together" >&5
16506 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16507 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16508   echo $ECHO_N "(cached) $ECHO_C" >&6
16509 else
16510
16511 cat > conftest.$ac_ext <<CF_EOF
16512 #include <stdio.h>
16513 int main()
16514 {
16515         ${cf_cv_main_return:-return}(0);
16516 }
16517 CF_EOF
16518 # We do the test twice because some compilers refuse to overwrite an
16519 # existing .o file with -o, though they will create one.
16520 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16521 if { (eval echo "$as_me:16521: \"$ac_try\"") >&5
16522   (eval $ac_try) 2>&5
16523   ac_status=$?
16524   echo "$as_me:16524: \$? = $ac_status" >&5
16525   (exit $ac_status); } &&
16526   test -f conftest2.$ac_objext && { (eval echo "$as_me:16526: \"$ac_try\"") >&5
16527   (eval $ac_try) 2>&5
16528   ac_status=$?
16529   echo "$as_me:16529: \$? = $ac_status" >&5
16530   (exit $ac_status); };
16531 then
16532   eval cf_cv_prog_CXX_c_o=yes
16533 else
16534   eval cf_cv_prog_CXX_c_o=no
16535 fi
16536 rm -f conftest*
16537
16538 fi
16539 if test $cf_cv_prog_CXX_c_o = yes; then
16540   echo "$as_me:16540: result: yes" >&5
16541 echo "${ECHO_T}yes" >&6
16542 else
16543   echo "$as_me:16543: result: no" >&5
16544 echo "${ECHO_T}no" >&6
16545 fi
16546
16547         case $GXX_VERSION in
16548         1*|2.0-6*)
16549                 cf_cxx_library=yes
16550                 ;;
16551         *-2.7*|2.7*)
16552
16553 cf_cxx_library=unknown
16554 case $cf_cv_system_name in #(vi
16555 os2*) #(vi
16556         cf_gpp_libname=gpp
16557         ;;
16558 *)
16559         cf_gpp_libname=g++
16560         ;;
16561 esac
16562 if test "$GXX" = yes; then
16563         echo "$as_me:16563: checking for lib$cf_gpp_libname" >&5
16564 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16565         cf_save="$LIBS"
16566         LIBS="-l$cf_gpp_libname $LIBS"
16567         cat >conftest.$ac_ext <<_ACEOF
16568 #line 16568 "configure"
16569 #include "confdefs.h"
16570
16571 #include <$cf_gpp_libname/builtin.h>
16572
16573 int
16574 main ()
16575 {
16576 two_arg_error_handler_t foo2 = lib_error_handler
16577   ;
16578   return 0;
16579 }
16580 _ACEOF
16581 rm -f conftest.$ac_objext conftest$ac_exeext
16582 if { (eval echo "$as_me:16582: \"$ac_link\"") >&5
16583   (eval $ac_link) 2>&5
16584   ac_status=$?
16585   echo "$as_me:16585: \$? = $ac_status" >&5
16586   (exit $ac_status); } &&
16587          { ac_try='test -s conftest$ac_exeext'
16588   { (eval echo "$as_me:16588: \"$ac_try\"") >&5
16589   (eval $ac_try) 2>&5
16590   ac_status=$?
16591   echo "$as_me:16591: \$? = $ac_status" >&5
16592   (exit $ac_status); }; }; then
16593   cf_cxx_library=yes
16594          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16595          if test "$cf_gpp_libname" = cpp ; then
16596             cat >>confdefs.h <<\EOF
16597 #define HAVE_GPP_BUILTIN_H 1
16598 EOF
16599
16600          else
16601             cat >>confdefs.h <<\EOF
16602 #define HAVE_GXX_BUILTIN_H 1
16603 EOF
16604
16605          fi
16606 else
16607   echo "$as_me: failed program was:" >&5
16608 cat conftest.$ac_ext >&5
16609 cat >conftest.$ac_ext <<_ACEOF
16610 #line 16610 "configure"
16611 #include "confdefs.h"
16612
16613 #include <builtin.h>
16614
16615 int
16616 main ()
16617 {
16618 two_arg_error_handler_t foo2 = lib_error_handler
16619   ;
16620   return 0;
16621 }
16622 _ACEOF
16623 rm -f conftest.$ac_objext conftest$ac_exeext
16624 if { (eval echo "$as_me:16624: \"$ac_link\"") >&5
16625   (eval $ac_link) 2>&5
16626   ac_status=$?
16627   echo "$as_me:16627: \$? = $ac_status" >&5
16628   (exit $ac_status); } &&
16629          { ac_try='test -s conftest$ac_exeext'
16630   { (eval echo "$as_me:16630: \"$ac_try\"") >&5
16631   (eval $ac_try) 2>&5
16632   ac_status=$?
16633   echo "$as_me:16633: \$? = $ac_status" >&5
16634   (exit $ac_status); }; }; then
16635   cf_cxx_library=yes
16636          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16637          cat >>confdefs.h <<\EOF
16638 #define HAVE_BUILTIN_H 1
16639 EOF
16640
16641 else
16642   echo "$as_me: failed program was:" >&5
16643 cat conftest.$ac_ext >&5
16644 cf_cxx_library=no
16645 fi
16646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16647 fi
16648 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16649         LIBS="$cf_save"
16650         echo "$as_me:16650: result: $cf_cxx_library" >&5
16651 echo "${ECHO_T}$cf_cxx_library" >&6
16652 fi
16653
16654                 ;;
16655         *)
16656                 cf_cxx_library=no
16657                 ;;
16658         esac
16659
16660         ac_ext=cc
16661 ac_cpp='$CXXCPP $CPPFLAGS'
16662 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16663 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16664 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16665 ac_main_return=return
16666 echo "$as_me:16666: checking how to run the C++ preprocessor" >&5
16667 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16668 if test -z "$CXXCPP"; then
16669   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16670   echo $ECHO_N "(cached) $ECHO_C" >&6
16671 else
16672       # Double quotes because CXXCPP needs to be expanded
16673     for CXXCPP in "$CXX -E" "/lib/cpp"
16674     do
16675       ac_preproc_ok=false
16676 for ac_cxx_preproc_warn_flag in '' yes
16677 do
16678   # Use a header file that comes with gcc, so configuring glibc
16679   # with a fresh cross-compiler works.
16680   # On the NeXT, cc -E runs the code through the compiler's parser,
16681   # not just through cpp. "Syntax error" is here to catch this case.
16682   cat >conftest.$ac_ext <<_ACEOF
16683 #line 16683 "configure"
16684 #include "confdefs.h"
16685 #include <assert.h>
16686                      Syntax error
16687 _ACEOF
16688 if { (eval echo "$as_me:16688: \"$ac_cpp conftest.$ac_ext\"") >&5
16689   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16690   ac_status=$?
16691   egrep -v '^ *\+' conftest.er1 >conftest.err
16692   rm -f conftest.er1
16693   cat conftest.err >&5
16694   echo "$as_me:16694: \$? = $ac_status" >&5
16695   (exit $ac_status); } >/dev/null; then
16696   if test -s conftest.err; then
16697     ac_cpp_err=$ac_cxx_preproc_warn_flag
16698   else
16699     ac_cpp_err=
16700   fi
16701 else
16702   ac_cpp_err=yes
16703 fi
16704 if test -z "$ac_cpp_err"; then
16705   :
16706 else
16707   echo "$as_me: failed program was:" >&5
16708   cat conftest.$ac_ext >&5
16709   # Broken: fails on valid input.
16710 continue
16711 fi
16712 rm -f conftest.err conftest.$ac_ext
16713
16714   # OK, works on sane cases.  Now check whether non-existent headers
16715   # can be detected and how.
16716   cat >conftest.$ac_ext <<_ACEOF
16717 #line 16717 "configure"
16718 #include "confdefs.h"
16719 #include <ac_nonexistent.h>
16720 _ACEOF
16721 if { (eval echo "$as_me:16721: \"$ac_cpp conftest.$ac_ext\"") >&5
16722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16723   ac_status=$?
16724   egrep -v '^ *\+' conftest.er1 >conftest.err
16725   rm -f conftest.er1
16726   cat conftest.err >&5
16727   echo "$as_me:16727: \$? = $ac_status" >&5
16728   (exit $ac_status); } >/dev/null; then
16729   if test -s conftest.err; then
16730     ac_cpp_err=$ac_cxx_preproc_warn_flag
16731   else
16732     ac_cpp_err=
16733   fi
16734 else
16735   ac_cpp_err=yes
16736 fi
16737 if test -z "$ac_cpp_err"; then
16738   # Broken: success on invalid input.
16739 continue
16740 else
16741   echo "$as_me: failed program was:" >&5
16742   cat conftest.$ac_ext >&5
16743   # Passes both tests.
16744 ac_preproc_ok=:
16745 break
16746 fi
16747 rm -f conftest.err conftest.$ac_ext
16748
16749 done
16750 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16751 rm -f conftest.err conftest.$ac_ext
16752 if $ac_preproc_ok; then
16753   break
16754 fi
16755
16756     done
16757     ac_cv_prog_CXXCPP=$CXXCPP
16758
16759 fi
16760   CXXCPP=$ac_cv_prog_CXXCPP
16761 else
16762   ac_cv_prog_CXXCPP=$CXXCPP
16763 fi
16764 echo "$as_me:16764: result: $CXXCPP" >&5
16765 echo "${ECHO_T}$CXXCPP" >&6
16766 ac_preproc_ok=false
16767 for ac_cxx_preproc_warn_flag in '' yes
16768 do
16769   # Use a header file that comes with gcc, so configuring glibc
16770   # with a fresh cross-compiler works.
16771   # On the NeXT, cc -E runs the code through the compiler's parser,
16772   # not just through cpp. "Syntax error" is here to catch this case.
16773   cat >conftest.$ac_ext <<_ACEOF
16774 #line 16774 "configure"
16775 #include "confdefs.h"
16776 #include <assert.h>
16777                      Syntax error
16778 _ACEOF
16779 if { (eval echo "$as_me:16779: \"$ac_cpp conftest.$ac_ext\"") >&5
16780   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16781   ac_status=$?
16782   egrep -v '^ *\+' conftest.er1 >conftest.err
16783   rm -f conftest.er1
16784   cat conftest.err >&5
16785   echo "$as_me:16785: \$? = $ac_status" >&5
16786   (exit $ac_status); } >/dev/null; then
16787   if test -s conftest.err; then
16788     ac_cpp_err=$ac_cxx_preproc_warn_flag
16789   else
16790     ac_cpp_err=
16791   fi
16792 else
16793   ac_cpp_err=yes
16794 fi
16795 if test -z "$ac_cpp_err"; then
16796   :
16797 else
16798   echo "$as_me: failed program was:" >&5
16799   cat conftest.$ac_ext >&5
16800   # Broken: fails on valid input.
16801 continue
16802 fi
16803 rm -f conftest.err conftest.$ac_ext
16804
16805   # OK, works on sane cases.  Now check whether non-existent headers
16806   # can be detected and how.
16807   cat >conftest.$ac_ext <<_ACEOF
16808 #line 16808 "configure"
16809 #include "confdefs.h"
16810 #include <ac_nonexistent.h>
16811 _ACEOF
16812 if { (eval echo "$as_me:16812: \"$ac_cpp conftest.$ac_ext\"") >&5
16813   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16814   ac_status=$?
16815   egrep -v '^ *\+' conftest.er1 >conftest.err
16816   rm -f conftest.er1
16817   cat conftest.err >&5
16818   echo "$as_me:16818: \$? = $ac_status" >&5
16819   (exit $ac_status); } >/dev/null; then
16820   if test -s conftest.err; then
16821     ac_cpp_err=$ac_cxx_preproc_warn_flag
16822   else
16823     ac_cpp_err=
16824   fi
16825 else
16826   ac_cpp_err=yes
16827 fi
16828 if test -z "$ac_cpp_err"; then
16829   # Broken: success on invalid input.
16830 continue
16831 else
16832   echo "$as_me: failed program was:" >&5
16833   cat conftest.$ac_ext >&5
16834   # Passes both tests.
16835 ac_preproc_ok=:
16836 break
16837 fi
16838 rm -f conftest.err conftest.$ac_ext
16839
16840 done
16841 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16842 rm -f conftest.err conftest.$ac_ext
16843 if $ac_preproc_ok; then
16844   :
16845 else
16846   { { echo "$as_me:16846: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
16847 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
16848    { (exit 1); exit 1; }; }
16849 fi
16850
16851 ac_ext=cc
16852 ac_cpp='$CXXCPP $CPPFLAGS'
16853 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16854 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16855 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16856 ac_main_return=return
16857
16858 for ac_header in iostream typeinfo
16859 do
16860 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16861 echo "$as_me:16861: checking for $ac_header" >&5
16862 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16863 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16864   echo $ECHO_N "(cached) $ECHO_C" >&6
16865 else
16866   cat >conftest.$ac_ext <<_ACEOF
16867 #line 16867 "configure"
16868 #include "confdefs.h"
16869 #include <$ac_header>
16870 _ACEOF
16871 if { (eval echo "$as_me:16871: \"$ac_cpp conftest.$ac_ext\"") >&5
16872   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16873   ac_status=$?
16874   egrep -v '^ *\+' conftest.er1 >conftest.err
16875   rm -f conftest.er1
16876   cat conftest.err >&5
16877   echo "$as_me:16877: \$? = $ac_status" >&5
16878   (exit $ac_status); } >/dev/null; then
16879   if test -s conftest.err; then
16880     ac_cpp_err=$ac_cxx_preproc_warn_flag
16881   else
16882     ac_cpp_err=
16883   fi
16884 else
16885   ac_cpp_err=yes
16886 fi
16887 if test -z "$ac_cpp_err"; then
16888   eval "$as_ac_Header=yes"
16889 else
16890   echo "$as_me: failed program was:" >&5
16891   cat conftest.$ac_ext >&5
16892   eval "$as_ac_Header=no"
16893 fi
16894 rm -f conftest.err conftest.$ac_ext
16895 fi
16896 echo "$as_me:16896: result: `eval echo '${'$as_ac_Header'}'`" >&5
16897 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16898 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16899   cat >>confdefs.h <<EOF
16900 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16901 EOF
16902
16903 fi
16904 done
16905
16906     if test x"$ac_cv_header_iostream" = xyes ; then
16907         echo "$as_me:16907: checking if iostream uses std-namespace" >&5
16908 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
16909         cat >conftest.$ac_ext <<_ACEOF
16910 #line 16910 "configure"
16911 #include "confdefs.h"
16912
16913 #include <iostream>
16914 using std::endl;
16915 using std::cerr;
16916 int
16917 main ()
16918 {
16919
16920 cerr << "testing" << endl;
16921
16922   ;
16923   return 0;
16924 }
16925 _ACEOF
16926 rm -f conftest.$ac_objext
16927 if { (eval echo "$as_me:16927: \"$ac_compile\"") >&5
16928   (eval $ac_compile) 2>&5
16929   ac_status=$?
16930   echo "$as_me:16930: \$? = $ac_status" >&5
16931   (exit $ac_status); } &&
16932          { ac_try='test -s conftest.$ac_objext'
16933   { (eval echo "$as_me:16933: \"$ac_try\"") >&5
16934   (eval $ac_try) 2>&5
16935   ac_status=$?
16936   echo "$as_me:16936: \$? = $ac_status" >&5
16937   (exit $ac_status); }; }; then
16938   cf_iostream_namespace=yes
16939 else
16940   echo "$as_me: failed program was:" >&5
16941 cat conftest.$ac_ext >&5
16942 cf_iostream_namespace=no
16943 fi
16944 rm -f conftest.$ac_objext conftest.$ac_ext
16945         echo "$as_me:16945: result: $cf_iostream_namespace" >&5
16946 echo "${ECHO_T}$cf_iostream_namespace" >&6
16947         if test "$cf_iostream_namespace" = yes ; then
16948             cat >>confdefs.h <<\EOF
16949 #define IOSTREAM_NAMESPACE 1
16950 EOF
16951
16952         fi
16953     fi
16954
16955 echo "$as_me:16955: checking if we should include stdbool.h" >&5
16956 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16957
16958 if test "${cf_cv_header_stdbool_h+set}" = set; then
16959   echo $ECHO_N "(cached) $ECHO_C" >&6
16960 else
16961
16962         cat >conftest.$ac_ext <<_ACEOF
16963 #line 16963 "configure"
16964 #include "confdefs.h"
16965
16966 int
16967 main ()
16968 {
16969 bool foo = false
16970   ;
16971   return 0;
16972 }
16973 _ACEOF
16974 rm -f conftest.$ac_objext
16975 if { (eval echo "$as_me:16975: \"$ac_compile\"") >&5
16976   (eval $ac_compile) 2>&5
16977   ac_status=$?
16978   echo "$as_me:16978: \$? = $ac_status" >&5
16979   (exit $ac_status); } &&
16980          { ac_try='test -s conftest.$ac_objext'
16981   { (eval echo "$as_me:16981: \"$ac_try\"") >&5
16982   (eval $ac_try) 2>&5
16983   ac_status=$?
16984   echo "$as_me:16984: \$? = $ac_status" >&5
16985   (exit $ac_status); }; }; then
16986   cf_cv_header_stdbool_h=0
16987 else
16988   echo "$as_me: failed program was:" >&5
16989 cat conftest.$ac_ext >&5
16990 cat >conftest.$ac_ext <<_ACEOF
16991 #line 16991 "configure"
16992 #include "confdefs.h"
16993
16994 #ifndef __BEOS__
16995 #include <stdbool.h>
16996 #endif
16997
16998 int
16999 main ()
17000 {
17001 bool foo = false
17002   ;
17003   return 0;
17004 }
17005 _ACEOF
17006 rm -f conftest.$ac_objext
17007 if { (eval echo "$as_me:17007: \"$ac_compile\"") >&5
17008   (eval $ac_compile) 2>&5
17009   ac_status=$?
17010   echo "$as_me:17010: \$? = $ac_status" >&5
17011   (exit $ac_status); } &&
17012          { ac_try='test -s conftest.$ac_objext'
17013   { (eval echo "$as_me:17013: \"$ac_try\"") >&5
17014   (eval $ac_try) 2>&5
17015   ac_status=$?
17016   echo "$as_me:17016: \$? = $ac_status" >&5
17017   (exit $ac_status); }; }; then
17018   cf_cv_header_stdbool_h=1
17019 else
17020   echo "$as_me: failed program was:" >&5
17021 cat conftest.$ac_ext >&5
17022 cf_cv_header_stdbool_h=0
17023 fi
17024 rm -f conftest.$ac_objext conftest.$ac_ext
17025 fi
17026 rm -f conftest.$ac_objext conftest.$ac_ext
17027 fi
17028
17029 if test "$cf_cv_header_stdbool_h" = 1
17030 then    echo "$as_me:17030: result: yes" >&5
17031 echo "${ECHO_T}yes" >&6
17032 else    echo "$as_me:17032: result: no" >&5
17033 echo "${ECHO_T}no" >&6
17034 fi
17035
17036 echo "$as_me:17036: checking for builtin bool type" >&5
17037 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17038
17039 if test "${cf_cv_builtin_bool+set}" = set; then
17040   echo $ECHO_N "(cached) $ECHO_C" >&6
17041 else
17042
17043         cat >conftest.$ac_ext <<_ACEOF
17044 #line 17044 "configure"
17045 #include "confdefs.h"
17046
17047 #include <stdio.h>
17048 #include <sys/types.h>
17049
17050 int
17051 main ()
17052 {
17053 bool x = false
17054   ;
17055   return 0;
17056 }
17057 _ACEOF
17058 rm -f conftest.$ac_objext
17059 if { (eval echo "$as_me:17059: \"$ac_compile\"") >&5
17060   (eval $ac_compile) 2>&5
17061   ac_status=$?
17062   echo "$as_me:17062: \$? = $ac_status" >&5
17063   (exit $ac_status); } &&
17064          { ac_try='test -s conftest.$ac_objext'
17065   { (eval echo "$as_me:17065: \"$ac_try\"") >&5
17066   (eval $ac_try) 2>&5
17067   ac_status=$?
17068   echo "$as_me:17068: \$? = $ac_status" >&5
17069   (exit $ac_status); }; }; then
17070   cf_cv_builtin_bool=1
17071 else
17072   echo "$as_me: failed program was:" >&5
17073 cat conftest.$ac_ext >&5
17074 cf_cv_builtin_bool=0
17075 fi
17076 rm -f conftest.$ac_objext conftest.$ac_ext
17077
17078 fi
17079
17080 if test "$cf_cv_builtin_bool" = 1
17081 then    echo "$as_me:17081: result: yes" >&5
17082 echo "${ECHO_T}yes" >&6
17083 else    echo "$as_me:17083: result: no" >&5
17084 echo "${ECHO_T}no" >&6
17085 fi
17086
17087 echo "$as_me:17087: checking for size of bool" >&5
17088 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17089 if test "${cf_cv_type_of_bool+set}" = set; then
17090   echo $ECHO_N "(cached) $ECHO_C" >&6
17091 else
17092
17093         rm -f cf_test.out
17094         if test "$cross_compiling" = yes; then
17095   cf_cv_type_of_bool=unknown
17096 else
17097   cat >conftest.$ac_ext <<_ACEOF
17098 #line 17098 "configure"
17099 #include "confdefs.h"
17100
17101 #include <stdlib.h>
17102 #include <stdio.h>
17103
17104 #if defined(__cplusplus)
17105
17106 #ifdef HAVE_GXX_BUILTIN_H
17107 #include <g++/builtin.h>
17108 #elif HAVE_GPP_BUILTIN_H
17109 #include <gpp/builtin.h>
17110 #elif HAVE_BUILTIN_H
17111 #include <builtin.h>
17112 #endif
17113
17114 #else
17115
17116 #if $cf_cv_header_stdbool_h
17117 #include <stdbool.h>
17118 #endif
17119
17120 #endif
17121
17122 main()
17123 {
17124         FILE *fp = fopen("cf_test.out", "w");
17125         if (fp != 0) {
17126                 bool x = true;
17127                 if ((bool)(-x) >= 0)
17128                         fputs("unsigned ", fp);
17129                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17130                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17131                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17132                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17133                 fclose(fp);
17134         }
17135         ${cf_cv_main_return:-return}(0);
17136 }
17137
17138 _ACEOF
17139 rm -f conftest$ac_exeext
17140 if { (eval echo "$as_me:17140: \"$ac_link\"") >&5
17141   (eval $ac_link) 2>&5
17142   ac_status=$?
17143   echo "$as_me:17143: \$? = $ac_status" >&5
17144   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17145   { (eval echo "$as_me:17145: \"$ac_try\"") >&5
17146   (eval $ac_try) 2>&5
17147   ac_status=$?
17148   echo "$as_me:17148: \$? = $ac_status" >&5
17149   (exit $ac_status); }; }; then
17150   cf_cv_type_of_bool=`cat cf_test.out`
17151                  if test -z "$cf_cv_type_of_bool"; then
17152                    cf_cv_type_of_bool=unknown
17153                  fi
17154 else
17155   echo "$as_me: program exited with status $ac_status" >&5
17156 echo "$as_me: failed program was:" >&5
17157 cat conftest.$ac_ext >&5
17158 cf_cv_type_of_bool=unknown
17159 fi
17160 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17161 fi
17162
17163 fi
17164
17165         rm -f cf_test.out
17166 echo "$as_me:17166: result: $cf_cv_type_of_bool" >&5
17167 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17168 if test "$cf_cv_type_of_bool" = unknown ; then
17169         case .$NCURSES_BOOL in #(vi
17170         .auto|.) NCURSES_BOOL=unsigned;;
17171         esac
17172         { echo "$as_me:17172: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17173 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17174         cf_cv_type_of_bool=$NCURSES_BOOL
17175 fi
17176
17177 echo "$as_me:17177: checking for special defines needed for etip.h" >&5
17178 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17179 cf_save_CXXFLAGS="$CXXFLAGS"
17180 cf_result="none"
17181 for cf_math in "" MATH_H
17182 do
17183 for cf_excp in "" MATH_EXCEPTION
17184 do
17185         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17186         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17187         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17188 cat >conftest.$ac_ext <<_ACEOF
17189 #line 17189 "configure"
17190 #include "confdefs.h"
17191
17192 #include <etip.h.in>
17193
17194 int
17195 main ()
17196 {
17197
17198   ;
17199   return 0;
17200 }
17201 _ACEOF
17202 rm -f conftest.$ac_objext
17203 if { (eval echo "$as_me:17203: \"$ac_compile\"") >&5
17204   (eval $ac_compile) 2>&5
17205   ac_status=$?
17206   echo "$as_me:17206: \$? = $ac_status" >&5
17207   (exit $ac_status); } &&
17208          { ac_try='test -s conftest.$ac_objext'
17209   { (eval echo "$as_me:17209: \"$ac_try\"") >&5
17210   (eval $ac_try) 2>&5
17211   ac_status=$?
17212   echo "$as_me:17212: \$? = $ac_status" >&5
17213   (exit $ac_status); }; }; then
17214
17215         test -n "$cf_math" && cat >>confdefs.h <<EOF
17216 #define ETIP_NEEDS_${cf_math} 1
17217 EOF
17218
17219         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17220 #define ETIP_NEEDS_${cf_excp} 1
17221 EOF
17222
17223         cf_result="$cf_math $cf_excp"
17224         break
17225
17226 else
17227   echo "$as_me: failed program was:" >&5
17228 cat conftest.$ac_ext >&5
17229 fi
17230 rm -f conftest.$ac_objext conftest.$ac_ext
17231 done
17232 done
17233 echo "$as_me:17233: result: $cf_result" >&5
17234 echo "${ECHO_T}$cf_result" >&6
17235 CXXFLAGS="$cf_save_CXXFLAGS"
17236
17237 if test -n "$CXX"; then
17238 echo "$as_me:17238: checking if $CXX accepts parameter initialization" >&5
17239 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17240 if test "${cf_cv_cpp_param_init+set}" = set; then
17241   echo $ECHO_N "(cached) $ECHO_C" >&6
17242 else
17243
17244         ac_ext=cc
17245 ac_cpp='$CXXCPP $CPPFLAGS'
17246 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17247 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17248 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17249 ac_main_return=return
17250
17251         if test "$cross_compiling" = yes; then
17252   cf_cv_cpp_param_init=unknown
17253 else
17254   cat >conftest.$ac_ext <<_ACEOF
17255 #line 17255 "configure"
17256 #include "confdefs.h"
17257
17258 class TEST {
17259 private:
17260         int value;
17261 public:
17262         TEST(int x = 1);
17263         ~TEST();
17264 };
17265
17266 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17267 {
17268         value = x;
17269 }
17270 void main() { }
17271
17272 _ACEOF
17273 rm -f conftest$ac_exeext
17274 if { (eval echo "$as_me:17274: \"$ac_link\"") >&5
17275   (eval $ac_link) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17279   { (eval echo "$as_me:17279: \"$ac_try\"") >&5
17280   (eval $ac_try) 2>&5
17281   ac_status=$?
17282   echo "$as_me:17282: \$? = $ac_status" >&5
17283   (exit $ac_status); }; }; then
17284   cf_cv_cpp_param_init=yes
17285 else
17286   echo "$as_me: program exited with status $ac_status" >&5
17287 echo "$as_me: failed program was:" >&5
17288 cat conftest.$ac_ext >&5
17289 cf_cv_cpp_param_init=no
17290 fi
17291 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17292 fi
17293         ac_ext=cc
17294 ac_cpp='$CXXCPP $CPPFLAGS'
17295 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17296 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17297 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17298 ac_main_return=return
17299
17300 fi
17301 echo "$as_me:17301: result: $cf_cv_cpp_param_init" >&5
17302 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17303 fi
17304 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17305 #define CPP_HAS_PARAM_INIT 1
17306 EOF
17307
17308 if test -n "$CXX"; then
17309
17310 echo "$as_me:17310: checking if $CXX accepts static_cast" >&5
17311 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17312 if test "${cf_cv_cpp_static_cast+set}" = set; then
17313   echo $ECHO_N "(cached) $ECHO_C" >&6
17314 else
17315
17316         ac_ext=cc
17317 ac_cpp='$CXXCPP $CPPFLAGS'
17318 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17319 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17320 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17321 ac_main_return=return
17322
17323         cat >conftest.$ac_ext <<_ACEOF
17324 #line 17324 "configure"
17325 #include "confdefs.h"
17326
17327 class NCursesPanel
17328 {
17329 public:
17330   NCursesPanel(int nlines,
17331                int ncols,
17332                int begin_y = 0,
17333                int begin_x = 0)
17334   {
17335   }
17336
17337   ~NCursesPanel();
17338 };
17339
17340 template<class T> class NCursesUserPanel : public NCursesPanel
17341 {
17342 public:
17343   NCursesUserPanel (int nlines,
17344                     int ncols,
17345                     int begin_y = 0,
17346                     int begin_x = 0,
17347                     const T* p_UserData = static_cast<T*>(0))
17348     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17349   {
17350   };
17351   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17352   {
17353   };
17354
17355   virtual ~NCursesUserPanel() {};
17356 };
17357
17358 int
17359 main ()
17360 {
17361
17362         const char* p_UserData = static_cast<char*>(0)
17363   ;
17364   return 0;
17365 }
17366 _ACEOF
17367 rm -f conftest.$ac_objext
17368 if { (eval echo "$as_me:17368: \"$ac_compile\"") >&5
17369   (eval $ac_compile) 2>&5
17370   ac_status=$?
17371   echo "$as_me:17371: \$? = $ac_status" >&5
17372   (exit $ac_status); } &&
17373          { ac_try='test -s conftest.$ac_objext'
17374   { (eval echo "$as_me:17374: \"$ac_try\"") >&5
17375   (eval $ac_try) 2>&5
17376   ac_status=$?
17377   echo "$as_me:17377: \$? = $ac_status" >&5
17378   (exit $ac_status); }; }; then
17379   cf_cv_cpp_static_cast=yes
17380 else
17381   echo "$as_me: failed program was:" >&5
17382 cat conftest.$ac_ext >&5
17383 cf_cv_cpp_static_cast=no
17384 fi
17385 rm -f conftest.$ac_objext conftest.$ac_ext
17386
17387         ac_ext=cc
17388 ac_cpp='$CXXCPP $CPPFLAGS'
17389 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17390 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17391 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17392 ac_main_return=return
17393
17394 fi
17395 echo "$as_me:17395: result: $cf_cv_cpp_static_cast" >&5
17396 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17397
17398 fi
17399
17400 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17401 #define CPP_HAS_STATIC_CAST 1
17402 EOF
17403
17404         CXX_AR='$(AR)'
17405         CXX_ARFLAGS='$(ARFLAGS)'
17406         case $cf_cv_system_name in #(vi
17407         irix*) #(vi
17408             if test "$GXX" != yes ; then
17409                 CXX_AR='$(CXX)'
17410                 CXX_ARFLAGS='-ar -o'
17411             fi
17412             ;;
17413         sco3.2v5*) #(vi
17414             CXXLDFLAGS="-u main"
17415             ;;
17416         solaris2*)
17417             if test "$GXX" != yes ; then
17418                 CXX_AR='$(CXX)'
17419                 CXX_ARFLAGS='-xar -o'
17420             fi
17421             ;;
17422         esac
17423
17424 else
17425         cf_cxx_library=no
17426         cf_cv_builtin_bool=1
17427
17428         # Just because we are not configuring against C++ right now does not
17429         # mean that a user will not want to use C++.  Some distributors disable
17430         # the C++ portion of this configuration as a shortcut (or just to avoid
17431         # compiling the demo in the c++ directory).  So we need a reasonable
17432         # default for the 'bool' type.
17433         #
17434         # Caveat: since the storage of the bool type is not standardized, it
17435         # may change.
17436
17437         if test "$NCURSES_BOOL" != auto ; then
17438                 cf_cv_type_of_bool=$NCURSES_BOOL
17439                 cf_cv_header_stdbool_h=0
17440         else
17441                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17442
17443 echo "$as_me:17443: checking for size of bool" >&5
17444 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17445 if test "${cf_cv_type_of_bool+set}" = set; then
17446   echo $ECHO_N "(cached) $ECHO_C" >&6
17447 else
17448
17449         rm -f cf_test.out
17450         if test "$cross_compiling" = yes; then
17451   cf_cv_type_of_bool=unknown
17452 else
17453   cat >conftest.$ac_ext <<_ACEOF
17454 #line 17454 "configure"
17455 #include "confdefs.h"
17456
17457 #include <stdlib.h>
17458 #include <stdio.h>
17459
17460 #if defined(__cplusplus)
17461
17462 #ifdef HAVE_GXX_BUILTIN_H
17463 #include <g++/builtin.h>
17464 #elif HAVE_GPP_BUILTIN_H
17465 #include <gpp/builtin.h>
17466 #elif HAVE_BUILTIN_H
17467 #include <builtin.h>
17468 #endif
17469
17470 #else
17471
17472 #if $cf_cv_header_stdbool_h
17473 #include <stdbool.h>
17474 #endif
17475
17476 #endif
17477
17478 main()
17479 {
17480         FILE *fp = fopen("cf_test.out", "w");
17481         if (fp != 0) {
17482                 bool x = true;
17483                 if ((bool)(-x) >= 0)
17484                         fputs("unsigned ", fp);
17485                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17486                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17487                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17488                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17489                 fclose(fp);
17490         }
17491         ${cf_cv_main_return:-return}(0);
17492 }
17493
17494 _ACEOF
17495 rm -f conftest$ac_exeext
17496 if { (eval echo "$as_me:17496: \"$ac_link\"") >&5
17497   (eval $ac_link) 2>&5
17498   ac_status=$?
17499   echo "$as_me:17499: \$? = $ac_status" >&5
17500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17501   { (eval echo "$as_me:17501: \"$ac_try\"") >&5
17502   (eval $ac_try) 2>&5
17503   ac_status=$?
17504   echo "$as_me:17504: \$? = $ac_status" >&5
17505   (exit $ac_status); }; }; then
17506   cf_cv_type_of_bool=`cat cf_test.out`
17507                  if test -z "$cf_cv_type_of_bool"; then
17508                    cf_cv_type_of_bool=unknown
17509                  fi
17510 else
17511   echo "$as_me: program exited with status $ac_status" >&5
17512 echo "$as_me: failed program was:" >&5
17513 cat conftest.$ac_ext >&5
17514 cf_cv_type_of_bool=unknown
17515 fi
17516 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17517 fi
17518
17519 fi
17520
17521         rm -f cf_test.out
17522 echo "$as_me:17522: result: $cf_cv_type_of_bool" >&5
17523 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17524 if test "$cf_cv_type_of_bool" = unknown ; then
17525         case .$NCURSES_BOOL in #(vi
17526         .auto|.) NCURSES_BOOL=unsigned;;
17527         esac
17528         { echo "$as_me:17528: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17529 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17530         cf_cv_type_of_bool=$NCURSES_BOOL
17531 fi
17532
17533                 else
17534                         echo "$as_me:17534: checking for fallback type of bool" >&5
17535 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17536                         case "$host_cpu" in #(vi
17537                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17538                         *)      cf_cv_type_of_bool=int  ;;
17539                         esac
17540                         echo "$as_me:17540: result: $cf_cv_type_of_bool" >&5
17541 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17542                 fi
17543         fi
17544 fi
17545
17546 # If the C compiler did not declare bool, and we did not determine that the C++
17547 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17548 # ncurses library use the same type as C++ bool.  Note that this allows one to
17549 # specify the type of bool in a configure-script option and postpone
17550 # integration with the C++ compiler provided that the types are compatible.
17551 USE_CXX_BOOL=1
17552 if test $cf_cv_cc_bool_type = 1
17553 then
17554         # oops: C has a bool.  Unlikely, but C++ could differ.
17555         USE_CXX_BOOL=0
17556 elif test $cf_cv_builtin_bool = 0
17557 then
17558         # C++ has no bool
17559         USE_CXX_BOOL=0
17560 else
17561         # this is the normal case
17562         USE_CXX_BOOL='defined(__cplusplus)'
17563 fi
17564
17565 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17566
17567 if test "$cf_with_ada" != "no" ; then
17568     if test "$with_libtool" != "no"; then
17569         { echo "$as_me:17569: WARNING: libtool does not support Ada - disabling feature" >&5
17570 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17571         cf_with_ada=no
17572     fi
17573 fi
17574
17575 if test "$cf_with_ada" != "no" ; then
17576 cf_ada_make=gnatmake
17577 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17578 set dummy $cf_ada_make; ac_word=$2
17579 echo "$as_me:17579: checking for $ac_word" >&5
17580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17581 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17582   echo $ECHO_N "(cached) $ECHO_C" >&6
17583 else
17584   if test -n "$gnat_exists"; then
17585   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17586 else
17587   ac_save_IFS=$IFS; IFS=$ac_path_separator
17588 ac_dummy="$PATH"
17589 for ac_dir in $ac_dummy; do
17590   IFS=$ac_save_IFS
17591   test -z "$ac_dir" && ac_dir=.
17592   $as_executable_p "$ac_dir/$ac_word" || continue
17593 ac_cv_prog_gnat_exists="yes"
17594 echo "$as_me:17594: found $ac_dir/$ac_word" >&5
17595 break
17596 done
17597
17598   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17599 fi
17600 fi
17601 gnat_exists=$ac_cv_prog_gnat_exists
17602 if test -n "$gnat_exists"; then
17603   echo "$as_me:17603: result: $gnat_exists" >&5
17604 echo "${ECHO_T}$gnat_exists" >&6
17605 else
17606   echo "$as_me:17606: result: no" >&5
17607 echo "${ECHO_T}no" >&6
17608 fi
17609
17610 if test "$ac_cv_prog_gnat_exists" = no; then
17611    cf_ada_make=
17612 else
17613
17614 echo "$as_me:17614: checking for gnat version" >&5
17615 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17616 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17617   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17618 echo "$as_me:17618: result: $cf_gnat_version" >&5
17619 echo "${ECHO_T}$cf_gnat_version" >&6
17620
17621 case $cf_gnat_version in
17622   3.1[1-9]*|3.[2-9]*|[4-9].*)
17623     cf_cv_prog_gnat_correct=yes
17624     ;;
17625   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17626      cf_cv_prog_gnat_correct=no
17627      ;;
17628 esac
17629 case $cf_gnat_version in
17630   3.[1-9]*|[4-9].*)
17631       cf_compile_generics=generics
17632       cf_generic_objects="\${GENOBJS}"
17633       ;;
17634   *)  cf_compile_generics=
17635       cf_generic_objects=
17636       ;;
17637 esac
17638
17639    # Extract the first word of "m4", so it can be a program name with args.
17640 set dummy m4; ac_word=$2
17641 echo "$as_me:17641: checking for $ac_word" >&5
17642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17643 if test "${ac_cv_prog_M4_exists+set}" = set; then
17644   echo $ECHO_N "(cached) $ECHO_C" >&6
17645 else
17646   if test -n "$M4_exists"; then
17647   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17648 else
17649   ac_save_IFS=$IFS; IFS=$ac_path_separator
17650 ac_dummy="$PATH"
17651 for ac_dir in $ac_dummy; do
17652   IFS=$ac_save_IFS
17653   test -z "$ac_dir" && ac_dir=.
17654   $as_executable_p "$ac_dir/$ac_word" || continue
17655 ac_cv_prog_M4_exists="yes"
17656 echo "$as_me:17656: found $ac_dir/$ac_word" >&5
17657 break
17658 done
17659
17660   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17661 fi
17662 fi
17663 M4_exists=$ac_cv_prog_M4_exists
17664 if test -n "$M4_exists"; then
17665   echo "$as_me:17665: result: $M4_exists" >&5
17666 echo "${ECHO_T}$M4_exists" >&6
17667 else
17668   echo "$as_me:17668: result: no" >&5
17669 echo "${ECHO_T}no" >&6
17670 fi
17671
17672    if test "$ac_cv_prog_M4_exists" = no; then
17673       cf_cv_prog_gnat_correct=no
17674       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17675    fi
17676    if test "$cf_cv_prog_gnat_correct" = yes; then
17677       echo "$as_me:17677: checking if GNAT works" >&5
17678 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17679
17680 rm -f conftest*
17681 cat >>conftest.ads <<CF_EOF
17682 procedure conftest;
17683 CF_EOF
17684 cat >>conftest.adb <<CF_EOF
17685 with Text_IO;
17686 with GNAT.OS_Lib;
17687 procedure conftest is
17688 begin
17689    Text_IO.Put ("Hello World");
17690    Text_IO.New_Line;
17691    GNAT.OS_Lib.OS_Exit (0);
17692 end conftest;
17693 CF_EOF
17694 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17695    if ( ./conftest 1>&5 2>&1 ) ; then
17696       cf_cv_prog_gnat_correct=yes
17697    else
17698       cf_cv_prog_gnat_correct=no
17699    fi
17700 else
17701    cf_cv_prog_gnat_correct=no
17702 fi
17703 rm -f conftest*
17704
17705       echo "$as_me:17705: result: $cf_cv_prog_gnat_correct" >&5
17706 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17707    fi
17708 fi
17709 if test "$cf_cv_prog_gnat_correct" = yes; then
17710    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17711
17712    echo "$as_me:17712: checking if GNAT pragma Unreferenced works" >&5
17713 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17714
17715 rm -f conftest*
17716 cat >>conftest.ads <<CF_EOF
17717 procedure conftest;
17718 CF_EOF
17719 cat >>conftest.adb <<CF_EOF
17720 with Text_IO;
17721 with GNAT.OS_Lib;
17722 procedure conftest is
17723    test : Integer;
17724    pragma Unreferenced (test);
17725 begin
17726    test := 1;
17727    Text_IO.Put ("Hello World");
17728    Text_IO.New_Line;
17729    GNAT.OS_Lib.OS_Exit (0);
17730 end conftest;
17731 CF_EOF
17732 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17733       cf_cv_pragma_unreferenced=yes
17734 else
17735    cf_cv_pragma_unreferenced=no
17736 fi
17737 rm -f conftest*
17738
17739    echo "$as_me:17739: result: $cf_cv_pragma_unreferenced" >&5
17740 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17741
17742    # if the pragma is supported, use it (needed in the Trace code).
17743    if test $cf_cv_pragma_unreferenced = yes ; then
17744       PRAGMA_UNREF=TRUE
17745    else
17746       PRAGMA_UNREF=FALSE
17747    fi
17748
17749 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17750 if test "${with_ada_compiler+set}" = set; then
17751   withval="$with_ada_compiler"
17752   cf_ada_compiler=$withval
17753 else
17754   cf_ada_compiler=gnatmake
17755 fi;
17756
17757    cf_ada_package=terminal_interface
17758
17759 # Check whether --with-ada-include or --without-ada-include was given.
17760 if test "${with_ada_include+set}" = set; then
17761   withval="$with_ada_include"
17762
17763 else
17764   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
17765 fi; if test -n "$prefix/lib/ada/adainclude" ; then
17766
17767 if test "x$prefix" != xNONE; then
17768   cf_path_syntax="$prefix"
17769 else
17770   cf_path_syntax="$ac_default_prefix"
17771 fi
17772
17773 case ".$withval" in #(vi
17774 .\$\(*\)*|.\'*\'*) #(vi
17775   ;;
17776 ..|./*|.\\*) #(vi
17777   ;;
17778 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17779   ;;
17780 .\${*prefix}*) #(vi
17781   eval withval="$withval"
17782   case ".$withval" in #(vi
17783   .NONE/*)
17784     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17785     ;;
17786   esac
17787   ;; #(vi
17788 .no|.NONE/*)
17789   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17790   ;;
17791 *)
17792   { { echo "$as_me:17792: error: expected a pathname, not \"$withval\"" >&5
17793 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17794    { (exit 1); exit 1; }; }
17795   ;;
17796 esac
17797
17798 fi
17799 ADA_INCLUDE="$withval"
17800
17801 # Check whether --with-ada-objects or --without-ada-objects was given.
17802 if test "${with_ada_objects+set}" = set; then
17803   withval="$with_ada_objects"
17804
17805 else
17806   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
17807 fi; if test -n "$prefix/lib/ada/adalib" ; then
17808
17809 if test "x$prefix" != xNONE; then
17810   cf_path_syntax="$prefix"
17811 else
17812   cf_path_syntax="$ac_default_prefix"
17813 fi
17814
17815 case ".$withval" in #(vi
17816 .\$\(*\)*|.\'*\'*) #(vi
17817   ;;
17818 ..|./*|.\\*) #(vi
17819   ;;
17820 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17821   ;;
17822 .\${*prefix}*) #(vi
17823   eval withval="$withval"
17824   case ".$withval" in #(vi
17825   .NONE/*)
17826     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17827     ;;
17828   esac
17829   ;; #(vi
17830 .no|.NONE/*)
17831   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17832   ;;
17833 *)
17834   { { echo "$as_me:17834: error: expected a pathname, not \"$withval\"" >&5
17835 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17836    { (exit 1); exit 1; }; }
17837   ;;
17838 esac
17839
17840 fi
17841 ADA_OBJECTS="$withval"
17842
17843 fi
17844 fi
17845 else
17846    cf_with_ada=no
17847 fi
17848
17849 ### Construct the ncurses library-subsets, if any, from this set of keywords:
17850 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
17851 ###
17852 ### ticlib modules may be a separate library, otherwise contained in termlib.
17853 ### termlib modules may be a separate library, otherwise contained in ncurses.
17854 ###
17855 ### The of "+" or " " between the tokens controls the way the script
17856 ### chooses to split module lists into libraries.
17857 ###
17858 ### (see CF_LIB_RULES).
17859 echo "$as_me:17859: checking for library subsets" >&5
17860 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
17861 LIB_SUBSETS=
17862
17863 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
17864         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
17865         if test "$with_ticlib" != no ; then
17866                 LIB_SUBSETS="${LIB_SUBSETS} "
17867         else
17868                 LIB_SUBSETS="${LIB_SUBSETS}+"
17869         fi
17870 fi
17871
17872 LIB_SUBSETS="${LIB_SUBSETS}termlib"
17873 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
17874
17875 if test "$with_termlib" != no ; then
17876         LIB_SUBSETS="${LIB_SUBSETS} "
17877 else
17878         LIB_SUBSETS="${LIB_SUBSETS}+"
17879 fi
17880
17881 LIB_SUBSETS="${LIB_SUBSETS}base"
17882
17883 # Most term-driver calls are to tinfo, but some like init_pair are to the
17884 # base library (so it resides in base).
17885 if test "$with_term_driver" != no ; then
17886         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
17887         case $cf_cv_system_name in #(vi
17888         *mingw32*) #(vi
17889                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
17890                 ;;
17891         *) #(vi
17892                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
17893                 ;;
17894         esac
17895 fi
17896
17897 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
17898 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
17899
17900 echo "$as_me:17900: result: $LIB_SUBSETS" >&5
17901 echo "${ECHO_T}$LIB_SUBSETS" >&6
17902
17903 ### Construct the list of include-directories to be generated
17904
17905 CPPFLAGS="$CPPFLAGS -I. -I../include"
17906 if test "$srcdir" != "."; then
17907         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
17908 fi
17909 if test "$GCC" != yes; then
17910         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17911 elif test "$includedir" != "/usr/include"; then
17912         if test "$includedir" = '${prefix}/include' ; then
17913                 if test $prefix != /usr ; then
17914                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17915                 fi
17916         else
17917                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
17918         fi
17919 fi
17920
17921 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17922 if test "$srcdir" != "."; then
17923         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17924 fi
17925 if test "$GCC" != yes; then
17926         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17927 elif test "$includedir" != "/usr/include"; then
17928         if test "$includedir" = '${prefix}/include' ; then
17929                 if test $prefix != /usr ; then
17930                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17931                 fi
17932         else
17933                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17934         fi
17935 fi
17936
17937 ### Build up pieces for makefile rules
17938 echo "$as_me:17938: checking default library suffix" >&5
17939 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17940
17941         case $DFT_LWR_MODEL in
17942         libtool) DFT_ARG_SUFFIX=''   ;;
17943         normal)  DFT_ARG_SUFFIX=''   ;;
17944         debug)   DFT_ARG_SUFFIX='_g' ;;
17945         profile) DFT_ARG_SUFFIX='_p' ;;
17946         shared)  DFT_ARG_SUFFIX=''   ;;
17947         esac
17948         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17949 echo "$as_me:17949: result: $DFT_ARG_SUFFIX" >&5
17950 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17951
17952 echo "$as_me:17952: checking default library-dependency suffix" >&5
17953 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17954
17955         case $DFT_LWR_MODEL in #(vi
17956         libtool) #(vi
17957                 DFT_LIB_SUFFIX='.la'
17958                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17959                 ;;
17960         normal) #(vi
17961                 DFT_LIB_SUFFIX='.a'
17962                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17963                 ;;
17964         debug) #(vi
17965                 DFT_LIB_SUFFIX='_g.a'
17966                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17967                 ;;
17968         profile) #(vi
17969                 DFT_LIB_SUFFIX='_p.a'
17970                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17971                 ;;
17972         shared) #(vi
17973                 case $cf_cv_system_name in
17974                 aix[56]*) #(vi
17975                         DFT_LIB_SUFFIX='.a'
17976                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17977                         ;;
17978                 cygwin*) #(vi
17979                         DFT_LIB_SUFFIX='.dll'
17980                         DFT_DEP_SUFFIX='.dll.a'
17981                         ;;
17982                 darwin*) #(vi
17983                         DFT_LIB_SUFFIX='.dylib'
17984                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17985                         ;;
17986                 hpux*) #(vi
17987                         case $target in
17988                         ia64*) #(vi
17989                                 DFT_LIB_SUFFIX='.so'
17990                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17991                                 ;;
17992                         *) #(vi
17993                                 DFT_LIB_SUFFIX='.sl'
17994                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17995                                 ;;
17996                         esac
17997                         ;;
17998                 *)      DFT_LIB_SUFFIX='.so'
17999                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18000                         ;;
18001                 esac
18002         esac
18003         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18004         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18005 echo "$as_me:18005: result: $DFT_DEP_SUFFIX" >&5
18006 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18007
18008 echo "$as_me:18008: checking default object directory" >&5
18009 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18010
18011         case $DFT_LWR_MODEL in
18012         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18013         normal)  DFT_OBJ_SUBDIR='objects' ;;
18014         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18015         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18016         shared)
18017                 case $cf_cv_system_name in #(vi
18018                 cygwin) #(vi
18019                         DFT_OBJ_SUBDIR='objects' ;;
18020                 *)
18021                         DFT_OBJ_SUBDIR='obj_s' ;;
18022                 esac
18023         esac
18024 echo "$as_me:18024: result: $DFT_OBJ_SUBDIR" >&5
18025 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18026
18027 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18028 if test "$cf_with_cxx" = yes ; then
18029 echo "$as_me:18029: checking c++ library-dependency suffix" >&5
18030 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18031 if test "$with_libtool" != "no"; then
18032         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18033 else
18034
18035         case normal in #(vi
18036         libtool) #(vi
18037                 CXX_LIB_SUFFIX='.la'
18038                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18039                 ;;
18040         normal) #(vi
18041                 CXX_LIB_SUFFIX='.a'
18042                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18043                 ;;
18044         debug) #(vi
18045                 CXX_LIB_SUFFIX='_g.a'
18046                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18047                 ;;
18048         profile) #(vi
18049                 CXX_LIB_SUFFIX='_p.a'
18050                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18051                 ;;
18052         shared) #(vi
18053                 case $cf_cv_system_name in
18054                 aix[56]*) #(vi
18055                         CXX_LIB_SUFFIX='.a'
18056                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18057                         ;;
18058                 cygwin*) #(vi
18059                         CXX_LIB_SUFFIX='.dll'
18060                         CXX_DEP_SUFFIX='.dll.a'
18061                         ;;
18062                 darwin*) #(vi
18063                         CXX_LIB_SUFFIX='.dylib'
18064                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18065                         ;;
18066                 hpux*) #(vi
18067                         case $target in
18068                         ia64*) #(vi
18069                                 CXX_LIB_SUFFIX='.so'
18070                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18071                                 ;;
18072                         *) #(vi
18073                                 CXX_LIB_SUFFIX='.sl'
18074                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18075                                 ;;
18076                         esac
18077                         ;;
18078                 *)      CXX_LIB_SUFFIX='.so'
18079                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18080                         ;;
18081                 esac
18082         esac
18083         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18084         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18085 fi
18086 echo "$as_me:18086: result: $CXX_LIB_SUFFIX" >&5
18087 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18088
18089 fi
18090
18091 # do not want -ldl in build except as needed for -lncurses dependency
18092 if test "$with_dlsym" = yes ; then
18093 if test $DFT_LWR_MODEL = shared || \
18094    test $DFT_LWR_MODEL = libtool ; then
18095
18096 # remove dl library from $LIBS
18097 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18098
18099 fi
18100 fi
18101 ### Set up low-level terminfo dependencies for makefiles.
18102
18103 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18104 # do not need libdl
18105 TICS_LIST=
18106 if test "$with_dlsym" = yes ; then
18107
18108 # remove dl library from $SHLIB_LIST
18109 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18110
18111 fi
18112
18113 if test "$with_ticlib" != no ; then
18114
18115         if test "$with_ticlib" != yes ; then
18116                 TICS_NAME=$with_ticlib
18117                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18118                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18119                 TICS_LIB_SUFFIX="${with_ticlib}"
18120         else
18121                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18122                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18123                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18124         fi
18125         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18126 else
18127         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18128 fi
18129
18130 if test "$with_termlib" != no ; then
18131
18132         if test "$with_termlib" != yes ; then
18133                 TINFO_NAME=$with_termlib
18134                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18135                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18136                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18137                 TINFO_LIB_SUFFIX="${with_termlib}"
18138         else
18139                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18140                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18141                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18142                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18143         fi
18144
18145         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18146         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18147         if test "$DFT_LWR_MODEL" = "libtool"; then
18148                 TEST_ARGS="${TEST_DEPS}"
18149                 TEST_ARG2="${TEST_DEP2}"
18150                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18151                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18152                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18153         else
18154                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18155                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18156                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18157                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18158                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18159         fi
18160 else
18161         # the next lines are needed for linking libtic over libncurses
18162         TINFO_NAME=${LIB_NAME}
18163         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18164         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18165         if test "$with_tic_depends" = yes ; then
18166                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18167         else
18168                 TICS_LIST="$SHLIB_LIST"
18169         fi
18170
18171         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18172 fi
18173
18174 if test "$DFT_LWR_MODEL" = shared ; then
18175         case $cf_cv_system_name in #(vi
18176         cygwin*)
18177                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18178                 TINFO_SUFFIX=.dll
18179                 ;;
18180         esac
18181 fi
18182
18183 if test "$with_dlsym" = yes ; then
18184
18185 # remove dl library from $TICS_LIST
18186 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18187
18188 fi
18189
18190 if test "$DFT_LWR_MODEL" = "libtool"; then
18191     OBJEXT=lo
18192 fi
18193
18194 # needed for Ada95
18195 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18196
18197 case $DFT_LWR_MODEL in
18198 normal|debug|profile)
18199
18200 if test "$GCC" = yes ; then
18201         case $cf_cv_system_name in #(
18202         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18203                 LDFLAGS_STATIC=
18204                 LDFLAGS_SHARED=
18205                 ;;
18206     *)  #( normally, except when broken
18207         LDFLAGS_STATIC=-static
18208         LDFLAGS_SHARED=-dynamic
18209         ;;
18210     esac
18211 else
18212         case $cf_cv_system_name in #(
18213         aix[456]*)      #( from ld manpage
18214                 LDFLAGS_STATIC=-bstatic
18215                 LDFLAGS_SHARED=-bdynamic
18216                 ;;
18217         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18218                 # We could also use just "archive" and "shared".
18219                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18220                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18221                 ;;
18222         irix*)          #( from ld manpage IRIX64
18223                 LDFLAGS_STATIC=-Bstatic
18224                 LDFLAGS_SHARED=-Bdynamic
18225                 ;;
18226         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18227                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18228                 LDFLAGS_STATIC=-noso
18229                 LDFLAGS_SHARED=-so_archive
18230                 ;;
18231         solaris2*)
18232                 LDFLAGS_STATIC=-Bstatic
18233                 LDFLAGS_SHARED=-Bdynamic
18234                 ;;
18235         esac
18236 fi
18237
18238         ;;
18239 esac
18240
18241 echo "$as_me:18241: checking where we will install curses.h" >&5
18242 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18243 test "$with_overwrite" = no && \
18244 test "x$includedir" = 'x${prefix}/include' && \
18245         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18246 echo "$as_me:18246: result: $includedir" >&5
18247 echo "${ECHO_T}$includedir" >&6
18248
18249 ### Resolve a conflict between normal and wide-curses by forcing applications
18250 ### that will need libutf8 to add it to their configure script.
18251 if test "$with_overwrite" != no ; then
18252 if test "$NCURSES_LIBUTF8" = 1 ; then
18253         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18254         { echo "$as_me:18254: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18255 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18256 fi
18257 fi
18258 WITH_OVERWRITE=$with_overwrite
18259
18260 # used to separate tack out of the tree
18261 NCURSES_TREE=
18262
18263 ### predefined stuff for the test programs
18264 cat >>confdefs.h <<\EOF
18265 #define HAVE_SLK_COLOR 1
18266 EOF
18267
18268 ### Construct the list of subdirectories for which we'll customize makefiles
18269 ### with the appropriate compile-rules.
18270
18271 echo "$as_me:18271: checking for src modules" >&5
18272 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18273
18274 # dependencies and linker-arguments for test-programs
18275 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18276 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18277 if test "$DFT_LWR_MODEL" = "libtool"; then
18278         TEST_ARGS="${TEST_DEPS}"
18279         TEST_ARG2="${TEST_DEP2}"
18280 else
18281         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18282         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18283 fi
18284
18285 cf_cv_src_modules=
18286 for cf_dir in $modules_to_build
18287 do
18288         if test -f $srcdir/$cf_dir/modules; then
18289
18290                 # We may/may not have tack in the distribution, though the
18291                 # makefile is.
18292                 if test $cf_dir = tack ; then
18293                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18294                                 continue
18295                         fi
18296                 fi
18297
18298                 if test -z "$cf_cv_src_modules"; then
18299                         cf_cv_src_modules=$cf_dir
18300                 else
18301                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18302                 fi
18303
18304                 # Make the ncurses_cfg.h file record the library interface files as
18305                 # well.  These are header files that are the same name as their
18306                 # directory.  Ncurses is the only library that does not follow
18307                 # that pattern.
18308                 if test $cf_dir = tack ; then
18309                         continue
18310                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18311
18312 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18313
18314                         cat >>confdefs.h <<EOF
18315 #define HAVE_${cf_have_include}_H 1
18316 EOF
18317
18318                         cat >>confdefs.h <<EOF
18319 #define HAVE_LIB${cf_have_include} 1
18320 EOF
18321
18322                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18323                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18324                         if test "$DFT_LWR_MODEL" = "libtool"; then
18325                                 TEST_ARGS="${TEST_DEPS}"
18326                                 TEST_ARG2="${TEST_DEP2}"
18327                         else
18328                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18329                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18330                         fi
18331                 fi
18332         fi
18333 done
18334 echo "$as_me:18334: result: $cf_cv_src_modules" >&5
18335 echo "${ECHO_T}$cf_cv_src_modules" >&6
18336
18337 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18338 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18339
18340 SRC_SUBDIRS=
18341 if test "x$cf_with_manpages" != xno ; then
18342         SRC_SUBDIRS="$SRC_SUBDIRS man"
18343 fi
18344 SRC_SUBDIRS="$SRC_SUBDIRS include"
18345 for cf_dir in $cf_cv_src_modules
18346 do
18347         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18348 done
18349 SRC_SUBDIRS="$SRC_SUBDIRS test"
18350 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18351 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18352
18353 ADA_SUBDIRS=
18354 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18355         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18356         ADA_SUBDIRS="gen src samples"
18357 fi
18358
18359 SUB_MAKEFILES=
18360 for cf_dir in $SRC_SUBDIRS
18361 do
18362         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18363 done
18364
18365 if test -n "$ADA_SUBDIRS"; then
18366         for cf_dir in $ADA_SUBDIRS
18367         do
18368                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18369         done
18370
18371 fi
18372
18373 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18374    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18375    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18376 fi
18377
18378 DIRS_TO_MAKE="lib"
18379 for cf_item in $cf_list_models
18380 do
18381
18382         case $cf_item in
18383         libtool) cf_subdir='obj_lo'  ;;
18384         normal)  cf_subdir='objects' ;;
18385         debug)   cf_subdir='obj_g' ;;
18386         profile) cf_subdir='obj_p' ;;
18387         shared)
18388                 case $cf_cv_system_name in #(vi
18389                 cygwin) #(vi
18390                         cf_subdir='objects' ;;
18391                 *)
18392                         cf_subdir='obj_s' ;;
18393                 esac
18394         esac
18395
18396         for cf_item2 in $DIRS_TO_MAKE
18397         do
18398                 test $cf_item2 = $cf_subdir && break
18399         done
18400         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18401 done
18402 for cf_dir in $DIRS_TO_MAKE
18403 do
18404         test ! -d $cf_dir && mkdir $cf_dir
18405 done
18406
18407 # symbols that differ when compiling Ada95 by itself.
18408 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18409
18410 NCURSES_COPY2='sh $(top_srcdir)/tar-copy.sh'
18411
18412 # values to use as strings
18413 cat >>confdefs.h <<EOF
18414 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18415 EOF
18416
18417 cat >>confdefs.h <<EOF
18418 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18419 EOF
18420
18421 ### Now that we're done running tests, add the compiler-warnings, if any
18422
18423 cf_fix_cppflags=no
18424 cf_new_cflags=
18425 cf_new_cppflags=
18426 cf_new_extra_cppflags=
18427
18428 for cf_add_cflags in $EXTRA_CFLAGS
18429 do
18430 case $cf_fix_cppflags in
18431 no)
18432         case $cf_add_cflags in #(vi
18433         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18434                 case $cf_add_cflags in
18435                 -D*)
18436                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18437
18438                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18439                                 && test -z "${cf_tst_cflags}" \
18440                                 && cf_fix_cppflags=yes
18441
18442                         if test $cf_fix_cppflags = yes ; then
18443                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18444                                 continue
18445                         elif test "${cf_tst_cflags}" = "\"'" ; then
18446                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18447                                 continue
18448                         fi
18449                         ;;
18450                 esac
18451                 case "$CPPFLAGS" in
18452                 *$cf_add_cflags) #(vi
18453                         ;;
18454                 *) #(vi
18455                         case $cf_add_cflags in #(vi
18456                         -D*)
18457                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18458
18459 CPPFLAGS=`echo "$CPPFLAGS" | \
18460         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18461                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18462
18463                                 ;;
18464                         esac
18465                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18466                         ;;
18467                 esac
18468                 ;;
18469         *)
18470                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18471                 ;;
18472         esac
18473         ;;
18474 yes)
18475         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18476
18477         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18478
18479         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18480                 && test -z "${cf_tst_cflags}" \
18481                 && cf_fix_cppflags=no
18482         ;;
18483 esac
18484 done
18485
18486 if test -n "$cf_new_cflags" ; then
18487
18488         CFLAGS="$CFLAGS $cf_new_cflags"
18489 fi
18490
18491 if test -n "$cf_new_cppflags" ; then
18492
18493         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18494 fi
18495
18496 if test -n "$cf_new_extra_cppflags" ; then
18497
18498         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18499 fi
18500
18501 ### If we're building with rpath, try to link non-standard libs that way too.
18502 if test "$DFT_LWR_MODEL" = "shared"; then
18503
18504 echo "$as_me:18504: checking if rpath should be not be set" >&5
18505 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
18506
18507 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
18508 if test "${enable_rpath_hack+set}" = set; then
18509   enableval="$enable_rpath_hack"
18510   test "$enableval" != no && enableval=yes
18511   if test "$enableval" != "yes" ; then
18512     cf_disable_rpath_hack=yes
18513   else
18514     cf_disable_rpath_hack=no
18515   fi
18516 else
18517   enableval=yes
18518   cf_disable_rpath_hack=no
18519
18520 fi;
18521 echo "$as_me:18521: result: $cf_disable_rpath_hack" >&5
18522 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
18523 if test "$cf_disable_rpath_hack" = no ; then
18524
18525 echo "$as_me:18525: checking for updated LDFLAGS" >&5
18526 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18527 if test -n "$LD_RPATH_OPT" ; then
18528         echo "$as_me:18528: result: maybe" >&5
18529 echo "${ECHO_T}maybe" >&6
18530
18531         for ac_prog in ldd
18532 do
18533   # Extract the first word of "$ac_prog", so it can be a program name with args.
18534 set dummy $ac_prog; ac_word=$2
18535 echo "$as_me:18535: checking for $ac_word" >&5
18536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18537 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
18538   echo $ECHO_N "(cached) $ECHO_C" >&6
18539 else
18540   if test -n "$cf_ldd_prog"; then
18541   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
18542 else
18543   ac_save_IFS=$IFS; IFS=$ac_path_separator
18544 ac_dummy="$PATH"
18545 for ac_dir in $ac_dummy; do
18546   IFS=$ac_save_IFS
18547   test -z "$ac_dir" && ac_dir=.
18548   $as_executable_p "$ac_dir/$ac_word" || continue
18549 ac_cv_prog_cf_ldd_prog="$ac_prog"
18550 echo "$as_me:18550: found $ac_dir/$ac_word" >&5
18551 break
18552 done
18553
18554 fi
18555 fi
18556 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
18557 if test -n "$cf_ldd_prog"; then
18558   echo "$as_me:18558: result: $cf_ldd_prog" >&5
18559 echo "${ECHO_T}$cf_ldd_prog" >&6
18560 else
18561   echo "$as_me:18561: result: no" >&5
18562 echo "${ECHO_T}no" >&6
18563 fi
18564
18565   test -n "$cf_ldd_prog" && break
18566 done
18567 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
18568
18569         cf_rpath_list="/usr/lib /lib"
18570         if test "$cf_ldd_prog" != no
18571         then
18572 cat >conftest.$ac_ext <<_ACEOF
18573 #line 18573 "configure"
18574 #include "confdefs.h"
18575 #include <stdio.h>
18576 int
18577 main ()
18578 {
18579 printf("Hello");
18580   ;
18581   return 0;
18582 }
18583 _ACEOF
18584 rm -f conftest.$ac_objext conftest$ac_exeext
18585 if { (eval echo "$as_me:18585: \"$ac_link\"") >&5
18586   (eval $ac_link) 2>&5
18587   ac_status=$?
18588   echo "$as_me:18588: \$? = $ac_status" >&5
18589   (exit $ac_status); } &&
18590          { ac_try='test -s conftest$ac_exeext'
18591   { (eval echo "$as_me:18591: \"$ac_try\"") >&5
18592   (eval $ac_try) 2>&5
18593   ac_status=$?
18594   echo "$as_me:18594: \$? = $ac_status" >&5
18595   (exit $ac_status); }; }; then
18596   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
18597 else
18598   echo "$as_me: failed program was:" >&5
18599 cat conftest.$ac_ext >&5
18600 fi
18601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18602         fi
18603
18604         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18605
18606 echo "${as_me-configure}:18606: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18607
18608 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
18609
18610 echo "${as_me-configure}:18610: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18611
18612 cf_rpath_dst=
18613 for cf_rpath_src in $LDFLAGS
18614 do
18615         case $cf_rpath_src in #(vi
18616         -L*) #(vi
18617
18618                 # check if this refers to a directory which we will ignore
18619                 cf_rpath_skip=no
18620                 if test -n "$cf_rpath_list"
18621                 then
18622                         for cf_rpath_item in $cf_rpath_list
18623                         do
18624                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18625                                 then
18626                                         cf_rpath_skip=yes
18627                                         break
18628                                 fi
18629                         done
18630                 fi
18631
18632                 if test "$cf_rpath_skip" = no
18633                 then
18634                         # transform the option
18635                         if test "$LD_RPATH_OPT" = "-R " ; then
18636                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18637                         else
18638                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18639                         fi
18640
18641                         # if we have not already added this, add it now
18642                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18643                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18644                         then
18645                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18646
18647 echo "${as_me-configure}:18647: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18648
18649                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18650                         fi
18651                 fi
18652                 ;;
18653         esac
18654         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18655 done
18656 LDFLAGS=$cf_rpath_dst
18657
18658 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
18659
18660 echo "${as_me-configure}:18660: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18661
18662 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
18663
18664 echo "${as_me-configure}:18664: testing ...checking LIBS $LIBS ..." 1>&5
18665
18666 cf_rpath_dst=
18667 for cf_rpath_src in $LIBS
18668 do
18669         case $cf_rpath_src in #(vi
18670         -L*) #(vi
18671
18672                 # check if this refers to a directory which we will ignore
18673                 cf_rpath_skip=no
18674                 if test -n "$cf_rpath_list"
18675                 then
18676                         for cf_rpath_item in $cf_rpath_list
18677                         do
18678                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18679                                 then
18680                                         cf_rpath_skip=yes
18681                                         break
18682                                 fi
18683                         done
18684                 fi
18685
18686                 if test "$cf_rpath_skip" = no
18687                 then
18688                         # transform the option
18689                         if test "$LD_RPATH_OPT" = "-R " ; then
18690                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18691                         else
18692                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18693                         fi
18694
18695                         # if we have not already added this, add it now
18696                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18697                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18698                         then
18699                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18700
18701 echo "${as_me-configure}:18701: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18702
18703                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18704                         fi
18705                 fi
18706                 ;;
18707         esac
18708         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18709 done
18710 LIBS=$cf_rpath_dst
18711
18712 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
18713
18714 echo "${as_me-configure}:18714: testing ...checked LIBS $LIBS ..." 1>&5
18715
18716         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18717
18718 echo "${as_me-configure}:18718: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18719
18720 fi
18721
18722 fi
18723
18724 fi
18725
18726 ### Define substitutions for header files to avoid name-pollution
18727
18728 if test "$cf_cv_have_tcgetattr" = yes ; then
18729         HAVE_TCGETATTR=1
18730 else
18731         HAVE_TCGETATTR=0
18732 fi
18733
18734 if test "$ac_cv_header_termio_h" = yes ; then
18735         HAVE_TERMIO_H=1
18736 else
18737         HAVE_TERMIO_H=0
18738 fi
18739
18740 if test "$ac_cv_header_termios_h" = yes ; then
18741         HAVE_TERMIOS_H=1
18742 else
18743         HAVE_TERMIOS_H=0
18744 fi
18745
18746 ################################################################################
18747 test "$use_database" = yes && \
18748 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18749
18750 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18751 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18752
18753 if test x"$enable_pc_files" = xyes ; then \
18754 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18755 MAKE_PC_FILES=
18756 else
18757 MAKE_PC_FILES="#"
18758 fi
18759
18760 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
18761 ac_config_commands="$ac_config_commands default"
18762 cat >confcache <<\_ACEOF
18763 # This file is a shell script that caches the results of configure
18764 # tests run on this system so they can be shared between configure
18765 # scripts and configure runs, see configure's option --config-cache.
18766 # It is not useful on other systems.  If it contains results you don't
18767 # want to keep, you may remove or edit it.
18768 #
18769 # config.status only pays attention to the cache file if you give it
18770 # the --recheck option to rerun configure.
18771 #
18772 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18773 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18774 # following values.
18775
18776 _ACEOF
18777
18778 # The following way of writing the cache mishandles newlines in values,
18779 # but we know of no workaround that is simple, portable, and efficient.
18780 # So, don't put newlines in cache variables' values.
18781 # Ultrix sh set writes to stderr and can't be redirected directly,
18782 # and sets the high bit in the cache file unless we assign to the vars.
18783 {
18784   (set) 2>&1 |
18785     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18786     *ac_space=\ *)
18787       # `set' does not quote correctly, so add quotes (double-quote
18788       # substitution turns \\\\ into \\, and sed turns \\ into \).
18789       sed -n \
18790         "s/'/'\\\\''/g;
18791           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18792       ;;
18793     *)
18794       # `set' quotes correctly as required by POSIX, so do not add quotes.
18795       sed -n \
18796         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18797       ;;
18798     esac;
18799 } |
18800   sed '
18801      t clear
18802      : clear
18803      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18804      t end
18805      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18806      : end' >>confcache
18807 if cmp -s $cache_file confcache; then :; else
18808   if test -w $cache_file; then
18809     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18810     cat confcache >$cache_file
18811   else
18812     echo "not updating unwritable cache $cache_file"
18813   fi
18814 fi
18815 rm -f confcache
18816
18817 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18818 # Let make expand exec_prefix.
18819 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18820
18821 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18822 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18823 # trailing colons and then remove the whole line if VPATH becomes empty
18824 # (actually we leave an empty line to preserve line numbers).
18825 if test "x$srcdir" = x.; then
18826   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18827 s/:*\$(srcdir):*/:/;
18828 s/:*\${srcdir}:*/:/;
18829 s/:*@srcdir@:*/:/;
18830 s/^\([^=]*=[    ]*\):*/\1/;
18831 s/:*$//;
18832 s/^[^=]*=[      ]*$//;
18833 }'
18834 fi
18835
18836 DEFS=-DHAVE_CONFIG_H
18837
18838 : ${CONFIG_STATUS=./config.status}
18839 ac_clean_files_save=$ac_clean_files
18840 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18841 { echo "$as_me:18841: creating $CONFIG_STATUS" >&5
18842 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18843 cat >$CONFIG_STATUS <<_ACEOF
18844 #! $SHELL
18845 # Generated automatically by configure.
18846 # Run this file to recreate the current configuration.
18847 # Compiler output produced by configure, useful for debugging
18848 # configure, is in config.log if it exists.
18849
18850 debug=false
18851 SHELL=\${CONFIG_SHELL-$SHELL}
18852 ac_cs_invocation="\$0 \$@"
18853
18854 _ACEOF
18855
18856 cat >>$CONFIG_STATUS <<\_ACEOF
18857 # Be Bourne compatible
18858 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18859   emulate sh
18860   NULLCMD=:
18861 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18862   set -o posix
18863 fi
18864
18865 # Name of the executable.
18866 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18867
18868 if expr a : '\(a\)' >/dev/null 2>&1; then
18869   as_expr=expr
18870 else
18871   as_expr=false
18872 fi
18873
18874 rm -f conf$$ conf$$.exe conf$$.file
18875 echo >conf$$.file
18876 if ln -s conf$$.file conf$$ 2>/dev/null; then
18877   # We could just check for DJGPP; but this test a) works b) is more generic
18878   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18879   if test -f conf$$.exe; then
18880     # Don't use ln at all; we don't have any links
18881     as_ln_s='cp -p'
18882   else
18883     as_ln_s='ln -s'
18884   fi
18885 elif ln conf$$.file conf$$ 2>/dev/null; then
18886   as_ln_s=ln
18887 else
18888   as_ln_s='cp -p'
18889 fi
18890 rm -f conf$$ conf$$.exe conf$$.file
18891
18892 as_executable_p="test -f"
18893
18894 # Support unset when possible.
18895 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18896   as_unset=unset
18897 else
18898   as_unset=false
18899 fi
18900
18901 # NLS nuisances.
18902 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18903 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18904 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18905 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18906 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18907 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18908 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18909 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18910
18911 # IFS
18912 # We need space, tab and new line, in precisely that order.
18913 as_nl='
18914 '
18915 IFS="   $as_nl"
18916
18917 # CDPATH.
18918 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18919
18920 exec 6>&1
18921
18922 _ACEOF
18923
18924 # Files that config.status was made for.
18925 if test -n "$ac_config_files"; then
18926   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18927 fi
18928
18929 if test -n "$ac_config_headers"; then
18930   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18931 fi
18932
18933 if test -n "$ac_config_links"; then
18934   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18935 fi
18936
18937 if test -n "$ac_config_commands"; then
18938   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18939 fi
18940
18941 cat >>$CONFIG_STATUS <<\EOF
18942
18943 ac_cs_usage="\
18944 \`$as_me' instantiates files from templates according to the
18945 current configuration.
18946
18947 Usage: $0 [OPTIONS] [FILE]...
18948
18949   -h, --help       print this help, then exit
18950   -V, --version    print version number, then exit
18951   -d, --debug      don't remove temporary files
18952       --recheck    update $as_me by reconfiguring in the same conditions
18953   --file=FILE[:TEMPLATE]
18954                    instantiate the configuration file FILE
18955   --header=FILE[:TEMPLATE]
18956                    instantiate the configuration header FILE
18957
18958 Configuration files:
18959 $config_files
18960
18961 Configuration headers:
18962 $config_headers
18963
18964 Configuration commands:
18965 $config_commands
18966
18967 Report bugs to <bug-autoconf@gnu.org>."
18968 EOF
18969
18970 cat >>$CONFIG_STATUS <<EOF
18971 ac_cs_version="\\
18972 config.status
18973 configured by $0, generated by GNU Autoconf 2.52.20100320,
18974   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18975
18976 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18977 Free Software Foundation, Inc.
18978 This config.status script is free software; the Free Software Foundation
18979 gives unlimited permission to copy, distribute and modify it."
18980 srcdir=$srcdir
18981 INSTALL="$INSTALL"
18982 EOF
18983
18984 cat >>$CONFIG_STATUS <<\EOF
18985 # If no file are specified by the user, then we need to provide default
18986 # value.  By we need to know if files were specified by the user.
18987 ac_need_defaults=:
18988 while test $# != 0
18989 do
18990   case $1 in
18991   --*=*)
18992     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18993     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18994     shift
18995     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18996     shift
18997     ;;
18998   -*);;
18999   *) # This is not an option, so the user has probably given explicit
19000      # arguments.
19001      ac_need_defaults=false;;
19002   esac
19003
19004   case $1 in
19005   # Handling of the options.
19006 EOF
19007 cat >>$CONFIG_STATUS <<EOF
19008   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19009     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19010     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19011 EOF
19012 cat >>$CONFIG_STATUS <<\EOF
19013   --version | --vers* | -V )
19014     echo "$ac_cs_version"; exit 0 ;;
19015   --he | --h)
19016     # Conflict between --help and --header
19017     { { echo "$as_me:19017: error: ambiguous option: $1
19018 Try \`$0 --help' for more information." >&5
19019 echo "$as_me: error: ambiguous option: $1
19020 Try \`$0 --help' for more information." >&2;}
19021    { (exit 1); exit 1; }; };;
19022   --help | --hel | -h )
19023     echo "$ac_cs_usage"; exit 0 ;;
19024   --debug | --d* | -d )
19025     debug=: ;;
19026   --file | --fil | --fi | --f )
19027     shift
19028     CONFIG_FILES="$CONFIG_FILES $1"
19029     ac_need_defaults=false;;
19030   --header | --heade | --head | --hea )
19031     shift
19032     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19033     ac_need_defaults=false;;
19034
19035   # This is an error.
19036   -*) { { echo "$as_me:19036: error: unrecognized option: $1
19037 Try \`$0 --help' for more information." >&5
19038 echo "$as_me: error: unrecognized option: $1
19039 Try \`$0 --help' for more information." >&2;}
19040    { (exit 1); exit 1; }; } ;;
19041
19042   *) ac_config_targets="$ac_config_targets $1" ;;
19043
19044   esac
19045   shift
19046 done
19047
19048 exec 5>>config.log
19049 cat >&5 << _ACEOF
19050
19051 ## ----------------------- ##
19052 ## Running config.status.  ##
19053 ## ----------------------- ##
19054
19055 This file was extended by $as_me 2.52.20100320, executed with
19056   CONFIG_FILES    = $CONFIG_FILES
19057   CONFIG_HEADERS  = $CONFIG_HEADERS
19058   CONFIG_LINKS    = $CONFIG_LINKS
19059   CONFIG_COMMANDS = $CONFIG_COMMANDS
19060   > $ac_cs_invocation
19061 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19062
19063 _ACEOF
19064 EOF
19065
19066 cat >>$CONFIG_STATUS <<EOF
19067 #
19068 # INIT-COMMANDS section.
19069 #
19070
19071 ### Special initialization commands, used to pass information from the
19072 ### configuration-run into config.status
19073
19074 AWK="$AWK"
19075 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19076 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19077 ECHO_LINK="$ECHO_LINK"
19078 LDCONFIG="$LDCONFIG"
19079 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19080 LIB_NAME="$LIB_NAME"
19081 LIB_SUBSETS="$LIB_SUBSETS"
19082 LIB_SUFFIX="$LIB_SUFFIX"
19083 LIB_TRACING="$LIB_TRACING"
19084 MAKE_TERMINFO="$MAKE_TERMINFO"
19085 NCURSES_MAJOR="$NCURSES_MAJOR"
19086 NCURSES_MINOR="$NCURSES_MINOR"
19087 NCURSES_OSPEED="$NCURSES_OSPEED"
19088 NCURSES_PATCH="$NCURSES_PATCH"
19089 SRC_SUBDIRS="$SRC_SUBDIRS"
19090 TERMINFO="$TERMINFO"
19091 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19092 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19093 TICS_NAME="$TICS_NAME"
19094 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19095 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19096 TINFO_NAME="$TINFO_NAME"
19097 TINFO_SUFFIX="$TINFO_SUFFIX"
19098 WITH_CURSES_H="$with_curses_h"
19099 WITH_ECHO="$with_echo"
19100 WITH_OVERWRITE="$with_overwrite"
19101 cf_LIST_MODELS="$cf_list_models"
19102 cf_cv_abi_version="$cf_cv_abi_version"
19103 cf_cv_do_relink="$cf_cv_do_relink"
19104 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19105 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19106 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19107 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19108 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19109 cf_cv_rel_version="$cf_cv_rel_version"
19110 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19111 cf_cv_shared_soname='$cf_cv_shared_soname'
19112 cf_cv_shlib_version="$cf_cv_shlib_version"
19113 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19114 cf_cv_system_name="$cf_cv_system_name"
19115 cf_with_cxx_binding="$cf_with_cxx_binding"
19116 cf_with_manpages="$cf_with_manpages"
19117 host="$host"
19118 target="$target"
19119
19120 EOF
19121
19122 cat >>$CONFIG_STATUS <<\EOF
19123 for ac_config_target in $ac_config_targets
19124 do
19125   case "$ac_config_target" in
19126   # Handling of arguments.
19127   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19128   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19129   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19130   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19131   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19132   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19133   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19134   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19135   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19136   *) { { echo "$as_me:19136: error: invalid argument: $ac_config_target" >&5
19137 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19138    { (exit 1); exit 1; }; };;
19139   esac
19140 done
19141
19142 # If the user did not use the arguments to specify the items to instantiate,
19143 # then the envvar interface is used.  Set only those that are not.
19144 # We use the long form for the default assignment because of an extremely
19145 # bizarre bug on SunOS 4.1.3.
19146 if $ac_need_defaults; then
19147   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19148   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19149   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19150 fi
19151
19152 # Create a temporary directory, and hook for its removal unless debugging.
19153 $debug ||
19154 {
19155   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19156   trap '{ (exit 1); exit 1; }' 1 2 13 15
19157 }
19158
19159 # Create a (secure) tmp directory for tmp files.
19160 : ${TMPDIR=/tmp}
19161 {
19162   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19163   test -n "$tmp" && test -d "$tmp"
19164 }  ||
19165 {
19166   tmp=$TMPDIR/cs$$-$RANDOM
19167   (umask 077 && mkdir $tmp)
19168 } ||
19169 {
19170    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19171    { (exit 1); exit 1; }
19172 }
19173
19174 EOF
19175
19176 cat >>$CONFIG_STATUS <<EOF
19177
19178 #
19179 # CONFIG_FILES section.
19180 #
19181
19182 # No need to generate the scripts if there are no CONFIG_FILES.
19183 # This happens for instance when ./config.status config.h
19184 if test -n "\$CONFIG_FILES"; then
19185   # Protect against being on the right side of a sed subst in config.status.
19186   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19187    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19188 s,@SHELL@,$SHELL,;t t
19189 s,@exec_prefix@,$exec_prefix,;t t
19190 s,@prefix@,$prefix,;t t
19191 s,@program_transform_name@,$program_transform_name,;t t
19192 s,@bindir@,$bindir,;t t
19193 s,@sbindir@,$sbindir,;t t
19194 s,@libexecdir@,$libexecdir,;t t
19195 s,@datadir@,$datadir,;t t
19196 s,@sysconfdir@,$sysconfdir,;t t
19197 s,@sharedstatedir@,$sharedstatedir,;t t
19198 s,@localstatedir@,$localstatedir,;t t
19199 s,@libdir@,$libdir,;t t
19200 s,@includedir@,$includedir,;t t
19201 s,@oldincludedir@,$oldincludedir,;t t
19202 s,@infodir@,$infodir,;t t
19203 s,@mandir@,$mandir,;t t
19204 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19205 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19206 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19207 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19208 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19209 s,@build_alias@,$build_alias,;t t
19210 s,@host_alias@,$host_alias,;t t
19211 s,@target_alias@,$target_alias,;t t
19212 s,@ECHO_C@,$ECHO_C,;t t
19213 s,@ECHO_N@,$ECHO_N,;t t
19214 s,@ECHO_T@,$ECHO_T,;t t
19215 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19216 s,@DEFS@,$DEFS,;t t
19217 s,@LIBS@,$LIBS,;t t
19218 s,@top_builddir@,$top_builddir,;t t
19219 s,@EGREP@,$EGREP,;t t
19220 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19221 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19222 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19223 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19224 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19225 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19226 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19227 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19228 s,@build@,$build,;t t
19229 s,@build_cpu@,$build_cpu,;t t
19230 s,@build_vendor@,$build_vendor,;t t
19231 s,@build_os@,$build_os,;t t
19232 s,@host@,$host,;t t
19233 s,@host_cpu@,$host_cpu,;t t
19234 s,@host_vendor@,$host_vendor,;t t
19235 s,@host_os@,$host_os,;t t
19236 s,@target@,$target,;t t
19237 s,@target_cpu@,$target_cpu,;t t
19238 s,@target_vendor@,$target_vendor,;t t
19239 s,@target_os@,$target_os,;t t
19240 s,@CC@,$CC,;t t
19241 s,@CFLAGS@,$CFLAGS,;t t
19242 s,@LDFLAGS@,$LDFLAGS,;t t
19243 s,@CPPFLAGS@,$CPPFLAGS,;t t
19244 s,@ac_ct_CC@,$ac_ct_CC,;t t
19245 s,@EXEEXT@,$EXEEXT,;t t
19246 s,@OBJEXT@,$OBJEXT,;t t
19247 s,@CPP@,$CPP,;t t
19248 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19249 s,@PROG_EXT@,$PROG_EXT,;t t
19250 s,@LDCONFIG@,$LDCONFIG,;t t
19251 s,@CXX@,$CXX,;t t
19252 s,@CXXFLAGS@,$CXXFLAGS,;t t
19253 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19254 s,@AWK@,$AWK,;t t
19255 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19256 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19257 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19258 s,@LINT@,$LINT,;t t
19259 s,@LINT_OPTS@,$LINT_OPTS,;t t
19260 s,@LN_S@,$LN_S,;t t
19261 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19262 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19263 s,@SET_MAKE@,$SET_MAKE,;t t
19264 s,@CTAGS@,$CTAGS,;t t
19265 s,@ETAGS@,$ETAGS,;t t
19266 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19267 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19268 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19269 s,@RANLIB@,$RANLIB,;t t
19270 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19271 s,@LD@,$LD,;t t
19272 s,@ac_ct_LD@,$ac_ct_LD,;t t
19273 s,@AR@,$AR,;t t
19274 s,@ac_ct_AR@,$ac_ct_AR,;t t
19275 s,@ARFLAGS@,$ARFLAGS,;t t
19276 s,@DESTDIR@,$DESTDIR,;t t
19277 s,@BUILD_CC@,$BUILD_CC,;t t
19278 s,@BUILD_CPP@,$BUILD_CPP,;t t
19279 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19280 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19281 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19282 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19283 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19284 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19285 s,@cf_list_models@,$cf_list_models,;t t
19286 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19287 s,@LIBTOOL@,$LIBTOOL,;t t
19288 s,@LT_UNDEF@,$LT_UNDEF,;t t
19289 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19290 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19291 s,@LIB_CREATE@,$LIB_CREATE,;t t
19292 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19293 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19294 s,@LIB_PREP@,$LIB_PREP,;t t
19295 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19296 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19297 s,@LIB_LINK@,$LIB_LINK,;t t
19298 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19299 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19300 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19301 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19302 s,@TICS_NAME@,$TICS_NAME,;t t
19303 s,@TINFO_NAME@,$TINFO_NAME,;t t
19304 s,@LIB_NAME@,$LIB_NAME,;t t
19305 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19306 s,@CC_G_OPT@,$CC_G_OPT,;t t
19307 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19308 s,@LD_MODEL@,$LD_MODEL,;t t
19309 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19310 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19311 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19312 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19313 s,@LINK_PROGS@,$LINK_PROGS,;t t
19314 s,@LINK_TESTS@,$LINK_TESTS,;t t
19315 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19316 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19317 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19318 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19319 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19320 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19321 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19322 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19323 s,@TERMINFO@,$TERMINFO,;t t
19324 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19325 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19326 s,@TERMPATH@,$TERMPATH,;t t
19327 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19328 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19329 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19330 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19331 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19332 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19333 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19334 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19335 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19336 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19337 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19338 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19339 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19340 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19341 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19342 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19343 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19344 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19345 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19346 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19347 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19348 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19349 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19350 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19351 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19352 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19353 s,@PTHREAD@,$PTHREAD,;t t
19354 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19355 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19356 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19357 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19358 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19359 s,@ECHO_LINK@,$ECHO_LINK,;t t
19360 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19361 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19362 s,@ADA_TRACE@,$ADA_TRACE,;t t
19363 s,@MATH_LIB@,$MATH_LIB,;t t
19364 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19365 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19366 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19367 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19368 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19369 s,@TEST_LIBS@,$TEST_LIBS,;t t
19370 s,@CXXCPP@,$CXXCPP,;t t
19371 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19372 s,@CXX_AR@,$CXX_AR,;t t
19373 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19374 s,@CXXLIBS@,$CXXLIBS,;t t
19375 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19376 s,@gnat_exists@,$gnat_exists,;t t
19377 s,@M4_exists@,$M4_exists,;t t
19378 s,@cf_ada_make@,$cf_ada_make,;t t
19379 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19380 s,@cf_ada_package@,$cf_ada_package,;t t
19381 s,@ADAFLAGS@,$ADAFLAGS,;t t
19382 s,@cf_compile_generics@,$cf_compile_generics,;t t
19383 s,@cf_generic_objects@,$cf_generic_objects,;t t
19384 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19385 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19386 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19387 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19388 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19389 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19390 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19391 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19392 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19393 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19394 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19395 s,@TICS_ARGS@,$TICS_ARGS,;t t
19396 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19397 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19398 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19399 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19400 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19401 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19402 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19403 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19404 s,@TICS_LIST@,$TICS_LIST,;t t
19405 s,@TINFO_LIST@,$TINFO_LIST,;t t
19406 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19407 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19408 s,@TEST_ARGS@,$TEST_ARGS,;t t
19409 s,@TEST_DEPS@,$TEST_DEPS,;t t
19410 s,@TEST_ARG2@,$TEST_ARG2,;t t
19411 s,@TEST_DEP2@,$TEST_DEP2,;t t
19412 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19413 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19414 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19415 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
19416 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19417 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19418 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19419 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19420 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19421 s,@cross_compiling@,$cross_compiling,;t t
19422 CEOF
19423
19424 EOF
19425
19426   cat >>$CONFIG_STATUS <<\EOF
19427   # Split the substitutions into bite-sized pieces for seds with
19428   # small command number limits, like on Digital OSF/1 and HP-UX.
19429   ac_max_sed_lines=48
19430   ac_sed_frag=1 # Number of current file.
19431   ac_beg=1 # First line for current file.
19432   ac_end=$ac_max_sed_lines # Line after last line for current file.
19433   ac_more_lines=:
19434   ac_sed_cmds=
19435   while $ac_more_lines; do
19436     if test $ac_beg -gt 1; then
19437       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19438     else
19439       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19440     fi
19441     if test ! -s $tmp/subs.frag; then
19442       ac_more_lines=false
19443     else
19444       # The purpose of the label and of the branching condition is to
19445       # speed up the sed processing (if there are no `@' at all, there
19446       # is no need to browse any of the substitutions).
19447       # These are the two extra sed commands mentioned above.
19448       (echo ':t
19449   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19450       if test -z "$ac_sed_cmds"; then
19451         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19452       else
19453         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19454       fi
19455       ac_sed_frag=`expr $ac_sed_frag + 1`
19456       ac_beg=$ac_end
19457       ac_end=`expr $ac_end + $ac_max_sed_lines`
19458     fi
19459   done
19460   if test -z "$ac_sed_cmds"; then
19461     ac_sed_cmds=cat
19462   fi
19463 fi # test -n "$CONFIG_FILES"
19464
19465 EOF
19466 cat >>$CONFIG_STATUS <<\EOF
19467 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19468   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19469   case $ac_file in
19470   - | *:- | *:-:* ) # input from stdin
19471         cat >$tmp/stdin
19472         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19473         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19474   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19475         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19476   * )   ac_file_in=$ac_file.in ;;
19477   esac
19478
19479   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19480   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19481          X"$ac_file" : 'X\(//\)[^/]' \| \
19482          X"$ac_file" : 'X\(//\)$' \| \
19483          X"$ac_file" : 'X\(/\)' \| \
19484          .     : '\(.\)' 2>/dev/null ||
19485 echo X"$ac_file" |
19486     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19487           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19488           /^X\(\/\/\)$/{ s//\1/; q; }
19489           /^X\(\/\).*/{ s//\1/; q; }
19490           s/.*/./; q'`
19491   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19492     { case "$ac_dir" in
19493   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19494   *)                      as_incr_dir=.;;
19495 esac
19496 as_dummy="$ac_dir"
19497 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19498   case $as_mkdir_dir in
19499     # Skip DOS drivespec
19500     ?:) as_incr_dir=$as_mkdir_dir ;;
19501     *)
19502       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19503       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19504     ;;
19505   esac
19506 done; }
19507
19508     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19509     # A "../" for each directory in $ac_dir_suffix.
19510     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19511   else
19512     ac_dir_suffix= ac_dots=
19513   fi
19514
19515   case $srcdir in
19516   .)  ac_srcdir=.
19517       if test -z "$ac_dots"; then
19518          ac_top_srcdir=.
19519       else
19520          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19521       fi ;;
19522   [\\/]* | ?:[\\/]* )
19523       ac_srcdir=$srcdir$ac_dir_suffix;
19524       ac_top_srcdir=$srcdir ;;
19525   *) # Relative path.
19526     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19527     ac_top_srcdir=$ac_dots$srcdir ;;
19528   esac
19529
19530   case $INSTALL in
19531   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19532   *) ac_INSTALL=$ac_dots$INSTALL ;;
19533   esac
19534
19535   if test x"$ac_file" != x-; then
19536     { echo "$as_me:19536: creating $ac_file" >&5
19537 echo "$as_me: creating $ac_file" >&6;}
19538     rm -f "$ac_file"
19539   fi
19540   # Let's still pretend it is `configure' which instantiates (i.e., don't
19541   # use $as_me), people would be surprised to read:
19542   #    /* config.h.  Generated automatically by config.status.  */
19543   configure_input="Generated automatically from `echo $ac_file_in |
19544                                                  sed 's,.*/,,'` by configure."
19545
19546   # First look for the input files in the build tree, otherwise in the
19547   # src tree.
19548   ac_file_inputs=`IFS=:
19549     for f in $ac_file_in; do
19550       case $f in
19551       -) echo $tmp/stdin ;;
19552       [\\/$]*)
19553          # Absolute (can't be DOS-style, as IFS=:)
19554          test -f "$f" || { { echo "$as_me:19554: error: cannot find input file: $f" >&5
19555 echo "$as_me: error: cannot find input file: $f" >&2;}
19556    { (exit 1); exit 1; }; }
19557          echo $f;;
19558       *) # Relative
19559          if test -f "$f"; then
19560            # Build tree
19561            echo $f
19562          elif test -f "$srcdir/$f"; then
19563            # Source tree
19564            echo $srcdir/$f
19565          else
19566            # /dev/null tree
19567            { { echo "$as_me:19567: error: cannot find input file: $f" >&5
19568 echo "$as_me: error: cannot find input file: $f" >&2;}
19569    { (exit 1); exit 1; }; }
19570          fi;;
19571       esac
19572     done` || { (exit 1); exit 1; }
19573 EOF
19574 cat >>$CONFIG_STATUS <<EOF
19575   sed "$ac_vpsub
19576 $extrasub
19577 EOF
19578 cat >>$CONFIG_STATUS <<\EOF
19579 :t
19580 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19581 s,@configure_input@,$configure_input,;t t
19582 s,@srcdir@,$ac_srcdir,;t t
19583 s,@top_srcdir@,$ac_top_srcdir,;t t
19584 s,@INSTALL@,$ac_INSTALL,;t t
19585 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19586   rm -f $tmp/stdin
19587   if test x"$ac_file" != x-; then
19588     mv $tmp/out $ac_file
19589   else
19590     cat $tmp/out
19591     rm -f $tmp/out
19592   fi
19593
19594 done
19595 EOF
19596 cat >>$CONFIG_STATUS <<\EOF
19597
19598 #
19599 # CONFIG_HEADER section.
19600 #
19601
19602 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19603 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19604 #
19605 # ac_d sets the value in "#define NAME VALUE" lines.
19606 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19607 ac_dB='[        ].*$,\1#\2'
19608 ac_dC=' '
19609 ac_dD=',;t'
19610 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19611 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19612 ac_iB='\([      ]\),\1#\2define\3'
19613 ac_iC=' '
19614 ac_iD='\4,;t'
19615 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19616 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19617 ac_uB='$,\1#\2define\3'
19618 ac_uC=' '
19619 ac_uD=',;t'
19620
19621 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19622   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19623   case $ac_file in
19624   - | *:- | *:-:* ) # input from stdin
19625         cat >$tmp/stdin
19626         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19627         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19628   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19629         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19630   * )   ac_file_in=$ac_file.in ;;
19631   esac
19632
19633   test x"$ac_file" != x- && { echo "$as_me:19633: creating $ac_file" >&5
19634 echo "$as_me: creating $ac_file" >&6;}
19635
19636   # First look for the input files in the build tree, otherwise in the
19637   # src tree.
19638   ac_file_inputs=`IFS=:
19639     for f in $ac_file_in; do
19640       case $f in
19641       -) echo $tmp/stdin ;;
19642       [\\/$]*)
19643          # Absolute (can't be DOS-style, as IFS=:)
19644          test -f "$f" || { { echo "$as_me:19644: error: cannot find input file: $f" >&5
19645 echo "$as_me: error: cannot find input file: $f" >&2;}
19646    { (exit 1); exit 1; }; }
19647          echo $f;;
19648       *) # Relative
19649          if test -f "$f"; then
19650            # Build tree
19651            echo $f
19652          elif test -f "$srcdir/$f"; then
19653            # Source tree
19654            echo $srcdir/$f
19655          else
19656            # /dev/null tree
19657            { { echo "$as_me:19657: error: cannot find input file: $f" >&5
19658 echo "$as_me: error: cannot find input file: $f" >&2;}
19659    { (exit 1); exit 1; }; }
19660          fi;;
19661       esac
19662     done` || { (exit 1); exit 1; }
19663   # Remove the trailing spaces.
19664   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19665
19666 EOF
19667
19668 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19669 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19670 # be either 'cat' or 'sort'.
19671 cat confdefs.h | uniq >conftest.vals
19672
19673 # Break up conftest.vals because some shells have a limit on
19674 # the size of here documents, and old seds have small limits too.
19675
19676 rm -f conftest.tail
19677 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19678 while grep . conftest.vals >/dev/null
19679 do
19680   # Write chunks of a limited-size here document to conftest.frag.
19681   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19682   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19683   echo 'CEOF' >> $CONFIG_STATUS
19684   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19685   rm -f conftest.vals
19686   mv conftest.tail conftest.vals
19687 done
19688 rm -f conftest.vals
19689
19690 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19691 # marker @DEFS@.
19692 echo '  cat >> conftest.edit <<CEOF
19693 /@DEFS@/r conftest.frag
19694 /@DEFS@/d
19695 CEOF
19696 sed -f conftest.edit $tmp/in > $tmp/out
19697 rm -f $tmp/in
19698 mv $tmp/out $tmp/in
19699 rm -f conftest.edit conftest.frag
19700 ' >> $CONFIG_STATUS
19701
19702 cat >>$CONFIG_STATUS <<\EOF
19703   # Let's still pretend it is `configure' which instantiates (i.e., don't
19704   # use $as_me), people would be surprised to read:
19705   #    /* config.h.  Generated automatically by config.status.  */
19706   if test x"$ac_file" = x-; then
19707     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19708   else
19709     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19710   fi
19711   cat $tmp/in >>$tmp/config.h
19712   rm -f $tmp/in
19713   if test x"$ac_file" != x-; then
19714     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19715       { echo "$as_me:19715: $ac_file is unchanged" >&5
19716 echo "$as_me: $ac_file is unchanged" >&6;}
19717     else
19718       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19719          X"$ac_file" : 'X\(//\)[^/]' \| \
19720          X"$ac_file" : 'X\(//\)$' \| \
19721          X"$ac_file" : 'X\(/\)' \| \
19722          .     : '\(.\)' 2>/dev/null ||
19723 echo X"$ac_file" |
19724     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19725           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19726           /^X\(\/\/\)$/{ s//\1/; q; }
19727           /^X\(\/\).*/{ s//\1/; q; }
19728           s/.*/./; q'`
19729       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19730         { case "$ac_dir" in
19731   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19732   *)                      as_incr_dir=.;;
19733 esac
19734 as_dummy="$ac_dir"
19735 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19736   case $as_mkdir_dir in
19737     # Skip DOS drivespec
19738     ?:) as_incr_dir=$as_mkdir_dir ;;
19739     *)
19740       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19741       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19742     ;;
19743   esac
19744 done; }
19745
19746       fi
19747       rm -f $ac_file
19748       mv $tmp/config.h $ac_file
19749     fi
19750   else
19751     cat $tmp/config.h
19752     rm -f $tmp/config.h
19753   fi
19754 done
19755 EOF
19756 cat >>$CONFIG_STATUS <<\EOF
19757
19758 #
19759 # CONFIG_COMMANDS section.
19760 #
19761 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19762   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19763   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19764
19765   case $ac_dest in
19766     default )
19767
19768 for cf_dir in test
19769 do
19770         if test ! -d $srcdir/$cf_dir; then
19771                 continue
19772         elif test -f $srcdir/$cf_dir/programs; then
19773                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19774         fi
19775 done
19776
19777         case $cf_cv_system_name in #(vi
19778         OS/2*|os2*) #(vi
19779         LIB_PREFIX=''
19780         ;;
19781         *)      LIB_PREFIX='lib'
19782         ;;
19783         esac
19784 cf_prefix=$LIB_PREFIX
19785
19786 if test $cf_cv_shlib_version = cygdll ; then
19787         TINFO_NAME=$TINFO_ARG_SUFFIX
19788         TINFO_SUFFIX=.dll
19789 fi
19790
19791 for cf_dir in $SRC_SUBDIRS
19792 do
19793         if test ! -d $srcdir/$cf_dir ; then
19794                 continue
19795         elif test -f $srcdir/$cf_dir/modules; then
19796
19797                 SHARED_LIB=
19798                 LIBS_TO_MAKE=
19799                 for cf_item in $cf_LIST_MODELS
19800                 do
19801
19802         case $cf_item in #(vi
19803         libtool) #(vi
19804                 cf_suffix='.la'
19805                 cf_depsuf=$cf_suffix
19806                 ;;
19807         normal) #(vi
19808                 cf_suffix='.a'
19809                 cf_depsuf=$cf_suffix
19810                 ;;
19811         debug) #(vi
19812                 cf_suffix='_g.a'
19813                 cf_depsuf=$cf_suffix
19814                 ;;
19815         profile) #(vi
19816                 cf_suffix='_p.a'
19817                 cf_depsuf=$cf_suffix
19818                 ;;
19819         shared) #(vi
19820                 case $cf_cv_system_name in
19821                 aix[56]*) #(vi
19822                         cf_suffix='.a'
19823                         cf_depsuf=$cf_suffix
19824                         ;;
19825                 cygwin*) #(vi
19826                         cf_suffix='.dll'
19827                         cf_depsuf='.dll.a'
19828                         ;;
19829                 darwin*) #(vi
19830                         cf_suffix='.dylib'
19831                         cf_depsuf=$cf_suffix
19832                         ;;
19833                 hpux*) #(vi
19834                         case $target in
19835                         ia64*) #(vi
19836                                 cf_suffix='.so'
19837                                 cf_depsuf=$cf_suffix
19838                                 ;;
19839                         *) #(vi
19840                                 cf_suffix='.sl'
19841                                 cf_depsuf=$cf_suffix
19842                                 ;;
19843                         esac
19844                         ;;
19845                 *)      cf_suffix='.so'
19846                         cf_depsuf=$cf_suffix
19847                         ;;
19848                 esac
19849         esac
19850         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19851         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19852
19853                         if test $cf_item = shared ; then
19854                         if test "$cf_cv_do_symlinks" = yes ; then
19855                                 case "$cf_cv_shlib_version" in #(vi
19856                                 rel) #(vi
19857                                         case "$cf_cv_system_name" in #(vi
19858                                         darwin*)
19859                                         case .${LIB_SUFFIX} in
19860                                         .w*)
19861                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19862                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19863                                                 ;;
19864                                         *)
19865                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19866                                                 ;;
19867                                         esac
19868                                         ;; #(vi
19869                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19870                                         esac
19871                                         ;;
19872                                 abi)
19873                                         case "$cf_cv_system_name" in #(vi
19874                                         darwin*)
19875                                         case .${LIB_SUFFIX} in
19876                                         .w*)
19877                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19878                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19879                                                 ;;
19880                                         *)
19881                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19882                                                 ;;
19883                                         esac
19884                                         ;; #(vi
19885                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19886                                         esac
19887                                         ;;
19888                                 esac
19889                         fi
19890                         # cygwin needs import library, and has unique naming convention
19891                         # use autodetected ${cf_prefix} for import lib and static lib, but
19892                         # use 'cyg' prefix for shared lib.
19893                         if test $cf_cv_shlib_version = cygdll ; then
19894                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19895                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19896                                 continue
19897                         fi
19898                         fi
19899                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19900                 done
19901
19902                 if test $cf_dir = ncurses ; then
19903                         cf_subsets="$LIB_SUBSETS"
19904                         cf_r_parts="$cf_subsets"
19905                         cf_liblist="$LIBS_TO_MAKE"
19906
19907                         while test -n "$cf_r_parts"
19908                         do
19909                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19910                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19911                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19912                                         cf_item=
19913                                         case $cf_l_parts in #(vi
19914                                         *termlib*) #(vi
19915                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19916                                                 ;;
19917                                         *ticlib*)
19918                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19919                                                 ;;
19920                                         *)
19921                                                 break
19922                                                 ;;
19923                                         esac
19924                                         if test -n "$cf_item"; then
19925                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19926                                         fi
19927                                 else
19928                                         break
19929                                 fi
19930                         done
19931                 else
19932                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19933                 fi
19934
19935                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19936                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19937                         $cf_dir/Makefile >$cf_dir/Makefile.out
19938                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19939
19940                 $AWK -f $srcdir/mk-0th.awk \
19941                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19942                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19943
19944                 for cf_subset in $cf_subsets
19945                 do
19946                         cf_subdirs=
19947                         for cf_item in $cf_LIST_MODELS
19948                         do
19949                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19950
19951 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19952
19953         case $cf_item in #(vi
19954         libtool) #(vi
19955                 cf_suffix='.la'
19956                 cf_depsuf=$cf_suffix
19957                 ;;
19958         normal) #(vi
19959                 cf_suffix='.a'
19960                 cf_depsuf=$cf_suffix
19961                 ;;
19962         debug) #(vi
19963                 cf_suffix='_g.a'
19964                 cf_depsuf=$cf_suffix
19965                 ;;
19966         profile) #(vi
19967                 cf_suffix='_p.a'
19968                 cf_depsuf=$cf_suffix
19969                 ;;
19970         shared) #(vi
19971                 case $cf_cv_system_name in
19972                 aix[56]*) #(vi
19973                         cf_suffix='.a'
19974                         cf_depsuf=$cf_suffix
19975                         ;;
19976                 cygwin*) #(vi
19977                         cf_suffix='.dll'
19978                         cf_depsuf='.dll.a'
19979                         ;;
19980                 darwin*) #(vi
19981                         cf_suffix='.dylib'
19982                         cf_depsuf=$cf_suffix
19983                         ;;
19984                 hpux*) #(vi
19985                         case $target in
19986                         ia64*) #(vi
19987                                 cf_suffix='.so'
19988                                 cf_depsuf=$cf_suffix
19989                                 ;;
19990                         *) #(vi
19991                                 cf_suffix='.sl'
19992                                 cf_depsuf=$cf_suffix
19993                                 ;;
19994                         esac
19995                         ;;
19996                 *)      cf_suffix='.so'
19997                         cf_depsuf=$cf_suffix
19998                         ;;
19999                 esac
20000         esac
20001         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20002         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20003
20004         case $cf_item in
20005         libtool) cf_subdir='obj_lo'  ;;
20006         normal)  cf_subdir='objects' ;;
20007         debug)   cf_subdir='obj_g' ;;
20008         profile) cf_subdir='obj_p' ;;
20009         shared)
20010                 case $cf_cv_system_name in #(vi
20011                 cygwin) #(vi
20012                         cf_subdir='objects' ;;
20013                 *)
20014                         cf_subdir='obj_s' ;;
20015                 esac
20016         esac
20017
20018                         # Test for case where we build libtinfo with a different name.
20019                         cf_libname=$cf_dir
20020                         if test $cf_dir = ncurses ; then
20021                                 case $cf_subset in
20022                                 *base*)
20023                                         cf_libname=${cf_libname}$LIB_SUFFIX
20024                                         ;;
20025                                 *termlib*)
20026                                         cf_libname=$TINFO_LIB_SUFFIX
20027                                         ;;
20028                                 ticlib*)
20029                                         cf_libname=$TICS_LIB_SUFFIX
20030                                         ;;
20031                                 esac
20032                         else
20033                                 cf_libname=${cf_libname}$LIB_SUFFIX
20034                         fi
20035                         if test -n "${DFT_ARG_SUFFIX}" ; then
20036                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20037                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20038                         fi
20039
20040                         # These dependencies really are for development, not
20041                         # builds, but they are useful in porting, too.
20042                         cf_depend="../include/ncurses_cfg.h"
20043                         if test "$srcdir" = "."; then
20044                                 cf_reldir="."
20045                         else
20046                                 cf_reldir="\${srcdir}"
20047                         fi
20048
20049                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20050                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20051                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20052                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20053                         fi
20054
20055                         cf_dir_suffix=
20056                         old_cf_suffix="$cf_suffix"
20057                         if test "$cf_cv_shlib_version_infix" = yes ; then
20058                         if test -n "$LIB_SUFFIX" ; then
20059                                 case $LIB_SUFFIX in
20060                                 w*)
20061                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20062                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20063                                         cf_dir_suffix=w
20064                                         ;;
20065                                 esac
20066                         fi
20067                         fi
20068
20069                         $AWK -f $srcdir/mk-1st.awk \
20070                                 name=${cf_libname}${cf_dir_suffix} \
20071                                 traces=$LIB_TRACING \
20072                                 MODEL=$cf_ITEM \
20073                                 model=$cf_subdir \
20074                                 prefix=$cf_prefix \
20075                                 suffix=$cf_suffix \
20076                                 subset=$cf_subset \
20077                                 TermlibRoot=$TINFO_NAME \
20078                                 TermlibSuffix=$TINFO_SUFFIX \
20079                                 ShlibVer=$cf_cv_shlib_version \
20080                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20081                                 ReLink=${cf_cv_do_relink-no} \
20082                                 DoLinks=$cf_cv_do_symlinks \
20083                                 rmSoLocs=$cf_cv_rm_so_locs \
20084                                 ldconfig="$LDCONFIG" \
20085                                 overwrite=$WITH_OVERWRITE \
20086                                 depend="$cf_depend" \
20087                                 host="$host" \
20088                                 libtool_version="$LIBTOOL_VERSION" \
20089                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20090
20091                         cf_suffix="$old_cf_suffix"
20092
20093                         for cf_subdir2 in $cf_subdirs lib
20094                         do
20095                                 test $cf_subdir = $cf_subdir2 && break
20096                         done
20097                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20098                         $AWK -f $srcdir/mk-2nd.awk \
20099                                 name=$cf_dir \
20100                                 traces=$LIB_TRACING \
20101                                 MODEL=$cf_ITEM \
20102                                 model=$cf_subdir \
20103                                 subset=$cf_subset \
20104                                 srcdir=$srcdir \
20105                                 echo=$WITH_ECHO \
20106                                 crenames=$cf_cv_prog_CC_c_o \
20107                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20108                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20109                         cf_subdirs="$cf_subdirs $cf_subdir"
20110                         done
20111                 done
20112         fi
20113
20114         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20115 done
20116
20117 for cf_dir in $SRC_SUBDIRS
20118 do
20119         if test ! -d $srcdir/$cf_dir ; then
20120                 continue
20121         fi
20122
20123         if test -f $cf_dir/Makefile ; then
20124                 case "$cf_dir" in
20125                 Ada95) #(vi
20126                         echo 'libs \' >> Makefile
20127                         echo 'install.libs \' >> Makefile
20128                         echo 'uninstall.libs ::' >> Makefile
20129                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20130                         ;;
20131                 esac
20132         fi
20133
20134         if test -f $srcdir/$cf_dir/modules; then
20135                 echo >> Makefile
20136                 if test -f $srcdir/$cf_dir/headers; then
20137 cat >> Makefile <<CF_EOF
20138 install.includes \\
20139 uninstall.includes \\
20140 CF_EOF
20141                 fi
20142 if test "$cf_dir" != "c++" ; then
20143 echo 'lint \' >> Makefile
20144 fi
20145 cat >> Makefile <<CF_EOF
20146 libs \\
20147 lintlib \\
20148 install.libs \\
20149 uninstall.libs \\
20150 install.$cf_dir \\
20151 uninstall.$cf_dir ::
20152         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20153 CF_EOF
20154         elif test -f $srcdir/$cf_dir/headers; then
20155 cat >> Makefile <<CF_EOF
20156
20157 libs \\
20158 install.libs \\
20159 uninstall.libs \\
20160 install.includes \\
20161 uninstall.includes ::
20162         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20163 CF_EOF
20164 fi
20165 done
20166
20167 cat >> Makefile <<CF_EOF
20168
20169 install.libs uninstall.libs \\
20170 install.data uninstall.data ::
20171 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20172 CF_EOF
20173
20174 if test "x$cf_with_manpages" = xyes; then
20175 cat >> Makefile <<CF_EOF
20176
20177 install.man \\
20178 uninstall.man ::
20179         cd man && \${MAKE} \${CF_MFLAGS} \$@
20180 CF_EOF
20181 fi
20182
20183 cat >> Makefile <<CF_EOF
20184
20185 distclean ::
20186         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20187         rm -f headers.sh headers.sed mk_shared_lib.sh
20188         rm -f edit_man.* man_alias.*
20189         rm -rf \${DIRS_TO_MAKE}
20190 CF_EOF
20191
20192 # Special case: tack's manpage lives in its own directory.
20193 if test "x$cf_with_manpages" = xyes; then
20194 if test -d tack ; then
20195 if test -f $srcdir/$tack.h; then
20196 cat >> Makefile <<CF_EOF
20197
20198 install.man \\
20199 uninstall.man ::
20200         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20201 CF_EOF
20202 fi
20203 fi
20204 fi
20205
20206 rm -f headers.sed headers.sh
20207
20208 echo creating headers.sh
20209 cat >headers.sh <<CF_EOF
20210 #! /bin/sh
20211 # This shell script is generated by the 'configure' script.  It is invoked in a
20212 # subdirectory of the build tree.  It generates a sed-script in the parent
20213 # directory that is used to adjust includes for header files that reside in a
20214 # subdirectory of /usr/include, etc.
20215 PRG=""
20216 while test \$# != 3
20217 do
20218 PRG="\$PRG \$1"; shift
20219 done
20220 DST=\$1
20221 REF=\$2
20222 SRC=\$3
20223 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20224 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20225 echo installing \$SRC in \$DST
20226 CF_EOF
20227
20228 if test $WITH_CURSES_H = yes; then
20229         cat >>headers.sh <<CF_EOF
20230 case \$DST in
20231 /*/include/*)
20232         END=\`basename \$DST\`
20233         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20234         do
20235                 NAME=\`basename \$i\`
20236                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20237         done
20238         ;;
20239 *)
20240         echo "" >> \$TMPSED
20241         ;;
20242 esac
20243 CF_EOF
20244
20245 else
20246         cat >>headers.sh <<CF_EOF
20247 case \$DST in
20248 /*/include/*)
20249         END=\`basename \$DST\`
20250         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20251         do
20252                 NAME=\`basename \$i\`
20253                 if test "\$NAME" = "curses.h"
20254                 then
20255                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20256                         NAME=ncurses.h
20257                 fi
20258                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20259         done
20260         ;;
20261 *)
20262         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20263         ;;
20264 esac
20265 CF_EOF
20266 fi
20267 cat >>headers.sh <<CF_EOF
20268 rm -f \$TMPSRC
20269 sed -f \$TMPSED \$SRC > \$TMPSRC
20270 NAME=\`basename \$SRC\`
20271 CF_EOF
20272 if test $WITH_CURSES_H != yes; then
20273         cat >>headers.sh <<CF_EOF
20274 test "\$NAME" = "curses.h" && NAME=ncurses.h
20275 CF_EOF
20276 fi
20277 cat >>headers.sh <<CF_EOF
20278 # Just in case someone gzip'd manpages, remove the conflicting copy.
20279 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20280
20281 eval \$PRG \$TMPSRC \$DST/\$NAME
20282 rm -f \$TMPSRC \$TMPSED
20283 CF_EOF
20284
20285 chmod 0755 headers.sh
20286
20287 for cf_dir in $SRC_SUBDIRS
20288 do
20289         if test ! -d $srcdir/$cf_dir ; then
20290                 continue
20291         fi
20292
20293         if test -f $srcdir/$cf_dir/headers; then
20294                 $AWK -f $srcdir/mk-hdr.awk \
20295                         subset="$LIB_SUBSETS" \
20296                         compat="$WITH_CURSES_H" \
20297                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20298         fi
20299
20300         if test -f $srcdir/$cf_dir/modules; then
20301                 if test "$cf_dir" != "c++" ; then
20302                         cat >>$cf_dir/Makefile <<"CF_EOF"
20303 depend : ${AUTO_SRC}
20304         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20305
20306 # DO NOT DELETE THIS LINE -- make depend depends on it.
20307 CF_EOF
20308                 fi
20309         fi
20310 done
20311
20312  ;;
20313   esac
20314 done
20315 EOF
20316
20317 cat >>$CONFIG_STATUS <<\EOF
20318
20319 { (exit 0); exit 0; }
20320 EOF
20321 chmod +x $CONFIG_STATUS
20322 ac_clean_files=$ac_clean_files_save
20323
20324 # configure is writing to config.log, and then calls config.status.
20325 # config.status does its own redirection, appending to config.log.
20326 # Unfortunately, on DOS this fails, as config.log is still kept open
20327 # by configure, so config.status won't be able to write to it; its
20328 # output is simply discarded.  So we exec the FD to /dev/null,
20329 # effectively closing config.log, so it can be properly (re)opened and
20330 # appended to by config.status.  When coming back to configure, we
20331 # need to make the FD available again.
20332 if test "$no_create" != yes; then
20333   ac_cs_success=:
20334   exec 5>/dev/null
20335   $SHELL $CONFIG_STATUS || ac_cs_success=false
20336   exec 5>>config.log
20337   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20338   # would make configure fail if this is the last instruction.
20339   $ac_cs_success || { (exit 1); exit 1; }
20340 fi
20341 ${MAKE-make} preinstall