]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
05688b4e95e8e53ec8fc0060687c59757e1fba3c
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.484 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20081225.
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   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-ccharw-max=XXX   override size CCHARW_MAX
759   --with-rcs-ids          compile-in RCS identifiers
760 Options to Specify How Manpages are Installed:
761   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
762                           optionally formatted/catonly, e.g., gzip,formatted
763   --with-manpage-renames  specify manpage-renaming
764   --with-manpage-aliases  specify manpage-aliases using .so
765   --with-manpage-symlinks specify manpage-aliases using symlinks
766   --with-manpage-tbl      specify manpage processing with tbl
767 Extensions:
768   --disable-ext-funcs     disable function-extensions
769   --enable-sp-funcs       enable experimental SCREEN-extensions
770   --enable-term-driver    enable experimental terminal-driver
771   --enable-const          compile with extra/non-standard const
772   --enable-ext-colors     compile for 256-color support
773   --enable-ext-mouse      compile for extended mouse-encoding
774   --enable-no-padding     compile with $NCURSES_NO_PADDING code
775   --enable-signed-char    compile using signed Boolean's in term.h
776   --enable-sigwinch       compile with SIGWINCH handler
777   --enable-tcap-names     compile with user-definable terminal capabilities
778 Development Code:
779   --without-develop       disable development options
780   --enable-hard-tabs      compile with hard-tabs code
781   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
782 Experimental Code:
783   --disable-assumed-color do not assume anything about default-colors
784   --disable-hashmap       compile without hashmap scrolling-optimization
785   --enable-colorfgbg      compile-in experimental $COLORFGBG code
786   --enable-interop        compile-in experimental interop bindings
787   --with-pthread          use POSIX thread library
788   --enable-weak-symbols   enable weak-symbols for pthreads
789   --enable-reentrant      compile with experimental reentrant code
790   --with-wrap-prefix=XXX  override prefix used for public variables
791   --enable-safe-sprintf   compile with experimental safe-sprintf code
792   --disable-scroll-hints  compile without scroll-hints code
793   --enable-wgetch-events  compile with experimental wgetch-events code
794 Testing/development Options:
795   --enable-echo           build: display "compiling" commands (default)
796   --enable-warnings       build: turn on GCC compiler warnings
797   --enable-assertions     test: turn on generation of assertion code
798   --with-dmalloc          test: use Gray Watson's dmalloc library
799   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
800   --with-valgrind         test: use valgrind
801   --disable-leaks         test: free permanent memory, analyze leaks
802   --enable-expanded       test: generate functions for certain macros
803   --disable-macros        test: use functions rather than macros
804   --with-trace            test: add trace() function to all models of ncurses
805 Ada95 Binding Options:
806   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
807   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
808   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
809
810 Some influential environment variables:
811   CC          C compiler command
812   CFLAGS      C compiler flags
813   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
814               nonstandard directory <lib dir>
815   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
816               headers in a nonstandard directory <include dir>
817   CPP         C preprocessor
818   CXX         C++ compiler command
819   CXXFLAGS    C++ compiler flags
820   CXXCPP      C++ preprocessor
821
822 Use these variables to override the choices made by `configure' or to help
823 it to find libraries and programs with nonstandard names/locations.
824
825 EOF
826 fi
827
828 if test "$ac_init_help" = "recursive"; then
829   # If there are subdirs, report their specific --help.
830   ac_popdir=`pwd`
831   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
832     cd $ac_subdir
833     # A "../" for each directory in /$ac_subdir.
834     ac_dots=`echo $ac_subdir |
835              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
836
837     case $srcdir in
838     .) # No --srcdir option.  We are building in place.
839       ac_sub_srcdir=$srcdir ;;
840     [\\/]* | ?:[\\/]* ) # Absolute path.
841       ac_sub_srcdir=$srcdir/$ac_subdir ;;
842     *) # Relative path.
843       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
844     esac
845
846     # Check for guested configure; otherwise get Cygnus style configure.
847     if test -f $ac_sub_srcdir/configure.gnu; then
848       echo
849       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
850     elif test -f $ac_sub_srcdir/configure; then
851       echo
852       $SHELL $ac_sub_srcdir/configure  --help=recursive
853     elif test -f $ac_sub_srcdir/configure.ac ||
854            test -f $ac_sub_srcdir/configure.in; then
855       echo
856       $ac_configure --help
857     else
858       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
859     fi
860     cd $ac_popdir
861   done
862 fi
863
864 test -n "$ac_init_help" && exit 0
865 if $ac_init_version; then
866   cat <<\EOF
867
868 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
869 Free Software Foundation, Inc.
870 This configure script is free software; the Free Software Foundation
871 gives unlimited permission to copy, distribute and modify it.
872 EOF
873   exit 0
874 fi
875 exec 5>config.log
876 cat >&5 <<EOF
877 This file contains any messages produced by compilers while
878 running configure, to aid debugging if configure makes a mistake.
879
880 It was created by $as_me, which was
881 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
882
883   $ $0 $@
884
885 EOF
886 {
887 cat <<_ASUNAME
888 ## ---------- ##
889 ## Platform.  ##
890 ## ---------- ##
891
892 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
893 uname -m = `(uname -m) 2>/dev/null || echo unknown`
894 uname -r = `(uname -r) 2>/dev/null || echo unknown`
895 uname -s = `(uname -s) 2>/dev/null || echo unknown`
896 uname -v = `(uname -v) 2>/dev/null || echo unknown`
897
898 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
899 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
900
901 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
902 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
903 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
904 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
905 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
906 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
907 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
908
909 PATH = $PATH
910
911 _ASUNAME
912 } >&5
913
914 cat >&5 <<EOF
915 ## ------------ ##
916 ## Core tests.  ##
917 ## ------------ ##
918
919 EOF
920
921 # Keep a trace of the command line.
922 # Strip out --no-create and --no-recursion so they do not pile up.
923 # Also quote any args containing shell meta-characters.
924 ac_configure_args=
925 ac_sep=
926 for ac_arg
927 do
928   case $ac_arg in
929   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
930   | --no-cr | --no-c) ;;
931   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
932   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
933   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
934     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
935     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
936     ac_sep=" " ;;
937   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
938      ac_sep=" " ;;
939   esac
940   # Get rid of the leading space.
941 done
942
943 # When interrupted or exit'd, cleanup temporary files, and complete
944 # config.log.  We remove comments because anyway the quotes in there
945 # would cause problems or look ugly.
946 trap 'exit_status=$?
947   # Save into config.log some information that might help in debugging.
948   echo >&5
949   echo "## ----------------- ##" >&5
950   echo "## Cache variables.  ##" >&5
951   echo "## ----------------- ##" >&5
952   echo >&5
953   # The following way of writing the cache mishandles newlines in values,
954 {
955   (set) 2>&1 |
956     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
957     *ac_space=\ *)
958       sed -n \
959         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
960           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
961       ;;
962     *)
963       sed -n \
964         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
965       ;;
966     esac;
967 } >&5
968   sed "/^$/d" confdefs.h >conftest.log
969   if test -s conftest.log; then
970     echo >&5
971     echo "## ------------ ##" >&5
972     echo "## confdefs.h.  ##" >&5
973     echo "## ------------ ##" >&5
974     echo >&5
975     cat conftest.log >&5
976   fi
977   (echo; echo) >&5
978   test "$ac_signal" != 0 &&
979     echo "$as_me: caught signal $ac_signal" >&5
980   echo "$as_me: exit $exit_status" >&5
981   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
982     exit $exit_status
983      ' 0
984 for ac_signal in 1 2 13 15; do
985   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
986 done
987 ac_signal=0
988
989 # confdefs.h avoids OS command line length limits that DEFS can exceed.
990 rm -rf conftest* confdefs.h
991 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
992 echo >confdefs.h
993
994 # Let the site file select an alternate cache file if it wants to.
995 # Prefer explicitly selected file to automatically selected ones.
996 if test -z "$CONFIG_SITE"; then
997   if test "x$prefix" != xNONE; then
998     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
999   else
1000     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1001   fi
1002 fi
1003 for ac_site_file in $CONFIG_SITE; do
1004   if test -r "$ac_site_file"; then
1005     { echo "$as_me:1005: loading site script $ac_site_file" >&5
1006 echo "$as_me: loading site script $ac_site_file" >&6;}
1007     cat "$ac_site_file" >&5
1008     . "$ac_site_file"
1009   fi
1010 done
1011
1012 if test -r "$cache_file"; then
1013   # Some versions of bash will fail to source /dev/null (special
1014   # files actually), so we avoid doing that.
1015   if test -f "$cache_file"; then
1016     { echo "$as_me:1016: loading cache $cache_file" >&5
1017 echo "$as_me: loading cache $cache_file" >&6;}
1018     case $cache_file in
1019       [\\/]* | ?:[\\/]* ) . $cache_file;;
1020       *)                      . ./$cache_file;;
1021     esac
1022   fi
1023 else
1024   { echo "$as_me:1024: creating cache $cache_file" >&5
1025 echo "$as_me: creating cache $cache_file" >&6;}
1026   >$cache_file
1027 fi
1028
1029 # Check that the precious variables saved in the cache have kept the same
1030 # value.
1031 ac_cache_corrupted=false
1032 for ac_var in `(set) 2>&1 |
1033                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1034   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1035   eval ac_new_set=\$ac_env_${ac_var}_set
1036   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1037   eval ac_new_val="\$ac_env_${ac_var}_value"
1038   case $ac_old_set,$ac_new_set in
1039     set,)
1040       { echo "$as_me:1040: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1041 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1042       ac_cache_corrupted=: ;;
1043     ,set)
1044       { echo "$as_me:1044: error: \`$ac_var' was not set in the previous run" >&5
1045 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1046       ac_cache_corrupted=: ;;
1047     ,);;
1048     *)
1049       if test "x$ac_old_val" != "x$ac_new_val"; then
1050         { echo "$as_me:1050: error: \`$ac_var' has changed since the previous run:" >&5
1051 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1052         { echo "$as_me:1052:   former value:  $ac_old_val" >&5
1053 echo "$as_me:   former value:  $ac_old_val" >&2;}
1054         { echo "$as_me:1054:   current value: $ac_new_val" >&5
1055 echo "$as_me:   current value: $ac_new_val" >&2;}
1056         ac_cache_corrupted=:
1057       fi;;
1058   esac
1059   # Pass precious variables to config.status.  It doesn't matter if
1060   # we pass some twice (in addition to the command line arguments).
1061   if test "$ac_new_set" = set; then
1062     case $ac_new_val in
1063     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1064       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1065       ac_configure_args="$ac_configure_args '$ac_arg'"
1066       ;;
1067     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1068        ;;
1069     esac
1070   fi
1071 done
1072 if $ac_cache_corrupted; then
1073   { echo "$as_me:1073: error: changes in the environment can compromise the build" >&5
1074 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1075   { { echo "$as_me:1075: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1076 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1077    { (exit 1); exit 1; }; }
1078 fi
1079
1080 ac_ext=c
1081 ac_cpp='$CPP $CPPFLAGS'
1082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1085 ac_main_return=return
1086
1087 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1088   *c*,-n*) ECHO_N= ECHO_C='
1089 ' ECHO_T='      ' ;;
1090   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1091   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1092 esac
1093 echo "#! $SHELL" >conftest.sh
1094 echo  "exit 0"   >>conftest.sh
1095 chmod +x conftest.sh
1096 if { (echo "$as_me:1096: PATH=\".;.\"; conftest.sh") >&5
1097   (PATH=".;."; conftest.sh) 2>&5
1098   ac_status=$?
1099   echo "$as_me:1099: \$? = $ac_status" >&5
1100   (exit $ac_status); }; then
1101   ac_path_separator=';'
1102 else
1103   ac_path_separator=:
1104 fi
1105 PATH_SEPARATOR="$ac_path_separator"
1106 rm -f conftest.sh
1107
1108 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1109
1110 top_builddir=`pwd`
1111
1112 echo "$as_me:1112: checking for egrep" >&5
1113 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1114 if test "${ac_cv_prog_egrep+set}" = set; then
1115   echo $ECHO_N "(cached) $ECHO_C" >&6
1116 else
1117   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1118     then ac_cv_prog_egrep='grep -E'
1119     else ac_cv_prog_egrep='egrep'
1120     fi
1121 fi
1122 echo "$as_me:1122: result: $ac_cv_prog_egrep" >&5
1123 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1124  EGREP=$ac_cv_prog_egrep
1125
1126 test -z "$EGREP" && { { echo "$as_me:1126: error: No egrep program found" >&5
1127 echo "$as_me: error: No egrep program found" >&2;}
1128    { (exit 1); exit 1; }; }
1129
1130 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1131 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1132 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1133 cf_cv_abi_version=${NCURSES_MAJOR}
1134 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1135 cf_cv_timestamp=`date`
1136 echo "$as_me:1136: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1137 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1138
1139 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1140
1141 # Check whether --with-rel-version or --without-rel-version was given.
1142 if test "${with_rel_version+set}" = set; then
1143   withval="$with_rel_version"
1144   { echo "$as_me:1144: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1145 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1146  cf_cv_rel_version=$withval
1147 fi;
1148
1149  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1150  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1151
1152 if test -n "$NCURSES_MAJOR" ; then
1153   case $NCURSES_MAJOR in #(vi
1154   [0-9]*) #(vi
1155         ;;
1156   *)
1157         { { echo "$as_me:1157: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1158 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1159    { (exit 1); exit 1; }; }
1160         ;;
1161   esac
1162 else
1163   { { echo "$as_me:1163: error: Release major-version value is empty" >&5
1164 echo "$as_me: error: Release major-version value is empty" >&2;}
1165    { (exit 1); exit 1; }; }
1166 fi
1167
1168 if test -n "$NCURSES_MINOR" ; then
1169   case $NCURSES_MINOR in #(vi
1170   [0-9]*) #(vi
1171         ;;
1172   *)
1173         { { echo "$as_me:1173: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1174 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1175    { (exit 1); exit 1; }; }
1176         ;;
1177   esac
1178 else
1179   { { echo "$as_me:1179: error: Release minor-version value is empty" >&5
1180 echo "$as_me: error: Release minor-version value is empty" >&2;}
1181    { (exit 1); exit 1; }; }
1182 fi
1183
1184 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1185
1186 # Check whether --with-abi-version or --without-abi-version was given.
1187 if test "${with_abi_version+set}" = set; then
1188   withval="$with_abi_version"
1189   { echo "$as_me:1189: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1190 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1191  cf_cv_abi_version=$withval
1192 fi;
1193
1194 if test -n "$cf_cv_abi_version" ; then
1195   case $cf_cv_abi_version in #(vi
1196   [0-9]*) #(vi
1197         ;;
1198   *)
1199         { { echo "$as_me:1199: error: ABI version is not a number: $cf_cv_abi_version" >&5
1200 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1201    { (exit 1); exit 1; }; }
1202         ;;
1203   esac
1204 else
1205   { { echo "$as_me:1205: error: ABI version value is empty" >&5
1206 echo "$as_me: error: ABI version value is empty" >&2;}
1207    { (exit 1); exit 1; }; }
1208 fi
1209
1210 ac_aux_dir=
1211 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1212   if test -f $ac_dir/install-sh; then
1213     ac_aux_dir=$ac_dir
1214     ac_install_sh="$ac_aux_dir/install-sh -c"
1215     break
1216   elif test -f $ac_dir/install.sh; then
1217     ac_aux_dir=$ac_dir
1218     ac_install_sh="$ac_aux_dir/install.sh -c"
1219     break
1220   elif test -f $ac_dir/shtool; then
1221     ac_aux_dir=$ac_dir
1222     ac_install_sh="$ac_aux_dir/shtool install -c"
1223     break
1224   fi
1225 done
1226 if test -z "$ac_aux_dir"; then
1227   { { echo "$as_me:1227: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1228 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1229    { (exit 1); exit 1; }; }
1230 fi
1231 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1232 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1233 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1234
1235 # Make sure we can run config.sub.
1236 $ac_config_sub sun4 >/dev/null 2>&1 ||
1237   { { echo "$as_me:1237: error: cannot run $ac_config_sub" >&5
1238 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1239    { (exit 1); exit 1; }; }
1240
1241 echo "$as_me:1241: checking build system type" >&5
1242 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1243 if test "${ac_cv_build+set}" = set; then
1244   echo $ECHO_N "(cached) $ECHO_C" >&6
1245 else
1246   ac_cv_build_alias=$build_alias
1247 test -z "$ac_cv_build_alias" &&
1248   ac_cv_build_alias=`$ac_config_guess`
1249 test -z "$ac_cv_build_alias" &&
1250   { { echo "$as_me:1250: error: cannot guess build type; you must specify one" >&5
1251 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1252    { (exit 1); exit 1; }; }
1253 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1254   { { echo "$as_me:1254: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1255 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1256    { (exit 1); exit 1; }; }
1257
1258 fi
1259 echo "$as_me:1259: result: $ac_cv_build" >&5
1260 echo "${ECHO_T}$ac_cv_build" >&6
1261 build=$ac_cv_build
1262 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1263 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1264 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1265
1266 echo "$as_me:1266: checking host system type" >&5
1267 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1268 if test "${ac_cv_host+set}" = set; then
1269   echo $ECHO_N "(cached) $ECHO_C" >&6
1270 else
1271   ac_cv_host_alias=$host_alias
1272 test -z "$ac_cv_host_alias" &&
1273   ac_cv_host_alias=$ac_cv_build_alias
1274 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1275   { { echo "$as_me:1275: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1276 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1277    { (exit 1); exit 1; }; }
1278
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_host" >&5
1281 echo "${ECHO_T}$ac_cv_host" >&6
1282 host=$ac_cv_host
1283 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1284 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1285 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1286
1287 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1288         echo "$as_me:1288: checking target system type" >&5
1289 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1290 if test "${ac_cv_target+set}" = set; then
1291   echo $ECHO_N "(cached) $ECHO_C" >&6
1292 else
1293   ac_cv_target_alias=$target_alias
1294 test "x$ac_cv_target_alias" = "x" &&
1295   ac_cv_target_alias=$ac_cv_host_alias
1296 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1297   { { echo "$as_me:1297: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1298 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1299    { (exit 1); exit 1; }; }
1300
1301 fi
1302 echo "$as_me:1302: result: $ac_cv_target" >&5
1303 echo "${ECHO_T}$ac_cv_target" >&6
1304 target=$ac_cv_target
1305 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1306 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1307 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1308
1309 # The aliases save the names the user supplied, while $host etc.
1310 # will get canonicalized.
1311 test -n "$target_alias" &&
1312   test "$program_prefix$program_suffix$program_transform_name" = \
1313     NONENONEs,x,x, &&
1314   program_prefix=${target_alias}-
1315         system_name="$host_os"
1316 else
1317         system_name="`(uname -s -r) 2>/dev/null`"
1318         if test -z "$system_name" ; then
1319                 system_name="`(hostname) 2>/dev/null`"
1320         fi
1321 fi
1322 test -n "$system_name" && cat >>confdefs.h <<EOF
1323 #define SYSTEM_NAME "$system_name"
1324 EOF
1325
1326 if test "${cf_cv_system_name+set}" = set; then
1327   echo $ECHO_N "(cached) $ECHO_C" >&6
1328 else
1329   cf_cv_system_name="$system_name"
1330 fi
1331
1332 test -z "$system_name" && system_name="$cf_cv_system_name"
1333 test -n "$cf_cv_system_name" && echo "$as_me:1333: result: Configuring for $cf_cv_system_name" >&5
1334 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1335
1336 if test ".$system_name" != ".$cf_cv_system_name" ; then
1337         echo "$as_me:1337: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1338 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1339         { { echo "$as_me:1339: error: \"Please remove config.cache and try again.\"" >&5
1340 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1341    { (exit 1); exit 1; }; }
1342 fi
1343
1344 # Check whether --with-system-type or --without-system-type was given.
1345 if test "${with_system_type+set}" = set; then
1346   withval="$with_system_type"
1347   { echo "$as_me:1347: WARNING: overriding system type to $withval" >&5
1348 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1349  cf_cv_system_name=$withval
1350 fi;
1351
1352 ###     Save the given $CFLAGS to allow user-override.
1353 cf_user_CFLAGS="$CFLAGS"
1354
1355 ###     Default install-location
1356
1357 echo "$as_me:1357: checking for prefix" >&5
1358 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1359 if test "x$prefix" = "xNONE" ; then
1360         case "$cf_cv_system_name" in
1361                 # non-vendor systems don't have a conflict
1362         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1363                 prefix=/usr
1364                 ;;
1365         *)      prefix=$ac_default_prefix
1366                 ;;
1367         esac
1368 fi
1369 echo "$as_me:1369: result: $prefix" >&5
1370 echo "${ECHO_T}$prefix" >&6
1371
1372 if test "x$prefix" = "xNONE" ; then
1373 echo "$as_me:1373: checking for default include-directory" >&5
1374 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1375 test -n "$verbose" && echo 1>&6
1376 for cf_symbol in \
1377         $includedir \
1378         $includedir/ncurses \
1379         $prefix/include \
1380         $prefix/include/ncurses \
1381         /usr/local/include \
1382         /usr/local/include/ncurses \
1383         /usr/include \
1384         /usr/include/ncurses
1385 do
1386         cf_dir=`eval echo $cf_symbol`
1387         if test -f $cf_dir/curses.h ; then
1388         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1389                 includedir="$cf_symbol"
1390                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1391                 break
1392         fi
1393         fi
1394         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1395 done
1396 echo "$as_me:1396: result: $includedir" >&5
1397 echo "${ECHO_T}$includedir" >&6
1398 fi
1399
1400 ###     Checks for programs.
1401 ac_ext=c
1402 ac_cpp='$CPP $CPPFLAGS'
1403 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1404 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1405 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1406 ac_main_return=return
1407 if test -n "$ac_tool_prefix"; then
1408   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1409 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1410 echo "$as_me:1410: checking for $ac_word" >&5
1411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1412 if test "${ac_cv_prog_CC+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   if test -n "$CC"; then
1416   ac_cv_prog_CC="$CC" # Let the user override the test.
1417 else
1418   ac_save_IFS=$IFS; IFS=$ac_path_separator
1419 ac_dummy="$PATH"
1420 for ac_dir in $ac_dummy; do
1421   IFS=$ac_save_IFS
1422   test -z "$ac_dir" && ac_dir=.
1423   $as_executable_p "$ac_dir/$ac_word" || continue
1424 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1425 echo "$as_me:1425: found $ac_dir/$ac_word" >&5
1426 break
1427 done
1428
1429 fi
1430 fi
1431 CC=$ac_cv_prog_CC
1432 if test -n "$CC"; then
1433   echo "$as_me:1433: result: $CC" >&5
1434 echo "${ECHO_T}$CC" >&6
1435 else
1436   echo "$as_me:1436: result: no" >&5
1437 echo "${ECHO_T}no" >&6
1438 fi
1439
1440 fi
1441 if test -z "$ac_cv_prog_CC"; then
1442   ac_ct_CC=$CC
1443   # Extract the first word of "gcc", so it can be a program name with args.
1444 set dummy gcc; ac_word=$2
1445 echo "$as_me:1445: checking for $ac_word" >&5
1446 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1447 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1448   echo $ECHO_N "(cached) $ECHO_C" >&6
1449 else
1450   if test -n "$ac_ct_CC"; then
1451   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1452 else
1453   ac_save_IFS=$IFS; IFS=$ac_path_separator
1454 ac_dummy="$PATH"
1455 for ac_dir in $ac_dummy; do
1456   IFS=$ac_save_IFS
1457   test -z "$ac_dir" && ac_dir=.
1458   $as_executable_p "$ac_dir/$ac_word" || continue
1459 ac_cv_prog_ac_ct_CC="gcc"
1460 echo "$as_me:1460: found $ac_dir/$ac_word" >&5
1461 break
1462 done
1463
1464 fi
1465 fi
1466 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1467 if test -n "$ac_ct_CC"; then
1468   echo "$as_me:1468: result: $ac_ct_CC" >&5
1469 echo "${ECHO_T}$ac_ct_CC" >&6
1470 else
1471   echo "$as_me:1471: result: no" >&5
1472 echo "${ECHO_T}no" >&6
1473 fi
1474
1475   CC=$ac_ct_CC
1476 else
1477   CC="$ac_cv_prog_CC"
1478 fi
1479
1480 if test -z "$CC"; then
1481   if test -n "$ac_tool_prefix"; then
1482   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1483 set dummy ${ac_tool_prefix}cc; ac_word=$2
1484 echo "$as_me:1484: checking for $ac_word" >&5
1485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1486 if test "${ac_cv_prog_CC+set}" = set; then
1487   echo $ECHO_N "(cached) $ECHO_C" >&6
1488 else
1489   if test -n "$CC"; then
1490   ac_cv_prog_CC="$CC" # Let the user override the test.
1491 else
1492   ac_save_IFS=$IFS; IFS=$ac_path_separator
1493 ac_dummy="$PATH"
1494 for ac_dir in $ac_dummy; do
1495   IFS=$ac_save_IFS
1496   test -z "$ac_dir" && ac_dir=.
1497   $as_executable_p "$ac_dir/$ac_word" || continue
1498 ac_cv_prog_CC="${ac_tool_prefix}cc"
1499 echo "$as_me:1499: found $ac_dir/$ac_word" >&5
1500 break
1501 done
1502
1503 fi
1504 fi
1505 CC=$ac_cv_prog_CC
1506 if test -n "$CC"; then
1507   echo "$as_me:1507: result: $CC" >&5
1508 echo "${ECHO_T}$CC" >&6
1509 else
1510   echo "$as_me:1510: result: no" >&5
1511 echo "${ECHO_T}no" >&6
1512 fi
1513
1514 fi
1515 if test -z "$ac_cv_prog_CC"; then
1516   ac_ct_CC=$CC
1517   # Extract the first word of "cc", so it can be a program name with args.
1518 set dummy cc; ac_word=$2
1519 echo "$as_me:1519: checking for $ac_word" >&5
1520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1521 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1522   echo $ECHO_N "(cached) $ECHO_C" >&6
1523 else
1524   if test -n "$ac_ct_CC"; then
1525   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1526 else
1527   ac_save_IFS=$IFS; IFS=$ac_path_separator
1528 ac_dummy="$PATH"
1529 for ac_dir in $ac_dummy; do
1530   IFS=$ac_save_IFS
1531   test -z "$ac_dir" && ac_dir=.
1532   $as_executable_p "$ac_dir/$ac_word" || continue
1533 ac_cv_prog_ac_ct_CC="cc"
1534 echo "$as_me:1534: found $ac_dir/$ac_word" >&5
1535 break
1536 done
1537
1538 fi
1539 fi
1540 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1541 if test -n "$ac_ct_CC"; then
1542   echo "$as_me:1542: result: $ac_ct_CC" >&5
1543 echo "${ECHO_T}$ac_ct_CC" >&6
1544 else
1545   echo "$as_me:1545: result: no" >&5
1546 echo "${ECHO_T}no" >&6
1547 fi
1548
1549   CC=$ac_ct_CC
1550 else
1551   CC="$ac_cv_prog_CC"
1552 fi
1553
1554 fi
1555 if test -z "$CC"; then
1556   # Extract the first word of "cc", so it can be a program name with args.
1557 set dummy cc; ac_word=$2
1558 echo "$as_me:1558: checking for $ac_word" >&5
1559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1560 if test "${ac_cv_prog_CC+set}" = set; then
1561   echo $ECHO_N "(cached) $ECHO_C" >&6
1562 else
1563   if test -n "$CC"; then
1564   ac_cv_prog_CC="$CC" # Let the user override the test.
1565 else
1566   ac_prog_rejected=no
1567   ac_save_IFS=$IFS; IFS=$ac_path_separator
1568 ac_dummy="$PATH"
1569 for ac_dir in $ac_dummy; do
1570   IFS=$ac_save_IFS
1571   test -z "$ac_dir" && ac_dir=.
1572   $as_executable_p "$ac_dir/$ac_word" || continue
1573 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1574   ac_prog_rejected=yes
1575   continue
1576 fi
1577 ac_cv_prog_CC="cc"
1578 echo "$as_me:1578: found $ac_dir/$ac_word" >&5
1579 break
1580 done
1581
1582 if test $ac_prog_rejected = yes; then
1583   # We found a bogon in the path, so make sure we never use it.
1584   set dummy $ac_cv_prog_CC
1585   shift
1586   if test $# != 0; then
1587     # We chose a different compiler from the bogus one.
1588     # However, it has the same basename, so the bogon will be chosen
1589     # first if we set CC to just the basename; use the full file name.
1590     shift
1591     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1592     shift
1593     ac_cv_prog_CC="$@"
1594   fi
1595 fi
1596 fi
1597 fi
1598 CC=$ac_cv_prog_CC
1599 if test -n "$CC"; then
1600   echo "$as_me:1600: result: $CC" >&5
1601 echo "${ECHO_T}$CC" >&6
1602 else
1603   echo "$as_me:1603: result: no" >&5
1604 echo "${ECHO_T}no" >&6
1605 fi
1606
1607 fi
1608 if test -z "$CC"; then
1609   if test -n "$ac_tool_prefix"; then
1610   for ac_prog in cl
1611   do
1612     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1613 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1614 echo "$as_me:1614: checking for $ac_word" >&5
1615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1616 if test "${ac_cv_prog_CC+set}" = set; then
1617   echo $ECHO_N "(cached) $ECHO_C" >&6
1618 else
1619   if test -n "$CC"; then
1620   ac_cv_prog_CC="$CC" # Let the user override the test.
1621 else
1622   ac_save_IFS=$IFS; IFS=$ac_path_separator
1623 ac_dummy="$PATH"
1624 for ac_dir in $ac_dummy; do
1625   IFS=$ac_save_IFS
1626   test -z "$ac_dir" && ac_dir=.
1627   $as_executable_p "$ac_dir/$ac_word" || continue
1628 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1629 echo "$as_me:1629: found $ac_dir/$ac_word" >&5
1630 break
1631 done
1632
1633 fi
1634 fi
1635 CC=$ac_cv_prog_CC
1636 if test -n "$CC"; then
1637   echo "$as_me:1637: result: $CC" >&5
1638 echo "${ECHO_T}$CC" >&6
1639 else
1640   echo "$as_me:1640: result: no" >&5
1641 echo "${ECHO_T}no" >&6
1642 fi
1643
1644     test -n "$CC" && break
1645   done
1646 fi
1647 if test -z "$CC"; then
1648   ac_ct_CC=$CC
1649   for ac_prog in cl
1650 do
1651   # Extract the first word of "$ac_prog", so it can be a program name with args.
1652 set dummy $ac_prog; ac_word=$2
1653 echo "$as_me:1653: checking for $ac_word" >&5
1654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1655 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1656   echo $ECHO_N "(cached) $ECHO_C" >&6
1657 else
1658   if test -n "$ac_ct_CC"; then
1659   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1660 else
1661   ac_save_IFS=$IFS; IFS=$ac_path_separator
1662 ac_dummy="$PATH"
1663 for ac_dir in $ac_dummy; do
1664   IFS=$ac_save_IFS
1665   test -z "$ac_dir" && ac_dir=.
1666   $as_executable_p "$ac_dir/$ac_word" || continue
1667 ac_cv_prog_ac_ct_CC="$ac_prog"
1668 echo "$as_me:1668: found $ac_dir/$ac_word" >&5
1669 break
1670 done
1671
1672 fi
1673 fi
1674 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1675 if test -n "$ac_ct_CC"; then
1676   echo "$as_me:1676: result: $ac_ct_CC" >&5
1677 echo "${ECHO_T}$ac_ct_CC" >&6
1678 else
1679   echo "$as_me:1679: result: no" >&5
1680 echo "${ECHO_T}no" >&6
1681 fi
1682
1683   test -n "$ac_ct_CC" && break
1684 done
1685
1686   CC=$ac_ct_CC
1687 fi
1688
1689 fi
1690
1691 test -z "$CC" && { { echo "$as_me:1691: error: no acceptable cc found in \$PATH" >&5
1692 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1693    { (exit 1); exit 1; }; }
1694
1695 # Provide some information about the compiler.
1696 echo "$as_me:1696:" \
1697      "checking for C compiler version" >&5
1698 ac_compiler=`set X $ac_compile; echo $2`
1699 { (eval echo "$as_me:1699: \"$ac_compiler --version </dev/null >&5\"") >&5
1700   (eval $ac_compiler --version </dev/null >&5) 2>&5
1701   ac_status=$?
1702   echo "$as_me:1702: \$? = $ac_status" >&5
1703   (exit $ac_status); }
1704 { (eval echo "$as_me:1704: \"$ac_compiler -v </dev/null >&5\"") >&5
1705   (eval $ac_compiler -v </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -V </dev/null >&5\"") >&5
1710   (eval $ac_compiler -V </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714
1715 cat >conftest.$ac_ext <<_ACEOF
1716 #line 1716 "configure"
1717 #include "confdefs.h"
1718
1719 int
1720 main ()
1721 {
1722
1723   ;
1724   return 0;
1725 }
1726 _ACEOF
1727 ac_clean_files_save=$ac_clean_files
1728 ac_clean_files="$ac_clean_files a.out a.exe"
1729 # Try to create an executable without -o first, disregard a.out.
1730 # It will help us diagnose broken compilers, and finding out an intuition
1731 # of exeext.
1732 echo "$as_me:1732: checking for C compiler default output" >&5
1733 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1734 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1735 if { (eval echo "$as_me:1735: \"$ac_link_default\"") >&5
1736   (eval $ac_link_default) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; then
1740   # Find the output, starting from the most likely.  This scheme is
1741 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1742 # resort.
1743 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1744                 ls a.out conftest 2>/dev/null;
1745                 ls a.* conftest.* 2>/dev/null`; do
1746   case $ac_file in
1747     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1748     a.out ) # We found the default executable, but exeext='' is most
1749             # certainly right.
1750             break;;
1751     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1752           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1753           export ac_cv_exeext
1754           break;;
1755     * ) break;;
1756   esac
1757 done
1758 else
1759   echo "$as_me: failed program was:" >&5
1760 cat conftest.$ac_ext >&5
1761 { { echo "$as_me:1761: error: C compiler cannot create executables" >&5
1762 echo "$as_me: error: C compiler cannot create executables" >&2;}
1763    { (exit 77); exit 77; }; }
1764 fi
1765
1766 ac_exeext=$ac_cv_exeext
1767 echo "$as_me:1767: result: $ac_file" >&5
1768 echo "${ECHO_T}$ac_file" >&6
1769
1770 # Check the compiler produces executables we can run.  If not, either
1771 # the compiler is broken, or we cross compile.
1772 echo "$as_me:1772: checking whether the C compiler works" >&5
1773 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1774 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1775 # If not cross compiling, check that we can run a simple program.
1776 if test "$cross_compiling" != yes; then
1777   if { ac_try='./$ac_file'
1778   { (eval echo "$as_me:1778: \"$ac_try\"") >&5
1779   (eval $ac_try) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); }; }; then
1783     cross_compiling=no
1784   else
1785     if test "$cross_compiling" = maybe; then
1786         cross_compiling=yes
1787     else
1788         { { echo "$as_me:1788: error: cannot run C compiled programs.
1789 If you meant to cross compile, use \`--host'." >&5
1790 echo "$as_me: error: cannot run C compiled programs.
1791 If you meant to cross compile, use \`--host'." >&2;}
1792    { (exit 1); exit 1; }; }
1793     fi
1794   fi
1795 fi
1796 echo "$as_me:1796: result: yes" >&5
1797 echo "${ECHO_T}yes" >&6
1798
1799 rm -f a.out a.exe conftest$ac_cv_exeext
1800 ac_clean_files=$ac_clean_files_save
1801 # Check the compiler produces executables we can run.  If not, either
1802 # the compiler is broken, or we cross compile.
1803 echo "$as_me:1803: checking whether we are cross compiling" >&5
1804 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1805 echo "$as_me:1805: result: $cross_compiling" >&5
1806 echo "${ECHO_T}$cross_compiling" >&6
1807
1808 echo "$as_me:1808: checking for executable suffix" >&5
1809 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1810 if { (eval echo "$as_me:1810: \"$ac_link\"") >&5
1811   (eval $ac_link) 2>&5
1812   ac_status=$?
1813   echo "$as_me:1813: \$? = $ac_status" >&5
1814   (exit $ac_status); }; then
1815   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1816 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1817 # work properly (i.e., refer to `conftest.exe'), while it won't with
1818 # `rm'.
1819 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1820   case $ac_file in
1821     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1822     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1823           export ac_cv_exeext
1824           break;;
1825     * ) break;;
1826   esac
1827 done
1828 else
1829   { { echo "$as_me:1829: error: cannot compute EXEEXT: cannot compile and link" >&5
1830 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1831    { (exit 1); exit 1; }; }
1832 fi
1833
1834 rm -f conftest$ac_cv_exeext
1835 echo "$as_me:1835: result: $ac_cv_exeext" >&5
1836 echo "${ECHO_T}$ac_cv_exeext" >&6
1837
1838 rm -f conftest.$ac_ext
1839 EXEEXT=$ac_cv_exeext
1840 ac_exeext=$EXEEXT
1841 echo "$as_me:1841: checking for object suffix" >&5
1842 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1843 if test "${ac_cv_objext+set}" = set; then
1844   echo $ECHO_N "(cached) $ECHO_C" >&6
1845 else
1846   cat >conftest.$ac_ext <<_ACEOF
1847 #line 1847 "configure"
1848 #include "confdefs.h"
1849
1850 int
1851 main ()
1852 {
1853
1854   ;
1855   return 0;
1856 }
1857 _ACEOF
1858 rm -f conftest.o conftest.obj
1859 if { (eval echo "$as_me:1859: \"$ac_compile\"") >&5
1860   (eval $ac_compile) 2>&5
1861   ac_status=$?
1862   echo "$as_me:1862: \$? = $ac_status" >&5
1863   (exit $ac_status); }; then
1864   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1865   case $ac_file in
1866     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1867     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1868        break;;
1869   esac
1870 done
1871 else
1872   echo "$as_me: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1874 { { echo "$as_me:1874: error: cannot compute OBJEXT: cannot compile" >&5
1875 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1876    { (exit 1); exit 1; }; }
1877 fi
1878
1879 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1880 fi
1881 echo "$as_me:1881: result: $ac_cv_objext" >&5
1882 echo "${ECHO_T}$ac_cv_objext" >&6
1883 OBJEXT=$ac_cv_objext
1884 ac_objext=$OBJEXT
1885 echo "$as_me:1885: checking whether we are using the GNU C compiler" >&5
1886 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1887 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1888   echo $ECHO_N "(cached) $ECHO_C" >&6
1889 else
1890   cat >conftest.$ac_ext <<_ACEOF
1891 #line 1891 "configure"
1892 #include "confdefs.h"
1893
1894 int
1895 main ()
1896 {
1897 #ifndef __GNUC__
1898        choke me
1899 #endif
1900
1901   ;
1902   return 0;
1903 }
1904 _ACEOF
1905 rm -f conftest.$ac_objext
1906 if { (eval echo "$as_me:1906: \"$ac_compile\"") >&5
1907   (eval $ac_compile) 2>&5
1908   ac_status=$?
1909   echo "$as_me:1909: \$? = $ac_status" >&5
1910   (exit $ac_status); } &&
1911          { ac_try='test -s conftest.$ac_objext'
1912   { (eval echo "$as_me:1912: \"$ac_try\"") >&5
1913   (eval $ac_try) 2>&5
1914   ac_status=$?
1915   echo "$as_me:1915: \$? = $ac_status" >&5
1916   (exit $ac_status); }; }; then
1917   ac_compiler_gnu=yes
1918 else
1919   echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 ac_compiler_gnu=no
1922 fi
1923 rm -f conftest.$ac_objext conftest.$ac_ext
1924 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1925
1926 fi
1927 echo "$as_me:1927: result: $ac_cv_c_compiler_gnu" >&5
1928 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1929 GCC=`test $ac_compiler_gnu = yes && echo yes`
1930 ac_test_CFLAGS=${CFLAGS+set}
1931 ac_save_CFLAGS=$CFLAGS
1932 CFLAGS="-g"
1933 echo "$as_me:1933: checking whether $CC accepts -g" >&5
1934 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1935 if test "${ac_cv_prog_cc_g+set}" = set; then
1936   echo $ECHO_N "(cached) $ECHO_C" >&6
1937 else
1938   cat >conftest.$ac_ext <<_ACEOF
1939 #line 1939 "configure"
1940 #include "confdefs.h"
1941
1942 int
1943 main ()
1944 {
1945
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 rm -f conftest.$ac_objext
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952   (eval $ac_compile) 2>&5
1953   ac_status=$?
1954   echo "$as_me:1954: \$? = $ac_status" >&5
1955   (exit $ac_status); } &&
1956          { ac_try='test -s conftest.$ac_objext'
1957   { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1958   (eval $ac_try) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); }; }; then
1962   ac_cv_prog_cc_g=yes
1963 else
1964   echo "$as_me: failed program was:" >&5
1965 cat conftest.$ac_ext >&5
1966 ac_cv_prog_cc_g=no
1967 fi
1968 rm -f conftest.$ac_objext conftest.$ac_ext
1969 fi
1970 echo "$as_me:1970: result: $ac_cv_prog_cc_g" >&5
1971 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1972 if test "$ac_test_CFLAGS" = set; then
1973   CFLAGS=$ac_save_CFLAGS
1974 elif test $ac_cv_prog_cc_g = yes; then
1975   if test "$GCC" = yes; then
1976     CFLAGS="-g -O2"
1977   else
1978     CFLAGS="-g"
1979   fi
1980 else
1981   if test "$GCC" = yes; then
1982     CFLAGS="-O2"
1983   else
1984     CFLAGS=
1985   fi
1986 fi
1987 # Some people use a C++ compiler to compile C.  Since we use `exit',
1988 # in C++ we need to declare it.  In case someone uses the same compiler
1989 # for both compiling C and C++ we need to have the C++ compiler decide
1990 # the declaration of exit, since it's the most demanding environment.
1991 cat >conftest.$ac_ext <<_ACEOF
1992 #ifndef __cplusplus
1993   choke me
1994 #endif
1995 _ACEOF
1996 rm -f conftest.$ac_objext
1997 if { (eval echo "$as_me:1997: \"$ac_compile\"") >&5
1998   (eval $ac_compile) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit $ac_status); } &&
2002          { ac_try='test -s conftest.$ac_objext'
2003   { (eval echo "$as_me:2003: \"$ac_try\"") >&5
2004   (eval $ac_try) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); }; }; then
2008   for ac_declaration in \
2009    ''\
2010    '#include <stdlib.h>' \
2011    'extern "C" void std::exit (int) throw (); using std::exit;' \
2012    'extern "C" void std::exit (int); using std::exit;' \
2013    'extern "C" void exit (int) throw ();' \
2014    'extern "C" void exit (int);' \
2015    'void exit (int);'
2016 do
2017   cat >conftest.$ac_ext <<_ACEOF
2018 #line 2018 "configure"
2019 #include "confdefs.h"
2020 #include <stdlib.h>
2021 $ac_declaration
2022 int
2023 main ()
2024 {
2025 exit (42);
2026   ;
2027   return 0;
2028 }
2029 _ACEOF
2030 rm -f conftest.$ac_objext
2031 if { (eval echo "$as_me:2031: \"$ac_compile\"") >&5
2032   (eval $ac_compile) 2>&5
2033   ac_status=$?
2034   echo "$as_me:2034: \$? = $ac_status" >&5
2035   (exit $ac_status); } &&
2036          { ac_try='test -s conftest.$ac_objext'
2037   { (eval echo "$as_me:2037: \"$ac_try\"") >&5
2038   (eval $ac_try) 2>&5
2039   ac_status=$?
2040   echo "$as_me:2040: \$? = $ac_status" >&5
2041   (exit $ac_status); }; }; then
2042   :
2043 else
2044   echo "$as_me: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2046 continue
2047 fi
2048 rm -f conftest.$ac_objext conftest.$ac_ext
2049   cat >conftest.$ac_ext <<_ACEOF
2050 #line 2050 "configure"
2051 #include "confdefs.h"
2052 $ac_declaration
2053 int
2054 main ()
2055 {
2056 exit (42);
2057   ;
2058   return 0;
2059 }
2060 _ACEOF
2061 rm -f conftest.$ac_objext
2062 if { (eval echo "$as_me:2062: \"$ac_compile\"") >&5
2063   (eval $ac_compile) 2>&5
2064   ac_status=$?
2065   echo "$as_me:2065: \$? = $ac_status" >&5
2066   (exit $ac_status); } &&
2067          { ac_try='test -s conftest.$ac_objext'
2068   { (eval echo "$as_me:2068: \"$ac_try\"") >&5
2069   (eval $ac_try) 2>&5
2070   ac_status=$?
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit $ac_status); }; }; then
2073   break
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 done
2080 rm -f conftest*
2081 if test -n "$ac_declaration"; then
2082   echo '#ifdef __cplusplus' >>confdefs.h
2083   echo $ac_declaration      >>confdefs.h
2084   echo '#endif'             >>confdefs.h
2085 fi
2086
2087 else
2088   echo "$as_me: failed program was:" >&5
2089 cat conftest.$ac_ext >&5
2090 fi
2091 rm -f conftest.$ac_objext conftest.$ac_ext
2092 ac_ext=c
2093 ac_cpp='$CPP $CPPFLAGS'
2094 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2095 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2096 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2097 ac_main_return=return
2098
2099 GCC_VERSION=none
2100 if test "$GCC" = yes ; then
2101         echo "$as_me:2101: checking version of $CC" >&5
2102 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2103         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2104         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2105         echo "$as_me:2105: result: $GCC_VERSION" >&5
2106 echo "${ECHO_T}$GCC_VERSION" >&6
2107 fi
2108
2109 ac_ext=c
2110 ac_cpp='$CPP $CPPFLAGS'
2111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2114 ac_main_return=return
2115 echo "$as_me:2115: checking how to run the C preprocessor" >&5
2116 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2117 # On Suns, sometimes $CPP names a directory.
2118 if test -n "$CPP" && test -d "$CPP"; then
2119   CPP=
2120 fi
2121 if test -z "$CPP"; then
2122   if test "${ac_cv_prog_CPP+set}" = set; then
2123   echo $ECHO_N "(cached) $ECHO_C" >&6
2124 else
2125       # Double quotes because CPP needs to be expanded
2126     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2127     do
2128       ac_preproc_ok=false
2129 for ac_c_preproc_warn_flag in '' yes
2130 do
2131   # Use a header file that comes with gcc, so configuring glibc
2132   # with a fresh cross-compiler works.
2133   # On the NeXT, cc -E runs the code through the compiler's parser,
2134   # not just through cpp. "Syntax error" is here to catch this case.
2135   cat >conftest.$ac_ext <<_ACEOF
2136 #line 2136 "configure"
2137 #include "confdefs.h"
2138 #include <assert.h>
2139                      Syntax error
2140 _ACEOF
2141 if { (eval echo "$as_me:2141: \"$ac_cpp conftest.$ac_ext\"") >&5
2142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2143   ac_status=$?
2144   egrep -v '^ *\+' conftest.er1 >conftest.err
2145   rm -f conftest.er1
2146   cat conftest.err >&5
2147   echo "$as_me:2147: \$? = $ac_status" >&5
2148   (exit $ac_status); } >/dev/null; then
2149   if test -s conftest.err; then
2150     ac_cpp_err=$ac_c_preproc_warn_flag
2151   else
2152     ac_cpp_err=
2153   fi
2154 else
2155   ac_cpp_err=yes
2156 fi
2157 if test -z "$ac_cpp_err"; then
2158   :
2159 else
2160   echo "$as_me: failed program was:" >&5
2161   cat conftest.$ac_ext >&5
2162   # Broken: fails on valid input.
2163 continue
2164 fi
2165 rm -f conftest.err conftest.$ac_ext
2166
2167   # OK, works on sane cases.  Now check whether non-existent headers
2168   # can be detected and how.
2169   cat >conftest.$ac_ext <<_ACEOF
2170 #line 2170 "configure"
2171 #include "confdefs.h"
2172 #include <ac_nonexistent.h>
2173 _ACEOF
2174 if { (eval echo "$as_me:2174: \"$ac_cpp conftest.$ac_ext\"") >&5
2175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2176   ac_status=$?
2177   egrep -v '^ *\+' conftest.er1 >conftest.err
2178   rm -f conftest.er1
2179   cat conftest.err >&5
2180   echo "$as_me:2180: \$? = $ac_status" >&5
2181   (exit $ac_status); } >/dev/null; then
2182   if test -s conftest.err; then
2183     ac_cpp_err=$ac_c_preproc_warn_flag
2184   else
2185     ac_cpp_err=
2186   fi
2187 else
2188   ac_cpp_err=yes
2189 fi
2190 if test -z "$ac_cpp_err"; then
2191   # Broken: success on invalid input.
2192 continue
2193 else
2194   echo "$as_me: failed program was:" >&5
2195   cat conftest.$ac_ext >&5
2196   # Passes both tests.
2197 ac_preproc_ok=:
2198 break
2199 fi
2200 rm -f conftest.err conftest.$ac_ext
2201
2202 done
2203 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2204 rm -f conftest.err conftest.$ac_ext
2205 if $ac_preproc_ok; then
2206   break
2207 fi
2208
2209     done
2210     ac_cv_prog_CPP=$CPP
2211
2212 fi
2213   CPP=$ac_cv_prog_CPP
2214 else
2215   ac_cv_prog_CPP=$CPP
2216 fi
2217 echo "$as_me:2217: result: $CPP" >&5
2218 echo "${ECHO_T}$CPP" >&6
2219 ac_preproc_ok=false
2220 for ac_c_preproc_warn_flag in '' yes
2221 do
2222   # Use a header file that comes with gcc, so configuring glibc
2223   # with a fresh cross-compiler works.
2224   # On the NeXT, cc -E runs the code through the compiler's parser,
2225   # not just through cpp. "Syntax error" is here to catch this case.
2226   cat >conftest.$ac_ext <<_ACEOF
2227 #line 2227 "configure"
2228 #include "confdefs.h"
2229 #include <assert.h>
2230                      Syntax error
2231 _ACEOF
2232 if { (eval echo "$as_me:2232: \"$ac_cpp conftest.$ac_ext\"") >&5
2233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2234   ac_status=$?
2235   egrep -v '^ *\+' conftest.er1 >conftest.err
2236   rm -f conftest.er1
2237   cat conftest.err >&5
2238   echo "$as_me:2238: \$? = $ac_status" >&5
2239   (exit $ac_status); } >/dev/null; then
2240   if test -s conftest.err; then
2241     ac_cpp_err=$ac_c_preproc_warn_flag
2242   else
2243     ac_cpp_err=
2244   fi
2245 else
2246   ac_cpp_err=yes
2247 fi
2248 if test -z "$ac_cpp_err"; then
2249   :
2250 else
2251   echo "$as_me: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   # Broken: fails on valid input.
2254 continue
2255 fi
2256 rm -f conftest.err conftest.$ac_ext
2257
2258   # OK, works on sane cases.  Now check whether non-existent headers
2259   # can be detected and how.
2260   cat >conftest.$ac_ext <<_ACEOF
2261 #line 2261 "configure"
2262 #include "confdefs.h"
2263 #include <ac_nonexistent.h>
2264 _ACEOF
2265 if { (eval echo "$as_me:2265: \"$ac_cpp conftest.$ac_ext\"") >&5
2266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2267   ac_status=$?
2268   egrep -v '^ *\+' conftest.er1 >conftest.err
2269   rm -f conftest.er1
2270   cat conftest.err >&5
2271   echo "$as_me:2271: \$? = $ac_status" >&5
2272   (exit $ac_status); } >/dev/null; then
2273   if test -s conftest.err; then
2274     ac_cpp_err=$ac_c_preproc_warn_flag
2275   else
2276     ac_cpp_err=
2277   fi
2278 else
2279   ac_cpp_err=yes
2280 fi
2281 if test -z "$ac_cpp_err"; then
2282   # Broken: success on invalid input.
2283 continue
2284 else
2285   echo "$as_me: failed program was:" >&5
2286   cat conftest.$ac_ext >&5
2287   # Passes both tests.
2288 ac_preproc_ok=:
2289 break
2290 fi
2291 rm -f conftest.err conftest.$ac_ext
2292
2293 done
2294 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2295 rm -f conftest.err conftest.$ac_ext
2296 if $ac_preproc_ok; then
2297   :
2298 else
2299   { { echo "$as_me:2299: error: C preprocessor \"$CPP\" fails sanity check" >&5
2300 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2301    { (exit 1); exit 1; }; }
2302 fi
2303
2304 ac_ext=c
2305 ac_cpp='$CPP $CPPFLAGS'
2306 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2307 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2308 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2309 ac_main_return=return
2310
2311 if test $ac_cv_c_compiler_gnu = yes; then
2312     echo "$as_me:2312: checking whether $CC needs -traditional" >&5
2313 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2314 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2315   echo $ECHO_N "(cached) $ECHO_C" >&6
2316 else
2317     ac_pattern="Autoconf.*'x'"
2318   cat >conftest.$ac_ext <<_ACEOF
2319 #line 2319 "configure"
2320 #include "confdefs.h"
2321 #include <sgtty.h>
2322 int Autoconf = TIOCGETP;
2323 _ACEOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "$ac_pattern" >/dev/null 2>&1; then
2326   ac_cv_prog_gcc_traditional=yes
2327 else
2328   ac_cv_prog_gcc_traditional=no
2329 fi
2330 rm -f conftest*
2331
2332   if test $ac_cv_prog_gcc_traditional = no; then
2333     cat >conftest.$ac_ext <<_ACEOF
2334 #line 2334 "configure"
2335 #include "confdefs.h"
2336 #include <termio.h>
2337 int Autoconf = TCGETA;
2338 _ACEOF
2339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2340   egrep "$ac_pattern" >/dev/null 2>&1; then
2341   ac_cv_prog_gcc_traditional=yes
2342 fi
2343 rm -f conftest*
2344
2345   fi
2346 fi
2347 echo "$as_me:2347: result: $ac_cv_prog_gcc_traditional" >&5
2348 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2349   if test $ac_cv_prog_gcc_traditional = yes; then
2350     CC="$CC -traditional"
2351   fi
2352 fi
2353
2354 echo "$as_me:2354: checking whether $CC understands -c and -o together" >&5
2355 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2356 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2357   echo $ECHO_N "(cached) $ECHO_C" >&6
2358 else
2359
2360 cat > conftest.$ac_ext <<CF_EOF
2361 #include <stdio.h>
2362 int main()
2363 {
2364         ${cf_cv_main_return:-return}(0);
2365 }
2366 CF_EOF
2367 # We do the test twice because some compilers refuse to overwrite an
2368 # existing .o file with -o, though they will create one.
2369 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2370 if { (eval echo "$as_me:2370: \"$ac_try\"") >&5
2371   (eval $ac_try) 2>&5
2372   ac_status=$?
2373   echo "$as_me:2373: \$? = $ac_status" >&5
2374   (exit $ac_status); } &&
2375   test -f conftest2.$ac_objext && { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); };
2380 then
2381   eval cf_cv_prog_CC_c_o=yes
2382 else
2383   eval cf_cv_prog_CC_c_o=no
2384 fi
2385 rm -f conftest*
2386
2387 fi
2388 if test $cf_cv_prog_CC_c_o = yes; then
2389   echo "$as_me:2389: result: yes" >&5
2390 echo "${ECHO_T}yes" >&6
2391 else
2392   echo "$as_me:2392: result: no" >&5
2393 echo "${ECHO_T}no" >&6
2394 fi
2395
2396 echo "$as_me:2396: checking for POSIXized ISC" >&5
2397 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2398 if test -d /etc/conf/kconfig.d &&
2399    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2400 then
2401   echo "$as_me:2401: result: yes" >&5
2402 echo "${ECHO_T}yes" >&6
2403   ISC=yes # If later tests want to check for ISC.
2404
2405 cat >>confdefs.h <<\EOF
2406 #define _POSIX_SOURCE 1
2407 EOF
2408
2409   if test "$GCC" = yes; then
2410     CC="$CC -posix"
2411   else
2412     CC="$CC -Xp"
2413   fi
2414 else
2415   echo "$as_me:2415: result: no" >&5
2416 echo "${ECHO_T}no" >&6
2417   ISC=
2418 fi
2419
2420 echo "$as_me:2420: checking for ${CC-cc} option to accept ANSI C" >&5
2421 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2422 if test "${cf_cv_ansi_cc+set}" = set; then
2423   echo $ECHO_N "(cached) $ECHO_C" >&6
2424 else
2425
2426 cf_cv_ansi_cc=no
2427 cf_save_CFLAGS="$CFLAGS"
2428 cf_save_CPPFLAGS="$CPPFLAGS"
2429 # Don't try gcc -ansi; that turns off useful extensions and
2430 # breaks some systems' header files.
2431 # AIX                   -qlanglvl=ansi
2432 # Ultrix and OSF/1      -std1
2433 # HP-UX                 -Aa -D_HPUX_SOURCE
2434 # SVR4                  -Xc
2435 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2436 for cf_arg in "-DCC_HAS_PROTOS" \
2437         "" \
2438         -qlanglvl=ansi \
2439         -std1 \
2440         -Ae \
2441         "-Aa -D_HPUX_SOURCE" \
2442         -Xc
2443 do
2444
2445 cf_fix_cppflags=no
2446 cf_new_cflags=
2447 cf_new_cppflags=
2448 cf_new_extra_cppflags=
2449
2450 for cf_add_cflags in $cf_arg
2451 do
2452 case $cf_fix_cppflags in
2453 no)
2454         case $cf_add_cflags in #(vi
2455         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2456                 case $cf_add_cflags in
2457                 -D*)
2458                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2459
2460                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2461                                 && test -z "${cf_tst_cflags}" \
2462                                 && cf_fix_cppflags=yes
2463
2464                         if test $cf_fix_cppflags = yes ; then
2465                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2466                                 continue
2467                         elif test "${cf_tst_cflags}" = "\"'" ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         fi
2471                         ;;
2472                 esac
2473                 case "$CPPFLAGS" in
2474                 *$cf_add_cflags) #(vi
2475                         ;;
2476                 *) #(vi
2477                         case $cf_add_cflags in #(vi
2478                         -D*)
2479                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2480
2481 CPPFLAGS=`echo "$CPPFLAGS" | \
2482         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2483                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2484
2485                                 ;;
2486                         esac
2487                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2488                         ;;
2489                 esac
2490                 ;;
2491         *)
2492                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2493                 ;;
2494         esac
2495         ;;
2496 yes)
2497         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2498
2499         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2500
2501         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2502                 && test -z "${cf_tst_cflags}" \
2503                 && cf_fix_cppflags=no
2504         ;;
2505 esac
2506 done
2507
2508 if test -n "$cf_new_cflags" ; then
2509
2510         CFLAGS="$CFLAGS $cf_new_cflags"
2511 fi
2512
2513 if test -n "$cf_new_cppflags" ; then
2514
2515         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2516 fi
2517
2518 if test -n "$cf_new_extra_cppflags" ; then
2519
2520         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2521 fi
2522
2523         cat >conftest.$ac_ext <<_ACEOF
2524 #line 2524 "configure"
2525 #include "confdefs.h"
2526
2527 #ifndef CC_HAS_PROTOS
2528 #if !defined(__STDC__) || (__STDC__ != 1)
2529 choke me
2530 #endif
2531 #endif
2532
2533 int
2534 main ()
2535 {
2536
2537         int test (int i, double x);
2538         struct s1 {int (*f) (int a);};
2539         struct s2 {int (*f) (double a);};
2540   ;
2541   return 0;
2542 }
2543 _ACEOF
2544 rm -f conftest.$ac_objext
2545 if { (eval echo "$as_me:2545: \"$ac_compile\"") >&5
2546   (eval $ac_compile) 2>&5
2547   ac_status=$?
2548   echo "$as_me:2548: \$? = $ac_status" >&5
2549   (exit $ac_status); } &&
2550          { ac_try='test -s conftest.$ac_objext'
2551   { (eval echo "$as_me:2551: \"$ac_try\"") >&5
2552   (eval $ac_try) 2>&5
2553   ac_status=$?
2554   echo "$as_me:2554: \$? = $ac_status" >&5
2555   (exit $ac_status); }; }; then
2556   cf_cv_ansi_cc="$cf_arg"; break
2557 else
2558   echo "$as_me: failed program was:" >&5
2559 cat conftest.$ac_ext >&5
2560 fi
2561 rm -f conftest.$ac_objext conftest.$ac_ext
2562 done
2563 CFLAGS="$cf_save_CFLAGS"
2564 CPPFLAGS="$cf_save_CPPFLAGS"
2565
2566 fi
2567 echo "$as_me:2567: result: $cf_cv_ansi_cc" >&5
2568 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2569
2570 if test "$cf_cv_ansi_cc" != "no"; then
2571 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2572
2573 cf_fix_cppflags=no
2574 cf_new_cflags=
2575 cf_new_cppflags=
2576 cf_new_extra_cppflags=
2577
2578 for cf_add_cflags in $cf_cv_ansi_cc
2579 do
2580 case $cf_fix_cppflags in
2581 no)
2582         case $cf_add_cflags in #(vi
2583         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2584                 case $cf_add_cflags in
2585                 -D*)
2586                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2587
2588                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2589                                 && test -z "${cf_tst_cflags}" \
2590                                 && cf_fix_cppflags=yes
2591
2592                         if test $cf_fix_cppflags = yes ; then
2593                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2594                                 continue
2595                         elif test "${cf_tst_cflags}" = "\"'" ; then
2596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597                                 continue
2598                         fi
2599                         ;;
2600                 esac
2601                 case "$CPPFLAGS" in
2602                 *$cf_add_cflags) #(vi
2603                         ;;
2604                 *) #(vi
2605                         case $cf_add_cflags in #(vi
2606                         -D*)
2607                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2608
2609 CPPFLAGS=`echo "$CPPFLAGS" | \
2610         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2611                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2612
2613                                 ;;
2614                         esac
2615                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2616                         ;;
2617                 esac
2618                 ;;
2619         *)
2620                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2621                 ;;
2622         esac
2623         ;;
2624 yes)
2625         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2626
2627         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2628
2629         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2630                 && test -z "${cf_tst_cflags}" \
2631                 && cf_fix_cppflags=no
2632         ;;
2633 esac
2634 done
2635
2636 if test -n "$cf_new_cflags" ; then
2637
2638         CFLAGS="$CFLAGS $cf_new_cflags"
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2644 fi
2645
2646 if test -n "$cf_new_extra_cppflags" ; then
2647
2648         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2649 fi
2650
2651 else
2652         cat >>confdefs.h <<\EOF
2653 #define CC_HAS_PROTOS 1
2654 EOF
2655
2656 fi
2657 fi
2658
2659 if test "$cf_cv_ansi_cc" = "no"; then
2660         { { echo "$as_me:2660: error: Your compiler does not appear to recognize prototypes.
2661 You have the following choices:
2662         a. adjust your compiler options
2663         b. get an up-to-date compiler
2664         c. use a wrapper such as unproto" >&5
2665 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2666 You have the following choices:
2667         a. adjust your compiler options
2668         b. get an up-to-date compiler
2669         c. use a wrapper such as unproto" >&2;}
2670    { (exit 1); exit 1; }; }
2671 fi
2672
2673 case $cf_cv_system_name in
2674 os2*)
2675     CFLAGS="$CFLAGS -Zmt"
2676     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2677     CXXFLAGS="$CXXFLAGS -Zmt"
2678     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2679     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2680     ac_cv_exeext=.exe
2681     ;;
2682 esac
2683
2684 PROG_EXT="$EXEEXT"
2685
2686 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2687 #define PROG_EXT "$PROG_EXT"
2688 EOF
2689
2690 if test "$cross_compiling" = yes ; then
2691   LDCONFIG=:
2692 else
2693 case "$cf_cv_system_name" in #(vi
2694 dragonfly*|freebsd*) #(vi
2695   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2696   ;;
2697 *) LDPATH=$PATH:/sbin:/usr/sbin
2698   # Extract the first word of "ldconfig", so it can be a program name with args.
2699 set dummy ldconfig; ac_word=$2
2700 echo "$as_me:2700: checking for $ac_word" >&5
2701 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2702 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2703   echo $ECHO_N "(cached) $ECHO_C" >&6
2704 else
2705   case $LDCONFIG in
2706   [\\/]* | ?:[\\/]*)
2707   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2708   ;;
2709   *)
2710   ac_save_IFS=$IFS; IFS=$ac_path_separator
2711 ac_dummy="$LDPATH"
2712 for ac_dir in $ac_dummy; do
2713   IFS=$ac_save_IFS
2714   test -z "$ac_dir" && ac_dir=.
2715   if $as_executable_p "$ac_dir/$ac_word"; then
2716    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2717    echo "$as_me:2717: found $ac_dir/$ac_word" >&5
2718    break
2719 fi
2720 done
2721
2722   ;;
2723 esac
2724 fi
2725 LDCONFIG=$ac_cv_path_LDCONFIG
2726
2727 if test -n "$LDCONFIG"; then
2728   echo "$as_me:2728: result: $LDCONFIG" >&5
2729 echo "${ECHO_T}$LDCONFIG" >&6
2730 else
2731   echo "$as_me:2731: result: no" >&5
2732 echo "${ECHO_T}no" >&6
2733 fi
2734
2735   ;;
2736 esac
2737 fi
2738
2739 echo "$as_me:2739: checking if you want to ensure bool is consistent with C++" >&5
2740 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2741
2742 # Check whether --with-cxx or --without-cxx was given.
2743 if test "${with_cxx+set}" = set; then
2744   withval="$with_cxx"
2745   cf_with_cxx=$withval
2746 else
2747   cf_with_cxx=yes
2748 fi;
2749 echo "$as_me:2749: result: $cf_with_cxx" >&5
2750 echo "${ECHO_T}$cf_with_cxx" >&6
2751 if test "X$cf_with_cxx" = Xno ; then
2752         CXX=""
2753         GXX=""
2754 else
2755         # with autoconf 2.13, we can change the error to a warning:
2756                 ac_ext=cc
2757 ac_cpp='$CXXCPP $CPPFLAGS'
2758 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2759 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2760 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2761 ac_main_return=return
2762 if test -n "$ac_tool_prefix"; then
2763   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2764   do
2765     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2766 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2767 echo "$as_me:2767: checking for $ac_word" >&5
2768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2769 if test "${ac_cv_prog_CXX+set}" = set; then
2770   echo $ECHO_N "(cached) $ECHO_C" >&6
2771 else
2772   if test -n "$CXX"; then
2773   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2774 else
2775   ac_save_IFS=$IFS; IFS=$ac_path_separator
2776 ac_dummy="$PATH"
2777 for ac_dir in $ac_dummy; do
2778   IFS=$ac_save_IFS
2779   test -z "$ac_dir" && ac_dir=.
2780   $as_executable_p "$ac_dir/$ac_word" || continue
2781 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2782 echo "$as_me:2782: found $ac_dir/$ac_word" >&5
2783 break
2784 done
2785
2786 fi
2787 fi
2788 CXX=$ac_cv_prog_CXX
2789 if test -n "$CXX"; then
2790   echo "$as_me:2790: result: $CXX" >&5
2791 echo "${ECHO_T}$CXX" >&6
2792 else
2793   echo "$as_me:2793: result: no" >&5
2794 echo "${ECHO_T}no" >&6
2795 fi
2796
2797     test -n "$CXX" && break
2798   done
2799 fi
2800 if test -z "$CXX"; then
2801   ac_ct_CXX=$CXX
2802   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2803 do
2804   # Extract the first word of "$ac_prog", so it can be a program name with args.
2805 set dummy $ac_prog; ac_word=$2
2806 echo "$as_me:2806: checking for $ac_word" >&5
2807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2808 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2809   echo $ECHO_N "(cached) $ECHO_C" >&6
2810 else
2811   if test -n "$ac_ct_CXX"; then
2812   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2813 else
2814   ac_save_IFS=$IFS; IFS=$ac_path_separator
2815 ac_dummy="$PATH"
2816 for ac_dir in $ac_dummy; do
2817   IFS=$ac_save_IFS
2818   test -z "$ac_dir" && ac_dir=.
2819   $as_executable_p "$ac_dir/$ac_word" || continue
2820 ac_cv_prog_ac_ct_CXX="$ac_prog"
2821 echo "$as_me:2821: found $ac_dir/$ac_word" >&5
2822 break
2823 done
2824
2825 fi
2826 fi
2827 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2828 if test -n "$ac_ct_CXX"; then
2829   echo "$as_me:2829: result: $ac_ct_CXX" >&5
2830 echo "${ECHO_T}$ac_ct_CXX" >&6
2831 else
2832   echo "$as_me:2832: result: no" >&5
2833 echo "${ECHO_T}no" >&6
2834 fi
2835
2836   test -n "$ac_ct_CXX" && break
2837 done
2838 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2839
2840   CXX=$ac_ct_CXX
2841 fi
2842
2843 # Provide some information about the compiler.
2844 echo "$as_me:2844:" \
2845      "checking for C++ compiler version" >&5
2846 ac_compiler=`set X $ac_compile; echo $2`
2847 { (eval echo "$as_me:2847: \"$ac_compiler --version </dev/null >&5\"") >&5
2848   (eval $ac_compiler --version </dev/null >&5) 2>&5
2849   ac_status=$?
2850   echo "$as_me:2850: \$? = $ac_status" >&5
2851   (exit $ac_status); }
2852 { (eval echo "$as_me:2852: \"$ac_compiler -v </dev/null >&5\"") >&5
2853   (eval $ac_compiler -v </dev/null >&5) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); }
2857 { (eval echo "$as_me:2857: \"$ac_compiler -V </dev/null >&5\"") >&5
2858   (eval $ac_compiler -V </dev/null >&5) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }
2862
2863 echo "$as_me:2863: checking whether we are using the GNU C++ compiler" >&5
2864 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2865 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2866   echo $ECHO_N "(cached) $ECHO_C" >&6
2867 else
2868   cat >conftest.$ac_ext <<_ACEOF
2869 #line 2869 "configure"
2870 #include "confdefs.h"
2871
2872 int
2873 main ()
2874 {
2875 #ifndef __GNUC__
2876        choke me
2877 #endif
2878
2879   ;
2880   return 0;
2881 }
2882 _ACEOF
2883 rm -f conftest.$ac_objext
2884 if { (eval echo "$as_me:2884: \"$ac_compile\"") >&5
2885   (eval $ac_compile) 2>&5
2886   ac_status=$?
2887   echo "$as_me:2887: \$? = $ac_status" >&5
2888   (exit $ac_status); } &&
2889          { ac_try='test -s conftest.$ac_objext'
2890   { (eval echo "$as_me:2890: \"$ac_try\"") >&5
2891   (eval $ac_try) 2>&5
2892   ac_status=$?
2893   echo "$as_me:2893: \$? = $ac_status" >&5
2894   (exit $ac_status); }; }; then
2895   ac_compiler_gnu=yes
2896 else
2897   echo "$as_me: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2899 ac_compiler_gnu=no
2900 fi
2901 rm -f conftest.$ac_objext conftest.$ac_ext
2902 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2903
2904 fi
2905 echo "$as_me:2905: result: $ac_cv_cxx_compiler_gnu" >&5
2906 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2907 GXX=`test $ac_compiler_gnu = yes && echo yes`
2908 ac_test_CXXFLAGS=${CXXFLAGS+set}
2909 ac_save_CXXFLAGS=$CXXFLAGS
2910 CXXFLAGS="-g"
2911 echo "$as_me:2911: checking whether $CXX accepts -g" >&5
2912 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2913 if test "${ac_cv_prog_cxx_g+set}" = set; then
2914   echo $ECHO_N "(cached) $ECHO_C" >&6
2915 else
2916   cat >conftest.$ac_ext <<_ACEOF
2917 #line 2917 "configure"
2918 #include "confdefs.h"
2919
2920 int
2921 main ()
2922 {
2923
2924   ;
2925   return 0;
2926 }
2927 _ACEOF
2928 rm -f conftest.$ac_objext
2929 if { (eval echo "$as_me:2929: \"$ac_compile\"") >&5
2930   (eval $ac_compile) 2>&5
2931   ac_status=$?
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit $ac_status); } &&
2934          { ac_try='test -s conftest.$ac_objext'
2935   { (eval echo "$as_me:2935: \"$ac_try\"") >&5
2936   (eval $ac_try) 2>&5
2937   ac_status=$?
2938   echo "$as_me:2938: \$? = $ac_status" >&5
2939   (exit $ac_status); }; }; then
2940   ac_cv_prog_cxx_g=yes
2941 else
2942   echo "$as_me: failed program was:" >&5
2943 cat conftest.$ac_ext >&5
2944 ac_cv_prog_cxx_g=no
2945 fi
2946 rm -f conftest.$ac_objext conftest.$ac_ext
2947 fi
2948 echo "$as_me:2948: result: $ac_cv_prog_cxx_g" >&5
2949 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2950 if test "$ac_test_CXXFLAGS" = set; then
2951   CXXFLAGS=$ac_save_CXXFLAGS
2952 elif test $ac_cv_prog_cxx_g = yes; then
2953   if test "$GXX" = yes; then
2954     CXXFLAGS="-g -O2"
2955   else
2956     CXXFLAGS="-g"
2957   fi
2958 else
2959   if test "$GXX" = yes; then
2960     CXXFLAGS="-O2"
2961   else
2962     CXXFLAGS=
2963   fi
2964 fi
2965 for ac_declaration in \
2966    ''\
2967    '#include <stdlib.h>' \
2968    'extern "C" void std::exit (int) throw (); using std::exit;' \
2969    'extern "C" void std::exit (int); using std::exit;' \
2970    'extern "C" void exit (int) throw ();' \
2971    'extern "C" void exit (int);' \
2972    'void exit (int);'
2973 do
2974   cat >conftest.$ac_ext <<_ACEOF
2975 #line 2975 "configure"
2976 #include "confdefs.h"
2977 #include <stdlib.h>
2978 $ac_declaration
2979 int
2980 main ()
2981 {
2982 exit (42);
2983   ;
2984   return 0;
2985 }
2986 _ACEOF
2987 rm -f conftest.$ac_objext
2988 if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5
2989   (eval $ac_compile) 2>&5
2990   ac_status=$?
2991   echo "$as_me:2991: \$? = $ac_status" >&5
2992   (exit $ac_status); } &&
2993          { ac_try='test -s conftest.$ac_objext'
2994   { (eval echo "$as_me:2994: \"$ac_try\"") >&5
2995   (eval $ac_try) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); }; }; then
2999   :
3000 else
3001   echo "$as_me: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 continue
3004 fi
3005 rm -f conftest.$ac_objext conftest.$ac_ext
3006   cat >conftest.$ac_ext <<_ACEOF
3007 #line 3007 "configure"
3008 #include "confdefs.h"
3009 $ac_declaration
3010 int
3011 main ()
3012 {
3013 exit (42);
3014   ;
3015   return 0;
3016 }
3017 _ACEOF
3018 rm -f conftest.$ac_objext
3019 if { (eval echo "$as_me:3019: \"$ac_compile\"") >&5
3020   (eval $ac_compile) 2>&5
3021   ac_status=$?
3022   echo "$as_me:3022: \$? = $ac_status" >&5
3023   (exit $ac_status); } &&
3024          { ac_try='test -s conftest.$ac_objext'
3025   { (eval echo "$as_me:3025: \"$ac_try\"") >&5
3026   (eval $ac_try) 2>&5
3027   ac_status=$?
3028   echo "$as_me:3028: \$? = $ac_status" >&5
3029   (exit $ac_status); }; }; then
3030   break
3031 else
3032   echo "$as_me: failed program was:" >&5
3033 cat conftest.$ac_ext >&5
3034 fi
3035 rm -f conftest.$ac_objext conftest.$ac_ext
3036 done
3037 rm -f conftest*
3038 if test -n "$ac_declaration"; then
3039   echo '#ifdef __cplusplus' >>confdefs.h
3040   echo $ac_declaration      >>confdefs.h
3041   echo '#endif'             >>confdefs.h
3042 fi
3043
3044 ac_ext=c
3045 ac_cpp='$CPP $CPPFLAGS'
3046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3049 ac_main_return=return
3050
3051                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3052         if test "$CXX" = "g++" ; then
3053                 # Extract the first word of "g++", so it can be a program name with args.
3054 set dummy g++; ac_word=$2
3055 echo "$as_me:3055: checking for $ac_word" >&5
3056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3057 if test "${ac_cv_path_CXX+set}" = set; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   case $CXX in
3061   [\\/]* | ?:[\\/]*)
3062   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3063   ;;
3064   *)
3065   ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068   IFS=$ac_save_IFS
3069   test -z "$ac_dir" && ac_dir=.
3070   if $as_executable_p "$ac_dir/$ac_word"; then
3071    ac_cv_path_CXX="$ac_dir/$ac_word"
3072    echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3073    break
3074 fi
3075 done
3076
3077   ;;
3078 esac
3079 fi
3080 CXX=$ac_cv_path_CXX
3081
3082 if test -n "$CXX"; then
3083   echo "$as_me:3083: result: $CXX" >&5
3084 echo "${ECHO_T}$CXX" >&6
3085 else
3086   echo "$as_me:3086: result: no" >&5
3087 echo "${ECHO_T}no" >&6
3088 fi
3089
3090         fi
3091         if test "$CXX" = "g++" ; then
3092                 { echo "$as_me:3092: WARNING: ignoring hardcoded g++" >&5
3093 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3094                 cf_with_cxx=no; CXX=""; GXX="";
3095         fi
3096 fi
3097
3098 GXX_VERSION=none
3099 if test "$GXX" = yes; then
3100         echo "$as_me:3100: checking version of g++" >&5
3101 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3102         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3103         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3104         echo "$as_me:3104: result: $GXX_VERSION" >&5
3105 echo "${ECHO_T}$GXX_VERSION" >&6
3106 fi
3107
3108 case $GXX_VERSION in
3109 1*|2.[0-6]*)
3110         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3111         # cf_cxx_library=no
3112         { echo "$as_me:3112: WARNING: templates do not work" >&5
3113 echo "$as_me: WARNING: templates do not work" >&2;}
3114         ;;
3115 esac
3116
3117 echo "$as_me:3117: checking if you want to build C++ binding and demo" >&5
3118 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3119
3120 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3121 if test "${with_cxx_binding+set}" = set; then
3122   withval="$with_cxx_binding"
3123   cf_with_cxx_binding=$withval
3124 else
3125   cf_with_cxx_binding=$cf_with_cxx
3126 fi;
3127 echo "$as_me:3127: result: $cf_with_cxx_binding" >&5
3128 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3129
3130 echo "$as_me:3130: checking if you want to build with Ada95" >&5
3131 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3132
3133 # Check whether --with-ada or --without-ada was given.
3134 if test "${with_ada+set}" = set; then
3135   withval="$with_ada"
3136   cf_with_ada=$withval
3137 else
3138   cf_with_ada=yes
3139 fi;
3140 echo "$as_me:3140: result: $cf_with_ada" >&5
3141 echo "${ECHO_T}$cf_with_ada" >&6
3142
3143 echo "$as_me:3143: checking if you want to install manpages" >&5
3144 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3145
3146 # Check whether --with-manpages or --without-manpages was given.
3147 if test "${with_manpages+set}" = set; then
3148   withval="$with_manpages"
3149   cf_with_manpages=$withval
3150 else
3151   cf_with_manpages=yes
3152 fi;
3153 echo "$as_me:3153: result: $cf_with_manpages" >&5
3154 echo "${ECHO_T}$cf_with_manpages" >&6
3155
3156 echo "$as_me:3156: checking if you want to build programs such as tic" >&5
3157 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3158
3159 # Check whether --with-progs or --without-progs was given.
3160 if test "${with_progs+set}" = set; then
3161   withval="$with_progs"
3162   cf_with_progs=$withval
3163 else
3164   cf_with_progs=yes
3165 fi;
3166 echo "$as_me:3166: result: $cf_with_progs" >&5
3167 echo "${ECHO_T}$cf_with_progs" >&6
3168
3169 echo "$as_me:3169: checking if you wish to install curses.h" >&5
3170 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3171
3172 # Check whether --with-curses-h or --without-curses-h was given.
3173 if test "${with_curses_h+set}" = set; then
3174   withval="$with_curses_h"
3175   with_curses_h=$withval
3176 else
3177   with_curses_h=yes
3178 fi;
3179 echo "$as_me:3179: result: $with_curses_h" >&5
3180 echo "${ECHO_T}$with_curses_h" >&6
3181
3182 modules_to_build="ncurses"
3183 if test "X$cf_with_progs" != Xno ; then
3184 modules_to_build="$modules_to_build progs tack"
3185 fi
3186 modules_to_build="$modules_to_build panel menu form"
3187
3188 test "$program_prefix" != NONE &&
3189   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3190 # Use a double $ so make ignores it.
3191 test "$program_suffix" != NONE &&
3192   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3193 # Double any \ or $.  echo might interpret backslashes.
3194 # By default was `s,x,x', remove it if useless.
3195 cat <<\_ACEOF >conftest.sed
3196 s/[\\$]/&&/g;s/;s,x,x,$//
3197 _ACEOF
3198 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3199 rm conftest.sed
3200
3201 for ac_prog in mawk gawk nawk awk
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_AWK+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$AWK"; then
3211   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_AWK="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 AWK=$ac_cv_prog_AWK
3227 if test -n "$AWK"; then
3228   echo "$as_me:3228: result: $AWK" >&5
3229 echo "${ECHO_T}$AWK" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$AWK" && break
3236 done
3237
3238 test -z "$AWK" && { { echo "$as_me:3238: error: No awk program found" >&5
3239 echo "$as_me: error: No awk program found" >&2;}
3240    { (exit 1); exit 1; }; }
3241
3242 echo "$as_me:3242: checking for egrep" >&5
3243 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3244 if test "${ac_cv_prog_egrep+set}" = set; then
3245   echo $ECHO_N "(cached) $ECHO_C" >&6
3246 else
3247   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3248     then ac_cv_prog_egrep='grep -E'
3249     else ac_cv_prog_egrep='egrep'
3250     fi
3251 fi
3252 echo "$as_me:3252: result: $ac_cv_prog_egrep" >&5
3253 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3254  EGREP=$ac_cv_prog_egrep
3255
3256 test -z "$EGREP" && { { echo "$as_me:3256: error: No egrep program found" >&5
3257 echo "$as_me: error: No egrep program found" >&2;}
3258    { (exit 1); exit 1; }; }
3259
3260 # Find a good install program.  We prefer a C program (faster),
3261 # so one script is as good as another.  But avoid the broken or
3262 # incompatible versions:
3263 # SysV /etc/install, /usr/sbin/install
3264 # SunOS /usr/etc/install
3265 # IRIX /sbin/install
3266 # AIX /bin/install
3267 # AmigaOS /C/install, which installs bootblocks on floppy discs
3268 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3269 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3270 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3271 # ./install, which can be erroneously created by make from ./install.sh.
3272 echo "$as_me:3272: checking for a BSD compatible install" >&5
3273 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3274 if test -z "$INSTALL"; then
3275 if test "${ac_cv_path_install+set}" = set; then
3276   echo $ECHO_N "(cached) $ECHO_C" >&6
3277 else
3278     ac_save_IFS=$IFS; IFS=$ac_path_separator
3279   for ac_dir in $PATH; do
3280     IFS=$ac_save_IFS
3281     # Account for people who put trailing slashes in PATH elements.
3282     case $ac_dir/ in
3283     / | ./ | .// | /cC/* \
3284     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3285     | /usr/ucb/* ) ;;
3286     *)
3287       # OSF1 and SCO ODT 3.0 have their own names for install.
3288       # Don't use installbsd from OSF since it installs stuff as root
3289       # by default.
3290       for ac_prog in ginstall scoinst install; do
3291         if $as_executable_p "$ac_dir/$ac_prog"; then
3292           if test $ac_prog = install &&
3293             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3294             # AIX install.  It has an incompatible calling convention.
3295             :
3296           elif test $ac_prog = install &&
3297             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3298             # program-specific install script used by HP pwplus--don't use.
3299             :
3300           else
3301             ac_cv_path_install="$ac_dir/$ac_prog -c"
3302             break 2
3303           fi
3304         fi
3305       done
3306       ;;
3307     esac
3308   done
3309
3310 fi
3311   if test "${ac_cv_path_install+set}" = set; then
3312     INSTALL=$ac_cv_path_install
3313   else
3314     # As a last resort, use the slow shell script.  We don't cache a
3315     # path for INSTALL within a source directory, because that will
3316     # break other packages using the cache if that directory is
3317     # removed, or if the path is relative.
3318     INSTALL=$ac_install_sh
3319   fi
3320 fi
3321 echo "$as_me:3321: result: $INSTALL" >&5
3322 echo "${ECHO_T}$INSTALL" >&6
3323
3324 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3325 # It thinks the first close brace ends the variable substitution.
3326 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3327
3328 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3329
3330 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3331
3332 case $INSTALL in
3333 /*)
3334   ;;
3335 *)
3336   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3337   test -z "$cf_dir" && cf_dir=.
3338   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3339   ;;
3340 esac
3341
3342 for ac_prog in tdlint lint alint splint lclint
3343 do
3344   # Extract the first word of "$ac_prog", so it can be a program name with args.
3345 set dummy $ac_prog; ac_word=$2
3346 echo "$as_me:3346: checking for $ac_word" >&5
3347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348 if test "${ac_cv_prog_LINT+set}" = set; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   if test -n "$LINT"; then
3352   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3353 else
3354   ac_save_IFS=$IFS; IFS=$ac_path_separator
3355 ac_dummy="$PATH"
3356 for ac_dir in $ac_dummy; do
3357   IFS=$ac_save_IFS
3358   test -z "$ac_dir" && ac_dir=.
3359   $as_executable_p "$ac_dir/$ac_word" || continue
3360 ac_cv_prog_LINT="$ac_prog"
3361 echo "$as_me:3361: found $ac_dir/$ac_word" >&5
3362 break
3363 done
3364
3365 fi
3366 fi
3367 LINT=$ac_cv_prog_LINT
3368 if test -n "$LINT"; then
3369   echo "$as_me:3369: result: $LINT" >&5
3370 echo "${ECHO_T}$LINT" >&6
3371 else
3372   echo "$as_me:3372: result: no" >&5
3373 echo "${ECHO_T}no" >&6
3374 fi
3375
3376   test -n "$LINT" && break
3377 done
3378
3379 echo "$as_me:3379: checking whether ln -s works" >&5
3380 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3381 LN_S=$as_ln_s
3382 if test "$LN_S" = "ln -s"; then
3383   echo "$as_me:3383: result: yes" >&5
3384 echo "${ECHO_T}yes" >&6
3385 else
3386   echo "$as_me:3386: result: no, using $LN_S" >&5
3387 echo "${ECHO_T}no, using $LN_S" >&6
3388 fi
3389
3390 echo "$as_me:3390: checking for long file names" >&5
3391 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3392 if test "${ac_cv_sys_long_file_names+set}" = set; then
3393   echo $ECHO_N "(cached) $ECHO_C" >&6
3394 else
3395   ac_cv_sys_long_file_names=yes
3396 # Test for long file names in all the places we know might matter:
3397 #      .                the current directory, where building will happen
3398 #      $prefix/lib      where we will be installing things
3399 #      $exec_prefix/lib likewise
3400 # eval it to expand exec_prefix.
3401 #      $TMPDIR          if set, where it might want to write temporary files
3402 # if $TMPDIR is not set:
3403 #      /tmp             where it might want to write temporary files
3404 #      /var/tmp         likewise
3405 #      /usr/tmp         likewise
3406 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3407   ac_tmpdirs=$TMPDIR
3408 else
3409   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3410 fi
3411 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3412   test -d $ac_dir || continue
3413   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3414   ac_xdir=$ac_dir/cf$$
3415   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3416   ac_tf1=$ac_xdir/conftest9012345
3417   ac_tf2=$ac_xdir/conftest9012346
3418   (echo 1 >$ac_tf1) 2>/dev/null
3419   (echo 2 >$ac_tf2) 2>/dev/null
3420   ac_val=`cat $ac_tf1 2>/dev/null`
3421   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3422     ac_cv_sys_long_file_names=no
3423     rm -rf $ac_xdir 2>/dev/null
3424     break
3425   fi
3426   rm -rf $ac_xdir 2>/dev/null
3427 done
3428 fi
3429 echo "$as_me:3429: result: $ac_cv_sys_long_file_names" >&5
3430 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3431 if test $ac_cv_sys_long_file_names = yes; then
3432
3433 cat >>confdefs.h <<\EOF
3434 #define HAVE_LONG_FILE_NAMES 1
3435 EOF
3436
3437 fi
3438
3439 # if we find pkg-config, check if we should install the ".pc" files.
3440
3441 echo "$as_me:3441: checking if you want to use pkg-config" >&5
3442 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3443
3444 # Check whether --with-pkg-config or --without-pkg-config was given.
3445 if test "${with_pkg_config+set}" = set; then
3446   withval="$with_pkg_config"
3447   cf_pkg_config=$withval
3448 else
3449   cf_pkg_config=yes
3450 fi;
3451 echo "$as_me:3451: result: $cf_pkg_config" >&5
3452 echo "${ECHO_T}$cf_pkg_config" >&6
3453
3454 case $cf_pkg_config in #(vi
3455 no) #(vi
3456         PKG_CONFIG=none
3457         ;;
3458 yes) #(vi
3459         # Extract the first word of "pkg-config", so it can be a program name with args.
3460 set dummy pkg-config; ac_word=$2
3461 echo "$as_me:3461: checking for $ac_word" >&5
3462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3463 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3464   echo $ECHO_N "(cached) $ECHO_C" >&6
3465 else
3466   case $PKG_CONFIG in
3467   [\\/]* | ?:[\\/]*)
3468   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3469   ;;
3470   *)
3471   ac_save_IFS=$IFS; IFS=$ac_path_separator
3472 ac_dummy="$PATH"
3473 for ac_dir in $ac_dummy; do
3474   IFS=$ac_save_IFS
3475   test -z "$ac_dir" && ac_dir=.
3476   if $as_executable_p "$ac_dir/$ac_word"; then
3477    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3478    echo "$as_me:3478: found $ac_dir/$ac_word" >&5
3479    break
3480 fi
3481 done
3482
3483   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3484   ;;
3485 esac
3486 fi
3487 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3488
3489 if test -n "$PKG_CONFIG"; then
3490   echo "$as_me:3490: result: $PKG_CONFIG" >&5
3491 echo "${ECHO_T}$PKG_CONFIG" >&6
3492 else
3493   echo "$as_me:3493: result: no" >&5
3494 echo "${ECHO_T}no" >&6
3495 fi
3496
3497         ;;
3498 *)
3499         PKG_CONFIG=$withval
3500         ;;
3501 esac
3502
3503 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3504 if test "$PKG_CONFIG" != none ; then
3505
3506 if test "x$prefix" != xNONE; then
3507   cf_path_syntax="$prefix"
3508 else
3509   cf_path_syntax="$ac_default_prefix"
3510 fi
3511
3512 case ".$PKG_CONFIG" in #(vi
3513 .\$\(*\)*|.\'*\'*) #(vi
3514   ;;
3515 ..|./*|.\\*) #(vi
3516   ;;
3517 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3518   ;;
3519 .\${*prefix}*) #(vi
3520   eval PKG_CONFIG="$PKG_CONFIG"
3521   case ".$PKG_CONFIG" in #(vi
3522   .NONE/*)
3523     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3524     ;;
3525   esac
3526   ;; #(vi
3527 .no|.NONE/*)
3528   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3529   ;;
3530 *)
3531   { { echo "$as_me:3531: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3532 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3533    { (exit 1); exit 1; }; }
3534   ;;
3535 esac
3536
3537 fi
3538
3539 if test "$PKG_CONFIG" != no ; then
3540         echo "$as_me:3540: checking if we should install .pc files for $PKG_CONFIG" >&5
3541 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3542
3543         # Leave this as something that can be overridden in the environment.
3544         if test -z "$PKG_CONFIG_LIBDIR" ; then
3545                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3546         fi
3547         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3548         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3549
3550 # Check whether --enable-pc-files or --disable-pc-files was given.
3551 if test "${enable_pc_files+set}" = set; then
3552   enableval="$enable_pc_files"
3553   enable_pc_files=$enableval
3554 else
3555   enable_pc_files=no
3556 fi;
3557                 echo "$as_me:3557: result: $enable_pc_files" >&5
3558 echo "${ECHO_T}$enable_pc_files" >&6
3559         else
3560                 echo "$as_me:3560: result: no" >&5
3561 echo "${ECHO_T}no" >&6
3562                 { echo "$as_me:3562: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3563 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3564                 enable_pc_files=no
3565         fi
3566 fi
3567
3568 echo "$as_me:3568: checking if we should assume mixed-case filenames" >&5
3569 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3570
3571 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3572 if test "${enable_mixed_case+set}" = set; then
3573   enableval="$enable_mixed_case"
3574   enable_mixedcase=$enableval
3575 else
3576   enable_mixedcase=auto
3577 fi;
3578 echo "$as_me:3578: result: $enable_mixedcase" >&5
3579 echo "${ECHO_T}$enable_mixedcase" >&6
3580 if test "$enable_mixedcase" = "auto" ; then
3581
3582 echo "$as_me:3582: checking if filesystem supports mixed-case filenames" >&5
3583 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3584 if test "${cf_cv_mixedcase+set}" = set; then
3585   echo $ECHO_N "(cached) $ECHO_C" >&6
3586 else
3587
3588 if test "$cross_compiling" = yes ; then
3589         case $target_alias in #(vi
3590         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3591                 cf_cv_mixedcase=no
3592                 ;;
3593         *)
3594                 cf_cv_mixedcase=yes
3595                 ;;
3596         esac
3597 else
3598         rm -f conftest CONFTEST
3599         echo test >conftest
3600         if test -f CONFTEST ; then
3601                 cf_cv_mixedcase=no
3602         else
3603                 cf_cv_mixedcase=yes
3604         fi
3605         rm -f conftest CONFTEST
3606 fi
3607
3608 fi
3609 echo "$as_me:3609: result: $cf_cv_mixedcase" >&5
3610 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3611 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3612 #define MIXEDCASE_FILENAMES 1
3613 EOF
3614
3615 else
3616     cf_cv_mixedcase=$enable_mixedcase
3617     if test "$enable_mixedcase" = "yes" ; then
3618         cat >>confdefs.h <<\EOF
3619 #define MIXEDCASE_FILENAMES 1
3620 EOF
3621
3622     fi
3623 fi
3624
3625 # do this after mixed-case option (tags/TAGS is not as important as tic).
3626 echo "$as_me:3626: checking whether ${MAKE-make} sets \${MAKE}" >&5
3627 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3628 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3629 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3630   echo $ECHO_N "(cached) $ECHO_C" >&6
3631 else
3632   cat >conftest.make <<\EOF
3633 all:
3634         @echo 'ac_maketemp="${MAKE}"'
3635 EOF
3636 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3637 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3638 if test -n "$ac_maketemp"; then
3639   eval ac_cv_prog_make_${ac_make}_set=yes
3640 else
3641   eval ac_cv_prog_make_${ac_make}_set=no
3642 fi
3643 rm -f conftest.make
3644 fi
3645 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3646   echo "$as_me:3646: result: yes" >&5
3647 echo "${ECHO_T}yes" >&6
3648   SET_MAKE=
3649 else
3650   echo "$as_me:3650: result: no" >&5
3651 echo "${ECHO_T}no" >&6
3652   SET_MAKE="MAKE=${MAKE-make}"
3653 fi
3654
3655 # Extract the first word of "ctags", so it can be a program name with args.
3656 set dummy ctags; ac_word=$2
3657 echo "$as_me:3657: checking for $ac_word" >&5
3658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3659 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3660   echo $ECHO_N "(cached) $ECHO_C" >&6
3661 else
3662   if test -n "$MAKE_LOWER_TAGS"; then
3663   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3664 else
3665   ac_save_IFS=$IFS; IFS=$ac_path_separator
3666 ac_dummy="$PATH"
3667 for ac_dir in $ac_dummy; do
3668   IFS=$ac_save_IFS
3669   test -z "$ac_dir" && ac_dir=.
3670   $as_executable_p "$ac_dir/$ac_word" || continue
3671 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3672 echo "$as_me:3672: found $ac_dir/$ac_word" >&5
3673 break
3674 done
3675
3676   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3677 fi
3678 fi
3679 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3680 if test -n "$MAKE_LOWER_TAGS"; then
3681   echo "$as_me:3681: result: $MAKE_LOWER_TAGS" >&5
3682 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3683 else
3684   echo "$as_me:3684: result: no" >&5
3685 echo "${ECHO_T}no" >&6
3686 fi
3687
3688 if test "$cf_cv_mixedcase" = yes ; then
3689         # Extract the first word of "etags", so it can be a program name with args.
3690 set dummy etags; ac_word=$2
3691 echo "$as_me:3691: checking for $ac_word" >&5
3692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3693 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3694   echo $ECHO_N "(cached) $ECHO_C" >&6
3695 else
3696   if test -n "$MAKE_UPPER_TAGS"; then
3697   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3698 else
3699   ac_save_IFS=$IFS; IFS=$ac_path_separator
3700 ac_dummy="$PATH"
3701 for ac_dir in $ac_dummy; do
3702   IFS=$ac_save_IFS
3703   test -z "$ac_dir" && ac_dir=.
3704   $as_executable_p "$ac_dir/$ac_word" || continue
3705 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3706 echo "$as_me:3706: found $ac_dir/$ac_word" >&5
3707 break
3708 done
3709
3710   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3711 fi
3712 fi
3713 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3714 if test -n "$MAKE_UPPER_TAGS"; then
3715   echo "$as_me:3715: result: $MAKE_UPPER_TAGS" >&5
3716 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3717 else
3718   echo "$as_me:3718: result: no" >&5
3719 echo "${ECHO_T}no" >&6
3720 fi
3721
3722 else
3723         MAKE_UPPER_TAGS=no
3724 fi
3725
3726 if test "$MAKE_UPPER_TAGS" = yes ; then
3727         MAKE_UPPER_TAGS=
3728 else
3729         MAKE_UPPER_TAGS="#"
3730 fi
3731
3732 if test "$MAKE_LOWER_TAGS" = yes ; then
3733         MAKE_LOWER_TAGS=
3734 else
3735         MAKE_LOWER_TAGS="#"
3736 fi
3737
3738 echo "$as_me:3738: checking for makeflags variable" >&5
3739 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3740 if test "${cf_cv_makeflags+set}" = set; then
3741   echo $ECHO_N "(cached) $ECHO_C" >&6
3742 else
3743
3744         cf_cv_makeflags=''
3745         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3746         do
3747                 cat >cf_makeflags.tmp <<CF_EOF
3748 SHELL = /bin/sh
3749 all :
3750         @ echo '.$cf_option'
3751 CF_EOF
3752                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3753                 case "$cf_result" in
3754                 .*k)
3755                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3756                         case "$cf_result" in
3757                         .*CC=*) cf_cv_makeflags=
3758                                 ;;
3759                         *)      cf_cv_makeflags=$cf_option
3760                                 ;;
3761                         esac
3762                         break
3763                         ;;
3764                 .-)     ;;
3765                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3766                         ;;
3767                 esac
3768         done
3769         rm -f cf_makeflags.tmp
3770
3771 fi
3772 echo "$as_me:3772: result: $cf_cv_makeflags" >&5
3773 echo "${ECHO_T}$cf_cv_makeflags" >&6
3774
3775 if test -n "$ac_tool_prefix"; then
3776   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3777 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_RANLIB+set}" = set; then
3781   echo $ECHO_N "(cached) $ECHO_C" >&6
3782 else
3783   if test -n "$RANLIB"; then
3784   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3785 else
3786   ac_save_IFS=$IFS; IFS=$ac_path_separator
3787 ac_dummy="$PATH"
3788 for ac_dir in $ac_dummy; do
3789   IFS=$ac_save_IFS
3790   test -z "$ac_dir" && ac_dir=.
3791   $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3794 break
3795 done
3796
3797 fi
3798 fi
3799 RANLIB=$ac_cv_prog_RANLIB
3800 if test -n "$RANLIB"; then
3801   echo "$as_me:3801: result: $RANLIB" >&5
3802 echo "${ECHO_T}$RANLIB" >&6
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806 fi
3807
3808 fi
3809 if test -z "$ac_cv_prog_RANLIB"; then
3810   ac_ct_RANLIB=$RANLIB
3811   # Extract the first word of "ranlib", so it can be a program name with args.
3812 set dummy ranlib; ac_word=$2
3813 echo "$as_me:3813: checking for $ac_word" >&5
3814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3815 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3816   echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818   if test -n "$ac_ct_RANLIB"; then
3819   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3820 else
3821   ac_save_IFS=$IFS; IFS=$ac_path_separator
3822 ac_dummy="$PATH"
3823 for ac_dir in $ac_dummy; do
3824   IFS=$ac_save_IFS
3825   test -z "$ac_dir" && ac_dir=.
3826   $as_executable_p "$ac_dir/$ac_word" || continue
3827 ac_cv_prog_ac_ct_RANLIB="ranlib"
3828 echo "$as_me:3828: found $ac_dir/$ac_word" >&5
3829 break
3830 done
3831
3832   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3833 fi
3834 fi
3835 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3836 if test -n "$ac_ct_RANLIB"; then
3837   echo "$as_me:3837: result: $ac_ct_RANLIB" >&5
3838 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3839 else
3840   echo "$as_me:3840: result: no" >&5
3841 echo "${ECHO_T}no" >&6
3842 fi
3843
3844   RANLIB=$ac_ct_RANLIB
3845 else
3846   RANLIB="$ac_cv_prog_RANLIB"
3847 fi
3848
3849 if test -n "$ac_tool_prefix"; then
3850   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3851 set dummy ${ac_tool_prefix}ld; ac_word=$2
3852 echo "$as_me:3852: checking for $ac_word" >&5
3853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3854 if test "${ac_cv_prog_LD+set}" = set; then
3855   echo $ECHO_N "(cached) $ECHO_C" >&6
3856 else
3857   if test -n "$LD"; then
3858   ac_cv_prog_LD="$LD" # Let the user override the test.
3859 else
3860   ac_save_IFS=$IFS; IFS=$ac_path_separator
3861 ac_dummy="$PATH"
3862 for ac_dir in $ac_dummy; do
3863   IFS=$ac_save_IFS
3864   test -z "$ac_dir" && ac_dir=.
3865   $as_executable_p "$ac_dir/$ac_word" || continue
3866 ac_cv_prog_LD="${ac_tool_prefix}ld"
3867 echo "$as_me:3867: found $ac_dir/$ac_word" >&5
3868 break
3869 done
3870
3871 fi
3872 fi
3873 LD=$ac_cv_prog_LD
3874 if test -n "$LD"; then
3875   echo "$as_me:3875: result: $LD" >&5
3876 echo "${ECHO_T}$LD" >&6
3877 else
3878   echo "$as_me:3878: result: no" >&5
3879 echo "${ECHO_T}no" >&6
3880 fi
3881
3882 fi
3883 if test -z "$ac_cv_prog_LD"; then
3884   ac_ct_LD=$LD
3885   # Extract the first word of "ld", so it can be a program name with args.
3886 set dummy ld; ac_word=$2
3887 echo "$as_me:3887: checking for $ac_word" >&5
3888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3889 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   if test -n "$ac_ct_LD"; then
3893   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3894 else
3895   ac_save_IFS=$IFS; IFS=$ac_path_separator
3896 ac_dummy="$PATH"
3897 for ac_dir in $ac_dummy; do
3898   IFS=$ac_save_IFS
3899   test -z "$ac_dir" && ac_dir=.
3900   $as_executable_p "$ac_dir/$ac_word" || continue
3901 ac_cv_prog_ac_ct_LD="ld"
3902 echo "$as_me:3902: found $ac_dir/$ac_word" >&5
3903 break
3904 done
3905
3906   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3907 fi
3908 fi
3909 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3910 if test -n "$ac_ct_LD"; then
3911   echo "$as_me:3911: result: $ac_ct_LD" >&5
3912 echo "${ECHO_T}$ac_ct_LD" >&6
3913 else
3914   echo "$as_me:3914: result: no" >&5
3915 echo "${ECHO_T}no" >&6
3916 fi
3917
3918   LD=$ac_ct_LD
3919 else
3920   LD="$ac_cv_prog_LD"
3921 fi
3922
3923 if test -n "$ac_tool_prefix"; then
3924   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3925 set dummy ${ac_tool_prefix}ar; ac_word=$2
3926 echo "$as_me:3926: checking for $ac_word" >&5
3927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3928 if test "${ac_cv_prog_AR+set}" = set; then
3929   echo $ECHO_N "(cached) $ECHO_C" >&6
3930 else
3931   if test -n "$AR"; then
3932   ac_cv_prog_AR="$AR" # Let the user override the test.
3933 else
3934   ac_save_IFS=$IFS; IFS=$ac_path_separator
3935 ac_dummy="$PATH"
3936 for ac_dir in $ac_dummy; do
3937   IFS=$ac_save_IFS
3938   test -z "$ac_dir" && ac_dir=.
3939   $as_executable_p "$ac_dir/$ac_word" || continue
3940 ac_cv_prog_AR="${ac_tool_prefix}ar"
3941 echo "$as_me:3941: found $ac_dir/$ac_word" >&5
3942 break
3943 done
3944
3945 fi
3946 fi
3947 AR=$ac_cv_prog_AR
3948 if test -n "$AR"; then
3949   echo "$as_me:3949: result: $AR" >&5
3950 echo "${ECHO_T}$AR" >&6
3951 else
3952   echo "$as_me:3952: result: no" >&5
3953 echo "${ECHO_T}no" >&6
3954 fi
3955
3956 fi
3957 if test -z "$ac_cv_prog_AR"; then
3958   ac_ct_AR=$AR
3959   # Extract the first word of "ar", so it can be a program name with args.
3960 set dummy ar; ac_word=$2
3961 echo "$as_me:3961: checking for $ac_word" >&5
3962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3963 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3964   echo $ECHO_N "(cached) $ECHO_C" >&6
3965 else
3966   if test -n "$ac_ct_AR"; then
3967   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3968 else
3969   ac_save_IFS=$IFS; IFS=$ac_path_separator
3970 ac_dummy="$PATH"
3971 for ac_dir in $ac_dummy; do
3972   IFS=$ac_save_IFS
3973   test -z "$ac_dir" && ac_dir=.
3974   $as_executable_p "$ac_dir/$ac_word" || continue
3975 ac_cv_prog_ac_ct_AR="ar"
3976 echo "$as_me:3976: found $ac_dir/$ac_word" >&5
3977 break
3978 done
3979
3980   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3981 fi
3982 fi
3983 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3984 if test -n "$ac_ct_AR"; then
3985   echo "$as_me:3985: result: $ac_ct_AR" >&5
3986 echo "${ECHO_T}$ac_ct_AR" >&6
3987 else
3988   echo "$as_me:3988: result: no" >&5
3989 echo "${ECHO_T}no" >&6
3990 fi
3991
3992   AR=$ac_ct_AR
3993 else
3994   AR="$ac_cv_prog_AR"
3995 fi
3996
3997 if test -n "$ac_tool_prefix"; then
3998   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3999 set dummy ${ac_tool_prefix}ar; ac_word=$2
4000 echo "$as_me:4000: checking for $ac_word" >&5
4001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4002 if test "${ac_cv_prog_AR+set}" = set; then
4003   echo $ECHO_N "(cached) $ECHO_C" >&6
4004 else
4005   if test -n "$AR"; then
4006   ac_cv_prog_AR="$AR" # Let the user override the test.
4007 else
4008   ac_save_IFS=$IFS; IFS=$ac_path_separator
4009 ac_dummy="$PATH"
4010 for ac_dir in $ac_dummy; do
4011   IFS=$ac_save_IFS
4012   test -z "$ac_dir" && ac_dir=.
4013   $as_executable_p "$ac_dir/$ac_word" || continue
4014 ac_cv_prog_AR="${ac_tool_prefix}ar"
4015 echo "$as_me:4015: found $ac_dir/$ac_word" >&5
4016 break
4017 done
4018
4019 fi
4020 fi
4021 AR=$ac_cv_prog_AR
4022 if test -n "$AR"; then
4023   echo "$as_me:4023: result: $AR" >&5
4024 echo "${ECHO_T}$AR" >&6
4025 else
4026   echo "$as_me:4026: result: no" >&5
4027 echo "${ECHO_T}no" >&6
4028 fi
4029
4030 fi
4031 if test -z "$ac_cv_prog_AR"; then
4032   ac_ct_AR=$AR
4033   # Extract the first word of "ar", so it can be a program name with args.
4034 set dummy ar; ac_word=$2
4035 echo "$as_me:4035: checking for $ac_word" >&5
4036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4037 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4038   echo $ECHO_N "(cached) $ECHO_C" >&6
4039 else
4040   if test -n "$ac_ct_AR"; then
4041   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4042 else
4043   ac_save_IFS=$IFS; IFS=$ac_path_separator
4044 ac_dummy="$PATH"
4045 for ac_dir in $ac_dummy; do
4046   IFS=$ac_save_IFS
4047   test -z "$ac_dir" && ac_dir=.
4048   $as_executable_p "$ac_dir/$ac_word" || continue
4049 ac_cv_prog_ac_ct_AR="ar"
4050 echo "$as_me:4050: found $ac_dir/$ac_word" >&5
4051 break
4052 done
4053
4054   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4055 fi
4056 fi
4057 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4058 if test -n "$ac_ct_AR"; then
4059   echo "$as_me:4059: result: $ac_ct_AR" >&5
4060 echo "${ECHO_T}$ac_ct_AR" >&6
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064 fi
4065
4066   AR=$ac_ct_AR
4067 else
4068   AR="$ac_cv_prog_AR"
4069 fi
4070
4071 echo "$as_me:4071: checking for options to update archives" >&5
4072 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4073 if test "${cf_cv_ar_flags+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076
4077         cf_cv_ar_flags=unknown
4078         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4079         do
4080                 rm -f conftest.$ac_cv_objext
4081                 rm -f conftest.a
4082
4083                 cat >conftest.$ac_ext <<EOF
4084 #line 4084 "configure"
4085 int     testdata[3] = { 123, 456, 789 };
4086 EOF
4087                 if { (eval echo "$as_me:4087: \"$ac_compile\"") >&5
4088   (eval $ac_compile) 2>&5
4089   ac_status=$?
4090   echo "$as_me:4090: \$? = $ac_status" >&5
4091   (exit $ac_status); } ; then
4092                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4093                         if test -f conftest.a ; then
4094                                 cf_cv_ar_flags=$cf_ar_flags
4095                                 break
4096                         fi
4097                 else
4098                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4099
4100 echo "${as_me-configure}:4100: testing cannot compile test-program ..." 1>&5
4101
4102                         break
4103                 fi
4104         done
4105         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4106
4107 fi
4108 echo "$as_me:4108: result: $cf_cv_ar_flags" >&5
4109 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4110 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4111 ARFLAGS=$cf_cv_ar_flags
4112
4113 echo "$as_me:4113: checking if you have specified an install-prefix" >&5
4114 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4115
4116 # Check whether --with-install-prefix or --without-install-prefix was given.
4117 if test "${with_install_prefix+set}" = set; then
4118   withval="$with_install_prefix"
4119   case "$withval" in #(vi
4120         yes|no) #(vi
4121                 ;;
4122         *)      DESTDIR="$withval"
4123                 ;;
4124         esac
4125 fi;
4126 echo "$as_me:4126: result: $DESTDIR" >&5
4127 echo "${ECHO_T}$DESTDIR" >&6
4128
4129 ###############################################################################
4130
4131 # If we're cross-compiling, allow the user to override the tools and their
4132 # options.  The configure script is oriented toward identifying the host
4133 # compiler, etc., but we need a build compiler to generate parts of the source.
4134
4135 if test "$cross_compiling" = yes ; then
4136
4137         # defaults that we might want to override
4138         : ${BUILD_CFLAGS:=''}
4139         : ${BUILD_CPPFLAGS:=''}
4140         : ${BUILD_LDFLAGS:=''}
4141         : ${BUILD_LIBS:=''}
4142         : ${BUILD_EXEEXT:='$x'}
4143         : ${BUILD_OBJEXT:='o'}
4144
4145 # Check whether --with-build-cc or --without-build-cc was given.
4146 if test "${with_build_cc+set}" = set; then
4147   withval="$with_build_cc"
4148   BUILD_CC="$withval"
4149 else
4150   for ac_prog in gcc cc cl
4151 do
4152   # Extract the first word of "$ac_prog", so it can be a program name with args.
4153 set dummy $ac_prog; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$BUILD_CC"; then
4160   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_BUILD_CC="$ac_prog"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173 fi
4174 fi
4175 BUILD_CC=$ac_cv_prog_BUILD_CC
4176 if test -n "$BUILD_CC"; then
4177   echo "$as_me:4177: result: $BUILD_CC" >&5
4178 echo "${ECHO_T}$BUILD_CC" >&6
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182 fi
4183
4184   test -n "$BUILD_CC" && break
4185 done
4186
4187 fi;
4188         echo "$as_me:4188: checking for native build C compiler" >&5
4189 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4190         echo "$as_me:4190: result: $BUILD_CC" >&5
4191 echo "${ECHO_T}$BUILD_CC" >&6
4192
4193         echo "$as_me:4193: checking for native build C preprocessor" >&5
4194 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4195
4196 # Check whether --with-build-cpp or --without-build-cpp was given.
4197 if test "${with_build_cpp+set}" = set; then
4198   withval="$with_build_cpp"
4199   BUILD_CPP="$withval"
4200 else
4201   BUILD_CPP='${BUILD_CC} -E'
4202 fi;
4203         echo "$as_me:4203: result: $BUILD_CPP" >&5
4204 echo "${ECHO_T}$BUILD_CPP" >&6
4205
4206         echo "$as_me:4206: checking for native build C flags" >&5
4207 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4208
4209 # Check whether --with-build-cflags or --without-build-cflags was given.
4210 if test "${with_build_cflags+set}" = set; then
4211   withval="$with_build_cflags"
4212   BUILD_CFLAGS="$withval"
4213 fi;
4214         echo "$as_me:4214: result: $BUILD_CFLAGS" >&5
4215 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4216
4217         echo "$as_me:4217: checking for native build C preprocessor-flags" >&5
4218 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4219
4220 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4221 if test "${with_build_cppflags+set}" = set; then
4222   withval="$with_build_cppflags"
4223   BUILD_CPPFLAGS="$withval"
4224 fi;
4225         echo "$as_me:4225: result: $BUILD_CPPFLAGS" >&5
4226 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4227
4228         echo "$as_me:4228: checking for native build linker-flags" >&5
4229 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4230
4231 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4232 if test "${with_build_ldflags+set}" = set; then
4233   withval="$with_build_ldflags"
4234   BUILD_LDFLAGS="$withval"
4235 fi;
4236         echo "$as_me:4236: result: $BUILD_LDFLAGS" >&5
4237 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4238
4239         echo "$as_me:4239: checking for native build linker-libraries" >&5
4240 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4241
4242 # Check whether --with-build-libs or --without-build-libs was given.
4243 if test "${with_build_libs+set}" = set; then
4244   withval="$with_build_libs"
4245   BUILD_LIBS="$withval"
4246 fi;
4247         echo "$as_me:4247: result: $BUILD_LIBS" >&5
4248 echo "${ECHO_T}$BUILD_LIBS" >&6
4249
4250         # this assumes we're on Unix.
4251         BUILD_EXEEXT=
4252         BUILD_OBJEXT=o
4253
4254         : ${BUILD_CC:='${CC}'}
4255
4256         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4257                 { { echo "$as_me:4257: error: Cross-build requires two compilers.
4258 Use --with-build-cc to specify the native compiler." >&5
4259 echo "$as_me: error: Cross-build requires two compilers.
4260 Use --with-build-cc to specify the native compiler." >&2;}
4261    { (exit 1); exit 1; }; }
4262         fi
4263
4264 else
4265         : ${BUILD_CC:='${CC}'}
4266         : ${BUILD_CPP:='${CPP}'}
4267         : ${BUILD_CFLAGS:='${CFLAGS}'}
4268         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4269         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4270         : ${BUILD_LIBS:='${LIBS}'}
4271         : ${BUILD_EXEEXT:='$x'}
4272         : ${BUILD_OBJEXT:='o'}
4273 fi
4274
4275 ###############################################################################
4276
4277 ### Options to allow the user to specify the set of libraries which are used.
4278 ### Use "--without-normal --with-shared" to allow the default model to be
4279 ### shared, for example.
4280 cf_list_models=""
4281
4282 LIBTOOL=
4283
4284 # common library maintenance symbols that are convenient for libtool scripts:
4285 LIB_CREATE='${AR} -cr'
4286 LIB_OBJECT='${OBJECTS}'
4287 LIB_SUFFIX=.a
4288 LIB_PREP="$RANLIB"
4289
4290 # symbols used to prop libtool up to enable it to determine what it should be
4291 # doing:
4292 LIB_CLEAN=
4293 LIB_COMPILE=
4294 LIB_LINK='${CC}'
4295 LIB_INSTALL=
4296 LIB_UNINSTALL=
4297
4298 echo "$as_me:4298: checking if you want to build libraries with libtool" >&5
4299 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4300
4301 # Check whether --with-libtool or --without-libtool was given.
4302 if test "${with_libtool+set}" = set; then
4303   withval="$with_libtool"
4304   with_libtool=$withval
4305 else
4306   with_libtool=no
4307 fi;
4308 echo "$as_me:4308: result: $with_libtool" >&5
4309 echo "${ECHO_T}$with_libtool" >&6
4310 if test "$with_libtool" != "no"; then
4311
4312         if test "$with_libtool" != "yes" ; then
4313
4314 if test "x$prefix" != xNONE; then
4315   cf_path_syntax="$prefix"
4316 else
4317   cf_path_syntax="$ac_default_prefix"
4318 fi
4319
4320 case ".$with_libtool" in #(vi
4321 .\$\(*\)*|.\'*\'*) #(vi
4322   ;;
4323 ..|./*|.\\*) #(vi
4324   ;;
4325 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4326   ;;
4327 .\${*prefix}*) #(vi
4328   eval with_libtool="$with_libtool"
4329   case ".$with_libtool" in #(vi
4330   .NONE/*)
4331     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4332     ;;
4333   esac
4334   ;; #(vi
4335 .no|.NONE/*)
4336   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4337   ;;
4338 *)
4339   { { echo "$as_me:4339: error: expected a pathname, not \"$with_libtool\"" >&5
4340 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4341    { (exit 1); exit 1; }; }
4342   ;;
4343 esac
4344
4345                 LIBTOOL=$with_libtool
4346         else
4347                 # Extract the first word of "libtool", so it can be a program name with args.
4348 set dummy libtool; ac_word=$2
4349 echo "$as_me:4349: checking for $ac_word" >&5
4350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4351 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4352   echo $ECHO_N "(cached) $ECHO_C" >&6
4353 else
4354   case $LIBTOOL in
4355   [\\/]* | ?:[\\/]*)
4356   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4357   ;;
4358   *)
4359   ac_save_IFS=$IFS; IFS=$ac_path_separator
4360 ac_dummy="$PATH"
4361 for ac_dir in $ac_dummy; do
4362   IFS=$ac_save_IFS
4363   test -z "$ac_dir" && ac_dir=.
4364   if $as_executable_p "$ac_dir/$ac_word"; then
4365    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4366    echo "$as_me:4366: found $ac_dir/$ac_word" >&5
4367    break
4368 fi
4369 done
4370
4371   ;;
4372 esac
4373 fi
4374 LIBTOOL=$ac_cv_path_LIBTOOL
4375
4376 if test -n "$LIBTOOL"; then
4377   echo "$as_me:4377: result: $LIBTOOL" >&5
4378 echo "${ECHO_T}$LIBTOOL" >&6
4379 else
4380   echo "$as_me:4380: result: no" >&5
4381 echo "${ECHO_T}no" >&6
4382 fi
4383
4384         fi
4385         if test -z "$LIBTOOL" ; then
4386                 { { echo "$as_me:4386: error: Cannot find libtool" >&5
4387 echo "$as_me: error: Cannot find libtool" >&2;}
4388    { (exit 1); exit 1; }; }
4389         fi
4390         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4391         LIB_OBJECT='${OBJECTS:.o=.lo}'
4392         LIB_SUFFIX=.la
4393         LIB_CLEAN='${LIBTOOL} --mode=clean'
4394         LIB_COMPILE='${LIBTOOL} --mode=compile'
4395         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4396         LIB_INSTALL='${LIBTOOL} --mode=install'
4397         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4398         LIB_PREP=:
4399
4400         # Show the version of libtool
4401         echo "$as_me:4401: checking version of libtool" >&5
4402 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4403
4404         # Save the version in a cache variable - this is not entirely a good
4405         # thing, but the version string from libtool is very ugly, and for
4406         # bug reports it might be useful to have the original string. "("
4407         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.].*//'`
4408         echo "$as_me:4408: result: $cf_cv_libtool_version" >&5
4409 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4410         if test -z "$cf_cv_libtool_version" ; then
4411                 { { echo "$as_me:4411: error: This is not GNU libtool" >&5
4412 echo "$as_me: error: This is not GNU libtool" >&2;}
4413    { (exit 1); exit 1; }; }
4414         fi
4415
4416         # special hack to add -no-undefined (which libtool should do for itself)
4417         LT_UNDEF=
4418         case "$cf_cv_system_name" in #(vi
4419         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4420                 LT_UNDEF=-no-undefined
4421                 ;;
4422         esac
4423
4424         # special hack to add --tag option for C++ compiler
4425         case $cf_cv_libtool_version in #(vi
4426         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4427                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4428                 LIBTOOL="$LIBTOOL --tag=CC"
4429                 ;;
4430         *)
4431                 LIBTOOL_CXX="$LIBTOOL"
4432                 ;;
4433         esac
4434 else
4435         LIBTOOL=""
4436         LIBTOOL_CXX=""
4437 fi
4438
4439 test -z "$LIBTOOL" && ECHO_LT=
4440
4441 if test "$with_libtool" != "no" ; then
4442
4443 cf_list_models="$cf_list_models libtool"
4444
4445 else
4446
4447 echo "$as_me:4447: checking if you want to build shared libraries" >&5
4448 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4449
4450 # Check whether --with-shared or --without-shared was given.
4451 if test "${with_shared+set}" = set; then
4452   withval="$with_shared"
4453   with_shared=$withval
4454 else
4455   with_shared=no
4456 fi;
4457 echo "$as_me:4457: result: $with_shared" >&5
4458 echo "${ECHO_T}$with_shared" >&6
4459 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4460
4461 echo "$as_me:4461: checking if you want to build static libraries" >&5
4462 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4463
4464 # Check whether --with-normal or --without-normal was given.
4465 if test "${with_normal+set}" = set; then
4466   withval="$with_normal"
4467   with_normal=$withval
4468 else
4469   with_normal=yes
4470 fi;
4471 echo "$as_me:4471: result: $with_normal" >&5
4472 echo "${ECHO_T}$with_normal" >&6
4473 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4474
4475 echo "$as_me:4475: checking if you want to build debug libraries" >&5
4476 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4477
4478 # Check whether --with-debug or --without-debug was given.
4479 if test "${with_debug+set}" = set; then
4480   withval="$with_debug"
4481   with_debug=$withval
4482 else
4483   with_debug=yes
4484 fi;
4485 echo "$as_me:4485: result: $with_debug" >&5
4486 echo "${ECHO_T}$with_debug" >&6
4487 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4488
4489 echo "$as_me:4489: checking if you want to build profiling libraries" >&5
4490 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4491
4492 # Check whether --with-profile or --without-profile was given.
4493 if test "${with_profile+set}" = set; then
4494   withval="$with_profile"
4495   with_profile=$withval
4496 else
4497   with_profile=no
4498 fi;
4499 echo "$as_me:4499: result: $with_profile" >&5
4500 echo "${ECHO_T}$with_profile" >&6
4501 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4502
4503 fi
4504
4505 ###############################################################################
4506
4507 echo "$as_me:4507: checking for specified models" >&5
4508 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4509 test -z "$cf_list_models" && cf_list_models=normal
4510 test "$with_libtool" != "no" && cf_list_models=libtool
4511 echo "$as_me:4511: result: $cf_list_models" >&5
4512 echo "${ECHO_T}$cf_list_models" >&6
4513
4514 ### Use the first model as the default, and save its suffix for use in building
4515 ### up test-applications.
4516 echo "$as_me:4516: checking for default model" >&5
4517 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4518 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4519 echo "$as_me:4519: result: $DFT_LWR_MODEL" >&5
4520 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4521
4522 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4523
4524 TICS_NAME=tic
4525
4526 TINFO_NAME=tinfo
4527
4528 LIB_NAME=ncurses
4529
4530 LIB_DIR=../lib
4531 LIB_2ND=../../lib
4532
4533         case $cf_cv_system_name in #(vi
4534         OS/2*|os2*) #(vi
4535         LIB_PREFIX=''
4536         ;;
4537         *)      LIB_PREFIX='lib'
4538         ;;
4539         esac
4540 cf_prefix=$LIB_PREFIX
4541
4542 LIB_PREFIX=$cf_prefix
4543
4544 LIB_SUFFIX=
4545
4546 ###############################################################################
4547
4548 echo "$as_me:4548: checking if you want to build a separate terminfo library" >&5
4549 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4550
4551 # Check whether --with-termlib or --without-termlib was given.
4552 if test "${with_termlib+set}" = set; then
4553   withval="$with_termlib"
4554   with_termlib=$withval
4555 else
4556   with_termlib=no
4557 fi;
4558 echo "$as_me:4558: result: $with_termlib" >&5
4559 echo "${ECHO_T}$with_termlib" >&6
4560
4561 echo "$as_me:4561: checking if you want to build a separate tic library" >&5
4562 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4563
4564 # Check whether --with-ticlib or --without-ticlib was given.
4565 if test "${with_ticlib+set}" = set; then
4566   withval="$with_ticlib"
4567   with_ticlib=$withval
4568 else
4569   with_ticlib=no
4570 fi;
4571 echo "$as_me:4571: result: $with_ticlib" >&5
4572 echo "${ECHO_T}$with_ticlib" >&6
4573
4574 ### Checks for special libraries, must be done up-front.
4575 SHLIB_LIST=""
4576
4577 echo "$as_me:4577: checking if you want to link with the GPM mouse library" >&5
4578 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4579
4580 # Check whether --with-gpm or --without-gpm was given.
4581 if test "${with_gpm+set}" = set; then
4582   withval="$with_gpm"
4583   with_gpm=$withval
4584 else
4585   with_gpm=maybe
4586 fi;
4587 echo "$as_me:4587: result: $with_gpm" >&5
4588 echo "${ECHO_T}$with_gpm" >&6
4589
4590 if test "$with_gpm" != no ; then
4591         echo "$as_me:4591: checking for gpm.h" >&5
4592 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4593 if test "${ac_cv_header_gpm_h+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   cat >conftest.$ac_ext <<_ACEOF
4597 #line 4597 "configure"
4598 #include "confdefs.h"
4599 #include <gpm.h>
4600 _ACEOF
4601 if { (eval echo "$as_me:4601: \"$ac_cpp conftest.$ac_ext\"") >&5
4602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4603   ac_status=$?
4604   egrep -v '^ *\+' conftest.er1 >conftest.err
4605   rm -f conftest.er1
4606   cat conftest.err >&5
4607   echo "$as_me:4607: \$? = $ac_status" >&5
4608   (exit $ac_status); } >/dev/null; then
4609   if test -s conftest.err; then
4610     ac_cpp_err=$ac_c_preproc_warn_flag
4611   else
4612     ac_cpp_err=
4613   fi
4614 else
4615   ac_cpp_err=yes
4616 fi
4617 if test -z "$ac_cpp_err"; then
4618   ac_cv_header_gpm_h=yes
4619 else
4620   echo "$as_me: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   ac_cv_header_gpm_h=no
4623 fi
4624 rm -f conftest.err conftest.$ac_ext
4625 fi
4626 echo "$as_me:4626: result: $ac_cv_header_gpm_h" >&5
4627 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4628 if test $ac_cv_header_gpm_h = yes; then
4629
4630                 cat >>confdefs.h <<\EOF
4631 #define HAVE_GPM_H 1
4632 EOF
4633
4634                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4635                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4636
4637 echo "${as_me-configure}:4637: testing assuming we really have GPM library ..." 1>&5
4638
4639                         cat >>confdefs.h <<\EOF
4640 #define HAVE_LIBGPM 1
4641 EOF
4642
4643                 else
4644                         echo "$as_me:4644: checking for Gpm_Open in -lgpm" >&5
4645 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4646 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4647   echo $ECHO_N "(cached) $ECHO_C" >&6
4648 else
4649   ac_check_lib_save_LIBS=$LIBS
4650 LIBS="-lgpm  $LIBS"
4651 cat >conftest.$ac_ext <<_ACEOF
4652 #line 4652 "configure"
4653 #include "confdefs.h"
4654
4655 /* Override any gcc2 internal prototype to avoid an error.  */
4656 #ifdef __cplusplus
4657 extern "C"
4658 #endif
4659 /* We use char because int might match the return type of a gcc2
4660    builtin and then its argument prototype would still apply.  */
4661 char Gpm_Open ();
4662 int
4663 main ()
4664 {
4665 Gpm_Open ();
4666   ;
4667   return 0;
4668 }
4669 _ACEOF
4670 rm -f conftest.$ac_objext conftest$ac_exeext
4671 if { (eval echo "$as_me:4671: \"$ac_link\"") >&5
4672   (eval $ac_link) 2>&5
4673   ac_status=$?
4674   echo "$as_me:4674: \$? = $ac_status" >&5
4675   (exit $ac_status); } &&
4676          { ac_try='test -s conftest$ac_exeext'
4677   { (eval echo "$as_me:4677: \"$ac_try\"") >&5
4678   (eval $ac_try) 2>&5
4679   ac_status=$?
4680   echo "$as_me:4680: \$? = $ac_status" >&5
4681   (exit $ac_status); }; }; then
4682   ac_cv_lib_gpm_Gpm_Open=yes
4683 else
4684   echo "$as_me: failed program was:" >&5
4685 cat conftest.$ac_ext >&5
4686 ac_cv_lib_gpm_Gpm_Open=no
4687 fi
4688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4689 LIBS=$ac_check_lib_save_LIBS
4690 fi
4691 echo "$as_me:4691: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4692 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4693 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4694   :
4695 else
4696
4697                                 { { echo "$as_me:4697: error: Cannot link with GPM library" >&5
4698 echo "$as_me: error: Cannot link with GPM library" >&2;}
4699    { (exit 1); exit 1; }; }
4700                 fi
4701                 with_gpm=yes
4702
4703 fi
4704
4705 else
4706
4707                 test "$with_gpm" != maybe && { echo "$as_me:4707: WARNING: Cannot find GPM header" >&5
4708 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4709                 with_gpm=no
4710
4711 fi
4712
4713 fi
4714
4715 if test "$with_gpm" != no ; then
4716         echo "$as_me:4716: checking if you want to load GPM dynamically" >&5
4717 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4718
4719 # Check whether --with-dlsym or --without-dlsym was given.
4720 if test "${with_dlsym+set}" = set; then
4721   withval="$with_dlsym"
4722   with_dlsym=$withval
4723 else
4724   with_dlsym=yes
4725 fi;
4726         echo "$as_me:4726: result: $with_dlsym" >&5
4727 echo "${ECHO_T}$with_dlsym" >&6
4728         if test "$with_dlsym" = yes ; then
4729
4730 cf_have_dlsym=no
4731 echo "$as_me:4731: checking for dlsym" >&5
4732 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4733 if test "${ac_cv_func_dlsym+set}" = set; then
4734   echo $ECHO_N "(cached) $ECHO_C" >&6
4735 else
4736   cat >conftest.$ac_ext <<_ACEOF
4737 #line 4737 "configure"
4738 #include "confdefs.h"
4739 /* System header to define __stub macros and hopefully few prototypes,
4740     which can conflict with char dlsym (); below.  */
4741 #include <assert.h>
4742 /* Override any gcc2 internal prototype to avoid an error.  */
4743 #ifdef __cplusplus
4744 extern "C"
4745 #endif
4746 /* We use char because int might match the return type of a gcc2
4747    builtin and then its argument prototype would still apply.  */
4748 char dlsym ();
4749 char (*f) ();
4750
4751 int
4752 main ()
4753 {
4754 /* The GNU C library defines this for functions which it implements
4755     to always fail with ENOSYS.  Some functions are actually named
4756     something starting with __ and the normal name is an alias.  */
4757 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4758 choke me
4759 #else
4760 f = dlsym;
4761 #endif
4762
4763   ;
4764   return 0;
4765 }
4766 _ACEOF
4767 rm -f conftest.$ac_objext conftest$ac_exeext
4768 if { (eval echo "$as_me:4768: \"$ac_link\"") >&5
4769   (eval $ac_link) 2>&5
4770   ac_status=$?
4771   echo "$as_me:4771: \$? = $ac_status" >&5
4772   (exit $ac_status); } &&
4773          { ac_try='test -s conftest$ac_exeext'
4774   { (eval echo "$as_me:4774: \"$ac_try\"") >&5
4775   (eval $ac_try) 2>&5
4776   ac_status=$?
4777   echo "$as_me:4777: \$? = $ac_status" >&5
4778   (exit $ac_status); }; }; then
4779   ac_cv_func_dlsym=yes
4780 else
4781   echo "$as_me: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
4783 ac_cv_func_dlsym=no
4784 fi
4785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4786 fi
4787 echo "$as_me:4787: result: $ac_cv_func_dlsym" >&5
4788 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4789 if test $ac_cv_func_dlsym = yes; then
4790   cf_have_dlsym=yes
4791 else
4792
4793 cf_have_libdl=no
4794 echo "$as_me:4794: checking for dlsym in -ldl" >&5
4795 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4796 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4797   echo $ECHO_N "(cached) $ECHO_C" >&6
4798 else
4799   ac_check_lib_save_LIBS=$LIBS
4800 LIBS="-ldl  $LIBS"
4801 cat >conftest.$ac_ext <<_ACEOF
4802 #line 4802 "configure"
4803 #include "confdefs.h"
4804
4805 /* Override any gcc2 internal prototype to avoid an error.  */
4806 #ifdef __cplusplus
4807 extern "C"
4808 #endif
4809 /* We use char because int might match the return type of a gcc2
4810    builtin and then its argument prototype would still apply.  */
4811 char dlsym ();
4812 int
4813 main ()
4814 {
4815 dlsym ();
4816   ;
4817   return 0;
4818 }
4819 _ACEOF
4820 rm -f conftest.$ac_objext conftest$ac_exeext
4821 if { (eval echo "$as_me:4821: \"$ac_link\"") >&5
4822   (eval $ac_link) 2>&5
4823   ac_status=$?
4824   echo "$as_me:4824: \$? = $ac_status" >&5
4825   (exit $ac_status); } &&
4826          { ac_try='test -s conftest$ac_exeext'
4827   { (eval echo "$as_me:4827: \"$ac_try\"") >&5
4828   (eval $ac_try) 2>&5
4829   ac_status=$?
4830   echo "$as_me:4830: \$? = $ac_status" >&5
4831   (exit $ac_status); }; }; then
4832   ac_cv_lib_dl_dlsym=yes
4833 else
4834   echo "$as_me: failed program was:" >&5
4835 cat conftest.$ac_ext >&5
4836 ac_cv_lib_dl_dlsym=no
4837 fi
4838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4839 LIBS=$ac_check_lib_save_LIBS
4840 fi
4841 echo "$as_me:4841: result: $ac_cv_lib_dl_dlsym" >&5
4842 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4843 if test $ac_cv_lib_dl_dlsym = yes; then
4844
4845         cf_have_dlsym=yes
4846         cf_have_libdl=yes
4847 fi
4848
4849 fi
4850
4851 if test "$cf_have_dlsym" = yes ; then
4852         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4853
4854         echo "$as_me:4854: checking whether able to link to dl*() functions" >&5
4855 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4856         cat >conftest.$ac_ext <<_ACEOF
4857 #line 4857 "configure"
4858 #include "confdefs.h"
4859 #include <dlfcn.h>
4860 int
4861 main ()
4862 {
4863
4864                 void *obj;
4865                 if ((obj = dlopen("filename", 0)) != 0) {
4866                         if (dlsym(obj, "symbolname") == 0) {
4867                         dlclose(obj);
4868                         }
4869                 }
4870   ;
4871   return 0;
4872 }
4873 _ACEOF
4874 rm -f conftest.$ac_objext conftest$ac_exeext
4875 if { (eval echo "$as_me:4875: \"$ac_link\"") >&5
4876   (eval $ac_link) 2>&5
4877   ac_status=$?
4878   echo "$as_me:4878: \$? = $ac_status" >&5
4879   (exit $ac_status); } &&
4880          { ac_try='test -s conftest$ac_exeext'
4881   { (eval echo "$as_me:4881: \"$ac_try\"") >&5
4882   (eval $ac_try) 2>&5
4883   ac_status=$?
4884   echo "$as_me:4884: \$? = $ac_status" >&5
4885   (exit $ac_status); }; }; then
4886
4887                 cat >>confdefs.h <<\EOF
4888 #define HAVE_LIBDL 1
4889 EOF
4890
4891 else
4892   echo "$as_me: failed program was:" >&5
4893 cat conftest.$ac_ext >&5
4894
4895                 { { echo "$as_me:4895: error: Cannot link test program for libdl" >&5
4896 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4897    { (exit 1); exit 1; }; }
4898 fi
4899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4900         echo "$as_me:4900: result: ok" >&5
4901 echo "${ECHO_T}ok" >&6
4902 else
4903         { { echo "$as_me:4903: error: Cannot find dlsym function" >&5
4904 echo "$as_me: error: Cannot find dlsym function" >&2;}
4905    { (exit 1); exit 1; }; }
4906 fi
4907
4908                 if test "$with_gpm" != yes ; then
4909                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4910
4911 echo "${as_me-configure}:4911: testing assuming soname for gpm is $with_gpm ..." 1>&5
4912
4913                         cf_cv_gpm_soname="$with_gpm"
4914                 else
4915
4916 echo "$as_me:4916: checking for soname of gpm library" >&5
4917 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4918 if test "${cf_cv_gpm_soname+set}" = set; then
4919   echo $ECHO_N "(cached) $ECHO_C" >&6
4920 else
4921
4922 cf_cv_gpm_soname=unknown
4923 if test "$cross_compiling" != yes ; then
4924 cat >conftest.$ac_ext <<CF_EOF
4925 #include <gpm.h>
4926 int main()
4927 {
4928 if (Gpm_Open(0,0)) Gpm_Close();
4929         ${cf_cv_main_return:-return}(0);
4930 }
4931 CF_EOF
4932 cf_save_LIBS="$LIBS"
4933         LIBS="-lgpm $LIBS"
4934         if { (eval echo "$as_me:4934: \"$ac_compile\"") >&5
4935   (eval $ac_compile) 2>&5
4936   ac_status=$?
4937   echo "$as_me:4937: \$? = $ac_status" >&5
4938   (exit $ac_status); } ; then
4939                 if { (eval echo "$as_me:4939: \"$ac_link\"") >&5
4940   (eval $ac_link) 2>&5
4941   ac_status=$?
4942   echo "$as_me:4942: \$? = $ac_status" >&5
4943   (exit $ac_status); } ; then
4944                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4945                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4946                 fi
4947         fi
4948 rm -f conftest*
4949 LIBS="$cf_save_LIBS"
4950 fi
4951
4952 fi
4953 echo "$as_me:4953: result: $cf_cv_gpm_soname" >&5
4954 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4955
4956                 fi
4957                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4958 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4959 EOF
4960
4961                 SHLIB_LIST="-ldl $SHLIB_LIST"
4962         else
4963                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4964                 TEST_LIBS="-lgpm $TEST_LIBS"
4965         fi
4966         cat >>confdefs.h <<\EOF
4967 #define HAVE_LIBGPM 1
4968 EOF
4969
4970 echo "$as_me:4970: checking for Gpm_Wgetch in -lgpm" >&5
4971 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4972 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4973   echo $ECHO_N "(cached) $ECHO_C" >&6
4974 else
4975   ac_check_lib_save_LIBS=$LIBS
4976 LIBS="-lgpm  $LIBS"
4977 cat >conftest.$ac_ext <<_ACEOF
4978 #line 4978 "configure"
4979 #include "confdefs.h"
4980
4981 /* Override any gcc2 internal prototype to avoid an error.  */
4982 #ifdef __cplusplus
4983 extern "C"
4984 #endif
4985 /* We use char because int might match the return type of a gcc2
4986    builtin and then its argument prototype would still apply.  */
4987 char Gpm_Wgetch ();
4988 int
4989 main ()
4990 {
4991 Gpm_Wgetch ();
4992   ;
4993   return 0;
4994 }
4995 _ACEOF
4996 rm -f conftest.$ac_objext conftest$ac_exeext
4997 if { (eval echo "$as_me:4997: \"$ac_link\"") >&5
4998   (eval $ac_link) 2>&5
4999   ac_status=$?
5000   echo "$as_me:5000: \$? = $ac_status" >&5
5001   (exit $ac_status); } &&
5002          { ac_try='test -s conftest$ac_exeext'
5003   { (eval echo "$as_me:5003: \"$ac_try\"") >&5
5004   (eval $ac_try) 2>&5
5005   ac_status=$?
5006   echo "$as_me:5006: \$? = $ac_status" >&5
5007   (exit $ac_status); }; }; then
5008   ac_cv_lib_gpm_Gpm_Wgetch=yes
5009 else
5010   echo "$as_me: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 ac_cv_lib_gpm_Gpm_Wgetch=no
5013 fi
5014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5015 LIBS=$ac_check_lib_save_LIBS
5016 fi
5017 echo "$as_me:5017: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5018 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5019 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5020
5021 echo "$as_me:5021: checking if GPM is weakly bound to curses library" >&5
5022 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5023 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5024   echo $ECHO_N "(cached) $ECHO_C" >&6
5025 else
5026
5027 cf_cv_check_gpm_wgetch=unknown
5028 if test "$cross_compiling" != yes ; then
5029
5030 cat >conftest.$ac_ext <<CF_EOF
5031 #include <gpm.h>
5032 int main()
5033 {
5034         Gpm_Wgetch();
5035         ${cf_cv_main_return:-return}(0);
5036 }
5037 CF_EOF
5038
5039         cf_save_LIBS="$LIBS"
5040         # This only works if we can look at the symbol table.  If a shared
5041         # library is stripped for install, we cannot use that.  So we're forced
5042         # to rely on the static library, noting that some packagers may not
5043         # include it.
5044         LIBS="-static -lgpm -dynamic $LIBS"
5045         if { (eval echo "$as_me:5045: \"$ac_compile\"") >&5
5046   (eval $ac_compile) 2>&5
5047   ac_status=$?
5048   echo "$as_me:5048: \$? = $ac_status" >&5
5049   (exit $ac_status); } ; then
5050                 if { (eval echo "$as_me:5050: \"$ac_link\"") >&5
5051   (eval $ac_link) 2>&5
5052   ac_status=$?
5053   echo "$as_me:5053: \$? = $ac_status" >&5
5054   (exit $ac_status); } ; then
5055                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5056                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5057                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5058                 fi
5059         fi
5060         rm -f conftest*
5061         LIBS="$cf_save_LIBS"
5062 fi
5063
5064 fi
5065 echo "$as_me:5065: result: $cf_cv_check_gpm_wgetch" >&5
5066 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5067
5068 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5069         { echo "$as_me:5069: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5070 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5071 fi
5072
5073 fi
5074
5075 fi
5076
5077 # not everyone has "test -c"
5078 if test -c /dev/sysmouse 2>/dev/null ; then
5079 echo "$as_me:5079: checking if you want to use sysmouse" >&5
5080 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5081
5082 # Check whether --with-sysmouse or --without-sysmouse was given.
5083 if test "${with_sysmouse+set}" = set; then
5084   withval="$with_sysmouse"
5085   cf_with_sysmouse=$withval
5086 else
5087   cf_with_sysmouse=maybe
5088 fi;
5089         if test "$cf_with_sysmouse" != no ; then
5090         cat >conftest.$ac_ext <<_ACEOF
5091 #line 5091 "configure"
5092 #include "confdefs.h"
5093
5094 #include <osreldate.h>
5095 #if (__FreeBSD_version >= 400017)
5096 #include <sys/consio.h>
5097 #include <sys/fbio.h>
5098 #else
5099 #include <machine/console.h>
5100 #endif
5101
5102 int
5103 main ()
5104 {
5105
5106         struct mouse_info the_mouse;
5107         ioctl(0, CONS_MOUSECTL, &the_mouse);
5108
5109   ;
5110   return 0;
5111 }
5112 _ACEOF
5113 rm -f conftest.$ac_objext
5114 if { (eval echo "$as_me:5114: \"$ac_compile\"") >&5
5115   (eval $ac_compile) 2>&5
5116   ac_status=$?
5117   echo "$as_me:5117: \$? = $ac_status" >&5
5118   (exit $ac_status); } &&
5119          { ac_try='test -s conftest.$ac_objext'
5120   { (eval echo "$as_me:5120: \"$ac_try\"") >&5
5121   (eval $ac_try) 2>&5
5122   ac_status=$?
5123   echo "$as_me:5123: \$? = $ac_status" >&5
5124   (exit $ac_status); }; }; then
5125   cf_with_sysmouse=yes
5126 else
5127   echo "$as_me: failed program was:" >&5
5128 cat conftest.$ac_ext >&5
5129 cf_with_sysmouse=no
5130 fi
5131 rm -f conftest.$ac_objext conftest.$ac_ext
5132         fi
5133 echo "$as_me:5133: result: $cf_with_sysmouse" >&5
5134 echo "${ECHO_T}$cf_with_sysmouse" >&6
5135 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5136 #define USE_SYSMOUSE 1
5137 EOF
5138
5139 fi
5140
5141 if test X"$CC_G_OPT" = X"" ; then
5142         CC_G_OPT='-g'
5143         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5144 fi
5145
5146 if test X"$CXX_G_OPT" = X"" ; then
5147         CXX_G_OPT='-g'
5148         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5149 fi
5150
5151 echo "$as_me:5151: checking for default loader flags" >&5
5152 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5153 case $DFT_LWR_MODEL in
5154 libtool) LD_MODEL=''   ;;
5155 normal)  LD_MODEL=''   ;;
5156 debug)   LD_MODEL=$CC_G_OPT ;;
5157 profile) LD_MODEL='-pg';;
5158 shared)  LD_MODEL=''   ;;
5159 esac
5160 echo "$as_me:5160: result: $LD_MODEL" >&5
5161 echo "${ECHO_T}$LD_MODEL" >&6
5162
5163 case $DFT_LWR_MODEL in
5164 shared)
5165
5166 echo "$as_me:5166: checking if rpath option should be used" >&5
5167 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5168
5169 # Check whether --enable-rpath or --disable-rpath was given.
5170 if test "${enable_rpath+set}" = set; then
5171   enableval="$enable_rpath"
5172   cf_cv_ld_rpath=$enableval
5173 else
5174   cf_cv_ld_rpath=no
5175 fi;
5176 echo "$as_me:5176: result: $cf_cv_ld_rpath" >&5
5177 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5178
5179 echo "$as_me:5179: checking if shared libraries should be relinked during install" >&5
5180 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5181
5182 # Check whether --enable-relink or --disable-relink was given.
5183 if test "${enable_relink+set}" = set; then
5184   enableval="$enable_relink"
5185   cf_cv_do_relink=$enableval
5186 else
5187   cf_cv_do_relink=yes
5188 fi;
5189 echo "$as_me:5189: result: $cf_cv_do_relink" >&5
5190 echo "${ECHO_T}$cf_cv_do_relink" >&6
5191         ;;
5192 esac
5193
5194         LOCAL_LDFLAGS=
5195         LOCAL_LDFLAGS2=
5196         LD_RPATH_OPT=
5197         LD_SHARED_OPTS=
5198         INSTALL_LIB="-m 644"
5199
5200         cf_cv_do_symlinks=no
5201
5202         echo "$as_me:5202: checking if release/abi version should be used for shared libs" >&5
5203 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5204
5205 # Check whether --with-shlib-version or --without-shlib-version was given.
5206 if test "${with_shlib_version+set}" = set; then
5207   withval="$with_shlib_version"
5208   test -z "$withval" && withval=auto
5209         case $withval in #(vi
5210         yes) #(vi
5211                 cf_cv_shlib_version=auto
5212                 ;;
5213         rel|abi|auto|no) #(vi
5214                 cf_cv_shlib_version=$withval
5215                 ;;
5216         *)
5217                 { { echo "$as_me:5217: error: option value must be one of: rel, abi, auto or no" >&5
5218 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5219    { (exit 1); exit 1; }; }
5220                 ;;
5221         esac
5222
5223 else
5224   cf_cv_shlib_version=auto
5225 fi;
5226         echo "$as_me:5226: result: $cf_cv_shlib_version" >&5
5227 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5228
5229         cf_cv_rm_so_locs=no
5230
5231         # Some less-capable ports of gcc support only -fpic
5232         CC_SHARED_OPTS=
5233         if test "$GCC" = yes
5234         then
5235                 echo "$as_me:5235: checking which $CC option to use" >&5
5236 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5237                 cf_save_CFLAGS="$CFLAGS"
5238                 for CC_SHARED_OPTS in -fPIC -fpic ''
5239                 do
5240                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5241                         cat >conftest.$ac_ext <<_ACEOF
5242 #line 5242 "configure"
5243 #include "confdefs.h"
5244 #include <stdio.h>
5245 int
5246 main ()
5247 {
5248 int x = 1
5249   ;
5250   return 0;
5251 }
5252 _ACEOF
5253 rm -f conftest.$ac_objext
5254 if { (eval echo "$as_me:5254: \"$ac_compile\"") >&5
5255   (eval $ac_compile) 2>&5
5256   ac_status=$?
5257   echo "$as_me:5257: \$? = $ac_status" >&5
5258   (exit $ac_status); } &&
5259          { ac_try='test -s conftest.$ac_objext'
5260   { (eval echo "$as_me:5260: \"$ac_try\"") >&5
5261   (eval $ac_try) 2>&5
5262   ac_status=$?
5263   echo "$as_me:5263: \$? = $ac_status" >&5
5264   (exit $ac_status); }; }; then
5265   break
5266 else
5267   echo "$as_me: failed program was:" >&5
5268 cat conftest.$ac_ext >&5
5269 fi
5270 rm -f conftest.$ac_objext conftest.$ac_ext
5271                 done
5272                 echo "$as_me:5272: result: $CC_SHARED_OPTS" >&5
5273 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5274                 CFLAGS="$cf_save_CFLAGS"
5275         fi
5276
5277         cf_cv_shlib_version_infix=no
5278
5279         case $cf_cv_system_name in
5280         aix[56]*)
5281                 if test "$GCC" = yes; then
5282                         CC_SHARED_OPTS=
5283                         MK_SHARED_LIB="$(CC) -shared"
5284                 fi
5285                 ;;
5286         beos*)
5287                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5288                 ;;
5289         cygwin*)
5290                 CC_SHARED_OPTS=
5291                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5292                 cf_cv_shlib_version=cygdll
5293                 cf_cv_shlib_version_infix=cygdll
5294                 cat >mk_shared_lib.sh <<-CF_EOF
5295                 #!/bin/sh
5296                 SHARED_LIB=\$1
5297                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5298                 shift
5299                 cat <<-EOF
5300                 Linking shared library
5301                 ** SHARED_LIB \$SHARED_LIB
5302                 ** IMPORT_LIB \$IMPORT_LIB
5303 EOF
5304                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5305 CF_EOF
5306                 chmod +x mk_shared_lib.sh
5307                 ;;
5308         darwin*)
5309                 EXTRA_CFLAGS="-no-cpp-precomp"
5310                 CC_SHARED_OPTS="-dynamic"
5311                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5312                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5313                 cf_cv_shlib_version_infix=yes
5314                 echo "$as_me:5314: checking if ld -search_paths_first works" >&5
5315 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5316 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5317   echo $ECHO_N "(cached) $ECHO_C" >&6
5318 else
5319
5320                         cf_save_LDFLAGS=$LDFLAGS
5321                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5322                         cat >conftest.$ac_ext <<_ACEOF
5323 #line 5323 "configure"
5324 #include "confdefs.h"
5325
5326 int
5327 main ()
5328 {
5329 int i;
5330   ;
5331   return 0;
5332 }
5333 _ACEOF
5334 rm -f conftest.$ac_objext conftest$ac_exeext
5335 if { (eval echo "$as_me:5335: \"$ac_link\"") >&5
5336   (eval $ac_link) 2>&5
5337   ac_status=$?
5338   echo "$as_me:5338: \$? = $ac_status" >&5
5339   (exit $ac_status); } &&
5340          { ac_try='test -s conftest$ac_exeext'
5341   { (eval echo "$as_me:5341: \"$ac_try\"") >&5
5342   (eval $ac_try) 2>&5
5343   ac_status=$?
5344   echo "$as_me:5344: \$? = $ac_status" >&5
5345   (exit $ac_status); }; }; then
5346   cf_cv_ldflags_search_paths_first=yes
5347 else
5348   echo "$as_me: failed program was:" >&5
5349 cat conftest.$ac_ext >&5
5350 cf_cv_ldflags_search_paths_first=no
5351 fi
5352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5353                                 LDFLAGS=$cf_save_LDFLAGS
5354 fi
5355 echo "$as_me:5355: result: $cf_cv_ldflags_search_paths_first" >&5
5356 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5357                 if test $cf_cv_ldflags_search_paths_first = yes; then
5358                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5359                 fi
5360                 ;;
5361         hpux*)
5362                 # (tested with gcc 2.7.2 -- I don't have c89)
5363                 if test "$GCC" = yes; then
5364                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5365                 else
5366                         CC_SHARED_OPTS='+Z'
5367                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5368                 fi
5369                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5370                 # HP-UX shared libraries must be executable, and should be
5371                 # readonly to exploit a quirk in the memory manager.
5372                 INSTALL_LIB="-m 555"
5373                 ;;
5374         irix*)
5375                 if test "$cf_cv_ld_rpath" = yes ; then
5376                         if test "$GCC" = yes; then
5377                                 LD_RPATH_OPT="-Wl,-rpath,"
5378                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5379                         else
5380                                 LD_RPATH_OPT="-rpath "
5381                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5382                         fi
5383                 fi
5384                 # tested with IRIX 5.2 and 'cc'.
5385                 if test "$GCC" != yes; then
5386                         CC_SHARED_OPTS='-KPIC'
5387                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5388                 else
5389                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5390                 fi
5391                 cf_cv_rm_so_locs=yes
5392                 ;;
5393         linux*|gnu*|k*bsd*-gnu)
5394                 if test "$DFT_LWR_MODEL" = "shared" ; then
5395                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5396                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5397                 fi
5398                 if test "$cf_cv_ld_rpath" = yes ; then
5399                         LD_RPATH_OPT="-Wl,-rpath,"
5400                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5401                 fi
5402
5403         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5404         if test "$cf_cv_shlib_version" = rel; then
5405                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5406         else
5407                 cf_cv_shared_soname='`basename $@`'
5408         fi
5409
5410                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5411                 ;;
5412         openbsd[2-9].*)
5413                 if test "$DFT_LWR_MODEL" = "shared" ; then
5414                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5415                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5416                 fi
5417                 if test "$cf_cv_ld_rpath" = yes ; then
5418                         LD_RPATH_OPT="-Wl,-rpath,"
5419                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5420                 fi
5421                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5422
5423         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5424         if test "$cf_cv_shlib_version" = rel; then
5425                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5426         else
5427                 cf_cv_shared_soname='`basename $@`'
5428         fi
5429
5430                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5431                 ;;
5432         nto-qnx*|openbsd*|freebsd[12].*)
5433                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5434                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5435                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5436                 ;;
5437         freebsd*)
5438                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5439                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5440                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5441                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5442                         LD_RPATH_OPT="-rpath "
5443                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5444                 fi
5445
5446         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5447         if test "$cf_cv_shlib_version" = rel; then
5448                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5449         else
5450                 cf_cv_shared_soname='`basename $@`'
5451         fi
5452
5453                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5454                 ;;
5455         netbsd*)
5456                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5457                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5458                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5459                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5460                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5461                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5462                         if test "$cf_cv_shlib_version" = auto; then
5463                         if test -f /usr/libexec/ld.elf_so; then
5464                                 cf_cv_shlib_version=abi
5465                         else
5466                                 cf_cv_shlib_version=rel
5467                         fi
5468                         fi
5469
5470         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5471         if test "$cf_cv_shlib_version" = rel; then
5472                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5473         else
5474                 cf_cv_shared_soname='`basename $@`'
5475         fi
5476
5477                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5478                 else
5479                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5480                 fi
5481                 ;;
5482         osf*|mls+*)
5483                 # tested with OSF/1 V3.2 and 'cc'
5484                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5485                 # link with shared libs).
5486                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5487                 case $host_os in
5488                 osf4*)
5489                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5490                         ;;
5491                 esac
5492                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5493                 if test "$DFT_LWR_MODEL" = "shared" ; then
5494                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5495                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5496                 fi
5497                 if test "$cf_cv_ld_rpath" = yes ; then
5498                         LD_RPATH_OPT="-rpath"
5499                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5500                 fi
5501                 cf_cv_rm_so_locs=yes
5502                 ;;
5503         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5504                 # tested with osr5.0.5
5505                 if test "$GCC" != yes; then
5506                         CC_SHARED_OPTS='-belf -KPIC'
5507                 fi
5508                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5509                 if test "$cf_cv_ld_rpath" = yes ; then
5510                         # only way is to set LD_RUN_PATH but no switch for it
5511                         RUN_PATH=$libdir
5512                 fi
5513                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5514                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5515                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5516                 ;;
5517         sunos4*)
5518                 # tested with SunOS 4.1.1 and gcc 2.7.0
5519                 if test "$GCC" != yes; then
5520                         CC_SHARED_OPTS='-KPIC'
5521                 fi
5522                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5523                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5524                 ;;
5525         solaris2*)
5526                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5527                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5528                 if test "$DFT_LWR_MODEL" = "shared" ; then
5529                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5530                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5531                 fi
5532                 if test "$cf_cv_ld_rpath" = yes ; then
5533                         LD_RPATH_OPT="-R"
5534                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5535                 fi
5536
5537         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5538         if test "$cf_cv_shlib_version" = rel; then
5539                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5540         else
5541                 cf_cv_shared_soname='`basename $@`'
5542         fi
5543
5544                 if test "$GCC" != yes; then
5545                         cf_save_CFLAGS="$CFLAGS"
5546                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5547                         do
5548                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5549                                 cat >conftest.$ac_ext <<_ACEOF
5550 #line 5550 "configure"
5551 #include "confdefs.h"
5552 #include <stdio.h>
5553 int
5554 main ()
5555 {
5556 printf("Hello\n");
5557   ;
5558   return 0;
5559 }
5560 _ACEOF
5561 rm -f conftest.$ac_objext
5562 if { (eval echo "$as_me:5562: \"$ac_compile\"") >&5
5563   (eval $ac_compile) 2>&5
5564   ac_status=$?
5565   echo "$as_me:5565: \$? = $ac_status" >&5
5566   (exit $ac_status); } &&
5567          { ac_try='test -s conftest.$ac_objext'
5568   { (eval echo "$as_me:5568: \"$ac_try\"") >&5
5569   (eval $ac_try) 2>&5
5570   ac_status=$?
5571   echo "$as_me:5571: \$? = $ac_status" >&5
5572   (exit $ac_status); }; }; then
5573   break
5574 else
5575   echo "$as_me: failed program was:" >&5
5576 cat conftest.$ac_ext >&5
5577 fi
5578 rm -f conftest.$ac_objext conftest.$ac_ext
5579                         done
5580                         CFLAGS="$cf_save_CFLAGS"
5581                         CC_SHARED_OPTS=$cf_shared_opts
5582                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5583                 else
5584                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5585                 fi
5586                 ;;
5587         sysv5uw7*|unix_sv*)
5588                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5589                 if test "$GCC" != yes; then
5590                         CC_SHARED_OPTS='-KPIC'
5591                 fi
5592                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5593                 ;;
5594         *)
5595                 CC_SHARED_OPTS='unknown'
5596                 MK_SHARED_LIB='echo unknown'
5597                 ;;
5598         esac
5599
5600         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5601         case "$cf_cv_shlib_version" in #(vi
5602         rel|abi)
5603                 case "$MK_SHARED_LIB" in #(vi
5604                 *'-o $@')
5605                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5606                         ;;
5607                 *)
5608                         { echo "$as_me:5608: WARNING: ignored --with-shlib-version" >&5
5609 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5610                         ;;
5611                 esac
5612                 ;;
5613         esac
5614
5615         if test -n "$LD_RPATH_OPT" ; then
5616                 echo "$as_me:5616: checking if we need a space after rpath option" >&5
5617 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5618                 cf_save_LIBS="$LIBS"
5619                 LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5620                 cat >conftest.$ac_ext <<_ACEOF
5621 #line 5621 "configure"
5622 #include "confdefs.h"
5623
5624 int
5625 main ()
5626 {
5627
5628   ;
5629   return 0;
5630 }
5631 _ACEOF
5632 rm -f conftest.$ac_objext conftest$ac_exeext
5633 if { (eval echo "$as_me:5633: \"$ac_link\"") >&5
5634   (eval $ac_link) 2>&5
5635   ac_status=$?
5636   echo "$as_me:5636: \$? = $ac_status" >&5
5637   (exit $ac_status); } &&
5638          { ac_try='test -s conftest$ac_exeext'
5639   { (eval echo "$as_me:5639: \"$ac_try\"") >&5
5640   (eval $ac_try) 2>&5
5641   ac_status=$?
5642   echo "$as_me:5642: \$? = $ac_status" >&5
5643   (exit $ac_status); }; }; then
5644   cf_rpath_space=no
5645 else
5646   echo "$as_me: failed program was:" >&5
5647 cat conftest.$ac_ext >&5
5648 cf_rpath_space=yes
5649 fi
5650 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5651                 LIBS="$cf_save_LIBS"
5652                 echo "$as_me:5652: result: $cf_rpath_space" >&5
5653 echo "${ECHO_T}$cf_rpath_space" >&6
5654                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5655                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5656         fi
5657
5658 if test "$CC_SHARED_OPTS" = "unknown"; then
5659         for model in $cf_list_models; do
5660                 if test "$model" = "shared"; then
5661                         { { echo "$as_me:5661: error: Shared libraries are not supported in this version" >&5
5662 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5663    { (exit 1); exit 1; }; }
5664                 fi
5665         done
5666 fi
5667
5668 ###############################################################################
5669
5670 ###     use option --disable-overwrite to leave out the link to -lcurses
5671 echo "$as_me:5671: checking if you wish to install ncurses overwriting curses" >&5
5672 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5673
5674 # Check whether --enable-overwrite or --disable-overwrite was given.
5675 if test "${enable_overwrite+set}" = set; then
5676   enableval="$enable_overwrite"
5677   with_overwrite=$enableval
5678 else
5679   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5680 fi;
5681 echo "$as_me:5681: result: $with_overwrite" >&5
5682 echo "${ECHO_T}$with_overwrite" >&6
5683
5684 echo "$as_me:5684: checking if external terminfo-database is used" >&5
5685 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5686
5687 # Check whether --enable-database or --disable-database was given.
5688 if test "${enable_database+set}" = set; then
5689   enableval="$enable_database"
5690   use_database=$enableval
5691 else
5692   use_database=yes
5693 fi;
5694 echo "$as_me:5694: result: $use_database" >&5
5695 echo "${ECHO_T}$use_database" >&6
5696
5697 case $host_os in #(vi
5698 os2*) #(vi
5699         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5700         ;;
5701 *) #(vi
5702         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5703         ;;
5704 esac
5705
5706         case $cf_cv_system_name in
5707         os2*)   PATH_SEPARATOR=';'  ;;
5708         *)      PATH_SEPARATOR=':'  ;;
5709         esac
5710
5711 if test "$use_database" != no ; then
5712         cat >>confdefs.h <<\EOF
5713 #define USE_DATABASE 1
5714 EOF
5715
5716         echo "$as_me:5716: checking which terminfo source-file will be installed" >&5
5717 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5718
5719 # Check whether --with-database or --without-database was given.
5720 if test "${with_database+set}" = set; then
5721   withval="$with_database"
5722   TERMINFO_SRC=$withval
5723 fi;
5724         echo "$as_me:5724: result: $TERMINFO_SRC" >&5
5725 echo "${ECHO_T}$TERMINFO_SRC" >&6
5726
5727         echo "$as_me:5727: checking whether to use hashed database instead of directory/tree" >&5
5728 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5729
5730 # Check whether --with-hashed-db or --without-hashed-db was given.
5731 if test "${with_hashed_db+set}" = set; then
5732   withval="$with_hashed_db"
5733
5734 else
5735   with_hashed_db=no
5736 fi;
5737         echo "$as_me:5737: result: $with_hashed_db" >&5
5738 echo "${ECHO_T}$with_hashed_db" >&6
5739 else
5740         with_hashed_db=no
5741 fi
5742
5743 echo "$as_me:5743: checking for list of fallback descriptions" >&5
5744 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5745
5746 # Check whether --with-fallbacks or --without-fallbacks was given.
5747 if test "${with_fallbacks+set}" = set; then
5748   withval="$with_fallbacks"
5749   with_fallback=$withval
5750 else
5751   with_fallback=
5752 fi;
5753 echo "$as_me:5753: result: $with_fallback" >&5
5754 echo "${ECHO_T}$with_fallback" >&6
5755 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5756
5757 echo "$as_me:5757: checking if you want modern xterm or antique" >&5
5758 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5759
5760 # Check whether --with-xterm-new or --without-xterm-new was given.
5761 if test "${with_xterm_new+set}" = set; then
5762   withval="$with_xterm_new"
5763   with_xterm_new=$withval
5764 else
5765   with_xterm_new=yes
5766 fi;
5767 case $with_xterm_new in
5768 no)     with_xterm_new=xterm-old;;
5769 *)      with_xterm_new=xterm-new;;
5770 esac
5771 echo "$as_me:5771: result: $with_xterm_new" >&5
5772 echo "${ECHO_T}$with_xterm_new" >&6
5773 WHICH_XTERM=$with_xterm_new
5774
5775 MAKE_TERMINFO=
5776 if test "$use_database" = no ; then
5777         TERMINFO="${datadir}/terminfo"
5778         MAKE_TERMINFO="#"
5779 else
5780
5781 echo "$as_me:5781: checking for list of terminfo directories" >&5
5782 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5783
5784 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5785 if test "${with_terminfo_dirs+set}" = set; then
5786   withval="$with_terminfo_dirs"
5787
5788 else
5789   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5790 fi;
5791 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5792 cf_dst_path=
5793 for cf_src_path in $withval
5794 do
5795
5796 if test "x$prefix" != xNONE; then
5797   cf_path_syntax="$prefix"
5798 else
5799   cf_path_syntax="$ac_default_prefix"
5800 fi
5801
5802 case ".$cf_src_path" in #(vi
5803 .\$\(*\)*|.\'*\'*) #(vi
5804   ;;
5805 ..|./*|.\\*) #(vi
5806   ;;
5807 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5808   ;;
5809 .\${*prefix}*) #(vi
5810   eval cf_src_path="$cf_src_path"
5811   case ".$cf_src_path" in #(vi
5812   .NONE/*)
5813     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5814     ;;
5815   esac
5816   ;; #(vi
5817 .no|.NONE/*)
5818   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5819   ;;
5820 *)
5821   { { echo "$as_me:5821: error: expected a pathname, not \"$cf_src_path\"" >&5
5822 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5823    { (exit 1); exit 1; }; }
5824   ;;
5825 esac
5826
5827   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5828   cf_dst_path="${cf_dst_path}${cf_src_path}"
5829 done
5830 IFS="$ac_save_ifs"
5831
5832 eval 'TERMINFO_DIRS="$cf_dst_path"'
5833
5834 echo "$as_me:5834: result: $TERMINFO_DIRS" >&5
5835 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5836 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5837 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5838 EOF
5839
5840 echo "$as_me:5840: checking for default terminfo directory" >&5
5841 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5842
5843 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5844 if test "${with_default_terminfo_dir+set}" = set; then
5845   withval="$with_default_terminfo_dir"
5846
5847 else
5848   withval="${TERMINFO-${datadir}/terminfo}"
5849 fi; if test -n "${datadir}/terminfo" ; then
5850
5851 if test "x$prefix" != xNONE; then
5852   cf_path_syntax="$prefix"
5853 else
5854   cf_path_syntax="$ac_default_prefix"
5855 fi
5856
5857 case ".$withval" in #(vi
5858 .\$\(*\)*|.\'*\'*) #(vi
5859   ;;
5860 ..|./*|.\\*) #(vi
5861   ;;
5862 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5863   ;;
5864 .\${*prefix}*) #(vi
5865   eval withval="$withval"
5866   case ".$withval" in #(vi
5867   .NONE/*)
5868     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5869     ;;
5870   esac
5871   ;; #(vi
5872 .no|.NONE/*)
5873   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5874   ;;
5875 *)
5876   { { echo "$as_me:5876: error: expected a pathname, not \"$withval\"" >&5
5877 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5878    { (exit 1); exit 1; }; }
5879   ;;
5880 esac
5881
5882 fi
5883 TERMINFO="$withval"
5884
5885 echo "$as_me:5885: result: $TERMINFO" >&5
5886 echo "${ECHO_T}$TERMINFO" >&6
5887 cat >>confdefs.h <<EOF
5888 #define TERMINFO "$TERMINFO"
5889 EOF
5890
5891 fi
5892
5893 ###     use option --disable-big-core to make tic run on small machines
5894 ###     We need 4Mb, check if we can allocate 50% more than that.
5895 echo "$as_me:5895: checking if big-core option selected" >&5
5896 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5897
5898 # Check whether --enable-big-core or --disable-big-core was given.
5899 if test "${enable_big_core+set}" = set; then
5900   enableval="$enable_big_core"
5901   with_big_core=$enableval
5902 else
5903   if test "$cross_compiling" = yes; then
5904   with_big_core=no
5905 else
5906   cat >conftest.$ac_ext <<_ACEOF
5907 #line 5907 "configure"
5908 #include "confdefs.h"
5909
5910 #include <stdlib.h>
5911 #include <string.h>
5912 int main() {
5913         unsigned long n = 6000000L;
5914         char *s = malloc(n);
5915         if (s != 0)
5916                 s[0] = s[n-1] = 0;
5917         ${cf_cv_main_return:-return}(s == 0);
5918 }
5919 _ACEOF
5920 rm -f conftest$ac_exeext
5921 if { (eval echo "$as_me:5921: \"$ac_link\"") >&5
5922   (eval $ac_link) 2>&5
5923   ac_status=$?
5924   echo "$as_me:5924: \$? = $ac_status" >&5
5925   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5926   { (eval echo "$as_me:5926: \"$ac_try\"") >&5
5927   (eval $ac_try) 2>&5
5928   ac_status=$?
5929   echo "$as_me:5929: \$? = $ac_status" >&5
5930   (exit $ac_status); }; }; then
5931   with_big_core=yes
5932 else
5933   echo "$as_me: program exited with status $ac_status" >&5
5934 echo "$as_me: failed program was:" >&5
5935 cat conftest.$ac_ext >&5
5936 with_big_core=no
5937 fi
5938 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5939 fi
5940 fi;
5941 echo "$as_me:5941: result: $with_big_core" >&5
5942 echo "${ECHO_T}$with_big_core" >&6
5943 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5944 #define HAVE_BIG_CORE 1
5945 EOF
5946
5947 ### ISO C only guarantees 512-char strings, we have tables which load faster
5948 ### when constructed using "big" strings.  More than the C compiler, the awk
5949 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5950 echo "$as_me:5950: checking if big-strings option selected" >&5
5951 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5952
5953 # Check whether --enable-big-strings or --disable-big-strings was given.
5954 if test "${enable_big_strings+set}" = set; then
5955   enableval="$enable_big_strings"
5956   with_big_strings=$enableval
5957 else
5958
5959         case x$AWK in #(vi
5960         x)
5961                 eval with_big_strings=no
5962                 ;;
5963         *) #(vi
5964                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5965                         | $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
5966                         eval with_big_strings=yes
5967                 else
5968                         eval with_big_strings=no
5969                 fi
5970                 ;;
5971         esac
5972
5973 fi;
5974 echo "$as_me:5974: result: $with_big_strings" >&5
5975 echo "${ECHO_T}$with_big_strings" >&6
5976
5977 USE_BIG_STRINGS=0
5978 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5979
5980 ###     use option --enable-termcap to compile in the termcap fallback support
5981 echo "$as_me:5981: checking if you want termcap-fallback support" >&5
5982 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5983
5984 # Check whether --enable-termcap or --disable-termcap was given.
5985 if test "${enable_termcap+set}" = set; then
5986   enableval="$enable_termcap"
5987   with_termcap=$enableval
5988 else
5989   with_termcap=no
5990 fi;
5991 echo "$as_me:5991: result: $with_termcap" >&5
5992 echo "${ECHO_T}$with_termcap" >&6
5993
5994 if test "$with_termcap" != "yes" ; then
5995         if test "$use_database" = no ; then
5996                 if test -z "$with_fallback" ; then
5997                         { { echo "$as_me:5997: error: You have disabled the database w/o specifying fallbacks" >&5
5998 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5999    { (exit 1); exit 1; }; }
6000                 fi
6001         fi
6002         cat >>confdefs.h <<\EOF
6003 #define PURE_TERMINFO 1
6004 EOF
6005
6006 else
6007
6008 if test "$with_ticlib" != no ; then
6009         { { echo "$as_me:6009: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6010 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6011    { (exit 1); exit 1; }; }
6012 fi
6013
6014 cat >>confdefs.h <<\EOF
6015 #define USE_TERMCAP 1
6016 EOF
6017
6018 echo "$as_me:6018: checking for list of termcap files" >&5
6019 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6020
6021 # Check whether --with-termpath or --without-termpath was given.
6022 if test "${with_termpath+set}" = set; then
6023   withval="$with_termpath"
6024
6025 else
6026   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6027 fi;
6028 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6029 cf_dst_path=
6030 for cf_src_path in $withval
6031 do
6032
6033 if test "x$prefix" != xNONE; then
6034   cf_path_syntax="$prefix"
6035 else
6036   cf_path_syntax="$ac_default_prefix"
6037 fi
6038
6039 case ".$cf_src_path" in #(vi
6040 .\$\(*\)*|.\'*\'*) #(vi
6041   ;;
6042 ..|./*|.\\*) #(vi
6043   ;;
6044 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6045   ;;
6046 .\${*prefix}*) #(vi
6047   eval cf_src_path="$cf_src_path"
6048   case ".$cf_src_path" in #(vi
6049   .NONE/*)
6050     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6051     ;;
6052   esac
6053   ;; #(vi
6054 .no|.NONE/*)
6055   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6056   ;;
6057 *)
6058   { { echo "$as_me:6058: error: expected a pathname, not \"$cf_src_path\"" >&5
6059 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6060    { (exit 1); exit 1; }; }
6061   ;;
6062 esac
6063
6064   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6065   cf_dst_path="${cf_dst_path}${cf_src_path}"
6066 done
6067 IFS="$ac_save_ifs"
6068
6069 eval 'TERMPATH="$cf_dst_path"'
6070
6071 echo "$as_me:6071: result: $TERMPATH" >&5
6072 echo "${ECHO_T}$TERMPATH" >&6
6073 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6074 #define TERMPATH "$TERMPATH"
6075 EOF
6076
6077 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6078 echo "$as_me:6078: checking if fast termcap-loader is needed" >&5
6079 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6080
6081 # Check whether --enable-getcap or --disable-getcap was given.
6082 if test "${enable_getcap+set}" = set; then
6083   enableval="$enable_getcap"
6084   with_getcap=$enableval
6085 else
6086   with_getcap=no
6087 fi;
6088 echo "$as_me:6088: result: $with_getcap" >&5
6089 echo "${ECHO_T}$with_getcap" >&6
6090 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6091 #define USE_GETCAP 1
6092 EOF
6093
6094 echo "$as_me:6094: checking if translated termcaps will be cached in ~/.terminfo" >&5
6095 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6096
6097 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6098 if test "${enable_getcap_cache+set}" = set; then
6099   enableval="$enable_getcap_cache"
6100   with_getcap_cache=$enableval
6101 else
6102   with_getcap_cache=no
6103 fi;
6104 echo "$as_me:6104: result: $with_getcap_cache" >&5
6105 echo "${ECHO_T}$with_getcap_cache" >&6
6106 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6107 #define USE_GETCAP_CACHE 1
6108 EOF
6109
6110 fi
6111
6112 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6113 echo "$as_me:6113: checking if ~/.terminfo is wanted" >&5
6114 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6115
6116 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6117 if test "${enable_home_terminfo+set}" = set; then
6118   enableval="$enable_home_terminfo"
6119   with_home_terminfo=$enableval
6120 else
6121   with_home_terminfo=yes
6122 fi;
6123 echo "$as_me:6123: result: $with_home_terminfo" >&5
6124 echo "${ECHO_T}$with_home_terminfo" >&6
6125 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6126 #define USE_HOME_TERMINFO 1
6127 EOF
6128
6129 echo "$as_me:6129: checking if you want to use restricted environment when running as root" >&5
6130 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6131
6132 # Check whether --enable-root-environ or --disable-root-environ was given.
6133 if test "${enable_root_environ+set}" = set; then
6134   enableval="$enable_root_environ"
6135   with_root_environ=$enableval
6136 else
6137   with_root_environ=yes
6138 fi;
6139 echo "$as_me:6139: result: $with_root_environ" >&5
6140 echo "${ECHO_T}$with_root_environ" >&6
6141 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6142 #define USE_ROOT_ENVIRON 1
6143 EOF
6144
6145 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6146 ###   to reduce storage requirements for the terminfo database.
6147
6148 for ac_func in \
6149         remove \
6150         unlink
6151 do
6152 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6153 echo "$as_me:6153: checking for $ac_func" >&5
6154 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6155 if eval "test \"\${$as_ac_var+set}\" = set"; then
6156   echo $ECHO_N "(cached) $ECHO_C" >&6
6157 else
6158   cat >conftest.$ac_ext <<_ACEOF
6159 #line 6159 "configure"
6160 #include "confdefs.h"
6161 /* System header to define __stub macros and hopefully few prototypes,
6162     which can conflict with char $ac_func (); below.  */
6163 #include <assert.h>
6164 /* Override any gcc2 internal prototype to avoid an error.  */
6165 #ifdef __cplusplus
6166 extern "C"
6167 #endif
6168 /* We use char because int might match the return type of a gcc2
6169    builtin and then its argument prototype would still apply.  */
6170 char $ac_func ();
6171 char (*f) ();
6172
6173 int
6174 main ()
6175 {
6176 /* The GNU C library defines this for functions which it implements
6177     to always fail with ENOSYS.  Some functions are actually named
6178     something starting with __ and the normal name is an alias.  */
6179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6180 choke me
6181 #else
6182 f = $ac_func;
6183 #endif
6184
6185   ;
6186   return 0;
6187 }
6188 _ACEOF
6189 rm -f conftest.$ac_objext conftest$ac_exeext
6190 if { (eval echo "$as_me:6190: \"$ac_link\"") >&5
6191   (eval $ac_link) 2>&5
6192   ac_status=$?
6193   echo "$as_me:6193: \$? = $ac_status" >&5
6194   (exit $ac_status); } &&
6195          { ac_try='test -s conftest$ac_exeext'
6196   { (eval echo "$as_me:6196: \"$ac_try\"") >&5
6197   (eval $ac_try) 2>&5
6198   ac_status=$?
6199   echo "$as_me:6199: \$? = $ac_status" >&5
6200   (exit $ac_status); }; }; then
6201   eval "$as_ac_var=yes"
6202 else
6203   echo "$as_me: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6205 eval "$as_ac_var=no"
6206 fi
6207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6208 fi
6209 echo "$as_me:6209: result: `eval echo '${'$as_ac_var'}'`" >&5
6210 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6211 if test `eval echo '${'$as_ac_var'}'` = yes; then
6212   cat >>confdefs.h <<EOF
6213 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6214 EOF
6215
6216 fi
6217 done
6218
6219 if test "$cross_compiling" = yes ; then
6220
6221 for ac_func in \
6222                 link \
6223                 symlink
6224 do
6225 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6226 echo "$as_me:6226: checking for $ac_func" >&5
6227 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6228 if eval "test \"\${$as_ac_var+set}\" = set"; then
6229   echo $ECHO_N "(cached) $ECHO_C" >&6
6230 else
6231   cat >conftest.$ac_ext <<_ACEOF
6232 #line 6232 "configure"
6233 #include "confdefs.h"
6234 /* System header to define __stub macros and hopefully few prototypes,
6235     which can conflict with char $ac_func (); below.  */
6236 #include <assert.h>
6237 /* Override any gcc2 internal prototype to avoid an error.  */
6238 #ifdef __cplusplus
6239 extern "C"
6240 #endif
6241 /* We use char because int might match the return type of a gcc2
6242    builtin and then its argument prototype would still apply.  */
6243 char $ac_func ();
6244 char (*f) ();
6245
6246 int
6247 main ()
6248 {
6249 /* The GNU C library defines this for functions which it implements
6250     to always fail with ENOSYS.  Some functions are actually named
6251     something starting with __ and the normal name is an alias.  */
6252 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6253 choke me
6254 #else
6255 f = $ac_func;
6256 #endif
6257
6258   ;
6259   return 0;
6260 }
6261 _ACEOF
6262 rm -f conftest.$ac_objext conftest$ac_exeext
6263 if { (eval echo "$as_me:6263: \"$ac_link\"") >&5
6264   (eval $ac_link) 2>&5
6265   ac_status=$?
6266   echo "$as_me:6266: \$? = $ac_status" >&5
6267   (exit $ac_status); } &&
6268          { ac_try='test -s conftest$ac_exeext'
6269   { (eval echo "$as_me:6269: \"$ac_try\"") >&5
6270   (eval $ac_try) 2>&5
6271   ac_status=$?
6272   echo "$as_me:6272: \$? = $ac_status" >&5
6273   (exit $ac_status); }; }; then
6274   eval "$as_ac_var=yes"
6275 else
6276   echo "$as_me: failed program was:" >&5
6277 cat conftest.$ac_ext >&5
6278 eval "$as_ac_var=no"
6279 fi
6280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6281 fi
6282 echo "$as_me:6282: result: `eval echo '${'$as_ac_var'}'`" >&5
6283 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6284 if test `eval echo '${'$as_ac_var'}'` = yes; then
6285   cat >>confdefs.h <<EOF
6286 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6287 EOF
6288
6289 fi
6290 done
6291
6292 else
6293         echo "$as_me:6293: checking if link/symlink functions work" >&5
6294 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6295 if test "${cf_cv_link_funcs+set}" = set; then
6296   echo $ECHO_N "(cached) $ECHO_C" >&6
6297 else
6298
6299                 cf_cv_link_funcs=
6300                 for cf_func in link symlink ; do
6301                         if test "$cross_compiling" = yes; then
6302
6303                         eval 'ac_cv_func_'$cf_func'=error'
6304 else
6305   cat >conftest.$ac_ext <<_ACEOF
6306 #line 6306 "configure"
6307 #include "confdefs.h"
6308
6309 #include <sys/types.h>
6310 #include <sys/stat.h>
6311 #ifdef HAVE_UNISTD_H
6312 #include <unistd.h>
6313 #endif
6314 int main()
6315 {
6316         int fail = 0;
6317         char *src = "config.log";
6318         char *dst = "conftest.chk";
6319         struct stat src_sb;
6320         struct stat dst_sb;
6321
6322         stat(src, &src_sb);
6323         fail = ($cf_func("config.log", "conftest.chk") < 0)
6324             || (stat(dst, &dst_sb) < 0)
6325             || (dst_sb.st_mtime != src_sb.st_mtime);
6326 #ifdef HAVE_UNLINK
6327         unlink(dst);
6328 #else
6329         remove(dst);
6330 #endif
6331         ${cf_cv_main_return:-return} (fail);
6332 }
6333
6334 _ACEOF
6335 rm -f conftest$ac_exeext
6336 if { (eval echo "$as_me:6336: \"$ac_link\"") >&5
6337   (eval $ac_link) 2>&5
6338   ac_status=$?
6339   echo "$as_me:6339: \$? = $ac_status" >&5
6340   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6341   { (eval echo "$as_me:6341: \"$ac_try\"") >&5
6342   (eval $ac_try) 2>&5
6343   ac_status=$?
6344   echo "$as_me:6344: \$? = $ac_status" >&5
6345   (exit $ac_status); }; }; then
6346
6347                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6348                         eval 'ac_cv_func_'$cf_func'=yes'
6349 else
6350   echo "$as_me: program exited with status $ac_status" >&5
6351 echo "$as_me: failed program was:" >&5
6352 cat conftest.$ac_ext >&5
6353
6354                         eval 'ac_cv_func_'$cf_func'=no'
6355 fi
6356 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6357 fi
6358                 done
6359                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6360
6361 fi
6362 echo "$as_me:6362: result: $cf_cv_link_funcs" >&5
6363 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6364         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6365 #define HAVE_LINK 1
6366 EOF
6367
6368         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6369 #define HAVE_SYMLINK 1
6370 EOF
6371
6372 fi
6373
6374 with_links=no
6375 with_symlinks=no
6376
6377 # soft links (symbolic links) are useful for some systems where hard links do
6378 # not work, or to make it simpler to copy terminfo trees around.
6379 if test "$ac_cv_func_symlink" = yes ; then
6380     echo "$as_me:6380: checking if tic should use symbolic links" >&5
6381 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6382
6383 # Check whether --enable-symlinks or --disable-symlinks was given.
6384 if test "${enable_symlinks+set}" = set; then
6385   enableval="$enable_symlinks"
6386   with_symlinks=$enableval
6387 else
6388   with_symlinks=no
6389 fi;
6390     echo "$as_me:6390: result: $with_symlinks" >&5
6391 echo "${ECHO_T}$with_symlinks" >&6
6392 fi
6393
6394 # If we have hard links and did not choose to use soft links instead, there is
6395 # no reason to make this choice optional - use the hard links.
6396 if test "$with_symlinks" = no ; then
6397     echo "$as_me:6397: checking if tic should use hard links" >&5
6398 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6399     if test "$ac_cv_func_link" = yes ; then
6400         with_links=yes
6401     else
6402         with_links=no
6403     fi
6404     echo "$as_me:6404: result: $with_links" >&5
6405 echo "${ECHO_T}$with_links" >&6
6406 fi
6407
6408 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6409 #define USE_LINKS 1
6410 EOF
6411
6412 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6413 #define USE_SYMLINKS 1
6414 EOF
6415
6416 ###   use option --enable-broken-linker to force on use of broken-linker support
6417 echo "$as_me:6417: checking if you want broken-linker support code" >&5
6418 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6419
6420 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6421 if test "${enable_broken_linker+set}" = set; then
6422   enableval="$enable_broken_linker"
6423   with_broken_linker=$enableval
6424 else
6425   with_broken_linker=${BROKEN_LINKER-no}
6426 fi;
6427 echo "$as_me:6427: result: $with_broken_linker" >&5
6428 echo "${ECHO_T}$with_broken_linker" >&6
6429
6430 BROKEN_LINKER=0
6431 if test "$with_broken_linker" = yes ; then
6432         cat >>confdefs.h <<\EOF
6433 #define BROKEN_LINKER 1
6434 EOF
6435
6436         BROKEN_LINKER=1
6437 elif test "$DFT_LWR_MODEL" = shared ; then
6438         case $cf_cv_system_name in #(vi
6439         cygwin*)
6440                 cat >>confdefs.h <<\EOF
6441 #define BROKEN_LINKER 1
6442 EOF
6443
6444                 BROKEN_LINKER=1
6445                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6446
6447 echo "${as_me-configure}:6447: testing cygwin linker is broken anyway ..." 1>&5
6448
6449                 ;;
6450         esac
6451 fi
6452
6453 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6454 echo "$as_me:6454: checking if tputs should process BSD-style prefix padding" >&5
6455 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6456
6457 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6458 if test "${enable_bsdpad+set}" = set; then
6459   enableval="$enable_bsdpad"
6460   with_bsdpad=$enableval
6461 else
6462   with_bsdpad=no
6463 fi;
6464 echo "$as_me:6464: result: $with_bsdpad" >&5
6465 echo "${ECHO_T}$with_bsdpad" >&6
6466 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6467 #define BSD_TPUTS 1
6468 EOF
6469
6470 ###   use option --enable-widec to turn on use of wide-character support
6471 NCURSES_CH_T=chtype
6472 NCURSES_LIBUTF8=0
6473
6474 NEED_WCHAR_H=0
6475 NCURSES_MBSTATE_T=0
6476 NCURSES_WCHAR_T=0
6477 NCURSES_WINT_T=0
6478
6479 # Check to define _XOPEN_SOURCE "automatically"
6480
6481 cf_XOPEN_SOURCE=500
6482 cf_POSIX_C_SOURCE=199506L
6483 cf_xopen_source=
6484
6485 case $host_os in #(vi
6486 aix[456]*) #(vi
6487         cf_xopen_source="-D_ALL_SOURCE"
6488         ;;
6489 darwin[0-8].*) #(vi
6490         cf_xopen_source="-D_APPLE_C_SOURCE"
6491         ;;
6492 darwin*) #(vi
6493         cf_xopen_source="-D_DARWIN_C_SOURCE"
6494         ;;
6495 freebsd*|dragonfly*) #(vi
6496         # 5.x headers associate
6497         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6498         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6499         cf_POSIX_C_SOURCE=200112L
6500         cf_XOPEN_SOURCE=600
6501         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6502         ;;
6503 hpux11*) #(vi
6504         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6505         ;;
6506 hpux*) #(vi
6507         cf_xopen_source="-D_HPUX_SOURCE"
6508         ;;
6509 irix[56].*) #(vi
6510         cf_xopen_source="-D_SGI_SOURCE"
6511         ;;
6512 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6513
6514 echo "$as_me:6514: checking if we must define _GNU_SOURCE" >&5
6515 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6516 if test "${cf_cv_gnu_source+set}" = set; then
6517   echo $ECHO_N "(cached) $ECHO_C" >&6
6518 else
6519
6520 cat >conftest.$ac_ext <<_ACEOF
6521 #line 6521 "configure"
6522 #include "confdefs.h"
6523 #include <sys/types.h>
6524 int
6525 main ()
6526 {
6527
6528 #ifndef _XOPEN_SOURCE
6529 make an error
6530 #endif
6531   ;
6532   return 0;
6533 }
6534 _ACEOF
6535 rm -f conftest.$ac_objext
6536 if { (eval echo "$as_me:6536: \"$ac_compile\"") >&5
6537   (eval $ac_compile) 2>&5
6538   ac_status=$?
6539   echo "$as_me:6539: \$? = $ac_status" >&5
6540   (exit $ac_status); } &&
6541          { ac_try='test -s conftest.$ac_objext'
6542   { (eval echo "$as_me:6542: \"$ac_try\"") >&5
6543   (eval $ac_try) 2>&5
6544   ac_status=$?
6545   echo "$as_me:6545: \$? = $ac_status" >&5
6546   (exit $ac_status); }; }; then
6547   cf_cv_gnu_source=no
6548 else
6549   echo "$as_me: failed program was:" >&5
6550 cat conftest.$ac_ext >&5
6551 cf_save="$CPPFLAGS"
6552          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6553          cat >conftest.$ac_ext <<_ACEOF
6554 #line 6554 "configure"
6555 #include "confdefs.h"
6556 #include <sys/types.h>
6557 int
6558 main ()
6559 {
6560
6561 #ifdef _XOPEN_SOURCE
6562 make an error
6563 #endif
6564   ;
6565   return 0;
6566 }
6567 _ACEOF
6568 rm -f conftest.$ac_objext
6569 if { (eval echo "$as_me:6569: \"$ac_compile\"") >&5
6570   (eval $ac_compile) 2>&5
6571   ac_status=$?
6572   echo "$as_me:6572: \$? = $ac_status" >&5
6573   (exit $ac_status); } &&
6574          { ac_try='test -s conftest.$ac_objext'
6575   { (eval echo "$as_me:6575: \"$ac_try\"") >&5
6576   (eval $ac_try) 2>&5
6577   ac_status=$?
6578   echo "$as_me:6578: \$? = $ac_status" >&5
6579   (exit $ac_status); }; }; then
6580   cf_cv_gnu_source=no
6581 else
6582   echo "$as_me: failed program was:" >&5
6583 cat conftest.$ac_ext >&5
6584 cf_cv_gnu_source=yes
6585 fi
6586 rm -f conftest.$ac_objext conftest.$ac_ext
6587         CPPFLAGS="$cf_save"
6588
6589 fi
6590 rm -f conftest.$ac_objext conftest.$ac_ext
6591
6592 fi
6593 echo "$as_me:6593: result: $cf_cv_gnu_source" >&5
6594 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6595 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6596
6597         ;;
6598 mirbsd*) #(vi
6599         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6600         ;;
6601 netbsd*) #(vi
6602         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6603         ;;
6604 openbsd*) #(vi
6605         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6606         ;;
6607 osf[45]*) #(vi
6608         cf_xopen_source="-D_OSF_SOURCE"
6609         ;;
6610 nto-qnx*) #(vi
6611         cf_xopen_source="-D_QNX_SOURCE"
6612         ;;
6613 sco*) #(vi
6614         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6615         ;;
6616 solaris*) #(vi
6617         cf_xopen_source="-D__EXTENSIONS__"
6618         ;;
6619 *)
6620         echo "$as_me:6620: checking if we should define _XOPEN_SOURCE" >&5
6621 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6622 if test "${cf_cv_xopen_source+set}" = set; then
6623   echo $ECHO_N "(cached) $ECHO_C" >&6
6624 else
6625
6626         cat >conftest.$ac_ext <<_ACEOF
6627 #line 6627 "configure"
6628 #include "confdefs.h"
6629 #include <sys/types.h>
6630 int
6631 main ()
6632 {
6633
6634 #ifndef _XOPEN_SOURCE
6635 make an error
6636 #endif
6637   ;
6638   return 0;
6639 }
6640 _ACEOF
6641 rm -f conftest.$ac_objext
6642 if { (eval echo "$as_me:6642: \"$ac_compile\"") >&5
6643   (eval $ac_compile) 2>&5
6644   ac_status=$?
6645   echo "$as_me:6645: \$? = $ac_status" >&5
6646   (exit $ac_status); } &&
6647          { ac_try='test -s conftest.$ac_objext'
6648   { (eval echo "$as_me:6648: \"$ac_try\"") >&5
6649   (eval $ac_try) 2>&5
6650   ac_status=$?
6651   echo "$as_me:6651: \$? = $ac_status" >&5
6652   (exit $ac_status); }; }; then
6653   cf_cv_xopen_source=no
6654 else
6655   echo "$as_me: failed program was:" >&5
6656 cat conftest.$ac_ext >&5
6657 cf_save="$CPPFLAGS"
6658          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6659          cat >conftest.$ac_ext <<_ACEOF
6660 #line 6660 "configure"
6661 #include "confdefs.h"
6662 #include <sys/types.h>
6663 int
6664 main ()
6665 {
6666
6667 #ifdef _XOPEN_SOURCE
6668 make an error
6669 #endif
6670   ;
6671   return 0;
6672 }
6673 _ACEOF
6674 rm -f conftest.$ac_objext
6675 if { (eval echo "$as_me:6675: \"$ac_compile\"") >&5
6676   (eval $ac_compile) 2>&5
6677   ac_status=$?
6678   echo "$as_me:6678: \$? = $ac_status" >&5
6679   (exit $ac_status); } &&
6680          { ac_try='test -s conftest.$ac_objext'
6681   { (eval echo "$as_me:6681: \"$ac_try\"") >&5
6682   (eval $ac_try) 2>&5
6683   ac_status=$?
6684   echo "$as_me:6684: \$? = $ac_status" >&5
6685   (exit $ac_status); }; }; then
6686   cf_cv_xopen_source=no
6687 else
6688   echo "$as_me: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6690 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6691 fi
6692 rm -f conftest.$ac_objext conftest.$ac_ext
6693         CPPFLAGS="$cf_save"
6694
6695 fi
6696 rm -f conftest.$ac_objext conftest.$ac_ext
6697
6698 fi
6699 echo "$as_me:6699: result: $cf_cv_xopen_source" >&5
6700 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6701         if test "$cf_cv_xopen_source" != no ; then
6702
6703 CFLAGS=`echo "$CFLAGS" | \
6704         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6705                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6706
6707 CPPFLAGS=`echo "$CPPFLAGS" | \
6708         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6709                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6710
6711                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
6712
6713 cf_fix_cppflags=no
6714 cf_new_cflags=
6715 cf_new_cppflags=
6716 cf_new_extra_cppflags=
6717
6718 for cf_add_cflags in $cf_temp_xopen_source
6719 do
6720 case $cf_fix_cppflags in
6721 no)
6722         case $cf_add_cflags in #(vi
6723         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6724                 case $cf_add_cflags in
6725                 -D*)
6726                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6727
6728                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6729                                 && test -z "${cf_tst_cflags}" \
6730                                 && cf_fix_cppflags=yes
6731
6732                         if test $cf_fix_cppflags = yes ; then
6733                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6734                                 continue
6735                         elif test "${cf_tst_cflags}" = "\"'" ; then
6736                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6737                                 continue
6738                         fi
6739                         ;;
6740                 esac
6741                 case "$CPPFLAGS" in
6742                 *$cf_add_cflags) #(vi
6743                         ;;
6744                 *) #(vi
6745                         case $cf_add_cflags in #(vi
6746                         -D*)
6747                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6748
6749 CPPFLAGS=`echo "$CPPFLAGS" | \
6750         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6751                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6752
6753                                 ;;
6754                         esac
6755                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6756                         ;;
6757                 esac
6758                 ;;
6759         *)
6760                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6761                 ;;
6762         esac
6763         ;;
6764 yes)
6765         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6766
6767         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6768
6769         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6770                 && test -z "${cf_tst_cflags}" \
6771                 && cf_fix_cppflags=no
6772         ;;
6773 esac
6774 done
6775
6776 if test -n "$cf_new_cflags" ; then
6777
6778         CFLAGS="$CFLAGS $cf_new_cflags"
6779 fi
6780
6781 if test -n "$cf_new_cppflags" ; then
6782
6783         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6784 fi
6785
6786 if test -n "$cf_new_extra_cppflags" ; then
6787
6788         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6789 fi
6790
6791         fi
6792
6793 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6794
6795 cf_save_CFLAGS="$CFLAGS"
6796 cf_save_CPPFLAGS="$CPPFLAGS"
6797
6798 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6799         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6800                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6801
6802 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6803         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6804                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6805
6806 echo "$as_me:6806: checking if we should define _POSIX_C_SOURCE" >&5
6807 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6808 if test "${cf_cv_posix_c_source+set}" = set; then
6809   echo $ECHO_N "(cached) $ECHO_C" >&6
6810 else
6811
6812 echo "${as_me-configure}:6812: testing if the symbol is already defined go no further ..." 1>&5
6813
6814         cat >conftest.$ac_ext <<_ACEOF
6815 #line 6815 "configure"
6816 #include "confdefs.h"
6817 #include <sys/types.h>
6818 int
6819 main ()
6820 {
6821
6822 #ifndef _POSIX_C_SOURCE
6823 make an error
6824 #endif
6825   ;
6826   return 0;
6827 }
6828 _ACEOF
6829 rm -f conftest.$ac_objext
6830 if { (eval echo "$as_me:6830: \"$ac_compile\"") >&5
6831   (eval $ac_compile) 2>&5
6832   ac_status=$?
6833   echo "$as_me:6833: \$? = $ac_status" >&5
6834   (exit $ac_status); } &&
6835          { ac_try='test -s conftest.$ac_objext'
6836   { (eval echo "$as_me:6836: \"$ac_try\"") >&5
6837   (eval $ac_try) 2>&5
6838   ac_status=$?
6839   echo "$as_me:6839: \$? = $ac_status" >&5
6840   (exit $ac_status); }; }; then
6841   cf_cv_posix_c_source=no
6842 else
6843   echo "$as_me: failed program was:" >&5
6844 cat conftest.$ac_ext >&5
6845 cf_want_posix_source=no
6846          case .$cf_POSIX_C_SOURCE in #(vi
6847          .[12]??*) #(vi
6848                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6849                 ;;
6850          .2) #(vi
6851                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6852                 cf_want_posix_source=yes
6853                 ;;
6854          .*)
6855                 cf_want_posix_source=yes
6856                 ;;
6857          esac
6858          if test "$cf_want_posix_source" = yes ; then
6859                 cat >conftest.$ac_ext <<_ACEOF
6860 #line 6860 "configure"
6861 #include "confdefs.h"
6862 #include <sys/types.h>
6863 int
6864 main ()
6865 {
6866
6867 #ifdef _POSIX_SOURCE
6868 make an error
6869 #endif
6870   ;
6871   return 0;
6872 }
6873 _ACEOF
6874 rm -f conftest.$ac_objext
6875 if { (eval echo "$as_me:6875: \"$ac_compile\"") >&5
6876   (eval $ac_compile) 2>&5
6877   ac_status=$?
6878   echo "$as_me:6878: \$? = $ac_status" >&5
6879   (exit $ac_status); } &&
6880          { ac_try='test -s conftest.$ac_objext'
6881   { (eval echo "$as_me:6881: \"$ac_try\"") >&5
6882   (eval $ac_try) 2>&5
6883   ac_status=$?
6884   echo "$as_me:6884: \$? = $ac_status" >&5
6885   (exit $ac_status); }; }; then
6886   :
6887 else
6888   echo "$as_me: failed program was:" >&5
6889 cat conftest.$ac_ext >&5
6890 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6891 fi
6892 rm -f conftest.$ac_objext conftest.$ac_ext
6893          fi
6894
6895 echo "${as_me-configure}:6895: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6896
6897          CFLAGS="$cf_trim_CFLAGS"
6898          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6899
6900 echo "${as_me-configure}:6900: testing if the second compile does not leave our definition intact error ..." 1>&5
6901
6902          cat >conftest.$ac_ext <<_ACEOF
6903 #line 6903 "configure"
6904 #include "confdefs.h"
6905 #include <sys/types.h>
6906 int
6907 main ()
6908 {
6909
6910 #ifndef _POSIX_C_SOURCE
6911 make an error
6912 #endif
6913   ;
6914   return 0;
6915 }
6916 _ACEOF
6917 rm -f conftest.$ac_objext
6918 if { (eval echo "$as_me:6918: \"$ac_compile\"") >&5
6919   (eval $ac_compile) 2>&5
6920   ac_status=$?
6921   echo "$as_me:6921: \$? = $ac_status" >&5
6922   (exit $ac_status); } &&
6923          { ac_try='test -s conftest.$ac_objext'
6924   { (eval echo "$as_me:6924: \"$ac_try\"") >&5
6925   (eval $ac_try) 2>&5
6926   ac_status=$?
6927   echo "$as_me:6927: \$? = $ac_status" >&5
6928   (exit $ac_status); }; }; then
6929   :
6930 else
6931   echo "$as_me: failed program was:" >&5
6932 cat conftest.$ac_ext >&5
6933 cf_cv_posix_c_source=no
6934 fi
6935 rm -f conftest.$ac_objext conftest.$ac_ext
6936          CFLAGS="$cf_save_CFLAGS"
6937          CPPFLAGS="$cf_save_CPPFLAGS"
6938
6939 fi
6940 rm -f conftest.$ac_objext conftest.$ac_ext
6941
6942 fi
6943 echo "$as_me:6943: result: $cf_cv_posix_c_source" >&5
6944 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6945
6946 if test "$cf_cv_posix_c_source" != no ; then
6947         CFLAGS="$cf_trim_CFLAGS"
6948         CPPFLAGS="$cf_trim_CPPFLAGS"
6949
6950 cf_fix_cppflags=no
6951 cf_new_cflags=
6952 cf_new_cppflags=
6953 cf_new_extra_cppflags=
6954
6955 for cf_add_cflags in $cf_cv_posix_c_source
6956 do
6957 case $cf_fix_cppflags in
6958 no)
6959         case $cf_add_cflags in #(vi
6960         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6961                 case $cf_add_cflags in
6962                 -D*)
6963                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6964
6965                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6966                                 && test -z "${cf_tst_cflags}" \
6967                                 && cf_fix_cppflags=yes
6968
6969                         if test $cf_fix_cppflags = yes ; then
6970                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6971                                 continue
6972                         elif test "${cf_tst_cflags}" = "\"'" ; then
6973                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6974                                 continue
6975                         fi
6976                         ;;
6977                 esac
6978                 case "$CPPFLAGS" in
6979                 *$cf_add_cflags) #(vi
6980                         ;;
6981                 *) #(vi
6982                         case $cf_add_cflags in #(vi
6983                         -D*)
6984                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6985
6986 CPPFLAGS=`echo "$CPPFLAGS" | \
6987         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6988                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6989
6990                                 ;;
6991                         esac
6992                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6993                         ;;
6994                 esac
6995                 ;;
6996         *)
6997                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6998                 ;;
6999         esac
7000         ;;
7001 yes)
7002         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7003
7004         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7005
7006         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7007                 && test -z "${cf_tst_cflags}" \
7008                 && cf_fix_cppflags=no
7009         ;;
7010 esac
7011 done
7012
7013 if test -n "$cf_new_cflags" ; then
7014
7015         CFLAGS="$CFLAGS $cf_new_cflags"
7016 fi
7017
7018 if test -n "$cf_new_cppflags" ; then
7019
7020         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7021 fi
7022
7023 if test -n "$cf_new_extra_cppflags" ; then
7024
7025         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7026 fi
7027
7028 fi
7029
7030         ;;
7031 esac
7032
7033 if test -n "$cf_xopen_source" ; then
7034
7035 cf_fix_cppflags=no
7036 cf_new_cflags=
7037 cf_new_cppflags=
7038 cf_new_extra_cppflags=
7039
7040 for cf_add_cflags in $cf_xopen_source
7041 do
7042 case $cf_fix_cppflags in
7043 no)
7044         case $cf_add_cflags in #(vi
7045         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7046                 case $cf_add_cflags in
7047                 -D*)
7048                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7049
7050                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7051                                 && test -z "${cf_tst_cflags}" \
7052                                 && cf_fix_cppflags=yes
7053
7054                         if test $cf_fix_cppflags = yes ; then
7055                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7056                                 continue
7057                         elif test "${cf_tst_cflags}" = "\"'" ; then
7058                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7059                                 continue
7060                         fi
7061                         ;;
7062                 esac
7063                 case "$CPPFLAGS" in
7064                 *$cf_add_cflags) #(vi
7065                         ;;
7066                 *) #(vi
7067                         case $cf_add_cflags in #(vi
7068                         -D*)
7069                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7070
7071 CPPFLAGS=`echo "$CPPFLAGS" | \
7072         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7073                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7074
7075                                 ;;
7076                         esac
7077                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7078                         ;;
7079                 esac
7080                 ;;
7081         *)
7082                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7083                 ;;
7084         esac
7085         ;;
7086 yes)
7087         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7088
7089         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7090
7091         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7092                 && test -z "${cf_tst_cflags}" \
7093                 && cf_fix_cppflags=no
7094         ;;
7095 esac
7096 done
7097
7098 if test -n "$cf_new_cflags" ; then
7099
7100         CFLAGS="$CFLAGS $cf_new_cflags"
7101 fi
7102
7103 if test -n "$cf_new_cppflags" ; then
7104
7105         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7106 fi
7107
7108 if test -n "$cf_new_extra_cppflags" ; then
7109
7110         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7111 fi
7112
7113 fi
7114
7115 # Work around breakage on OS X
7116
7117 echo "$as_me:7117: checking if SIGWINCH is defined" >&5
7118 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7119 if test "${cf_cv_define_sigwinch+set}" = set; then
7120   echo $ECHO_N "(cached) $ECHO_C" >&6
7121 else
7122
7123         cat >conftest.$ac_ext <<_ACEOF
7124 #line 7124 "configure"
7125 #include "confdefs.h"
7126
7127 #include <sys/types.h>
7128 #include <sys/signal.h>
7129
7130 int
7131 main ()
7132 {
7133 int x = SIGWINCH
7134   ;
7135   return 0;
7136 }
7137 _ACEOF
7138 rm -f conftest.$ac_objext
7139 if { (eval echo "$as_me:7139: \"$ac_compile\"") >&5
7140   (eval $ac_compile) 2>&5
7141   ac_status=$?
7142   echo "$as_me:7142: \$? = $ac_status" >&5
7143   (exit $ac_status); } &&
7144          { ac_try='test -s conftest.$ac_objext'
7145   { (eval echo "$as_me:7145: \"$ac_try\"") >&5
7146   (eval $ac_try) 2>&5
7147   ac_status=$?
7148   echo "$as_me:7148: \$? = $ac_status" >&5
7149   (exit $ac_status); }; }; then
7150   cf_cv_define_sigwinch=yes
7151 else
7152   echo "$as_me: failed program was:" >&5
7153 cat conftest.$ac_ext >&5
7154 cat >conftest.$ac_ext <<_ACEOF
7155 #line 7155 "configure"
7156 #include "confdefs.h"
7157
7158 #undef _XOPEN_SOURCE
7159 #undef _POSIX_SOURCE
7160 #undef _POSIX_C_SOURCE
7161 #include <sys/types.h>
7162 #include <sys/signal.h>
7163
7164 int
7165 main ()
7166 {
7167 int x = SIGWINCH
7168   ;
7169   return 0;
7170 }
7171 _ACEOF
7172 rm -f conftest.$ac_objext
7173 if { (eval echo "$as_me:7173: \"$ac_compile\"") >&5
7174   (eval $ac_compile) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); } &&
7178          { ac_try='test -s conftest.$ac_objext'
7179   { (eval echo "$as_me:7179: \"$ac_try\"") >&5
7180   (eval $ac_try) 2>&5
7181   ac_status=$?
7182   echo "$as_me:7182: \$? = $ac_status" >&5
7183   (exit $ac_status); }; }; then
7184   cf_cv_define_sigwinch=maybe
7185 else
7186   echo "$as_me: failed program was:" >&5
7187 cat conftest.$ac_ext >&5
7188 cf_cv_define_sigwinch=no
7189 fi
7190 rm -f conftest.$ac_objext conftest.$ac_ext
7191
7192 fi
7193 rm -f conftest.$ac_objext conftest.$ac_ext
7194
7195 fi
7196 echo "$as_me:7196: result: $cf_cv_define_sigwinch" >&5
7197 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7198
7199 if test "$cf_cv_define_sigwinch" = maybe ; then
7200 echo "$as_me:7200: checking for actual SIGWINCH definition" >&5
7201 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7202 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7203   echo $ECHO_N "(cached) $ECHO_C" >&6
7204 else
7205
7206 cf_cv_fixup_sigwinch=unknown
7207 cf_sigwinch=32
7208 while test $cf_sigwinch != 1
7209 do
7210         cat >conftest.$ac_ext <<_ACEOF
7211 #line 7211 "configure"
7212 #include "confdefs.h"
7213
7214 #undef _XOPEN_SOURCE
7215 #undef _POSIX_SOURCE
7216 #undef _POSIX_C_SOURCE
7217 #include <sys/types.h>
7218 #include <sys/signal.h>
7219
7220 int
7221 main ()
7222 {
7223
7224 #if SIGWINCH != $cf_sigwinch
7225 make an error
7226 #endif
7227 int x = SIGWINCH
7228   ;
7229   return 0;
7230 }
7231 _ACEOF
7232 rm -f conftest.$ac_objext
7233 if { (eval echo "$as_me:7233: \"$ac_compile\"") >&5
7234   (eval $ac_compile) 2>&5
7235   ac_status=$?
7236   echo "$as_me:7236: \$? = $ac_status" >&5
7237   (exit $ac_status); } &&
7238          { ac_try='test -s conftest.$ac_objext'
7239   { (eval echo "$as_me:7239: \"$ac_try\"") >&5
7240   (eval $ac_try) 2>&5
7241   ac_status=$?
7242   echo "$as_me:7242: \$? = $ac_status" >&5
7243   (exit $ac_status); }; }; then
7244   cf_cv_fixup_sigwinch=$cf_sigwinch
7245          break
7246 else
7247   echo "$as_me: failed program was:" >&5
7248 cat conftest.$ac_ext >&5
7249 fi
7250 rm -f conftest.$ac_objext conftest.$ac_ext
7251
7252 cf_sigwinch=`expr $cf_sigwinch - 1`
7253 done
7254
7255 fi
7256 echo "$as_me:7256: result: $cf_cv_fixup_sigwinch" >&5
7257 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7258
7259         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7260                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7261         fi
7262 fi
7263
7264 # Checks for CODESET support.
7265
7266   echo "$as_me:7266: checking for nl_langinfo and CODESET" >&5
7267 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7268 if test "${am_cv_langinfo_codeset+set}" = set; then
7269   echo $ECHO_N "(cached) $ECHO_C" >&6
7270 else
7271   cat >conftest.$ac_ext <<_ACEOF
7272 #line 7272 "configure"
7273 #include "confdefs.h"
7274 #include <langinfo.h>
7275 int
7276 main ()
7277 {
7278 char* cs = nl_langinfo(CODESET);
7279   ;
7280   return 0;
7281 }
7282 _ACEOF
7283 rm -f conftest.$ac_objext conftest$ac_exeext
7284 if { (eval echo "$as_me:7284: \"$ac_link\"") >&5
7285   (eval $ac_link) 2>&5
7286   ac_status=$?
7287   echo "$as_me:7287: \$? = $ac_status" >&5
7288   (exit $ac_status); } &&
7289          { ac_try='test -s conftest$ac_exeext'
7290   { (eval echo "$as_me:7290: \"$ac_try\"") >&5
7291   (eval $ac_try) 2>&5
7292   ac_status=$?
7293   echo "$as_me:7293: \$? = $ac_status" >&5
7294   (exit $ac_status); }; }; then
7295   am_cv_langinfo_codeset=yes
7296 else
7297   echo "$as_me: failed program was:" >&5
7298 cat conftest.$ac_ext >&5
7299 am_cv_langinfo_codeset=no
7300 fi
7301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7302
7303 fi
7304 echo "$as_me:7304: result: $am_cv_langinfo_codeset" >&5
7305 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7306   if test $am_cv_langinfo_codeset = yes; then
7307
7308 cat >>confdefs.h <<\EOF
7309 #define HAVE_LANGINFO_CODESET 1
7310 EOF
7311
7312   fi
7313
7314 # use these variables to work around a defect in gcc's fixincludes.
7315 NCURSES_OK_WCHAR_T=
7316 NCURSES_OK_WINT_T=
7317
7318 echo "$as_me:7318: checking if you want wide-character code" >&5
7319 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7320
7321 # Check whether --enable-widec or --disable-widec was given.
7322 if test "${enable_widec+set}" = set; then
7323   enableval="$enable_widec"
7324   with_widec=$enableval
7325 else
7326   with_widec=no
7327 fi;
7328 echo "$as_me:7328: result: $with_widec" >&5
7329 echo "${ECHO_T}$with_widec" >&6
7330 if test "$with_widec" = yes ; then
7331         LIB_SUFFIX="w${LIB_SUFFIX}"
7332         cat >>confdefs.h <<\EOF
7333 #define USE_WIDEC_SUPPORT 1
7334 EOF
7335
7336 echo "$as_me:7336: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7337 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7338 cat >conftest.$ac_ext <<_ACEOF
7339 #line 7339 "configure"
7340 #include "confdefs.h"
7341 #include <sys/types.h>
7342
7343 int
7344 main ()
7345 {
7346
7347 #ifndef _XOPEN_SOURCE_EXTENDED
7348 make an error
7349 #endif
7350   ;
7351   return 0;
7352 }
7353 _ACEOF
7354 rm -f conftest.$ac_objext
7355 if { (eval echo "$as_me:7355: \"$ac_compile\"") >&5
7356   (eval $ac_compile) 2>&5
7357   ac_status=$?
7358   echo "$as_me:7358: \$? = $ac_status" >&5
7359   (exit $ac_status); } &&
7360          { ac_try='test -s conftest.$ac_objext'
7361   { (eval echo "$as_me:7361: \"$ac_try\"") >&5
7362   (eval $ac_try) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit $ac_status); }; }; then
7366   cf_result=no
7367 else
7368   echo "$as_me: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370 cf_result=yes
7371 fi
7372 rm -f conftest.$ac_objext conftest.$ac_ext
7373 echo "$as_me:7373: result: $cf_result" >&5
7374 echo "${ECHO_T}$cf_result" >&6
7375
7376 if test "$cf_result" = yes ; then
7377         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7378 elif test "x" != "x" ; then
7379         echo "$as_me:7379: checking checking for compatible value versus " >&5
7380 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7381         cat >conftest.$ac_ext <<_ACEOF
7382 #line 7382 "configure"
7383 #include "confdefs.h"
7384 #include <sys/types.h>
7385
7386 int
7387 main ()
7388 {
7389
7390 #if _XOPEN_SOURCE_EXTENDED- < 0
7391 make an error
7392 #endif
7393   ;
7394   return 0;
7395 }
7396 _ACEOF
7397 rm -f conftest.$ac_objext
7398 if { (eval echo "$as_me:7398: \"$ac_compile\"") >&5
7399   (eval $ac_compile) 2>&5
7400   ac_status=$?
7401   echo "$as_me:7401: \$? = $ac_status" >&5
7402   (exit $ac_status); } &&
7403          { ac_try='test -s conftest.$ac_objext'
7404   { (eval echo "$as_me:7404: \"$ac_try\"") >&5
7405   (eval $ac_try) 2>&5
7406   ac_status=$?
7407   echo "$as_me:7407: \$? = $ac_status" >&5
7408   (exit $ac_status); }; }; then
7409   cf_result=yes
7410 else
7411   echo "$as_me: failed program was:" >&5
7412 cat conftest.$ac_ext >&5
7413 cf_result=no
7414 fi
7415 rm -f conftest.$ac_objext conftest.$ac_ext
7416         echo "$as_me:7416: result: $cf_result" >&5
7417 echo "${ECHO_T}$cf_result" >&6
7418         if test "$cf_result" = no ; then
7419                 # perhaps we can override it - try...
7420                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7421         fi
7422 fi
7423
7424         # with_overwrite=no
7425         NCURSES_CH_T=cchar_t
7426
7427 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7428 do
7429 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7430 echo "$as_me:7430: checking for $ac_func" >&5
7431 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7432 if eval "test \"\${$as_ac_var+set}\" = set"; then
7433   echo $ECHO_N "(cached) $ECHO_C" >&6
7434 else
7435   cat >conftest.$ac_ext <<_ACEOF
7436 #line 7436 "configure"
7437 #include "confdefs.h"
7438 /* System header to define __stub macros and hopefully few prototypes,
7439     which can conflict with char $ac_func (); below.  */
7440 #include <assert.h>
7441 /* Override any gcc2 internal prototype to avoid an error.  */
7442 #ifdef __cplusplus
7443 extern "C"
7444 #endif
7445 /* We use char because int might match the return type of a gcc2
7446    builtin and then its argument prototype would still apply.  */
7447 char $ac_func ();
7448 char (*f) ();
7449
7450 int
7451 main ()
7452 {
7453 /* The GNU C library defines this for functions which it implements
7454     to always fail with ENOSYS.  Some functions are actually named
7455     something starting with __ and the normal name is an alias.  */
7456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7457 choke me
7458 #else
7459 f = $ac_func;
7460 #endif
7461
7462   ;
7463   return 0;
7464 }
7465 _ACEOF
7466 rm -f conftest.$ac_objext conftest$ac_exeext
7467 if { (eval echo "$as_me:7467: \"$ac_link\"") >&5
7468   (eval $ac_link) 2>&5
7469   ac_status=$?
7470   echo "$as_me:7470: \$? = $ac_status" >&5
7471   (exit $ac_status); } &&
7472          { ac_try='test -s conftest$ac_exeext'
7473   { (eval echo "$as_me:7473: \"$ac_try\"") >&5
7474   (eval $ac_try) 2>&5
7475   ac_status=$?
7476   echo "$as_me:7476: \$? = $ac_status" >&5
7477   (exit $ac_status); }; }; then
7478   eval "$as_ac_var=yes"
7479 else
7480   echo "$as_me: failed program was:" >&5
7481 cat conftest.$ac_ext >&5
7482 eval "$as_ac_var=no"
7483 fi
7484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7485 fi
7486 echo "$as_me:7486: result: `eval echo '${'$as_ac_var'}'`" >&5
7487 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7488 if test `eval echo '${'$as_ac_var'}'` = yes; then
7489   cat >>confdefs.h <<EOF
7490 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7491 EOF
7492
7493 fi
7494 done
7495
7496         if test "$ac_cv_func_putwc" != yes ; then
7497
7498 echo "$as_me:7498: checking for multibyte character support" >&5
7499 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7500 if test "${cf_cv_utf8_lib+set}" = set; then
7501   echo $ECHO_N "(cached) $ECHO_C" >&6
7502 else
7503
7504         cf_save_LIBS="$LIBS"
7505         cat >conftest.$ac_ext <<_ACEOF
7506 #line 7506 "configure"
7507 #include "confdefs.h"
7508
7509 #include <stdlib.h>
7510 int
7511 main ()
7512 {
7513 putwc(0,0);
7514   ;
7515   return 0;
7516 }
7517 _ACEOF
7518 rm -f conftest.$ac_objext conftest$ac_exeext
7519 if { (eval echo "$as_me:7519: \"$ac_link\"") >&5
7520   (eval $ac_link) 2>&5
7521   ac_status=$?
7522   echo "$as_me:7522: \$? = $ac_status" >&5
7523   (exit $ac_status); } &&
7524          { ac_try='test -s conftest$ac_exeext'
7525   { (eval echo "$as_me:7525: \"$ac_try\"") >&5
7526   (eval $ac_try) 2>&5
7527   ac_status=$?
7528   echo "$as_me:7528: \$? = $ac_status" >&5
7529   (exit $ac_status); }; }; then
7530   cf_cv_utf8_lib=yes
7531 else
7532   echo "$as_me: failed program was:" >&5
7533 cat conftest.$ac_ext >&5
7534
7535 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7536 # will be set on completion of the AC_TRY_LINK below.
7537 cf_cv_header_path_utf8=
7538 cf_cv_library_path_utf8=
7539
7540 echo "${as_me-configure}:7540: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7541
7542 cat >conftest.$ac_ext <<_ACEOF
7543 #line 7543 "configure"
7544 #include "confdefs.h"
7545
7546 #include <libutf8.h>
7547 int
7548 main ()
7549 {
7550 putwc(0,0);
7551   ;
7552   return 0;
7553 }
7554 _ACEOF
7555 rm -f conftest.$ac_objext conftest$ac_exeext
7556 if { (eval echo "$as_me:7556: \"$ac_link\"") >&5
7557   (eval $ac_link) 2>&5
7558   ac_status=$?
7559   echo "$as_me:7559: \$? = $ac_status" >&5
7560   (exit $ac_status); } &&
7561          { ac_try='test -s conftest$ac_exeext'
7562   { (eval echo "$as_me:7562: \"$ac_try\"") >&5
7563   (eval $ac_try) 2>&5
7564   ac_status=$?
7565   echo "$as_me:7565: \$? = $ac_status" >&5
7566   (exit $ac_status); }; }; then
7567   cf_cv_find_linkage_utf8=yes
7568 else
7569   echo "$as_me: failed program was:" >&5
7570 cat conftest.$ac_ext >&5
7571
7572     cf_cv_find_linkage_utf8=no
7573
7574     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7575
7576 echo "${as_me-configure}:7576: testing find linkage for utf8 library ..." 1>&5
7577
7578 echo "${as_me-configure}:7578: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7579
7580     cf_save_CPPFLAGS="$CPPFLAGS"
7581     cf_test_CPPFLAGS="$CPPFLAGS"
7582
7583 cf_search=
7584 cf_header_path_list=""
7585 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7586         for cf_header_path in $CPPFLAGS $CFLAGS
7587         do
7588                 case $cf_header_path in #(vi
7589                 -I*)
7590                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7591
7592 test "$cf_header_path" != "NONE" && \
7593 test -d "$cf_header_path" && \
7594  {
7595         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7596         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7597         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7598         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7599         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7600         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7601 }
7602
7603                         cf_header_path_list="$cf_header_path_list $cf_search"
7604                         ;;
7605                 esac
7606         done
7607 fi
7608
7609 cf_search=""
7610
7611 test "/usr" != "$prefix" && \
7612 test -d "/usr" && \
7613 (test $prefix = NONE || test -d $prefix) && {
7614         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7615         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7616         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7617         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7618         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7619         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7620 }
7621
7622 test "$prefix" != "NONE" && \
7623 test -d "$prefix" && \
7624  {
7625         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7626         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7627         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7628         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7629         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7630         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7631 }
7632
7633 test "/usr/local" != "$prefix" && \
7634 test -d "/usr/local" && \
7635 (test $prefix = NONE || test -d $prefix) && {
7636         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7637         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7638         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7639         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7640         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7641         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7642 }
7643
7644 test "/opt" != "$prefix" && \
7645 test -d "/opt" && \
7646 (test $prefix = NONE || test -d $prefix) && {
7647         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7648         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7649         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7650         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7651         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7652         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7653 }
7654
7655 test "$HOME" != "$prefix" && \
7656 test -d "$HOME" && \
7657 (test $prefix = NONE || test -d $prefix) && {
7658         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7659         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7660         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7661         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7662         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7663         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7664 }
7665
7666 test "$includedir" != NONE && \
7667 test "$includedir" != "/usr/include" && \
7668 test -d "$includedir" && {
7669         test -d $includedir &&    cf_search="$cf_search $includedir"
7670         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7671 }
7672
7673 test "$oldincludedir" != NONE && \
7674 test "$oldincludedir" != "/usr/include" && \
7675 test -d "$oldincludedir" && {
7676         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7677         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7678 }
7679
7680 cf_search="$cf_header_path_list $cf_search"
7681
7682     for cf_cv_header_path_utf8 in $cf_search
7683     do
7684       if test -d $cf_cv_header_path_utf8 ; then
7685         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7686
7687 echo "${as_me-configure}:7687: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7688
7689         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7690         cat >conftest.$ac_ext <<_ACEOF
7691 #line 7691 "configure"
7692 #include "confdefs.h"
7693
7694 #include <libutf8.h>
7695 int
7696 main ()
7697 {
7698 putwc(0,0);
7699   ;
7700   return 0;
7701 }
7702 _ACEOF
7703 rm -f conftest.$ac_objext
7704 if { (eval echo "$as_me:7704: \"$ac_compile\"") >&5
7705   (eval $ac_compile) 2>&5
7706   ac_status=$?
7707   echo "$as_me:7707: \$? = $ac_status" >&5
7708   (exit $ac_status); } &&
7709          { ac_try='test -s conftest.$ac_objext'
7710   { (eval echo "$as_me:7710: \"$ac_try\"") >&5
7711   (eval $ac_try) 2>&5
7712   ac_status=$?
7713   echo "$as_me:7713: \$? = $ac_status" >&5
7714   (exit $ac_status); }; }; then
7715
7716             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7717
7718 echo "${as_me-configure}:7718: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7719
7720             cf_cv_find_linkage_utf8=maybe
7721             cf_test_CPPFLAGS="$CPPFLAGS"
7722             break
7723 else
7724   echo "$as_me: failed program was:" >&5
7725 cat conftest.$ac_ext >&5
7726
7727             CPPFLAGS="$cf_save_CPPFLAGS"
7728
7729 fi
7730 rm -f conftest.$ac_objext conftest.$ac_ext
7731       fi
7732     done
7733
7734     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7735
7736 echo "${as_me-configure}:7736: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7737
7738       cf_save_LIBS="$LIBS"
7739       cf_save_LDFLAGS="$LDFLAGS"
7740
7741       if test "$cf_cv_find_linkage_utf8" != yes ; then
7742
7743 cf_library_path_list=""
7744 if test -n "${LDFLAGS}${LIBS}" ; then
7745         for cf_library_path in $LDFLAGS $LIBS
7746         do
7747                 case $cf_library_path in #(vi
7748                 -L*)
7749                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7750
7751 test "$cf_library_path" != "NONE" && \
7752 test -d "$cf_library_path" && \
7753  {
7754         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7755         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7756         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7757         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7758         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7759         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7760 }
7761
7762                         cf_library_path_list="$cf_library_path_list $cf_search"
7763                         ;;
7764                 esac
7765         done
7766 fi
7767
7768 cf_search=""
7769
7770 test "/usr" != "$prefix" && \
7771 test -d "/usr" && \
7772 (test $prefix = NONE || test -d $prefix) && {
7773         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7774         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7775         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7776         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7777         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7778         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7779 }
7780
7781 test "$prefix" != "NONE" && \
7782 test -d "$prefix" && \
7783  {
7784         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7785         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7786         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7787         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7788         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7789         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7790 }
7791
7792 test "/usr/local" != "$prefix" && \
7793 test -d "/usr/local" && \
7794 (test $prefix = NONE || test -d $prefix) && {
7795         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7796         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7797         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7798         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7799         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7800         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7801 }
7802
7803 test "/opt" != "$prefix" && \
7804 test -d "/opt" && \
7805 (test $prefix = NONE || test -d $prefix) && {
7806         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7807         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7808         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7809         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7810         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7811         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7812 }
7813
7814 test "$HOME" != "$prefix" && \
7815 test -d "$HOME" && \
7816 (test $prefix = NONE || test -d $prefix) && {
7817         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7818         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7819         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7820         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7821         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7822         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7823 }
7824
7825 cf_search="$cf_library_path_list $cf_search"
7826
7827         for cf_cv_library_path_utf8 in $cf_search
7828         do
7829           if test -d $cf_cv_library_path_utf8 ; then
7830             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7831
7832 echo "${as_me-configure}:7832: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7833
7834             CPPFLAGS="$cf_test_CPPFLAGS"
7835             LIBS="-lutf8  $cf_save_LIBS"
7836             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7837             cat >conftest.$ac_ext <<_ACEOF
7838 #line 7838 "configure"
7839 #include "confdefs.h"
7840
7841 #include <libutf8.h>
7842 int
7843 main ()
7844 {
7845 putwc(0,0);
7846   ;
7847   return 0;
7848 }
7849 _ACEOF
7850 rm -f conftest.$ac_objext conftest$ac_exeext
7851 if { (eval echo "$as_me:7851: \"$ac_link\"") >&5
7852   (eval $ac_link) 2>&5
7853   ac_status=$?
7854   echo "$as_me:7854: \$? = $ac_status" >&5
7855   (exit $ac_status); } &&
7856          { ac_try='test -s conftest$ac_exeext'
7857   { (eval echo "$as_me:7857: \"$ac_try\"") >&5
7858   (eval $ac_try) 2>&5
7859   ac_status=$?
7860   echo "$as_me:7860: \$? = $ac_status" >&5
7861   (exit $ac_status); }; }; then
7862
7863                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7864
7865 echo "${as_me-configure}:7865: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7866
7867                 cf_cv_find_linkage_utf8=yes
7868                 cf_cv_library_file_utf8="-lutf8"
7869                 break
7870 else
7871   echo "$as_me: failed program was:" >&5
7872 cat conftest.$ac_ext >&5
7873
7874                 CPPFLAGS="$cf_save_CPPFLAGS"
7875                 LIBS="$cf_save_LIBS"
7876                 LDFLAGS="$cf_save_LDFLAGS"
7877
7878 fi
7879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7880           fi
7881         done
7882         LIBS="$cf_save_LIBS"
7883         CPPFLAGS="$cf_save_CPPFLAGS"
7884         LDFLAGS="$cf_save_LDFLAGS"
7885       fi
7886
7887     else
7888       cf_cv_find_linkage_utf8=no
7889     fi
7890
7891 fi
7892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7893
7894 if test "$cf_cv_find_linkage_utf8" = yes ; then
7895 cf_cv_utf8_lib=add-on
7896 else
7897 cf_cv_utf8_lib=no
7898 fi
7899
7900 fi
7901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7902 fi
7903 echo "$as_me:7903: result: $cf_cv_utf8_lib" >&5
7904 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7905
7906 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7907 # ncurses/ncursesw:
7908 if test "$cf_cv_utf8_lib" = "add-on" ; then
7909         cat >>confdefs.h <<\EOF
7910 #define HAVE_LIBUTF8_H 1
7911 EOF
7912
7913 if test -n "$cf_cv_header_path_utf8" ; then
7914   for cf_add_incdir in $cf_cv_header_path_utf8
7915   do
7916         while test $cf_add_incdir != /usr/include
7917         do
7918           if test -d $cf_add_incdir
7919           then
7920                 cf_have_incdir=no
7921                 if test -n "$CFLAGS$CPPFLAGS" ; then
7922                   # a loop is needed to ensure we can add subdirs of existing dirs
7923                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7924                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7925                           cf_have_incdir=yes; break
7926                         fi
7927                   done
7928                 fi
7929
7930                 if test "$cf_have_incdir" = no ; then
7931                   if test "$cf_add_incdir" = /usr/local/include ; then
7932                         if test "$GCC" = yes
7933                         then
7934                           cf_save_CPPFLAGS=$CPPFLAGS
7935                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7936                           cat >conftest.$ac_ext <<_ACEOF
7937 #line 7937 "configure"
7938 #include "confdefs.h"
7939 #include <stdio.h>
7940 int
7941 main ()
7942 {
7943 printf("Hello")
7944   ;
7945   return 0;
7946 }
7947 _ACEOF
7948 rm -f conftest.$ac_objext
7949 if { (eval echo "$as_me:7949: \"$ac_compile\"") >&5
7950   (eval $ac_compile) 2>&5
7951   ac_status=$?
7952   echo "$as_me:7952: \$? = $ac_status" >&5
7953   (exit $ac_status); } &&
7954          { ac_try='test -s conftest.$ac_objext'
7955   { (eval echo "$as_me:7955: \"$ac_try\"") >&5
7956   (eval $ac_try) 2>&5
7957   ac_status=$?
7958   echo "$as_me:7958: \$? = $ac_status" >&5
7959   (exit $ac_status); }; }; then
7960   :
7961 else
7962   echo "$as_me: failed program was:" >&5
7963 cat conftest.$ac_ext >&5
7964 cf_have_incdir=yes
7965 fi
7966 rm -f conftest.$ac_objext conftest.$ac_ext
7967                           CPPFLAGS=$cf_save_CPPFLAGS
7968                         fi
7969                   fi
7970                 fi
7971
7972                 if test "$cf_have_incdir" = no ; then
7973                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7974
7975 echo "${as_me-configure}:7975: testing adding $cf_add_incdir to include-path ..." 1>&5
7976
7977                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7978
7979                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7980                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7981                   cf_add_incdir="$cf_top_incdir"
7982                 else
7983                   break
7984                 fi
7985           fi
7986         done
7987   done
7988 fi
7989
7990 if test -n "$cf_cv_library_path_utf8" ; then
7991   for cf_add_libdir in $cf_cv_library_path_utf8
7992   do
7993     if test $cf_add_libdir = /usr/lib ; then
7994       :
7995     elif test -d $cf_add_libdir
7996     then
7997       cf_have_libdir=no
7998       if test -n "$LDFLAGS$LIBS" ; then
7999         # a loop is needed to ensure we can add subdirs of existing dirs
8000         for cf_test_libdir in $LDFLAGS $LIBS ; do
8001           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8002             cf_have_libdir=yes; break
8003           fi
8004         done
8005       fi
8006       if test "$cf_have_libdir" = no ; then
8007         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8008
8009 echo "${as_me-configure}:8009: testing adding $cf_add_libdir to library-path ..." 1>&5
8010
8011         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8012       fi
8013     fi
8014   done
8015 fi
8016
8017         LIBS="-lutf8 $LIBS"
8018 fi
8019
8020                 if test "$cf_cv_utf8_lib" != no ; then
8021                         NCURSES_LIBUTF8=1
8022                 fi
8023         fi
8024
8025 # This is needed on Tru64 5.0 to declare mbstate_t
8026 echo "$as_me:8026: checking if we must include wchar.h to declare mbstate_t" >&5
8027 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8028 if test "${cf_cv_mbstate_t+set}" = set; then
8029   echo $ECHO_N "(cached) $ECHO_C" >&6
8030 else
8031
8032 cat >conftest.$ac_ext <<_ACEOF
8033 #line 8033 "configure"
8034 #include "confdefs.h"
8035
8036 #include <stdlib.h>
8037 #include <stdarg.h>
8038 #include <stdio.h>
8039 #ifdef HAVE_LIBUTF8_H
8040 #include <libutf8.h>
8041 #endif
8042 int
8043 main ()
8044 {
8045 mbstate_t state
8046   ;
8047   return 0;
8048 }
8049 _ACEOF
8050 rm -f conftest.$ac_objext
8051 if { (eval echo "$as_me:8051: \"$ac_compile\"") >&5
8052   (eval $ac_compile) 2>&5
8053   ac_status=$?
8054   echo "$as_me:8054: \$? = $ac_status" >&5
8055   (exit $ac_status); } &&
8056          { ac_try='test -s conftest.$ac_objext'
8057   { (eval echo "$as_me:8057: \"$ac_try\"") >&5
8058   (eval $ac_try) 2>&5
8059   ac_status=$?
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit $ac_status); }; }; then
8062   cf_cv_mbstate_t=no
8063 else
8064   echo "$as_me: failed program was:" >&5
8065 cat conftest.$ac_ext >&5
8066 cat >conftest.$ac_ext <<_ACEOF
8067 #line 8067 "configure"
8068 #include "confdefs.h"
8069
8070 #include <stdlib.h>
8071 #include <stdarg.h>
8072 #include <stdio.h>
8073 #include <wchar.h>
8074 #ifdef HAVE_LIBUTF8_H
8075 #include <libutf8.h>
8076 #endif
8077 int
8078 main ()
8079 {
8080 mbstate_t value
8081   ;
8082   return 0;
8083 }
8084 _ACEOF
8085 rm -f conftest.$ac_objext
8086 if { (eval echo "$as_me:8086: \"$ac_compile\"") >&5
8087   (eval $ac_compile) 2>&5
8088   ac_status=$?
8089   echo "$as_me:8089: \$? = $ac_status" >&5
8090   (exit $ac_status); } &&
8091          { ac_try='test -s conftest.$ac_objext'
8092   { (eval echo "$as_me:8092: \"$ac_try\"") >&5
8093   (eval $ac_try) 2>&5
8094   ac_status=$?
8095   echo "$as_me:8095: \$? = $ac_status" >&5
8096   (exit $ac_status); }; }; then
8097   cf_cv_mbstate_t=yes
8098 else
8099   echo "$as_me: failed program was:" >&5
8100 cat conftest.$ac_ext >&5
8101 cf_cv_mbstate_t=unknown
8102 fi
8103 rm -f conftest.$ac_objext conftest.$ac_ext
8104 fi
8105 rm -f conftest.$ac_objext conftest.$ac_ext
8106 fi
8107 echo "$as_me:8107: result: $cf_cv_mbstate_t" >&5
8108 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8109
8110 if test "$cf_cv_mbstate_t" = yes ; then
8111         cat >>confdefs.h <<\EOF
8112 #define NEED_WCHAR_H 1
8113 EOF
8114
8115         NEED_WCHAR_H=1
8116 fi
8117
8118 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8119 if test "$cf_cv_mbstate_t" = unknown ; then
8120         NCURSES_MBSTATE_T=1
8121 fi
8122
8123 # This is needed on Tru64 5.0 to declare wchar_t
8124 echo "$as_me:8124: checking if we must include wchar.h to declare wchar_t" >&5
8125 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8126 if test "${cf_cv_wchar_t+set}" = set; then
8127   echo $ECHO_N "(cached) $ECHO_C" >&6
8128 else
8129
8130 cat >conftest.$ac_ext <<_ACEOF
8131 #line 8131 "configure"
8132 #include "confdefs.h"
8133
8134 #include <stdlib.h>
8135 #include <stdarg.h>
8136 #include <stdio.h>
8137 #ifdef HAVE_LIBUTF8_H
8138 #include <libutf8.h>
8139 #endif
8140 int
8141 main ()
8142 {
8143 wchar_t state
8144   ;
8145   return 0;
8146 }
8147 _ACEOF
8148 rm -f conftest.$ac_objext
8149 if { (eval echo "$as_me:8149: \"$ac_compile\"") >&5
8150   (eval $ac_compile) 2>&5
8151   ac_status=$?
8152   echo "$as_me:8152: \$? = $ac_status" >&5
8153   (exit $ac_status); } &&
8154          { ac_try='test -s conftest.$ac_objext'
8155   { (eval echo "$as_me:8155: \"$ac_try\"") >&5
8156   (eval $ac_try) 2>&5
8157   ac_status=$?
8158   echo "$as_me:8158: \$? = $ac_status" >&5
8159   (exit $ac_status); }; }; then
8160   cf_cv_wchar_t=no
8161 else
8162   echo "$as_me: failed program was:" >&5
8163 cat conftest.$ac_ext >&5
8164 cat >conftest.$ac_ext <<_ACEOF
8165 #line 8165 "configure"
8166 #include "confdefs.h"
8167
8168 #include <stdlib.h>
8169 #include <stdarg.h>
8170 #include <stdio.h>
8171 #include <wchar.h>
8172 #ifdef HAVE_LIBUTF8_H
8173 #include <libutf8.h>
8174 #endif
8175 int
8176 main ()
8177 {
8178 wchar_t value
8179   ;
8180   return 0;
8181 }
8182 _ACEOF
8183 rm -f conftest.$ac_objext
8184 if { (eval echo "$as_me:8184: \"$ac_compile\"") >&5
8185   (eval $ac_compile) 2>&5
8186   ac_status=$?
8187   echo "$as_me:8187: \$? = $ac_status" >&5
8188   (exit $ac_status); } &&
8189          { ac_try='test -s conftest.$ac_objext'
8190   { (eval echo "$as_me:8190: \"$ac_try\"") >&5
8191   (eval $ac_try) 2>&5
8192   ac_status=$?
8193   echo "$as_me:8193: \$? = $ac_status" >&5
8194   (exit $ac_status); }; }; then
8195   cf_cv_wchar_t=yes
8196 else
8197   echo "$as_me: failed program was:" >&5
8198 cat conftest.$ac_ext >&5
8199 cf_cv_wchar_t=unknown
8200 fi
8201 rm -f conftest.$ac_objext conftest.$ac_ext
8202 fi
8203 rm -f conftest.$ac_objext conftest.$ac_ext
8204 fi
8205 echo "$as_me:8205: result: $cf_cv_wchar_t" >&5
8206 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8207
8208 if test "$cf_cv_wchar_t" = yes ; then
8209         cat >>confdefs.h <<\EOF
8210 #define NEED_WCHAR_H 1
8211 EOF
8212
8213         NEED_WCHAR_H=1
8214 fi
8215
8216 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8217 if test "$cf_cv_wchar_t" = unknown ; then
8218         NCURSES_WCHAR_T=1
8219 fi
8220
8221 # if we find wchar_t in either place, use substitution to provide a fallback.
8222 if test "$cf_cv_wchar_t" != unknown ; then
8223         NCURSES_OK_WCHAR_T=1
8224 fi
8225
8226 # This is needed on Tru64 5.0 to declare wint_t
8227 echo "$as_me:8227: checking if we must include wchar.h to declare wint_t" >&5
8228 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8229 if test "${cf_cv_wint_t+set}" = set; then
8230   echo $ECHO_N "(cached) $ECHO_C" >&6
8231 else
8232
8233 cat >conftest.$ac_ext <<_ACEOF
8234 #line 8234 "configure"
8235 #include "confdefs.h"
8236
8237 #include <stdlib.h>
8238 #include <stdarg.h>
8239 #include <stdio.h>
8240 #ifdef HAVE_LIBUTF8_H
8241 #include <libutf8.h>
8242 #endif
8243 int
8244 main ()
8245 {
8246 wint_t state
8247   ;
8248   return 0;
8249 }
8250 _ACEOF
8251 rm -f conftest.$ac_objext
8252 if { (eval echo "$as_me:8252: \"$ac_compile\"") >&5
8253   (eval $ac_compile) 2>&5
8254   ac_status=$?
8255   echo "$as_me:8255: \$? = $ac_status" >&5
8256   (exit $ac_status); } &&
8257          { ac_try='test -s conftest.$ac_objext'
8258   { (eval echo "$as_me:8258: \"$ac_try\"") >&5
8259   (eval $ac_try) 2>&5
8260   ac_status=$?
8261   echo "$as_me:8261: \$? = $ac_status" >&5
8262   (exit $ac_status); }; }; then
8263   cf_cv_wint_t=no
8264 else
8265   echo "$as_me: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267 cat >conftest.$ac_ext <<_ACEOF
8268 #line 8268 "configure"
8269 #include "confdefs.h"
8270
8271 #include <stdlib.h>
8272 #include <stdarg.h>
8273 #include <stdio.h>
8274 #include <wchar.h>
8275 #ifdef HAVE_LIBUTF8_H
8276 #include <libutf8.h>
8277 #endif
8278 int
8279 main ()
8280 {
8281 wint_t value
8282   ;
8283   return 0;
8284 }
8285 _ACEOF
8286 rm -f conftest.$ac_objext
8287 if { (eval echo "$as_me:8287: \"$ac_compile\"") >&5
8288   (eval $ac_compile) 2>&5
8289   ac_status=$?
8290   echo "$as_me:8290: \$? = $ac_status" >&5
8291   (exit $ac_status); } &&
8292          { ac_try='test -s conftest.$ac_objext'
8293   { (eval echo "$as_me:8293: \"$ac_try\"") >&5
8294   (eval $ac_try) 2>&5
8295   ac_status=$?
8296   echo "$as_me:8296: \$? = $ac_status" >&5
8297   (exit $ac_status); }; }; then
8298   cf_cv_wint_t=yes
8299 else
8300   echo "$as_me: failed program was:" >&5
8301 cat conftest.$ac_ext >&5
8302 cf_cv_wint_t=unknown
8303 fi
8304 rm -f conftest.$ac_objext conftest.$ac_ext
8305 fi
8306 rm -f conftest.$ac_objext conftest.$ac_ext
8307 fi
8308 echo "$as_me:8308: result: $cf_cv_wint_t" >&5
8309 echo "${ECHO_T}$cf_cv_wint_t" >&6
8310
8311 if test "$cf_cv_wint_t" = yes ; then
8312         cat >>confdefs.h <<\EOF
8313 #define NEED_WCHAR_H 1
8314 EOF
8315
8316         NEED_WCHAR_H=1
8317 fi
8318
8319 # if we do not find wint_t in either place, use substitution to provide a fallback.
8320 if test "$cf_cv_wint_t" = unknown ; then
8321         NCURSES_WINT_T=1
8322 fi
8323
8324 # if we find wint_t in either place, use substitution to provide a fallback.
8325 if test "$cf_cv_wint_t" != unknown ; then
8326         NCURSES_OK_WINT_T=1
8327 fi
8328
8329         if test "$NCURSES_MBSTATE_T" != 0; then
8330                 cat >>confdefs.h <<\EOF
8331 #define NEED_MBSTATE_T_DEF 1
8332 EOF
8333
8334         fi
8335 fi
8336
8337 ###   use option --disable-lp64 to allow long chtype
8338 case $cf_cv_abi_version in
8339 [345]*)
8340         default_with_lp64=no
8341         ;;
8342 *)
8343         default_with_lp64=yes
8344         ;;
8345 esac
8346
8347 echo "$as_me:8347: checking whether to enable _LP64 definition in curses.h" >&5
8348 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8349
8350 # Check whether --enable-lp64 or --disable-lp64 was given.
8351 if test "${enable_lp64+set}" = set; then
8352   enableval="$enable_lp64"
8353   with_lp64=$enableval
8354 else
8355   with_lp64=$default_with_lp64
8356 fi;
8357 echo "$as_me:8357: result: $with_lp64" >&5
8358 echo "${ECHO_T}$with_lp64" >&6
8359
8360 if test "$with_lp64" = yes ; then
8361         cf_cv_enable_lp64=1
8362 else
8363         cf_cv_enable_lp64=0
8364 fi
8365
8366 # Check whether --enable-largefile or --disable-largefile was given.
8367 if test "${enable_largefile+set}" = set; then
8368   enableval="$enable_largefile"
8369
8370 fi;
8371 if test "$enable_largefile" != no; then
8372
8373   echo "$as_me:8373: checking for special C compiler options needed for large files" >&5
8374 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8375 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8376   echo $ECHO_N "(cached) $ECHO_C" >&6
8377 else
8378   ac_cv_sys_largefile_CC=no
8379      if test "$GCC" != yes; then
8380        ac_save_CC=$CC
8381        while :; do
8382          # IRIX 6.2 and later do not support large files by default,
8383          # so use the C compiler's -n32 option if that helps.
8384          cat >conftest.$ac_ext <<_ACEOF
8385 #line 8385 "configure"
8386 #include "confdefs.h"
8387 #include <sys/types.h>
8388  /* Check that off_t can represent 2**63 - 1 correctly.
8389     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8390     since some C++ compilers masquerading as C compilers
8391     incorrectly reject 9223372036854775807.  */
8392 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8393   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8394                        && LARGE_OFF_T % 2147483647 == 1)
8395                       ? 1 : -1];
8396 int
8397 main ()
8398 {
8399
8400   ;
8401   return 0;
8402 }
8403 _ACEOF
8404          rm -f conftest.$ac_objext
8405 if { (eval echo "$as_me:8405: \"$ac_compile\"") >&5
8406   (eval $ac_compile) 2>&5
8407   ac_status=$?
8408   echo "$as_me:8408: \$? = $ac_status" >&5
8409   (exit $ac_status); } &&
8410          { ac_try='test -s conftest.$ac_objext'
8411   { (eval echo "$as_me:8411: \"$ac_try\"") >&5
8412   (eval $ac_try) 2>&5
8413   ac_status=$?
8414   echo "$as_me:8414: \$? = $ac_status" >&5
8415   (exit $ac_status); }; }; then
8416   break
8417 else
8418   echo "$as_me: failed program was:" >&5
8419 cat conftest.$ac_ext >&5
8420 fi
8421 rm -f conftest.$ac_objext
8422          CC="$CC -n32"
8423          rm -f conftest.$ac_objext
8424 if { (eval echo "$as_me:8424: \"$ac_compile\"") >&5
8425   (eval $ac_compile) 2>&5
8426   ac_status=$?
8427   echo "$as_me:8427: \$? = $ac_status" >&5
8428   (exit $ac_status); } &&
8429          { ac_try='test -s conftest.$ac_objext'
8430   { (eval echo "$as_me:8430: \"$ac_try\"") >&5
8431   (eval $ac_try) 2>&5
8432   ac_status=$?
8433   echo "$as_me:8433: \$? = $ac_status" >&5
8434   (exit $ac_status); }; }; then
8435   ac_cv_sys_largefile_CC=' -n32'; break
8436 else
8437   echo "$as_me: failed program was:" >&5
8438 cat conftest.$ac_ext >&5
8439 fi
8440 rm -f conftest.$ac_objext
8441          break
8442        done
8443        CC=$ac_save_CC
8444        rm -f conftest.$ac_ext
8445     fi
8446 fi
8447 echo "$as_me:8447: result: $ac_cv_sys_largefile_CC" >&5
8448 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8449   if test "$ac_cv_sys_largefile_CC" != no; then
8450     CC=$CC$ac_cv_sys_largefile_CC
8451   fi
8452
8453   echo "$as_me:8453: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8454 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8455 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8456   echo $ECHO_N "(cached) $ECHO_C" >&6
8457 else
8458   while :; do
8459   ac_cv_sys_file_offset_bits=no
8460   cat >conftest.$ac_ext <<_ACEOF
8461 #line 8461 "configure"
8462 #include "confdefs.h"
8463 #include <sys/types.h>
8464  /* Check that off_t can represent 2**63 - 1 correctly.
8465     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8466     since some C++ compilers masquerading as C compilers
8467     incorrectly reject 9223372036854775807.  */
8468 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8469   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8470                        && LARGE_OFF_T % 2147483647 == 1)
8471                       ? 1 : -1];
8472 int
8473 main ()
8474 {
8475
8476   ;
8477   return 0;
8478 }
8479 _ACEOF
8480 rm -f conftest.$ac_objext
8481 if { (eval echo "$as_me:8481: \"$ac_compile\"") >&5
8482   (eval $ac_compile) 2>&5
8483   ac_status=$?
8484   echo "$as_me:8484: \$? = $ac_status" >&5
8485   (exit $ac_status); } &&
8486          { ac_try='test -s conftest.$ac_objext'
8487   { (eval echo "$as_me:8487: \"$ac_try\"") >&5
8488   (eval $ac_try) 2>&5
8489   ac_status=$?
8490   echo "$as_me:8490: \$? = $ac_status" >&5
8491   (exit $ac_status); }; }; then
8492   break
8493 else
8494   echo "$as_me: failed program was:" >&5
8495 cat conftest.$ac_ext >&5
8496 fi
8497 rm -f conftest.$ac_objext conftest.$ac_ext
8498   cat >conftest.$ac_ext <<_ACEOF
8499 #line 8499 "configure"
8500 #include "confdefs.h"
8501 #define _FILE_OFFSET_BITS 64
8502 #include <sys/types.h>
8503  /* Check that off_t can represent 2**63 - 1 correctly.
8504     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8505     since some C++ compilers masquerading as C compilers
8506     incorrectly reject 9223372036854775807.  */
8507 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8508   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8509                        && LARGE_OFF_T % 2147483647 == 1)
8510                       ? 1 : -1];
8511 int
8512 main ()
8513 {
8514
8515   ;
8516   return 0;
8517 }
8518 _ACEOF
8519 rm -f conftest.$ac_objext
8520 if { (eval echo "$as_me:8520: \"$ac_compile\"") >&5
8521   (eval $ac_compile) 2>&5
8522   ac_status=$?
8523   echo "$as_me:8523: \$? = $ac_status" >&5
8524   (exit $ac_status); } &&
8525          { ac_try='test -s conftest.$ac_objext'
8526   { (eval echo "$as_me:8526: \"$ac_try\"") >&5
8527   (eval $ac_try) 2>&5
8528   ac_status=$?
8529   echo "$as_me:8529: \$? = $ac_status" >&5
8530   (exit $ac_status); }; }; then
8531   ac_cv_sys_file_offset_bits=64; break
8532 else
8533   echo "$as_me: failed program was:" >&5
8534 cat conftest.$ac_ext >&5
8535 fi
8536 rm -f conftest.$ac_objext conftest.$ac_ext
8537   break
8538 done
8539 fi
8540 echo "$as_me:8540: result: $ac_cv_sys_file_offset_bits" >&5
8541 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8542 if test "$ac_cv_sys_file_offset_bits" != no; then
8543
8544 cat >>confdefs.h <<EOF
8545 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8546 EOF
8547
8548 fi
8549 rm -f conftest*
8550   echo "$as_me:8550: checking for _LARGE_FILES value needed for large files" >&5
8551 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8552 if test "${ac_cv_sys_large_files+set}" = set; then
8553   echo $ECHO_N "(cached) $ECHO_C" >&6
8554 else
8555   while :; do
8556   ac_cv_sys_large_files=no
8557   cat >conftest.$ac_ext <<_ACEOF
8558 #line 8558 "configure"
8559 #include "confdefs.h"
8560 #include <sys/types.h>
8561  /* Check that off_t can represent 2**63 - 1 correctly.
8562     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8563     since some C++ compilers masquerading as C compilers
8564     incorrectly reject 9223372036854775807.  */
8565 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8566   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8567                        && LARGE_OFF_T % 2147483647 == 1)
8568                       ? 1 : -1];
8569 int
8570 main ()
8571 {
8572
8573   ;
8574   return 0;
8575 }
8576 _ACEOF
8577 rm -f conftest.$ac_objext
8578 if { (eval echo "$as_me:8578: \"$ac_compile\"") >&5
8579   (eval $ac_compile) 2>&5
8580   ac_status=$?
8581   echo "$as_me:8581: \$? = $ac_status" >&5
8582   (exit $ac_status); } &&
8583          { ac_try='test -s conftest.$ac_objext'
8584   { (eval echo "$as_me:8584: \"$ac_try\"") >&5
8585   (eval $ac_try) 2>&5
8586   ac_status=$?
8587   echo "$as_me:8587: \$? = $ac_status" >&5
8588   (exit $ac_status); }; }; then
8589   break
8590 else
8591   echo "$as_me: failed program was:" >&5
8592 cat conftest.$ac_ext >&5
8593 fi
8594 rm -f conftest.$ac_objext conftest.$ac_ext
8595   cat >conftest.$ac_ext <<_ACEOF
8596 #line 8596 "configure"
8597 #include "confdefs.h"
8598 #define _LARGE_FILES 1
8599 #include <sys/types.h>
8600  /* Check that off_t can represent 2**63 - 1 correctly.
8601     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8602     since some C++ compilers masquerading as C compilers
8603     incorrectly reject 9223372036854775807.  */
8604 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8605   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8606                        && LARGE_OFF_T % 2147483647 == 1)
8607                       ? 1 : -1];
8608 int
8609 main ()
8610 {
8611
8612   ;
8613   return 0;
8614 }
8615 _ACEOF
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_large_files=1; 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 conftest.$ac_ext
8634   break
8635 done
8636 fi
8637 echo "$as_me:8637: result: $ac_cv_sys_large_files" >&5
8638 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8639 if test "$ac_cv_sys_large_files" != no; then
8640
8641 cat >>confdefs.h <<EOF
8642 #define _LARGE_FILES $ac_cv_sys_large_files
8643 EOF
8644
8645 fi
8646 rm -f conftest*
8647 fi
8648
8649     if test "$enable_largefile" != no ; then
8650         echo "$as_me:8650: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8651 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8652 if test "${ac_cv_sys_largefile_source+set}" = set; then
8653   echo $ECHO_N "(cached) $ECHO_C" >&6
8654 else
8655   while :; do
8656   ac_cv_sys_largefile_source=no
8657   cat >conftest.$ac_ext <<_ACEOF
8658 #line 8658 "configure"
8659 #include "confdefs.h"
8660 #include <stdio.h>
8661 int
8662 main ()
8663 {
8664 return !fseeko;
8665   ;
8666   return 0;
8667 }
8668 _ACEOF
8669 rm -f conftest.$ac_objext
8670 if { (eval echo "$as_me:8670: \"$ac_compile\"") >&5
8671   (eval $ac_compile) 2>&5
8672   ac_status=$?
8673   echo "$as_me:8673: \$? = $ac_status" >&5
8674   (exit $ac_status); } &&
8675          { ac_try='test -s conftest.$ac_objext'
8676   { (eval echo "$as_me:8676: \"$ac_try\"") >&5
8677   (eval $ac_try) 2>&5
8678   ac_status=$?
8679   echo "$as_me:8679: \$? = $ac_status" >&5
8680   (exit $ac_status); }; }; then
8681   break
8682 else
8683   echo "$as_me: failed program was:" >&5
8684 cat conftest.$ac_ext >&5
8685 fi
8686 rm -f conftest.$ac_objext conftest.$ac_ext
8687   cat >conftest.$ac_ext <<_ACEOF
8688 #line 8688 "configure"
8689 #include "confdefs.h"
8690 #define _LARGEFILE_SOURCE 1
8691 #include <stdio.h>
8692 int
8693 main ()
8694 {
8695 return !fseeko;
8696   ;
8697   return 0;
8698 }
8699 _ACEOF
8700 rm -f conftest.$ac_objext
8701 if { (eval echo "$as_me:8701: \"$ac_compile\"") >&5
8702   (eval $ac_compile) 2>&5
8703   ac_status=$?
8704   echo "$as_me:8704: \$? = $ac_status" >&5
8705   (exit $ac_status); } &&
8706          { ac_try='test -s conftest.$ac_objext'
8707   { (eval echo "$as_me:8707: \"$ac_try\"") >&5
8708   (eval $ac_try) 2>&5
8709   ac_status=$?
8710   echo "$as_me:8710: \$? = $ac_status" >&5
8711   (exit $ac_status); }; }; then
8712   ac_cv_sys_largefile_source=1; break
8713 else
8714   echo "$as_me: failed program was:" >&5
8715 cat conftest.$ac_ext >&5
8716 fi
8717 rm -f conftest.$ac_objext conftest.$ac_ext
8718   break
8719 done
8720 fi
8721 echo "$as_me:8721: result: $ac_cv_sys_largefile_source" >&5
8722 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8723 if test "$ac_cv_sys_largefile_source" != no; then
8724
8725 cat >>confdefs.h <<EOF
8726 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8727 EOF
8728
8729 fi
8730 rm -f conftest*
8731
8732 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8733 # in glibc 2.1.3, but that breaks too many other things.
8734 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8735 echo "$as_me:8735: checking for fseeko" >&5
8736 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8737 if test "${ac_cv_func_fseeko+set}" = set; then
8738   echo $ECHO_N "(cached) $ECHO_C" >&6
8739 else
8740   cat >conftest.$ac_ext <<_ACEOF
8741 #line 8741 "configure"
8742 #include "confdefs.h"
8743 #include <stdio.h>
8744 int
8745 main ()
8746 {
8747 return fseeko && fseeko (stdin, 0, 0);
8748   ;
8749   return 0;
8750 }
8751 _ACEOF
8752 rm -f conftest.$ac_objext conftest$ac_exeext
8753 if { (eval echo "$as_me:8753: \"$ac_link\"") >&5
8754   (eval $ac_link) 2>&5
8755   ac_status=$?
8756   echo "$as_me:8756: \$? = $ac_status" >&5
8757   (exit $ac_status); } &&
8758          { ac_try='test -s conftest$ac_exeext'
8759   { (eval echo "$as_me:8759: \"$ac_try\"") >&5
8760   (eval $ac_try) 2>&5
8761   ac_status=$?
8762   echo "$as_me:8762: \$? = $ac_status" >&5
8763   (exit $ac_status); }; }; then
8764   ac_cv_func_fseeko=yes
8765 else
8766   echo "$as_me: failed program was:" >&5
8767 cat conftest.$ac_ext >&5
8768 ac_cv_func_fseeko=no
8769 fi
8770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8771 fi
8772 echo "$as_me:8772: result: $ac_cv_func_fseeko" >&5
8773 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8774 if test $ac_cv_func_fseeko = yes; then
8775
8776 cat >>confdefs.h <<\EOF
8777 #define HAVE_FSEEKO 1
8778 EOF
8779
8780 fi
8781
8782         # Normally we would collect these definitions in the config.h,
8783         # but (like _XOPEN_SOURCE), some environments rely on having these
8784         # defined before any of the system headers are included.  Another
8785         # case comes up with C++, e.g., on AIX the compiler compiles the
8786         # header files by themselves before looking at the body files it is
8787         # told to compile.  For ncurses, those header files do not include
8788         # the config.h
8789         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8790         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8791         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8792
8793         echo "$as_me:8793: checking whether to use struct dirent64" >&5
8794 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8795 if test "${cf_cv_struct_dirent64+set}" = set; then
8796   echo $ECHO_N "(cached) $ECHO_C" >&6
8797 else
8798
8799                 cat >conftest.$ac_ext <<_ACEOF
8800 #line 8800 "configure"
8801 #include "confdefs.h"
8802
8803 #include <sys/types.h>
8804 #include <dirent.h>
8805
8806 int
8807 main ()
8808 {
8809
8810                 /* if transitional largefile support is setup, this is true */
8811                 extern struct dirent64 * readdir(DIR *);
8812                 struct dirent64 *x = readdir((DIR *)0);
8813                 struct dirent *y = readdir((DIR *)0);
8814                 int z = x - y;
8815
8816   ;
8817   return 0;
8818 }
8819 _ACEOF
8820 rm -f conftest.$ac_objext
8821 if { (eval echo "$as_me:8821: \"$ac_compile\"") >&5
8822   (eval $ac_compile) 2>&5
8823   ac_status=$?
8824   echo "$as_me:8824: \$? = $ac_status" >&5
8825   (exit $ac_status); } &&
8826          { ac_try='test -s conftest.$ac_objext'
8827   { (eval echo "$as_me:8827: \"$ac_try\"") >&5
8828   (eval $ac_try) 2>&5
8829   ac_status=$?
8830   echo "$as_me:8830: \$? = $ac_status" >&5
8831   (exit $ac_status); }; }; then
8832   cf_cv_struct_dirent64=yes
8833 else
8834   echo "$as_me: failed program was:" >&5
8835 cat conftest.$ac_ext >&5
8836 cf_cv_struct_dirent64=no
8837 fi
8838 rm -f conftest.$ac_objext conftest.$ac_ext
8839
8840 fi
8841 echo "$as_me:8841: result: $cf_cv_struct_dirent64" >&5
8842 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8843         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8844 #define HAVE_STRUCT_DIRENT64 1
8845 EOF
8846
8847     fi
8848
8849 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8850 echo "$as_me:8850: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8851 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8852
8853 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8854 if test "${enable_tparm_varargs+set}" = set; then
8855   enableval="$enable_tparm_varargs"
8856   with_tparm_varargs=$enableval
8857 else
8858   with_tparm_varargs=yes
8859 fi;
8860 echo "$as_me:8860: result: $with_tparm_varargs" >&5
8861 echo "${ECHO_T}$with_tparm_varargs" >&6
8862 NCURSES_TPARM_VARARGS=0
8863 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8864
8865 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8866 if test "$with_ticlib" != no ; then
8867 echo "$as_me:8867: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8868 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8869
8870 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8871 if test "${enable_tic_depends+set}" = set; then
8872   enableval="$enable_tic_depends"
8873   with_tic_depends=$enableval
8874 else
8875   with_tic_depends=yes
8876 fi;
8877 echo "$as_me:8877: result: $with_tic_depends" >&5
8878 echo "${ECHO_T}$with_tic_depends" >&6
8879 else
8880         with_tic_depends=no
8881 fi
8882
8883 ###   use option --with-bool to override bool's type
8884 echo "$as_me:8884: checking for type of bool" >&5
8885 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8886
8887 # Check whether --with-bool or --without-bool was given.
8888 if test "${with_bool+set}" = set; then
8889   withval="$with_bool"
8890   NCURSES_BOOL="$withval"
8891 else
8892   NCURSES_BOOL=auto
8893 fi;
8894 echo "$as_me:8894: result: $NCURSES_BOOL" >&5
8895 echo "${ECHO_T}$NCURSES_BOOL" >&6
8896
8897 echo "$as_me:8897: checking for alternate terminal capabilities file" >&5
8898 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8899
8900 # Check whether --with-caps or --without-caps was given.
8901 if test "${with_caps+set}" = set; then
8902   withval="$with_caps"
8903   TERMINFO_CAPS=Caps.$withval
8904 else
8905   TERMINFO_CAPS=Caps
8906 fi;
8907 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8908 echo "$as_me:8908: result: $TERMINFO_CAPS" >&5
8909 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8910
8911 ###   use option --with-chtype to override chtype's type
8912 echo "$as_me:8912: checking for type of chtype" >&5
8913 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8914
8915 # Check whether --with-chtype or --without-chtype was given.
8916 if test "${with_chtype+set}" = set; then
8917   withval="$with_chtype"
8918   NCURSES_CHTYPE="$withval"
8919 else
8920   NCURSES_CHTYPE=auto
8921 fi;
8922 echo "$as_me:8922: result: $NCURSES_CHTYPE" >&5
8923 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8924
8925 ###   use option --with-ospeed to override ospeed's type
8926 echo "$as_me:8926: checking for type of ospeed" >&5
8927 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8928
8929 # Check whether --with-ospeed or --without-ospeed was given.
8930 if test "${with_ospeed+set}" = set; then
8931   withval="$with_ospeed"
8932   NCURSES_OSPEED="$withval"
8933 else
8934   NCURSES_OSPEED=short
8935 fi;
8936 echo "$as_me:8936: result: $NCURSES_OSPEED" >&5
8937 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8938
8939 ###   use option --with-mmask-t to override mmask_t's type
8940 echo "$as_me:8940: checking for type of mmask_t" >&5
8941 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8942
8943 # Check whether --with-mmask-t or --without-mmask-t was given.
8944 if test "${with_mmask_t+set}" = set; then
8945   withval="$with_mmask_t"
8946   NCURSES_MMASK_T="$withval"
8947 else
8948   NCURSES_MMASK_T=auto
8949 fi;
8950 echo "$as_me:8950: result: $NCURSES_MMASK_T" >&5
8951 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8952
8953 ###   use option --with-ccharw-max to override CCHARW_MAX size
8954 echo "$as_me:8954: checking for size CCHARW_MAX" >&5
8955 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
8956
8957 # Check whether --with-ccharw-max or --without-ccharw-max was given.
8958 if test "${with_ccharw_max+set}" = set; then
8959   withval="$with_ccharw_max"
8960   NCURSES_CCHARW_MAX="$withval"
8961 else
8962   NCURSES_CCHARW_MAX=5
8963 fi;
8964 echo "$as_me:8964: result: $NCURSES_CCHARW_MAX" >&5
8965 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
8966
8967 ### Enable compiling-in rcs id's
8968 echo "$as_me:8968: checking if RCS identifiers should be compiled-in" >&5
8969 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8970
8971 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8972 if test "${with_rcs_ids+set}" = set; then
8973   withval="$with_rcs_ids"
8974   with_rcs_ids=$withval
8975 else
8976   with_rcs_ids=no
8977 fi;
8978 echo "$as_me:8978: result: $with_rcs_ids" >&5
8979 echo "${ECHO_T}$with_rcs_ids" >&6
8980 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8981 #define USE_RCS_IDS 1
8982 EOF
8983
8984 ###############################################################################
8985
8986 echo "$as_me:8986: checking format of man-pages" >&5
8987 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8988
8989 # Check whether --with-manpage-format or --without-manpage-format was given.
8990 if test "${with_manpage_format+set}" = set; then
8991   withval="$with_manpage_format"
8992   MANPAGE_FORMAT=$withval
8993 else
8994   MANPAGE_FORMAT=unknown
8995 fi;
8996
8997 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8998 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8999
9000 cf_unknown=
9001
9002 case $MANPAGE_FORMAT in
9003 unknown)
9004   if test -z "$MANPATH" ; then
9005     MANPATH="/usr/man:/usr/share/man"
9006   fi
9007
9008   # look for the 'date' man-page (it's most likely to be installed!)
9009   MANPAGE_FORMAT=
9010   cf_preform=no
9011   cf_catonly=yes
9012   cf_example=date
9013
9014   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9015   for cf_dir in $MANPATH; do
9016     test -z "$cf_dir" && cf_dir=/usr/man
9017     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
9018     do
9019       cf_test=`echo $cf_name | sed -e 's/*//'`
9020       if test "x$cf_test" = "x$cf_name" ; then
9021
9022         case "$cf_name" in
9023         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9024         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9025         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9026         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9027         esac
9028
9029         case "$cf_name" in
9030         $cf_dir/man*)
9031           cf_catonly=no
9032           ;;
9033         $cf_dir/cat*)
9034           cf_preform=yes
9035           ;;
9036         esac
9037         break
9038       fi
9039
9040       # if we found a match in either man* or cat*, stop looking
9041       if test -n "$MANPAGE_FORMAT" ; then
9042         cf_found=no
9043         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9044         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9045         case "$cf_name" in
9046         $cf_dir/cat*)
9047           cf_found=yes
9048           ;;
9049         esac
9050         test $cf_found=yes && break
9051       fi
9052     done
9053     # only check the first directory in $MANPATH where we find manpages
9054     if test -n "$MANPAGE_FORMAT" ; then
9055        break
9056     fi
9057   done
9058   # if we did not find the example, just assume it is normal
9059   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9060   IFS="$ac_save_ifs"
9061   ;;
9062 *)
9063   for cf_option in $MANPAGE_FORMAT; do
9064      case $cf_option in #(vi
9065      gzip|compress|BSDI|normal|formatted|catonly)
9066        ;;
9067      *)
9068        cf_unknown="$cf_unknown $cf_option"
9069        ;;
9070      esac
9071   done
9072   ;;
9073 esac
9074
9075 echo "$as_me:9075: result: $MANPAGE_FORMAT" >&5
9076 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9077 if test -n "$cf_unknown" ; then
9078   { echo "$as_me:9078: WARNING: Unexpected manpage-format $cf_unknown" >&5
9079 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9080 fi
9081
9082 echo "$as_me:9082: checking for manpage renaming" >&5
9083 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9084
9085 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9086 if test "${with_manpage_renames+set}" = set; then
9087   withval="$with_manpage_renames"
9088   MANPAGE_RENAMES=$withval
9089 else
9090   MANPAGE_RENAMES=yes
9091 fi;
9092
9093 case ".$MANPAGE_RENAMES" in #(vi
9094 .no) #(vi
9095   ;;
9096 .|.yes)
9097   # Debian 'man' program?
9098   if test -f /etc/debian_version ; then
9099     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9100   else
9101     MANPAGE_RENAMES=no
9102   fi
9103   ;;
9104 esac
9105
9106 if test "$MANPAGE_RENAMES" != no ; then
9107   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9108     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9109   elif test ! -f $MANPAGE_RENAMES ; then
9110     { { echo "$as_me:9110: error: not a filename: $MANPAGE_RENAMES" >&5
9111 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9112    { (exit 1); exit 1; }; }
9113   fi
9114
9115   test ! -d man && mkdir man
9116
9117   # Construct a sed-script to perform renaming within man-pages
9118   if test -n "$MANPAGE_RENAMES" ; then
9119     test ! -d man && mkdir man
9120     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9121   fi
9122 fi
9123
9124 echo "$as_me:9124: result: $MANPAGE_RENAMES" >&5
9125 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9126
9127 echo "$as_me:9127: checking if manpage aliases will be installed" >&5
9128 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9129
9130 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9131 if test "${with_manpage_aliases+set}" = set; then
9132   withval="$with_manpage_aliases"
9133   MANPAGE_ALIASES=$withval
9134 else
9135   MANPAGE_ALIASES=yes
9136 fi;
9137
9138 echo "$as_me:9138: result: $MANPAGE_ALIASES" >&5
9139 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9140
9141 if test "$LN_S" = "ln -s"; then
9142         cf_use_symlinks=yes
9143 else
9144         cf_use_symlinks=no
9145 fi
9146
9147 MANPAGE_SYMLINKS=no
9148 if test "$MANPAGE_ALIASES" = yes ; then
9149 echo "$as_me:9149: checking if manpage symlinks should be used" >&5
9150 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9151
9152 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9153 if test "${with_manpage_symlinks+set}" = set; then
9154   withval="$with_manpage_symlinks"
9155   MANPAGE_SYMLINKS=$withval
9156 else
9157   MANPAGE_SYMLINKS=$cf_use_symlinks
9158 fi;
9159
9160 if test "$$cf_use_symlinks" = no; then
9161 if test "$MANPAGE_SYMLINKS" = yes ; then
9162         { echo "$as_me:9162: WARNING: cannot make symlinks" >&5
9163 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9164         MANPAGE_SYMLINKS=no
9165 fi
9166 fi
9167
9168 echo "$as_me:9168: result: $MANPAGE_SYMLINKS" >&5
9169 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9170 fi
9171
9172 echo "$as_me:9172: checking for manpage tbl" >&5
9173 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9174
9175 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9176 if test "${with_manpage_tbl+set}" = set; then
9177   withval="$with_manpage_tbl"
9178   MANPAGE_TBL=$withval
9179 else
9180   MANPAGE_TBL=no
9181 fi;
9182
9183 echo "$as_me:9183: result: $MANPAGE_TBL" >&5
9184 echo "${ECHO_T}$MANPAGE_TBL" >&6
9185
9186   if test "$prefix" = "NONE" ; then
9187      cf_prefix="$ac_default_prefix"
9188   else
9189      cf_prefix="$prefix"
9190   fi
9191
9192   case "$MANPAGE_FORMAT" in # (vi
9193   *catonly*) # (vi
9194     cf_format=yes
9195     cf_inboth=no
9196     ;;
9197   *formatted*) # (vi
9198     cf_format=yes
9199     cf_inboth=yes
9200     ;;
9201   *)
9202     cf_format=no
9203     cf_inboth=no
9204     ;;
9205   esac
9206
9207 test ! -d man && mkdir man
9208
9209 cf_so_strip=
9210 cf_compress=
9211 case "$MANPAGE_FORMAT" in #(vi
9212 *compress*) #(vi
9213         cf_so_strip="Z"
9214         cf_compress=compress
9215   ;;
9216 *gzip*) #(vi
9217         cf_so_strip="gz"
9218         cf_compress=gzip
9219   ;;
9220 esac
9221
9222 cf_edit_man=./edit_man.sh
9223 cf_man_alias=`pwd`/man_alias.sed
9224
9225 cat >$cf_edit_man <<CF_EOF
9226 #! /bin/sh
9227 # this script is generated by the configure-script CF_MAN_PAGES macro.
9228
9229 prefix="$cf_prefix"
9230 datadir="$datadir"
9231
9232 NCURSES_MAJOR="$NCURSES_MAJOR"
9233 NCURSES_MINOR="$NCURSES_MINOR"
9234 NCURSES_PATCH="$NCURSES_PATCH"
9235
9236 NCURSES_OSPEED="$NCURSES_OSPEED"
9237 TERMINFO="$TERMINFO"
9238
9239 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9240
9241 INSTALL="$INSTALL"
9242 INSTALL_DATA="$INSTALL_DATA"
9243
9244 transform="$program_transform_name"
9245
9246 TMP=\${TMPDIR-/tmp}/man\$\$
9247 trap "rm -f \$TMP" 0 1 2 5 15
9248
9249 form=\$1
9250 shift || exit 1
9251
9252 verb=\$1
9253 shift || exit 1
9254
9255 mandir=\$1
9256 shift || exit 1
9257
9258 srcdir=\$1
9259 top_srcdir=\$srcdir/..
9260 shift || exit 1
9261
9262 if test "\$form" = normal ; then
9263         if test "$cf_format" = yes ; then
9264         if test "$cf_inboth" = no ; then
9265                 sh \$0 format \$verb \$mandir \$srcdir \$*
9266                 exit $?
9267         fi
9268         fi
9269         cf_subdir=\$mandir/man
9270         cf_tables=$MANPAGE_TBL
9271 else
9272         cf_subdir=\$mandir/cat
9273         cf_tables=yes
9274 fi
9275
9276 # process the list of source-files
9277 for i in \$* ; do
9278 case \$i in #(vi
9279 *.orig|*.rej) ;; #(vi
9280 *.[0-9]*)
9281         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9282         if test \$verb = installing ; then
9283         if test ! -d \$cf_subdir\${section} ; then
9284                 \$MKDIRS \$cf_subdir\$section
9285         fi
9286         fi
9287
9288         # replace variables in man page
9289         if test ! -f $cf_man_alias ; then
9290 cat >>$cf_man_alias <<-CF_EOF2
9291                 s,@DATADIR@,\$datadir,g
9292                 s,@TERMINFO@,\$TERMINFO,g
9293                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9294                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9295                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9296                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9297 CF_EOF
9298
9299         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9300         do
9301                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9302                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9303 cat >>$cf_edit_man <<-CF_EOF
9304                 s,@$cf_NAME@,$cf_name,
9305 CF_EOF
9306         done
9307
9308 cat >>$cf_edit_man <<CF_EOF
9309 CF_EOF2
9310                 echo "...made $cf_man_alias"
9311         fi
9312
9313         aliases=
9314         cf_source=\`basename \$i\`
9315         inalias=\$cf_source
9316         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9317         if test ! -f \$inalias ; then
9318                 echo .. skipped \$cf_source
9319                 continue
9320         fi
9321 CF_EOF
9322
9323 if test "$MANPAGE_ALIASES" != no ; then
9324 cat >>$cf_edit_man <<CF_EOF
9325         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9326 CF_EOF
9327 fi
9328
9329 if test "$MANPAGE_RENAMES" = no ; then
9330 cat >>$cf_edit_man <<CF_EOF
9331         # perform program transformations for section 1 man pages
9332         if test \$section = 1 ; then
9333                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9334         else
9335                 cf_target=\$cf_subdir\${section}/\$cf_source
9336         fi
9337 CF_EOF
9338 else
9339 cat >>$cf_edit_man <<CF_EOF
9340         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9341         if test -z "\$cf_target" ; then
9342                 echo '? missing rename for '\$cf_source
9343                 cf_target="\$cf_source"
9344         fi
9345         cf_target="\$cf_subdir\${section}/\${cf_target}"
9346
9347 CF_EOF
9348 fi
9349
9350 cat >>$cf_edit_man <<CF_EOF
9351         sed     -f $cf_man_alias \\
9352 CF_EOF
9353
9354 if test -f $MANPAGE_RENAMES ; then
9355 cat >>$cf_edit_man <<CF_EOF
9356                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9357 CF_EOF
9358 else
9359 cat >>$cf_edit_man <<CF_EOF
9360                 < \$i >\$TMP
9361 CF_EOF
9362 fi
9363
9364 cat >>$cf_edit_man <<CF_EOF
9365 if test \$cf_tables = yes ; then
9366         tbl \$TMP >\$TMP.out
9367         mv \$TMP.out \$TMP
9368 fi
9369 CF_EOF
9370
9371 if test $with_curses_h != yes ; then
9372 cat >>$cf_edit_man <<CF_EOF
9373         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9374         mv \$TMP.out \$TMP
9375 CF_EOF
9376 fi
9377
9378 cat >>$cf_edit_man <<CF_EOF
9379         if test \$form = format ; then
9380                 nroff -man \$TMP >\$TMP.out
9381                 mv \$TMP.out \$TMP
9382         fi
9383 CF_EOF
9384
9385 if test -n "$cf_compress" ; then
9386 cat >>$cf_edit_man <<CF_EOF
9387         if test \$verb = installing ; then
9388         if ( $cf_compress -f \$TMP )
9389         then
9390                 mv \$TMP.$cf_so_strip \$TMP
9391         fi
9392         fi
9393         cf_target="\$cf_target.$cf_so_strip"
9394 CF_EOF
9395 fi
9396
9397 case "$MANPAGE_FORMAT" in #(vi
9398 *BSDI*)
9399 cat >>$cf_edit_man <<CF_EOF
9400         if test \$form = format ; then
9401                 # BSDI installs only .0 suffixes in the cat directories
9402                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9403         fi
9404 CF_EOF
9405   ;;
9406 esac
9407
9408 cat >>$cf_edit_man <<CF_EOF
9409         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9410         if test \$verb = installing ; then
9411                 echo \$verb \$cf_target
9412                 \$INSTALL_DATA \$TMP \$cf_target
9413                 test -d \$cf_subdir\${section} &&
9414                 test -n "\$aliases" && (
9415                         cd \$cf_subdir\${section} && (
9416                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9417                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9418                                 cf_target=\`basename \$cf_target\`
9419                                 for cf_alias in \$aliases
9420                                 do
9421                                         if test \$section = 1 ; then
9422                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9423                                         fi
9424
9425                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9426                                                 if test -f \$cf_alias\${suffix} ; then
9427                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9428                                                         then
9429                                                                 continue
9430                                                         fi
9431                                                 fi
9432                                                 echo .. \$verb alias \$cf_alias\${suffix}
9433                                                 rm -f \$cf_alias\${suffix}
9434                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9435                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9436                                                 echo ".so \$cf_source" >\$TMP
9437 CF_EOF
9438 if test -n "$cf_compress" ; then
9439 cat >>$cf_edit_man <<CF_EOF
9440                                                 if test -n "$cf_so_strip" ; then
9441                                                         $cf_compress -f \$TMP
9442                                                         mv \$TMP.$cf_so_strip \$TMP
9443                                                 fi
9444 CF_EOF
9445 fi
9446 cat >>$cf_edit_man <<CF_EOF
9447                                                 echo .. \$verb alias \$cf_alias\${suffix}
9448                                                 rm -f \$cf_alias\${suffix}
9449                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9450                                         fi
9451                                 done
9452                         )
9453                 )
9454         elif test \$verb = removing ; then
9455                 test -f \$cf_target && (
9456                         echo \$verb \$cf_target
9457                         rm -f \$cf_target
9458                 )
9459                 test -d \$cf_subdir\${section} &&
9460                 test -n "\$aliases" && (
9461                         cd \$cf_subdir\${section} && (
9462                                 for cf_alias in \$aliases
9463                                 do
9464                                         if test \$section = 1 ; then
9465                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9466                                         fi
9467
9468                                         echo .. \$verb alias \$cf_alias\${suffix}
9469                                         rm -f \$cf_alias\${suffix}
9470                                 done
9471                         )
9472                 )
9473         else
9474 #               echo ".hy 0"
9475                 cat \$TMP
9476         fi
9477         ;;
9478 esac
9479 done
9480
9481 if test $cf_inboth = yes ; then
9482 if test \$form != format ; then
9483         sh \$0 format \$verb \$mandir \$srcdir \$*
9484 fi
9485 fi
9486
9487 exit 0
9488 CF_EOF
9489 chmod 755 $cf_edit_man
9490
9491 ###############################################################################
9492
9493 ### Note that some functions (such as const) are normally disabled anyway.
9494 echo "$as_me:9494: checking if you want to build with function extensions" >&5
9495 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9496
9497 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9498 if test "${enable_ext_funcs+set}" = set; then
9499   enableval="$enable_ext_funcs"
9500   with_ext_funcs=$enableval
9501 else
9502   with_ext_funcs=yes
9503 fi;
9504 echo "$as_me:9504: result: $with_ext_funcs" >&5
9505 echo "${ECHO_T}$with_ext_funcs" >&6
9506 if test "$with_ext_funcs" = yes ; then
9507         NCURSES_EXT_FUNCS=1
9508         cat >>confdefs.h <<\EOF
9509 #define HAVE_CURSES_VERSION 1
9510 EOF
9511
9512         cat >>confdefs.h <<\EOF
9513 #define HAVE_HAS_KEY 1
9514 EOF
9515
9516         cat >>confdefs.h <<\EOF
9517 #define HAVE_RESIZETERM 1
9518 EOF
9519
9520         cat >>confdefs.h <<\EOF
9521 #define HAVE_RESIZE_TERM 1
9522 EOF
9523
9524         cat >>confdefs.h <<\EOF
9525 #define HAVE_USE_DEFAULT_COLORS 1
9526 EOF
9527
9528         cat >>confdefs.h <<\EOF
9529 #define HAVE_WRESIZE 1
9530 EOF
9531
9532         cat >>confdefs.h <<\EOF
9533 #define NCURSES_EXT_FUNCS 1
9534 EOF
9535
9536         GENERATED_EXT_FUNCS=generated
9537 else
9538         NCURSES_EXT_FUNCS=0
9539         GENERATED_EXT_FUNCS=
9540 fi
9541
9542 echo "$as_me:9542: checking if you want to build with experimental SCREEN extensions" >&5
9543 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9544
9545 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9546 if test "${enable_sp_funcs+set}" = set; then
9547   enableval="$enable_sp_funcs"
9548   with_sp_funcs=$enableval
9549 else
9550   with_sp_funcs=no
9551 fi;
9552 echo "$as_me:9552: result: $with_sp_funcs" >&5
9553 echo "${ECHO_T}$with_sp_funcs" >&6
9554 if test "$with_sp_funcs" = yes ; then
9555         NCURSES_SP_FUNCS=1
9556         cat >>confdefs.h <<\EOF
9557 #define NCURSES_SP_FUNCS 1
9558 EOF
9559
9560         GENERATED_SP_FUNCS=generated
9561 else
9562         NCURSES_SP_FUNCS=0
9563         GENERATED_SP_FUNCS=
9564 fi
9565
9566 echo "$as_me:9566: checking if you want to build with experimental terminal-driver" >&5
9567 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9568
9569 # Check whether --enable-term-driver or --disable-term-driver was given.
9570 if test "${enable_term_driver+set}" = set; then
9571   enableval="$enable_term_driver"
9572   with_term_driver=$enableval
9573 else
9574   with_term_driver=no
9575 fi;
9576 echo "$as_me:9576: result: $with_term_driver" >&5
9577 echo "${ECHO_T}$with_term_driver" >&6
9578 if test "$with_term_driver" = yes ; then
9579         cat >>confdefs.h <<\EOF
9580 #define USE_TERM_DRIVER 1
9581 EOF
9582
9583         if test "$with_sp_funcs" != yes ; then
9584                 { { echo "$as_me:9584: error: The term-driver option relies upon sp-funcs" >&5
9585 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9586    { (exit 1); exit 1; }; }
9587         fi
9588 fi
9589
9590 ###   use option --enable-const to turn on use of const beyond that in XSI.
9591 echo "$as_me:9591: checking for extended use of const keyword" >&5
9592 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9593
9594 # Check whether --enable-const or --disable-const was given.
9595 if test "${enable_const+set}" = set; then
9596   enableval="$enable_const"
9597   with_ext_const=$enableval
9598 else
9599   with_ext_const=no
9600 fi;
9601 echo "$as_me:9601: result: $with_ext_const" >&5
9602 echo "${ECHO_T}$with_ext_const" >&6
9603 NCURSES_CONST='/*nothing*/'
9604 if test "$with_ext_const" = yes ; then
9605         NCURSES_CONST=const
9606 fi
9607
9608 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9609 echo "$as_me:9609: checking if you want to use extended colors" >&5
9610 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9611
9612 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9613 if test "${enable_ext_colors+set}" = set; then
9614   enableval="$enable_ext_colors"
9615   with_ext_colors=$enableval
9616 else
9617   with_ext_colors=no
9618 fi;
9619 echo "$as_me:9619: result: $with_ext_colors" >&5
9620 echo "${ECHO_T}$with_ext_colors" >&6
9621 NCURSES_EXT_COLORS=0
9622 if test "$with_ext_colors" = yes ; then
9623         if test "$with_widec" != yes ; then
9624                 { { echo "$as_me:9624: error: This option applies only to wide-character library" >&5
9625 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9626    { (exit 1); exit 1; }; }
9627         else
9628                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9629
9630 if test "${with_abi_version+set}" != set; then
9631         case $cf_cv_rel_version in
9632         5.*)
9633                 cf_cv_rel_version=6.0
9634                 cf_cv_abi_version=6
9635                 { echo "$as_me:9635: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9636 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9637                 ;;
9638         esac
9639 fi
9640
9641         fi
9642         NCURSES_EXT_COLORS=1
9643         cat >>confdefs.h <<\EOF
9644 #define NCURSES_EXT_COLORS 1
9645 EOF
9646
9647 fi
9648
9649 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9650 echo "$as_me:9650: checking if you want to use extended mouse encoding" >&5
9651 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9652
9653 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9654 if test "${enable_ext_mouse+set}" = set; then
9655   enableval="$enable_ext_mouse"
9656   with_ext_mouse=$enableval
9657 else
9658   with_ext_mouse=no
9659 fi;
9660 echo "$as_me:9660: result: $with_ext_mouse" >&5
9661 echo "${ECHO_T}$with_ext_mouse" >&6
9662 NCURSES_MOUSE_VERSION=1
9663 if test "$with_ext_mouse" = yes ; then
9664         NCURSES_MOUSE_VERSION=2
9665
9666 if test "${with_abi_version+set}" != set; then
9667         case $cf_cv_rel_version in
9668         5.*)
9669                 cf_cv_rel_version=6.0
9670                 cf_cv_abi_version=6
9671                 { echo "$as_me:9671: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9672 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9673                 ;;
9674         esac
9675 fi
9676
9677 fi
9678
9679 echo "$as_me:9679: checking if you want \$NCURSES_NO_PADDING code" >&5
9680 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9681
9682 # Check whether --enable-no-padding or --disable-no-padding was given.
9683 if test "${enable_no_padding+set}" = set; then
9684   enableval="$enable_no_padding"
9685   with_no_padding=$enableval
9686 else
9687   with_no_padding=$with_ext_funcs
9688 fi;
9689 echo "$as_me:9689: result: $with_no_padding" >&5
9690 echo "${ECHO_T}$with_no_padding" >&6
9691 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9692 #define NCURSES_NO_PADDING 1
9693 EOF
9694
9695 echo "$as_me:9695: checking for ANSI C header files" >&5
9696 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9697 if test "${ac_cv_header_stdc+set}" = set; then
9698   echo $ECHO_N "(cached) $ECHO_C" >&6
9699 else
9700   cat >conftest.$ac_ext <<_ACEOF
9701 #line 9701 "configure"
9702 #include "confdefs.h"
9703 #include <stdlib.h>
9704 #include <stdarg.h>
9705 #include <string.h>
9706 #include <float.h>
9707
9708 _ACEOF
9709 if { (eval echo "$as_me:9709: \"$ac_cpp conftest.$ac_ext\"") >&5
9710   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9711   ac_status=$?
9712   egrep -v '^ *\+' conftest.er1 >conftest.err
9713   rm -f conftest.er1
9714   cat conftest.err >&5
9715   echo "$as_me:9715: \$? = $ac_status" >&5
9716   (exit $ac_status); } >/dev/null; then
9717   if test -s conftest.err; then
9718     ac_cpp_err=$ac_c_preproc_warn_flag
9719   else
9720     ac_cpp_err=
9721   fi
9722 else
9723   ac_cpp_err=yes
9724 fi
9725 if test -z "$ac_cpp_err"; then
9726   ac_cv_header_stdc=yes
9727 else
9728   echo "$as_me: failed program was:" >&5
9729   cat conftest.$ac_ext >&5
9730   ac_cv_header_stdc=no
9731 fi
9732 rm -f conftest.err conftest.$ac_ext
9733
9734 if test $ac_cv_header_stdc = yes; then
9735   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9736   cat >conftest.$ac_ext <<_ACEOF
9737 #line 9737 "configure"
9738 #include "confdefs.h"
9739 #include <string.h>
9740
9741 _ACEOF
9742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9743   egrep "memchr" >/dev/null 2>&1; then
9744   :
9745 else
9746   ac_cv_header_stdc=no
9747 fi
9748 rm -f conftest*
9749
9750 fi
9751
9752 if test $ac_cv_header_stdc = yes; then
9753   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9754   cat >conftest.$ac_ext <<_ACEOF
9755 #line 9755 "configure"
9756 #include "confdefs.h"
9757 #include <stdlib.h>
9758
9759 _ACEOF
9760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9761   egrep "free" >/dev/null 2>&1; then
9762   :
9763 else
9764   ac_cv_header_stdc=no
9765 fi
9766 rm -f conftest*
9767
9768 fi
9769
9770 if test $ac_cv_header_stdc = yes; then
9771   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9772   if test "$cross_compiling" = yes; then
9773   :
9774 else
9775   cat >conftest.$ac_ext <<_ACEOF
9776 #line 9776 "configure"
9777 #include "confdefs.h"
9778 #include <ctype.h>
9779 #if ((' ' & 0x0FF) == 0x020)
9780 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9781 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9782 #else
9783 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9784                      || ('j' <= (c) && (c) <= 'r') \
9785                      || ('s' <= (c) && (c) <= 'z'))
9786 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9787 #endif
9788
9789 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9790 int
9791 main ()
9792 {
9793   int i;
9794   for (i = 0; i < 256; i++)
9795     if (XOR (islower (i), ISLOWER (i))
9796         || toupper (i) != TOUPPER (i))
9797       $ac_main_return(2);
9798   $ac_main_return (0);
9799 }
9800 _ACEOF
9801 rm -f conftest$ac_exeext
9802 if { (eval echo "$as_me:9802: \"$ac_link\"") >&5
9803   (eval $ac_link) 2>&5
9804   ac_status=$?
9805   echo "$as_me:9805: \$? = $ac_status" >&5
9806   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9807   { (eval echo "$as_me:9807: \"$ac_try\"") >&5
9808   (eval $ac_try) 2>&5
9809   ac_status=$?
9810   echo "$as_me:9810: \$? = $ac_status" >&5
9811   (exit $ac_status); }; }; then
9812   :
9813 else
9814   echo "$as_me: program exited with status $ac_status" >&5
9815 echo "$as_me: failed program was:" >&5
9816 cat conftest.$ac_ext >&5
9817 ac_cv_header_stdc=no
9818 fi
9819 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9820 fi
9821 fi
9822 fi
9823 echo "$as_me:9823: result: $ac_cv_header_stdc" >&5
9824 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9825 if test $ac_cv_header_stdc = yes; then
9826
9827 cat >>confdefs.h <<\EOF
9828 #define STDC_HEADERS 1
9829 EOF
9830
9831 fi
9832
9833 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9834
9835 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9836                   inttypes.h stdint.h unistd.h
9837 do
9838 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9839 echo "$as_me:9839: checking for $ac_header" >&5
9840 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9842   echo $ECHO_N "(cached) $ECHO_C" >&6
9843 else
9844   cat >conftest.$ac_ext <<_ACEOF
9845 #line 9845 "configure"
9846 #include "confdefs.h"
9847 $ac_includes_default
9848 #include <$ac_header>
9849 _ACEOF
9850 rm -f conftest.$ac_objext
9851 if { (eval echo "$as_me:9851: \"$ac_compile\"") >&5
9852   (eval $ac_compile) 2>&5
9853   ac_status=$?
9854   echo "$as_me:9854: \$? = $ac_status" >&5
9855   (exit $ac_status); } &&
9856          { ac_try='test -s conftest.$ac_objext'
9857   { (eval echo "$as_me:9857: \"$ac_try\"") >&5
9858   (eval $ac_try) 2>&5
9859   ac_status=$?
9860   echo "$as_me:9860: \$? = $ac_status" >&5
9861   (exit $ac_status); }; }; then
9862   eval "$as_ac_Header=yes"
9863 else
9864   echo "$as_me: failed program was:" >&5
9865 cat conftest.$ac_ext >&5
9866 eval "$as_ac_Header=no"
9867 fi
9868 rm -f conftest.$ac_objext conftest.$ac_ext
9869 fi
9870 echo "$as_me:9870: result: `eval echo '${'$as_ac_Header'}'`" >&5
9871 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9872 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9873   cat >>confdefs.h <<EOF
9874 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9875 EOF
9876
9877 fi
9878 done
9879
9880 echo "$as_me:9880: checking for signed char" >&5
9881 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9882 if test "${ac_cv_type_signed_char+set}" = set; then
9883   echo $ECHO_N "(cached) $ECHO_C" >&6
9884 else
9885   cat >conftest.$ac_ext <<_ACEOF
9886 #line 9886 "configure"
9887 #include "confdefs.h"
9888 $ac_includes_default
9889 int
9890 main ()
9891 {
9892 if ((signed char *) 0)
9893   return 0;
9894 if (sizeof (signed char))
9895   return 0;
9896   ;
9897   return 0;
9898 }
9899 _ACEOF
9900 rm -f conftest.$ac_objext
9901 if { (eval echo "$as_me:9901: \"$ac_compile\"") >&5
9902   (eval $ac_compile) 2>&5
9903   ac_status=$?
9904   echo "$as_me:9904: \$? = $ac_status" >&5
9905   (exit $ac_status); } &&
9906          { ac_try='test -s conftest.$ac_objext'
9907   { (eval echo "$as_me:9907: \"$ac_try\"") >&5
9908   (eval $ac_try) 2>&5
9909   ac_status=$?
9910   echo "$as_me:9910: \$? = $ac_status" >&5
9911   (exit $ac_status); }; }; then
9912   ac_cv_type_signed_char=yes
9913 else
9914   echo "$as_me: failed program was:" >&5
9915 cat conftest.$ac_ext >&5
9916 ac_cv_type_signed_char=no
9917 fi
9918 rm -f conftest.$ac_objext conftest.$ac_ext
9919 fi
9920 echo "$as_me:9920: result: $ac_cv_type_signed_char" >&5
9921 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9922
9923 echo "$as_me:9923: checking size of signed char" >&5
9924 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9925 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9926   echo $ECHO_N "(cached) $ECHO_C" >&6
9927 else
9928   if test "$ac_cv_type_signed_char" = yes; then
9929   if test "$cross_compiling" = yes; then
9930   # Depending upon the size, compute the lo and hi bounds.
9931 cat >conftest.$ac_ext <<_ACEOF
9932 #line 9932 "configure"
9933 #include "confdefs.h"
9934 $ac_includes_default
9935 int
9936 main ()
9937 {
9938 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9939   ;
9940   return 0;
9941 }
9942 _ACEOF
9943 rm -f conftest.$ac_objext
9944 if { (eval echo "$as_me:9944: \"$ac_compile\"") >&5
9945   (eval $ac_compile) 2>&5
9946   ac_status=$?
9947   echo "$as_me:9947: \$? = $ac_status" >&5
9948   (exit $ac_status); } &&
9949          { ac_try='test -s conftest.$ac_objext'
9950   { (eval echo "$as_me:9950: \"$ac_try\"") >&5
9951   (eval $ac_try) 2>&5
9952   ac_status=$?
9953   echo "$as_me:9953: \$? = $ac_status" >&5
9954   (exit $ac_status); }; }; then
9955   ac_lo=0 ac_mid=0
9956   while :; do
9957     cat >conftest.$ac_ext <<_ACEOF
9958 #line 9958 "configure"
9959 #include "confdefs.h"
9960 $ac_includes_default
9961 int
9962 main ()
9963 {
9964 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9965   ;
9966   return 0;
9967 }
9968 _ACEOF
9969 rm -f conftest.$ac_objext
9970 if { (eval echo "$as_me:9970: \"$ac_compile\"") >&5
9971   (eval $ac_compile) 2>&5
9972   ac_status=$?
9973   echo "$as_me:9973: \$? = $ac_status" >&5
9974   (exit $ac_status); } &&
9975          { ac_try='test -s conftest.$ac_objext'
9976   { (eval echo "$as_me:9976: \"$ac_try\"") >&5
9977   (eval $ac_try) 2>&5
9978   ac_status=$?
9979   echo "$as_me:9979: \$? = $ac_status" >&5
9980   (exit $ac_status); }; }; then
9981   ac_hi=$ac_mid; break
9982 else
9983   echo "$as_me: failed program was:" >&5
9984 cat conftest.$ac_ext >&5
9985 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9986 fi
9987 rm -f conftest.$ac_objext conftest.$ac_ext
9988   done
9989 else
9990   echo "$as_me: failed program was:" >&5
9991 cat conftest.$ac_ext >&5
9992 ac_hi=-1 ac_mid=-1
9993   while :; do
9994     cat >conftest.$ac_ext <<_ACEOF
9995 #line 9995 "configure"
9996 #include "confdefs.h"
9997 $ac_includes_default
9998 int
9999 main ()
10000 {
10001 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10002   ;
10003   return 0;
10004 }
10005 _ACEOF
10006 rm -f conftest.$ac_objext
10007 if { (eval echo "$as_me:10007: \"$ac_compile\"") >&5
10008   (eval $ac_compile) 2>&5
10009   ac_status=$?
10010   echo "$as_me:10010: \$? = $ac_status" >&5
10011   (exit $ac_status); } &&
10012          { ac_try='test -s conftest.$ac_objext'
10013   { (eval echo "$as_me:10013: \"$ac_try\"") >&5
10014   (eval $ac_try) 2>&5
10015   ac_status=$?
10016   echo "$as_me:10016: \$? = $ac_status" >&5
10017   (exit $ac_status); }; }; then
10018   ac_lo=$ac_mid; break
10019 else
10020   echo "$as_me: failed program was:" >&5
10021 cat conftest.$ac_ext >&5
10022 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10023 fi
10024 rm -f conftest.$ac_objext conftest.$ac_ext
10025   done
10026 fi
10027 rm -f conftest.$ac_objext conftest.$ac_ext
10028 # Binary search between lo and hi bounds.
10029 while test "x$ac_lo" != "x$ac_hi"; do
10030   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10031   cat >conftest.$ac_ext <<_ACEOF
10032 #line 10032 "configure"
10033 #include "confdefs.h"
10034 $ac_includes_default
10035 int
10036 main ()
10037 {
10038 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10039   ;
10040   return 0;
10041 }
10042 _ACEOF
10043 rm -f conftest.$ac_objext
10044 if { (eval echo "$as_me:10044: \"$ac_compile\"") >&5
10045   (eval $ac_compile) 2>&5
10046   ac_status=$?
10047   echo "$as_me:10047: \$? = $ac_status" >&5
10048   (exit $ac_status); } &&
10049          { ac_try='test -s conftest.$ac_objext'
10050   { (eval echo "$as_me:10050: \"$ac_try\"") >&5
10051   (eval $ac_try) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); }; }; then
10055   ac_hi=$ac_mid
10056 else
10057   echo "$as_me: failed program was:" >&5
10058 cat conftest.$ac_ext >&5
10059 ac_lo=`expr $ac_mid + 1`
10060 fi
10061 rm -f conftest.$ac_objext conftest.$ac_ext
10062 done
10063 ac_cv_sizeof_signed_char=$ac_lo
10064 else
10065   if test "$cross_compiling" = yes; then
10066   { { echo "$as_me:10066: error: cannot run test program while cross compiling" >&5
10067 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10068    { (exit 1); exit 1; }; }
10069 else
10070   cat >conftest.$ac_ext <<_ACEOF
10071 #line 10071 "configure"
10072 #include "confdefs.h"
10073 $ac_includes_default
10074 int
10075 main ()
10076 {
10077 FILE *f = fopen ("conftest.val", "w");
10078 if (!f)
10079   $ac_main_return (1);
10080 fprintf (f, "%d", (sizeof (signed char)));
10081 fclose (f);
10082   ;
10083   return 0;
10084 }
10085 _ACEOF
10086 rm -f conftest$ac_exeext
10087 if { (eval echo "$as_me:10087: \"$ac_link\"") >&5
10088   (eval $ac_link) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10092   { (eval echo "$as_me:10092: \"$ac_try\"") >&5
10093   (eval $ac_try) 2>&5
10094   ac_status=$?
10095   echo "$as_me:10095: \$? = $ac_status" >&5
10096   (exit $ac_status); }; }; then
10097   ac_cv_sizeof_signed_char=`cat conftest.val`
10098 else
10099   echo "$as_me: program exited with status $ac_status" >&5
10100 echo "$as_me: failed program was:" >&5
10101 cat conftest.$ac_ext >&5
10102 fi
10103 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10104 fi
10105 fi
10106 rm -f conftest.val
10107 else
10108   ac_cv_sizeof_signed_char=0
10109 fi
10110 fi
10111 echo "$as_me:10111: result: $ac_cv_sizeof_signed_char" >&5
10112 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10113 cat >>confdefs.h <<EOF
10114 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10115 EOF
10116
10117 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10118         NCURSES_SBOOL="signed char"
10119 else
10120         NCURSES_SBOOL="char"
10121 fi
10122 echo "$as_me:10122: checking if you want to use signed Boolean array in term.h" >&5
10123 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10124
10125 # Check whether --enable-signed-char or --disable-signed-char was given.
10126 if test "${enable_signed_char+set}" = set; then
10127   enableval="$enable_signed_char"
10128   with_signed_char=$enableval
10129 else
10130   with_signed_char=no
10131 fi;
10132 echo "$as_me:10132: result: $with_signed_char" >&5
10133 echo "${ECHO_T}$with_signed_char" >&6
10134 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10135
10136 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10137 echo "$as_me:10137: checking if you want SIGWINCH handler" >&5
10138 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10139
10140 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10141 if test "${enable_sigwinch+set}" = set; then
10142   enableval="$enable_sigwinch"
10143   with_sigwinch=$enableval
10144 else
10145   with_sigwinch=$with_ext_funcs
10146 fi;
10147 echo "$as_me:10147: result: $with_sigwinch" >&5
10148 echo "${ECHO_T}$with_sigwinch" >&6
10149 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10150 #define USE_SIGWINCH 1
10151 EOF
10152
10153 ###   use option --enable-tcap-names to allow user to define new capabilities
10154 echo "$as_me:10154: checking if you want user-definable terminal capabilities like termcap" >&5
10155 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10156
10157 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10158 if test "${enable_tcap_names+set}" = set; then
10159   enableval="$enable_tcap_names"
10160   with_tcap_names=$enableval
10161 else
10162   with_tcap_names=$with_ext_funcs
10163 fi;
10164 echo "$as_me:10164: result: $with_tcap_names" >&5
10165 echo "${ECHO_T}$with_tcap_names" >&6
10166 NCURSES_XNAMES=0
10167 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10168
10169 ###############################################################################
10170 # These options are relatively safe to experiment with.
10171
10172 echo "$as_me:10172: checking if you want all development code" >&5
10173 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10174
10175 # Check whether --with-develop or --without-develop was given.
10176 if test "${with_develop+set}" = set; then
10177   withval="$with_develop"
10178   with_develop=$withval
10179 else
10180   with_develop=no
10181 fi;
10182 echo "$as_me:10182: result: $with_develop" >&5
10183 echo "${ECHO_T}$with_develop" >&6
10184
10185 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10186 echo "$as_me:10186: checking if you want hard-tabs code" >&5
10187 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10188
10189 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10190 if test "${enable_hard_tabs+set}" = set; then
10191   enableval="$enable_hard_tabs"
10192
10193 else
10194   enable_hard_tabs=$with_develop
10195 fi;
10196 echo "$as_me:10196: result: $enable_hard_tabs" >&5
10197 echo "${ECHO_T}$enable_hard_tabs" >&6
10198 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10199 #define USE_HARD_TABS 1
10200 EOF
10201
10202 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10203 echo "$as_me:10203: checking if you want limited support for xmc" >&5
10204 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10205
10206 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10207 if test "${enable_xmc_glitch+set}" = set; then
10208   enableval="$enable_xmc_glitch"
10209
10210 else
10211   enable_xmc_glitch=$with_develop
10212 fi;
10213 echo "$as_me:10213: result: $enable_xmc_glitch" >&5
10214 echo "${ECHO_T}$enable_xmc_glitch" >&6
10215 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10216 #define USE_XMC_SUPPORT 1
10217 EOF
10218
10219 ###############################################################################
10220 # These are just experimental, probably should not be in a package:
10221
10222 echo "$as_me:10222: checking if you do not want to assume colors are white-on-black" >&5
10223 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10224
10225 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10226 if test "${enable_assumed_color+set}" = set; then
10227   enableval="$enable_assumed_color"
10228   with_assumed_color=$enableval
10229 else
10230   with_assumed_color=yes
10231 fi;
10232 echo "$as_me:10232: result: $with_assumed_color" >&5
10233 echo "${ECHO_T}$with_assumed_color" >&6
10234 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10235 #define USE_ASSUMED_COLOR 1
10236 EOF
10237
10238 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10239 echo "$as_me:10239: checking if you want hashmap scrolling-optimization code" >&5
10240 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10241
10242 # Check whether --enable-hashmap or --disable-hashmap was given.
10243 if test "${enable_hashmap+set}" = set; then
10244   enableval="$enable_hashmap"
10245   with_hashmap=$enableval
10246 else
10247   with_hashmap=yes
10248 fi;
10249 echo "$as_me:10249: result: $with_hashmap" >&5
10250 echo "${ECHO_T}$with_hashmap" >&6
10251 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10252 #define USE_HASHMAP 1
10253 EOF
10254
10255 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10256 echo "$as_me:10256: checking if you want colorfgbg code" >&5
10257 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10258
10259 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10260 if test "${enable_colorfgbg+set}" = set; then
10261   enableval="$enable_colorfgbg"
10262   with_colorfgbg=$enableval
10263 else
10264   with_colorfgbg=no
10265 fi;
10266 echo "$as_me:10266: result: $with_colorfgbg" >&5
10267 echo "${ECHO_T}$with_colorfgbg" >&6
10268 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10269 #define USE_COLORFGBG 1
10270 EOF
10271
10272 ###   use option --enable-interop to turn on use of bindings used for interop
10273 echo "$as_me:10273: checking if you want interop bindings" >&5
10274 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10275
10276 # Check whether --enable-interop or --disable-interop was given.
10277 if test "${enable_interop+set}" = set; then
10278   enableval="$enable_interop"
10279   with_exp_interop=$enableval
10280 else
10281   with_exp_interop=no
10282 fi;
10283 echo "$as_me:10283: result: $with_exp_interop" >&5
10284 echo "${ECHO_T}$with_exp_interop" >&6
10285
10286 NCURSES_INTEROP_FUNCS=0
10287 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10288
10289 # This is still experimental (20080329), but should ultimately be moved to
10290 # the script-block --with-normal, etc.
10291
10292 echo "$as_me:10292: checking if you want to link with the pthread library" >&5
10293 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10294
10295 # Check whether --with-pthread or --without-pthread was given.
10296 if test "${with_pthread+set}" = set; then
10297   withval="$with_pthread"
10298   with_pthread=$withval
10299 else
10300   with_pthread=no
10301 fi;
10302 echo "$as_me:10302: result: $with_pthread" >&5
10303 echo "${ECHO_T}$with_pthread" >&6
10304
10305 if test "$with_pthread" != no ; then
10306     echo "$as_me:10306: checking for pthread.h" >&5
10307 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10308 if test "${ac_cv_header_pthread_h+set}" = set; then
10309   echo $ECHO_N "(cached) $ECHO_C" >&6
10310 else
10311   cat >conftest.$ac_ext <<_ACEOF
10312 #line 10312 "configure"
10313 #include "confdefs.h"
10314 #include <pthread.h>
10315 _ACEOF
10316 if { (eval echo "$as_me:10316: \"$ac_cpp conftest.$ac_ext\"") >&5
10317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10318   ac_status=$?
10319   egrep -v '^ *\+' conftest.er1 >conftest.err
10320   rm -f conftest.er1
10321   cat conftest.err >&5
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit $ac_status); } >/dev/null; then
10324   if test -s conftest.err; then
10325     ac_cpp_err=$ac_c_preproc_warn_flag
10326   else
10327     ac_cpp_err=
10328   fi
10329 else
10330   ac_cpp_err=yes
10331 fi
10332 if test -z "$ac_cpp_err"; then
10333   ac_cv_header_pthread_h=yes
10334 else
10335   echo "$as_me: failed program was:" >&5
10336   cat conftest.$ac_ext >&5
10337   ac_cv_header_pthread_h=no
10338 fi
10339 rm -f conftest.err conftest.$ac_ext
10340 fi
10341 echo "$as_me:10341: result: $ac_cv_header_pthread_h" >&5
10342 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10343 if test $ac_cv_header_pthread_h = yes; then
10344
10345         cat >>confdefs.h <<\EOF
10346 #define HAVE_PTHREADS_H 1
10347 EOF
10348
10349         echo "$as_me:10349: checking if we can link with the pthread library" >&5
10350 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10351         cf_save_LIBS="$LIBS"
10352         LIBS="-lpthread $LIBS"
10353         cat >conftest.$ac_ext <<_ACEOF
10354 #line 10354 "configure"
10355 #include "confdefs.h"
10356
10357 #include <pthread.h>
10358
10359 int
10360 main ()
10361 {
10362
10363         int rc = pthread_create(0,0,0,0);
10364
10365   ;
10366   return 0;
10367 }
10368 _ACEOF
10369 rm -f conftest.$ac_objext conftest$ac_exeext
10370 if { (eval echo "$as_me:10370: \"$ac_link\"") >&5
10371   (eval $ac_link) 2>&5
10372   ac_status=$?
10373   echo "$as_me:10373: \$? = $ac_status" >&5
10374   (exit $ac_status); } &&
10375          { ac_try='test -s conftest$ac_exeext'
10376   { (eval echo "$as_me:10376: \"$ac_try\"") >&5
10377   (eval $ac_try) 2>&5
10378   ac_status=$?
10379   echo "$as_me:10379: \$? = $ac_status" >&5
10380   (exit $ac_status); }; }; then
10381   with_pthread=yes
10382 else
10383   echo "$as_me: failed program was:" >&5
10384 cat conftest.$ac_ext >&5
10385 with_pthread=no
10386 fi
10387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10388         LIBS="$cf_save_LIBS"
10389         echo "$as_me:10389: result: $with_pthread" >&5
10390 echo "${ECHO_T}$with_pthread" >&6
10391
10392         if test "$with_pthread" = yes ; then
10393             LIBS="-lpthread $LIBS"
10394             cat >>confdefs.h <<\EOF
10395 #define HAVE_LIBPTHREADS 1
10396 EOF
10397
10398         else
10399             { { echo "$as_me:10399: error: Cannot link with pthread library" >&5
10400 echo "$as_me: error: Cannot link with pthread library" >&2;}
10401    { (exit 1); exit 1; }; }
10402         fi
10403
10404 fi
10405
10406 fi
10407
10408 echo "$as_me:10408: checking if you want to use weak-symbols for pthreads" >&5
10409 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10410
10411 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10412 if test "${enable_weak_symbols+set}" = set; then
10413   enableval="$enable_weak_symbols"
10414   use_weak_symbols=$withval
10415 else
10416   use_weak_symbols=no
10417 fi;
10418 echo "$as_me:10418: result: $use_weak_symbols" >&5
10419 echo "${ECHO_T}$use_weak_symbols" >&6
10420 if test "$use_weak_symbols" = yes ; then
10421
10422 echo "$as_me:10422: checking if $CC supports weak symbols" >&5
10423 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10424 if test "${cf_cv_weak_symbols+set}" = set; then
10425   echo $ECHO_N "(cached) $ECHO_C" >&6
10426 else
10427
10428 cat >conftest.$ac_ext <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431
10432 #include <stdio.h>
10433 int
10434 main ()
10435 {
10436
10437 #if defined(__GNUC__)
10438 #  if defined __USE_ISOC99
10439 #    define _cat_pragma(exp)    _Pragma(#exp)
10440 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10441 #  else
10442 #    define _weak_pragma(exp)
10443 #  endif
10444 #  define _declare(name)        __extension__ extern __typeof__(name) name
10445 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10446 #endif
10447
10448 weak_symbol(fopen);
10449
10450   ;
10451   return 0;
10452 }
10453 _ACEOF
10454 rm -f conftest.$ac_objext
10455 if { (eval echo "$as_me:10455: \"$ac_compile\"") >&5
10456   (eval $ac_compile) 2>&5
10457   ac_status=$?
10458   echo "$as_me:10458: \$? = $ac_status" >&5
10459   (exit $ac_status); } &&
10460          { ac_try='test -s conftest.$ac_objext'
10461   { (eval echo "$as_me:10461: \"$ac_try\"") >&5
10462   (eval $ac_try) 2>&5
10463   ac_status=$?
10464   echo "$as_me:10464: \$? = $ac_status" >&5
10465   (exit $ac_status); }; }; then
10466   cf_cv_weak_symbols=yes
10467 else
10468   echo "$as_me: failed program was:" >&5
10469 cat conftest.$ac_ext >&5
10470 cf_cv_weak_symbols=no
10471 fi
10472 rm -f conftest.$ac_objext conftest.$ac_ext
10473
10474 fi
10475 echo "$as_me:10475: result: $cf_cv_weak_symbols" >&5
10476 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10477
10478 else
10479     cf_cv_weak_symbols=no
10480 fi
10481
10482 if test $cf_cv_weak_symbols = yes ; then
10483     cat >>confdefs.h <<\EOF
10484 #define USE_WEAK_SYMBOLS 1
10485 EOF
10486
10487 fi
10488
10489 PTHREAD=
10490 if test "$with_pthread" = "yes" ; then
10491     cat >>confdefs.h <<\EOF
10492 #define USE_PTHREADS 1
10493 EOF
10494
10495     enable_reentrant=yes
10496     if test $cf_cv_weak_symbols = yes ; then
10497         PTHREAD=-lpthread
10498     fi
10499 fi
10500
10501 # Reentrant code has to be opaque; there's little advantage to making ncurses
10502 # opaque outside of that, so there is no --enable-opaque option.  We can use
10503 # this option without --with-pthreads, but this will be always set for
10504 # pthreads.
10505 echo "$as_me:10505: checking if you want experimental reentrant code" >&5
10506 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10507
10508 # Check whether --enable-reentrant or --disable-reentrant was given.
10509 if test "${enable_reentrant+set}" = set; then
10510   enableval="$enable_reentrant"
10511   with_reentrant=$enableval
10512 else
10513   with_reentrant=no
10514 fi;
10515 echo "$as_me:10515: result: $with_reentrant" >&5
10516 echo "${ECHO_T}$with_reentrant" >&6
10517 if test "$with_reentrant" = yes ; then
10518         cf_cv_enable_reentrant=1
10519         cf_cv_enable_opaque="NCURSES_INTERNALS"
10520         NCURSES_OPAQUE=1
10521         NCURSES_SIZE_T=int
10522         if test $cf_cv_weak_symbols = yes ; then
10523
10524 # remove pthread library from $LIBS
10525 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10526
10527         else
10528                 LIB_SUFFIX="t${LIB_SUFFIX}"
10529         fi
10530         cat >>confdefs.h <<\EOF
10531 #define USE_REENTRANT 1
10532 EOF
10533
10534 if test "${with_abi_version+set}" != set; then
10535         case $cf_cv_rel_version in
10536         5.*)
10537                 cf_cv_rel_version=6.0
10538                 cf_cv_abi_version=6
10539                 { echo "$as_me:10539: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10540 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10541                 ;;
10542         esac
10543 fi
10544
10545 else
10546         cf_cv_enable_reentrant=0
10547         cf_cv_enable_opaque="NCURSES_OPAQUE"
10548         NCURSES_OPAQUE=0
10549         NCURSES_SIZE_T=short
10550 fi
10551
10552 ### Allow using a different wrap-prefix
10553 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10554         echo "$as_me:10554: checking for prefix used to wrap public variables" >&5
10555 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10556
10557 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10558 if test "${with_wrap_prefix+set}" = set; then
10559   withval="$with_wrap_prefix"
10560   NCURSES_WRAP_PREFIX=$withval
10561 else
10562   NCURSES_WRAP_PREFIX=_nc_
10563 fi;
10564         echo "$as_me:10564: result: $NCURSES_WRAP_PREFIX" >&5
10565 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10566 else
10567         NCURSES_WRAP_PREFIX=_nc_
10568 fi
10569
10570 cat >>confdefs.h <<EOF
10571 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10572 EOF
10573
10574 echo "$as_me:10574: checking if you want experimental safe-sprintf code" >&5
10575 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10576
10577 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10578 if test "${enable_safe_sprintf+set}" = set; then
10579   enableval="$enable_safe_sprintf"
10580   with_safe_sprintf=$enableval
10581 else
10582   with_safe_sprintf=no
10583 fi;
10584 echo "$as_me:10584: result: $with_safe_sprintf" >&5
10585 echo "${ECHO_T}$with_safe_sprintf" >&6
10586 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10587 #define USE_SAFE_SPRINTF 1
10588 EOF
10589
10590 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10591 # when hashmap is used scroll hints are useless
10592 if test "$with_hashmap" = no ; then
10593 echo "$as_me:10593: checking if you want to experiment without scrolling-hints code" >&5
10594 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10595
10596 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10597 if test "${enable_scroll_hints+set}" = set; then
10598   enableval="$enable_scroll_hints"
10599   with_scroll_hints=$enableval
10600 else
10601   with_scroll_hints=yes
10602 fi;
10603 echo "$as_me:10603: result: $with_scroll_hints" >&5
10604 echo "${ECHO_T}$with_scroll_hints" >&6
10605 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10606 #define USE_SCROLL_HINTS 1
10607 EOF
10608
10609 fi
10610
10611 echo "$as_me:10611: checking if you want experimental wgetch-events code" >&5
10612 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10613
10614 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10615 if test "${enable_wgetch_events+set}" = set; then
10616   enableval="$enable_wgetch_events"
10617   with_wgetch_events=$enableval
10618 else
10619   with_wgetch_events=no
10620 fi;
10621 echo "$as_me:10621: result: $with_wgetch_events" >&5
10622 echo "${ECHO_T}$with_wgetch_events" >&6
10623 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10624 #define NCURSES_WGETCH_EVENTS 1
10625 EOF
10626
10627 ###############################################################################
10628
10629 ###     use option --disable-echo to suppress full display compiling commands
10630 echo "$as_me:10630: checking if you want to display full commands during build" >&5
10631 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10632
10633 # Check whether --enable-echo or --disable-echo was given.
10634 if test "${enable_echo+set}" = set; then
10635   enableval="$enable_echo"
10636   with_echo=$enableval
10637 else
10638   with_echo=yes
10639 fi;
10640 if test "$with_echo" = yes; then
10641         ECHO_LINK=
10642 else
10643         ECHO_LINK='@ echo linking $@ ... ;'
10644         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10645         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10646 fi
10647 echo "$as_me:10647: result: $with_echo" >&5
10648 echo "${ECHO_T}$with_echo" >&6
10649
10650 ###     use option --enable-warnings to turn on all gcc warnings
10651 echo "$as_me:10651: checking if you want to see compiler warnings" >&5
10652 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10653
10654 # Check whether --enable-warnings or --disable-warnings was given.
10655 if test "${enable_warnings+set}" = set; then
10656   enableval="$enable_warnings"
10657   with_warnings=$enableval
10658 fi;
10659 echo "$as_me:10659: result: $with_warnings" >&5
10660 echo "${ECHO_T}$with_warnings" >&6
10661
10662 if test "x$with_warnings" = "xyes"; then
10663         ADAFLAGS="$ADAFLAGS -gnatg"
10664
10665 INTEL_COMPILER=no
10666
10667 if test "$GCC" = yes ; then
10668         case $host_os in
10669         linux*|gnu*)
10670                 echo "$as_me:10670: checking if this is really Intel C compiler" >&5
10671 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10672                 cf_save_CFLAGS="$CFLAGS"
10673                 CFLAGS="$CFLAGS -no-gcc"
10674                 cat >conftest.$ac_ext <<_ACEOF
10675 #line 10675 "configure"
10676 #include "confdefs.h"
10677
10678 int
10679 main ()
10680 {
10681
10682 #ifdef __INTEL_COMPILER
10683 #else
10684 make an error
10685 #endif
10686
10687   ;
10688   return 0;
10689 }
10690 _ACEOF
10691 rm -f conftest.$ac_objext
10692 if { (eval echo "$as_me:10692: \"$ac_compile\"") >&5
10693   (eval $ac_compile) 2>&5
10694   ac_status=$?
10695   echo "$as_me:10695: \$? = $ac_status" >&5
10696   (exit $ac_status); } &&
10697          { ac_try='test -s conftest.$ac_objext'
10698   { (eval echo "$as_me:10698: \"$ac_try\"") >&5
10699   (eval $ac_try) 2>&5
10700   ac_status=$?
10701   echo "$as_me:10701: \$? = $ac_status" >&5
10702   (exit $ac_status); }; }; then
10703   INTEL_COMPILER=yes
10704 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10705
10706 else
10707   echo "$as_me: failed program was:" >&5
10708 cat conftest.$ac_ext >&5
10709 fi
10710 rm -f conftest.$ac_objext conftest.$ac_ext
10711                 CFLAGS="$cf_save_CFLAGS"
10712                 echo "$as_me:10712: result: $INTEL_COMPILER" >&5
10713 echo "${ECHO_T}$INTEL_COMPILER" >&6
10714                 ;;
10715         esac
10716 fi
10717
10718 cat > conftest.$ac_ext <<EOF
10719 #line 10719 "${as_me-configure}"
10720 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10721 EOF
10722
10723 if test "$INTEL_COMPILER" = yes
10724 then
10725 # The "-wdXXX" options suppress warnings:
10726 # remark #1419: external declaration in primary source file
10727 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10728 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10729 # remark #193: zero used for undefined preprocessing identifier
10730 # remark #593: variable "curs_sb_left_arrow" was set but never used
10731 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10732 # remark #869: parameter "tw" was never referenced
10733 # remark #981: operands are evaluated in unspecified order
10734 # warning #279: controlling expression is constant
10735
10736         { echo "$as_me:10736: checking for $CC warning options..." >&5
10737 echo "$as_me: checking for $CC warning options..." >&6;}
10738         cf_save_CFLAGS="$CFLAGS"
10739         EXTRA_CFLAGS="-Wall"
10740         for cf_opt in \
10741                 wd1419 \
10742                 wd1683 \
10743                 wd1684 \
10744                 wd193 \
10745                 wd593 \
10746                 wd279 \
10747                 wd810 \
10748                 wd869 \
10749                 wd981
10750         do
10751                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10752                 if { (eval echo "$as_me:10752: \"$ac_compile\"") >&5
10753   (eval $ac_compile) 2>&5
10754   ac_status=$?
10755   echo "$as_me:10755: \$? = $ac_status" >&5
10756   (exit $ac_status); }; then
10757                         test -n "$verbose" && echo "$as_me:10757: result: ... -$cf_opt" >&5
10758 echo "${ECHO_T}... -$cf_opt" >&6
10759                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10760                 fi
10761         done
10762         CFLAGS="$cf_save_CFLAGS"
10763
10764 elif test "$GCC" = yes
10765 then
10766         { echo "$as_me:10766: checking for $CC warning options..." >&5
10767 echo "$as_me: checking for $CC warning options..." >&6;}
10768         cf_save_CFLAGS="$CFLAGS"
10769         EXTRA_CFLAGS="-W -Wall"
10770         cf_warn_CONST=""
10771         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10772         for cf_opt in \
10773                 Wbad-function-cast \
10774                 Wcast-align \
10775                 Wcast-qual \
10776                 Winline \
10777                 Wmissing-declarations \
10778                 Wmissing-prototypes \
10779                 Wnested-externs \
10780                 Wpointer-arith \
10781                 Wshadow \
10782                 Wstrict-prototypes \
10783                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10784         do
10785                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10786                 if { (eval echo "$as_me:10786: \"$ac_compile\"") >&5
10787   (eval $ac_compile) 2>&5
10788   ac_status=$?
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit $ac_status); }; then
10791                         test -n "$verbose" && echo "$as_me:10791: result: ... -$cf_opt" >&5
10792 echo "${ECHO_T}... -$cf_opt" >&6
10793                         case $cf_opt in #(vi
10794                         Wcast-qual) #(vi
10795                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10796                                 ;;
10797                         Winline) #(vi
10798                                 case $GCC_VERSION in
10799                                 [34].*)
10800                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10801
10802 echo "${as_me-configure}:10802: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10803
10804                                         continue;;
10805                                 esac
10806                                 ;;
10807                         esac
10808                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10809                 fi
10810         done
10811         CFLAGS="$cf_save_CFLAGS"
10812 fi
10813 rm -f conftest*
10814
10815         if test "$cf_with_cxx" = yes ; then
10816
10817 INTEL_CPLUSPLUS=no
10818
10819 if test "$GCC" = yes ; then
10820         case $host_os in
10821         linux*|gnu*)
10822                 echo "$as_me:10822: checking if this is really Intel C++ compiler" >&5
10823 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10824                 cf_save_CFLAGS="$CXXFLAGS"
10825                 CXXFLAGS="$CXXFLAGS -no-gcc"
10826                 cat >conftest.$ac_ext <<_ACEOF
10827 #line 10827 "configure"
10828 #include "confdefs.h"
10829
10830 int
10831 main ()
10832 {
10833
10834 #ifdef __INTEL_COMPILER
10835 #else
10836 make an error
10837 #endif
10838
10839   ;
10840   return 0;
10841 }
10842 _ACEOF
10843 rm -f conftest.$ac_objext
10844 if { (eval echo "$as_me:10844: \"$ac_compile\"") >&5
10845   (eval $ac_compile) 2>&5
10846   ac_status=$?
10847   echo "$as_me:10847: \$? = $ac_status" >&5
10848   (exit $ac_status); } &&
10849          { ac_try='test -s conftest.$ac_objext'
10850   { (eval echo "$as_me:10850: \"$ac_try\"") >&5
10851   (eval $ac_try) 2>&5
10852   ac_status=$?
10853   echo "$as_me:10853: \$? = $ac_status" >&5
10854   (exit $ac_status); }; }; then
10855   INTEL_CPLUSPLUS=yes
10856 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10857
10858 else
10859   echo "$as_me: failed program was:" >&5
10860 cat conftest.$ac_ext >&5
10861 fi
10862 rm -f conftest.$ac_objext conftest.$ac_ext
10863                 CXXFLAGS="$cf_save_CFLAGS"
10864                 echo "$as_me:10864: result: $INTEL_CPLUSPLUS" >&5
10865 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10866                 ;;
10867         esac
10868 fi
10869
10870 ac_ext=cc
10871 ac_cpp='$CXXCPP $CPPFLAGS'
10872 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10873 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10874 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10875 ac_main_return=return
10876
10877 cat > conftest.$ac_ext <<EOF
10878 #line 10878 "configure"
10879 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10880 EOF
10881
10882 if test "$INTEL_CPLUSPLUS" = yes
10883 then
10884 # The "-wdXXX" options suppress warnings:
10885 # remark #1419: external declaration in primary source file
10886 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10887 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10888 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10889 # remark #193: zero used for undefined preprocessing identifier
10890 # remark #593: variable "curs_sb_left_arrow" was set but never used
10891 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10892 # remark #869: parameter "tw" was never referenced
10893 # remark #981: operands are evaluated in unspecified order
10894 # warning #269: invalid format string conversion
10895
10896         { echo "$as_me:10896: checking for $CC warning options..." >&5
10897 echo "$as_me: checking for $CC warning options..." >&6;}
10898         cf_save_CXXFLAGS="$CXXFLAGS"
10899         EXTRA_CXXFLAGS="-Wall"
10900         for cf_opt in \
10901                 wd1419 \
10902                 wd1682 \
10903                 wd1683 \
10904                 wd1684 \
10905                 wd193 \
10906                 wd279 \
10907                 wd593 \
10908                 wd810 \
10909                 wd869 \
10910                 wd981
10911         do
10912                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10913                 if { (eval echo "$as_me:10913: \"$ac_compile\"") >&5
10914   (eval $ac_compile) 2>&5
10915   ac_status=$?
10916   echo "$as_me:10916: \$? = $ac_status" >&5
10917   (exit $ac_status); }; then
10918                         test -n "$verbose" && echo "$as_me:10918: result: ... -$cf_opt" >&5
10919 echo "${ECHO_T}... -$cf_opt" >&6
10920                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10921                 fi
10922         done
10923         CXXFLAGS="$cf_save_CXXFLAGS"
10924
10925 elif test "$GXX" = yes
10926 then
10927         { echo "$as_me:10927: checking for $CXX warning options..." >&5
10928 echo "$as_me: checking for $CXX warning options..." >&6;}
10929         cf_save_CXXFLAGS="$CXXFLAGS"
10930         EXTRA_CXXFLAGS="-W -Wall"
10931         cf_gxx_extra_warnings=""
10932         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10933         case "$GCC_VERSION" in
10934         [1-2].*)
10935                 ;;
10936         *)
10937                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10938                 ;;
10939         esac
10940         for cf_opt in \
10941                 Wabi \
10942                 fabi-version=0 \
10943                 Woverloaded-virtual \
10944                 Wsign-promo \
10945                 Wsynth \
10946                 Wold-style-cast \
10947                 Wcast-align \
10948                 Wcast-qual \
10949                 Wmissing-prototypes \
10950                 Wpointer-arith \
10951                 Wshadow \
10952                 Wstrict-prototypes \
10953                 Wundef $cf_gxx_extra_warnings Wno-unused
10954         do
10955                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10956                 if { (eval echo "$as_me:10956: \"$ac_compile\"") >&5
10957   (eval $ac_compile) 2>&5
10958   ac_status=$?
10959   echo "$as_me:10959: \$? = $ac_status" >&5
10960   (exit $ac_status); }; then
10961                         test -n "$verbose" && echo "$as_me:10961: result: ... -$cf_opt" >&5
10962 echo "${ECHO_T}... -$cf_opt" >&6
10963                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10964                 else
10965                         test -n "$verbose" && echo "$as_me:10965: result: ... no -$cf_opt" >&5
10966 echo "${ECHO_T}... no -$cf_opt" >&6
10967                 fi
10968         done
10969         CXXFLAGS="$cf_save_CXXFLAGS"
10970 fi
10971
10972 rm -f conftest*
10973 ac_ext=c
10974 ac_cpp='$CPP $CPPFLAGS'
10975 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10976 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10978 ac_main_return=return
10979
10980         fi
10981 fi
10982
10983 if test "$GCC" = yes
10984 then
10985 cat > conftest.i <<EOF
10986 #ifndef GCC_PRINTF
10987 #define GCC_PRINTF 0
10988 #endif
10989 #ifndef GCC_SCANF
10990 #define GCC_SCANF 0
10991 #endif
10992 #ifndef GCC_NORETURN
10993 #define GCC_NORETURN /* nothing */
10994 #endif
10995 #ifndef GCC_UNUSED
10996 #define GCC_UNUSED /* nothing */
10997 #endif
10998 EOF
10999 if test "$GCC" = yes
11000 then
11001         { echo "$as_me:11001: checking for $CC __attribute__ directives..." >&5
11002 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11003 cat > conftest.$ac_ext <<EOF
11004 #line 11004 "${as_me-configure}"
11005 #include "confdefs.h"
11006 #include "conftest.h"
11007 #include "conftest.i"
11008 #if     GCC_PRINTF
11009 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11010 #else
11011 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11012 #endif
11013 #if     GCC_SCANF
11014 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11015 #else
11016 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11017 #endif
11018 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11019 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11020 extern void foo(void) GCC_NORETURN;
11021 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11022 EOF
11023         cf_printf_attribute=no
11024         cf_scanf_attribute=no
11025         for cf_attribute in scanf printf unused noreturn
11026         do
11027
11028 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11029
11030                 cf_directive="__attribute__(($cf_attribute))"
11031                 echo "checking for $CC $cf_directive" 1>&5
11032
11033                 case $cf_attribute in #(vi
11034                 printf) #(vi
11035                         cf_printf_attribute=yes
11036                         cat >conftest.h <<EOF
11037 #define GCC_$cf_ATTRIBUTE 1
11038 EOF
11039                         ;;
11040                 scanf) #(vi
11041                         cf_scanf_attribute=yes
11042                         cat >conftest.h <<EOF
11043 #define GCC_$cf_ATTRIBUTE 1
11044 EOF
11045                         ;;
11046                 *) #(vi
11047                         cat >conftest.h <<EOF
11048 #define GCC_$cf_ATTRIBUTE $cf_directive
11049 EOF
11050                         ;;
11051                 esac
11052
11053                 if { (eval echo "$as_me:11053: \"$ac_compile\"") >&5
11054   (eval $ac_compile) 2>&5
11055   ac_status=$?
11056   echo "$as_me:11056: \$? = $ac_status" >&5
11057   (exit $ac_status); }; then
11058                         test -n "$verbose" && echo "$as_me:11058: result: ... $cf_attribute" >&5
11059 echo "${ECHO_T}... $cf_attribute" >&6
11060                         cat conftest.h >>confdefs.h
11061                         case $cf_attribute in #(vi
11062                         printf) #(vi
11063                                 if test "$cf_printf_attribute" = no ; then
11064                                         cat >>confdefs.h <<EOF
11065 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11066 EOF
11067                                 else
11068                                         cat >>confdefs.h <<EOF
11069 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11070 EOF
11071                                 fi
11072                                 ;;
11073                         scanf) #(vi
11074                                 if test "$cf_scanf_attribute" = no ; then
11075                                         cat >>confdefs.h <<EOF
11076 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11077 EOF
11078                                 else
11079                                         cat >>confdefs.h <<EOF
11080 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11081 EOF
11082                                 fi
11083                                 ;;
11084                         esac
11085                 fi
11086         done
11087 else
11088         fgrep define conftest.i >>confdefs.h
11089 fi
11090 rm -rf conftest*
11091 fi
11092
11093 ###     use option --enable-assertions to turn on generation of assertion code
11094 echo "$as_me:11094: checking if you want to enable runtime assertions" >&5
11095 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11096
11097 # Check whether --enable-assertions or --disable-assertions was given.
11098 if test "${enable_assertions+set}" = set; then
11099   enableval="$enable_assertions"
11100   with_assertions=$enableval
11101 else
11102   with_assertions=no
11103 fi;
11104 echo "$as_me:11104: result: $with_assertions" >&5
11105 echo "${ECHO_T}$with_assertions" >&6
11106 if test -n "$GCC"
11107 then
11108         if test "$with_assertions" = no
11109         then
11110                 cat >>confdefs.h <<\EOF
11111 #define NDEBUG 1
11112 EOF
11113
11114                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11115         else
11116                 ADAFLAGS="$ADAFLAGS -gnata"
11117         fi
11118 fi
11119
11120 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11121
11122 echo "$as_me:11122: checking if you want to use dmalloc for testing" >&5
11123 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11124
11125 # Check whether --with-dmalloc or --without-dmalloc was given.
11126 if test "${with_dmalloc+set}" = set; then
11127   withval="$with_dmalloc"
11128   cat >>confdefs.h <<\EOF
11129 #define USE_DMALLOC 1
11130 EOF
11131
11132         : ${with_cflags:=-g}
11133         : ${with_no_leaks:=yes}
11134          with_dmalloc=yes
11135 else
11136   with_dmalloc=
11137 fi;
11138 echo "$as_me:11138: result: ${with_dmalloc:-no}" >&5
11139 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11140
11141 case .$with_cflags in #(vi
11142 .*-g*)
11143         case .$CFLAGS in #(vi
11144         .*-g*) #(vi
11145                 ;;
11146         *)
11147
11148 cf_fix_cppflags=no
11149 cf_new_cflags=
11150 cf_new_cppflags=
11151 cf_new_extra_cppflags=
11152
11153 for cf_add_cflags in -g
11154 do
11155 case $cf_fix_cppflags in
11156 no)
11157         case $cf_add_cflags in #(vi
11158         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11159                 case $cf_add_cflags in
11160                 -D*)
11161                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11162
11163                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11164                                 && test -z "${cf_tst_cflags}" \
11165                                 && cf_fix_cppflags=yes
11166
11167                         if test $cf_fix_cppflags = yes ; then
11168                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11169                                 continue
11170                         elif test "${cf_tst_cflags}" = "\"'" ; then
11171                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11172                                 continue
11173                         fi
11174                         ;;
11175                 esac
11176                 case "$CPPFLAGS" in
11177                 *$cf_add_cflags) #(vi
11178                         ;;
11179                 *) #(vi
11180                         case $cf_add_cflags in #(vi
11181                         -D*)
11182                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11183
11184 CPPFLAGS=`echo "$CPPFLAGS" | \
11185         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11186                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11187
11188                                 ;;
11189                         esac
11190                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11191                         ;;
11192                 esac
11193                 ;;
11194         *)
11195                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11196                 ;;
11197         esac
11198         ;;
11199 yes)
11200         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11201
11202         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11203
11204         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11205                 && test -z "${cf_tst_cflags}" \
11206                 && cf_fix_cppflags=no
11207         ;;
11208 esac
11209 done
11210
11211 if test -n "$cf_new_cflags" ; then
11212
11213         CFLAGS="$CFLAGS $cf_new_cflags"
11214 fi
11215
11216 if test -n "$cf_new_cppflags" ; then
11217
11218         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11219 fi
11220
11221 if test -n "$cf_new_extra_cppflags" ; then
11222
11223         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11224 fi
11225
11226                 ;;
11227         esac
11228         ;;
11229 esac
11230
11231 if test "$with_dmalloc" = yes ; then
11232         echo "$as_me:11232: checking for dmalloc.h" >&5
11233 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11234 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11235   echo $ECHO_N "(cached) $ECHO_C" >&6
11236 else
11237   cat >conftest.$ac_ext <<_ACEOF
11238 #line 11238 "configure"
11239 #include "confdefs.h"
11240 #include <dmalloc.h>
11241 _ACEOF
11242 if { (eval echo "$as_me:11242: \"$ac_cpp conftest.$ac_ext\"") >&5
11243   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11244   ac_status=$?
11245   egrep -v '^ *\+' conftest.er1 >conftest.err
11246   rm -f conftest.er1
11247   cat conftest.err >&5
11248   echo "$as_me:11248: \$? = $ac_status" >&5
11249   (exit $ac_status); } >/dev/null; then
11250   if test -s conftest.err; then
11251     ac_cpp_err=$ac_c_preproc_warn_flag
11252   else
11253     ac_cpp_err=
11254   fi
11255 else
11256   ac_cpp_err=yes
11257 fi
11258 if test -z "$ac_cpp_err"; then
11259   ac_cv_header_dmalloc_h=yes
11260 else
11261   echo "$as_me: failed program was:" >&5
11262   cat conftest.$ac_ext >&5
11263   ac_cv_header_dmalloc_h=no
11264 fi
11265 rm -f conftest.err conftest.$ac_ext
11266 fi
11267 echo "$as_me:11267: result: $ac_cv_header_dmalloc_h" >&5
11268 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11269 if test $ac_cv_header_dmalloc_h = yes; then
11270
11271 echo "$as_me:11271: checking for dmalloc_debug in -ldmalloc" >&5
11272 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11273 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11274   echo $ECHO_N "(cached) $ECHO_C" >&6
11275 else
11276   ac_check_lib_save_LIBS=$LIBS
11277 LIBS="-ldmalloc  $LIBS"
11278 cat >conftest.$ac_ext <<_ACEOF
11279 #line 11279 "configure"
11280 #include "confdefs.h"
11281
11282 /* Override any gcc2 internal prototype to avoid an error.  */
11283 #ifdef __cplusplus
11284 extern "C"
11285 #endif
11286 /* We use char because int might match the return type of a gcc2
11287    builtin and then its argument prototype would still apply.  */
11288 char dmalloc_debug ();
11289 int
11290 main ()
11291 {
11292 dmalloc_debug ();
11293   ;
11294   return 0;
11295 }
11296 _ACEOF
11297 rm -f conftest.$ac_objext conftest$ac_exeext
11298 if { (eval echo "$as_me:11298: \"$ac_link\"") >&5
11299   (eval $ac_link) 2>&5
11300   ac_status=$?
11301   echo "$as_me:11301: \$? = $ac_status" >&5
11302   (exit $ac_status); } &&
11303          { ac_try='test -s conftest$ac_exeext'
11304   { (eval echo "$as_me:11304: \"$ac_try\"") >&5
11305   (eval $ac_try) 2>&5
11306   ac_status=$?
11307   echo "$as_me:11307: \$? = $ac_status" >&5
11308   (exit $ac_status); }; }; then
11309   ac_cv_lib_dmalloc_dmalloc_debug=yes
11310 else
11311   echo "$as_me: failed program was:" >&5
11312 cat conftest.$ac_ext >&5
11313 ac_cv_lib_dmalloc_dmalloc_debug=no
11314 fi
11315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11316 LIBS=$ac_check_lib_save_LIBS
11317 fi
11318 echo "$as_me:11318: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11319 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11320 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11321   cat >>confdefs.h <<EOF
11322 #define HAVE_LIBDMALLOC 1
11323 EOF
11324
11325   LIBS="-ldmalloc $LIBS"
11326
11327 fi
11328
11329 fi
11330
11331 fi
11332
11333 echo "$as_me:11333: checking if you want to use dbmalloc for testing" >&5
11334 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11335
11336 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11337 if test "${with_dbmalloc+set}" = set; then
11338   withval="$with_dbmalloc"
11339   cat >>confdefs.h <<\EOF
11340 #define USE_DBMALLOC 1
11341 EOF
11342
11343         : ${with_cflags:=-g}
11344         : ${with_no_leaks:=yes}
11345          with_dbmalloc=yes
11346 else
11347   with_dbmalloc=
11348 fi;
11349 echo "$as_me:11349: result: ${with_dbmalloc:-no}" >&5
11350 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11351
11352 case .$with_cflags in #(vi
11353 .*-g*)
11354         case .$CFLAGS in #(vi
11355         .*-g*) #(vi
11356                 ;;
11357         *)
11358
11359 cf_fix_cppflags=no
11360 cf_new_cflags=
11361 cf_new_cppflags=
11362 cf_new_extra_cppflags=
11363
11364 for cf_add_cflags in -g
11365 do
11366 case $cf_fix_cppflags in
11367 no)
11368         case $cf_add_cflags in #(vi
11369         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11370                 case $cf_add_cflags in
11371                 -D*)
11372                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11373
11374                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11375                                 && test -z "${cf_tst_cflags}" \
11376                                 && cf_fix_cppflags=yes
11377
11378                         if test $cf_fix_cppflags = yes ; then
11379                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11380                                 continue
11381                         elif test "${cf_tst_cflags}" = "\"'" ; then
11382                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11383                                 continue
11384                         fi
11385                         ;;
11386                 esac
11387                 case "$CPPFLAGS" in
11388                 *$cf_add_cflags) #(vi
11389                         ;;
11390                 *) #(vi
11391                         case $cf_add_cflags in #(vi
11392                         -D*)
11393                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11394
11395 CPPFLAGS=`echo "$CPPFLAGS" | \
11396         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11397                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11398
11399                                 ;;
11400                         esac
11401                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11402                         ;;
11403                 esac
11404                 ;;
11405         *)
11406                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11407                 ;;
11408         esac
11409         ;;
11410 yes)
11411         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11412
11413         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11414
11415         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11416                 && test -z "${cf_tst_cflags}" \
11417                 && cf_fix_cppflags=no
11418         ;;
11419 esac
11420 done
11421
11422 if test -n "$cf_new_cflags" ; then
11423
11424         CFLAGS="$CFLAGS $cf_new_cflags"
11425 fi
11426
11427 if test -n "$cf_new_cppflags" ; then
11428
11429         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11430 fi
11431
11432 if test -n "$cf_new_extra_cppflags" ; then
11433
11434         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11435 fi
11436
11437                 ;;
11438         esac
11439         ;;
11440 esac
11441
11442 if test "$with_dbmalloc" = yes ; then
11443         echo "$as_me:11443: checking for dbmalloc.h" >&5
11444 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11445 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11446   echo $ECHO_N "(cached) $ECHO_C" >&6
11447 else
11448   cat >conftest.$ac_ext <<_ACEOF
11449 #line 11449 "configure"
11450 #include "confdefs.h"
11451 #include <dbmalloc.h>
11452 _ACEOF
11453 if { (eval echo "$as_me:11453: \"$ac_cpp conftest.$ac_ext\"") >&5
11454   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11455   ac_status=$?
11456   egrep -v '^ *\+' conftest.er1 >conftest.err
11457   rm -f conftest.er1
11458   cat conftest.err >&5
11459   echo "$as_me:11459: \$? = $ac_status" >&5
11460   (exit $ac_status); } >/dev/null; then
11461   if test -s conftest.err; then
11462     ac_cpp_err=$ac_c_preproc_warn_flag
11463   else
11464     ac_cpp_err=
11465   fi
11466 else
11467   ac_cpp_err=yes
11468 fi
11469 if test -z "$ac_cpp_err"; then
11470   ac_cv_header_dbmalloc_h=yes
11471 else
11472   echo "$as_me: failed program was:" >&5
11473   cat conftest.$ac_ext >&5
11474   ac_cv_header_dbmalloc_h=no
11475 fi
11476 rm -f conftest.err conftest.$ac_ext
11477 fi
11478 echo "$as_me:11478: result: $ac_cv_header_dbmalloc_h" >&5
11479 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11480 if test $ac_cv_header_dbmalloc_h = yes; then
11481
11482 echo "$as_me:11482: checking for debug_malloc in -ldbmalloc" >&5
11483 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11484 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11485   echo $ECHO_N "(cached) $ECHO_C" >&6
11486 else
11487   ac_check_lib_save_LIBS=$LIBS
11488 LIBS="-ldbmalloc  $LIBS"
11489 cat >conftest.$ac_ext <<_ACEOF
11490 #line 11490 "configure"
11491 #include "confdefs.h"
11492
11493 /* Override any gcc2 internal prototype to avoid an error.  */
11494 #ifdef __cplusplus
11495 extern "C"
11496 #endif
11497 /* We use char because int might match the return type of a gcc2
11498    builtin and then its argument prototype would still apply.  */
11499 char debug_malloc ();
11500 int
11501 main ()
11502 {
11503 debug_malloc ();
11504   ;
11505   return 0;
11506 }
11507 _ACEOF
11508 rm -f conftest.$ac_objext conftest$ac_exeext
11509 if { (eval echo "$as_me:11509: \"$ac_link\"") >&5
11510   (eval $ac_link) 2>&5
11511   ac_status=$?
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit $ac_status); } &&
11514          { ac_try='test -s conftest$ac_exeext'
11515   { (eval echo "$as_me:11515: \"$ac_try\"") >&5
11516   (eval $ac_try) 2>&5
11517   ac_status=$?
11518   echo "$as_me:11518: \$? = $ac_status" >&5
11519   (exit $ac_status); }; }; then
11520   ac_cv_lib_dbmalloc_debug_malloc=yes
11521 else
11522   echo "$as_me: failed program was:" >&5
11523 cat conftest.$ac_ext >&5
11524 ac_cv_lib_dbmalloc_debug_malloc=no
11525 fi
11526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11527 LIBS=$ac_check_lib_save_LIBS
11528 fi
11529 echo "$as_me:11529: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11530 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11531 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11532   cat >>confdefs.h <<EOF
11533 #define HAVE_LIBDBMALLOC 1
11534 EOF
11535
11536   LIBS="-ldbmalloc $LIBS"
11537
11538 fi
11539
11540 fi
11541
11542 fi
11543
11544 echo "$as_me:11544: checking if you want to use valgrind for testing" >&5
11545 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11546
11547 # Check whether --with-valgrind or --without-valgrind was given.
11548 if test "${with_valgrind+set}" = set; then
11549   withval="$with_valgrind"
11550   cat >>confdefs.h <<\EOF
11551 #define USE_VALGRIND 1
11552 EOF
11553
11554         : ${with_cflags:=-g}
11555         : ${with_no_leaks:=yes}
11556          with_valgrind=yes
11557 else
11558   with_valgrind=
11559 fi;
11560 echo "$as_me:11560: result: ${with_valgrind:-no}" >&5
11561 echo "${ECHO_T}${with_valgrind:-no}" >&6
11562
11563 case .$with_cflags in #(vi
11564 .*-g*)
11565         case .$CFLAGS in #(vi
11566         .*-g*) #(vi
11567                 ;;
11568         *)
11569
11570 cf_fix_cppflags=no
11571 cf_new_cflags=
11572 cf_new_cppflags=
11573 cf_new_extra_cppflags=
11574
11575 for cf_add_cflags in -g
11576 do
11577 case $cf_fix_cppflags in
11578 no)
11579         case $cf_add_cflags in #(vi
11580         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11581                 case $cf_add_cflags in
11582                 -D*)
11583                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11584
11585                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11586                                 && test -z "${cf_tst_cflags}" \
11587                                 && cf_fix_cppflags=yes
11588
11589                         if test $cf_fix_cppflags = yes ; then
11590                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11591                                 continue
11592                         elif test "${cf_tst_cflags}" = "\"'" ; then
11593                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11594                                 continue
11595                         fi
11596                         ;;
11597                 esac
11598                 case "$CPPFLAGS" in
11599                 *$cf_add_cflags) #(vi
11600                         ;;
11601                 *) #(vi
11602                         case $cf_add_cflags in #(vi
11603                         -D*)
11604                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11605
11606 CPPFLAGS=`echo "$CPPFLAGS" | \
11607         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11608                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11609
11610                                 ;;
11611                         esac
11612                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11613                         ;;
11614                 esac
11615                 ;;
11616         *)
11617                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11618                 ;;
11619         esac
11620         ;;
11621 yes)
11622         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11623
11624         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11625
11626         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11627                 && test -z "${cf_tst_cflags}" \
11628                 && cf_fix_cppflags=no
11629         ;;
11630 esac
11631 done
11632
11633 if test -n "$cf_new_cflags" ; then
11634
11635         CFLAGS="$CFLAGS $cf_new_cflags"
11636 fi
11637
11638 if test -n "$cf_new_cppflags" ; then
11639
11640         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11641 fi
11642
11643 if test -n "$cf_new_extra_cppflags" ; then
11644
11645         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11646 fi
11647
11648                 ;;
11649         esac
11650         ;;
11651 esac
11652
11653 echo "$as_me:11653: checking if you want to perform memory-leak testing" >&5
11654 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11655
11656 # Check whether --enable-leaks or --disable-leaks was given.
11657 if test "${enable_leaks+set}" = set; then
11658   enableval="$enable_leaks"
11659   with_no_leaks=yes
11660 else
11661   : ${with_no_leaks:=no}
11662 fi;
11663 echo "$as_me:11663: result: $with_no_leaks" >&5
11664 echo "${ECHO_T}$with_no_leaks" >&6
11665
11666 if test "$with_no_leaks" = yes ; then
11667         cat >>confdefs.h <<\EOF
11668 #define NO_LEAKS 1
11669 EOF
11670
11671 fi
11672
11673 cat >>confdefs.h <<\EOF
11674 #define HAVE_NC_ALLOC_H 1
11675 EOF
11676
11677 ###     use option --enable-expanded to generate certain macros as functions
11678
11679 # Check whether --enable-expanded or --disable-expanded was given.
11680 if test "${enable_expanded+set}" = set; then
11681   enableval="$enable_expanded"
11682   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11683 #define NCURSES_EXPANDED 1
11684 EOF
11685
11686 fi;
11687
11688 ###     use option --disable-macros to suppress macros in favor of functions
11689
11690 # Check whether --enable-macros or --disable-macros was given.
11691 if test "${enable_macros+set}" = set; then
11692   enableval="$enable_macros"
11693   test "$enableval" = no && cat >>confdefs.h <<\EOF
11694 #define NCURSES_NOMACROS 1
11695 EOF
11696
11697 fi;
11698
11699 # Normally we only add trace() to the debug-library.  Allow this to be
11700 # extended to all models of the ncurses library:
11701 cf_all_traces=no
11702 case "$CFLAGS $CPPFLAGS" in
11703 *-DTRACE*)
11704         cf_all_traces=yes
11705         ;;
11706 esac
11707
11708 echo "$as_me:11708: checking whether to add trace feature to all models" >&5
11709 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11710
11711 # Check whether --with-trace or --without-trace was given.
11712 if test "${with_trace+set}" = set; then
11713   withval="$with_trace"
11714   cf_with_trace=$withval
11715 else
11716   cf_with_trace=$cf_all_traces
11717 fi;
11718 echo "$as_me:11718: result: $cf_with_trace" >&5
11719 echo "${ECHO_T}$cf_with_trace" >&6
11720
11721 if test "$cf_with_trace" = yes ; then
11722         LIB_TRACING=all
11723         ADA_TRACE=TRUE
11724
11725 cf_fix_cppflags=no
11726 cf_new_cflags=
11727 cf_new_cppflags=
11728 cf_new_extra_cppflags=
11729
11730 for cf_add_cflags in -DTRACE
11731 do
11732 case $cf_fix_cppflags in
11733 no)
11734         case $cf_add_cflags in #(vi
11735         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11736                 case $cf_add_cflags in
11737                 -D*)
11738                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11739
11740                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11741                                 && test -z "${cf_tst_cflags}" \
11742                                 && cf_fix_cppflags=yes
11743
11744                         if test $cf_fix_cppflags = yes ; then
11745                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11746                                 continue
11747                         elif test "${cf_tst_cflags}" = "\"'" ; then
11748                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11749                                 continue
11750                         fi
11751                         ;;
11752                 esac
11753                 case "$CPPFLAGS" in
11754                 *$cf_add_cflags) #(vi
11755                         ;;
11756                 *) #(vi
11757                         case $cf_add_cflags in #(vi
11758                         -D*)
11759                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11760
11761 CPPFLAGS=`echo "$CPPFLAGS" | \
11762         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11763                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11764
11765                                 ;;
11766                         esac
11767                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11768                         ;;
11769                 esac
11770                 ;;
11771         *)
11772                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11773                 ;;
11774         esac
11775         ;;
11776 yes)
11777         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11778
11779         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11780
11781         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11782                 && test -z "${cf_tst_cflags}" \
11783                 && cf_fix_cppflags=no
11784         ;;
11785 esac
11786 done
11787
11788 if test -n "$cf_new_cflags" ; then
11789
11790         CFLAGS="$CFLAGS $cf_new_cflags"
11791 fi
11792
11793 if test -n "$cf_new_cppflags" ; then
11794
11795         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11796 fi
11797
11798 if test -n "$cf_new_extra_cppflags" ; then
11799
11800         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11801 fi
11802
11803 else
11804         LIB_TRACING=DEBUG
11805         ADA_TRACE=FALSE
11806 fi
11807
11808 ###     Checks for libraries.
11809 case $cf_cv_system_name in #(vi
11810 *mingw32*) #(vi
11811         ;;
11812 *)
11813 echo "$as_me:11813: checking for gettimeofday" >&5
11814 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11815 if test "${ac_cv_func_gettimeofday+set}" = set; then
11816   echo $ECHO_N "(cached) $ECHO_C" >&6
11817 else
11818   cat >conftest.$ac_ext <<_ACEOF
11819 #line 11819 "configure"
11820 #include "confdefs.h"
11821 /* System header to define __stub macros and hopefully few prototypes,
11822     which can conflict with char gettimeofday (); below.  */
11823 #include <assert.h>
11824 /* Override any gcc2 internal prototype to avoid an error.  */
11825 #ifdef __cplusplus
11826 extern "C"
11827 #endif
11828 /* We use char because int might match the return type of a gcc2
11829    builtin and then its argument prototype would still apply.  */
11830 char gettimeofday ();
11831 char (*f) ();
11832
11833 int
11834 main ()
11835 {
11836 /* The GNU C library defines this for functions which it implements
11837     to always fail with ENOSYS.  Some functions are actually named
11838     something starting with __ and the normal name is an alias.  */
11839 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11840 choke me
11841 #else
11842 f = gettimeofday;
11843 #endif
11844
11845   ;
11846   return 0;
11847 }
11848 _ACEOF
11849 rm -f conftest.$ac_objext conftest$ac_exeext
11850 if { (eval echo "$as_me:11850: \"$ac_link\"") >&5
11851   (eval $ac_link) 2>&5
11852   ac_status=$?
11853   echo "$as_me:11853: \$? = $ac_status" >&5
11854   (exit $ac_status); } &&
11855          { ac_try='test -s conftest$ac_exeext'
11856   { (eval echo "$as_me:11856: \"$ac_try\"") >&5
11857   (eval $ac_try) 2>&5
11858   ac_status=$?
11859   echo "$as_me:11859: \$? = $ac_status" >&5
11860   (exit $ac_status); }; }; then
11861   ac_cv_func_gettimeofday=yes
11862 else
11863   echo "$as_me: failed program was:" >&5
11864 cat conftest.$ac_ext >&5
11865 ac_cv_func_gettimeofday=no
11866 fi
11867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11868 fi
11869 echo "$as_me:11869: result: $ac_cv_func_gettimeofday" >&5
11870 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11871 if test $ac_cv_func_gettimeofday = yes; then
11872   cat >>confdefs.h <<\EOF
11873 #define HAVE_GETTIMEOFDAY 1
11874 EOF
11875
11876 else
11877
11878 echo "$as_me:11878: checking for gettimeofday in -lbsd" >&5
11879 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11880 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11881   echo $ECHO_N "(cached) $ECHO_C" >&6
11882 else
11883   ac_check_lib_save_LIBS=$LIBS
11884 LIBS="-lbsd  $LIBS"
11885 cat >conftest.$ac_ext <<_ACEOF
11886 #line 11886 "configure"
11887 #include "confdefs.h"
11888
11889 /* Override any gcc2 internal prototype to avoid an error.  */
11890 #ifdef __cplusplus
11891 extern "C"
11892 #endif
11893 /* We use char because int might match the return type of a gcc2
11894    builtin and then its argument prototype would still apply.  */
11895 char gettimeofday ();
11896 int
11897 main ()
11898 {
11899 gettimeofday ();
11900   ;
11901   return 0;
11902 }
11903 _ACEOF
11904 rm -f conftest.$ac_objext conftest$ac_exeext
11905 if { (eval echo "$as_me:11905: \"$ac_link\"") >&5
11906   (eval $ac_link) 2>&5
11907   ac_status=$?
11908   echo "$as_me:11908: \$? = $ac_status" >&5
11909   (exit $ac_status); } &&
11910          { ac_try='test -s conftest$ac_exeext'
11911   { (eval echo "$as_me:11911: \"$ac_try\"") >&5
11912   (eval $ac_try) 2>&5
11913   ac_status=$?
11914   echo "$as_me:11914: \$? = $ac_status" >&5
11915   (exit $ac_status); }; }; then
11916   ac_cv_lib_bsd_gettimeofday=yes
11917 else
11918   echo "$as_me: failed program was:" >&5
11919 cat conftest.$ac_ext >&5
11920 ac_cv_lib_bsd_gettimeofday=no
11921 fi
11922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11923 LIBS=$ac_check_lib_save_LIBS
11924 fi
11925 echo "$as_me:11925: result: $ac_cv_lib_bsd_gettimeofday" >&5
11926 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11927 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11928   cat >>confdefs.h <<\EOF
11929 #define HAVE_GETTIMEOFDAY 1
11930 EOF
11931
11932         LIBS="$LIBS -lbsd"
11933 fi
11934
11935 fi
11936         ;;
11937 esac
11938
11939 echo "$as_me:11939: checking if -lm needed for math functions" >&5
11940 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11941 if test "${cf_cv_need_libm+set}" = set; then
11942   echo $ECHO_N "(cached) $ECHO_C" >&6
11943 else
11944
11945         cat >conftest.$ac_ext <<_ACEOF
11946 #line 11946 "configure"
11947 #include "confdefs.h"
11948
11949         #include <stdio.h>
11950         #include <math.h>
11951
11952 int
11953 main ()
11954 {
11955 double x = rand(); printf("result = %g\n", sin(x))
11956   ;
11957   return 0;
11958 }
11959 _ACEOF
11960 rm -f conftest.$ac_objext conftest$ac_exeext
11961 if { (eval echo "$as_me:11961: \"$ac_link\"") >&5
11962   (eval $ac_link) 2>&5
11963   ac_status=$?
11964   echo "$as_me:11964: \$? = $ac_status" >&5
11965   (exit $ac_status); } &&
11966          { ac_try='test -s conftest$ac_exeext'
11967   { (eval echo "$as_me:11967: \"$ac_try\"") >&5
11968   (eval $ac_try) 2>&5
11969   ac_status=$?
11970   echo "$as_me:11970: \$? = $ac_status" >&5
11971   (exit $ac_status); }; }; then
11972   cf_cv_need_libm=no
11973 else
11974   echo "$as_me: failed program was:" >&5
11975 cat conftest.$ac_ext >&5
11976 cf_cv_need_libm=yes
11977 fi
11978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11979 fi
11980 echo "$as_me:11980: result: $cf_cv_need_libm" >&5
11981 echo "${ECHO_T}$cf_cv_need_libm" >&6
11982 if test "$cf_cv_need_libm" = yes
11983 then
11984 MATH_LIB=-lm
11985 fi
11986
11987 ###     Checks for header files.
11988 echo "$as_me:11988: checking for ANSI C header files" >&5
11989 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11990 if test "${ac_cv_header_stdc+set}" = set; then
11991   echo $ECHO_N "(cached) $ECHO_C" >&6
11992 else
11993   cat >conftest.$ac_ext <<_ACEOF
11994 #line 11994 "configure"
11995 #include "confdefs.h"
11996 #include <stdlib.h>
11997 #include <stdarg.h>
11998 #include <string.h>
11999 #include <float.h>
12000
12001 _ACEOF
12002 if { (eval echo "$as_me:12002: \"$ac_cpp conftest.$ac_ext\"") >&5
12003   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12004   ac_status=$?
12005   egrep -v '^ *\+' conftest.er1 >conftest.err
12006   rm -f conftest.er1
12007   cat conftest.err >&5
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); } >/dev/null; then
12010   if test -s conftest.err; then
12011     ac_cpp_err=$ac_c_preproc_warn_flag
12012   else
12013     ac_cpp_err=
12014   fi
12015 else
12016   ac_cpp_err=yes
12017 fi
12018 if test -z "$ac_cpp_err"; then
12019   ac_cv_header_stdc=yes
12020 else
12021   echo "$as_me: failed program was:" >&5
12022   cat conftest.$ac_ext >&5
12023   ac_cv_header_stdc=no
12024 fi
12025 rm -f conftest.err conftest.$ac_ext
12026
12027 if test $ac_cv_header_stdc = yes; then
12028   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12029   cat >conftest.$ac_ext <<_ACEOF
12030 #line 12030 "configure"
12031 #include "confdefs.h"
12032 #include <string.h>
12033
12034 _ACEOF
12035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12036   egrep "memchr" >/dev/null 2>&1; then
12037   :
12038 else
12039   ac_cv_header_stdc=no
12040 fi
12041 rm -f conftest*
12042
12043 fi
12044
12045 if test $ac_cv_header_stdc = yes; then
12046   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12047   cat >conftest.$ac_ext <<_ACEOF
12048 #line 12048 "configure"
12049 #include "confdefs.h"
12050 #include <stdlib.h>
12051
12052 _ACEOF
12053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12054   egrep "free" >/dev/null 2>&1; then
12055   :
12056 else
12057   ac_cv_header_stdc=no
12058 fi
12059 rm -f conftest*
12060
12061 fi
12062
12063 if test $ac_cv_header_stdc = yes; then
12064   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12065   if test "$cross_compiling" = yes; then
12066   :
12067 else
12068   cat >conftest.$ac_ext <<_ACEOF
12069 #line 12069 "configure"
12070 #include "confdefs.h"
12071 #include <ctype.h>
12072 #if ((' ' & 0x0FF) == 0x020)
12073 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12074 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12075 #else
12076 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12077                      || ('j' <= (c) && (c) <= 'r') \
12078                      || ('s' <= (c) && (c) <= 'z'))
12079 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12080 #endif
12081
12082 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12083 int
12084 main ()
12085 {
12086   int i;
12087   for (i = 0; i < 256; i++)
12088     if (XOR (islower (i), ISLOWER (i))
12089         || toupper (i) != TOUPPER (i))
12090       $ac_main_return(2);
12091   $ac_main_return (0);
12092 }
12093 _ACEOF
12094 rm -f conftest$ac_exeext
12095 if { (eval echo "$as_me:12095: \"$ac_link\"") >&5
12096   (eval $ac_link) 2>&5
12097   ac_status=$?
12098   echo "$as_me:12098: \$? = $ac_status" >&5
12099   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12100   { (eval echo "$as_me:12100: \"$ac_try\"") >&5
12101   (eval $ac_try) 2>&5
12102   ac_status=$?
12103   echo "$as_me:12103: \$? = $ac_status" >&5
12104   (exit $ac_status); }; }; then
12105   :
12106 else
12107   echo "$as_me: program exited with status $ac_status" >&5
12108 echo "$as_me: failed program was:" >&5
12109 cat conftest.$ac_ext >&5
12110 ac_cv_header_stdc=no
12111 fi
12112 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12113 fi
12114 fi
12115 fi
12116 echo "$as_me:12116: result: $ac_cv_header_stdc" >&5
12117 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12118 if test $ac_cv_header_stdc = yes; then
12119
12120 cat >>confdefs.h <<\EOF
12121 #define STDC_HEADERS 1
12122 EOF
12123
12124 fi
12125
12126 ac_header_dirent=no
12127 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12128   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12129 echo "$as_me:12129: checking for $ac_hdr that defines DIR" >&5
12130 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12131 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12132   echo $ECHO_N "(cached) $ECHO_C" >&6
12133 else
12134   cat >conftest.$ac_ext <<_ACEOF
12135 #line 12135 "configure"
12136 #include "confdefs.h"
12137 #include <sys/types.h>
12138 #include <$ac_hdr>
12139
12140 int
12141 main ()
12142 {
12143 if ((DIR *) 0)
12144 return 0;
12145   ;
12146   return 0;
12147 }
12148 _ACEOF
12149 rm -f conftest.$ac_objext
12150 if { (eval echo "$as_me:12150: \"$ac_compile\"") >&5
12151   (eval $ac_compile) 2>&5
12152   ac_status=$?
12153   echo "$as_me:12153: \$? = $ac_status" >&5
12154   (exit $ac_status); } &&
12155          { ac_try='test -s conftest.$ac_objext'
12156   { (eval echo "$as_me:12156: \"$ac_try\"") >&5
12157   (eval $ac_try) 2>&5
12158   ac_status=$?
12159   echo "$as_me:12159: \$? = $ac_status" >&5
12160   (exit $ac_status); }; }; then
12161   eval "$as_ac_Header=yes"
12162 else
12163   echo "$as_me: failed program was:" >&5
12164 cat conftest.$ac_ext >&5
12165 eval "$as_ac_Header=no"
12166 fi
12167 rm -f conftest.$ac_objext conftest.$ac_ext
12168 fi
12169 echo "$as_me:12169: result: `eval echo '${'$as_ac_Header'}'`" >&5
12170 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12171 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12172   cat >>confdefs.h <<EOF
12173 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12174 EOF
12175
12176 ac_header_dirent=$ac_hdr; break
12177 fi
12178
12179 done
12180 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12181 if test $ac_header_dirent = dirent.h; then
12182   echo "$as_me:12182: checking for opendir in -ldir" >&5
12183 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12184 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12185   echo $ECHO_N "(cached) $ECHO_C" >&6
12186 else
12187   ac_check_lib_save_LIBS=$LIBS
12188 LIBS="-ldir  $LIBS"
12189 cat >conftest.$ac_ext <<_ACEOF
12190 #line 12190 "configure"
12191 #include "confdefs.h"
12192
12193 /* Override any gcc2 internal prototype to avoid an error.  */
12194 #ifdef __cplusplus
12195 extern "C"
12196 #endif
12197 /* We use char because int might match the return type of a gcc2
12198    builtin and then its argument prototype would still apply.  */
12199 char opendir ();
12200 int
12201 main ()
12202 {
12203 opendir ();
12204   ;
12205   return 0;
12206 }
12207 _ACEOF
12208 rm -f conftest.$ac_objext conftest$ac_exeext
12209 if { (eval echo "$as_me:12209: \"$ac_link\"") >&5
12210   (eval $ac_link) 2>&5
12211   ac_status=$?
12212   echo "$as_me:12212: \$? = $ac_status" >&5
12213   (exit $ac_status); } &&
12214          { ac_try='test -s conftest$ac_exeext'
12215   { (eval echo "$as_me:12215: \"$ac_try\"") >&5
12216   (eval $ac_try) 2>&5
12217   ac_status=$?
12218   echo "$as_me:12218: \$? = $ac_status" >&5
12219   (exit $ac_status); }; }; then
12220   ac_cv_lib_dir_opendir=yes
12221 else
12222   echo "$as_me: failed program was:" >&5
12223 cat conftest.$ac_ext >&5
12224 ac_cv_lib_dir_opendir=no
12225 fi
12226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12227 LIBS=$ac_check_lib_save_LIBS
12228 fi
12229 echo "$as_me:12229: result: $ac_cv_lib_dir_opendir" >&5
12230 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12231 if test $ac_cv_lib_dir_opendir = yes; then
12232   LIBS="$LIBS -ldir"
12233 fi
12234
12235 else
12236   echo "$as_me:12236: checking for opendir in -lx" >&5
12237 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12238 if test "${ac_cv_lib_x_opendir+set}" = set; then
12239   echo $ECHO_N "(cached) $ECHO_C" >&6
12240 else
12241   ac_check_lib_save_LIBS=$LIBS
12242 LIBS="-lx  $LIBS"
12243 cat >conftest.$ac_ext <<_ACEOF
12244 #line 12244 "configure"
12245 #include "confdefs.h"
12246
12247 /* Override any gcc2 internal prototype to avoid an error.  */
12248 #ifdef __cplusplus
12249 extern "C"
12250 #endif
12251 /* We use char because int might match the return type of a gcc2
12252    builtin and then its argument prototype would still apply.  */
12253 char opendir ();
12254 int
12255 main ()
12256 {
12257 opendir ();
12258   ;
12259   return 0;
12260 }
12261 _ACEOF
12262 rm -f conftest.$ac_objext conftest$ac_exeext
12263 if { (eval echo "$as_me:12263: \"$ac_link\"") >&5
12264   (eval $ac_link) 2>&5
12265   ac_status=$?
12266   echo "$as_me:12266: \$? = $ac_status" >&5
12267   (exit $ac_status); } &&
12268          { ac_try='test -s conftest$ac_exeext'
12269   { (eval echo "$as_me:12269: \"$ac_try\"") >&5
12270   (eval $ac_try) 2>&5
12271   ac_status=$?
12272   echo "$as_me:12272: \$? = $ac_status" >&5
12273   (exit $ac_status); }; }; then
12274   ac_cv_lib_x_opendir=yes
12275 else
12276   echo "$as_me: failed program was:" >&5
12277 cat conftest.$ac_ext >&5
12278 ac_cv_lib_x_opendir=no
12279 fi
12280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12281 LIBS=$ac_check_lib_save_LIBS
12282 fi
12283 echo "$as_me:12283: result: $ac_cv_lib_x_opendir" >&5
12284 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12285 if test $ac_cv_lib_x_opendir = yes; then
12286   LIBS="$LIBS -lx"
12287 fi
12288
12289 fi
12290
12291 echo "$as_me:12291: checking whether time.h and sys/time.h may both be included" >&5
12292 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12293 if test "${ac_cv_header_time+set}" = set; then
12294   echo $ECHO_N "(cached) $ECHO_C" >&6
12295 else
12296   cat >conftest.$ac_ext <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12299 #include <sys/types.h>
12300 #include <sys/time.h>
12301 #include <time.h>
12302
12303 int
12304 main ()
12305 {
12306 if ((struct tm *) 0)
12307 return 0;
12308   ;
12309   return 0;
12310 }
12311 _ACEOF
12312 rm -f conftest.$ac_objext
12313 if { (eval echo "$as_me:12313: \"$ac_compile\"") >&5
12314   (eval $ac_compile) 2>&5
12315   ac_status=$?
12316   echo "$as_me:12316: \$? = $ac_status" >&5
12317   (exit $ac_status); } &&
12318          { ac_try='test -s conftest.$ac_objext'
12319   { (eval echo "$as_me:12319: \"$ac_try\"") >&5
12320   (eval $ac_try) 2>&5
12321   ac_status=$?
12322   echo "$as_me:12322: \$? = $ac_status" >&5
12323   (exit $ac_status); }; }; then
12324   ac_cv_header_time=yes
12325 else
12326   echo "$as_me: failed program was:" >&5
12327 cat conftest.$ac_ext >&5
12328 ac_cv_header_time=no
12329 fi
12330 rm -f conftest.$ac_objext conftest.$ac_ext
12331 fi
12332 echo "$as_me:12332: result: $ac_cv_header_time" >&5
12333 echo "${ECHO_T}$ac_cv_header_time" >&6
12334 if test $ac_cv_header_time = yes; then
12335
12336 cat >>confdefs.h <<\EOF
12337 #define TIME_WITH_SYS_TIME 1
12338 EOF
12339
12340 fi
12341
12342 echo "$as_me:12342: checking for regular-expression headers" >&5
12343 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12344 if test "${cf_cv_regex+set}" = set; then
12345   echo $ECHO_N "(cached) $ECHO_C" >&6
12346 else
12347
12348 cat >conftest.$ac_ext <<_ACEOF
12349 #line 12349 "configure"
12350 #include "confdefs.h"
12351 #include <sys/types.h>
12352 #include <regex.h>
12353 int
12354 main ()
12355 {
12356
12357         regex_t *p;
12358         int x = regcomp(p, "", 0);
12359         int y = regexec(p, "", 0, 0, 0);
12360         regfree(p);
12361
12362   ;
12363   return 0;
12364 }
12365 _ACEOF
12366 rm -f conftest.$ac_objext conftest$ac_exeext
12367 if { (eval echo "$as_me:12367: \"$ac_link\"") >&5
12368   (eval $ac_link) 2>&5
12369   ac_status=$?
12370   echo "$as_me:12370: \$? = $ac_status" >&5
12371   (exit $ac_status); } &&
12372          { ac_try='test -s conftest$ac_exeext'
12373   { (eval echo "$as_me:12373: \"$ac_try\"") >&5
12374   (eval $ac_try) 2>&5
12375   ac_status=$?
12376   echo "$as_me:12376: \$? = $ac_status" >&5
12377   (exit $ac_status); }; }; then
12378   cf_cv_regex="regex.h"
12379 else
12380   echo "$as_me: failed program was:" >&5
12381 cat conftest.$ac_ext >&5
12382
12383         cat >conftest.$ac_ext <<_ACEOF
12384 #line 12384 "configure"
12385 #include "confdefs.h"
12386 #include <regexp.h>
12387 int
12388 main ()
12389 {
12390
12391                 char *p = compile("", "", "", 0);
12392                 int x = step("", "");
12393
12394   ;
12395   return 0;
12396 }
12397 _ACEOF
12398 rm -f conftest.$ac_objext conftest$ac_exeext
12399 if { (eval echo "$as_me:12399: \"$ac_link\"") >&5
12400   (eval $ac_link) 2>&5
12401   ac_status=$?
12402   echo "$as_me:12402: \$? = $ac_status" >&5
12403   (exit $ac_status); } &&
12404          { ac_try='test -s conftest$ac_exeext'
12405   { (eval echo "$as_me:12405: \"$ac_try\"") >&5
12406   (eval $ac_try) 2>&5
12407   ac_status=$?
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit $ac_status); }; }; then
12410   cf_cv_regex="regexp.h"
12411 else
12412   echo "$as_me: failed program was:" >&5
12413 cat conftest.$ac_ext >&5
12414
12415                 cf_save_LIBS="$LIBS"
12416                 LIBS="-lgen $LIBS"
12417                 cat >conftest.$ac_ext <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420 #include <regexpr.h>
12421 int
12422 main ()
12423 {
12424
12425                         char *p = compile("", "", "");
12426                         int x = step("", "");
12427
12428   ;
12429   return 0;
12430 }
12431 _ACEOF
12432 rm -f conftest.$ac_objext conftest$ac_exeext
12433 if { (eval echo "$as_me:12433: \"$ac_link\"") >&5
12434   (eval $ac_link) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); } &&
12438          { ac_try='test -s conftest$ac_exeext'
12439   { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440   (eval $ac_try) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); }; }; then
12444   cf_cv_regex="regexpr.h"
12445 else
12446   echo "$as_me: failed program was:" >&5
12447 cat conftest.$ac_ext >&5
12448 LIBS="$cf_save_LIBS"
12449 fi
12450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12451 fi
12452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12453 fi
12454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12455
12456 fi
12457
12458 echo "$as_me:12458: result: $cf_cv_regex" >&5
12459 echo "${ECHO_T}$cf_cv_regex" >&6
12460 case $cf_cv_regex in
12461         regex.h)   cat >>confdefs.h <<\EOF
12462 #define HAVE_REGEX_H_FUNCS 1
12463 EOF
12464  ;;
12465         regexp.h)  cat >>confdefs.h <<\EOF
12466 #define HAVE_REGEXP_H_FUNCS 1
12467 EOF
12468  ;;
12469         regexpr.h) cat >>confdefs.h <<\EOF
12470 #define HAVE_REGEXPR_H_FUNCS 1
12471 EOF
12472  ;;
12473 esac
12474
12475 for ac_header in \
12476 fcntl.h \
12477 getopt.h \
12478 limits.h \
12479 locale.h \
12480 poll.h \
12481 sys/bsdtypes.h \
12482 sys/ioctl.h \
12483 sys/param.h \
12484 sys/poll.h \
12485 sys/select.h \
12486 sys/time.h \
12487 sys/times.h \
12488 ttyent.h \
12489 unistd.h \
12490 wctype.h \
12491
12492 do
12493 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12494 echo "$as_me:12494: checking for $ac_header" >&5
12495 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12496 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12497   echo $ECHO_N "(cached) $ECHO_C" >&6
12498 else
12499   cat >conftest.$ac_ext <<_ACEOF
12500 #line 12500 "configure"
12501 #include "confdefs.h"
12502 #include <$ac_header>
12503 _ACEOF
12504 if { (eval echo "$as_me:12504: \"$ac_cpp conftest.$ac_ext\"") >&5
12505   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12506   ac_status=$?
12507   egrep -v '^ *\+' conftest.er1 >conftest.err
12508   rm -f conftest.er1
12509   cat conftest.err >&5
12510   echo "$as_me:12510: \$? = $ac_status" >&5
12511   (exit $ac_status); } >/dev/null; then
12512   if test -s conftest.err; then
12513     ac_cpp_err=$ac_c_preproc_warn_flag
12514   else
12515     ac_cpp_err=
12516   fi
12517 else
12518   ac_cpp_err=yes
12519 fi
12520 if test -z "$ac_cpp_err"; then
12521   eval "$as_ac_Header=yes"
12522 else
12523   echo "$as_me: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   eval "$as_ac_Header=no"
12526 fi
12527 rm -f conftest.err conftest.$ac_ext
12528 fi
12529 echo "$as_me:12529: result: `eval echo '${'$as_ac_Header'}'`" >&5
12530 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12531 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12532   cat >>confdefs.h <<EOF
12533 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12534 EOF
12535
12536 fi
12537 done
12538
12539 # check for ISC (this may also define _POSIX_SOURCE)
12540 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12541 if test "$ISC" = yes ; then
12542
12543 echo "$as_me:12543: checking for main in -lcposix" >&5
12544 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12545 if test "${ac_cv_lib_cposix_main+set}" = set; then
12546   echo $ECHO_N "(cached) $ECHO_C" >&6
12547 else
12548   ac_check_lib_save_LIBS=$LIBS
12549 LIBS="-lcposix  $LIBS"
12550 cat >conftest.$ac_ext <<_ACEOF
12551 #line 12551 "configure"
12552 #include "confdefs.h"
12553
12554 int
12555 main ()
12556 {
12557 main ();
12558   ;
12559   return 0;
12560 }
12561 _ACEOF
12562 rm -f conftest.$ac_objext conftest$ac_exeext
12563 if { (eval echo "$as_me:12563: \"$ac_link\"") >&5
12564   (eval $ac_link) 2>&5
12565   ac_status=$?
12566   echo "$as_me:12566: \$? = $ac_status" >&5
12567   (exit $ac_status); } &&
12568          { ac_try='test -s conftest$ac_exeext'
12569   { (eval echo "$as_me:12569: \"$ac_try\"") >&5
12570   (eval $ac_try) 2>&5
12571   ac_status=$?
12572   echo "$as_me:12572: \$? = $ac_status" >&5
12573   (exit $ac_status); }; }; then
12574   ac_cv_lib_cposix_main=yes
12575 else
12576   echo "$as_me: failed program was:" >&5
12577 cat conftest.$ac_ext >&5
12578 ac_cv_lib_cposix_main=no
12579 fi
12580 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12581 LIBS=$ac_check_lib_save_LIBS
12582 fi
12583 echo "$as_me:12583: result: $ac_cv_lib_cposix_main" >&5
12584 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12585 if test $ac_cv_lib_cposix_main = yes; then
12586   cat >>confdefs.h <<EOF
12587 #define HAVE_LIBCPOSIX 1
12588 EOF
12589
12590   LIBS="-lcposix $LIBS"
12591
12592 fi
12593
12594         echo "$as_me:12594: checking for bzero in -linet" >&5
12595 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12596 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12597   echo $ECHO_N "(cached) $ECHO_C" >&6
12598 else
12599   ac_check_lib_save_LIBS=$LIBS
12600 LIBS="-linet  $LIBS"
12601 cat >conftest.$ac_ext <<_ACEOF
12602 #line 12602 "configure"
12603 #include "confdefs.h"
12604
12605 /* Override any gcc2 internal prototype to avoid an error.  */
12606 #ifdef __cplusplus
12607 extern "C"
12608 #endif
12609 /* We use char because int might match the return type of a gcc2
12610    builtin and then its argument prototype would still apply.  */
12611 char bzero ();
12612 int
12613 main ()
12614 {
12615 bzero ();
12616   ;
12617   return 0;
12618 }
12619 _ACEOF
12620 rm -f conftest.$ac_objext conftest$ac_exeext
12621 if { (eval echo "$as_me:12621: \"$ac_link\"") >&5
12622   (eval $ac_link) 2>&5
12623   ac_status=$?
12624   echo "$as_me:12624: \$? = $ac_status" >&5
12625   (exit $ac_status); } &&
12626          { ac_try='test -s conftest$ac_exeext'
12627   { (eval echo "$as_me:12627: \"$ac_try\"") >&5
12628   (eval $ac_try) 2>&5
12629   ac_status=$?
12630   echo "$as_me:12630: \$? = $ac_status" >&5
12631   (exit $ac_status); }; }; then
12632   ac_cv_lib_inet_bzero=yes
12633 else
12634   echo "$as_me: failed program was:" >&5
12635 cat conftest.$ac_ext >&5
12636 ac_cv_lib_inet_bzero=no
12637 fi
12638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12639 LIBS=$ac_check_lib_save_LIBS
12640 fi
12641 echo "$as_me:12641: result: $ac_cv_lib_inet_bzero" >&5
12642 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12643 if test $ac_cv_lib_inet_bzero = yes; then
12644   LIBS="$LIBS -linet"
12645 fi
12646 fi
12647
12648 echo "$as_me:12648: checking if sys/time.h works with sys/select.h" >&5
12649 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12650 if test "${cf_cv_sys_time_select+set}" = set; then
12651   echo $ECHO_N "(cached) $ECHO_C" >&6
12652 else
12653
12654 cat >conftest.$ac_ext <<_ACEOF
12655 #line 12655 "configure"
12656 #include "confdefs.h"
12657
12658 #include <sys/types.h>
12659 #ifdef HAVE_SYS_TIME_H
12660 #include <sys/time.h>
12661 #endif
12662 #ifdef HAVE_SYS_SELECT_H
12663 #include <sys/select.h>
12664 #endif
12665
12666 int
12667 main ()
12668 {
12669
12670   ;
12671   return 0;
12672 }
12673 _ACEOF
12674 rm -f conftest.$ac_objext
12675 if { (eval echo "$as_me:12675: \"$ac_compile\"") >&5
12676   (eval $ac_compile) 2>&5
12677   ac_status=$?
12678   echo "$as_me:12678: \$? = $ac_status" >&5
12679   (exit $ac_status); } &&
12680          { ac_try='test -s conftest.$ac_objext'
12681   { (eval echo "$as_me:12681: \"$ac_try\"") >&5
12682   (eval $ac_try) 2>&5
12683   ac_status=$?
12684   echo "$as_me:12684: \$? = $ac_status" >&5
12685   (exit $ac_status); }; }; then
12686   cf_cv_sys_time_select=yes
12687 else
12688   echo "$as_me: failed program was:" >&5
12689 cat conftest.$ac_ext >&5
12690 cf_cv_sys_time_select=no
12691 fi
12692 rm -f conftest.$ac_objext conftest.$ac_ext
12693
12694 fi
12695
12696 echo "$as_me:12696: result: $cf_cv_sys_time_select" >&5
12697 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12698 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12699 #define HAVE_SYS_TIME_SELECT 1
12700 EOF
12701
12702 ###     checks for compiler characteristics
12703 ac_ext=c
12704 ac_cpp='$CPP $CPPFLAGS'
12705 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12706 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12707 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12708 ac_main_return=return
12709
12710 echo "$as_me:12710: checking for $CC option to accept ANSI C" >&5
12711 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12712 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12713   echo $ECHO_N "(cached) $ECHO_C" >&6
12714 else
12715   ac_cv_prog_cc_stdc=no
12716 ac_save_CC=$CC
12717 cat >conftest.$ac_ext <<_ACEOF
12718 #line 12718 "configure"
12719 #include "confdefs.h"
12720 #include <stdarg.h>
12721 #include <stdio.h>
12722 #include <sys/types.h>
12723 #include <sys/stat.h>
12724 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12725 struct buf { int x; };
12726 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12727 static char *e (p, i)
12728      char **p;
12729      int i;
12730 {
12731   return p[i];
12732 }
12733 static char *f (char * (*g) (char **, int), char **p, ...)
12734 {
12735   char *s;
12736   va_list v;
12737   va_start (v,p);
12738   s = g (p, va_arg (v,int));
12739   va_end (v);
12740   return s;
12741 }
12742 int test (int i, double x);
12743 struct s1 {int (*f) (int a);};
12744 struct s2 {int (*f) (double a);};
12745 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12746 int argc;
12747 char **argv;
12748 int
12749 main ()
12750 {
12751 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12752   ;
12753   return 0;
12754 }
12755 _ACEOF
12756 # Don't try gcc -ansi; that turns off useful extensions and
12757 # breaks some systems' header files.
12758 # AIX                   -qlanglvl=ansi
12759 # Ultrix and OSF/1      -std1
12760 # HP-UX 10.20 and later -Ae
12761 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12762 # SVR4                  -Xc -D__EXTENSIONS__
12763 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12764 do
12765   CC="$ac_save_CC $ac_arg"
12766   rm -f conftest.$ac_objext
12767 if { (eval echo "$as_me:12767: \"$ac_compile\"") >&5
12768   (eval $ac_compile) 2>&5
12769   ac_status=$?
12770   echo "$as_me:12770: \$? = $ac_status" >&5
12771   (exit $ac_status); } &&
12772          { ac_try='test -s conftest.$ac_objext'
12773   { (eval echo "$as_me:12773: \"$ac_try\"") >&5
12774   (eval $ac_try) 2>&5
12775   ac_status=$?
12776   echo "$as_me:12776: \$? = $ac_status" >&5
12777   (exit $ac_status); }; }; then
12778   ac_cv_prog_cc_stdc=$ac_arg
12779 break
12780 else
12781   echo "$as_me: failed program was:" >&5
12782 cat conftest.$ac_ext >&5
12783 fi
12784 rm -f conftest.$ac_objext
12785 done
12786 rm -f conftest.$ac_ext conftest.$ac_objext
12787 CC=$ac_save_CC
12788
12789 fi
12790
12791 case "x$ac_cv_prog_cc_stdc" in
12792   x|xno)
12793     echo "$as_me:12793: result: none needed" >&5
12794 echo "${ECHO_T}none needed" >&6 ;;
12795   *)
12796     echo "$as_me:12796: result: $ac_cv_prog_cc_stdc" >&5
12797 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12798     CC="$CC $ac_cv_prog_cc_stdc" ;;
12799 esac
12800
12801 echo "$as_me:12801: checking for an ANSI C-conforming const" >&5
12802 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12803 if test "${ac_cv_c_const+set}" = set; then
12804   echo $ECHO_N "(cached) $ECHO_C" >&6
12805 else
12806   cat >conftest.$ac_ext <<_ACEOF
12807 #line 12807 "configure"
12808 #include "confdefs.h"
12809
12810 int
12811 main ()
12812 {
12813 /* FIXME: Include the comments suggested by Paul. */
12814 #ifndef __cplusplus
12815   /* Ultrix mips cc rejects this.  */
12816   typedef int charset[2];
12817   const charset x;
12818   /* SunOS 4.1.1 cc rejects this.  */
12819   char const *const *ccp;
12820   char **p;
12821   /* NEC SVR4.0.2 mips cc rejects this.  */
12822   struct point {int x, y;};
12823   static struct point const zero = {0,0};
12824   /* AIX XL C 1.02.0.0 rejects this.
12825      It does not let you subtract one const X* pointer from another in
12826      an arm of an if-expression whose if-part is not a constant
12827      expression */
12828   const char *g = "string";
12829   ccp = &g + (g ? g-g : 0);
12830   /* HPUX 7.0 cc rejects these. */
12831   ++ccp;
12832   p = (char**) ccp;
12833   ccp = (char const *const *) p;
12834   { /* SCO 3.2v4 cc rejects this.  */
12835     char *t;
12836     char const *s = 0 ? (char *) 0 : (char const *) 0;
12837
12838     *t++ = 0;
12839   }
12840   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12841     int x[] = {25, 17};
12842     const int *foo = &x[0];
12843     ++foo;
12844   }
12845   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12846     typedef const int *iptr;
12847     iptr p = 0;
12848     ++p;
12849   }
12850   { /* AIX XL C 1.02.0.0 rejects this saying
12851        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12852     struct s { int j; const int *ap[3]; };
12853     struct s *b; b->j = 5;
12854   }
12855   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12856     const int foo = 10;
12857   }
12858 #endif
12859
12860   ;
12861   return 0;
12862 }
12863 _ACEOF
12864 rm -f conftest.$ac_objext
12865 if { (eval echo "$as_me:12865: \"$ac_compile\"") >&5
12866   (eval $ac_compile) 2>&5
12867   ac_status=$?
12868   echo "$as_me:12868: \$? = $ac_status" >&5
12869   (exit $ac_status); } &&
12870          { ac_try='test -s conftest.$ac_objext'
12871   { (eval echo "$as_me:12871: \"$ac_try\"") >&5
12872   (eval $ac_try) 2>&5
12873   ac_status=$?
12874   echo "$as_me:12874: \$? = $ac_status" >&5
12875   (exit $ac_status); }; }; then
12876   ac_cv_c_const=yes
12877 else
12878   echo "$as_me: failed program was:" >&5
12879 cat conftest.$ac_ext >&5
12880 ac_cv_c_const=no
12881 fi
12882 rm -f conftest.$ac_objext conftest.$ac_ext
12883 fi
12884 echo "$as_me:12884: result: $ac_cv_c_const" >&5
12885 echo "${ECHO_T}$ac_cv_c_const" >&6
12886 if test $ac_cv_c_const = no; then
12887
12888 cat >>confdefs.h <<\EOF
12889 #define const
12890 EOF
12891
12892 fi
12893
12894 echo "$as_me:12894: checking for inline" >&5
12895 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12896 if test "${ac_cv_c_inline+set}" = set; then
12897   echo $ECHO_N "(cached) $ECHO_C" >&6
12898 else
12899   ac_cv_c_inline=no
12900 for ac_kw in inline __inline__ __inline; do
12901   cat >conftest.$ac_ext <<_ACEOF
12902 #line 12902 "configure"
12903 #include "confdefs.h"
12904 #ifndef __cplusplus
12905 static $ac_kw int static_foo () {return 0; }
12906 $ac_kw int foo () {return 0; }
12907 #endif
12908
12909 _ACEOF
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:12911: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>&5
12913   ac_status=$?
12914   echo "$as_me:12914: \$? = $ac_status" >&5
12915   (exit $ac_status); } &&
12916          { ac_try='test -s conftest.$ac_objext'
12917   { (eval echo "$as_me:12917: \"$ac_try\"") >&5
12918   (eval $ac_try) 2>&5
12919   ac_status=$?
12920   echo "$as_me:12920: \$? = $ac_status" >&5
12921   (exit $ac_status); }; }; then
12922   ac_cv_c_inline=$ac_kw; break
12923 else
12924   echo "$as_me: failed program was:" >&5
12925 cat conftest.$ac_ext >&5
12926 fi
12927 rm -f conftest.$ac_objext conftest.$ac_ext
12928 done
12929
12930 fi
12931 echo "$as_me:12931: result: $ac_cv_c_inline" >&5
12932 echo "${ECHO_T}$ac_cv_c_inline" >&6
12933 case $ac_cv_c_inline in
12934   inline | yes) ;;
12935   no)
12936 cat >>confdefs.h <<\EOF
12937 #define inline
12938 EOF
12939  ;;
12940   *)  cat >>confdefs.h <<EOF
12941 #define inline $ac_cv_c_inline
12942 EOF
12943  ;;
12944 esac
12945
12946 NCURSES_INLINE=
12947 if test "$ac_cv_c_inline" != no ; then
12948   NCURSES_INLINE=inline
12949   if test "$INTEL_COMPILER" = yes
12950   then
12951     :
12952   elif test "$GCC" = yes
12953   then
12954     echo "$as_me:12954: checking if gcc supports options to tune inlining" >&5
12955 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12956 if test "${cf_cv_gcc_inline+set}" = set; then
12957   echo $ECHO_N "(cached) $ECHO_C" >&6
12958 else
12959
12960       cf_save_CFLAGS=$CFLAGS
12961       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12962       cat >conftest.$ac_ext <<_ACEOF
12963 #line 12963 "configure"
12964 #include "confdefs.h"
12965 inline int foo(void) { return 1; }
12966 int
12967 main ()
12968 {
12969 ${cf_cv_main_return:-return} foo()
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f conftest.$ac_objext
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit $ac_status); } &&
12980          { ac_try='test -s conftest.$ac_objext'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); }; }; then
12986   cf_cv_gcc_inline=yes
12987 else
12988   echo "$as_me: failed program was:" >&5
12989 cat conftest.$ac_ext >&5
12990 cf_cv_gcc_inline=no
12991 fi
12992 rm -f conftest.$ac_objext conftest.$ac_ext
12993       CFLAGS=$cf_save_CFLAGS
12994
12995 fi
12996 echo "$as_me:12996: result: $cf_cv_gcc_inline" >&5
12997 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12998     if test "$cf_cv_gcc_inline" = yes ; then
12999
13000 cf_fix_cppflags=no
13001 cf_new_cflags=
13002 cf_new_cppflags=
13003 cf_new_extra_cppflags=
13004
13005 for cf_add_cflags in --param max-inline-insns-single=1200
13006 do
13007 case $cf_fix_cppflags in
13008 no)
13009         case $cf_add_cflags in #(vi
13010         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13011                 case $cf_add_cflags in
13012                 -D*)
13013                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13014
13015                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13016                                 && test -z "${cf_tst_cflags}" \
13017                                 && cf_fix_cppflags=yes
13018
13019                         if test $cf_fix_cppflags = yes ; then
13020                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13021                                 continue
13022                         elif test "${cf_tst_cflags}" = "\"'" ; then
13023                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13024                                 continue
13025                         fi
13026                         ;;
13027                 esac
13028                 case "$CPPFLAGS" in
13029                 *$cf_add_cflags) #(vi
13030                         ;;
13031                 *) #(vi
13032                         case $cf_add_cflags in #(vi
13033                         -D*)
13034                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13035
13036 CPPFLAGS=`echo "$CPPFLAGS" | \
13037         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13038                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13039
13040                                 ;;
13041                         esac
13042                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13043                         ;;
13044                 esac
13045                 ;;
13046         *)
13047                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13048                 ;;
13049         esac
13050         ;;
13051 yes)
13052         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13053
13054         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13055
13056         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13057                 && test -z "${cf_tst_cflags}" \
13058                 && cf_fix_cppflags=no
13059         ;;
13060 esac
13061 done
13062
13063 if test -n "$cf_new_cflags" ; then
13064
13065         CFLAGS="$CFLAGS $cf_new_cflags"
13066 fi
13067
13068 if test -n "$cf_new_cppflags" ; then
13069
13070         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13071 fi
13072
13073 if test -n "$cf_new_extra_cppflags" ; then
13074
13075         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13076 fi
13077
13078     fi
13079   fi
13080 fi
13081
13082 echo "$as_me:13082: checking for signal global datatype" >&5
13083 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13084 if test "${cf_cv_sig_atomic_t+set}" = set; then
13085   echo $ECHO_N "(cached) $ECHO_C" >&6
13086 else
13087
13088         for cf_type in \
13089                 "volatile sig_atomic_t" \
13090                 "sig_atomic_t" \
13091                 "int"
13092         do
13093         cat >conftest.$ac_ext <<_ACEOF
13094 #line 13094 "configure"
13095 #include "confdefs.h"
13096
13097 #include <sys/types.h>
13098 #include <signal.h>
13099 #include <stdio.h>
13100
13101 extern $cf_type x;
13102 $cf_type x;
13103 static void handler(int sig)
13104 {
13105         x = 5;
13106 }
13107 int
13108 main ()
13109 {
13110 signal(SIGINT, handler);
13111                  x = 1
13112   ;
13113   return 0;
13114 }
13115 _ACEOF
13116 rm -f conftest.$ac_objext
13117 if { (eval echo "$as_me:13117: \"$ac_compile\"") >&5
13118   (eval $ac_compile) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); } &&
13122          { ac_try='test -s conftest.$ac_objext'
13123   { (eval echo "$as_me:13123: \"$ac_try\"") >&5
13124   (eval $ac_try) 2>&5
13125   ac_status=$?
13126   echo "$as_me:13126: \$? = $ac_status" >&5
13127   (exit $ac_status); }; }; then
13128   cf_cv_sig_atomic_t=$cf_type
13129 else
13130   echo "$as_me: failed program was:" >&5
13131 cat conftest.$ac_ext >&5
13132 cf_cv_sig_atomic_t=no
13133 fi
13134 rm -f conftest.$ac_objext conftest.$ac_ext
13135                 test "$cf_cv_sig_atomic_t" != no && break
13136         done
13137
13138 fi
13139
13140 echo "$as_me:13140: result: $cf_cv_sig_atomic_t" >&5
13141 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13142 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13143 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13144 EOF
13145
13146 if test $NCURSES_CHTYPE = auto ; then
13147
13148 echo "$as_me:13148: checking for type of chtype" >&5
13149 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13150 if test "${cf_cv_typeof_chtype+set}" = set; then
13151   echo $ECHO_N "(cached) $ECHO_C" >&6
13152 else
13153
13154                 if test "$cross_compiling" = yes; then
13155   cf_cv_typeof_chtype=long
13156 else
13157   cat >conftest.$ac_ext <<_ACEOF
13158 #line 13158 "configure"
13159 #include "confdefs.h"
13160
13161 #define WANT_BITS 31
13162 #include <stdio.h>
13163 int main()
13164 {
13165         FILE *fp = fopen("cf_test.out", "w");
13166         if (fp != 0) {
13167                 char *result = "long";
13168                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13169                         int n;
13170                         unsigned int x, y;
13171                         for (n = 0; n < WANT_BITS; n++) {
13172                                 x = (1 << n);
13173                                 y = (x >> n);
13174                                 if (y != 1 || x == 0) {
13175                                         x = 0;
13176                                         break;
13177                                 }
13178                         }
13179                         /*
13180                          * If x is nonzero, an int is big enough for the bits
13181                          * that we want.
13182                          */
13183                         result = (x != 0) ? "int" : "long";
13184                 }
13185                 fputs(result, fp);
13186                 fclose(fp);
13187         }
13188         ${cf_cv_main_return:-return}(0);
13189 }
13190
13191 _ACEOF
13192 rm -f conftest$ac_exeext
13193 if { (eval echo "$as_me:13193: \"$ac_link\"") >&5
13194   (eval $ac_link) 2>&5
13195   ac_status=$?
13196   echo "$as_me:13196: \$? = $ac_status" >&5
13197   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13198   { (eval echo "$as_me:13198: \"$ac_try\"") >&5
13199   (eval $ac_try) 2>&5
13200   ac_status=$?
13201   echo "$as_me:13201: \$? = $ac_status" >&5
13202   (exit $ac_status); }; }; then
13203   cf_cv_typeof_chtype=`cat cf_test.out`
13204 else
13205   echo "$as_me: program exited with status $ac_status" >&5
13206 echo "$as_me: failed program was:" >&5
13207 cat conftest.$ac_ext >&5
13208 cf_cv_typeof_chtype=long
13209 fi
13210 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13211 fi
13212                 rm -f cf_test.out
13213
13214 fi
13215
13216 echo "$as_me:13216: result: $cf_cv_typeof_chtype" >&5
13217 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13218
13219 cat >>confdefs.h <<EOF
13220 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13221 EOF
13222
13223 else
13224         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13225 fi
13226 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13227
13228 echo "$as_me:13228: checking if unsigned literals are legal" >&5
13229 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13230 if test "${cf_cv_unsigned_literals+set}" = set; then
13231   echo $ECHO_N "(cached) $ECHO_C" >&6
13232 else
13233
13234         cat >conftest.$ac_ext <<_ACEOF
13235 #line 13235 "configure"
13236 #include "confdefs.h"
13237
13238 int
13239 main ()
13240 {
13241 long x = 1L + 1UL + 1U + 1
13242   ;
13243   return 0;
13244 }
13245 _ACEOF
13246 rm -f conftest.$ac_objext
13247 if { (eval echo "$as_me:13247: \"$ac_compile\"") >&5
13248   (eval $ac_compile) 2>&5
13249   ac_status=$?
13250   echo "$as_me:13250: \$? = $ac_status" >&5
13251   (exit $ac_status); } &&
13252          { ac_try='test -s conftest.$ac_objext'
13253   { (eval echo "$as_me:13253: \"$ac_try\"") >&5
13254   (eval $ac_try) 2>&5
13255   ac_status=$?
13256   echo "$as_me:13256: \$? = $ac_status" >&5
13257   (exit $ac_status); }; }; then
13258   cf_cv_unsigned_literals=yes
13259 else
13260   echo "$as_me: failed program was:" >&5
13261 cat conftest.$ac_ext >&5
13262 cf_cv_unsigned_literals=no
13263 fi
13264 rm -f conftest.$ac_objext conftest.$ac_ext
13265
13266 fi
13267
13268 echo "$as_me:13268: result: $cf_cv_unsigned_literals" >&5
13269 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13270
13271 cf_cv_1UL="1"
13272 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13273 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13274
13275 if test $NCURSES_MMASK_T = auto ; then
13276         cf_cv_typeof_mmask_t=long
13277 else
13278         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13279 fi
13280 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13281
13282 ###     Checks for external-data
13283
13284 echo "$as_me:13284: checking if external errno is declared" >&5
13285 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13286 if test "${cf_cv_dcl_errno+set}" = set; then
13287   echo $ECHO_N "(cached) $ECHO_C" >&6
13288 else
13289
13290     cat >conftest.$ac_ext <<_ACEOF
13291 #line 13291 "configure"
13292 #include "confdefs.h"
13293
13294 #ifdef HAVE_STDLIB_H
13295 #include <stdlib.h>
13296 #endif
13297 #include <stdio.h>
13298 #include <sys/types.h>
13299 #include <errno.h>
13300 int
13301 main ()
13302 {
13303 int x = (int) errno
13304   ;
13305   return 0;
13306 }
13307 _ACEOF
13308 rm -f conftest.$ac_objext
13309 if { (eval echo "$as_me:13309: \"$ac_compile\"") >&5
13310   (eval $ac_compile) 2>&5
13311   ac_status=$?
13312   echo "$as_me:13312: \$? = $ac_status" >&5
13313   (exit $ac_status); } &&
13314          { ac_try='test -s conftest.$ac_objext'
13315   { (eval echo "$as_me:13315: \"$ac_try\"") >&5
13316   (eval $ac_try) 2>&5
13317   ac_status=$?
13318   echo "$as_me:13318: \$? = $ac_status" >&5
13319   (exit $ac_status); }; }; then
13320   cf_cv_dcl_errno=yes
13321 else
13322   echo "$as_me: failed program was:" >&5
13323 cat conftest.$ac_ext >&5
13324 cf_cv_dcl_errno=no
13325 fi
13326 rm -f conftest.$ac_objext conftest.$ac_ext
13327
13328 fi
13329 echo "$as_me:13329: result: $cf_cv_dcl_errno" >&5
13330 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13331
13332 if test "$cf_cv_dcl_errno" = no ; then
13333
13334 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13335
13336     cat >>confdefs.h <<EOF
13337 #define $cf_result 1
13338 EOF
13339
13340 fi
13341
13342 # It's possible (for near-UNIX clones) that the data doesn't exist
13343
13344 echo "$as_me:13344: checking if external errno exists" >&5
13345 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13346 if test "${cf_cv_have_errno+set}" = set; then
13347   echo $ECHO_N "(cached) $ECHO_C" >&6
13348 else
13349
13350     cat >conftest.$ac_ext <<_ACEOF
13351 #line 13351 "configure"
13352 #include "confdefs.h"
13353
13354 #undef errno
13355 extern int errno;
13356
13357 int
13358 main ()
13359 {
13360 errno = 2
13361   ;
13362   return 0;
13363 }
13364 _ACEOF
13365 rm -f conftest.$ac_objext conftest$ac_exeext
13366 if { (eval echo "$as_me:13366: \"$ac_link\"") >&5
13367   (eval $ac_link) 2>&5
13368   ac_status=$?
13369   echo "$as_me:13369: \$? = $ac_status" >&5
13370   (exit $ac_status); } &&
13371          { ac_try='test -s conftest$ac_exeext'
13372   { (eval echo "$as_me:13372: \"$ac_try\"") >&5
13373   (eval $ac_try) 2>&5
13374   ac_status=$?
13375   echo "$as_me:13375: \$? = $ac_status" >&5
13376   (exit $ac_status); }; }; then
13377   cf_cv_have_errno=yes
13378 else
13379   echo "$as_me: failed program was:" >&5
13380 cat conftest.$ac_ext >&5
13381 cf_cv_have_errno=no
13382 fi
13383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13384
13385 fi
13386 echo "$as_me:13386: result: $cf_cv_have_errno" >&5
13387 echo "${ECHO_T}$cf_cv_have_errno" >&6
13388
13389 if test "$cf_cv_have_errno" = yes ; then
13390
13391 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13392
13393     cat >>confdefs.h <<EOF
13394 #define $cf_result 1
13395 EOF
13396
13397 fi
13398
13399 echo "$as_me:13399: checking if data-only library module links" >&5
13400 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13401 if test "${cf_cv_link_dataonly+set}" = set; then
13402   echo $ECHO_N "(cached) $ECHO_C" >&6
13403 else
13404
13405         rm -f conftest.a
13406         cat >conftest.$ac_ext <<EOF
13407 #line 13407 "configure"
13408 int     testdata[3] = { 123, 456, 789 };
13409 EOF
13410         if { (eval echo "$as_me:13410: \"$ac_compile\"") >&5
13411   (eval $ac_compile) 2>&5
13412   ac_status=$?
13413   echo "$as_me:13413: \$? = $ac_status" >&5
13414   (exit $ac_status); } ; then
13415                 mv conftest.o data.o && \
13416                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13417         fi
13418         rm -f conftest.$ac_ext data.o
13419         cat >conftest.$ac_ext <<EOF
13420 #line 13420 "configure"
13421 int     testfunc()
13422 {
13423 #if defined(NeXT)
13424         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13425 #else
13426         extern int testdata[3];
13427         return testdata[0] == 123
13428            &&  testdata[1] == 456
13429            &&  testdata[2] == 789;
13430 #endif
13431 }
13432 EOF
13433         if { (eval echo "$as_me:13433: \"$ac_compile\"") >&5
13434   (eval $ac_compile) 2>&5
13435   ac_status=$?
13436   echo "$as_me:13436: \$? = $ac_status" >&5
13437   (exit $ac_status); }; then
13438                 mv conftest.o func.o && \
13439                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13440         fi
13441         rm -f conftest.$ac_ext func.o
13442         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13443         cf_saveLIBS="$LIBS"
13444         LIBS="conftest.a $LIBS"
13445         if test "$cross_compiling" = yes; then
13446   cf_cv_link_dataonly=unknown
13447 else
13448   cat >conftest.$ac_ext <<_ACEOF
13449 #line 13449 "configure"
13450 #include "confdefs.h"
13451
13452         int main()
13453         {
13454                 extern int testfunc();
13455                 ${cf_cv_main_return:-return} (!testfunc());
13456         }
13457
13458 _ACEOF
13459 rm -f conftest$ac_exeext
13460 if { (eval echo "$as_me:13460: \"$ac_link\"") >&5
13461   (eval $ac_link) 2>&5
13462   ac_status=$?
13463   echo "$as_me:13463: \$? = $ac_status" >&5
13464   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13465   { (eval echo "$as_me:13465: \"$ac_try\"") >&5
13466   (eval $ac_try) 2>&5
13467   ac_status=$?
13468   echo "$as_me:13468: \$? = $ac_status" >&5
13469   (exit $ac_status); }; }; then
13470   cf_cv_link_dataonly=yes
13471 else
13472   echo "$as_me: program exited with status $ac_status" >&5
13473 echo "$as_me: failed program was:" >&5
13474 cat conftest.$ac_ext >&5
13475 cf_cv_link_dataonly=no
13476 fi
13477 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13478 fi
13479         LIBS="$cf_saveLIBS"
13480
13481 fi
13482
13483 echo "$as_me:13483: result: $cf_cv_link_dataonly" >&5
13484 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13485
13486 if test "$cf_cv_link_dataonly" = no ; then
13487         cat >>confdefs.h <<\EOF
13488 #define BROKEN_LINKER 1
13489 EOF
13490
13491         BROKEN_LINKER=1
13492 fi
13493
13494 ###     Checks for library functions.
13495
13496 for ac_func in \
13497 getcwd \
13498 getegid \
13499 geteuid \
13500 getttynam \
13501 issetugid \
13502 poll \
13503 remove \
13504 select \
13505 setbuf \
13506 setbuffer \
13507 setvbuf \
13508 sigaction \
13509 sigvec \
13510 strdup \
13511 strstr \
13512 tcgetpgrp \
13513 times \
13514 vsnprintf \
13515
13516 do
13517 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13518 echo "$as_me:13518: checking for $ac_func" >&5
13519 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13520 if eval "test \"\${$as_ac_var+set}\" = set"; then
13521   echo $ECHO_N "(cached) $ECHO_C" >&6
13522 else
13523   cat >conftest.$ac_ext <<_ACEOF
13524 #line 13524 "configure"
13525 #include "confdefs.h"
13526 /* System header to define __stub macros and hopefully few prototypes,
13527     which can conflict with char $ac_func (); below.  */
13528 #include <assert.h>
13529 /* Override any gcc2 internal prototype to avoid an error.  */
13530 #ifdef __cplusplus
13531 extern "C"
13532 #endif
13533 /* We use char because int might match the return type of a gcc2
13534    builtin and then its argument prototype would still apply.  */
13535 char $ac_func ();
13536 char (*f) ();
13537
13538 int
13539 main ()
13540 {
13541 /* The GNU C library defines this for functions which it implements
13542     to always fail with ENOSYS.  Some functions are actually named
13543     something starting with __ and the normal name is an alias.  */
13544 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13545 choke me
13546 #else
13547 f = $ac_func;
13548 #endif
13549
13550   ;
13551   return 0;
13552 }
13553 _ACEOF
13554 rm -f conftest.$ac_objext conftest$ac_exeext
13555 if { (eval echo "$as_me:13555: \"$ac_link\"") >&5
13556   (eval $ac_link) 2>&5
13557   ac_status=$?
13558   echo "$as_me:13558: \$? = $ac_status" >&5
13559   (exit $ac_status); } &&
13560          { ac_try='test -s conftest$ac_exeext'
13561   { (eval echo "$as_me:13561: \"$ac_try\"") >&5
13562   (eval $ac_try) 2>&5
13563   ac_status=$?
13564   echo "$as_me:13564: \$? = $ac_status" >&5
13565   (exit $ac_status); }; }; then
13566   eval "$as_ac_var=yes"
13567 else
13568   echo "$as_me: failed program was:" >&5
13569 cat conftest.$ac_ext >&5
13570 eval "$as_ac_var=no"
13571 fi
13572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13573 fi
13574 echo "$as_me:13574: result: `eval echo '${'$as_ac_var'}'`" >&5
13575 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13576 if test `eval echo '${'$as_ac_var'}'` = yes; then
13577   cat >>confdefs.h <<EOF
13578 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13579 EOF
13580
13581 fi
13582 done
13583
13584 if test "$with_getcap" = "yes" ; then
13585
13586 echo "$as_me:13586: checking for terminal-capability database functions" >&5
13587 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13588 if test "${cf_cv_cgetent+set}" = set; then
13589   echo $ECHO_N "(cached) $ECHO_C" >&6
13590 else
13591
13592 cat >conftest.$ac_ext <<_ACEOF
13593 #line 13593 "configure"
13594 #include "confdefs.h"
13595
13596 #include <stdlib.h>
13597 int
13598 main ()
13599 {
13600
13601         char temp[128];
13602         char *buf = temp;
13603         char *db_array = temp;
13604         cgetent(&buf, /* int *, */ &db_array, "vt100");
13605         cgetcap(buf, "tc", '=');
13606         cgetmatch(buf, "tc");
13607
13608   ;
13609   return 0;
13610 }
13611 _ACEOF
13612 rm -f conftest.$ac_objext conftest$ac_exeext
13613 if { (eval echo "$as_me:13613: \"$ac_link\"") >&5
13614   (eval $ac_link) 2>&5
13615   ac_status=$?
13616   echo "$as_me:13616: \$? = $ac_status" >&5
13617   (exit $ac_status); } &&
13618          { ac_try='test -s conftest$ac_exeext'
13619   { (eval echo "$as_me:13619: \"$ac_try\"") >&5
13620   (eval $ac_try) 2>&5
13621   ac_status=$?
13622   echo "$as_me:13622: \$? = $ac_status" >&5
13623   (exit $ac_status); }; }; then
13624   cf_cv_cgetent=yes
13625 else
13626   echo "$as_me: failed program was:" >&5
13627 cat conftest.$ac_ext >&5
13628 cf_cv_cgetent=no
13629 fi
13630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13631
13632 fi
13633
13634 echo "$as_me:13634: result: $cf_cv_cgetent" >&5
13635 echo "${ECHO_T}$cf_cv_cgetent" >&6
13636 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13637 #define HAVE_BSD_CGETENT 1
13638 EOF
13639
13640 fi
13641
13642 echo "$as_me:13642: checking for isascii" >&5
13643 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13644 if test "${cf_cv_have_isascii+set}" = set; then
13645   echo $ECHO_N "(cached) $ECHO_C" >&6
13646 else
13647
13648         cat >conftest.$ac_ext <<_ACEOF
13649 #line 13649 "configure"
13650 #include "confdefs.h"
13651 #include <ctype.h>
13652 int
13653 main ()
13654 {
13655 int x = isascii(' ')
13656   ;
13657   return 0;
13658 }
13659 _ACEOF
13660 rm -f conftest.$ac_objext conftest$ac_exeext
13661 if { (eval echo "$as_me:13661: \"$ac_link\"") >&5
13662   (eval $ac_link) 2>&5
13663   ac_status=$?
13664   echo "$as_me:13664: \$? = $ac_status" >&5
13665   (exit $ac_status); } &&
13666          { ac_try='test -s conftest$ac_exeext'
13667   { (eval echo "$as_me:13667: \"$ac_try\"") >&5
13668   (eval $ac_try) 2>&5
13669   ac_status=$?
13670   echo "$as_me:13670: \$? = $ac_status" >&5
13671   (exit $ac_status); }; }; then
13672   cf_cv_have_isascii=yes
13673 else
13674   echo "$as_me: failed program was:" >&5
13675 cat conftest.$ac_ext >&5
13676 cf_cv_have_isascii=no
13677 fi
13678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13679
13680 fi
13681 echo "$as_me:13681: result: $cf_cv_have_isascii" >&5
13682 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13683 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13684 #define HAVE_ISASCII 1
13685 EOF
13686
13687 if test "$ac_cv_func_sigaction" = yes; then
13688 echo "$as_me:13688: checking whether sigaction needs _POSIX_SOURCE" >&5
13689 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13690 cat >conftest.$ac_ext <<_ACEOF
13691 #line 13691 "configure"
13692 #include "confdefs.h"
13693
13694 #include <sys/types.h>
13695 #include <signal.h>
13696 int
13697 main ()
13698 {
13699 struct sigaction act
13700   ;
13701   return 0;
13702 }
13703 _ACEOF
13704 rm -f conftest.$ac_objext
13705 if { (eval echo "$as_me:13705: \"$ac_compile\"") >&5
13706   (eval $ac_compile) 2>&5
13707   ac_status=$?
13708   echo "$as_me:13708: \$? = $ac_status" >&5
13709   (exit $ac_status); } &&
13710          { ac_try='test -s conftest.$ac_objext'
13711   { (eval echo "$as_me:13711: \"$ac_try\"") >&5
13712   (eval $ac_try) 2>&5
13713   ac_status=$?
13714   echo "$as_me:13714: \$? = $ac_status" >&5
13715   (exit $ac_status); }; }; then
13716   sigact_bad=no
13717 else
13718   echo "$as_me: failed program was:" >&5
13719 cat conftest.$ac_ext >&5
13720
13721 cat >conftest.$ac_ext <<_ACEOF
13722 #line 13722 "configure"
13723 #include "confdefs.h"
13724
13725 #define _POSIX_SOURCE
13726 #include <sys/types.h>
13727 #include <signal.h>
13728 int
13729 main ()
13730 {
13731 struct sigaction act
13732   ;
13733   return 0;
13734 }
13735 _ACEOF
13736 rm -f conftest.$ac_objext
13737 if { (eval echo "$as_me:13737: \"$ac_compile\"") >&5
13738   (eval $ac_compile) 2>&5
13739   ac_status=$?
13740   echo "$as_me:13740: \$? = $ac_status" >&5
13741   (exit $ac_status); } &&
13742          { ac_try='test -s conftest.$ac_objext'
13743   { (eval echo "$as_me:13743: \"$ac_try\"") >&5
13744   (eval $ac_try) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit $ac_status); }; }; then
13748   sigact_bad=yes
13749          cat >>confdefs.h <<\EOF
13750 #define SVR4_ACTION 1
13751 EOF
13752
13753 else
13754   echo "$as_me: failed program was:" >&5
13755 cat conftest.$ac_ext >&5
13756 sigact_bad=unknown
13757 fi
13758 rm -f conftest.$ac_objext conftest.$ac_ext
13759 fi
13760 rm -f conftest.$ac_objext conftest.$ac_ext
13761 echo "$as_me:13761: result: $sigact_bad" >&5
13762 echo "${ECHO_T}$sigact_bad" >&6
13763 fi
13764
13765 echo "$as_me:13765: checking if nanosleep really works" >&5
13766 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13767 if test "${cf_cv_func_nanosleep+set}" = set; then
13768   echo $ECHO_N "(cached) $ECHO_C" >&6
13769 else
13770
13771 if test "$cross_compiling" = yes; then
13772   cf_cv_func_nanosleep=unknown
13773 else
13774   cat >conftest.$ac_ext <<_ACEOF
13775 #line 13775 "configure"
13776 #include "confdefs.h"
13777
13778 #include <stdio.h>
13779 #include <errno.h>
13780 #include <time.h>
13781
13782 #ifdef HAVE_SYS_TIME_H
13783 #include <sys/time.h>
13784 #endif
13785
13786 int main() {
13787         struct timespec ts1, ts2;
13788         int code;
13789         ts1.tv_sec  = 0;
13790         ts1.tv_nsec = 750000000;
13791         ts2.tv_sec  = 0;
13792         ts2.tv_nsec = 0;
13793         errno = 0;
13794         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13795         ${cf_cv_main_return:-return}(code != 0);
13796 }
13797
13798 _ACEOF
13799 rm -f conftest$ac_exeext
13800 if { (eval echo "$as_me:13800: \"$ac_link\"") >&5
13801   (eval $ac_link) 2>&5
13802   ac_status=$?
13803   echo "$as_me:13803: \$? = $ac_status" >&5
13804   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13805   { (eval echo "$as_me:13805: \"$ac_try\"") >&5
13806   (eval $ac_try) 2>&5
13807   ac_status=$?
13808   echo "$as_me:13808: \$? = $ac_status" >&5
13809   (exit $ac_status); }; }; then
13810   cf_cv_func_nanosleep=yes
13811 else
13812   echo "$as_me: program exited with status $ac_status" >&5
13813 echo "$as_me: failed program was:" >&5
13814 cat conftest.$ac_ext >&5
13815 cf_cv_func_nanosleep=no
13816 fi
13817 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13818 fi
13819 fi
13820 echo "$as_me:13820: result: $cf_cv_func_nanosleep" >&5
13821 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13822
13823 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13824 #define HAVE_NANOSLEEP 1
13825 EOF
13826
13827 for ac_header in \
13828 termio.h \
13829 termios.h \
13830 unistd.h \
13831
13832 do
13833 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13834 echo "$as_me:13834: checking for $ac_header" >&5
13835 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13836 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13837   echo $ECHO_N "(cached) $ECHO_C" >&6
13838 else
13839   cat >conftest.$ac_ext <<_ACEOF
13840 #line 13840 "configure"
13841 #include "confdefs.h"
13842 #include <$ac_header>
13843 _ACEOF
13844 if { (eval echo "$as_me:13844: \"$ac_cpp conftest.$ac_ext\"") >&5
13845   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13846   ac_status=$?
13847   egrep -v '^ *\+' conftest.er1 >conftest.err
13848   rm -f conftest.er1
13849   cat conftest.err >&5
13850   echo "$as_me:13850: \$? = $ac_status" >&5
13851   (exit $ac_status); } >/dev/null; then
13852   if test -s conftest.err; then
13853     ac_cpp_err=$ac_c_preproc_warn_flag
13854   else
13855     ac_cpp_err=
13856   fi
13857 else
13858   ac_cpp_err=yes
13859 fi
13860 if test -z "$ac_cpp_err"; then
13861   eval "$as_ac_Header=yes"
13862 else
13863   echo "$as_me: failed program was:" >&5
13864   cat conftest.$ac_ext >&5
13865   eval "$as_ac_Header=no"
13866 fi
13867 rm -f conftest.err conftest.$ac_ext
13868 fi
13869 echo "$as_me:13869: result: `eval echo '${'$as_ac_Header'}'`" >&5
13870 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13872   cat >>confdefs.h <<EOF
13873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13874 EOF
13875
13876 fi
13877 done
13878
13879 if test "$ISC" = yes ; then
13880
13881 for ac_header in sys/termio.h
13882 do
13883 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13884 echo "$as_me:13884: checking for $ac_header" >&5
13885 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13886 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13887   echo $ECHO_N "(cached) $ECHO_C" >&6
13888 else
13889   cat >conftest.$ac_ext <<_ACEOF
13890 #line 13890 "configure"
13891 #include "confdefs.h"
13892 #include <$ac_header>
13893 _ACEOF
13894 if { (eval echo "$as_me:13894: \"$ac_cpp conftest.$ac_ext\"") >&5
13895   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13896   ac_status=$?
13897   egrep -v '^ *\+' conftest.er1 >conftest.err
13898   rm -f conftest.er1
13899   cat conftest.err >&5
13900   echo "$as_me:13900: \$? = $ac_status" >&5
13901   (exit $ac_status); } >/dev/null; then
13902   if test -s conftest.err; then
13903     ac_cpp_err=$ac_c_preproc_warn_flag
13904   else
13905     ac_cpp_err=
13906   fi
13907 else
13908   ac_cpp_err=yes
13909 fi
13910 if test -z "$ac_cpp_err"; then
13911   eval "$as_ac_Header=yes"
13912 else
13913   echo "$as_me: failed program was:" >&5
13914   cat conftest.$ac_ext >&5
13915   eval "$as_ac_Header=no"
13916 fi
13917 rm -f conftest.err conftest.$ac_ext
13918 fi
13919 echo "$as_me:13919: result: `eval echo '${'$as_ac_Header'}'`" >&5
13920 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13921 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13922   cat >>confdefs.h <<EOF
13923 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13924 EOF
13925
13926 fi
13927 done
13928
13929 fi
13930 if test "$ac_cv_header_termios_h" = yes ; then
13931         case "$CFLAGS $CPPFLAGS" in
13932         *-D_POSIX_SOURCE*)
13933                 termios_bad=dunno ;;
13934         *)      termios_bad=maybe ;;
13935         esac
13936         if test "$termios_bad" = maybe ; then
13937         echo "$as_me:13937: checking whether termios.h needs _POSIX_SOURCE" >&5
13938 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13939         cat >conftest.$ac_ext <<_ACEOF
13940 #line 13940 "configure"
13941 #include "confdefs.h"
13942 #include <termios.h>
13943 int
13944 main ()
13945 {
13946 struct termios foo; int x = foo.c_iflag
13947   ;
13948   return 0;
13949 }
13950 _ACEOF
13951 rm -f conftest.$ac_objext
13952 if { (eval echo "$as_me:13952: \"$ac_compile\"") >&5
13953   (eval $ac_compile) 2>&5
13954   ac_status=$?
13955   echo "$as_me:13955: \$? = $ac_status" >&5
13956   (exit $ac_status); } &&
13957          { ac_try='test -s conftest.$ac_objext'
13958   { (eval echo "$as_me:13958: \"$ac_try\"") >&5
13959   (eval $ac_try) 2>&5
13960   ac_status=$?
13961   echo "$as_me:13961: \$? = $ac_status" >&5
13962   (exit $ac_status); }; }; then
13963   termios_bad=no
13964 else
13965   echo "$as_me: failed program was:" >&5
13966 cat conftest.$ac_ext >&5
13967
13968                 cat >conftest.$ac_ext <<_ACEOF
13969 #line 13969 "configure"
13970 #include "confdefs.h"
13971
13972 #define _POSIX_SOURCE
13973 #include <termios.h>
13974 int
13975 main ()
13976 {
13977 struct termios foo; int x = foo.c_iflag
13978   ;
13979   return 0;
13980 }
13981 _ACEOF
13982 rm -f conftest.$ac_objext
13983 if { (eval echo "$as_me:13983: \"$ac_compile\"") >&5
13984   (eval $ac_compile) 2>&5
13985   ac_status=$?
13986   echo "$as_me:13986: \$? = $ac_status" >&5
13987   (exit $ac_status); } &&
13988          { ac_try='test -s conftest.$ac_objext'
13989   { (eval echo "$as_me:13989: \"$ac_try\"") >&5
13990   (eval $ac_try) 2>&5
13991   ac_status=$?
13992   echo "$as_me:13992: \$? = $ac_status" >&5
13993   (exit $ac_status); }; }; then
13994   termios_bad=unknown
13995 else
13996   echo "$as_me: failed program was:" >&5
13997 cat conftest.$ac_ext >&5
13998 termios_bad=yes cat >>confdefs.h <<\EOF
13999 #define SVR4_TERMIO 1
14000 EOF
14001
14002 fi
14003 rm -f conftest.$ac_objext conftest.$ac_ext
14004
14005 fi
14006 rm -f conftest.$ac_objext conftest.$ac_ext
14007         echo "$as_me:14007: result: $termios_bad" >&5
14008 echo "${ECHO_T}$termios_bad" >&6
14009         fi
14010 fi
14011
14012 echo "$as_me:14012: checking for tcgetattr" >&5
14013 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14014 if test "${cf_cv_have_tcgetattr+set}" = set; then
14015   echo $ECHO_N "(cached) $ECHO_C" >&6
14016 else
14017
14018 cat >conftest.$ac_ext <<_ACEOF
14019 #line 14019 "configure"
14020 #include "confdefs.h"
14021
14022 #include <sys/types.h>
14023 #ifdef HAVE_UNISTD_H
14024 #include <unistd.h>
14025 #endif
14026 #ifdef HAVE_TERMIOS_H
14027 #include <termios.h>
14028 #define TTY struct termios
14029 #else
14030 #ifdef HAVE_TERMIO_H
14031 #include <termio.h>
14032 #define TTY struct termio
14033 #endif
14034 #endif
14035
14036 int
14037 main ()
14038 {
14039
14040 TTY foo;
14041 tcgetattr(1, &foo);
14042   ;
14043   return 0;
14044 }
14045 _ACEOF
14046 rm -f conftest.$ac_objext conftest$ac_exeext
14047 if { (eval echo "$as_me:14047: \"$ac_link\"") >&5
14048   (eval $ac_link) 2>&5
14049   ac_status=$?
14050   echo "$as_me:14050: \$? = $ac_status" >&5
14051   (exit $ac_status); } &&
14052          { ac_try='test -s conftest$ac_exeext'
14053   { (eval echo "$as_me:14053: \"$ac_try\"") >&5
14054   (eval $ac_try) 2>&5
14055   ac_status=$?
14056   echo "$as_me:14056: \$? = $ac_status" >&5
14057   (exit $ac_status); }; }; then
14058   cf_cv_have_tcgetattr=yes
14059 else
14060   echo "$as_me: failed program was:" >&5
14061 cat conftest.$ac_ext >&5
14062 cf_cv_have_tcgetattr=no
14063 fi
14064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14065 fi
14066 echo "$as_me:14066: result: $cf_cv_have_tcgetattr" >&5
14067 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14068 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14069 #define HAVE_TCGETATTR 1
14070 EOF
14071
14072 echo "$as_me:14072: checking for vsscanf function or workaround" >&5
14073 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14074 if test "${cf_cv_func_vsscanf+set}" = set; then
14075   echo $ECHO_N "(cached) $ECHO_C" >&6
14076 else
14077
14078 cat >conftest.$ac_ext <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14081
14082 #include <stdarg.h>
14083 #include <stdio.h>
14084 int
14085 main ()
14086 {
14087
14088         va_list ap;
14089         vsscanf("from", "%d", ap)
14090   ;
14091   return 0;
14092 }
14093 _ACEOF
14094 rm -f conftest.$ac_objext conftest$ac_exeext
14095 if { (eval echo "$as_me:14095: \"$ac_link\"") >&5
14096   (eval $ac_link) 2>&5
14097   ac_status=$?
14098   echo "$as_me:14098: \$? = $ac_status" >&5
14099   (exit $ac_status); } &&
14100          { ac_try='test -s conftest$ac_exeext'
14101   { (eval echo "$as_me:14101: \"$ac_try\"") >&5
14102   (eval $ac_try) 2>&5
14103   ac_status=$?
14104   echo "$as_me:14104: \$? = $ac_status" >&5
14105   (exit $ac_status); }; }; then
14106   cf_cv_func_vsscanf=vsscanf
14107 else
14108   echo "$as_me: failed program was:" >&5
14109 cat conftest.$ac_ext >&5
14110
14111 cat >conftest.$ac_ext <<_ACEOF
14112 #line 14112 "configure"
14113 #include "confdefs.h"
14114
14115 #include <stdarg.h>
14116 #include <stdio.h>
14117 int
14118 main ()
14119 {
14120
14121     FILE strbuf;
14122     char *str = "from";
14123
14124     strbuf._flag = _IOREAD;
14125     strbuf._ptr = strbuf._base = (unsigned char *) str;
14126     strbuf._cnt = strlen(str);
14127     strbuf._file = _NFILE;
14128     return (vfscanf(&strbuf, "%d", ap))
14129   ;
14130   return 0;
14131 }
14132 _ACEOF
14133 rm -f conftest.$ac_objext conftest$ac_exeext
14134 if { (eval echo "$as_me:14134: \"$ac_link\"") >&5
14135   (eval $ac_link) 2>&5
14136   ac_status=$?
14137   echo "$as_me:14137: \$? = $ac_status" >&5
14138   (exit $ac_status); } &&
14139          { ac_try='test -s conftest$ac_exeext'
14140   { (eval echo "$as_me:14140: \"$ac_try\"") >&5
14141   (eval $ac_try) 2>&5
14142   ac_status=$?
14143   echo "$as_me:14143: \$? = $ac_status" >&5
14144   (exit $ac_status); }; }; then
14145   cf_cv_func_vsscanf=vfscanf
14146 else
14147   echo "$as_me: failed program was:" >&5
14148 cat conftest.$ac_ext >&5
14149
14150 cat >conftest.$ac_ext <<_ACEOF
14151 #line 14151 "configure"
14152 #include "confdefs.h"
14153
14154 #include <stdarg.h>
14155 #include <stdio.h>
14156 int
14157 main ()
14158 {
14159
14160     FILE strbuf;
14161     char *str = "from";
14162
14163     strbuf._flag = _IOREAD;
14164     strbuf._ptr = strbuf._base = (unsigned char *) str;
14165     strbuf._cnt = strlen(str);
14166     strbuf._file = _NFILE;
14167     return (_doscan(&strbuf, "%d", ap))
14168   ;
14169   return 0;
14170 }
14171 _ACEOF
14172 rm -f conftest.$ac_objext conftest$ac_exeext
14173 if { (eval echo "$as_me:14173: \"$ac_link\"") >&5
14174   (eval $ac_link) 2>&5
14175   ac_status=$?
14176   echo "$as_me:14176: \$? = $ac_status" >&5
14177   (exit $ac_status); } &&
14178          { ac_try='test -s conftest$ac_exeext'
14179   { (eval echo "$as_me:14179: \"$ac_try\"") >&5
14180   (eval $ac_try) 2>&5
14181   ac_status=$?
14182   echo "$as_me:14182: \$? = $ac_status" >&5
14183   (exit $ac_status); }; }; then
14184   cf_cv_func_vsscanf=_doscan
14185 else
14186   echo "$as_me: failed program was:" >&5
14187 cat conftest.$ac_ext >&5
14188
14189 cf_cv_func_vsscanf=no
14190 fi
14191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14192 fi
14193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14194 fi
14195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14196 fi
14197 echo "$as_me:14197: result: $cf_cv_func_vsscanf" >&5
14198 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14199
14200 case $cf_cv_func_vsscanf in #(vi
14201 vsscanf) cat >>confdefs.h <<\EOF
14202 #define HAVE_VSSCANF 1
14203 EOF
14204 ;; #(vi
14205 vfscanf) cat >>confdefs.h <<\EOF
14206 #define HAVE_VFSCANF 1
14207 EOF
14208 ;; #(vi
14209 _doscan) cat >>confdefs.h <<\EOF
14210 #define HAVE__DOSCAN 1
14211 EOF
14212 ;;
14213 esac
14214
14215 echo "$as_me:14215: checking for working mkstemp" >&5
14216 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14217 if test "${cf_cv_func_mkstemp+set}" = set; then
14218   echo $ECHO_N "(cached) $ECHO_C" >&6
14219 else
14220
14221 rm -f conftest*
14222 if test "$cross_compiling" = yes; then
14223   echo "$as_me:14223: checking for mkstemp" >&5
14224 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14225 if test "${ac_cv_func_mkstemp+set}" = set; then
14226   echo $ECHO_N "(cached) $ECHO_C" >&6
14227 else
14228   cat >conftest.$ac_ext <<_ACEOF
14229 #line 14229 "configure"
14230 #include "confdefs.h"
14231 /* System header to define __stub macros and hopefully few prototypes,
14232     which can conflict with char mkstemp (); below.  */
14233 #include <assert.h>
14234 /* Override any gcc2 internal prototype to avoid an error.  */
14235 #ifdef __cplusplus
14236 extern "C"
14237 #endif
14238 /* We use char because int might match the return type of a gcc2
14239    builtin and then its argument prototype would still apply.  */
14240 char mkstemp ();
14241 char (*f) ();
14242
14243 int
14244 main ()
14245 {
14246 /* The GNU C library defines this for functions which it implements
14247     to always fail with ENOSYS.  Some functions are actually named
14248     something starting with __ and the normal name is an alias.  */
14249 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14250 choke me
14251 #else
14252 f = mkstemp;
14253 #endif
14254
14255   ;
14256   return 0;
14257 }
14258 _ACEOF
14259 rm -f conftest.$ac_objext conftest$ac_exeext
14260 if { (eval echo "$as_me:14260: \"$ac_link\"") >&5
14261   (eval $ac_link) 2>&5
14262   ac_status=$?
14263   echo "$as_me:14263: \$? = $ac_status" >&5
14264   (exit $ac_status); } &&
14265          { ac_try='test -s conftest$ac_exeext'
14266   { (eval echo "$as_me:14266: \"$ac_try\"") >&5
14267   (eval $ac_try) 2>&5
14268   ac_status=$?
14269   echo "$as_me:14269: \$? = $ac_status" >&5
14270   (exit $ac_status); }; }; then
14271   ac_cv_func_mkstemp=yes
14272 else
14273   echo "$as_me: failed program was:" >&5
14274 cat conftest.$ac_ext >&5
14275 ac_cv_func_mkstemp=no
14276 fi
14277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14278 fi
14279 echo "$as_me:14279: result: $ac_cv_func_mkstemp" >&5
14280 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14281
14282 else
14283   cat >conftest.$ac_ext <<_ACEOF
14284 #line 14284 "configure"
14285 #include "confdefs.h"
14286
14287 #include <sys/types.h>
14288 #include <stdlib.h>
14289 #include <stdio.h>
14290 #include <string.h>
14291 #include <sys/stat.h>
14292 int main()
14293 {
14294         char *tmpl = "conftestXXXXXX";
14295         char name[2][80];
14296         int n;
14297         int result = 0;
14298         int fd;
14299         struct stat sb;
14300
14301         umask(077);
14302         for (n = 0; n < 2; ++n) {
14303                 strcpy(name[n], tmpl);
14304                 if ((fd = mkstemp(name[n])) >= 0) {
14305                         if (!strcmp(name[n], tmpl)
14306                          || stat(name[n], &sb) != 0
14307                          || (sb.st_mode & S_IFMT) != S_IFREG
14308                          || (sb.st_mode & 077) != 0) {
14309                                 result = 1;
14310                         }
14311                         close(fd);
14312                 }
14313         }
14314         if (result == 0
14315          && !strcmp(name[0], name[1]))
14316                 result = 1;
14317         ${cf_cv_main_return:-return}(result);
14318 }
14319
14320 _ACEOF
14321 rm -f conftest$ac_exeext
14322 if { (eval echo "$as_me:14322: \"$ac_link\"") >&5
14323   (eval $ac_link) 2>&5
14324   ac_status=$?
14325   echo "$as_me:14325: \$? = $ac_status" >&5
14326   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14327   { (eval echo "$as_me:14327: \"$ac_try\"") >&5
14328   (eval $ac_try) 2>&5
14329   ac_status=$?
14330   echo "$as_me:14330: \$? = $ac_status" >&5
14331   (exit $ac_status); }; }; then
14332   cf_cv_func_mkstemp=yes
14333
14334 else
14335   echo "$as_me: program exited with status $ac_status" >&5
14336 echo "$as_me: failed program was:" >&5
14337 cat conftest.$ac_ext >&5
14338 cf_cv_func_mkstemp=no
14339
14340 fi
14341 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14342 fi
14343
14344 fi
14345 echo "$as_me:14345: result: $cf_cv_func_mkstemp" >&5
14346 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14347 if test "$cf_cv_func_mkstemp" = yes ; then
14348         cat >>confdefs.h <<\EOF
14349 #define HAVE_MKSTEMP 1
14350 EOF
14351
14352 fi
14353
14354 # setup for prototype of fallback for vsscanf()
14355
14356 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14357         HAVE_VSSCANF=1
14358 else
14359         HAVE_VSSCANF=0
14360 fi
14361
14362 if test "$cross_compiling" = yes ; then
14363         { echo "$as_me:14363: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14364 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14365 else
14366         echo "$as_me:14366: checking whether setvbuf arguments are reversed" >&5
14367 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14368 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14369   echo $ECHO_N "(cached) $ECHO_C" >&6
14370 else
14371   if test "$cross_compiling" = yes; then
14372   { { echo "$as_me:14372: error: cannot run test program while cross compiling" >&5
14373 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14374    { (exit 1); exit 1; }; }
14375 else
14376   cat >conftest.$ac_ext <<_ACEOF
14377 #line 14377 "configure"
14378 #include "confdefs.h"
14379 #include <stdio.h>
14380 /* If setvbuf has the reversed format, exit 0. */
14381 int
14382 main ()
14383 {
14384   /* This call has the arguments reversed.
14385      A reversed system may check and see that the address of main
14386      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14387   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14388     $ac_main_return(1);
14389   putc('\r', stdout);
14390   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14391 }
14392 _ACEOF
14393 rm -f conftest$ac_exeext
14394 if { (eval echo "$as_me:14394: \"$ac_link\"") >&5
14395   (eval $ac_link) 2>&5
14396   ac_status=$?
14397   echo "$as_me:14397: \$? = $ac_status" >&5
14398   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14399   { (eval echo "$as_me:14399: \"$ac_try\"") >&5
14400   (eval $ac_try) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); }; }; then
14404   ac_cv_func_setvbuf_reversed=yes
14405 else
14406   echo "$as_me: program exited with status $ac_status" >&5
14407 echo "$as_me: failed program was:" >&5
14408 cat conftest.$ac_ext >&5
14409 ac_cv_func_setvbuf_reversed=no
14410 fi
14411 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14412 fi
14413 rm -f core core.* *.core
14414 fi
14415 echo "$as_me:14415: result: $ac_cv_func_setvbuf_reversed" >&5
14416 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14417 if test $ac_cv_func_setvbuf_reversed = yes; then
14418
14419 cat >>confdefs.h <<\EOF
14420 #define SETVBUF_REVERSED 1
14421 EOF
14422
14423 fi
14424
14425 fi
14426 echo "$as_me:14426: checking return type of signal handlers" >&5
14427 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14428 if test "${ac_cv_type_signal+set}" = set; then
14429   echo $ECHO_N "(cached) $ECHO_C" >&6
14430 else
14431   cat >conftest.$ac_ext <<_ACEOF
14432 #line 14432 "configure"
14433 #include "confdefs.h"
14434 #include <sys/types.h>
14435 #include <signal.h>
14436 #ifdef signal
14437 # undef signal
14438 #endif
14439 #ifdef __cplusplus
14440 extern "C" void (*signal (int, void (*)(int)))(int);
14441 #else
14442 void (*signal ()) ();
14443 #endif
14444
14445 int
14446 main ()
14447 {
14448 int i;
14449   ;
14450   return 0;
14451 }
14452 _ACEOF
14453 rm -f conftest.$ac_objext
14454 if { (eval echo "$as_me:14454: \"$ac_compile\"") >&5
14455   (eval $ac_compile) 2>&5
14456   ac_status=$?
14457   echo "$as_me:14457: \$? = $ac_status" >&5
14458   (exit $ac_status); } &&
14459          { ac_try='test -s conftest.$ac_objext'
14460   { (eval echo "$as_me:14460: \"$ac_try\"") >&5
14461   (eval $ac_try) 2>&5
14462   ac_status=$?
14463   echo "$as_me:14463: \$? = $ac_status" >&5
14464   (exit $ac_status); }; }; then
14465   ac_cv_type_signal=void
14466 else
14467   echo "$as_me: failed program was:" >&5
14468 cat conftest.$ac_ext >&5
14469 ac_cv_type_signal=int
14470 fi
14471 rm -f conftest.$ac_objext conftest.$ac_ext
14472 fi
14473 echo "$as_me:14473: result: $ac_cv_type_signal" >&5
14474 echo "${ECHO_T}$ac_cv_type_signal" >&6
14475
14476 cat >>confdefs.h <<EOF
14477 #define RETSIGTYPE $ac_cv_type_signal
14478 EOF
14479
14480 echo "$as_me:14480: checking for type sigaction_t" >&5
14481 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14482 if test "${cf_cv_type_sigaction+set}" = set; then
14483   echo $ECHO_N "(cached) $ECHO_C" >&6
14484 else
14485
14486         cat >conftest.$ac_ext <<_ACEOF
14487 #line 14487 "configure"
14488 #include "confdefs.h"
14489
14490 #include <signal.h>
14491 int
14492 main ()
14493 {
14494 sigaction_t x
14495   ;
14496   return 0;
14497 }
14498 _ACEOF
14499 rm -f conftest.$ac_objext
14500 if { (eval echo "$as_me:14500: \"$ac_compile\"") >&5
14501   (eval $ac_compile) 2>&5
14502   ac_status=$?
14503   echo "$as_me:14503: \$? = $ac_status" >&5
14504   (exit $ac_status); } &&
14505          { ac_try='test -s conftest.$ac_objext'
14506   { (eval echo "$as_me:14506: \"$ac_try\"") >&5
14507   (eval $ac_try) 2>&5
14508   ac_status=$?
14509   echo "$as_me:14509: \$? = $ac_status" >&5
14510   (exit $ac_status); }; }; then
14511   cf_cv_type_sigaction=yes
14512 else
14513   echo "$as_me: failed program was:" >&5
14514 cat conftest.$ac_ext >&5
14515 cf_cv_type_sigaction=no
14516 fi
14517 rm -f conftest.$ac_objext conftest.$ac_ext
14518 fi
14519
14520 echo "$as_me:14520: result: $cf_cv_type_sigaction" >&5
14521 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14522 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14523 #define HAVE_TYPE_SIGACTION 1
14524 EOF
14525
14526 echo "$as_me:14526: checking declaration of size-change" >&5
14527 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14528 if test "${cf_cv_sizechange+set}" = set; then
14529   echo $ECHO_N "(cached) $ECHO_C" >&6
14530 else
14531
14532     cf_cv_sizechange=unknown
14533     cf_save_CPPFLAGS="$CPPFLAGS"
14534
14535 for cf_opts in "" "NEED_PTEM_H"
14536 do
14537
14538     CPPFLAGS="$cf_save_CPPFLAGS"
14539     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14540     cat >conftest.$ac_ext <<_ACEOF
14541 #line 14541 "configure"
14542 #include "confdefs.h"
14543 #include <sys/types.h>
14544 #ifdef HAVE_TERMIOS_H
14545 #include <termios.h>
14546 #else
14547 #ifdef HAVE_TERMIO_H
14548 #include <termio.h>
14549 #endif
14550 #endif
14551 #ifdef NEED_PTEM_H
14552 /* This is a workaround for SCO:  they neglected to define struct winsize in
14553  * termios.h -- it's only in termio.h and ptem.h
14554  */
14555 #include        <sys/stream.h>
14556 #include        <sys/ptem.h>
14557 #endif
14558 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14559 #include <sys/ioctl.h>
14560 #endif
14561
14562 int
14563 main ()
14564 {
14565
14566 #ifdef TIOCGSIZE
14567         struct ttysize win;     /* FIXME: what system is this? */
14568         int y = win.ts_lines;
14569         int x = win.ts_cols;
14570 #else
14571 #ifdef TIOCGWINSZ
14572         struct winsize win;
14573         int y = win.ws_row;
14574         int x = win.ws_col;
14575 #else
14576         no TIOCGSIZE or TIOCGWINSZ
14577 #endif /* TIOCGWINSZ */
14578 #endif /* TIOCGSIZE */
14579
14580   ;
14581   return 0;
14582 }
14583 _ACEOF
14584 rm -f conftest.$ac_objext
14585 if { (eval echo "$as_me:14585: \"$ac_compile\"") >&5
14586   (eval $ac_compile) 2>&5
14587   ac_status=$?
14588   echo "$as_me:14588: \$? = $ac_status" >&5
14589   (exit $ac_status); } &&
14590          { ac_try='test -s conftest.$ac_objext'
14591   { (eval echo "$as_me:14591: \"$ac_try\"") >&5
14592   (eval $ac_try) 2>&5
14593   ac_status=$?
14594   echo "$as_me:14594: \$? = $ac_status" >&5
14595   (exit $ac_status); }; }; then
14596   cf_cv_sizechange=yes
14597 else
14598   echo "$as_me: failed program was:" >&5
14599 cat conftest.$ac_ext >&5
14600 cf_cv_sizechange=no
14601 fi
14602 rm -f conftest.$ac_objext conftest.$ac_ext
14603
14604         CPPFLAGS="$cf_save_CPPFLAGS"
14605         if test "$cf_cv_sizechange" = yes ; then
14606                 echo "size-change succeeded ($cf_opts)" >&5
14607                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14608                 break
14609         fi
14610 done
14611
14612 fi
14613 echo "$as_me:14613: result: $cf_cv_sizechange" >&5
14614 echo "${ECHO_T}$cf_cv_sizechange" >&6
14615 if test "$cf_cv_sizechange" != no ; then
14616         cat >>confdefs.h <<\EOF
14617 #define HAVE_SIZECHANGE 1
14618 EOF
14619
14620         case $cf_cv_sizechange in #(vi
14621         NEED*)
14622                 cat >>confdefs.h <<EOF
14623 #define $cf_cv_sizechange  1
14624 EOF
14625
14626                 ;;
14627         esac
14628 fi
14629
14630 echo "$as_me:14630: checking for memmove" >&5
14631 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14632 if test "${ac_cv_func_memmove+set}" = set; then
14633   echo $ECHO_N "(cached) $ECHO_C" >&6
14634 else
14635   cat >conftest.$ac_ext <<_ACEOF
14636 #line 14636 "configure"
14637 #include "confdefs.h"
14638 /* System header to define __stub macros and hopefully few prototypes,
14639     which can conflict with char memmove (); below.  */
14640 #include <assert.h>
14641 /* Override any gcc2 internal prototype to avoid an error.  */
14642 #ifdef __cplusplus
14643 extern "C"
14644 #endif
14645 /* We use char because int might match the return type of a gcc2
14646    builtin and then its argument prototype would still apply.  */
14647 char memmove ();
14648 char (*f) ();
14649
14650 int
14651 main ()
14652 {
14653 /* The GNU C library defines this for functions which it implements
14654     to always fail with ENOSYS.  Some functions are actually named
14655     something starting with __ and the normal name is an alias.  */
14656 #if defined (__stub_memmove) || defined (__stub___memmove)
14657 choke me
14658 #else
14659 f = memmove;
14660 #endif
14661
14662   ;
14663   return 0;
14664 }
14665 _ACEOF
14666 rm -f conftest.$ac_objext conftest$ac_exeext
14667 if { (eval echo "$as_me:14667: \"$ac_link\"") >&5
14668   (eval $ac_link) 2>&5
14669   ac_status=$?
14670   echo "$as_me:14670: \$? = $ac_status" >&5
14671   (exit $ac_status); } &&
14672          { ac_try='test -s conftest$ac_exeext'
14673   { (eval echo "$as_me:14673: \"$ac_try\"") >&5
14674   (eval $ac_try) 2>&5
14675   ac_status=$?
14676   echo "$as_me:14676: \$? = $ac_status" >&5
14677   (exit $ac_status); }; }; then
14678   ac_cv_func_memmove=yes
14679 else
14680   echo "$as_me: failed program was:" >&5
14681 cat conftest.$ac_ext >&5
14682 ac_cv_func_memmove=no
14683 fi
14684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14685 fi
14686 echo "$as_me:14686: result: $ac_cv_func_memmove" >&5
14687 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14688 if test $ac_cv_func_memmove = yes; then
14689   :
14690 else
14691
14692 echo "$as_me:14692: checking for bcopy" >&5
14693 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14694 if test "${ac_cv_func_bcopy+set}" = set; then
14695   echo $ECHO_N "(cached) $ECHO_C" >&6
14696 else
14697   cat >conftest.$ac_ext <<_ACEOF
14698 #line 14698 "configure"
14699 #include "confdefs.h"
14700 /* System header to define __stub macros and hopefully few prototypes,
14701     which can conflict with char bcopy (); below.  */
14702 #include <assert.h>
14703 /* Override any gcc2 internal prototype to avoid an error.  */
14704 #ifdef __cplusplus
14705 extern "C"
14706 #endif
14707 /* We use char because int might match the return type of a gcc2
14708    builtin and then its argument prototype would still apply.  */
14709 char bcopy ();
14710 char (*f) ();
14711
14712 int
14713 main ()
14714 {
14715 /* The GNU C library defines this for functions which it implements
14716     to always fail with ENOSYS.  Some functions are actually named
14717     something starting with __ and the normal name is an alias.  */
14718 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14719 choke me
14720 #else
14721 f = bcopy;
14722 #endif
14723
14724   ;
14725   return 0;
14726 }
14727 _ACEOF
14728 rm -f conftest.$ac_objext conftest$ac_exeext
14729 if { (eval echo "$as_me:14729: \"$ac_link\"") >&5
14730   (eval $ac_link) 2>&5
14731   ac_status=$?
14732   echo "$as_me:14732: \$? = $ac_status" >&5
14733   (exit $ac_status); } &&
14734          { ac_try='test -s conftest$ac_exeext'
14735   { (eval echo "$as_me:14735: \"$ac_try\"") >&5
14736   (eval $ac_try) 2>&5
14737   ac_status=$?
14738   echo "$as_me:14738: \$? = $ac_status" >&5
14739   (exit $ac_status); }; }; then
14740   ac_cv_func_bcopy=yes
14741 else
14742   echo "$as_me: failed program was:" >&5
14743 cat conftest.$ac_ext >&5
14744 ac_cv_func_bcopy=no
14745 fi
14746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14747 fi
14748 echo "$as_me:14748: result: $ac_cv_func_bcopy" >&5
14749 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14750 if test $ac_cv_func_bcopy = yes; then
14751
14752         echo "$as_me:14752: checking if bcopy does overlapping moves" >&5
14753 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14754 if test "${cf_cv_good_bcopy+set}" = set; then
14755   echo $ECHO_N "(cached) $ECHO_C" >&6
14756 else
14757
14758                 if test "$cross_compiling" = yes; then
14759   cf_cv_good_bcopy=unknown
14760 else
14761   cat >conftest.$ac_ext <<_ACEOF
14762 #line 14762 "configure"
14763 #include "confdefs.h"
14764
14765 int main() {
14766         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14767         char temp[40];
14768         bcopy(data, temp, sizeof(data));
14769         bcopy(temp+10, temp, 15);
14770         bcopy(temp+5, temp+15, 10);
14771         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14772 }
14773
14774 _ACEOF
14775 rm -f conftest$ac_exeext
14776 if { (eval echo "$as_me:14776: \"$ac_link\"") >&5
14777   (eval $ac_link) 2>&5
14778   ac_status=$?
14779   echo "$as_me:14779: \$? = $ac_status" >&5
14780   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14781   { (eval echo "$as_me:14781: \"$ac_try\"") >&5
14782   (eval $ac_try) 2>&5
14783   ac_status=$?
14784   echo "$as_me:14784: \$? = $ac_status" >&5
14785   (exit $ac_status); }; }; then
14786   cf_cv_good_bcopy=yes
14787 else
14788   echo "$as_me: program exited with status $ac_status" >&5
14789 echo "$as_me: failed program was:" >&5
14790 cat conftest.$ac_ext >&5
14791 cf_cv_good_bcopy=no
14792 fi
14793 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14794 fi
14795
14796 fi
14797 echo "$as_me:14797: result: $cf_cv_good_bcopy" >&5
14798 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14799
14800 else
14801   cf_cv_good_bcopy=no
14802 fi
14803
14804         if test "$cf_cv_good_bcopy" = yes ; then
14805                 cat >>confdefs.h <<\EOF
14806 #define USE_OK_BCOPY 1
14807 EOF
14808
14809         else
14810                 cat >>confdefs.h <<\EOF
14811 #define USE_MY_MEMMOVE 1
14812 EOF
14813
14814         fi
14815
14816 fi
14817
14818 echo "$as_me:14818: checking if poll really works" >&5
14819 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14820 if test "${cf_cv_working_poll+set}" = set; then
14821   echo $ECHO_N "(cached) $ECHO_C" >&6
14822 else
14823
14824 if test "$cross_compiling" = yes; then
14825   cf_cv_working_poll=unknown
14826 else
14827   cat >conftest.$ac_ext <<_ACEOF
14828 #line 14828 "configure"
14829 #include "confdefs.h"
14830
14831 #include <stdio.h>
14832 #ifdef HAVE_POLL_H
14833 #include <poll.h>
14834 #else
14835 #include <sys/poll.h>
14836 #endif
14837 int main() {
14838         struct pollfd myfds;
14839         int ret;
14840
14841         myfds.fd = 0;
14842         myfds.events = POLLIN;
14843
14844         ret = poll(&myfds, 1, 100);
14845         ${cf_cv_main_return:-return}(ret != 0);
14846 }
14847 _ACEOF
14848 rm -f conftest$ac_exeext
14849 if { (eval echo "$as_me:14849: \"$ac_link\"") >&5
14850   (eval $ac_link) 2>&5
14851   ac_status=$?
14852   echo "$as_me:14852: \$? = $ac_status" >&5
14853   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14854   { (eval echo "$as_me:14854: \"$ac_try\"") >&5
14855   (eval $ac_try) 2>&5
14856   ac_status=$?
14857   echo "$as_me:14857: \$? = $ac_status" >&5
14858   (exit $ac_status); }; }; then
14859   cf_cv_working_poll=yes
14860 else
14861   echo "$as_me: program exited with status $ac_status" >&5
14862 echo "$as_me: failed program was:" >&5
14863 cat conftest.$ac_ext >&5
14864 cf_cv_working_poll=no
14865 fi
14866 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14867 fi
14868 fi
14869 echo "$as_me:14869: result: $cf_cv_working_poll" >&5
14870 echo "${ECHO_T}$cf_cv_working_poll" >&6
14871 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14872 #define HAVE_WORKING_POLL 1
14873 EOF
14874
14875 echo "$as_me:14875: checking for pid_t" >&5
14876 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
14877 if test "${ac_cv_type_pid_t+set}" = set; then
14878   echo $ECHO_N "(cached) $ECHO_C" >&6
14879 else
14880   cat >conftest.$ac_ext <<_ACEOF
14881 #line 14881 "configure"
14882 #include "confdefs.h"
14883 $ac_includes_default
14884 int
14885 main ()
14886 {
14887 if ((pid_t *) 0)
14888   return 0;
14889 if (sizeof (pid_t))
14890   return 0;
14891   ;
14892   return 0;
14893 }
14894 _ACEOF
14895 rm -f conftest.$ac_objext
14896 if { (eval echo "$as_me:14896: \"$ac_compile\"") >&5
14897   (eval $ac_compile) 2>&5
14898   ac_status=$?
14899   echo "$as_me:14899: \$? = $ac_status" >&5
14900   (exit $ac_status); } &&
14901          { ac_try='test -s conftest.$ac_objext'
14902   { (eval echo "$as_me:14902: \"$ac_try\"") >&5
14903   (eval $ac_try) 2>&5
14904   ac_status=$?
14905   echo "$as_me:14905: \$? = $ac_status" >&5
14906   (exit $ac_status); }; }; then
14907   ac_cv_type_pid_t=yes
14908 else
14909   echo "$as_me: failed program was:" >&5
14910 cat conftest.$ac_ext >&5
14911 ac_cv_type_pid_t=no
14912 fi
14913 rm -f conftest.$ac_objext conftest.$ac_ext
14914 fi
14915 echo "$as_me:14915: result: $ac_cv_type_pid_t" >&5
14916 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
14917 if test $ac_cv_type_pid_t = yes; then
14918   :
14919 else
14920
14921 cat >>confdefs.h <<EOF
14922 #define pid_t int
14923 EOF
14924
14925 fi
14926
14927 for ac_header in unistd.h vfork.h
14928 do
14929 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14930 echo "$as_me:14930: checking for $ac_header" >&5
14931 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14932 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14933   echo $ECHO_N "(cached) $ECHO_C" >&6
14934 else
14935   cat >conftest.$ac_ext <<_ACEOF
14936 #line 14936 "configure"
14937 #include "confdefs.h"
14938 #include <$ac_header>
14939 _ACEOF
14940 if { (eval echo "$as_me:14940: \"$ac_cpp conftest.$ac_ext\"") >&5
14941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14942   ac_status=$?
14943   egrep -v '^ *\+' conftest.er1 >conftest.err
14944   rm -f conftest.er1
14945   cat conftest.err >&5
14946   echo "$as_me:14946: \$? = $ac_status" >&5
14947   (exit $ac_status); } >/dev/null; then
14948   if test -s conftest.err; then
14949     ac_cpp_err=$ac_c_preproc_warn_flag
14950   else
14951     ac_cpp_err=
14952   fi
14953 else
14954   ac_cpp_err=yes
14955 fi
14956 if test -z "$ac_cpp_err"; then
14957   eval "$as_ac_Header=yes"
14958 else
14959   echo "$as_me: failed program was:" >&5
14960   cat conftest.$ac_ext >&5
14961   eval "$as_ac_Header=no"
14962 fi
14963 rm -f conftest.err conftest.$ac_ext
14964 fi
14965 echo "$as_me:14965: result: `eval echo '${'$as_ac_Header'}'`" >&5
14966 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14967 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14968   cat >>confdefs.h <<EOF
14969 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14970 EOF
14971
14972 fi
14973 done
14974
14975 for ac_func in fork vfork
14976 do
14977 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14978 echo "$as_me:14978: checking for $ac_func" >&5
14979 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14980 if eval "test \"\${$as_ac_var+set}\" = set"; then
14981   echo $ECHO_N "(cached) $ECHO_C" >&6
14982 else
14983   cat >conftest.$ac_ext <<_ACEOF
14984 #line 14984 "configure"
14985 #include "confdefs.h"
14986 /* System header to define __stub macros and hopefully few prototypes,
14987     which can conflict with char $ac_func (); below.  */
14988 #include <assert.h>
14989 /* Override any gcc2 internal prototype to avoid an error.  */
14990 #ifdef __cplusplus
14991 extern "C"
14992 #endif
14993 /* We use char because int might match the return type of a gcc2
14994    builtin and then its argument prototype would still apply.  */
14995 char $ac_func ();
14996 char (*f) ();
14997
14998 int
14999 main ()
15000 {
15001 /* The GNU C library defines this for functions which it implements
15002     to always fail with ENOSYS.  Some functions are actually named
15003     something starting with __ and the normal name is an alias.  */
15004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15005 choke me
15006 #else
15007 f = $ac_func;
15008 #endif
15009
15010   ;
15011   return 0;
15012 }
15013 _ACEOF
15014 rm -f conftest.$ac_objext conftest$ac_exeext
15015 if { (eval echo "$as_me:15015: \"$ac_link\"") >&5
15016   (eval $ac_link) 2>&5
15017   ac_status=$?
15018   echo "$as_me:15018: \$? = $ac_status" >&5
15019   (exit $ac_status); } &&
15020          { ac_try='test -s conftest$ac_exeext'
15021   { (eval echo "$as_me:15021: \"$ac_try\"") >&5
15022   (eval $ac_try) 2>&5
15023   ac_status=$?
15024   echo "$as_me:15024: \$? = $ac_status" >&5
15025   (exit $ac_status); }; }; then
15026   eval "$as_ac_var=yes"
15027 else
15028   echo "$as_me: failed program was:" >&5
15029 cat conftest.$ac_ext >&5
15030 eval "$as_ac_var=no"
15031 fi
15032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15033 fi
15034 echo "$as_me:15034: result: `eval echo '${'$as_ac_var'}'`" >&5
15035 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15036 if test `eval echo '${'$as_ac_var'}'` = yes; then
15037   cat >>confdefs.h <<EOF
15038 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15039 EOF
15040
15041 fi
15042 done
15043
15044 ac_cv_func_fork_works=$ac_cv_func_fork
15045 if test "x$ac_cv_func_fork" = xyes; then
15046   echo "$as_me:15046: checking for working fork" >&5
15047 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15048 if test "${ac_cv_func_fork_works+set}" = set; then
15049   echo $ECHO_N "(cached) $ECHO_C" >&6
15050 else
15051   if test "$cross_compiling" = yes; then
15052   ac_cv_func_fork_works=cross
15053 else
15054   cat >conftest.$ac_ext <<_ACEOF
15055 /* By Rüdiger Kuhlmann. */
15056       #include <sys/types.h>
15057       #if HAVE_UNISTD_H
15058       # include <unistd.h>
15059       #endif
15060       /* Some systems only have a dummy stub for fork() */
15061       int main ()
15062       {
15063         if (fork() < 0)
15064           $ac_main_return (1);
15065         $ac_main_return (0);
15066       }
15067 _ACEOF
15068 rm -f conftest$ac_exeext
15069 if { (eval echo "$as_me:15069: \"$ac_link\"") >&5
15070   (eval $ac_link) 2>&5
15071   ac_status=$?
15072   echo "$as_me:15072: \$? = $ac_status" >&5
15073   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15074   { (eval echo "$as_me:15074: \"$ac_try\"") >&5
15075   (eval $ac_try) 2>&5
15076   ac_status=$?
15077   echo "$as_me:15077: \$? = $ac_status" >&5
15078   (exit $ac_status); }; }; then
15079   ac_cv_func_fork_works=yes
15080 else
15081   echo "$as_me: program exited with status $ac_status" >&5
15082 echo "$as_me: failed program was:" >&5
15083 cat conftest.$ac_ext >&5
15084 ac_cv_func_fork_works=no
15085 fi
15086 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15087 fi
15088 fi
15089 echo "$as_me:15089: result: $ac_cv_func_fork_works" >&5
15090 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15091
15092 fi
15093 if test "x$ac_cv_func_fork_works" = xcross; then
15094   case $host in
15095     *-*-amigaos* | *-*-msdosdjgpp*)
15096       # Override, as these systems have only a dummy fork() stub
15097       ac_cv_func_fork_works=no
15098       ;;
15099     *)
15100       ac_cv_func_fork_works=yes
15101       ;;
15102   esac
15103   { echo "$as_me:15103: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15104 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15105 fi
15106 ac_cv_func_vfork_works=$ac_cv_func_vfork
15107 if test "x$ac_cv_func_vfork" = xyes; then
15108   echo "$as_me:15108: checking for working vfork" >&5
15109 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15110 if test "${ac_cv_func_vfork_works+set}" = set; then
15111   echo $ECHO_N "(cached) $ECHO_C" >&6
15112 else
15113   if test "$cross_compiling" = yes; then
15114   ac_cv_func_vfork_works=cross
15115 else
15116   cat >conftest.$ac_ext <<_ACEOF
15117 #line 15117 "configure"
15118 #include "confdefs.h"
15119 /* Thanks to Paul Eggert for this test.  */
15120 #include <stdio.h>
15121 #include <sys/types.h>
15122 #include <sys/stat.h>
15123 #if HAVE_UNISTD_H
15124 # include <unistd.h>
15125 #endif
15126 #if HAVE_VFORK_H
15127 # include <vfork.h>
15128 #endif
15129 /* On some sparc systems, changes by the child to local and incoming
15130    argument registers are propagated back to the parent.  The compiler
15131    is told about this with #include <vfork.h>, but some compilers
15132    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15133    static variable whose address is put into a register that is
15134    clobbered by the vfork.  */
15135 static
15136 #ifdef __cplusplus
15137 sparc_address_test (int arg)
15138 # else
15139 sparc_address_test (arg) int arg;
15140 #endif
15141 {
15142   static pid_t child;
15143   if (!child) {
15144     child = vfork ();
15145     if (child < 0) {
15146       perror ("vfork");
15147       _exit(2);
15148     }
15149     if (!child) {
15150       arg = getpid();
15151       write(-1, "", 0);
15152       _exit (arg);
15153     }
15154   }
15155 }
15156
15157 int
15158 main ()
15159 {
15160   pid_t parent = getpid ();
15161   pid_t child;
15162
15163   sparc_address_test ();
15164
15165   child = vfork ();
15166
15167   if (child == 0) {
15168     /* Here is another test for sparc vfork register problems.  This
15169        test uses lots of local variables, at least as many local
15170        variables as main has allocated so far including compiler
15171        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15172        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15173        reuse the register of parent for one of the local variables,
15174        since it will think that parent can't possibly be used any more
15175        in this routine.  Assigning to the local variable will thus
15176        munge parent in the parent process.  */
15177     pid_t
15178       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15179       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15180     /* Convince the compiler that p..p7 are live; otherwise, it might
15181        use the same hardware register for all 8 local variables.  */
15182     if (p != p1 || p != p2 || p != p3 || p != p4
15183         || p != p5 || p != p6 || p != p7)
15184       _exit(1);
15185
15186     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15187        from child file descriptors.  If the child closes a descriptor
15188        before it execs or exits, this munges the parent's descriptor
15189        as well.  Test for this by closing stdout in the child.  */
15190     _exit(close(fileno(stdout)) != 0);
15191   } else {
15192     int status;
15193     struct stat st;
15194
15195     while (wait(&status) != child)
15196       ;
15197     $ac_main_return(
15198          /* Was there some problem with vforking?  */
15199          child < 0
15200
15201          /* Did the child fail?  (This shouldn't happen.)  */
15202          || status
15203
15204          /* Did the vfork/compiler bug occur?  */
15205          || parent != getpid()
15206
15207          /* Did the file descriptor bug occur?  */
15208          || fstat(fileno(stdout), &st) != 0
15209          );
15210   }
15211 }
15212 _ACEOF
15213 rm -f conftest$ac_exeext
15214 if { (eval echo "$as_me:15214: \"$ac_link\"") >&5
15215   (eval $ac_link) 2>&5
15216   ac_status=$?
15217   echo "$as_me:15217: \$? = $ac_status" >&5
15218   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15219   { (eval echo "$as_me:15219: \"$ac_try\"") >&5
15220   (eval $ac_try) 2>&5
15221   ac_status=$?
15222   echo "$as_me:15222: \$? = $ac_status" >&5
15223   (exit $ac_status); }; }; then
15224   ac_cv_func_vfork_works=yes
15225 else
15226   echo "$as_me: program exited with status $ac_status" >&5
15227 echo "$as_me: failed program was:" >&5
15228 cat conftest.$ac_ext >&5
15229 ac_cv_func_vfork_works=no
15230 fi
15231 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15232 fi
15233 fi
15234 echo "$as_me:15234: result: $ac_cv_func_vfork_works" >&5
15235 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15236
15237 fi;
15238 if test "x$ac_cv_func_fork_works" = xcross; then
15239   ac_cv_func_vfork_works=ac_cv_func_vfork
15240   { echo "$as_me:15240: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
15241 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
15242 fi
15243
15244 if test "x$ac_cv_func_vfork_works" = xyes; then
15245
15246 cat >>confdefs.h <<\EOF
15247 #define HAVE_WORKING_VFORK 1
15248 EOF
15249
15250 else
15251
15252 cat >>confdefs.h <<\EOF
15253 #define vfork fork
15254 EOF
15255
15256 fi
15257 if test "x$ac_cv_func_fork_works" = xyes; then
15258
15259 cat >>confdefs.h <<\EOF
15260 #define HAVE_WORKING_FORK 1
15261 EOF
15262
15263 fi
15264
15265 # special check for test/ditto.c
15266
15267 echo "$as_me:15267: checking for openpty in -lutil" >&5
15268 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15269 if test "${ac_cv_lib_util_openpty+set}" = set; then
15270   echo $ECHO_N "(cached) $ECHO_C" >&6
15271 else
15272   ac_check_lib_save_LIBS=$LIBS
15273 LIBS="-lutil  $LIBS"
15274 cat >conftest.$ac_ext <<_ACEOF
15275 #line 15275 "configure"
15276 #include "confdefs.h"
15277
15278 /* Override any gcc2 internal prototype to avoid an error.  */
15279 #ifdef __cplusplus
15280 extern "C"
15281 #endif
15282 /* We use char because int might match the return type of a gcc2
15283    builtin and then its argument prototype would still apply.  */
15284 char openpty ();
15285 int
15286 main ()
15287 {
15288 openpty ();
15289   ;
15290   return 0;
15291 }
15292 _ACEOF
15293 rm -f conftest.$ac_objext conftest$ac_exeext
15294 if { (eval echo "$as_me:15294: \"$ac_link\"") >&5
15295   (eval $ac_link) 2>&5
15296   ac_status=$?
15297   echo "$as_me:15297: \$? = $ac_status" >&5
15298   (exit $ac_status); } &&
15299          { ac_try='test -s conftest$ac_exeext'
15300   { (eval echo "$as_me:15300: \"$ac_try\"") >&5
15301   (eval $ac_try) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); }; }; then
15305   ac_cv_lib_util_openpty=yes
15306 else
15307   echo "$as_me: failed program was:" >&5
15308 cat conftest.$ac_ext >&5
15309 ac_cv_lib_util_openpty=no
15310 fi
15311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15312 LIBS=$ac_check_lib_save_LIBS
15313 fi
15314 echo "$as_me:15314: result: $ac_cv_lib_util_openpty" >&5
15315 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15316 if test $ac_cv_lib_util_openpty = yes; then
15317   cf_cv_lib_util=yes
15318 else
15319   cf_cv_lib_util=no
15320 fi
15321
15322 echo "$as_me:15322: checking for openpty header" >&5
15323 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15324 if test "${cf_cv_func_openpty+set}" = set; then
15325   echo $ECHO_N "(cached) $ECHO_C" >&6
15326 else
15327
15328     cf_save_LIBS="$LIBS"
15329     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
15330     for cf_header in pty.h libutil.h util.h
15331     do
15332     cat >conftest.$ac_ext <<_ACEOF
15333 #line 15333 "configure"
15334 #include "confdefs.h"
15335
15336 #include <$cf_header>
15337
15338 int
15339 main ()
15340 {
15341
15342     int x = openpty((int *)0, (int *)0, (char *)0,
15343                    (struct termios *)0, (struct winsize *)0);
15344
15345   ;
15346   return 0;
15347 }
15348 _ACEOF
15349 rm -f conftest.$ac_objext conftest$ac_exeext
15350 if { (eval echo "$as_me:15350: \"$ac_link\"") >&5
15351   (eval $ac_link) 2>&5
15352   ac_status=$?
15353   echo "$as_me:15353: \$? = $ac_status" >&5
15354   (exit $ac_status); } &&
15355          { ac_try='test -s conftest$ac_exeext'
15356   { (eval echo "$as_me:15356: \"$ac_try\"") >&5
15357   (eval $ac_try) 2>&5
15358   ac_status=$?
15359   echo "$as_me:15359: \$? = $ac_status" >&5
15360   (exit $ac_status); }; }; then
15361
15362         cf_cv_func_openpty=$cf_header
15363         break
15364
15365 else
15366   echo "$as_me: failed program was:" >&5
15367 cat conftest.$ac_ext >&5
15368
15369         cf_cv_func_openpty=no
15370
15371 fi
15372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15373     done
15374     LIBS="$cf_save_LIBS"
15375
15376 fi
15377 echo "$as_me:15377: result: $cf_cv_func_openpty" >&5
15378 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15379
15380 if test "$cf_cv_func_openpty" != no ; then
15381     cat >>confdefs.h <<EOF
15382 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15383 EOF
15384
15385     cat >>confdefs.h <<\EOF
15386 #define USE_XTERM_PTY 1
15387 EOF
15388
15389     if test "$cf_cv_lib_util" = yes ; then
15390         TEST_LIBS="-lutil $TEST_LIBS"
15391     fi
15392 fi
15393
15394 if test "$with_hashed_db" != no ; then
15395         cat >>confdefs.h <<\EOF
15396 #define USE_HASHED_DB 1
15397 EOF
15398
15399 case $with_hashed_db in #(vi
15400 yes|*able*) #(vi
15401     ;;
15402 *)
15403     if test -d "$with_hashed_db" ; then
15404
15405 if test -n "$with_hashed_db/include" ; then
15406   for cf_add_incdir in $with_hashed_db/include
15407   do
15408         while test $cf_add_incdir != /usr/include
15409         do
15410           if test -d $cf_add_incdir
15411           then
15412                 cf_have_incdir=no
15413                 if test -n "$CFLAGS$CPPFLAGS" ; then
15414                   # a loop is needed to ensure we can add subdirs of existing dirs
15415                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15416                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15417                           cf_have_incdir=yes; break
15418                         fi
15419                   done
15420                 fi
15421
15422                 if test "$cf_have_incdir" = no ; then
15423                   if test "$cf_add_incdir" = /usr/local/include ; then
15424                         if test "$GCC" = yes
15425                         then
15426                           cf_save_CPPFLAGS=$CPPFLAGS
15427                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15428                           cat >conftest.$ac_ext <<_ACEOF
15429 #line 15429 "configure"
15430 #include "confdefs.h"
15431 #include <stdio.h>
15432 int
15433 main ()
15434 {
15435 printf("Hello")
15436   ;
15437   return 0;
15438 }
15439 _ACEOF
15440 rm -f conftest.$ac_objext
15441 if { (eval echo "$as_me:15441: \"$ac_compile\"") >&5
15442   (eval $ac_compile) 2>&5
15443   ac_status=$?
15444   echo "$as_me:15444: \$? = $ac_status" >&5
15445   (exit $ac_status); } &&
15446          { ac_try='test -s conftest.$ac_objext'
15447   { (eval echo "$as_me:15447: \"$ac_try\"") >&5
15448   (eval $ac_try) 2>&5
15449   ac_status=$?
15450   echo "$as_me:15450: \$? = $ac_status" >&5
15451   (exit $ac_status); }; }; then
15452   :
15453 else
15454   echo "$as_me: failed program was:" >&5
15455 cat conftest.$ac_ext >&5
15456 cf_have_incdir=yes
15457 fi
15458 rm -f conftest.$ac_objext conftest.$ac_ext
15459                           CPPFLAGS=$cf_save_CPPFLAGS
15460                         fi
15461                   fi
15462                 fi
15463
15464                 if test "$cf_have_incdir" = no ; then
15465                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
15466
15467 echo "${as_me-configure}:15467: testing adding $cf_add_incdir to include-path ..." 1>&5
15468
15469                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15470
15471                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15472                   test "$cf_top_incdir" = "$cf_add_incdir" && break
15473                   cf_add_incdir="$cf_top_incdir"
15474                 else
15475                   break
15476                 fi
15477           fi
15478         done
15479   done
15480 fi
15481
15482 if test -n "$with_hashed_db/lib" ; then
15483   for cf_add_libdir in $with_hashed_db/lib
15484   do
15485     if test $cf_add_libdir = /usr/lib ; then
15486       :
15487     elif test -d $cf_add_libdir
15488     then
15489       cf_have_libdir=no
15490       if test -n "$LDFLAGS$LIBS" ; then
15491         # a loop is needed to ensure we can add subdirs of existing dirs
15492         for cf_test_libdir in $LDFLAGS $LIBS ; do
15493           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15494             cf_have_libdir=yes; break
15495           fi
15496         done
15497       fi
15498       if test "$cf_have_libdir" = no ; then
15499         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
15500
15501 echo "${as_me-configure}:15501: testing adding $cf_add_libdir to library-path ..." 1>&5
15502
15503         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15504       fi
15505     fi
15506   done
15507 fi
15508
15509     fi
15510 esac
15511
15512 echo "$as_me:15512: checking for db.h" >&5
15513 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
15514 if test "${ac_cv_header_db_h+set}" = set; then
15515   echo $ECHO_N "(cached) $ECHO_C" >&6
15516 else
15517   cat >conftest.$ac_ext <<_ACEOF
15518 #line 15518 "configure"
15519 #include "confdefs.h"
15520 #include <db.h>
15521 _ACEOF
15522 if { (eval echo "$as_me:15522: \"$ac_cpp conftest.$ac_ext\"") >&5
15523   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15524   ac_status=$?
15525   egrep -v '^ *\+' conftest.er1 >conftest.err
15526   rm -f conftest.er1
15527   cat conftest.err >&5
15528   echo "$as_me:15528: \$? = $ac_status" >&5
15529   (exit $ac_status); } >/dev/null; then
15530   if test -s conftest.err; then
15531     ac_cpp_err=$ac_c_preproc_warn_flag
15532   else
15533     ac_cpp_err=
15534   fi
15535 else
15536   ac_cpp_err=yes
15537 fi
15538 if test -z "$ac_cpp_err"; then
15539   ac_cv_header_db_h=yes
15540 else
15541   echo "$as_me: failed program was:" >&5
15542   cat conftest.$ac_ext >&5
15543   ac_cv_header_db_h=no
15544 fi
15545 rm -f conftest.err conftest.$ac_ext
15546 fi
15547 echo "$as_me:15547: result: $ac_cv_header_db_h" >&5
15548 echo "${ECHO_T}$ac_cv_header_db_h" >&6
15549 if test $ac_cv_header_db_h = yes; then
15550
15551 echo "$as_me:15551: checking for version of db" >&5
15552 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
15553 if test "${cf_cv_hashed_db_version+set}" = set; then
15554   echo $ECHO_N "(cached) $ECHO_C" >&6
15555 else
15556
15557 cf_cv_hashed_db_version=unknown
15558
15559 for cf_db_version in 1 2 3 4 5
15560 do
15561
15562 echo "${as_me-configure}:15562: testing checking for db version $cf_db_version ..." 1>&5
15563
15564         cat >conftest.$ac_ext <<_ACEOF
15565 #line 15565 "configure"
15566 #include "confdefs.h"
15567
15568 $ac_includes_default
15569 #include <db.h>
15570
15571 #ifdef DB_VERSION_MAJOR
15572         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
15573 #if $cf_db_version == DB_VERSION_MAJOR
15574         /* ok */
15575 #else
15576         make an error
15577 #endif
15578 #else
15579 #if $cf_db_version == 1
15580         /* ok: assuming this is DB 1.8.5 */
15581 #else
15582         make an error
15583 #endif
15584 #endif
15585
15586 int
15587 main ()
15588 {
15589 DBT *foo = 0
15590   ;
15591   return 0;
15592 }
15593 _ACEOF
15594 rm -f conftest.$ac_objext
15595 if { (eval echo "$as_me:15595: \"$ac_compile\"") >&5
15596   (eval $ac_compile) 2>&5
15597   ac_status=$?
15598   echo "$as_me:15598: \$? = $ac_status" >&5
15599   (exit $ac_status); } &&
15600          { ac_try='test -s conftest.$ac_objext'
15601   { (eval echo "$as_me:15601: \"$ac_try\"") >&5
15602   (eval $ac_try) 2>&5
15603   ac_status=$?
15604   echo "$as_me:15604: \$? = $ac_status" >&5
15605   (exit $ac_status); }; }; then
15606
15607         cf_cv_hashed_db_version=$cf_db_version
15608         break
15609
15610 else
15611   echo "$as_me: failed program was:" >&5
15612 cat conftest.$ac_ext >&5
15613 fi
15614 rm -f conftest.$ac_objext conftest.$ac_ext
15615 done
15616
15617 fi
15618 echo "$as_me:15618: result: $cf_cv_hashed_db_version" >&5
15619 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
15620
15621 if test "$cf_cv_hashed_db_version" = unknown ; then
15622         { { echo "$as_me:15622: error: Cannot determine version of db" >&5
15623 echo "$as_me: error: Cannot determine version of db" >&2;}
15624    { (exit 1); exit 1; }; }
15625 else
15626
15627 echo "$as_me:15627: checking for db libraries" >&5
15628 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
15629 if test "${cf_cv_hashed_db_libs+set}" = set; then
15630   echo $ECHO_N "(cached) $ECHO_C" >&6
15631 else
15632
15633 cf_cv_hashed_db_libs=unknown
15634 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
15635 do
15636         cf_save_libs="$LIBS"
15637         if test -n "$cf_db_libs"; then
15638                 LIBS="-l$cf_db_libs $LIBS"
15639         fi
15640
15641 echo "${as_me-configure}:15641: testing checking for library "$cf_db_libs" ..." 1>&5
15642
15643         cat >conftest.$ac_ext <<_ACEOF
15644 #line 15644 "configure"
15645 #include "confdefs.h"
15646
15647 $ac_includes_default
15648 #include <db.h>
15649
15650 int
15651 main ()
15652 {
15653
15654         char *path = "/tmp/foo";
15655 #ifdef DB_VERSION_MAJOR
15656 #if DB_VERSION_MAJOR >= 4
15657         DB *result = 0;
15658         db_create(&result, NULL, 0);
15659         result->open(result,
15660                 NULL,
15661                 path,
15662                 path,
15663                 DB_HASH,
15664                 DB_CREATE,
15665                 0644);
15666 #elif DB_VERSION_MAJOR >= 3
15667         DB *result = 0;
15668         db_create(&result, NULL, 0);
15669         result->open(result,
15670                 path,
15671                 path,
15672                 DB_HASH,
15673                 DB_CREATE,
15674                 0644);
15675 #elif DB_VERSION_MAJOR >= 2
15676         DB *result = 0;
15677         db_open(path,
15678                 DB_HASH,
15679                 DB_CREATE,
15680                 0644,
15681                 (DB_ENV *) 0,
15682                 (DB_INFO *) 0,
15683                 &result);
15684 #endif /* DB_VERSION_MAJOR */
15685 #else
15686         DB *result = dbopen(path,
15687                      2,
15688                      0644,
15689                      DB_HASH,
15690                      0);
15691 #endif
15692         ${cf_cv_main_return:-return}(result != 0)
15693
15694   ;
15695   return 0;
15696 }
15697 _ACEOF
15698 rm -f conftest.$ac_objext conftest$ac_exeext
15699 if { (eval echo "$as_me:15699: \"$ac_link\"") >&5
15700   (eval $ac_link) 2>&5
15701   ac_status=$?
15702   echo "$as_me:15702: \$? = $ac_status" >&5
15703   (exit $ac_status); } &&
15704          { ac_try='test -s conftest$ac_exeext'
15705   { (eval echo "$as_me:15705: \"$ac_try\"") >&5
15706   (eval $ac_try) 2>&5
15707   ac_status=$?
15708   echo "$as_me:15708: \$? = $ac_status" >&5
15709   (exit $ac_status); }; }; then
15710
15711         if test -n "$cf_db_libs" ; then
15712                 cf_cv_hashed_db_libs=$cf_db_libs
15713         else
15714                 cf_cv_hashed_db_libs=default
15715         fi
15716         LIBS="$cf_save_libs"
15717         break
15718
15719 else
15720   echo "$as_me: failed program was:" >&5
15721 cat conftest.$ac_ext >&5
15722 fi
15723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15724         LIBS="$cf_save_libs"
15725 done
15726
15727 fi
15728 echo "$as_me:15728: result: $cf_cv_hashed_db_libs" >&5
15729 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
15730
15731         if test "$cf_cv_hashed_db_libs" = unknown ; then
15732                 { { echo "$as_me:15732: error: Cannot determine library for db" >&5
15733 echo "$as_me: error: Cannot determine library for db" >&2;}
15734    { (exit 1); exit 1; }; }
15735         elif test "$cf_cv_hashed_db_libs" != default ; then
15736                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
15737         fi
15738 fi
15739
15740 else
15741
15742         { { echo "$as_me:15742: error: Cannot find db.h" >&5
15743 echo "$as_me: error: Cannot find db.h" >&2;}
15744    { (exit 1); exit 1; }; }
15745
15746 fi
15747
15748 fi
15749
15750 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15751         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15752         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15753 fi
15754
15755 # Just in case, check if the C compiler has a bool type.
15756
15757 echo "$as_me:15757: checking if we should include stdbool.h" >&5
15758 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15759
15760 if test "${cf_cv_header_stdbool_h+set}" = set; then
15761   echo $ECHO_N "(cached) $ECHO_C" >&6
15762 else
15763
15764         cat >conftest.$ac_ext <<_ACEOF
15765 #line 15765 "configure"
15766 #include "confdefs.h"
15767
15768 int
15769 main ()
15770 {
15771 bool foo = false
15772   ;
15773   return 0;
15774 }
15775 _ACEOF
15776 rm -f conftest.$ac_objext
15777 if { (eval echo "$as_me:15777: \"$ac_compile\"") >&5
15778   (eval $ac_compile) 2>&5
15779   ac_status=$?
15780   echo "$as_me:15780: \$? = $ac_status" >&5
15781   (exit $ac_status); } &&
15782          { ac_try='test -s conftest.$ac_objext'
15783   { (eval echo "$as_me:15783: \"$ac_try\"") >&5
15784   (eval $ac_try) 2>&5
15785   ac_status=$?
15786   echo "$as_me:15786: \$? = $ac_status" >&5
15787   (exit $ac_status); }; }; then
15788   cf_cv_header_stdbool_h=0
15789 else
15790   echo "$as_me: failed program was:" >&5
15791 cat conftest.$ac_ext >&5
15792 cat >conftest.$ac_ext <<_ACEOF
15793 #line 15793 "configure"
15794 #include "confdefs.h"
15795
15796 #ifndef __BEOS__
15797 #include <stdbool.h>
15798 #endif
15799
15800 int
15801 main ()
15802 {
15803 bool foo = false
15804   ;
15805   return 0;
15806 }
15807 _ACEOF
15808 rm -f conftest.$ac_objext
15809 if { (eval echo "$as_me:15809: \"$ac_compile\"") >&5
15810   (eval $ac_compile) 2>&5
15811   ac_status=$?
15812   echo "$as_me:15812: \$? = $ac_status" >&5
15813   (exit $ac_status); } &&
15814          { ac_try='test -s conftest.$ac_objext'
15815   { (eval echo "$as_me:15815: \"$ac_try\"") >&5
15816   (eval $ac_try) 2>&5
15817   ac_status=$?
15818   echo "$as_me:15818: \$? = $ac_status" >&5
15819   (exit $ac_status); }; }; then
15820   cf_cv_header_stdbool_h=1
15821 else
15822   echo "$as_me: failed program was:" >&5
15823 cat conftest.$ac_ext >&5
15824 cf_cv_header_stdbool_h=0
15825 fi
15826 rm -f conftest.$ac_objext conftest.$ac_ext
15827 fi
15828 rm -f conftest.$ac_objext conftest.$ac_ext
15829 fi
15830
15831 if test "$cf_cv_header_stdbool_h" = 1
15832 then    echo "$as_me:15832: result: yes" >&5
15833 echo "${ECHO_T}yes" >&6
15834 else    echo "$as_me:15834: result: no" >&5
15835 echo "${ECHO_T}no" >&6
15836 fi
15837
15838 echo "$as_me:15838: checking for builtin bool type" >&5
15839 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15840
15841 if test "${cf_cv_cc_bool_type+set}" = set; then
15842   echo $ECHO_N "(cached) $ECHO_C" >&6
15843 else
15844
15845         cat >conftest.$ac_ext <<_ACEOF
15846 #line 15846 "configure"
15847 #include "confdefs.h"
15848
15849 #include <stdio.h>
15850 #include <sys/types.h>
15851
15852 int
15853 main ()
15854 {
15855 bool x = false
15856   ;
15857   return 0;
15858 }
15859 _ACEOF
15860 rm -f conftest.$ac_objext
15861 if { (eval echo "$as_me:15861: \"$ac_compile\"") >&5
15862   (eval $ac_compile) 2>&5
15863   ac_status=$?
15864   echo "$as_me:15864: \$? = $ac_status" >&5
15865   (exit $ac_status); } &&
15866          { ac_try='test -s conftest.$ac_objext'
15867   { (eval echo "$as_me:15867: \"$ac_try\"") >&5
15868   (eval $ac_try) 2>&5
15869   ac_status=$?
15870   echo "$as_me:15870: \$? = $ac_status" >&5
15871   (exit $ac_status); }; }; then
15872   cf_cv_cc_bool_type=1
15873 else
15874   echo "$as_me: failed program was:" >&5
15875 cat conftest.$ac_ext >&5
15876 cf_cv_cc_bool_type=0
15877 fi
15878 rm -f conftest.$ac_objext conftest.$ac_ext
15879
15880 fi
15881
15882 if test "$cf_cv_cc_bool_type" = 1
15883 then    echo "$as_me:15883: result: yes" >&5
15884 echo "${ECHO_T}yes" >&6
15885 else    echo "$as_me:15885: result: no" >&5
15886 echo "${ECHO_T}no" >&6
15887 fi
15888
15889 # Check for C++ compiler characteristics (and ensure that it's there!)
15890 if test -n "$CXX" ; then
15891         ac_ext=cc
15892 ac_cpp='$CXXCPP $CPPFLAGS'
15893 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15894 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15895 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15896 ac_main_return=return
15897
15898 if test -n "$GXX" ; then
15899 case $cf_cv_system_name in #(vi
15900 os2*) #(vi
15901         cf_stdcpp_libname=stdcpp
15902         ;;
15903 *)
15904         cf_stdcpp_libname=stdc++
15905         ;;
15906 esac
15907 echo "$as_me:15907: checking for library $cf_stdcpp_libname" >&5
15908 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15909 if test "${cf_cv_libstdcpp+set}" = set; then
15910   echo $ECHO_N "(cached) $ECHO_C" >&6
15911 else
15912
15913         cf_save="$LIBS"
15914         LIBS="-l$cf_stdcpp_libname $LIBS"
15915 cat >conftest.$ac_ext <<_ACEOF
15916 #line 15916 "configure"
15917 #include "confdefs.h"
15918
15919 #include <strstream.h>
15920 int
15921 main ()
15922 {
15923
15924 char buf[80];
15925 strstreambuf foo(buf, sizeof(buf))
15926
15927   ;
15928   return 0;
15929 }
15930 _ACEOF
15931 rm -f conftest.$ac_objext conftest$ac_exeext
15932 if { (eval echo "$as_me:15932: \"$ac_link\"") >&5
15933   (eval $ac_link) 2>&5
15934   ac_status=$?
15935   echo "$as_me:15935: \$? = $ac_status" >&5
15936   (exit $ac_status); } &&
15937          { ac_try='test -s conftest$ac_exeext'
15938   { (eval echo "$as_me:15938: \"$ac_try\"") >&5
15939   (eval $ac_try) 2>&5
15940   ac_status=$?
15941   echo "$as_me:15941: \$? = $ac_status" >&5
15942   (exit $ac_status); }; }; then
15943   cf_cv_libstdcpp=yes
15944 else
15945   echo "$as_me: failed program was:" >&5
15946 cat conftest.$ac_ext >&5
15947 cf_cv_libstdcpp=no
15948 fi
15949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15950         LIBS="$cf_save"
15951
15952 fi
15953 echo "$as_me:15953: result: $cf_cv_libstdcpp" >&5
15954 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15955 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15956 fi
15957
15958         echo "$as_me:15958: checking whether $CXX understands -c and -o together" >&5
15959 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15960 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15961   echo $ECHO_N "(cached) $ECHO_C" >&6
15962 else
15963
15964 cat > conftest.$ac_ext <<CF_EOF
15965 #include <stdio.h>
15966 int main()
15967 {
15968         ${cf_cv_main_return:-return}(0);
15969 }
15970 CF_EOF
15971 # We do the test twice because some compilers refuse to overwrite an
15972 # existing .o file with -o, though they will create one.
15973 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15974 if { (eval echo "$as_me:15974: \"$ac_try\"") >&5
15975   (eval $ac_try) 2>&5
15976   ac_status=$?
15977   echo "$as_me:15977: \$? = $ac_status" >&5
15978   (exit $ac_status); } &&
15979   test -f conftest2.$ac_objext && { (eval echo "$as_me:15979: \"$ac_try\"") >&5
15980   (eval $ac_try) 2>&5
15981   ac_status=$?
15982   echo "$as_me:15982: \$? = $ac_status" >&5
15983   (exit $ac_status); };
15984 then
15985   eval cf_cv_prog_CXX_c_o=yes
15986 else
15987   eval cf_cv_prog_CXX_c_o=no
15988 fi
15989 rm -f conftest*
15990
15991 fi
15992 if test $cf_cv_prog_CXX_c_o = yes; then
15993   echo "$as_me:15993: result: yes" >&5
15994 echo "${ECHO_T}yes" >&6
15995 else
15996   echo "$as_me:15996: result: no" >&5
15997 echo "${ECHO_T}no" >&6
15998 fi
15999
16000         case $GXX_VERSION in
16001         1*|2.0-6*)
16002                 cf_cxx_library=yes
16003                 ;;
16004         *-2.7*|2.7*)
16005
16006 cf_cxx_library=unknown
16007 case $cf_cv_system_name in #(vi
16008 os2*) #(vi
16009         cf_gpp_libname=gpp
16010         ;;
16011 *)
16012         cf_gpp_libname=g++
16013         ;;
16014 esac
16015 if test "$GXX" = yes; then
16016         echo "$as_me:16016: checking for lib$cf_gpp_libname" >&5
16017 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16018         cf_save="$LIBS"
16019         LIBS="-l$cf_gpp_libname $LIBS"
16020         cat >conftest.$ac_ext <<_ACEOF
16021 #line 16021 "configure"
16022 #include "confdefs.h"
16023
16024 #include <$cf_gpp_libname/builtin.h>
16025
16026 int
16027 main ()
16028 {
16029 two_arg_error_handler_t foo2 = lib_error_handler
16030   ;
16031   return 0;
16032 }
16033 _ACEOF
16034 rm -f conftest.$ac_objext conftest$ac_exeext
16035 if { (eval echo "$as_me:16035: \"$ac_link\"") >&5
16036   (eval $ac_link) 2>&5
16037   ac_status=$?
16038   echo "$as_me:16038: \$? = $ac_status" >&5
16039   (exit $ac_status); } &&
16040          { ac_try='test -s conftest$ac_exeext'
16041   { (eval echo "$as_me:16041: \"$ac_try\"") >&5
16042   (eval $ac_try) 2>&5
16043   ac_status=$?
16044   echo "$as_me:16044: \$? = $ac_status" >&5
16045   (exit $ac_status); }; }; then
16046   cf_cxx_library=yes
16047          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16048          if test "$cf_gpp_libname" = cpp ; then
16049             cat >>confdefs.h <<\EOF
16050 #define HAVE_GPP_BUILTIN_H 1
16051 EOF
16052
16053          else
16054             cat >>confdefs.h <<\EOF
16055 #define HAVE_GXX_BUILTIN_H 1
16056 EOF
16057
16058          fi
16059 else
16060   echo "$as_me: failed program was:" >&5
16061 cat conftest.$ac_ext >&5
16062 cat >conftest.$ac_ext <<_ACEOF
16063 #line 16063 "configure"
16064 #include "confdefs.h"
16065
16066 #include <builtin.h>
16067
16068 int
16069 main ()
16070 {
16071 two_arg_error_handler_t foo2 = lib_error_handler
16072   ;
16073   return 0;
16074 }
16075 _ACEOF
16076 rm -f conftest.$ac_objext conftest$ac_exeext
16077 if { (eval echo "$as_me:16077: \"$ac_link\"") >&5
16078   (eval $ac_link) 2>&5
16079   ac_status=$?
16080   echo "$as_me:16080: \$? = $ac_status" >&5
16081   (exit $ac_status); } &&
16082          { ac_try='test -s conftest$ac_exeext'
16083   { (eval echo "$as_me:16083: \"$ac_try\"") >&5
16084   (eval $ac_try) 2>&5
16085   ac_status=$?
16086   echo "$as_me:16086: \$? = $ac_status" >&5
16087   (exit $ac_status); }; }; then
16088   cf_cxx_library=yes
16089          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16090          cat >>confdefs.h <<\EOF
16091 #define HAVE_BUILTIN_H 1
16092 EOF
16093
16094 else
16095   echo "$as_me: failed program was:" >&5
16096 cat conftest.$ac_ext >&5
16097 cf_cxx_library=no
16098 fi
16099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16100 fi
16101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16102         LIBS="$cf_save"
16103         echo "$as_me:16103: result: $cf_cxx_library" >&5
16104 echo "${ECHO_T}$cf_cxx_library" >&6
16105 fi
16106
16107                 ;;
16108         *)
16109                 cf_cxx_library=no
16110                 ;;
16111         esac
16112
16113         ac_ext=cc
16114 ac_cpp='$CXXCPP $CPPFLAGS'
16115 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16116 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16117 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16118 ac_main_return=return
16119 echo "$as_me:16119: checking how to run the C++ preprocessor" >&5
16120 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16121 if test -z "$CXXCPP"; then
16122   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16123   echo $ECHO_N "(cached) $ECHO_C" >&6
16124 else
16125       # Double quotes because CXXCPP needs to be expanded
16126     for CXXCPP in "$CXX -E" "/lib/cpp"
16127     do
16128       ac_preproc_ok=false
16129 for ac_cxx_preproc_warn_flag in '' yes
16130 do
16131   # Use a header file that comes with gcc, so configuring glibc
16132   # with a fresh cross-compiler works.
16133   # On the NeXT, cc -E runs the code through the compiler's parser,
16134   # not just through cpp. "Syntax error" is here to catch this case.
16135   cat >conftest.$ac_ext <<_ACEOF
16136 #line 16136 "configure"
16137 #include "confdefs.h"
16138 #include <assert.h>
16139                      Syntax error
16140 _ACEOF
16141 if { (eval echo "$as_me:16141: \"$ac_cpp conftest.$ac_ext\"") >&5
16142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16143   ac_status=$?
16144   egrep -v '^ *\+' conftest.er1 >conftest.err
16145   rm -f conftest.er1
16146   cat conftest.err >&5
16147   echo "$as_me:16147: \$? = $ac_status" >&5
16148   (exit $ac_status); } >/dev/null; then
16149   if test -s conftest.err; then
16150     ac_cpp_err=$ac_cxx_preproc_warn_flag
16151   else
16152     ac_cpp_err=
16153   fi
16154 else
16155   ac_cpp_err=yes
16156 fi
16157 if test -z "$ac_cpp_err"; then
16158   :
16159 else
16160   echo "$as_me: failed program was:" >&5
16161   cat conftest.$ac_ext >&5
16162   # Broken: fails on valid input.
16163 continue
16164 fi
16165 rm -f conftest.err conftest.$ac_ext
16166
16167   # OK, works on sane cases.  Now check whether non-existent headers
16168   # can be detected and how.
16169   cat >conftest.$ac_ext <<_ACEOF
16170 #line 16170 "configure"
16171 #include "confdefs.h"
16172 #include <ac_nonexistent.h>
16173 _ACEOF
16174 if { (eval echo "$as_me:16174: \"$ac_cpp conftest.$ac_ext\"") >&5
16175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16176   ac_status=$?
16177   egrep -v '^ *\+' conftest.er1 >conftest.err
16178   rm -f conftest.er1
16179   cat conftest.err >&5
16180   echo "$as_me:16180: \$? = $ac_status" >&5
16181   (exit $ac_status); } >/dev/null; then
16182   if test -s conftest.err; then
16183     ac_cpp_err=$ac_cxx_preproc_warn_flag
16184   else
16185     ac_cpp_err=
16186   fi
16187 else
16188   ac_cpp_err=yes
16189 fi
16190 if test -z "$ac_cpp_err"; then
16191   # Broken: success on invalid input.
16192 continue
16193 else
16194   echo "$as_me: failed program was:" >&5
16195   cat conftest.$ac_ext >&5
16196   # Passes both tests.
16197 ac_preproc_ok=:
16198 break
16199 fi
16200 rm -f conftest.err conftest.$ac_ext
16201
16202 done
16203 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16204 rm -f conftest.err conftest.$ac_ext
16205 if $ac_preproc_ok; then
16206   break
16207 fi
16208
16209     done
16210     ac_cv_prog_CXXCPP=$CXXCPP
16211
16212 fi
16213   CXXCPP=$ac_cv_prog_CXXCPP
16214 else
16215   ac_cv_prog_CXXCPP=$CXXCPP
16216 fi
16217 echo "$as_me:16217: result: $CXXCPP" >&5
16218 echo "${ECHO_T}$CXXCPP" >&6
16219 ac_preproc_ok=false
16220 for ac_cxx_preproc_warn_flag in '' yes
16221 do
16222   # Use a header file that comes with gcc, so configuring glibc
16223   # with a fresh cross-compiler works.
16224   # On the NeXT, cc -E runs the code through the compiler's parser,
16225   # not just through cpp. "Syntax error" is here to catch this case.
16226   cat >conftest.$ac_ext <<_ACEOF
16227 #line 16227 "configure"
16228 #include "confdefs.h"
16229 #include <assert.h>
16230                      Syntax error
16231 _ACEOF
16232 if { (eval echo "$as_me:16232: \"$ac_cpp conftest.$ac_ext\"") >&5
16233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16234   ac_status=$?
16235   egrep -v '^ *\+' conftest.er1 >conftest.err
16236   rm -f conftest.er1
16237   cat conftest.err >&5
16238   echo "$as_me:16238: \$? = $ac_status" >&5
16239   (exit $ac_status); } >/dev/null; then
16240   if test -s conftest.err; then
16241     ac_cpp_err=$ac_cxx_preproc_warn_flag
16242   else
16243     ac_cpp_err=
16244   fi
16245 else
16246   ac_cpp_err=yes
16247 fi
16248 if test -z "$ac_cpp_err"; then
16249   :
16250 else
16251   echo "$as_me: failed program was:" >&5
16252   cat conftest.$ac_ext >&5
16253   # Broken: fails on valid input.
16254 continue
16255 fi
16256 rm -f conftest.err conftest.$ac_ext
16257
16258   # OK, works on sane cases.  Now check whether non-existent headers
16259   # can be detected and how.
16260   cat >conftest.$ac_ext <<_ACEOF
16261 #line 16261 "configure"
16262 #include "confdefs.h"
16263 #include <ac_nonexistent.h>
16264 _ACEOF
16265 if { (eval echo "$as_me:16265: \"$ac_cpp conftest.$ac_ext\"") >&5
16266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16267   ac_status=$?
16268   egrep -v '^ *\+' conftest.er1 >conftest.err
16269   rm -f conftest.er1
16270   cat conftest.err >&5
16271   echo "$as_me:16271: \$? = $ac_status" >&5
16272   (exit $ac_status); } >/dev/null; then
16273   if test -s conftest.err; then
16274     ac_cpp_err=$ac_cxx_preproc_warn_flag
16275   else
16276     ac_cpp_err=
16277   fi
16278 else
16279   ac_cpp_err=yes
16280 fi
16281 if test -z "$ac_cpp_err"; then
16282   # Broken: success on invalid input.
16283 continue
16284 else
16285   echo "$as_me: failed program was:" >&5
16286   cat conftest.$ac_ext >&5
16287   # Passes both tests.
16288 ac_preproc_ok=:
16289 break
16290 fi
16291 rm -f conftest.err conftest.$ac_ext
16292
16293 done
16294 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16295 rm -f conftest.err conftest.$ac_ext
16296 if $ac_preproc_ok; then
16297   :
16298 else
16299   { { echo "$as_me:16299: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
16300 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
16301    { (exit 1); exit 1; }; }
16302 fi
16303
16304 ac_ext=cc
16305 ac_cpp='$CXXCPP $CPPFLAGS'
16306 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16307 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16308 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16309 ac_main_return=return
16310
16311 for ac_header in iostream typeinfo
16312 do
16313 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16314 echo "$as_me:16314: checking for $ac_header" >&5
16315 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16316 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16317   echo $ECHO_N "(cached) $ECHO_C" >&6
16318 else
16319   cat >conftest.$ac_ext <<_ACEOF
16320 #line 16320 "configure"
16321 #include "confdefs.h"
16322 #include <$ac_header>
16323 _ACEOF
16324 if { (eval echo "$as_me:16324: \"$ac_cpp conftest.$ac_ext\"") >&5
16325   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16326   ac_status=$?
16327   egrep -v '^ *\+' conftest.er1 >conftest.err
16328   rm -f conftest.er1
16329   cat conftest.err >&5
16330   echo "$as_me:16330: \$? = $ac_status" >&5
16331   (exit $ac_status); } >/dev/null; then
16332   if test -s conftest.err; then
16333     ac_cpp_err=$ac_cxx_preproc_warn_flag
16334   else
16335     ac_cpp_err=
16336   fi
16337 else
16338   ac_cpp_err=yes
16339 fi
16340 if test -z "$ac_cpp_err"; then
16341   eval "$as_ac_Header=yes"
16342 else
16343   echo "$as_me: failed program was:" >&5
16344   cat conftest.$ac_ext >&5
16345   eval "$as_ac_Header=no"
16346 fi
16347 rm -f conftest.err conftest.$ac_ext
16348 fi
16349 echo "$as_me:16349: result: `eval echo '${'$as_ac_Header'}'`" >&5
16350 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16351 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16352   cat >>confdefs.h <<EOF
16353 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16354 EOF
16355
16356 fi
16357 done
16358
16359     if test x"$ac_cv_header_iostream" = xyes ; then
16360         echo "$as_me:16360: checking if iostream uses std-namespace" >&5
16361 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
16362         cat >conftest.$ac_ext <<_ACEOF
16363 #line 16363 "configure"
16364 #include "confdefs.h"
16365
16366 #include <iostream>
16367 using std::endl;
16368 using std::cerr;
16369 int
16370 main ()
16371 {
16372
16373 cerr << "testing" << endl;
16374
16375   ;
16376   return 0;
16377 }
16378 _ACEOF
16379 rm -f conftest.$ac_objext
16380 if { (eval echo "$as_me:16380: \"$ac_compile\"") >&5
16381   (eval $ac_compile) 2>&5
16382   ac_status=$?
16383   echo "$as_me:16383: \$? = $ac_status" >&5
16384   (exit $ac_status); } &&
16385          { ac_try='test -s conftest.$ac_objext'
16386   { (eval echo "$as_me:16386: \"$ac_try\"") >&5
16387   (eval $ac_try) 2>&5
16388   ac_status=$?
16389   echo "$as_me:16389: \$? = $ac_status" >&5
16390   (exit $ac_status); }; }; then
16391   cf_iostream_namespace=yes
16392 else
16393   echo "$as_me: failed program was:" >&5
16394 cat conftest.$ac_ext >&5
16395 cf_iostream_namespace=no
16396 fi
16397 rm -f conftest.$ac_objext conftest.$ac_ext
16398         echo "$as_me:16398: result: $cf_iostream_namespace" >&5
16399 echo "${ECHO_T}$cf_iostream_namespace" >&6
16400         if test "$cf_iostream_namespace" = yes ; then
16401             cat >>confdefs.h <<\EOF
16402 #define IOSTREAM_NAMESPACE 1
16403 EOF
16404
16405         fi
16406     fi
16407
16408 echo "$as_me:16408: checking if we should include stdbool.h" >&5
16409 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16410
16411 if test "${cf_cv_header_stdbool_h+set}" = set; then
16412   echo $ECHO_N "(cached) $ECHO_C" >&6
16413 else
16414
16415         cat >conftest.$ac_ext <<_ACEOF
16416 #line 16416 "configure"
16417 #include "confdefs.h"
16418
16419 int
16420 main ()
16421 {
16422 bool foo = false
16423   ;
16424   return 0;
16425 }
16426 _ACEOF
16427 rm -f conftest.$ac_objext
16428 if { (eval echo "$as_me:16428: \"$ac_compile\"") >&5
16429   (eval $ac_compile) 2>&5
16430   ac_status=$?
16431   echo "$as_me:16431: \$? = $ac_status" >&5
16432   (exit $ac_status); } &&
16433          { ac_try='test -s conftest.$ac_objext'
16434   { (eval echo "$as_me:16434: \"$ac_try\"") >&5
16435   (eval $ac_try) 2>&5
16436   ac_status=$?
16437   echo "$as_me:16437: \$? = $ac_status" >&5
16438   (exit $ac_status); }; }; then
16439   cf_cv_header_stdbool_h=0
16440 else
16441   echo "$as_me: failed program was:" >&5
16442 cat conftest.$ac_ext >&5
16443 cat >conftest.$ac_ext <<_ACEOF
16444 #line 16444 "configure"
16445 #include "confdefs.h"
16446
16447 #ifndef __BEOS__
16448 #include <stdbool.h>
16449 #endif
16450
16451 int
16452 main ()
16453 {
16454 bool foo = false
16455   ;
16456   return 0;
16457 }
16458 _ACEOF
16459 rm -f conftest.$ac_objext
16460 if { (eval echo "$as_me:16460: \"$ac_compile\"") >&5
16461   (eval $ac_compile) 2>&5
16462   ac_status=$?
16463   echo "$as_me:16463: \$? = $ac_status" >&5
16464   (exit $ac_status); } &&
16465          { ac_try='test -s conftest.$ac_objext'
16466   { (eval echo "$as_me:16466: \"$ac_try\"") >&5
16467   (eval $ac_try) 2>&5
16468   ac_status=$?
16469   echo "$as_me:16469: \$? = $ac_status" >&5
16470   (exit $ac_status); }; }; then
16471   cf_cv_header_stdbool_h=1
16472 else
16473   echo "$as_me: failed program was:" >&5
16474 cat conftest.$ac_ext >&5
16475 cf_cv_header_stdbool_h=0
16476 fi
16477 rm -f conftest.$ac_objext conftest.$ac_ext
16478 fi
16479 rm -f conftest.$ac_objext conftest.$ac_ext
16480 fi
16481
16482 if test "$cf_cv_header_stdbool_h" = 1
16483 then    echo "$as_me:16483: result: yes" >&5
16484 echo "${ECHO_T}yes" >&6
16485 else    echo "$as_me:16485: result: no" >&5
16486 echo "${ECHO_T}no" >&6
16487 fi
16488
16489 echo "$as_me:16489: checking for builtin bool type" >&5
16490 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16491
16492 if test "${cf_cv_builtin_bool+set}" = set; then
16493   echo $ECHO_N "(cached) $ECHO_C" >&6
16494 else
16495
16496         cat >conftest.$ac_ext <<_ACEOF
16497 #line 16497 "configure"
16498 #include "confdefs.h"
16499
16500 #include <stdio.h>
16501 #include <sys/types.h>
16502
16503 int
16504 main ()
16505 {
16506 bool x = false
16507   ;
16508   return 0;
16509 }
16510 _ACEOF
16511 rm -f conftest.$ac_objext
16512 if { (eval echo "$as_me:16512: \"$ac_compile\"") >&5
16513   (eval $ac_compile) 2>&5
16514   ac_status=$?
16515   echo "$as_me:16515: \$? = $ac_status" >&5
16516   (exit $ac_status); } &&
16517          { ac_try='test -s conftest.$ac_objext'
16518   { (eval echo "$as_me:16518: \"$ac_try\"") >&5
16519   (eval $ac_try) 2>&5
16520   ac_status=$?
16521   echo "$as_me:16521: \$? = $ac_status" >&5
16522   (exit $ac_status); }; }; then
16523   cf_cv_builtin_bool=1
16524 else
16525   echo "$as_me: failed program was:" >&5
16526 cat conftest.$ac_ext >&5
16527 cf_cv_builtin_bool=0
16528 fi
16529 rm -f conftest.$ac_objext conftest.$ac_ext
16530
16531 fi
16532
16533 if test "$cf_cv_builtin_bool" = 1
16534 then    echo "$as_me:16534: result: yes" >&5
16535 echo "${ECHO_T}yes" >&6
16536 else    echo "$as_me:16536: result: no" >&5
16537 echo "${ECHO_T}no" >&6
16538 fi
16539
16540 echo "$as_me:16540: checking for size of bool" >&5
16541 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16542 if test "${cf_cv_type_of_bool+set}" = set; then
16543   echo $ECHO_N "(cached) $ECHO_C" >&6
16544 else
16545
16546         rm -f cf_test.out
16547         if test "$cross_compiling" = yes; then
16548   cf_cv_type_of_bool=unknown
16549 else
16550   cat >conftest.$ac_ext <<_ACEOF
16551 #line 16551 "configure"
16552 #include "confdefs.h"
16553
16554 #include <stdlib.h>
16555 #include <stdio.h>
16556
16557 #if defined(__cplusplus)
16558
16559 #ifdef HAVE_GXX_BUILTIN_H
16560 #include <g++/builtin.h>
16561 #elif HAVE_GPP_BUILTIN_H
16562 #include <gpp/builtin.h>
16563 #elif HAVE_BUILTIN_H
16564 #include <builtin.h>
16565 #endif
16566
16567 #else
16568
16569 #if $cf_cv_header_stdbool_h
16570 #include <stdbool.h>
16571 #endif
16572
16573 #endif
16574
16575 main()
16576 {
16577         FILE *fp = fopen("cf_test.out", "w");
16578         if (fp != 0) {
16579                 bool x = true;
16580                 if ((bool)(-x) >= 0)
16581                         fputs("unsigned ", fp);
16582                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16583                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16584                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16585                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16586                 fclose(fp);
16587         }
16588         ${cf_cv_main_return:-return}(0);
16589 }
16590
16591 _ACEOF
16592 rm -f conftest$ac_exeext
16593 if { (eval echo "$as_me:16593: \"$ac_link\"") >&5
16594   (eval $ac_link) 2>&5
16595   ac_status=$?
16596   echo "$as_me:16596: \$? = $ac_status" >&5
16597   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16598   { (eval echo "$as_me:16598: \"$ac_try\"") >&5
16599   (eval $ac_try) 2>&5
16600   ac_status=$?
16601   echo "$as_me:16601: \$? = $ac_status" >&5
16602   (exit $ac_status); }; }; then
16603   cf_cv_type_of_bool=`cat cf_test.out`
16604                  if test -z "$cf_cv_type_of_bool"; then
16605                    cf_cv_type_of_bool=unknown
16606                  fi
16607 else
16608   echo "$as_me: program exited with status $ac_status" >&5
16609 echo "$as_me: failed program was:" >&5
16610 cat conftest.$ac_ext >&5
16611 cf_cv_type_of_bool=unknown
16612 fi
16613 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16614 fi
16615
16616 fi
16617
16618         rm -f cf_test.out
16619 echo "$as_me:16619: result: $cf_cv_type_of_bool" >&5
16620 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16621 if test "$cf_cv_type_of_bool" = unknown ; then
16622         case .$NCURSES_BOOL in #(vi
16623         .auto|.) NCURSES_BOOL=unsigned;;
16624         esac
16625         { echo "$as_me:16625: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16626 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16627         cf_cv_type_of_bool=$NCURSES_BOOL
16628 fi
16629
16630 echo "$as_me:16630: checking for special defines needed for etip.h" >&5
16631 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
16632 cf_save_CXXFLAGS="$CXXFLAGS"
16633 cf_result="none"
16634 for cf_math in "" MATH_H
16635 do
16636 for cf_excp in "" MATH_EXCEPTION
16637 do
16638         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
16639         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
16640         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
16641 cat >conftest.$ac_ext <<_ACEOF
16642 #line 16642 "configure"
16643 #include "confdefs.h"
16644
16645 #include <etip.h.in>
16646
16647 int
16648 main ()
16649 {
16650
16651   ;
16652   return 0;
16653 }
16654 _ACEOF
16655 rm -f conftest.$ac_objext
16656 if { (eval echo "$as_me:16656: \"$ac_compile\"") >&5
16657   (eval $ac_compile) 2>&5
16658   ac_status=$?
16659   echo "$as_me:16659: \$? = $ac_status" >&5
16660   (exit $ac_status); } &&
16661          { ac_try='test -s conftest.$ac_objext'
16662   { (eval echo "$as_me:16662: \"$ac_try\"") >&5
16663   (eval $ac_try) 2>&5
16664   ac_status=$?
16665   echo "$as_me:16665: \$? = $ac_status" >&5
16666   (exit $ac_status); }; }; then
16667
16668         test -n "$cf_math" && cat >>confdefs.h <<EOF
16669 #define ETIP_NEEDS_${cf_math} 1
16670 EOF
16671
16672         test -n "$cf_excp" && cat >>confdefs.h <<EOF
16673 #define ETIP_NEEDS_${cf_excp} 1
16674 EOF
16675
16676         cf_result="$cf_math $cf_excp"
16677         break
16678
16679 else
16680   echo "$as_me: failed program was:" >&5
16681 cat conftest.$ac_ext >&5
16682 fi
16683 rm -f conftest.$ac_objext conftest.$ac_ext
16684 done
16685 done
16686 echo "$as_me:16686: result: $cf_result" >&5
16687 echo "${ECHO_T}$cf_result" >&6
16688 CXXFLAGS="$cf_save_CXXFLAGS"
16689
16690 if test -n "$CXX"; then
16691 echo "$as_me:16691: checking if $CXX accepts parameter initialization" >&5
16692 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
16693 if test "${cf_cv_cpp_param_init+set}" = set; then
16694   echo $ECHO_N "(cached) $ECHO_C" >&6
16695 else
16696
16697         ac_ext=cc
16698 ac_cpp='$CXXCPP $CPPFLAGS'
16699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16700 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16702 ac_main_return=return
16703
16704         if test "$cross_compiling" = yes; then
16705   cf_cv_cpp_param_init=unknown
16706 else
16707   cat >conftest.$ac_ext <<_ACEOF
16708 #line 16708 "configure"
16709 #include "confdefs.h"
16710
16711 class TEST {
16712 private:
16713         int value;
16714 public:
16715         TEST(int x = 1);
16716         ~TEST();
16717 };
16718
16719 TEST::TEST(int x = 1)   // some compilers do not like second initializer
16720 {
16721         value = x;
16722 }
16723 void main() { }
16724
16725 _ACEOF
16726 rm -f conftest$ac_exeext
16727 if { (eval echo "$as_me:16727: \"$ac_link\"") >&5
16728   (eval $ac_link) 2>&5
16729   ac_status=$?
16730   echo "$as_me:16730: \$? = $ac_status" >&5
16731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16732   { (eval echo "$as_me:16732: \"$ac_try\"") >&5
16733   (eval $ac_try) 2>&5
16734   ac_status=$?
16735   echo "$as_me:16735: \$? = $ac_status" >&5
16736   (exit $ac_status); }; }; then
16737   cf_cv_cpp_param_init=yes
16738 else
16739   echo "$as_me: program exited with status $ac_status" >&5
16740 echo "$as_me: failed program was:" >&5
16741 cat conftest.$ac_ext >&5
16742 cf_cv_cpp_param_init=no
16743 fi
16744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16745 fi
16746         ac_ext=cc
16747 ac_cpp='$CXXCPP $CPPFLAGS'
16748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16749 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16751 ac_main_return=return
16752
16753 fi
16754 echo "$as_me:16754: result: $cf_cv_cpp_param_init" >&5
16755 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
16756 fi
16757 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
16758 #define CPP_HAS_PARAM_INIT 1
16759 EOF
16760
16761 if test -n "$CXX"; then
16762
16763 echo "$as_me:16763: checking if $CXX accepts static_cast" >&5
16764 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
16765 if test "${cf_cv_cpp_static_cast+set}" = set; then
16766   echo $ECHO_N "(cached) $ECHO_C" >&6
16767 else
16768
16769         ac_ext=cc
16770 ac_cpp='$CXXCPP $CPPFLAGS'
16771 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16772 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16773 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16774 ac_main_return=return
16775
16776         cat >conftest.$ac_ext <<_ACEOF
16777 #line 16777 "configure"
16778 #include "confdefs.h"
16779
16780 class NCursesPanel
16781 {
16782 public:
16783   NCursesPanel(int nlines,
16784                int ncols,
16785                int begin_y = 0,
16786                int begin_x = 0)
16787   {
16788   }
16789
16790   ~NCursesPanel();
16791 };
16792
16793 template<class T> class NCursesUserPanel : public NCursesPanel
16794 {
16795 public:
16796   NCursesUserPanel (int nlines,
16797                     int ncols,
16798                     int begin_y = 0,
16799                     int begin_x = 0,
16800                     const T* p_UserData = static_cast<T*>(0))
16801     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16802   {
16803   };
16804   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16805   {
16806   };
16807
16808   virtual ~NCursesUserPanel() {};
16809 };
16810
16811 int
16812 main ()
16813 {
16814
16815         const char* p_UserData = static_cast<char*>(0)
16816   ;
16817   return 0;
16818 }
16819 _ACEOF
16820 rm -f conftest.$ac_objext
16821 if { (eval echo "$as_me:16821: \"$ac_compile\"") >&5
16822   (eval $ac_compile) 2>&5
16823   ac_status=$?
16824   echo "$as_me:16824: \$? = $ac_status" >&5
16825   (exit $ac_status); } &&
16826          { ac_try='test -s conftest.$ac_objext'
16827   { (eval echo "$as_me:16827: \"$ac_try\"") >&5
16828   (eval $ac_try) 2>&5
16829   ac_status=$?
16830   echo "$as_me:16830: \$? = $ac_status" >&5
16831   (exit $ac_status); }; }; then
16832   cf_cv_cpp_static_cast=yes
16833 else
16834   echo "$as_me: failed program was:" >&5
16835 cat conftest.$ac_ext >&5
16836 cf_cv_cpp_static_cast=no
16837 fi
16838 rm -f conftest.$ac_objext conftest.$ac_ext
16839
16840         ac_ext=cc
16841 ac_cpp='$CXXCPP $CPPFLAGS'
16842 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16843 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16844 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16845 ac_main_return=return
16846
16847 fi
16848 echo "$as_me:16848: result: $cf_cv_cpp_static_cast" >&5
16849 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16850
16851 fi
16852
16853 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16854 #define CPP_HAS_STATIC_CAST 1
16855 EOF
16856
16857         CXX_AR='$(AR)'
16858         CXX_ARFLAGS='$(ARFLAGS)'
16859         case $cf_cv_system_name in #(vi
16860         irix*) #(vi
16861             if test "$GXX" != yes ; then
16862                 CXX_AR='$(CXX)'
16863                 CXX_ARFLAGS='-ar -o'
16864             fi
16865             ;;
16866         sco3.2v5*) #(vi
16867             CXXLDFLAGS="-u main"
16868             ;;
16869         solaris2*)
16870             if test "$GXX" != yes ; then
16871                 CXX_AR='$(CXX)'
16872                 CXX_ARFLAGS='-xar -o'
16873             fi
16874             ;;
16875         esac
16876
16877 else
16878         cf_cxx_library=no
16879         cf_cv_builtin_bool=1
16880
16881         # Just because we are not configuring against C++ right now does not
16882         # mean that a user will not want to use C++.  Some distributors disable
16883         # the C++ portion of this configuration as a shortcut (or just to avoid
16884         # compiling the demo in the c++ directory).  So we need a reasonable
16885         # default for the 'bool' type.
16886         #
16887         # Caveat: since the storage of the bool type is not standardized, it
16888         # may change.
16889
16890         if test "$NCURSES_BOOL" != auto ; then
16891                 cf_cv_type_of_bool=$NCURSES_BOOL
16892                 cf_cv_header_stdbool_h=0
16893         else
16894                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16895
16896 echo "$as_me:16896: checking for size of bool" >&5
16897 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16898 if test "${cf_cv_type_of_bool+set}" = set; then
16899   echo $ECHO_N "(cached) $ECHO_C" >&6
16900 else
16901
16902         rm -f cf_test.out
16903         if test "$cross_compiling" = yes; then
16904   cf_cv_type_of_bool=unknown
16905 else
16906   cat >conftest.$ac_ext <<_ACEOF
16907 #line 16907 "configure"
16908 #include "confdefs.h"
16909
16910 #include <stdlib.h>
16911 #include <stdio.h>
16912
16913 #if defined(__cplusplus)
16914
16915 #ifdef HAVE_GXX_BUILTIN_H
16916 #include <g++/builtin.h>
16917 #elif HAVE_GPP_BUILTIN_H
16918 #include <gpp/builtin.h>
16919 #elif HAVE_BUILTIN_H
16920 #include <builtin.h>
16921 #endif
16922
16923 #else
16924
16925 #if $cf_cv_header_stdbool_h
16926 #include <stdbool.h>
16927 #endif
16928
16929 #endif
16930
16931 main()
16932 {
16933         FILE *fp = fopen("cf_test.out", "w");
16934         if (fp != 0) {
16935                 bool x = true;
16936                 if ((bool)(-x) >= 0)
16937                         fputs("unsigned ", fp);
16938                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16939                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16940                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16941                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16942                 fclose(fp);
16943         }
16944         ${cf_cv_main_return:-return}(0);
16945 }
16946
16947 _ACEOF
16948 rm -f conftest$ac_exeext
16949 if { (eval echo "$as_me:16949: \"$ac_link\"") >&5
16950   (eval $ac_link) 2>&5
16951   ac_status=$?
16952   echo "$as_me:16952: \$? = $ac_status" >&5
16953   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16954   { (eval echo "$as_me:16954: \"$ac_try\"") >&5
16955   (eval $ac_try) 2>&5
16956   ac_status=$?
16957   echo "$as_me:16957: \$? = $ac_status" >&5
16958   (exit $ac_status); }; }; then
16959   cf_cv_type_of_bool=`cat cf_test.out`
16960                  if test -z "$cf_cv_type_of_bool"; then
16961                    cf_cv_type_of_bool=unknown
16962                  fi
16963 else
16964   echo "$as_me: program exited with status $ac_status" >&5
16965 echo "$as_me: failed program was:" >&5
16966 cat conftest.$ac_ext >&5
16967 cf_cv_type_of_bool=unknown
16968 fi
16969 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16970 fi
16971
16972 fi
16973
16974         rm -f cf_test.out
16975 echo "$as_me:16975: result: $cf_cv_type_of_bool" >&5
16976 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16977 if test "$cf_cv_type_of_bool" = unknown ; then
16978         case .$NCURSES_BOOL in #(vi
16979         .auto|.) NCURSES_BOOL=unsigned;;
16980         esac
16981         { echo "$as_me:16981: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16982 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16983         cf_cv_type_of_bool=$NCURSES_BOOL
16984 fi
16985
16986                 else
16987                         echo "$as_me:16987: checking for fallback type of bool" >&5
16988 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16989                         case "$host_cpu" in #(vi
16990                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16991                         *)      cf_cv_type_of_bool=int  ;;
16992                         esac
16993                         echo "$as_me:16993: result: $cf_cv_type_of_bool" >&5
16994 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16995                 fi
16996         fi
16997 fi
16998
16999 # If the C compiler did not declare bool, and we did not determine that the C++
17000 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17001 # ncurses library use the same type as C++ bool.  Note that this allows one to
17002 # specify the type of bool in a configure-script option and postpone
17003 # integration with the C++ compiler provided that the types are compatible.
17004 USE_CXX_BOOL=1
17005 if test $cf_cv_cc_bool_type = 1
17006 then
17007         # oops: C has a bool.  Unlikely, but C++ could differ.
17008         USE_CXX_BOOL=0
17009 elif test $cf_cv_builtin_bool = 0
17010 then
17011         # C++ has no bool
17012         USE_CXX_BOOL=0
17013 else
17014         # this is the normal case
17015         USE_CXX_BOOL='defined(__cplusplus)'
17016 fi
17017
17018 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17019
17020 if test "$cf_with_ada" != "no" ; then
17021     if test "$with_libtool" != "no"; then
17022         { echo "$as_me:17022: WARNING: libtool does not support Ada - disabling feature" >&5
17023 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17024         cf_with_ada=no
17025     fi
17026 fi
17027
17028 if test "$cf_with_ada" != "no" ; then
17029 cf_ada_make=gnatmake
17030 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17031 set dummy $cf_ada_make; ac_word=$2
17032 echo "$as_me:17032: checking for $ac_word" >&5
17033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17034 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17035   echo $ECHO_N "(cached) $ECHO_C" >&6
17036 else
17037   if test -n "$gnat_exists"; then
17038   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17039 else
17040   ac_save_IFS=$IFS; IFS=$ac_path_separator
17041 ac_dummy="$PATH"
17042 for ac_dir in $ac_dummy; do
17043   IFS=$ac_save_IFS
17044   test -z "$ac_dir" && ac_dir=.
17045   $as_executable_p "$ac_dir/$ac_word" || continue
17046 ac_cv_prog_gnat_exists="yes"
17047 echo "$as_me:17047: found $ac_dir/$ac_word" >&5
17048 break
17049 done
17050
17051   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17052 fi
17053 fi
17054 gnat_exists=$ac_cv_prog_gnat_exists
17055 if test -n "$gnat_exists"; then
17056   echo "$as_me:17056: result: $gnat_exists" >&5
17057 echo "${ECHO_T}$gnat_exists" >&6
17058 else
17059   echo "$as_me:17059: result: no" >&5
17060 echo "${ECHO_T}no" >&6
17061 fi
17062
17063 if test "$ac_cv_prog_gnat_exists" = no; then
17064    cf_ada_make=
17065 else
17066
17067 echo "$as_me:17067: checking for gnat version" >&5
17068 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17069 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17070   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17071 echo "$as_me:17071: result: $cf_gnat_version" >&5
17072 echo "${ECHO_T}$cf_gnat_version" >&6
17073
17074 case $cf_gnat_version in
17075   3.1[1-9]*|3.[2-9]*|[4-9].*)
17076     cf_cv_prog_gnat_correct=yes
17077     ;;
17078   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17079      cf_cv_prog_gnat_correct=no
17080      ;;
17081 esac
17082 case $cf_gnat_version in
17083   3.[1-9]*|[4-9].*)
17084       cf_compile_generics=generics
17085       cf_generic_objects="\${GENOBJS}"
17086       ;;
17087   *)  cf_compile_generics=
17088       cf_generic_objects=
17089       ;;
17090 esac
17091
17092    # Extract the first word of "m4", so it can be a program name with args.
17093 set dummy m4; ac_word=$2
17094 echo "$as_me:17094: checking for $ac_word" >&5
17095 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17096 if test "${ac_cv_prog_M4_exists+set}" = set; then
17097   echo $ECHO_N "(cached) $ECHO_C" >&6
17098 else
17099   if test -n "$M4_exists"; then
17100   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17101 else
17102   ac_save_IFS=$IFS; IFS=$ac_path_separator
17103 ac_dummy="$PATH"
17104 for ac_dir in $ac_dummy; do
17105   IFS=$ac_save_IFS
17106   test -z "$ac_dir" && ac_dir=.
17107   $as_executable_p "$ac_dir/$ac_word" || continue
17108 ac_cv_prog_M4_exists="yes"
17109 echo "$as_me:17109: found $ac_dir/$ac_word" >&5
17110 break
17111 done
17112
17113   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17114 fi
17115 fi
17116 M4_exists=$ac_cv_prog_M4_exists
17117 if test -n "$M4_exists"; then
17118   echo "$as_me:17118: result: $M4_exists" >&5
17119 echo "${ECHO_T}$M4_exists" >&6
17120 else
17121   echo "$as_me:17121: result: no" >&5
17122 echo "${ECHO_T}no" >&6
17123 fi
17124
17125    if test "$ac_cv_prog_M4_exists" = no; then
17126       cf_cv_prog_gnat_correct=no
17127       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17128    fi
17129    if test "$cf_cv_prog_gnat_correct" = yes; then
17130       echo "$as_me:17130: checking if GNAT works" >&5
17131 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17132
17133 rm -f conftest*
17134 cat >>conftest.ads <<CF_EOF
17135 procedure conftest;
17136 CF_EOF
17137 cat >>conftest.adb <<CF_EOF
17138 with Text_IO;
17139 with GNAT.OS_Lib;
17140 procedure conftest is
17141 begin
17142    Text_IO.Put ("Hello World");
17143    Text_IO.New_Line;
17144    GNAT.OS_Lib.OS_Exit (0);
17145 end conftest;
17146 CF_EOF
17147 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17148    if ( ./conftest 1>&5 2>&1 ) ; then
17149       cf_cv_prog_gnat_correct=yes
17150    else
17151       cf_cv_prog_gnat_correct=no
17152    fi
17153 else
17154    cf_cv_prog_gnat_correct=no
17155 fi
17156 rm -f conftest*
17157
17158       echo "$as_me:17158: result: $cf_cv_prog_gnat_correct" >&5
17159 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17160    fi
17161 fi
17162 if test "$cf_cv_prog_gnat_correct" = yes; then
17163    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17164
17165    echo "$as_me:17165: checking if GNAT pragma Unreferenced works" >&5
17166 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17167
17168 rm -f conftest*
17169 cat >>conftest.ads <<CF_EOF
17170 procedure conftest;
17171 CF_EOF
17172 cat >>conftest.adb <<CF_EOF
17173 with Text_IO;
17174 with GNAT.OS_Lib;
17175 procedure conftest is
17176    test : Integer;
17177    pragma Unreferenced (test);
17178 begin
17179    test := 1;
17180    Text_IO.Put ("Hello World");
17181    Text_IO.New_Line;
17182    GNAT.OS_Lib.OS_Exit (0);
17183 end conftest;
17184 CF_EOF
17185 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17186       cf_cv_pragma_unreferenced=yes
17187 else
17188    cf_cv_pragma_unreferenced=no
17189 fi
17190 rm -f conftest*
17191
17192    echo "$as_me:17192: result: $cf_cv_pragma_unreferenced" >&5
17193 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17194
17195    # if the pragma is supported, use it (needed in the Trace code).
17196    if test $cf_cv_pragma_unreferenced = yes ; then
17197       PRAGMA_UNREF=TRUE
17198    else
17199       PRAGMA_UNREF=FALSE
17200    fi
17201
17202 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17203 if test "${with_ada_compiler+set}" = set; then
17204   withval="$with_ada_compiler"
17205   cf_ada_compiler=$withval
17206 else
17207   cf_ada_compiler=gnatmake
17208 fi;
17209
17210    cf_ada_package=terminal_interface
17211
17212 # Check whether --with-ada-include or --without-ada-include was given.
17213 if test "${with_ada_include+set}" = set; then
17214   withval="$with_ada_include"
17215
17216 else
17217   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
17218 fi; if test -n "$prefix/lib/ada/adainclude" ; then
17219
17220 if test "x$prefix" != xNONE; then
17221   cf_path_syntax="$prefix"
17222 else
17223   cf_path_syntax="$ac_default_prefix"
17224 fi
17225
17226 case ".$withval" in #(vi
17227 .\$\(*\)*|.\'*\'*) #(vi
17228   ;;
17229 ..|./*|.\\*) #(vi
17230   ;;
17231 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17232   ;;
17233 .\${*prefix}*) #(vi
17234   eval withval="$withval"
17235   case ".$withval" in #(vi
17236   .NONE/*)
17237     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17238     ;;
17239   esac
17240   ;; #(vi
17241 .no|.NONE/*)
17242   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17243   ;;
17244 *)
17245   { { echo "$as_me:17245: error: expected a pathname, not \"$withval\"" >&5
17246 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17247    { (exit 1); exit 1; }; }
17248   ;;
17249 esac
17250
17251 fi
17252 ADA_INCLUDE="$withval"
17253
17254 # Check whether --with-ada-objects or --without-ada-objects was given.
17255 if test "${with_ada_objects+set}" = set; then
17256   withval="$with_ada_objects"
17257
17258 else
17259   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
17260 fi; if test -n "$prefix/lib/ada/adalib" ; then
17261
17262 if test "x$prefix" != xNONE; then
17263   cf_path_syntax="$prefix"
17264 else
17265   cf_path_syntax="$ac_default_prefix"
17266 fi
17267
17268 case ".$withval" in #(vi
17269 .\$\(*\)*|.\'*\'*) #(vi
17270   ;;
17271 ..|./*|.\\*) #(vi
17272   ;;
17273 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17274   ;;
17275 .\${*prefix}*) #(vi
17276   eval withval="$withval"
17277   case ".$withval" in #(vi
17278   .NONE/*)
17279     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17280     ;;
17281   esac
17282   ;; #(vi
17283 .no|.NONE/*)
17284   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17285   ;;
17286 *)
17287   { { echo "$as_me:17287: error: expected a pathname, not \"$withval\"" >&5
17288 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17289    { (exit 1); exit 1; }; }
17290   ;;
17291 esac
17292
17293 fi
17294 ADA_OBJECTS="$withval"
17295
17296 fi
17297 fi
17298 else
17299    cf_with_ada=no
17300 fi
17301
17302 ### Construct the ncurses library-subsets, if any, from this set of keywords:
17303 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
17304 ###
17305 ### ticlib modules may be a separate library, otherwise contained in termlib.
17306 ### termlib modules may be a separate library, otherwise contained in ncurses.
17307 ###
17308 ### The of "+" or " " between the tokens controls the way the script
17309 ### chooses to split module lists into libraries.
17310 ###
17311 ### (see CF_LIB_RULES).
17312 echo "$as_me:17312: checking for library subsets" >&5
17313 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
17314 LIB_SUBSETS=
17315
17316 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
17317         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
17318         if test "$with_ticlib" != no ; then
17319                 LIB_SUBSETS="${LIB_SUBSETS} "
17320         else
17321                 LIB_SUBSETS="${LIB_SUBSETS}+"
17322         fi
17323 fi
17324
17325 LIB_SUBSETS="${LIB_SUBSETS}termlib"
17326 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
17327
17328 if test "$with_termlib" != no ; then
17329         LIB_SUBSETS="${LIB_SUBSETS} "
17330 else
17331         LIB_SUBSETS="${LIB_SUBSETS}+"
17332 fi
17333
17334 LIB_SUBSETS="${LIB_SUBSETS}base"
17335
17336 # Most term-driver calls are to tinfo, but some like init_pair are to the
17337 # base library (so it resides in base).
17338 if test "$with_term_driver" != no ; then
17339         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
17340         case $cf_cv_system_name in #(vi
17341         *mingw32*) #(vi
17342                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
17343                 ;;
17344         *) #(vi
17345                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
17346                 ;;
17347         esac
17348 fi
17349
17350 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
17351 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
17352
17353 echo "$as_me:17353: result: $LIB_SUBSETS" >&5
17354 echo "${ECHO_T}$LIB_SUBSETS" >&6
17355
17356 ### Construct the list of include-directories to be generated
17357
17358 CPPFLAGS="$CPPFLAGS -I. -I../include"
17359 if test "$srcdir" != "."; then
17360         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
17361 fi
17362 if test "$GCC" != yes; then
17363         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17364 elif test "$includedir" != "/usr/include"; then
17365         if test "$includedir" = '${prefix}/include' ; then
17366                 if test $prefix != /usr ; then
17367                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17368                 fi
17369         else
17370                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
17371         fi
17372 fi
17373
17374 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
17375 if test "$srcdir" != "."; then
17376         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17377 fi
17378 if test "$GCC" != yes; then
17379         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17380 elif test "$includedir" != "/usr/include"; then
17381         if test "$includedir" = '${prefix}/include' ; then
17382                 if test $prefix != /usr ; then
17383                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17384                 fi
17385         else
17386                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17387         fi
17388 fi
17389
17390 ### Build up pieces for makefile rules
17391 echo "$as_me:17391: checking default library suffix" >&5
17392 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17393
17394         case $DFT_LWR_MODEL in
17395         libtool) DFT_ARG_SUFFIX=''   ;;
17396         normal)  DFT_ARG_SUFFIX=''   ;;
17397         debug)   DFT_ARG_SUFFIX='_g' ;;
17398         profile) DFT_ARG_SUFFIX='_p' ;;
17399         shared)  DFT_ARG_SUFFIX=''   ;;
17400         esac
17401         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17402 echo "$as_me:17402: result: $DFT_ARG_SUFFIX" >&5
17403 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17404
17405 echo "$as_me:17405: checking default library-dependency suffix" >&5
17406 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17407
17408         case $DFT_LWR_MODEL in #(vi
17409         libtool) #(vi
17410                 DFT_LIB_SUFFIX='.la'
17411                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17412                 ;;
17413         normal) #(vi
17414                 DFT_LIB_SUFFIX='.a'
17415                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17416                 ;;
17417         debug) #(vi
17418                 DFT_LIB_SUFFIX='_g.a'
17419                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17420                 ;;
17421         profile) #(vi
17422                 DFT_LIB_SUFFIX='_p.a'
17423                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17424                 ;;
17425         shared) #(vi
17426                 case $cf_cv_system_name in
17427                 aix[56]*) #(vi
17428                         DFT_LIB_SUFFIX='.a'
17429                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17430                         ;;
17431                 cygwin*) #(vi
17432                         DFT_LIB_SUFFIX='.dll'
17433                         DFT_DEP_SUFFIX='.dll.a'
17434                         ;;
17435                 darwin*) #(vi
17436                         DFT_LIB_SUFFIX='.dylib'
17437                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17438                         ;;
17439                 hpux*) #(vi
17440                         case $target in
17441                         ia64*) #(vi
17442                                 DFT_LIB_SUFFIX='.so'
17443                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17444                                 ;;
17445                         *) #(vi
17446                                 DFT_LIB_SUFFIX='.sl'
17447                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17448                                 ;;
17449                         esac
17450                         ;;
17451                 *)      DFT_LIB_SUFFIX='.so'
17452                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17453                         ;;
17454                 esac
17455         esac
17456         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
17457         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
17458 echo "$as_me:17458: result: $DFT_DEP_SUFFIX" >&5
17459 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17460
17461 echo "$as_me:17461: checking default object directory" >&5
17462 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17463
17464         case $DFT_LWR_MODEL in
17465         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
17466         normal)  DFT_OBJ_SUBDIR='objects' ;;
17467         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
17468         profile) DFT_OBJ_SUBDIR='obj_p' ;;
17469         shared)
17470                 case $cf_cv_system_name in #(vi
17471                 cygwin) #(vi
17472                         DFT_OBJ_SUBDIR='objects' ;;
17473                 *)
17474                         DFT_OBJ_SUBDIR='obj_s' ;;
17475                 esac
17476         esac
17477 echo "$as_me:17477: result: $DFT_OBJ_SUBDIR" >&5
17478 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17479
17480 # libtool thinks it can make c++ shared libraries (perhaps only g++)
17481 if test "$cf_with_cxx" = yes ; then
17482 echo "$as_me:17482: checking c++ library-dependency suffix" >&5
17483 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
17484 if test "$with_libtool" != "no"; then
17485         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
17486 else
17487
17488         case normal in #(vi
17489         libtool) #(vi
17490                 CXX_LIB_SUFFIX='.la'
17491                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17492                 ;;
17493         normal) #(vi
17494                 CXX_LIB_SUFFIX='.a'
17495                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17496                 ;;
17497         debug) #(vi
17498                 CXX_LIB_SUFFIX='_g.a'
17499                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17500                 ;;
17501         profile) #(vi
17502                 CXX_LIB_SUFFIX='_p.a'
17503                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17504                 ;;
17505         shared) #(vi
17506                 case $cf_cv_system_name in
17507                 aix[56]*) #(vi
17508                         CXX_LIB_SUFFIX='.a'
17509                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17510                         ;;
17511                 cygwin*) #(vi
17512                         CXX_LIB_SUFFIX='.dll'
17513                         CXX_DEP_SUFFIX='.dll.a'
17514                         ;;
17515                 darwin*) #(vi
17516                         CXX_LIB_SUFFIX='.dylib'
17517                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17518                         ;;
17519                 hpux*) #(vi
17520                         case $target in
17521                         ia64*) #(vi
17522                                 CXX_LIB_SUFFIX='.so'
17523                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17524                                 ;;
17525                         *) #(vi
17526                                 CXX_LIB_SUFFIX='.sl'
17527                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17528                                 ;;
17529                         esac
17530                         ;;
17531                 *)      CXX_LIB_SUFFIX='.so'
17532                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17533                         ;;
17534                 esac
17535         esac
17536         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
17537         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
17538 fi
17539 echo "$as_me:17539: result: $CXX_LIB_SUFFIX" >&5
17540 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
17541
17542 fi
17543
17544 # do not want -ldl in build except as needed for -lncurses dependency
17545 if test "$with_dlsym" = yes ; then
17546 if test $DFT_LWR_MODEL = shared || \
17547    test $DFT_LWR_MODEL = libtool ; then
17548
17549 # remove dl library from $LIBS
17550 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
17551
17552 fi
17553 fi
17554 ### Set up low-level terminfo dependencies for makefiles.
17555
17556 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
17557 # do not need libdl
17558 TICS_LIST=
17559 if test "$with_dlsym" = yes ; then
17560
17561 # remove dl library from $SHLIB_LIST
17562 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
17563
17564 fi
17565
17566 if test "$with_ticlib" != no ; then
17567
17568         if test "$with_ticlib" != yes ; then
17569                 TICS_NAME=$with_ticlib
17570                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17571                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17572                 TICS_LIB_SUFFIX="${with_ticlib}"
17573         else
17574                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
17575                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
17576                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
17577         fi
17578         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
17579 else
17580         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
17581 fi
17582
17583 if test "$with_termlib" != no ; then
17584
17585         if test "$with_termlib" != yes ; then
17586                 TINFO_NAME=$with_termlib
17587                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17588                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17589                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17590                 TINFO_LIB_SUFFIX="${with_termlib}"
17591         else
17592                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
17593                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
17594                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
17595                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
17596         fi
17597
17598         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
17599         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
17600         if test "$DFT_LWR_MODEL" = "libtool"; then
17601                 TEST_ARGS="${TEST_DEPS}"
17602                 TEST_ARG2="${TEST_DEP2}"
17603                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
17604                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
17605                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
17606         else
17607                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
17608                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
17609                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
17610                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
17611                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
17612         fi
17613 else
17614         # the next lines are needed for linking libtic over libncurses
17615         TINFO_NAME=${LIB_NAME}
17616         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
17617         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
17618         if test "$with_tic_depends" = yes ; then
17619                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
17620         else
17621                 TICS_LIST="$SHLIB_LIST"
17622         fi
17623
17624         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
17625 fi
17626
17627 if test "$DFT_LWR_MODEL" = shared ; then
17628         case $cf_cv_system_name in #(vi
17629         cygwin*)
17630                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17631                 TINFO_SUFFIX=.dll
17632                 ;;
17633         esac
17634 fi
17635
17636 if test "$with_dlsym" = yes ; then
17637
17638 # remove dl library from $TICS_LIST
17639 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
17640
17641 fi
17642
17643 if test "$DFT_LWR_MODEL" = "libtool"; then
17644     OBJEXT=lo
17645 fi
17646
17647 # needed for Ada95
17648 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
17649
17650 case $DFT_LWR_MODEL in
17651 normal|debug|profile)
17652
17653 if test "$GCC" = yes ; then
17654         case $cf_cv_system_name in #(
17655         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
17656                 LDFLAGS_STATIC=
17657                 LDFLAGS_SHARED=
17658                 ;;
17659     *)  #( normally, except when broken
17660         LDFLAGS_STATIC=-static
17661         LDFLAGS_SHARED=-dynamic
17662         ;;
17663     esac
17664 else
17665         case $cf_cv_system_name in #(
17666         aix[456]*)      #( from ld manpage
17667                 LDFLAGS_STATIC=-bstatic
17668                 LDFLAGS_SHARED=-bdynamic
17669                 ;;
17670         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
17671                 # We could also use just "archive" and "shared".
17672                 LDFLAGS_STATIC=-Wl,-a,archive_shared
17673                 LDFLAGS_SHARED=-Wl,-a,shared_archive
17674                 ;;
17675         irix*)          #( from ld manpage IRIX64
17676                 LDFLAGS_STATIC=-Bstatic
17677                 LDFLAGS_SHARED=-Bdynamic
17678                 ;;
17679         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
17680                 # alternative "-oldstyle_liblookup" (not in cc manpage)
17681                 LDFLAGS_STATIC=-noso
17682                 LDFLAGS_SHARED=-so_archive
17683                 ;;
17684         solaris2*)
17685                 LDFLAGS_STATIC=-Bstatic
17686                 LDFLAGS_SHARED=-Bdynamic
17687                 ;;
17688         esac
17689 fi
17690
17691         ;;
17692 esac
17693
17694 echo "$as_me:17694: checking where we will install curses.h" >&5
17695 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
17696 test "$with_overwrite" = no && \
17697 test "x$includedir" = 'x${prefix}/include' && \
17698         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
17699 echo "$as_me:17699: result: $includedir" >&5
17700 echo "${ECHO_T}$includedir" >&6
17701
17702 ### Resolve a conflict between normal and wide-curses by forcing applications
17703 ### that will need libutf8 to add it to their configure script.
17704 if test "$with_overwrite" != no ; then
17705 if test "$NCURSES_LIBUTF8" = 1 ; then
17706         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
17707         { echo "$as_me:17707: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
17708 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
17709 fi
17710 fi
17711 WITH_OVERWRITE=$with_overwrite
17712
17713 # used to separate tack out of the tree
17714 NCURSES_TREE=
17715
17716 ### predefined stuff for the test programs
17717 cat >>confdefs.h <<\EOF
17718 #define HAVE_SLK_COLOR 1
17719 EOF
17720
17721 ### Construct the list of subdirectories for which we'll customize makefiles
17722 ### with the appropriate compile-rules.
17723
17724 echo "$as_me:17724: checking for src modules" >&5
17725 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
17726
17727 # dependencies and linker-arguments for test-programs
17728 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
17729 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
17730 if test "$DFT_LWR_MODEL" = "libtool"; then
17731         TEST_ARGS="${TEST_DEPS}"
17732         TEST_ARG2="${TEST_DEP2}"
17733 else
17734         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
17735         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
17736 fi
17737
17738 cf_cv_src_modules=
17739 for cf_dir in $modules_to_build
17740 do
17741         if test -f $srcdir/$cf_dir/modules; then
17742
17743                 # We may/may not have tack in the distribution, though the
17744                 # makefile is.
17745                 if test $cf_dir = tack ; then
17746                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
17747                                 continue
17748                         fi
17749                 fi
17750
17751                 if test -z "$cf_cv_src_modules"; then
17752                         cf_cv_src_modules=$cf_dir
17753                 else
17754                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
17755                 fi
17756
17757                 # Make the ncurses_cfg.h file record the library interface files as
17758                 # well.  These are header files that are the same name as their
17759                 # directory.  Ncurses is the only library that does not follow
17760                 # that pattern.
17761                 if test $cf_dir = tack ; then
17762                         continue
17763                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
17764
17765 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17766
17767                         cat >>confdefs.h <<EOF
17768 #define HAVE_${cf_have_include}_H 1
17769 EOF
17770
17771                         cat >>confdefs.h <<EOF
17772 #define HAVE_LIB${cf_have_include} 1
17773 EOF
17774
17775                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
17776                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17777                         if test "$DFT_LWR_MODEL" = "libtool"; then
17778                                 TEST_ARGS="${TEST_DEPS}"
17779                                 TEST_ARG2="${TEST_DEP2}"
17780                         else
17781                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17782                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17783                         fi
17784                 fi
17785         fi
17786 done
17787 echo "$as_me:17787: result: $cf_cv_src_modules" >&5
17788 echo "${ECHO_T}$cf_cv_src_modules" >&6
17789
17790 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17791 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17792
17793 SRC_SUBDIRS=
17794 if test "x$cf_with_manpages" != xno ; then
17795         SRC_SUBDIRS="$SRC_SUBDIRS man"
17796 fi
17797 SRC_SUBDIRS="$SRC_SUBDIRS include"
17798 for cf_dir in $cf_cv_src_modules
17799 do
17800         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17801 done
17802 SRC_SUBDIRS="$SRC_SUBDIRS test"
17803 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17804 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17805
17806 ADA_SUBDIRS=
17807 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17808         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17809         ADA_SUBDIRS="gen src samples"
17810 fi
17811
17812 SUB_MAKEFILES=
17813 for cf_dir in $SRC_SUBDIRS
17814 do
17815         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17816 done
17817
17818 if test -n "$ADA_SUBDIRS"; then
17819         for cf_dir in $ADA_SUBDIRS
17820         do
17821                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17822         done
17823
17824 fi
17825
17826 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17827    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17828 fi
17829
17830 DIRS_TO_MAKE="lib"
17831 for cf_item in $cf_list_models
17832 do
17833
17834         case $cf_item in
17835         libtool) cf_subdir='obj_lo'  ;;
17836         normal)  cf_subdir='objects' ;;
17837         debug)   cf_subdir='obj_g' ;;
17838         profile) cf_subdir='obj_p' ;;
17839         shared)
17840                 case $cf_cv_system_name in #(vi
17841                 cygwin) #(vi
17842                         cf_subdir='objects' ;;
17843                 *)
17844                         cf_subdir='obj_s' ;;
17845                 esac
17846         esac
17847
17848         for cf_item2 in $DIRS_TO_MAKE
17849         do
17850                 test $cf_item2 = $cf_subdir && break
17851         done
17852         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17853 done
17854 for cf_dir in $DIRS_TO_MAKE
17855 do
17856         test ! -d $cf_dir && mkdir $cf_dir
17857 done
17858
17859 # symbols that differ when compiling Ada95 by itself.
17860 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
17861
17862 NCURSES_COPY2='sh $(top_srcdir)/tar-copy.sh'
17863
17864 # values to use as strings
17865 cat >>confdefs.h <<EOF
17866 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17867 EOF
17868
17869 cat >>confdefs.h <<EOF
17870 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17871 EOF
17872
17873 ### Now that we're done running tests, add the compiler-warnings, if any
17874
17875 cf_fix_cppflags=no
17876 cf_new_cflags=
17877 cf_new_cppflags=
17878 cf_new_extra_cppflags=
17879
17880 for cf_add_cflags in $EXTRA_CFLAGS
17881 do
17882 case $cf_fix_cppflags in
17883 no)
17884         case $cf_add_cflags in #(vi
17885         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17886                 case $cf_add_cflags in
17887                 -D*)
17888                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17889
17890                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17891                                 && test -z "${cf_tst_cflags}" \
17892                                 && cf_fix_cppflags=yes
17893
17894                         if test $cf_fix_cppflags = yes ; then
17895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17896                                 continue
17897                         elif test "${cf_tst_cflags}" = "\"'" ; then
17898                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17899                                 continue
17900                         fi
17901                         ;;
17902                 esac
17903                 case "$CPPFLAGS" in
17904                 *$cf_add_cflags) #(vi
17905                         ;;
17906                 *) #(vi
17907                         case $cf_add_cflags in #(vi
17908                         -D*)
17909                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17910
17911 CPPFLAGS=`echo "$CPPFLAGS" | \
17912         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17913                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17914
17915                                 ;;
17916                         esac
17917                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17918                         ;;
17919                 esac
17920                 ;;
17921         *)
17922                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17923                 ;;
17924         esac
17925         ;;
17926 yes)
17927         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17928
17929         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17930
17931         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17932                 && test -z "${cf_tst_cflags}" \
17933                 && cf_fix_cppflags=no
17934         ;;
17935 esac
17936 done
17937
17938 if test -n "$cf_new_cflags" ; then
17939
17940         CFLAGS="$CFLAGS $cf_new_cflags"
17941 fi
17942
17943 if test -n "$cf_new_cppflags" ; then
17944
17945         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17946 fi
17947
17948 if test -n "$cf_new_extra_cppflags" ; then
17949
17950         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17951 fi
17952
17953 ### If we're building with rpath, try to link non-standard libs that way too.
17954 if test "$DFT_LWR_MODEL" = "shared"; then
17955
17956 echo "$as_me:17956: checking for updated LDFLAGS" >&5
17957 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17958 if test -n "$LDFLAGS" ; then
17959 echo "$as_me:17959: result: maybe" >&5
17960 echo "${ECHO_T}maybe" >&6
17961 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17962
17963 echo "${as_me-configure}:17963: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17964
17965 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17966
17967 echo "${as_me-configure}:17967: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17968
17969 case "$EXTRA_LDFLAGS" in #(vi
17970 -Wl,-rpath,*) #(vi
17971         cf_rpath_hack="-Wl,-rpath,"
17972         ;;
17973 -R\ *)
17974         cf_rpath_hack="-R "
17975         ;;
17976 -R*)
17977         cf_rpath_hack="-R"
17978         ;;
17979 *)
17980         cf_rpath_hack=
17981         ;;
17982 esac
17983 if test -n "$cf_rpath_hack" ; then
17984         cf_rpath_dst=
17985         for cf_rpath_src in $LDFLAGS
17986         do
17987                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17988
17989 echo "${as_me-configure}:17989: testing Filtering $cf_rpath_src ..." 1>&5
17990
17991                 case $cf_rpath_src in #(vi
17992                 -L*) #(vi
17993                         if test "$cf_rpath_hack" = "-R " ; then
17994                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17995                         else
17996                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17997                         fi
17998                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17999
18000 echo "${as_me-configure}:18000: testing ...Filter $cf_rpath_tmp ..." 1>&5
18001
18002                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18003                         ;;
18004                 esac
18005                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18006         done
18007         LDFLAGS=$cf_rpath_dst
18008         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
18009
18010 echo "${as_me-configure}:18010: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18011
18012         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18013
18014 echo "${as_me-configure}:18014: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18015
18016 fi
18017 else
18018 echo "$as_me:18018: result: no" >&5
18019 echo "${ECHO_T}no" >&6
18020 fi
18021
18022 fi
18023
18024 ### Define substitutions for header files to avoid name-pollution
18025
18026 if test "$cf_cv_have_tcgetattr" = yes ; then
18027         HAVE_TCGETATTR=1
18028 else
18029         HAVE_TCGETATTR=0
18030 fi
18031
18032 if test "$ac_cv_header_termio_h" = yes ; then
18033         HAVE_TERMIO_H=1
18034 else
18035         HAVE_TERMIO_H=0
18036 fi
18037
18038 if test "$ac_cv_header_termios_h" = yes ; then
18039         HAVE_TERMIOS_H=1
18040 else
18041         HAVE_TERMIOS_H=0
18042 fi
18043
18044 ################################################################################
18045 test "$use_database" = yes && \
18046 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18047
18048 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18049
18050 if test x"$enable_pc_files" = xyes ; then \
18051 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18052 MAKE_PC_FILES=
18053 else
18054 MAKE_PC_FILES="#"
18055 fi
18056
18057 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"
18058 ac_config_commands="$ac_config_commands default"
18059 cat >confcache <<\_ACEOF
18060 # This file is a shell script that caches the results of configure
18061 # tests run on this system so they can be shared between configure
18062 # scripts and configure runs, see configure's option --config-cache.
18063 # It is not useful on other systems.  If it contains results you don't
18064 # want to keep, you may remove or edit it.
18065 #
18066 # config.status only pays attention to the cache file if you give it
18067 # the --recheck option to rerun configure.
18068 #
18069 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18070 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18071 # following values.
18072
18073 _ACEOF
18074
18075 # The following way of writing the cache mishandles newlines in values,
18076 # but we know of no workaround that is simple, portable, and efficient.
18077 # So, don't put newlines in cache variables' values.
18078 # Ultrix sh set writes to stderr and can't be redirected directly,
18079 # and sets the high bit in the cache file unless we assign to the vars.
18080 {
18081   (set) 2>&1 |
18082     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18083     *ac_space=\ *)
18084       # `set' does not quote correctly, so add quotes (double-quote
18085       # substitution turns \\\\ into \\, and sed turns \\ into \).
18086       sed -n \
18087         "s/'/'\\\\''/g;
18088           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18089       ;;
18090     *)
18091       # `set' quotes correctly as required by POSIX, so do not add quotes.
18092       sed -n \
18093         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18094       ;;
18095     esac;
18096 } |
18097   sed '
18098      t clear
18099      : clear
18100      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18101      t end
18102      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18103      : end' >>confcache
18104 if cmp -s $cache_file confcache; then :; else
18105   if test -w $cache_file; then
18106     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18107     cat confcache >$cache_file
18108   else
18109     echo "not updating unwritable cache $cache_file"
18110   fi
18111 fi
18112 rm -f confcache
18113
18114 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18115 # Let make expand exec_prefix.
18116 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18117
18118 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18119 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18120 # trailing colons and then remove the whole line if VPATH becomes empty
18121 # (actually we leave an empty line to preserve line numbers).
18122 if test "x$srcdir" = x.; then
18123   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18124 s/:*\$(srcdir):*/:/;
18125 s/:*\${srcdir}:*/:/;
18126 s/:*@srcdir@:*/:/;
18127 s/^\([^=]*=[    ]*\):*/\1/;
18128 s/:*$//;
18129 s/^[^=]*=[      ]*$//;
18130 }'
18131 fi
18132
18133 DEFS=-DHAVE_CONFIG_H
18134
18135 : ${CONFIG_STATUS=./config.status}
18136 ac_clean_files_save=$ac_clean_files
18137 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18138 { echo "$as_me:18138: creating $CONFIG_STATUS" >&5
18139 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18140 cat >$CONFIG_STATUS <<_ACEOF
18141 #! $SHELL
18142 # Generated automatically by configure.
18143 # Run this file to recreate the current configuration.
18144 # Compiler output produced by configure, useful for debugging
18145 # configure, is in config.log if it exists.
18146
18147 debug=false
18148 SHELL=\${CONFIG_SHELL-$SHELL}
18149 ac_cs_invocation="\$0 \$@"
18150
18151 _ACEOF
18152
18153 cat >>$CONFIG_STATUS <<\_ACEOF
18154 # Be Bourne compatible
18155 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18156   emulate sh
18157   NULLCMD=:
18158 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18159   set -o posix
18160 fi
18161
18162 # Name of the executable.
18163 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18164
18165 if expr a : '\(a\)' >/dev/null 2>&1; then
18166   as_expr=expr
18167 else
18168   as_expr=false
18169 fi
18170
18171 rm -f conf$$ conf$$.exe conf$$.file
18172 echo >conf$$.file
18173 if ln -s conf$$.file conf$$ 2>/dev/null; then
18174   # We could just check for DJGPP; but this test a) works b) is more generic
18175   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18176   if test -f conf$$.exe; then
18177     # Don't use ln at all; we don't have any links
18178     as_ln_s='cp -p'
18179   else
18180     as_ln_s='ln -s'
18181   fi
18182 elif ln conf$$.file conf$$ 2>/dev/null; then
18183   as_ln_s=ln
18184 else
18185   as_ln_s='cp -p'
18186 fi
18187 rm -f conf$$ conf$$.exe conf$$.file
18188
18189 as_executable_p="test -f"
18190
18191 # Support unset when possible.
18192 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18193   as_unset=unset
18194 else
18195   as_unset=false
18196 fi
18197
18198 # NLS nuisances.
18199 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18200 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18201 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18202 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18203 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18204 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18205 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18206 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18207
18208 # IFS
18209 # We need space, tab and new line, in precisely that order.
18210 as_nl='
18211 '
18212 IFS="   $as_nl"
18213
18214 # CDPATH.
18215 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18216
18217 exec 6>&1
18218
18219 _ACEOF
18220
18221 # Files that config.status was made for.
18222 if test -n "$ac_config_files"; then
18223   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18224 fi
18225
18226 if test -n "$ac_config_headers"; then
18227   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18228 fi
18229
18230 if test -n "$ac_config_links"; then
18231   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18232 fi
18233
18234 if test -n "$ac_config_commands"; then
18235   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18236 fi
18237
18238 cat >>$CONFIG_STATUS <<\EOF
18239
18240 ac_cs_usage="\
18241 \`$as_me' instantiates files from templates according to the
18242 current configuration.
18243
18244 Usage: $0 [OPTIONS] [FILE]...
18245
18246   -h, --help       print this help, then exit
18247   -V, --version    print version number, then exit
18248   -d, --debug      don't remove temporary files
18249       --recheck    update $as_me by reconfiguring in the same conditions
18250   --file=FILE[:TEMPLATE]
18251                    instantiate the configuration file FILE
18252   --header=FILE[:TEMPLATE]
18253                    instantiate the configuration header FILE
18254
18255 Configuration files:
18256 $config_files
18257
18258 Configuration headers:
18259 $config_headers
18260
18261 Configuration commands:
18262 $config_commands
18263
18264 Report bugs to <bug-autoconf@gnu.org>."
18265 EOF
18266
18267 cat >>$CONFIG_STATUS <<EOF
18268 ac_cs_version="\\
18269 config.status
18270 configured by $0, generated by GNU Autoconf 2.52.20081225,
18271   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18272
18273 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18274 Free Software Foundation, Inc.
18275 This config.status script is free software; the Free Software Foundation
18276 gives unlimited permission to copy, distribute and modify it."
18277 srcdir=$srcdir
18278 INSTALL="$INSTALL"
18279 EOF
18280
18281 cat >>$CONFIG_STATUS <<\EOF
18282 # If no file are specified by the user, then we need to provide default
18283 # value.  By we need to know if files were specified by the user.
18284 ac_need_defaults=:
18285 while test $# != 0
18286 do
18287   case $1 in
18288   --*=*)
18289     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18290     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18291     shift
18292     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18293     shift
18294     ;;
18295   -*);;
18296   *) # This is not an option, so the user has probably given explicit
18297      # arguments.
18298      ac_need_defaults=false;;
18299   esac
18300
18301   case $1 in
18302   # Handling of the options.
18303 EOF
18304 cat >>$CONFIG_STATUS <<EOF
18305   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18306     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18307     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18308 EOF
18309 cat >>$CONFIG_STATUS <<\EOF
18310   --version | --vers* | -V )
18311     echo "$ac_cs_version"; exit 0 ;;
18312   --he | --h)
18313     # Conflict between --help and --header
18314     { { echo "$as_me:18314: error: ambiguous option: $1
18315 Try \`$0 --help' for more information." >&5
18316 echo "$as_me: error: ambiguous option: $1
18317 Try \`$0 --help' for more information." >&2;}
18318    { (exit 1); exit 1; }; };;
18319   --help | --hel | -h )
18320     echo "$ac_cs_usage"; exit 0 ;;
18321   --debug | --d* | -d )
18322     debug=: ;;
18323   --file | --fil | --fi | --f )
18324     shift
18325     CONFIG_FILES="$CONFIG_FILES $1"
18326     ac_need_defaults=false;;
18327   --header | --heade | --head | --hea )
18328     shift
18329     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18330     ac_need_defaults=false;;
18331
18332   # This is an error.
18333   -*) { { echo "$as_me:18333: error: unrecognized option: $1
18334 Try \`$0 --help' for more information." >&5
18335 echo "$as_me: error: unrecognized option: $1
18336 Try \`$0 --help' for more information." >&2;}
18337    { (exit 1); exit 1; }; } ;;
18338
18339   *) ac_config_targets="$ac_config_targets $1" ;;
18340
18341   esac
18342   shift
18343 done
18344
18345 exec 5>>config.log
18346 cat >&5 << _ACEOF
18347
18348 ## ----------------------- ##
18349 ## Running config.status.  ##
18350 ## ----------------------- ##
18351
18352 This file was extended by $as_me 2.52.20081225, executed with
18353   CONFIG_FILES    = $CONFIG_FILES
18354   CONFIG_HEADERS  = $CONFIG_HEADERS
18355   CONFIG_LINKS    = $CONFIG_LINKS
18356   CONFIG_COMMANDS = $CONFIG_COMMANDS
18357   > $ac_cs_invocation
18358 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18359
18360 _ACEOF
18361 EOF
18362
18363 cat >>$CONFIG_STATUS <<EOF
18364 #
18365 # INIT-COMMANDS section.
18366 #
18367
18368 ### Special initialization commands, used to pass information from the
18369 ### configuration-run into config.status
18370
18371 AWK="$AWK"
18372 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18373 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18374 ECHO_LINK="$ECHO_LINK"
18375 LDCONFIG="$LDCONFIG"
18376 LIB_NAME="$LIB_NAME"
18377 LIB_SUBSETS="$LIB_SUBSETS"
18378 LIB_SUFFIX="$LIB_SUFFIX"
18379 LIB_TRACING="$LIB_TRACING"
18380 MAKE_TERMINFO="$MAKE_TERMINFO"
18381 NCURSES_MAJOR="$NCURSES_MAJOR"
18382 NCURSES_MINOR="$NCURSES_MINOR"
18383 NCURSES_OSPEED="$NCURSES_OSPEED"
18384 NCURSES_PATCH="$NCURSES_PATCH"
18385 SRC_SUBDIRS="$SRC_SUBDIRS"
18386 TERMINFO="$TERMINFO"
18387 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
18388 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
18389 TICS_NAME="$TICS_NAME"
18390 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
18391 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
18392 TINFO_NAME="$TINFO_NAME"
18393 TINFO_SUFFIX="$TINFO_SUFFIX"
18394 WITH_CURSES_H="$with_curses_h"
18395 WITH_ECHO="$with_echo"
18396 WITH_OVERWRITE="$with_overwrite"
18397 cf_LIST_MODELS="$cf_list_models"
18398 cf_cv_abi_version="$cf_cv_abi_version"
18399 cf_cv_do_relink="$cf_cv_do_relink"
18400 cf_cv_do_symlinks="$cf_cv_do_symlinks"
18401 cf_cv_enable_lp64="$cf_cv_enable_lp64"
18402 cf_cv_enable_opaque="$cf_cv_enable_opaque"
18403 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
18404 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
18405 cf_cv_rel_version="$cf_cv_rel_version"
18406 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18407 cf_cv_shared_soname='$cf_cv_shared_soname'
18408 cf_cv_shlib_version="$cf_cv_shlib_version"
18409 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18410 cf_cv_system_name="$cf_cv_system_name"
18411 cf_with_cxx_binding="$cf_with_cxx_binding"
18412 cf_with_manpages="$cf_with_manpages"
18413 host="$host"
18414 target="$target"
18415
18416 EOF
18417
18418 cat >>$CONFIG_STATUS <<\EOF
18419 for ac_config_target in $ac_config_targets
18420 do
18421   case "$ac_config_target" in
18422   # Handling of arguments.
18423   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
18424   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
18425   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
18426   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
18427   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
18428   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18429   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18430   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18431   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18432   *) { { echo "$as_me:18432: error: invalid argument: $ac_config_target" >&5
18433 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18434    { (exit 1); exit 1; }; };;
18435   esac
18436 done
18437
18438 # If the user did not use the arguments to specify the items to instantiate,
18439 # then the envvar interface is used.  Set only those that are not.
18440 # We use the long form for the default assignment because of an extremely
18441 # bizarre bug on SunOS 4.1.3.
18442 if $ac_need_defaults; then
18443   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18444   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18445   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18446 fi
18447
18448 # Create a temporary directory, and hook for its removal unless debugging.
18449 $debug ||
18450 {
18451   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18452   trap '{ (exit 1); exit 1; }' 1 2 13 15
18453 }
18454
18455 # Create a (secure) tmp directory for tmp files.
18456 : ${TMPDIR=/tmp}
18457 {
18458   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18459   test -n "$tmp" && test -d "$tmp"
18460 }  ||
18461 {
18462   tmp=$TMPDIR/cs$$-$RANDOM
18463   (umask 077 && mkdir $tmp)
18464 } ||
18465 {
18466    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18467    { (exit 1); exit 1; }
18468 }
18469
18470 EOF
18471
18472 cat >>$CONFIG_STATUS <<EOF
18473
18474 #
18475 # CONFIG_FILES section.
18476 #
18477
18478 # No need to generate the scripts if there are no CONFIG_FILES.
18479 # This happens for instance when ./config.status config.h
18480 if test -n "\$CONFIG_FILES"; then
18481   # Protect against being on the right side of a sed subst in config.status.
18482   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18483    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18484 s,@SHELL@,$SHELL,;t t
18485 s,@exec_prefix@,$exec_prefix,;t t
18486 s,@prefix@,$prefix,;t t
18487 s,@program_transform_name@,$program_transform_name,;t t
18488 s,@bindir@,$bindir,;t t
18489 s,@sbindir@,$sbindir,;t t
18490 s,@libexecdir@,$libexecdir,;t t
18491 s,@datadir@,$datadir,;t t
18492 s,@sysconfdir@,$sysconfdir,;t t
18493 s,@sharedstatedir@,$sharedstatedir,;t t
18494 s,@localstatedir@,$localstatedir,;t t
18495 s,@libdir@,$libdir,;t t
18496 s,@includedir@,$includedir,;t t
18497 s,@oldincludedir@,$oldincludedir,;t t
18498 s,@infodir@,$infodir,;t t
18499 s,@mandir@,$mandir,;t t
18500 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18501 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18502 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18503 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18504 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18505 s,@build_alias@,$build_alias,;t t
18506 s,@host_alias@,$host_alias,;t t
18507 s,@target_alias@,$target_alias,;t t
18508 s,@ECHO_C@,$ECHO_C,;t t
18509 s,@ECHO_N@,$ECHO_N,;t t
18510 s,@ECHO_T@,$ECHO_T,;t t
18511 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18512 s,@DEFS@,$DEFS,;t t
18513 s,@LIBS@,$LIBS,;t t
18514 s,@top_builddir@,$top_builddir,;t t
18515 s,@EGREP@,$EGREP,;t t
18516 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18517 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18518 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18519 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18520 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18521 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18522 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18523 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18524 s,@build@,$build,;t t
18525 s,@build_cpu@,$build_cpu,;t t
18526 s,@build_vendor@,$build_vendor,;t t
18527 s,@build_os@,$build_os,;t t
18528 s,@host@,$host,;t t
18529 s,@host_cpu@,$host_cpu,;t t
18530 s,@host_vendor@,$host_vendor,;t t
18531 s,@host_os@,$host_os,;t t
18532 s,@target@,$target,;t t
18533 s,@target_cpu@,$target_cpu,;t t
18534 s,@target_vendor@,$target_vendor,;t t
18535 s,@target_os@,$target_os,;t t
18536 s,@CC@,$CC,;t t
18537 s,@CFLAGS@,$CFLAGS,;t t
18538 s,@LDFLAGS@,$LDFLAGS,;t t
18539 s,@CPPFLAGS@,$CPPFLAGS,;t t
18540 s,@ac_ct_CC@,$ac_ct_CC,;t t
18541 s,@EXEEXT@,$EXEEXT,;t t
18542 s,@OBJEXT@,$OBJEXT,;t t
18543 s,@CPP@,$CPP,;t t
18544 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18545 s,@PROG_EXT@,$PROG_EXT,;t t
18546 s,@LDCONFIG@,$LDCONFIG,;t t
18547 s,@CXX@,$CXX,;t t
18548 s,@CXXFLAGS@,$CXXFLAGS,;t t
18549 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
18550 s,@AWK@,$AWK,;t t
18551 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18552 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18553 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18554 s,@LINT@,$LINT,;t t
18555 s,@LINT_OPTS@,$LINT_OPTS,;t t
18556 s,@LN_S@,$LN_S,;t t
18557 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18558 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18559 s,@SET_MAKE@,$SET_MAKE,;t t
18560 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18561 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18562 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18563 s,@RANLIB@,$RANLIB,;t t
18564 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18565 s,@LD@,$LD,;t t
18566 s,@ac_ct_LD@,$ac_ct_LD,;t t
18567 s,@AR@,$AR,;t t
18568 s,@ac_ct_AR@,$ac_ct_AR,;t t
18569 s,@ARFLAGS@,$ARFLAGS,;t t
18570 s,@DESTDIR@,$DESTDIR,;t t
18571 s,@BUILD_CC@,$BUILD_CC,;t t
18572 s,@BUILD_CPP@,$BUILD_CPP,;t t
18573 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18574 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18575 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18576 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18577 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18578 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18579 s,@cf_list_models@,$cf_list_models,;t t
18580 s,@LIBTOOL@,$LIBTOOL,;t t
18581 s,@LT_UNDEF@,$LT_UNDEF,;t t
18582 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
18583 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
18584 s,@LIB_CREATE@,$LIB_CREATE,;t t
18585 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
18586 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18587 s,@LIB_PREP@,$LIB_PREP,;t t
18588 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
18589 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
18590 s,@LIB_LINK@,$LIB_LINK,;t t
18591 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
18592 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
18593 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18594 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18595 s,@TICS_NAME@,$TICS_NAME,;t t
18596 s,@TINFO_NAME@,$TINFO_NAME,;t t
18597 s,@LIB_NAME@,$LIB_NAME,;t t
18598 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18599 s,@CC_G_OPT@,$CC_G_OPT,;t t
18600 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
18601 s,@LD_MODEL@,$LD_MODEL,;t t
18602 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18603 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18604 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18605 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18606 s,@LINK_PROGS@,$LINK_PROGS,;t t
18607 s,@LINK_TESTS@,$LINK_TESTS,;t t
18608 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18609 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18610 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18611 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18612 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
18613 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
18614 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
18615 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
18616 s,@TERMINFO@,$TERMINFO,;t t
18617 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
18618 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
18619 s,@TERMPATH@,$TERMPATH,;t t
18620 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18621 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
18622 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
18623 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
18624 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
18625 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
18626 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
18627 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
18628 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
18629 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
18630 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
18631 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
18632 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
18633 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
18634 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
18635 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
18636 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18637 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
18638 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
18639 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
18640 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18641 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
18642 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
18643 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
18644 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
18645 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
18646 s,@PTHREAD@,$PTHREAD,;t t
18647 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18648 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
18649 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
18650 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
18651 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18652 s,@ECHO_LINK@,$ECHO_LINK,;t t
18653 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18654 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
18655 s,@ADA_TRACE@,$ADA_TRACE,;t t
18656 s,@MATH_LIB@,$MATH_LIB,;t t
18657 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
18658 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
18659 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
18660 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
18661 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
18662 s,@TEST_LIBS@,$TEST_LIBS,;t t
18663 s,@CXXCPP@,$CXXCPP,;t t
18664 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
18665 s,@CXX_AR@,$CXX_AR,;t t
18666 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
18667 s,@CXXLIBS@,$CXXLIBS,;t t
18668 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
18669 s,@gnat_exists@,$gnat_exists,;t t
18670 s,@M4_exists@,$M4_exists,;t t
18671 s,@cf_ada_make@,$cf_ada_make,;t t
18672 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18673 s,@cf_ada_package@,$cf_ada_package,;t t
18674 s,@ADAFLAGS@,$ADAFLAGS,;t t
18675 s,@cf_compile_generics@,$cf_compile_generics,;t t
18676 s,@cf_generic_objects@,$cf_generic_objects,;t t
18677 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
18678 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18679 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18680 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18681 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18682 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18683 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18684 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
18685 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
18686 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
18687 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
18688 s,@TICS_ARGS@,$TICS_ARGS,;t t
18689 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
18690 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
18691 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
18692 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
18693 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
18694 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18695 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18696 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
18697 s,@TICS_LIST@,$TICS_LIST,;t t
18698 s,@TINFO_LIST@,$TINFO_LIST,;t t
18699 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
18700 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18701 s,@TEST_ARGS@,$TEST_ARGS,;t t
18702 s,@TEST_DEPS@,$TEST_DEPS,;t t
18703 s,@TEST_ARG2@,$TEST_ARG2,;t t
18704 s,@TEST_DEP2@,$TEST_DEP2,;t t
18705 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18706 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
18707 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18708 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
18709 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
18710 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
18711 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
18712 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
18713 s,@cross_compiling@,$cross_compiling,;t t
18714 CEOF
18715
18716 EOF
18717
18718   cat >>$CONFIG_STATUS <<\EOF
18719   # Split the substitutions into bite-sized pieces for seds with
18720   # small command number limits, like on Digital OSF/1 and HP-UX.
18721   ac_max_sed_lines=48
18722   ac_sed_frag=1 # Number of current file.
18723   ac_beg=1 # First line for current file.
18724   ac_end=$ac_max_sed_lines # Line after last line for current file.
18725   ac_more_lines=:
18726   ac_sed_cmds=
18727   while $ac_more_lines; do
18728     if test $ac_beg -gt 1; then
18729       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18730     else
18731       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18732     fi
18733     if test ! -s $tmp/subs.frag; then
18734       ac_more_lines=false
18735     else
18736       # The purpose of the label and of the branching condition is to
18737       # speed up the sed processing (if there are no `@' at all, there
18738       # is no need to browse any of the substitutions).
18739       # These are the two extra sed commands mentioned above.
18740       (echo ':t
18741   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18742       if test -z "$ac_sed_cmds"; then
18743         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18744       else
18745         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18746       fi
18747       ac_sed_frag=`expr $ac_sed_frag + 1`
18748       ac_beg=$ac_end
18749       ac_end=`expr $ac_end + $ac_max_sed_lines`
18750     fi
18751   done
18752   if test -z "$ac_sed_cmds"; then
18753     ac_sed_cmds=cat
18754   fi
18755 fi # test -n "$CONFIG_FILES"
18756
18757 EOF
18758 cat >>$CONFIG_STATUS <<\EOF
18759 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18760   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18761   case $ac_file in
18762   - | *:- | *:-:* ) # input from stdin
18763         cat >$tmp/stdin
18764         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18765         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18766   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18767         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18768   * )   ac_file_in=$ac_file.in ;;
18769   esac
18770
18771   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18772   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18773          X"$ac_file" : 'X\(//\)[^/]' \| \
18774          X"$ac_file" : 'X\(//\)$' \| \
18775          X"$ac_file" : 'X\(/\)' \| \
18776          .     : '\(.\)' 2>/dev/null ||
18777 echo X"$ac_file" |
18778     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18779           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18780           /^X\(\/\/\)$/{ s//\1/; q; }
18781           /^X\(\/\).*/{ s//\1/; q; }
18782           s/.*/./; q'`
18783   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18784     { case "$ac_dir" in
18785   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18786   *)                      as_incr_dir=.;;
18787 esac
18788 as_dummy="$ac_dir"
18789 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18790   case $as_mkdir_dir in
18791     # Skip DOS drivespec
18792     ?:) as_incr_dir=$as_mkdir_dir ;;
18793     *)
18794       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18795       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18796     ;;
18797   esac
18798 done; }
18799
18800     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18801     # A "../" for each directory in $ac_dir_suffix.
18802     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18803   else
18804     ac_dir_suffix= ac_dots=
18805   fi
18806
18807   case $srcdir in
18808   .)  ac_srcdir=.
18809       if test -z "$ac_dots"; then
18810          ac_top_srcdir=.
18811       else
18812          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18813       fi ;;
18814   [\\/]* | ?:[\\/]* )
18815       ac_srcdir=$srcdir$ac_dir_suffix;
18816       ac_top_srcdir=$srcdir ;;
18817   *) # Relative path.
18818     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18819     ac_top_srcdir=$ac_dots$srcdir ;;
18820   esac
18821
18822   case $INSTALL in
18823   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18824   *) ac_INSTALL=$ac_dots$INSTALL ;;
18825   esac
18826
18827   if test x"$ac_file" != x-; then
18828     { echo "$as_me:18828: creating $ac_file" >&5
18829 echo "$as_me: creating $ac_file" >&6;}
18830     rm -f "$ac_file"
18831   fi
18832   # Let's still pretend it is `configure' which instantiates (i.e., don't
18833   # use $as_me), people would be surprised to read:
18834   #    /* config.h.  Generated automatically by config.status.  */
18835   configure_input="Generated automatically from `echo $ac_file_in |
18836                                                  sed 's,.*/,,'` by configure."
18837
18838   # First look for the input files in the build tree, otherwise in the
18839   # src tree.
18840   ac_file_inputs=`IFS=:
18841     for f in $ac_file_in; do
18842       case $f in
18843       -) echo $tmp/stdin ;;
18844       [\\/$]*)
18845          # Absolute (can't be DOS-style, as IFS=:)
18846          test -f "$f" || { { echo "$as_me:18846: error: cannot find input file: $f" >&5
18847 echo "$as_me: error: cannot find input file: $f" >&2;}
18848    { (exit 1); exit 1; }; }
18849          echo $f;;
18850       *) # Relative
18851          if test -f "$f"; then
18852            # Build tree
18853            echo $f
18854          elif test -f "$srcdir/$f"; then
18855            # Source tree
18856            echo $srcdir/$f
18857          else
18858            # /dev/null tree
18859            { { echo "$as_me:18859: error: cannot find input file: $f" >&5
18860 echo "$as_me: error: cannot find input file: $f" >&2;}
18861    { (exit 1); exit 1; }; }
18862          fi;;
18863       esac
18864     done` || { (exit 1); exit 1; }
18865 EOF
18866 cat >>$CONFIG_STATUS <<EOF
18867   sed "$ac_vpsub
18868 $extrasub
18869 EOF
18870 cat >>$CONFIG_STATUS <<\EOF
18871 :t
18872 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18873 s,@configure_input@,$configure_input,;t t
18874 s,@srcdir@,$ac_srcdir,;t t
18875 s,@top_srcdir@,$ac_top_srcdir,;t t
18876 s,@INSTALL@,$ac_INSTALL,;t t
18877 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18878   rm -f $tmp/stdin
18879   if test x"$ac_file" != x-; then
18880     mv $tmp/out $ac_file
18881   else
18882     cat $tmp/out
18883     rm -f $tmp/out
18884   fi
18885
18886 done
18887 EOF
18888 cat >>$CONFIG_STATUS <<\EOF
18889
18890 #
18891 # CONFIG_HEADER section.
18892 #
18893
18894 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18895 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18896 #
18897 # ac_d sets the value in "#define NAME VALUE" lines.
18898 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18899 ac_dB='[        ].*$,\1#\2'
18900 ac_dC=' '
18901 ac_dD=',;t'
18902 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18903 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18904 ac_iB='\([      ]\),\1#\2define\3'
18905 ac_iC=' '
18906 ac_iD='\4,;t'
18907 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18908 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18909 ac_uB='$,\1#\2define\3'
18910 ac_uC=' '
18911 ac_uD=',;t'
18912
18913 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18914   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18915   case $ac_file in
18916   - | *:- | *:-:* ) # input from stdin
18917         cat >$tmp/stdin
18918         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18919         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18920   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18921         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18922   * )   ac_file_in=$ac_file.in ;;
18923   esac
18924
18925   test x"$ac_file" != x- && { echo "$as_me:18925: creating $ac_file" >&5
18926 echo "$as_me: creating $ac_file" >&6;}
18927
18928   # First look for the input files in the build tree, otherwise in the
18929   # src tree.
18930   ac_file_inputs=`IFS=:
18931     for f in $ac_file_in; do
18932       case $f in
18933       -) echo $tmp/stdin ;;
18934       [\\/$]*)
18935          # Absolute (can't be DOS-style, as IFS=:)
18936          test -f "$f" || { { echo "$as_me:18936: error: cannot find input file: $f" >&5
18937 echo "$as_me: error: cannot find input file: $f" >&2;}
18938    { (exit 1); exit 1; }; }
18939          echo $f;;
18940       *) # Relative
18941          if test -f "$f"; then
18942            # Build tree
18943            echo $f
18944          elif test -f "$srcdir/$f"; then
18945            # Source tree
18946            echo $srcdir/$f
18947          else
18948            # /dev/null tree
18949            { { echo "$as_me:18949: error: cannot find input file: $f" >&5
18950 echo "$as_me: error: cannot find input file: $f" >&2;}
18951    { (exit 1); exit 1; }; }
18952          fi;;
18953       esac
18954     done` || { (exit 1); exit 1; }
18955   # Remove the trailing spaces.
18956   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18957
18958 EOF
18959
18960 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18961 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18962 # be either 'cat' or 'sort'.
18963 cat confdefs.h | uniq >conftest.vals
18964
18965 # Break up conftest.vals because some shells have a limit on
18966 # the size of here documents, and old seds have small limits too.
18967
18968 rm -f conftest.tail
18969 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18970 while grep . conftest.vals >/dev/null
18971 do
18972   # Write chunks of a limited-size here document to conftest.frag.
18973   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18974   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18975   echo 'CEOF' >> $CONFIG_STATUS
18976   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18977   rm -f conftest.vals
18978   mv conftest.tail conftest.vals
18979 done
18980 rm -f conftest.vals
18981
18982 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18983 # marker @DEFS@.
18984 echo '  cat >> conftest.edit <<CEOF
18985 /@DEFS@/r conftest.frag
18986 /@DEFS@/d
18987 CEOF
18988 sed -f conftest.edit $tmp/in > $tmp/out
18989 rm -f $tmp/in
18990 mv $tmp/out $tmp/in
18991 rm -f conftest.edit conftest.frag
18992 ' >> $CONFIG_STATUS
18993
18994 cat >>$CONFIG_STATUS <<\EOF
18995   # Let's still pretend it is `configure' which instantiates (i.e., don't
18996   # use $as_me), people would be surprised to read:
18997   #    /* config.h.  Generated automatically by config.status.  */
18998   if test x"$ac_file" = x-; then
18999     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19000   else
19001     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19002   fi
19003   cat $tmp/in >>$tmp/config.h
19004   rm -f $tmp/in
19005   if test x"$ac_file" != x-; then
19006     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19007       { echo "$as_me:19007: $ac_file is unchanged" >&5
19008 echo "$as_me: $ac_file is unchanged" >&6;}
19009     else
19010       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19011          X"$ac_file" : 'X\(//\)[^/]' \| \
19012          X"$ac_file" : 'X\(//\)$' \| \
19013          X"$ac_file" : 'X\(/\)' \| \
19014          .     : '\(.\)' 2>/dev/null ||
19015 echo X"$ac_file" |
19016     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19017           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19018           /^X\(\/\/\)$/{ s//\1/; q; }
19019           /^X\(\/\).*/{ s//\1/; q; }
19020           s/.*/./; q'`
19021       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19022         { case "$ac_dir" in
19023   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19024   *)                      as_incr_dir=.;;
19025 esac
19026 as_dummy="$ac_dir"
19027 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19028   case $as_mkdir_dir in
19029     # Skip DOS drivespec
19030     ?:) as_incr_dir=$as_mkdir_dir ;;
19031     *)
19032       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19033       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19034     ;;
19035   esac
19036 done; }
19037
19038       fi
19039       rm -f $ac_file
19040       mv $tmp/config.h $ac_file
19041     fi
19042   else
19043     cat $tmp/config.h
19044     rm -f $tmp/config.h
19045   fi
19046 done
19047 EOF
19048 cat >>$CONFIG_STATUS <<\EOF
19049
19050 #
19051 # CONFIG_COMMANDS section.
19052 #
19053 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19054   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19055   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19056
19057   case $ac_dest in
19058     default )
19059
19060 for cf_dir in test
19061 do
19062         if test ! -d $srcdir/$cf_dir; then
19063                 continue
19064         elif test -f $srcdir/$cf_dir/programs; then
19065                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19066         fi
19067 done
19068
19069         case $cf_cv_system_name in #(vi
19070         OS/2*|os2*) #(vi
19071         LIB_PREFIX=''
19072         ;;
19073         *)      LIB_PREFIX='lib'
19074         ;;
19075         esac
19076 cf_prefix=$LIB_PREFIX
19077
19078 if test $cf_cv_shlib_version = cygdll ; then
19079         TINFO_NAME=$TINFO_ARG_SUFFIX
19080         TINFO_SUFFIX=.dll
19081 fi
19082
19083 for cf_dir in $SRC_SUBDIRS
19084 do
19085         if test ! -d $srcdir/$cf_dir ; then
19086                 continue
19087         elif test -f $srcdir/$cf_dir/modules; then
19088
19089                 SHARED_LIB=
19090                 LIBS_TO_MAKE=
19091                 for cf_item in $cf_LIST_MODELS
19092                 do
19093
19094         case $cf_item in #(vi
19095         libtool) #(vi
19096                 cf_suffix='.la'
19097                 cf_depsuf=$cf_suffix
19098                 ;;
19099         normal) #(vi
19100                 cf_suffix='.a'
19101                 cf_depsuf=$cf_suffix
19102                 ;;
19103         debug) #(vi
19104                 cf_suffix='_g.a'
19105                 cf_depsuf=$cf_suffix
19106                 ;;
19107         profile) #(vi
19108                 cf_suffix='_p.a'
19109                 cf_depsuf=$cf_suffix
19110                 ;;
19111         shared) #(vi
19112                 case $cf_cv_system_name in
19113                 aix[56]*) #(vi
19114                         cf_suffix='.a'
19115                         cf_depsuf=$cf_suffix
19116                         ;;
19117                 cygwin*) #(vi
19118                         cf_suffix='.dll'
19119                         cf_depsuf='.dll.a'
19120                         ;;
19121                 darwin*) #(vi
19122                         cf_suffix='.dylib'
19123                         cf_depsuf=$cf_suffix
19124                         ;;
19125                 hpux*) #(vi
19126                         case $target in
19127                         ia64*) #(vi
19128                                 cf_suffix='.so'
19129                                 cf_depsuf=$cf_suffix
19130                                 ;;
19131                         *) #(vi
19132                                 cf_suffix='.sl'
19133                                 cf_depsuf=$cf_suffix
19134                                 ;;
19135                         esac
19136                         ;;
19137                 *)      cf_suffix='.so'
19138                         cf_depsuf=$cf_suffix
19139                         ;;
19140                 esac
19141         esac
19142         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19143         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19144
19145                         if test $cf_item = shared ; then
19146                         if test "$cf_cv_do_symlinks" = yes ; then
19147                                 case "$cf_cv_shlib_version" in #(vi
19148                                 rel) #(vi
19149                                         case "$cf_cv_system_name" in #(vi
19150                                         darwin*)
19151                                         case .${LIB_SUFFIX} in
19152                                         .w*)
19153                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19154                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19155                                                 ;;
19156                                         *)
19157                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19158                                                 ;;
19159                                         esac
19160                                         ;; #(vi
19161                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19162                                         esac
19163                                         ;;
19164                                 abi)
19165                                         case "$cf_cv_system_name" in #(vi
19166                                         darwin*)
19167                                         case .${LIB_SUFFIX} in
19168                                         .w*)
19169                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19170                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19171                                                 ;;
19172                                         *)
19173                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19174                                                 ;;
19175                                         esac
19176                                         ;; #(vi
19177                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19178                                         esac
19179                                         ;;
19180                                 esac
19181                         fi
19182                         # cygwin needs import library, and has unique naming convention
19183                         # use autodetected ${cf_prefix} for import lib and static lib, but
19184                         # use 'cyg' prefix for shared lib.
19185                         if test $cf_cv_shlib_version = cygdll ; then
19186                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19187                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19188                                 continue
19189                         fi
19190                         fi
19191                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19192                 done
19193
19194                 if test $cf_dir = ncurses ; then
19195                         cf_subsets="$LIB_SUBSETS"
19196                         cf_r_parts="$cf_subsets"
19197                         cf_liblist="$LIBS_TO_MAKE"
19198
19199                         while test -n "$cf_r_parts"
19200                         do
19201                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19202                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19203                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19204                                         cf_item=
19205                                         case $cf_l_parts in #(vi
19206                                         *termlib*) #(vi
19207                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19208                                                 ;;
19209                                         *ticlib*)
19210                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19211                                                 ;;
19212                                         *)
19213                                                 break
19214                                                 ;;
19215                                         esac
19216                                         if test -n "$cf_item"; then
19217                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19218                                         fi
19219                                 else
19220                                         break
19221                                 fi
19222                         done
19223                 else
19224                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19225                 fi
19226
19227                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19228                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19229                         $cf_dir/Makefile >$cf_dir/Makefile.out
19230                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19231
19232                 $AWK -f $srcdir/mk-0th.awk \
19233                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19234                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19235
19236                 for cf_subset in $cf_subsets
19237                 do
19238                         cf_subdirs=
19239                         for cf_item in $cf_LIST_MODELS
19240                         do
19241                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19242
19243 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19244
19245         case $cf_item in #(vi
19246         libtool) #(vi
19247                 cf_suffix='.la'
19248                 cf_depsuf=$cf_suffix
19249                 ;;
19250         normal) #(vi
19251                 cf_suffix='.a'
19252                 cf_depsuf=$cf_suffix
19253                 ;;
19254         debug) #(vi
19255                 cf_suffix='_g.a'
19256                 cf_depsuf=$cf_suffix
19257                 ;;
19258         profile) #(vi
19259                 cf_suffix='_p.a'
19260                 cf_depsuf=$cf_suffix
19261                 ;;
19262         shared) #(vi
19263                 case $cf_cv_system_name in
19264                 aix[56]*) #(vi
19265                         cf_suffix='.a'
19266                         cf_depsuf=$cf_suffix
19267                         ;;
19268                 cygwin*) #(vi
19269                         cf_suffix='.dll'
19270                         cf_depsuf='.dll.a'
19271                         ;;
19272                 darwin*) #(vi
19273                         cf_suffix='.dylib'
19274                         cf_depsuf=$cf_suffix
19275                         ;;
19276                 hpux*) #(vi
19277                         case $target in
19278                         ia64*) #(vi
19279                                 cf_suffix='.so'
19280                                 cf_depsuf=$cf_suffix
19281                                 ;;
19282                         *) #(vi
19283                                 cf_suffix='.sl'
19284                                 cf_depsuf=$cf_suffix
19285                                 ;;
19286                         esac
19287                         ;;
19288                 *)      cf_suffix='.so'
19289                         cf_depsuf=$cf_suffix
19290                         ;;
19291                 esac
19292         esac
19293         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19294         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19295
19296         case $cf_item in
19297         libtool) cf_subdir='obj_lo'  ;;
19298         normal)  cf_subdir='objects' ;;
19299         debug)   cf_subdir='obj_g' ;;
19300         profile) cf_subdir='obj_p' ;;
19301         shared)
19302                 case $cf_cv_system_name in #(vi
19303                 cygwin) #(vi
19304                         cf_subdir='objects' ;;
19305                 *)
19306                         cf_subdir='obj_s' ;;
19307                 esac
19308         esac
19309
19310                         # Test for case where we build libtinfo with a different name.
19311                         cf_libname=$cf_dir
19312                         if test $cf_dir = ncurses ; then
19313                                 case $cf_subset in
19314                                 *base*)
19315                                         cf_libname=${cf_libname}$LIB_SUFFIX
19316                                         ;;
19317                                 *termlib*)
19318                                         cf_libname=$TINFO_LIB_SUFFIX
19319                                         ;;
19320                                 ticlib*)
19321                                         cf_libname=$TICS_LIB_SUFFIX
19322                                         ;;
19323                                 esac
19324                         else
19325                                 cf_libname=${cf_libname}$LIB_SUFFIX
19326                         fi
19327                         if test -n "${DFT_ARG_SUFFIX}" ; then
19328                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
19329                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
19330                         fi
19331
19332                         # These dependencies really are for development, not
19333                         # builds, but they are useful in porting, too.
19334                         cf_depend="../include/ncurses_cfg.h"
19335                         if test "$srcdir" = "."; then
19336                                 cf_reldir="."
19337                         else
19338                                 cf_reldir="\${srcdir}"
19339                         fi
19340
19341                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
19342                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
19343                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
19344                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
19345                         fi
19346
19347                         cf_dir_suffix=
19348                         old_cf_suffix="$cf_suffix"
19349                         if test "$cf_cv_shlib_version_infix" = yes ; then
19350                         if test -n "$LIB_SUFFIX" ; then
19351                                 case $LIB_SUFFIX in
19352                                 w*)
19353                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
19354                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19355                                         cf_dir_suffix=w
19356                                         ;;
19357                                 esac
19358                         fi
19359                         fi
19360
19361                         $AWK -f $srcdir/mk-1st.awk \
19362                                 name=${cf_libname}${cf_dir_suffix} \
19363                                 traces=$LIB_TRACING \
19364                                 MODEL=$cf_ITEM \
19365                                 model=$cf_subdir \
19366                                 prefix=$cf_prefix \
19367                                 suffix=$cf_suffix \
19368                                 subset=$cf_subset \
19369                                 TermlibRoot=$TINFO_NAME \
19370                                 TermlibSuffix=$TINFO_SUFFIX \
19371                                 ShlibVer=$cf_cv_shlib_version \
19372                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
19373                                 ReLink=${cf_cv_do_relink-no} \
19374                                 DoLinks=$cf_cv_do_symlinks \
19375                                 rmSoLocs=$cf_cv_rm_so_locs \
19376                                 ldconfig="$LDCONFIG" \
19377                                 overwrite=$WITH_OVERWRITE \
19378                                 depend="$cf_depend" \
19379                                 host="$host" \
19380                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19381
19382                         cf_suffix="$old_cf_suffix"
19383
19384                         for cf_subdir2 in $cf_subdirs lib
19385                         do
19386                                 test $cf_subdir = $cf_subdir2 && break
19387                         done
19388                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
19389                         $AWK -f $srcdir/mk-2nd.awk \
19390                                 name=$cf_dir \
19391                                 traces=$LIB_TRACING \
19392                                 MODEL=$cf_ITEM \
19393                                 model=$cf_subdir \
19394                                 subset=$cf_subset \
19395                                 srcdir=$srcdir \
19396                                 echo=$WITH_ECHO \
19397                                 crenames=$cf_cv_prog_CC_c_o \
19398                                 cxxrenames=$cf_cv_prog_CXX_c_o \
19399                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19400                         cf_subdirs="$cf_subdirs $cf_subdir"
19401                         done
19402                 done
19403         fi
19404
19405         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
19406 done
19407
19408 for cf_dir in $SRC_SUBDIRS
19409 do
19410         if test ! -d $srcdir/$cf_dir ; then
19411                 continue
19412         fi
19413
19414         if test -f $cf_dir/Makefile ; then
19415                 case "$cf_dir" in
19416                 Ada95) #(vi
19417                         echo 'libs \' >> Makefile
19418                         echo 'install.libs \' >> Makefile
19419                         echo 'uninstall.libs ::' >> Makefile
19420                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
19421                         ;;
19422                 esac
19423         fi
19424
19425         if test -f $srcdir/$cf_dir/modules; then
19426                 echo >> Makefile
19427                 if test -f $srcdir/$cf_dir/headers; then
19428 cat >> Makefile <<CF_EOF
19429 install.includes \\
19430 uninstall.includes \\
19431 CF_EOF
19432                 fi
19433 if test "$cf_dir" != "c++" ; then
19434 echo 'lint \' >> Makefile
19435 fi
19436 cat >> Makefile <<CF_EOF
19437 libs \\
19438 lintlib \\
19439 install.libs \\
19440 uninstall.libs \\
19441 install.$cf_dir \\
19442 uninstall.$cf_dir ::
19443         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
19444 CF_EOF
19445         elif test -f $srcdir/$cf_dir/headers; then
19446 cat >> Makefile <<CF_EOF
19447
19448 libs \\
19449 install.libs \\
19450 uninstall.libs \\
19451 install.includes \\
19452 uninstall.includes ::
19453         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
19454 CF_EOF
19455 fi
19456 done
19457
19458 cat >> Makefile <<CF_EOF
19459
19460 install.libs uninstall.libs \\
19461 install.data uninstall.data ::
19462 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
19463 CF_EOF
19464
19465 if test "x$cf_with_manpages" = xyes; then
19466 cat >> Makefile <<CF_EOF
19467
19468 install.man \\
19469 uninstall.man ::
19470         cd man && \${MAKE} \${CF_MFLAGS} \$@
19471 CF_EOF
19472 fi
19473
19474 cat >> Makefile <<CF_EOF
19475
19476 distclean ::
19477         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
19478         rm -f headers.sh headers.sed mk_shared_lib.sh
19479         rm -f edit_man.* man_alias.*
19480         rm -rf \${DIRS_TO_MAKE}
19481 CF_EOF
19482
19483 # Special case: tack's manpage lives in its own directory.
19484 if test "x$cf_with_manpages" = xyes; then
19485 if test -d tack ; then
19486 if test -f $srcdir/$tack.h; then
19487 cat >> Makefile <<CF_EOF
19488
19489 install.man \\
19490 uninstall.man ::
19491         cd tack && \${MAKE} \${CF_MFLAGS} \$@
19492 CF_EOF
19493 fi
19494 fi
19495 fi
19496
19497 rm -f headers.sed headers.sh
19498
19499 echo creating headers.sh
19500 cat >headers.sh <<CF_EOF
19501 #! /bin/sh
19502 # This shell script is generated by the 'configure' script.  It is invoked in a
19503 # subdirectory of the build tree.  It generates a sed-script in the parent
19504 # directory that is used to adjust includes for header files that reside in a
19505 # subdirectory of /usr/include, etc.
19506 PRG=""
19507 while test \$# != 3
19508 do
19509 PRG="\$PRG \$1"; shift
19510 done
19511 DST=\$1
19512 REF=\$2
19513 SRC=\$3
19514 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
19515 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
19516 echo installing \$SRC in \$DST
19517 CF_EOF
19518
19519 if test $WITH_CURSES_H = yes; then
19520         cat >>headers.sh <<CF_EOF
19521 case \$DST in
19522 /*/include/*)
19523         END=\`basename \$DST\`
19524         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
19525         do
19526                 NAME=\`basename \$i\`
19527                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
19528         done
19529         ;;
19530 *)
19531         echo "" >> \$TMPSED
19532         ;;
19533 esac
19534 CF_EOF
19535
19536 else
19537         cat >>headers.sh <<CF_EOF
19538 case \$DST in
19539 /*/include/*)
19540         END=\`basename \$DST\`
19541         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
19542         do
19543                 NAME=\`basename \$i\`
19544                 if test "\$NAME" = "curses.h"
19545                 then
19546                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
19547                         NAME=ncurses.h
19548                 fi
19549                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
19550         done
19551         ;;
19552 *)
19553         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
19554         ;;
19555 esac
19556 CF_EOF
19557 fi
19558 cat >>headers.sh <<CF_EOF
19559 rm -f \$TMPSRC
19560 sed -f \$TMPSED \$SRC > \$TMPSRC
19561 NAME=\`basename \$SRC\`
19562 CF_EOF
19563 if test $WITH_CURSES_H != yes; then
19564         cat >>headers.sh <<CF_EOF
19565 test "\$NAME" = "curses.h" && NAME=ncurses.h
19566 CF_EOF
19567 fi
19568 cat >>headers.sh <<CF_EOF
19569 # Just in case someone gzip'd manpages, remove the conflicting copy.
19570 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
19571
19572 eval \$PRG \$TMPSRC \$DST/\$NAME
19573 rm -f \$TMPSRC \$TMPSED
19574 CF_EOF
19575
19576 chmod 0755 headers.sh
19577
19578 for cf_dir in $SRC_SUBDIRS
19579 do
19580         if test ! -d $srcdir/$cf_dir ; then
19581                 continue
19582         fi
19583
19584         if test -f $srcdir/$cf_dir/headers; then
19585                 $AWK -f $srcdir/mk-hdr.awk \
19586                         subset="$LIB_SUBSETS" \
19587                         compat="$WITH_CURSES_H" \
19588                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
19589         fi
19590
19591         if test -f $srcdir/$cf_dir/modules; then
19592                 if test "$cf_dir" != "c++" ; then
19593                         cat >>$cf_dir/Makefile <<"CF_EOF"
19594 depend : ${AUTO_SRC}
19595         makedepend -- ${CPPFLAGS} -- ${C_SRC}
19596
19597 # DO NOT DELETE THIS LINE -- make depend depends on it.
19598 CF_EOF
19599                 fi
19600         fi
19601 done
19602
19603  ;;
19604   esac
19605 done
19606 EOF
19607
19608 cat >>$CONFIG_STATUS <<\EOF
19609
19610 { (exit 0); exit 0; }
19611 EOF
19612 chmod +x $CONFIG_STATUS
19613 ac_clean_files=$ac_clean_files_save
19614
19615 # configure is writing to config.log, and then calls config.status.
19616 # config.status does its own redirection, appending to config.log.
19617 # Unfortunately, on DOS this fails, as config.log is still kept open
19618 # by configure, so config.status won't be able to write to it; its
19619 # output is simply discarded.  So we exec the FD to /dev/null,
19620 # effectively closing config.log, so it can be properly (re)opened and
19621 # appended to by config.status.  When coming back to configure, we
19622 # need to make the FD available again.
19623 if test "$no_create" != yes; then
19624   ac_cs_success=:
19625   exec 5>/dev/null
19626   $SHELL $CONFIG_STATUS || ac_cs_success=false
19627   exec 5>>config.log
19628   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19629   # would make configure fail if this is the last instruction.
19630   $ac_cs_success || { (exit 1); exit 1; }
19631 fi
19632 ${MAKE-make} preinstall