]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
c2f555c1efd1e9eee8ddb6ae9d5889fa4c4d1f40
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.456 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20080325.
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   --enable-mixed-case     tic should assume mixed-case filenames
704   --with-install-prefix   prefixes actual install-location ($DESTDIR)
705 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
706   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
707   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
708   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
709   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
710   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
711   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
712 Options to Specify the Libraries Built/Used:
713   --with-libtool          generate libraries with libtool
714   --with-shared           generate shared-libraries
715   --with-normal           generate normal-libraries (default)
716   --with-debug            generate debug-libraries (default)
717   --with-profile          generate profile-libraries
718   --with-termlib          generate separate terminfo library
719   --with-ticlib           generate separate tic library
720   --with-gpm              use Alessandro Rubini's GPM library
721   --without-dlsym         do not use dlsym() to load GPM dynamically
722   --with-sysmouse         use sysmouse (FreeBSD console)
723   --enable-rpath          use rpath option when generating shared libraries
724   --disable-relink        relink shared libraries during install
725   --with-shlib-version=X  Specify rel or abi version for shared libs
726 Fine-Tuning Your Configuration:
727   --disable-overwrite     leave out the link to -lcurses
728   --disable-database      do not use terminfo, only fallbacks/termcap
729   --with-database=XXX     specify terminfo source to install
730   --with-hashed-db        specify hashed-database library
731   --with-fallbacks=XXX    specify list of fallback terminal descriptions
732   --without-xterm-new     specify if xterm terminfo should be old version
733   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
734   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
735   --disable-big-core      assume machine has little memory
736   --disable-big-strings   assume compiler has only standard-size strings
737   --enable-termcap        compile in termcap fallback support
738   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
739   --enable-getcap         fast termcap load, no xrefs to terminfo
740   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
741   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
742   --disable-root-environ  restrict environment when running as root
743   --enable-symlinks       make tic use symbolic links not hard links
744   --enable-broken_linker  compile with broken-linker support code
745   --enable-bsdpad         recognize BSD-style prefix padding
746   --enable-widec          compile with wide-char/UTF-8 code
747   --disable-lp64          allow chtype to be long (ignore _LP64)
748   --disable-largefile     omit support for large files
749   --disable-tparm-varargs compile tparm() without varargs interface
750   --disable-tic-depends   link tic library without explicit dependency on ncurses library
751   --with-bool=TYPE        override fallback type of bool variable
752   --with-caps=alt         compile with alternate Caps file
753   --with-chtype=TYPE      override type of chtype
754   --with-ospeed=TYPE      override type of ospeed variable
755   --with-mmask-t=TYPE     override type of mmask_t
756   --with-rcs-ids          compile-in RCS identifiers
757 Options to Specify How Manpages are Installed:
758   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
759                           optionally formatted/catonly, e.g., gzip,formatted
760   --with-manpage-renames  specify manpage-renaming
761   --with-manpage-aliases  specify manpage-aliases using .so
762   --with-manpage-symlinks specify manpage-aliases using symlinks
763   --with-manpage-tbl      specify manpage processing with tbl
764 Extensions:
765   --disable-ext-funcs     disable function-extensions
766   --enable-const          compile with extra/non-standard const
767   --enable-ext-colors     compile for 256-color support
768   --enable-ext-mouse      compile for extended mouse-encoding
769   --enable-no-padding     compile with $NCURSES_NO_PADDING code
770   --enable-signed-char    compile using signed Boolean's in term.h
771   --enable-sigwinch       compile with SIGWINCH handler
772   --enable-tcap-names     compile with user-definable terminal capabilities
773 Development Code:
774   --without-develop       disable development options
775   --enable-hard-tabs      compile with hard-tabs code
776   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
777 Experimental Code:
778   --disable-assumed-color do not assume anything about default-colors
779   --disable-hashmap       compile without hashmap scrolling-optimization
780   --enable-colorfgbg      compile with $COLORFGBG code
781   --with-pthread          use POSIX thread library
782   --enable-weak-symbols   enable weak-symbols for pthreads
783   --enable-reentrant      compile with experimental reentrant code
784   --enable-safe-sprintf   compile with experimental safe-sprintf code
785   --disable-scroll-hints  compile without scroll-hints code
786   --enable-wgetch-events  compile with experimental wgetch-events code
787 Testing/development Options:
788   --enable-echo           build: display "compiling" commands (default)
789   --enable-warnings       build: turn on GCC compiler warnings
790   --enable-assertions     test: turn on generation of assertion code
791   --with-dmalloc          test: use Gray Watson's dmalloc library
792   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
793   --with-valgrind         test: use valgrind
794   --disable-leaks         test: free permanent memory, analyze leaks
795   --enable-expanded       test: generate functions for certain macros
796   --disable-macros        test: use functions rather than macros
797   --with-trace            test: add trace() function to all models of ncurses
798 Ada95 Binding Options:
799   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
800   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
801   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
802
803 Some influential environment variables:
804   CC          C compiler command
805   CFLAGS      C compiler flags
806   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
807               nonstandard directory <lib dir>
808   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
809               headers in a nonstandard directory <include dir>
810   CPP         C preprocessor
811   CXX         C++ compiler command
812   CXXFLAGS    C++ compiler flags
813   CXXCPP      C++ preprocessor
814
815 Use these variables to override the choices made by `configure' or to help
816 it to find libraries and programs with nonstandard names/locations.
817
818 EOF
819 fi
820
821 if test "$ac_init_help" = "recursive"; then
822   # If there are subdirs, report their specific --help.
823   ac_popdir=`pwd`
824   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
825     cd $ac_subdir
826     # A "../" for each directory in /$ac_subdir.
827     ac_dots=`echo $ac_subdir |
828              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
829
830     case $srcdir in
831     .) # No --srcdir option.  We are building in place.
832       ac_sub_srcdir=$srcdir ;;
833     [\\/]* | ?:[\\/]* ) # Absolute path.
834       ac_sub_srcdir=$srcdir/$ac_subdir ;;
835     *) # Relative path.
836       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
837     esac
838
839     # Check for guested configure; otherwise get Cygnus style configure.
840     if test -f $ac_sub_srcdir/configure.gnu; then
841       echo
842       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
843     elif test -f $ac_sub_srcdir/configure; then
844       echo
845       $SHELL $ac_sub_srcdir/configure  --help=recursive
846     elif test -f $ac_sub_srcdir/configure.ac ||
847            test -f $ac_sub_srcdir/configure.in; then
848       echo
849       $ac_configure --help
850     else
851       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
852     fi
853     cd $ac_popdir
854   done
855 fi
856
857 test -n "$ac_init_help" && exit 0
858 if $ac_init_version; then
859   cat <<\EOF
860
861 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
862 Free Software Foundation, Inc.
863 This configure script is free software; the Free Software Foundation
864 gives unlimited permission to copy, distribute and modify it.
865 EOF
866   exit 0
867 fi
868 exec 5>config.log
869 cat >&5 <<EOF
870 This file contains any messages produced by compilers while
871 running configure, to aid debugging if configure makes a mistake.
872
873 It was created by $as_me, which was
874 generated by GNU Autoconf 2.52.20080325.  Invocation command line was
875
876   $ $0 $@
877
878 EOF
879 {
880 cat <<_ASUNAME
881 ## ---------- ##
882 ## Platform.  ##
883 ## ---------- ##
884
885 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
886 uname -m = `(uname -m) 2>/dev/null || echo unknown`
887 uname -r = `(uname -r) 2>/dev/null || echo unknown`
888 uname -s = `(uname -s) 2>/dev/null || echo unknown`
889 uname -v = `(uname -v) 2>/dev/null || echo unknown`
890
891 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
892 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
893
894 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
895 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
896 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
897 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
898 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
899 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
900 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
901
902 PATH = $PATH
903
904 _ASUNAME
905 } >&5
906
907 cat >&5 <<EOF
908 ## ------------ ##
909 ## Core tests.  ##
910 ## ------------ ##
911
912 EOF
913
914 # Keep a trace of the command line.
915 # Strip out --no-create and --no-recursion so they do not pile up.
916 # Also quote any args containing shell meta-characters.
917 ac_configure_args=
918 ac_sep=
919 for ac_arg
920 do
921   case $ac_arg in
922   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
923   | --no-cr | --no-c) ;;
924   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
925   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
926   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
927     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
928     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
929     ac_sep=" " ;;
930   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
931      ac_sep=" " ;;
932   esac
933   # Get rid of the leading space.
934 done
935
936 # When interrupted or exit'd, cleanup temporary files, and complete
937 # config.log.  We remove comments because anyway the quotes in there
938 # would cause problems or look ugly.
939 trap 'exit_status=$?
940   # Save into config.log some information that might help in debugging.
941   echo >&5
942   echo "## ----------------- ##" >&5
943   echo "## Cache variables.  ##" >&5
944   echo "## ----------------- ##" >&5
945   echo >&5
946   # The following way of writing the cache mishandles newlines in values,
947 {
948   (set) 2>&1 |
949     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
950     *ac_space=\ *)
951       sed -n \
952         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
953           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
954       ;;
955     *)
956       sed -n \
957         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
958       ;;
959     esac;
960 } >&5
961   sed "/^$/d" confdefs.h >conftest.log
962   if test -s conftest.log; then
963     echo >&5
964     echo "## ------------ ##" >&5
965     echo "## confdefs.h.  ##" >&5
966     echo "## ------------ ##" >&5
967     echo >&5
968     cat conftest.log >&5
969   fi
970   (echo; echo) >&5
971   test "$ac_signal" != 0 &&
972     echo "$as_me: caught signal $ac_signal" >&5
973   echo "$as_me: exit $exit_status" >&5
974   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
975     exit $exit_status
976      ' 0
977 for ac_signal in 1 2 13 15; do
978   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
979 done
980 ac_signal=0
981
982 # confdefs.h avoids OS command line length limits that DEFS can exceed.
983 rm -rf conftest* confdefs.h
984 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
985 echo >confdefs.h
986
987 # Let the site file select an alternate cache file if it wants to.
988 # Prefer explicitly selected file to automatically selected ones.
989 if test -z "$CONFIG_SITE"; then
990   if test "x$prefix" != xNONE; then
991     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
992   else
993     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
994   fi
995 fi
996 for ac_site_file in $CONFIG_SITE; do
997   if test -r "$ac_site_file"; then
998     { echo "$as_me:998: loading site script $ac_site_file" >&5
999 echo "$as_me: loading site script $ac_site_file" >&6;}
1000     cat "$ac_site_file" >&5
1001     . "$ac_site_file"
1002   fi
1003 done
1004
1005 if test -r "$cache_file"; then
1006   # Some versions of bash will fail to source /dev/null (special
1007   # files actually), so we avoid doing that.
1008   if test -f "$cache_file"; then
1009     { echo "$as_me:1009: loading cache $cache_file" >&5
1010 echo "$as_me: loading cache $cache_file" >&6;}
1011     case $cache_file in
1012       [\\/]* | ?:[\\/]* ) . $cache_file;;
1013       *)                      . ./$cache_file;;
1014     esac
1015   fi
1016 else
1017   { echo "$as_me:1017: creating cache $cache_file" >&5
1018 echo "$as_me: creating cache $cache_file" >&6;}
1019   >$cache_file
1020 fi
1021
1022 # Check that the precious variables saved in the cache have kept the same
1023 # value.
1024 ac_cache_corrupted=false
1025 for ac_var in `(set) 2>&1 |
1026                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1027   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1028   eval ac_new_set=\$ac_env_${ac_var}_set
1029   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1030   eval ac_new_val="\$ac_env_${ac_var}_value"
1031   case $ac_old_set,$ac_new_set in
1032     set,)
1033       { echo "$as_me:1033: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1034 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1035       ac_cache_corrupted=: ;;
1036     ,set)
1037       { echo "$as_me:1037: error: \`$ac_var' was not set in the previous run" >&5
1038 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1039       ac_cache_corrupted=: ;;
1040     ,);;
1041     *)
1042       if test "x$ac_old_val" != "x$ac_new_val"; then
1043         { echo "$as_me:1043: error: \`$ac_var' has changed since the previous run:" >&5
1044 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1045         { echo "$as_me:1045:   former value:  $ac_old_val" >&5
1046 echo "$as_me:   former value:  $ac_old_val" >&2;}
1047         { echo "$as_me:1047:   current value: $ac_new_val" >&5
1048 echo "$as_me:   current value: $ac_new_val" >&2;}
1049         ac_cache_corrupted=:
1050       fi;;
1051   esac
1052   # Pass precious variables to config.status.  It doesn't matter if
1053   # we pass some twice (in addition to the command line arguments).
1054   if test "$ac_new_set" = set; then
1055     case $ac_new_val in
1056     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1057       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1058       ac_configure_args="$ac_configure_args '$ac_arg'"
1059       ;;
1060     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1061        ;;
1062     esac
1063   fi
1064 done
1065 if $ac_cache_corrupted; then
1066   { echo "$as_me:1066: error: changes in the environment can compromise the build" >&5
1067 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1068   { { echo "$as_me:1068: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1069 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1070    { (exit 1); exit 1; }; }
1071 fi
1072
1073 ac_ext=c
1074 ac_cpp='$CPP $CPPFLAGS'
1075 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1076 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1077 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1078 ac_main_return=return
1079
1080 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1081   *c*,-n*) ECHO_N= ECHO_C='
1082 ' ECHO_T='      ' ;;
1083   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1084   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1085 esac
1086 echo "#! $SHELL" >conftest.sh
1087 echo  "exit 0"   >>conftest.sh
1088 chmod +x conftest.sh
1089 if { (echo "$as_me:1089: PATH=\".;.\"; conftest.sh") >&5
1090   (PATH=".;."; conftest.sh) 2>&5
1091   ac_status=$?
1092   echo "$as_me:1092: \$? = $ac_status" >&5
1093   (exit $ac_status); }; then
1094   ac_path_separator=';'
1095 else
1096   ac_path_separator=:
1097 fi
1098 PATH_SEPARATOR="$ac_path_separator"
1099 rm -f conftest.sh
1100
1101 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1102
1103 top_builddir=`pwd`
1104
1105 echo "$as_me:1105: checking for egrep" >&5
1106 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1107 if test "${ac_cv_prog_egrep+set}" = set; then
1108   echo $ECHO_N "(cached) $ECHO_C" >&6
1109 else
1110   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1111     then ac_cv_prog_egrep='grep -E'
1112     else ac_cv_prog_egrep='egrep'
1113     fi
1114 fi
1115 echo "$as_me:1115: result: $ac_cv_prog_egrep" >&5
1116 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1117  EGREP=$ac_cv_prog_egrep
1118
1119 test -z "$EGREP" && { { echo "$as_me:1119: error: No egrep program found" >&5
1120 echo "$as_me: error: No egrep program found" >&2;}
1121    { (exit 1); exit 1; }; }
1122
1123 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1124 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1125 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1126 cf_cv_abi_version=${NCURSES_MAJOR}
1127 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1128 cf_cv_timestamp=`date`
1129 echo "$as_me:1129: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1130 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1131
1132 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1133
1134 # Check whether --with-rel-version or --without-rel-version was given.
1135 if test "${with_rel_version+set}" = set; then
1136   withval="$with_rel_version"
1137   { echo "$as_me:1137: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1138 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1139  cf_cv_rel_version=$withval
1140 fi;
1141
1142  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1143  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1144
1145 if test -n "$NCURSES_MAJOR" ; then
1146   case $NCURSES_MAJOR in #(vi
1147   [0-9]*) #(vi
1148         ;;
1149   *)
1150         { { echo "$as_me:1150: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1151 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1152    { (exit 1); exit 1; }; }
1153         ;;
1154   esac
1155 else
1156   { { echo "$as_me:1156: error: Release major-version value is empty" >&5
1157 echo "$as_me: error: Release major-version value is empty" >&2;}
1158    { (exit 1); exit 1; }; }
1159 fi
1160
1161 if test -n "$NCURSES_MINOR" ; then
1162   case $NCURSES_MINOR in #(vi
1163   [0-9]*) #(vi
1164         ;;
1165   *)
1166         { { echo "$as_me:1166: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1167 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1168    { (exit 1); exit 1; }; }
1169         ;;
1170   esac
1171 else
1172   { { echo "$as_me:1172: error: Release minor-version value is empty" >&5
1173 echo "$as_me: error: Release minor-version value is empty" >&2;}
1174    { (exit 1); exit 1; }; }
1175 fi
1176
1177 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1178
1179 # Check whether --with-abi-version or --without-abi-version was given.
1180 if test "${with_abi_version+set}" = set; then
1181   withval="$with_abi_version"
1182   { echo "$as_me:1182: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1183 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1184  cf_cv_abi_version=$withval
1185 fi;
1186
1187 if test -n "$cf_cv_abi_version" ; then
1188   case $cf_cv_abi_version in #(vi
1189   [0-9]*) #(vi
1190         ;;
1191   *)
1192         { { echo "$as_me:1192: error: ABI version is not a number: $cf_cv_abi_version" >&5
1193 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1194    { (exit 1); exit 1; }; }
1195         ;;
1196   esac
1197 else
1198   { { echo "$as_me:1198: error: ABI version value is empty" >&5
1199 echo "$as_me: error: ABI version value is empty" >&2;}
1200    { (exit 1); exit 1; }; }
1201 fi
1202
1203 ac_aux_dir=
1204 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1205   if test -f $ac_dir/install-sh; then
1206     ac_aux_dir=$ac_dir
1207     ac_install_sh="$ac_aux_dir/install-sh -c"
1208     break
1209   elif test -f $ac_dir/install.sh; then
1210     ac_aux_dir=$ac_dir
1211     ac_install_sh="$ac_aux_dir/install.sh -c"
1212     break
1213   elif test -f $ac_dir/shtool; then
1214     ac_aux_dir=$ac_dir
1215     ac_install_sh="$ac_aux_dir/shtool install -c"
1216     break
1217   fi
1218 done
1219 if test -z "$ac_aux_dir"; then
1220   { { echo "$as_me:1220: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1221 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1222    { (exit 1); exit 1; }; }
1223 fi
1224 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1225 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1226 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1227
1228 # Make sure we can run config.sub.
1229 $ac_config_sub sun4 >/dev/null 2>&1 ||
1230   { { echo "$as_me:1230: error: cannot run $ac_config_sub" >&5
1231 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1232    { (exit 1); exit 1; }; }
1233
1234 echo "$as_me:1234: checking build system type" >&5
1235 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1236 if test "${ac_cv_build+set}" = set; then
1237   echo $ECHO_N "(cached) $ECHO_C" >&6
1238 else
1239   ac_cv_build_alias=$build_alias
1240 test -z "$ac_cv_build_alias" &&
1241   ac_cv_build_alias=`$ac_config_guess`
1242 test -z "$ac_cv_build_alias" &&
1243   { { echo "$as_me:1243: error: cannot guess build type; you must specify one" >&5
1244 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1245    { (exit 1); exit 1; }; }
1246 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1247   { { echo "$as_me:1247: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1248 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1249    { (exit 1); exit 1; }; }
1250
1251 fi
1252 echo "$as_me:1252: result: $ac_cv_build" >&5
1253 echo "${ECHO_T}$ac_cv_build" >&6
1254 build=$ac_cv_build
1255 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1256 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1257 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1258
1259 echo "$as_me:1259: checking host system type" >&5
1260 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1261 if test "${ac_cv_host+set}" = set; then
1262   echo $ECHO_N "(cached) $ECHO_C" >&6
1263 else
1264   ac_cv_host_alias=$host_alias
1265 test -z "$ac_cv_host_alias" &&
1266   ac_cv_host_alias=$ac_cv_build_alias
1267 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1268   { { echo "$as_me:1268: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1269 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1270    { (exit 1); exit 1; }; }
1271
1272 fi
1273 echo "$as_me:1273: result: $ac_cv_host" >&5
1274 echo "${ECHO_T}$ac_cv_host" >&6
1275 host=$ac_cv_host
1276 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1277 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1278 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1279
1280 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1281         echo "$as_me:1281: checking target system type" >&5
1282 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1283 if test "${ac_cv_target+set}" = set; then
1284   echo $ECHO_N "(cached) $ECHO_C" >&6
1285 else
1286   ac_cv_target_alias=$target_alias
1287 test "x$ac_cv_target_alias" = "x" &&
1288   ac_cv_target_alias=$ac_cv_host_alias
1289 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1290   { { echo "$as_me:1290: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1291 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1292    { (exit 1); exit 1; }; }
1293
1294 fi
1295 echo "$as_me:1295: result: $ac_cv_target" >&5
1296 echo "${ECHO_T}$ac_cv_target" >&6
1297 target=$ac_cv_target
1298 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1299 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1300 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1301
1302 # The aliases save the names the user supplied, while $host etc.
1303 # will get canonicalized.
1304 test -n "$target_alias" &&
1305   test "$program_prefix$program_suffix$program_transform_name" = \
1306     NONENONEs,x,x, &&
1307   program_prefix=${target_alias}-
1308         system_name="$host_os"
1309 else
1310         system_name="`(uname -s -r) 2>/dev/null`"
1311         if test -z "$system_name" ; then
1312                 system_name="`(hostname) 2>/dev/null`"
1313         fi
1314 fi
1315 test -n "$system_name" && cat >>confdefs.h <<EOF
1316 #define SYSTEM_NAME "$system_name"
1317 EOF
1318
1319 if test "${cf_cv_system_name+set}" = set; then
1320   echo $ECHO_N "(cached) $ECHO_C" >&6
1321 else
1322   cf_cv_system_name="$system_name"
1323 fi
1324
1325 test -z "$system_name" && system_name="$cf_cv_system_name"
1326 test -n "$cf_cv_system_name" && echo "$as_me:1326: result: Configuring for $cf_cv_system_name" >&5
1327 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1328
1329 if test ".$system_name" != ".$cf_cv_system_name" ; then
1330         echo "$as_me:1330: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1331 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1332         { { echo "$as_me:1332: error: \"Please remove config.cache and try again.\"" >&5
1333 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1334    { (exit 1); exit 1; }; }
1335 fi
1336
1337 # Check whether --with-system-type or --without-system-type was given.
1338 if test "${with_system_type+set}" = set; then
1339   withval="$with_system_type"
1340   { echo "$as_me:1340: WARNING: overriding system type to $withval" >&5
1341 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1342  cf_cv_system_name=$withval
1343 fi;
1344
1345 ###     Save the given $CFLAGS to allow user-override.
1346 cf_user_CFLAGS="$CFLAGS"
1347
1348 ###     Default install-location
1349
1350 echo "$as_me:1350: checking for prefix" >&5
1351 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1352 if test "x$prefix" = "xNONE" ; then
1353         case "$cf_cv_system_name" in
1354                 # non-vendor systems don't have a conflict
1355         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1356                 prefix=/usr
1357                 ;;
1358         *)      prefix=$ac_default_prefix
1359                 ;;
1360         esac
1361 fi
1362 echo "$as_me:1362: result: $prefix" >&5
1363 echo "${ECHO_T}$prefix" >&6
1364
1365 if test "x$prefix" = "xNONE" ; then
1366 echo "$as_me:1366: checking for default include-directory" >&5
1367 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1368 test -n "$verbose" && echo 1>&6
1369 for cf_symbol in \
1370         $includedir \
1371         $includedir/ncurses \
1372         $prefix/include \
1373         $prefix/include/ncurses \
1374         /usr/local/include \
1375         /usr/local/include/ncurses \
1376         /usr/include \
1377         /usr/include/ncurses
1378 do
1379         cf_dir=`eval echo $cf_symbol`
1380         if test -f $cf_dir/curses.h ; then
1381         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1382                 includedir="$cf_symbol"
1383                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1384                 break
1385         fi
1386         fi
1387         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1388 done
1389 echo "$as_me:1389: result: $includedir" >&5
1390 echo "${ECHO_T}$includedir" >&6
1391 fi
1392
1393 ###     Checks for programs.
1394 ac_ext=c
1395 ac_cpp='$CPP $CPPFLAGS'
1396 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1397 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1398 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1399 ac_main_return=return
1400 if test -n "$ac_tool_prefix"; then
1401   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1402 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1403 echo "$as_me:1403: checking for $ac_word" >&5
1404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1405 if test "${ac_cv_prog_CC+set}" = set; then
1406   echo $ECHO_N "(cached) $ECHO_C" >&6
1407 else
1408   if test -n "$CC"; then
1409   ac_cv_prog_CC="$CC" # Let the user override the test.
1410 else
1411   ac_save_IFS=$IFS; IFS=$ac_path_separator
1412 ac_dummy="$PATH"
1413 for ac_dir in $ac_dummy; do
1414   IFS=$ac_save_IFS
1415   test -z "$ac_dir" && ac_dir=.
1416   $as_executable_p "$ac_dir/$ac_word" || continue
1417 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1418 echo "$as_me:1418: found $ac_dir/$ac_word" >&5
1419 break
1420 done
1421
1422 fi
1423 fi
1424 CC=$ac_cv_prog_CC
1425 if test -n "$CC"; then
1426   echo "$as_me:1426: result: $CC" >&5
1427 echo "${ECHO_T}$CC" >&6
1428 else
1429   echo "$as_me:1429: result: no" >&5
1430 echo "${ECHO_T}no" >&6
1431 fi
1432
1433 fi
1434 if test -z "$ac_cv_prog_CC"; then
1435   ac_ct_CC=$CC
1436   # Extract the first word of "gcc", so it can be a program name with args.
1437 set dummy gcc; ac_word=$2
1438 echo "$as_me:1438: checking for $ac_word" >&5
1439 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1440 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1441   echo $ECHO_N "(cached) $ECHO_C" >&6
1442 else
1443   if test -n "$ac_ct_CC"; then
1444   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1445 else
1446   ac_save_IFS=$IFS; IFS=$ac_path_separator
1447 ac_dummy="$PATH"
1448 for ac_dir in $ac_dummy; do
1449   IFS=$ac_save_IFS
1450   test -z "$ac_dir" && ac_dir=.
1451   $as_executable_p "$ac_dir/$ac_word" || continue
1452 ac_cv_prog_ac_ct_CC="gcc"
1453 echo "$as_me:1453: found $ac_dir/$ac_word" >&5
1454 break
1455 done
1456
1457 fi
1458 fi
1459 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1460 if test -n "$ac_ct_CC"; then
1461   echo "$as_me:1461: result: $ac_ct_CC" >&5
1462 echo "${ECHO_T}$ac_ct_CC" >&6
1463 else
1464   echo "$as_me:1464: result: no" >&5
1465 echo "${ECHO_T}no" >&6
1466 fi
1467
1468   CC=$ac_ct_CC
1469 else
1470   CC="$ac_cv_prog_CC"
1471 fi
1472
1473 if test -z "$CC"; then
1474   if test -n "$ac_tool_prefix"; then
1475   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1476 set dummy ${ac_tool_prefix}cc; ac_word=$2
1477 echo "$as_me:1477: checking for $ac_word" >&5
1478 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1479 if test "${ac_cv_prog_CC+set}" = set; then
1480   echo $ECHO_N "(cached) $ECHO_C" >&6
1481 else
1482   if test -n "$CC"; then
1483   ac_cv_prog_CC="$CC" # Let the user override the test.
1484 else
1485   ac_save_IFS=$IFS; IFS=$ac_path_separator
1486 ac_dummy="$PATH"
1487 for ac_dir in $ac_dummy; do
1488   IFS=$ac_save_IFS
1489   test -z "$ac_dir" && ac_dir=.
1490   $as_executable_p "$ac_dir/$ac_word" || continue
1491 ac_cv_prog_CC="${ac_tool_prefix}cc"
1492 echo "$as_me:1492: found $ac_dir/$ac_word" >&5
1493 break
1494 done
1495
1496 fi
1497 fi
1498 CC=$ac_cv_prog_CC
1499 if test -n "$CC"; then
1500   echo "$as_me:1500: result: $CC" >&5
1501 echo "${ECHO_T}$CC" >&6
1502 else
1503   echo "$as_me:1503: result: no" >&5
1504 echo "${ECHO_T}no" >&6
1505 fi
1506
1507 fi
1508 if test -z "$ac_cv_prog_CC"; then
1509   ac_ct_CC=$CC
1510   # Extract the first word of "cc", so it can be a program name with args.
1511 set dummy cc; ac_word=$2
1512 echo "$as_me:1512: checking for $ac_word" >&5
1513 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1514 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1515   echo $ECHO_N "(cached) $ECHO_C" >&6
1516 else
1517   if test -n "$ac_ct_CC"; then
1518   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1519 else
1520   ac_save_IFS=$IFS; IFS=$ac_path_separator
1521 ac_dummy="$PATH"
1522 for ac_dir in $ac_dummy; do
1523   IFS=$ac_save_IFS
1524   test -z "$ac_dir" && ac_dir=.
1525   $as_executable_p "$ac_dir/$ac_word" || continue
1526 ac_cv_prog_ac_ct_CC="cc"
1527 echo "$as_me:1527: found $ac_dir/$ac_word" >&5
1528 break
1529 done
1530
1531 fi
1532 fi
1533 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1534 if test -n "$ac_ct_CC"; then
1535   echo "$as_me:1535: result: $ac_ct_CC" >&5
1536 echo "${ECHO_T}$ac_ct_CC" >&6
1537 else
1538   echo "$as_me:1538: result: no" >&5
1539 echo "${ECHO_T}no" >&6
1540 fi
1541
1542   CC=$ac_ct_CC
1543 else
1544   CC="$ac_cv_prog_CC"
1545 fi
1546
1547 fi
1548 if test -z "$CC"; then
1549   # Extract the first word of "cc", so it can be a program name with args.
1550 set dummy cc; ac_word=$2
1551 echo "$as_me:1551: checking for $ac_word" >&5
1552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1553 if test "${ac_cv_prog_CC+set}" = set; then
1554   echo $ECHO_N "(cached) $ECHO_C" >&6
1555 else
1556   if test -n "$CC"; then
1557   ac_cv_prog_CC="$CC" # Let the user override the test.
1558 else
1559   ac_prog_rejected=no
1560   ac_save_IFS=$IFS; IFS=$ac_path_separator
1561 ac_dummy="$PATH"
1562 for ac_dir in $ac_dummy; do
1563   IFS=$ac_save_IFS
1564   test -z "$ac_dir" && ac_dir=.
1565   $as_executable_p "$ac_dir/$ac_word" || continue
1566 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1567   ac_prog_rejected=yes
1568   continue
1569 fi
1570 ac_cv_prog_CC="cc"
1571 echo "$as_me:1571: found $ac_dir/$ac_word" >&5
1572 break
1573 done
1574
1575 if test $ac_prog_rejected = yes; then
1576   # We found a bogon in the path, so make sure we never use it.
1577   set dummy $ac_cv_prog_CC
1578   shift
1579   if test $# != 0; then
1580     # We chose a different compiler from the bogus one.
1581     # However, it has the same basename, so the bogon will be chosen
1582     # first if we set CC to just the basename; use the full file name.
1583     shift
1584     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1585     shift
1586     ac_cv_prog_CC="$@"
1587   fi
1588 fi
1589 fi
1590 fi
1591 CC=$ac_cv_prog_CC
1592 if test -n "$CC"; then
1593   echo "$as_me:1593: result: $CC" >&5
1594 echo "${ECHO_T}$CC" >&6
1595 else
1596   echo "$as_me:1596: result: no" >&5
1597 echo "${ECHO_T}no" >&6
1598 fi
1599
1600 fi
1601 if test -z "$CC"; then
1602   if test -n "$ac_tool_prefix"; then
1603   for ac_prog in cl
1604   do
1605     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1606 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1607 echo "$as_me:1607: checking for $ac_word" >&5
1608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1609 if test "${ac_cv_prog_CC+set}" = set; then
1610   echo $ECHO_N "(cached) $ECHO_C" >&6
1611 else
1612   if test -n "$CC"; then
1613   ac_cv_prog_CC="$CC" # Let the user override the test.
1614 else
1615   ac_save_IFS=$IFS; IFS=$ac_path_separator
1616 ac_dummy="$PATH"
1617 for ac_dir in $ac_dummy; do
1618   IFS=$ac_save_IFS
1619   test -z "$ac_dir" && ac_dir=.
1620   $as_executable_p "$ac_dir/$ac_word" || continue
1621 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1622 echo "$as_me:1622: found $ac_dir/$ac_word" >&5
1623 break
1624 done
1625
1626 fi
1627 fi
1628 CC=$ac_cv_prog_CC
1629 if test -n "$CC"; then
1630   echo "$as_me:1630: result: $CC" >&5
1631 echo "${ECHO_T}$CC" >&6
1632 else
1633   echo "$as_me:1633: result: no" >&5
1634 echo "${ECHO_T}no" >&6
1635 fi
1636
1637     test -n "$CC" && break
1638   done
1639 fi
1640 if test -z "$CC"; then
1641   ac_ct_CC=$CC
1642   for ac_prog in cl
1643 do
1644   # Extract the first word of "$ac_prog", so it can be a program name with args.
1645 set dummy $ac_prog; ac_word=$2
1646 echo "$as_me:1646: checking for $ac_word" >&5
1647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1648 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1649   echo $ECHO_N "(cached) $ECHO_C" >&6
1650 else
1651   if test -n "$ac_ct_CC"; then
1652   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1653 else
1654   ac_save_IFS=$IFS; IFS=$ac_path_separator
1655 ac_dummy="$PATH"
1656 for ac_dir in $ac_dummy; do
1657   IFS=$ac_save_IFS
1658   test -z "$ac_dir" && ac_dir=.
1659   $as_executable_p "$ac_dir/$ac_word" || continue
1660 ac_cv_prog_ac_ct_CC="$ac_prog"
1661 echo "$as_me:1661: found $ac_dir/$ac_word" >&5
1662 break
1663 done
1664
1665 fi
1666 fi
1667 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1668 if test -n "$ac_ct_CC"; then
1669   echo "$as_me:1669: result: $ac_ct_CC" >&5
1670 echo "${ECHO_T}$ac_ct_CC" >&6
1671 else
1672   echo "$as_me:1672: result: no" >&5
1673 echo "${ECHO_T}no" >&6
1674 fi
1675
1676   test -n "$ac_ct_CC" && break
1677 done
1678
1679   CC=$ac_ct_CC
1680 fi
1681
1682 fi
1683
1684 test -z "$CC" && { { echo "$as_me:1684: error: no acceptable cc found in \$PATH" >&5
1685 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1686    { (exit 1); exit 1; }; }
1687
1688 # Provide some information about the compiler.
1689 echo "$as_me:1689:" \
1690      "checking for C compiler version" >&5
1691 ac_compiler=`set X $ac_compile; echo $2`
1692 { (eval echo "$as_me:1692: \"$ac_compiler --version </dev/null >&5\"") >&5
1693   (eval $ac_compiler --version </dev/null >&5) 2>&5
1694   ac_status=$?
1695   echo "$as_me:1695: \$? = $ac_status" >&5
1696   (exit $ac_status); }
1697 { (eval echo "$as_me:1697: \"$ac_compiler -v </dev/null >&5\"") >&5
1698   (eval $ac_compiler -v </dev/null >&5) 2>&5
1699   ac_status=$?
1700   echo "$as_me:1700: \$? = $ac_status" >&5
1701   (exit $ac_status); }
1702 { (eval echo "$as_me:1702: \"$ac_compiler -V </dev/null >&5\"") >&5
1703   (eval $ac_compiler -V </dev/null >&5) 2>&5
1704   ac_status=$?
1705   echo "$as_me:1705: \$? = $ac_status" >&5
1706   (exit $ac_status); }
1707
1708 cat >conftest.$ac_ext <<_ACEOF
1709 #line 1709 "configure"
1710 #include "confdefs.h"
1711
1712 int
1713 main ()
1714 {
1715
1716   ;
1717   return 0;
1718 }
1719 _ACEOF
1720 ac_clean_files_save=$ac_clean_files
1721 ac_clean_files="$ac_clean_files a.out a.exe"
1722 # Try to create an executable without -o first, disregard a.out.
1723 # It will help us diagnose broken compilers, and finding out an intuition
1724 # of exeext.
1725 echo "$as_me:1725: checking for C compiler default output" >&5
1726 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1727 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1728 if { (eval echo "$as_me:1728: \"$ac_link_default\"") >&5
1729   (eval $ac_link_default) 2>&5
1730   ac_status=$?
1731   echo "$as_me:1731: \$? = $ac_status" >&5
1732   (exit $ac_status); }; then
1733   # Find the output, starting from the most likely.  This scheme is
1734 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1735 # resort.
1736 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1737                 ls a.out conftest 2>/dev/null;
1738                 ls a.* conftest.* 2>/dev/null`; do
1739   case $ac_file in
1740     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1741     a.out ) # We found the default executable, but exeext='' is most
1742             # certainly right.
1743             break;;
1744     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1745           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1746           export ac_cv_exeext
1747           break;;
1748     * ) break;;
1749   esac
1750 done
1751 else
1752   echo "$as_me: failed program was:" >&5
1753 cat conftest.$ac_ext >&5
1754 { { echo "$as_me:1754: error: C compiler cannot create executables" >&5
1755 echo "$as_me: error: C compiler cannot create executables" >&2;}
1756    { (exit 77); exit 77; }; }
1757 fi
1758
1759 ac_exeext=$ac_cv_exeext
1760 echo "$as_me:1760: result: $ac_file" >&5
1761 echo "${ECHO_T}$ac_file" >&6
1762
1763 # Check the compiler produces executables we can run.  If not, either
1764 # the compiler is broken, or we cross compile.
1765 echo "$as_me:1765: checking whether the C compiler works" >&5
1766 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1767 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1768 # If not cross compiling, check that we can run a simple program.
1769 if test "$cross_compiling" != yes; then
1770   if { ac_try='./$ac_file'
1771   { (eval echo "$as_me:1771: \"$ac_try\"") >&5
1772   (eval $ac_try) 2>&5
1773   ac_status=$?
1774   echo "$as_me:1774: \$? = $ac_status" >&5
1775   (exit $ac_status); }; }; then
1776     cross_compiling=no
1777   else
1778     if test "$cross_compiling" = maybe; then
1779         cross_compiling=yes
1780     else
1781         { { echo "$as_me:1781: error: cannot run C compiled programs.
1782 If you meant to cross compile, use \`--host'." >&5
1783 echo "$as_me: error: cannot run C compiled programs.
1784 If you meant to cross compile, use \`--host'." >&2;}
1785    { (exit 1); exit 1; }; }
1786     fi
1787   fi
1788 fi
1789 echo "$as_me:1789: result: yes" >&5
1790 echo "${ECHO_T}yes" >&6
1791
1792 rm -f a.out a.exe conftest$ac_cv_exeext
1793 ac_clean_files=$ac_clean_files_save
1794 # Check the compiler produces executables we can run.  If not, either
1795 # the compiler is broken, or we cross compile.
1796 echo "$as_me:1796: checking whether we are cross compiling" >&5
1797 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1798 echo "$as_me:1798: result: $cross_compiling" >&5
1799 echo "${ECHO_T}$cross_compiling" >&6
1800
1801 echo "$as_me:1801: checking for executable suffix" >&5
1802 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1803 if { (eval echo "$as_me:1803: \"$ac_link\"") >&5
1804   (eval $ac_link) 2>&5
1805   ac_status=$?
1806   echo "$as_me:1806: \$? = $ac_status" >&5
1807   (exit $ac_status); }; then
1808   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1809 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1810 # work properly (i.e., refer to `conftest.exe'), while it won't with
1811 # `rm'.
1812 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1813   case $ac_file in
1814     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1815     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1816           export ac_cv_exeext
1817           break;;
1818     * ) break;;
1819   esac
1820 done
1821 else
1822   { { echo "$as_me:1822: error: cannot compute EXEEXT: cannot compile and link" >&5
1823 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1824    { (exit 1); exit 1; }; }
1825 fi
1826
1827 rm -f conftest$ac_cv_exeext
1828 echo "$as_me:1828: result: $ac_cv_exeext" >&5
1829 echo "${ECHO_T}$ac_cv_exeext" >&6
1830
1831 rm -f conftest.$ac_ext
1832 EXEEXT=$ac_cv_exeext
1833 ac_exeext=$EXEEXT
1834 echo "$as_me:1834: checking for object suffix" >&5
1835 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1836 if test "${ac_cv_objext+set}" = set; then
1837   echo $ECHO_N "(cached) $ECHO_C" >&6
1838 else
1839   cat >conftest.$ac_ext <<_ACEOF
1840 #line 1840 "configure"
1841 #include "confdefs.h"
1842
1843 int
1844 main ()
1845 {
1846
1847   ;
1848   return 0;
1849 }
1850 _ACEOF
1851 rm -f conftest.o conftest.obj
1852 if { (eval echo "$as_me:1852: \"$ac_compile\"") >&5
1853   (eval $ac_compile) 2>&5
1854   ac_status=$?
1855   echo "$as_me:1855: \$? = $ac_status" >&5
1856   (exit $ac_status); }; then
1857   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1858   case $ac_file in
1859     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1860     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1861        break;;
1862   esac
1863 done
1864 else
1865   echo "$as_me: failed program was:" >&5
1866 cat conftest.$ac_ext >&5
1867 { { echo "$as_me:1867: error: cannot compute OBJEXT: cannot compile" >&5
1868 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1869    { (exit 1); exit 1; }; }
1870 fi
1871
1872 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1873 fi
1874 echo "$as_me:1874: result: $ac_cv_objext" >&5
1875 echo "${ECHO_T}$ac_cv_objext" >&6
1876 OBJEXT=$ac_cv_objext
1877 ac_objext=$OBJEXT
1878 echo "$as_me:1878: checking whether we are using the GNU C compiler" >&5
1879 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1880 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1881   echo $ECHO_N "(cached) $ECHO_C" >&6
1882 else
1883   cat >conftest.$ac_ext <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1886
1887 int
1888 main ()
1889 {
1890 #ifndef __GNUC__
1891        choke me
1892 #endif
1893
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900   (eval $ac_compile) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); } &&
1904          { ac_try='test -s conftest.$ac_objext'
1905   { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906   (eval $ac_try) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); }; }; then
1910   ac_compiler_gnu=yes
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 ac_compiler_gnu=no
1915 fi
1916 rm -f conftest.$ac_objext conftest.$ac_ext
1917 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1918
1919 fi
1920 echo "$as_me:1920: result: $ac_cv_c_compiler_gnu" >&5
1921 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1922 GCC=`test $ac_compiler_gnu = yes && echo yes`
1923 ac_test_CFLAGS=${CFLAGS+set}
1924 ac_save_CFLAGS=$CFLAGS
1925 CFLAGS="-g"
1926 echo "$as_me:1926: checking whether $CC accepts -g" >&5
1927 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1928 if test "${ac_cv_prog_cc_g+set}" = set; then
1929   echo $ECHO_N "(cached) $ECHO_C" >&6
1930 else
1931   cat >conftest.$ac_ext <<_ACEOF
1932 #line 1932 "configure"
1933 #include "confdefs.h"
1934
1935 int
1936 main ()
1937 {
1938
1939   ;
1940   return 0;
1941 }
1942 _ACEOF
1943 rm -f conftest.$ac_objext
1944 if { (eval echo "$as_me:1944: \"$ac_compile\"") >&5
1945   (eval $ac_compile) 2>&5
1946   ac_status=$?
1947   echo "$as_me:1947: \$? = $ac_status" >&5
1948   (exit $ac_status); } &&
1949          { ac_try='test -s conftest.$ac_objext'
1950   { (eval echo "$as_me:1950: \"$ac_try\"") >&5
1951   (eval $ac_try) 2>&5
1952   ac_status=$?
1953   echo "$as_me:1953: \$? = $ac_status" >&5
1954   (exit $ac_status); }; }; then
1955   ac_cv_prog_cc_g=yes
1956 else
1957   echo "$as_me: failed program was:" >&5
1958 cat conftest.$ac_ext >&5
1959 ac_cv_prog_cc_g=no
1960 fi
1961 rm -f conftest.$ac_objext conftest.$ac_ext
1962 fi
1963 echo "$as_me:1963: result: $ac_cv_prog_cc_g" >&5
1964 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1965 if test "$ac_test_CFLAGS" = set; then
1966   CFLAGS=$ac_save_CFLAGS
1967 elif test $ac_cv_prog_cc_g = yes; then
1968   if test "$GCC" = yes; then
1969     CFLAGS="-g -O2"
1970   else
1971     CFLAGS="-g"
1972   fi
1973 else
1974   if test "$GCC" = yes; then
1975     CFLAGS="-O2"
1976   else
1977     CFLAGS=
1978   fi
1979 fi
1980 # Some people use a C++ compiler to compile C.  Since we use `exit',
1981 # in C++ we need to declare it.  In case someone uses the same compiler
1982 # for both compiling C and C++ we need to have the C++ compiler decide
1983 # the declaration of exit, since it's the most demanding environment.
1984 cat >conftest.$ac_ext <<_ACEOF
1985 #ifndef __cplusplus
1986   choke me
1987 #endif
1988 _ACEOF
1989 rm -f conftest.$ac_objext
1990 if { (eval echo "$as_me:1990: \"$ac_compile\"") >&5
1991   (eval $ac_compile) 2>&5
1992   ac_status=$?
1993   echo "$as_me:1993: \$? = $ac_status" >&5
1994   (exit $ac_status); } &&
1995          { ac_try='test -s conftest.$ac_objext'
1996   { (eval echo "$as_me:1996: \"$ac_try\"") >&5
1997   (eval $ac_try) 2>&5
1998   ac_status=$?
1999   echo "$as_me:1999: \$? = $ac_status" >&5
2000   (exit $ac_status); }; }; then
2001   for ac_declaration in \
2002    ''\
2003    '#include <stdlib.h>' \
2004    'extern "C" void std::exit (int) throw (); using std::exit;' \
2005    'extern "C" void std::exit (int); using std::exit;' \
2006    'extern "C" void exit (int) throw ();' \
2007    'extern "C" void exit (int);' \
2008    'void exit (int);'
2009 do
2010   cat >conftest.$ac_ext <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013 #include <stdlib.h>
2014 $ac_declaration
2015 int
2016 main ()
2017 {
2018 exit (42);
2019   ;
2020   return 0;
2021 }
2022 _ACEOF
2023 rm -f conftest.$ac_objext
2024 if { (eval echo "$as_me:2024: \"$ac_compile\"") >&5
2025   (eval $ac_compile) 2>&5
2026   ac_status=$?
2027   echo "$as_me:2027: \$? = $ac_status" >&5
2028   (exit $ac_status); } &&
2029          { ac_try='test -s conftest.$ac_objext'
2030   { (eval echo "$as_me:2030: \"$ac_try\"") >&5
2031   (eval $ac_try) 2>&5
2032   ac_status=$?
2033   echo "$as_me:2033: \$? = $ac_status" >&5
2034   (exit $ac_status); }; }; then
2035   :
2036 else
2037   echo "$as_me: failed program was:" >&5
2038 cat conftest.$ac_ext >&5
2039 continue
2040 fi
2041 rm -f conftest.$ac_objext conftest.$ac_ext
2042   cat >conftest.$ac_ext <<_ACEOF
2043 #line 2043 "configure"
2044 #include "confdefs.h"
2045 $ac_declaration
2046 int
2047 main ()
2048 {
2049 exit (42);
2050   ;
2051   return 0;
2052 }
2053 _ACEOF
2054 rm -f conftest.$ac_objext
2055 if { (eval echo "$as_me:2055: \"$ac_compile\"") >&5
2056   (eval $ac_compile) 2>&5
2057   ac_status=$?
2058   echo "$as_me:2058: \$? = $ac_status" >&5
2059   (exit $ac_status); } &&
2060          { ac_try='test -s conftest.$ac_objext'
2061   { (eval echo "$as_me:2061: \"$ac_try\"") >&5
2062   (eval $ac_try) 2>&5
2063   ac_status=$?
2064   echo "$as_me:2064: \$? = $ac_status" >&5
2065   (exit $ac_status); }; }; then
2066   break
2067 else
2068   echo "$as_me: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 fi
2071 rm -f conftest.$ac_objext conftest.$ac_ext
2072 done
2073 rm -f conftest*
2074 if test -n "$ac_declaration"; then
2075   echo '#ifdef __cplusplus' >>confdefs.h
2076   echo $ac_declaration      >>confdefs.h
2077   echo '#endif'             >>confdefs.h
2078 fi
2079
2080 else
2081   echo "$as_me: failed program was:" >&5
2082 cat conftest.$ac_ext >&5
2083 fi
2084 rm -f conftest.$ac_objext conftest.$ac_ext
2085 ac_ext=c
2086 ac_cpp='$CPP $CPPFLAGS'
2087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2090 ac_main_return=return
2091
2092 GCC_VERSION=none
2093 if test "$GCC" = yes ; then
2094         echo "$as_me:2094: checking version of $CC" >&5
2095 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2096         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2097         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2098         echo "$as_me:2098: result: $GCC_VERSION" >&5
2099 echo "${ECHO_T}$GCC_VERSION" >&6
2100 fi
2101
2102 ac_ext=c
2103 ac_cpp='$CPP $CPPFLAGS'
2104 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2105 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2107 ac_main_return=return
2108 echo "$as_me:2108: checking how to run the C preprocessor" >&5
2109 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2110 # On Suns, sometimes $CPP names a directory.
2111 if test -n "$CPP" && test -d "$CPP"; then
2112   CPP=
2113 fi
2114 if test -z "$CPP"; then
2115   if test "${ac_cv_prog_CPP+set}" = set; then
2116   echo $ECHO_N "(cached) $ECHO_C" >&6
2117 else
2118       # Double quotes because CPP needs to be expanded
2119     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2120     do
2121       ac_preproc_ok=false
2122 for ac_c_preproc_warn_flag in '' yes
2123 do
2124   # Use a header file that comes with gcc, so configuring glibc
2125   # with a fresh cross-compiler works.
2126   # On the NeXT, cc -E runs the code through the compiler's parser,
2127   # not just through cpp. "Syntax error" is here to catch this case.
2128   cat >conftest.$ac_ext <<_ACEOF
2129 #line 2129 "configure"
2130 #include "confdefs.h"
2131 #include <assert.h>
2132                      Syntax error
2133 _ACEOF
2134 if { (eval echo "$as_me:2134: \"$ac_cpp conftest.$ac_ext\"") >&5
2135   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2136   ac_status=$?
2137   egrep -v '^ *\+' conftest.er1 >conftest.err
2138   rm -f conftest.er1
2139   cat conftest.err >&5
2140   echo "$as_me:2140: \$? = $ac_status" >&5
2141   (exit $ac_status); } >/dev/null; then
2142   if test -s conftest.err; then
2143     ac_cpp_err=$ac_c_preproc_warn_flag
2144   else
2145     ac_cpp_err=
2146   fi
2147 else
2148   ac_cpp_err=yes
2149 fi
2150 if test -z "$ac_cpp_err"; then
2151   :
2152 else
2153   echo "$as_me: failed program was:" >&5
2154   cat conftest.$ac_ext >&5
2155   # Broken: fails on valid input.
2156 continue
2157 fi
2158 rm -f conftest.err conftest.$ac_ext
2159
2160   # OK, works on sane cases.  Now check whether non-existent headers
2161   # can be detected and how.
2162   cat >conftest.$ac_ext <<_ACEOF
2163 #line 2163 "configure"
2164 #include "confdefs.h"
2165 #include <ac_nonexistent.h>
2166 _ACEOF
2167 if { (eval echo "$as_me:2167: \"$ac_cpp conftest.$ac_ext\"") >&5
2168   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2169   ac_status=$?
2170   egrep -v '^ *\+' conftest.er1 >conftest.err
2171   rm -f conftest.er1
2172   cat conftest.err >&5
2173   echo "$as_me:2173: \$? = $ac_status" >&5
2174   (exit $ac_status); } >/dev/null; then
2175   if test -s conftest.err; then
2176     ac_cpp_err=$ac_c_preproc_warn_flag
2177   else
2178     ac_cpp_err=
2179   fi
2180 else
2181   ac_cpp_err=yes
2182 fi
2183 if test -z "$ac_cpp_err"; then
2184   # Broken: success on invalid input.
2185 continue
2186 else
2187   echo "$as_me: failed program was:" >&5
2188   cat conftest.$ac_ext >&5
2189   # Passes both tests.
2190 ac_preproc_ok=:
2191 break
2192 fi
2193 rm -f conftest.err conftest.$ac_ext
2194
2195 done
2196 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2197 rm -f conftest.err conftest.$ac_ext
2198 if $ac_preproc_ok; then
2199   break
2200 fi
2201
2202     done
2203     ac_cv_prog_CPP=$CPP
2204
2205 fi
2206   CPP=$ac_cv_prog_CPP
2207 else
2208   ac_cv_prog_CPP=$CPP
2209 fi
2210 echo "$as_me:2210: result: $CPP" >&5
2211 echo "${ECHO_T}$CPP" >&6
2212 ac_preproc_ok=false
2213 for ac_c_preproc_warn_flag in '' yes
2214 do
2215   # Use a header file that comes with gcc, so configuring glibc
2216   # with a fresh cross-compiler works.
2217   # On the NeXT, cc -E runs the code through the compiler's parser,
2218   # not just through cpp. "Syntax error" is here to catch this case.
2219   cat >conftest.$ac_ext <<_ACEOF
2220 #line 2220 "configure"
2221 #include "confdefs.h"
2222 #include <assert.h>
2223                      Syntax error
2224 _ACEOF
2225 if { (eval echo "$as_me:2225: \"$ac_cpp conftest.$ac_ext\"") >&5
2226   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2227   ac_status=$?
2228   egrep -v '^ *\+' conftest.er1 >conftest.err
2229   rm -f conftest.er1
2230   cat conftest.err >&5
2231   echo "$as_me:2231: \$? = $ac_status" >&5
2232   (exit $ac_status); } >/dev/null; then
2233   if test -s conftest.err; then
2234     ac_cpp_err=$ac_c_preproc_warn_flag
2235   else
2236     ac_cpp_err=
2237   fi
2238 else
2239   ac_cpp_err=yes
2240 fi
2241 if test -z "$ac_cpp_err"; then
2242   :
2243 else
2244   echo "$as_me: failed program was:" >&5
2245   cat conftest.$ac_ext >&5
2246   # Broken: fails on valid input.
2247 continue
2248 fi
2249 rm -f conftest.err conftest.$ac_ext
2250
2251   # OK, works on sane cases.  Now check whether non-existent headers
2252   # can be detected and how.
2253   cat >conftest.$ac_ext <<_ACEOF
2254 #line 2254 "configure"
2255 #include "confdefs.h"
2256 #include <ac_nonexistent.h>
2257 _ACEOF
2258 if { (eval echo "$as_me:2258: \"$ac_cpp conftest.$ac_ext\"") >&5
2259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260   ac_status=$?
2261   egrep -v '^ *\+' conftest.er1 >conftest.err
2262   rm -f conftest.er1
2263   cat conftest.err >&5
2264   echo "$as_me:2264: \$? = $ac_status" >&5
2265   (exit $ac_status); } >/dev/null; then
2266   if test -s conftest.err; then
2267     ac_cpp_err=$ac_c_preproc_warn_flag
2268   else
2269     ac_cpp_err=
2270   fi
2271 else
2272   ac_cpp_err=yes
2273 fi
2274 if test -z "$ac_cpp_err"; then
2275   # Broken: success on invalid input.
2276 continue
2277 else
2278   echo "$as_me: failed program was:" >&5
2279   cat conftest.$ac_ext >&5
2280   # Passes both tests.
2281 ac_preproc_ok=:
2282 break
2283 fi
2284 rm -f conftest.err conftest.$ac_ext
2285
2286 done
2287 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2288 rm -f conftest.err conftest.$ac_ext
2289 if $ac_preproc_ok; then
2290   :
2291 else
2292   { { echo "$as_me:2292: error: C preprocessor \"$CPP\" fails sanity check" >&5
2293 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2294    { (exit 1); exit 1; }; }
2295 fi
2296
2297 ac_ext=c
2298 ac_cpp='$CPP $CPPFLAGS'
2299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2302 ac_main_return=return
2303
2304 if test $ac_cv_c_compiler_gnu = yes; then
2305     echo "$as_me:2305: checking whether $CC needs -traditional" >&5
2306 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2307 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2308   echo $ECHO_N "(cached) $ECHO_C" >&6
2309 else
2310     ac_pattern="Autoconf.*'x'"
2311   cat >conftest.$ac_ext <<_ACEOF
2312 #line 2312 "configure"
2313 #include "confdefs.h"
2314 #include <sgtty.h>
2315 int Autoconf = TIOCGETP;
2316 _ACEOF
2317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2318   egrep "$ac_pattern" >/dev/null 2>&1; then
2319   ac_cv_prog_gcc_traditional=yes
2320 else
2321   ac_cv_prog_gcc_traditional=no
2322 fi
2323 rm -f conftest*
2324
2325   if test $ac_cv_prog_gcc_traditional = no; then
2326     cat >conftest.$ac_ext <<_ACEOF
2327 #line 2327 "configure"
2328 #include "confdefs.h"
2329 #include <termio.h>
2330 int Autoconf = TCGETA;
2331 _ACEOF
2332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2333   egrep "$ac_pattern" >/dev/null 2>&1; then
2334   ac_cv_prog_gcc_traditional=yes
2335 fi
2336 rm -f conftest*
2337
2338   fi
2339 fi
2340 echo "$as_me:2340: result: $ac_cv_prog_gcc_traditional" >&5
2341 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2342   if test $ac_cv_prog_gcc_traditional = yes; then
2343     CC="$CC -traditional"
2344   fi
2345 fi
2346
2347 echo "$as_me:2347: checking whether $CC understands -c and -o together" >&5
2348 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2349 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2350   echo $ECHO_N "(cached) $ECHO_C" >&6
2351 else
2352
2353 cat > conftest.$ac_ext <<CF_EOF
2354 #include <stdio.h>
2355 int main()
2356 {
2357         ${cf_cv_main_return:-return}(0);
2358 }
2359 CF_EOF
2360 # We do the test twice because some compilers refuse to overwrite an
2361 # existing .o file with -o, though they will create one.
2362 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2363 if { (eval echo "$as_me:2363: \"$ac_try\"") >&5
2364   (eval $ac_try) 2>&5
2365   ac_status=$?
2366   echo "$as_me:2366: \$? = $ac_status" >&5
2367   (exit $ac_status); } &&
2368   test -f conftest2.$ac_objext && { (eval echo "$as_me:2368: \"$ac_try\"") >&5
2369   (eval $ac_try) 2>&5
2370   ac_status=$?
2371   echo "$as_me:2371: \$? = $ac_status" >&5
2372   (exit $ac_status); };
2373 then
2374   eval cf_cv_prog_CC_c_o=yes
2375 else
2376   eval cf_cv_prog_CC_c_o=no
2377 fi
2378 rm -f conftest*
2379
2380 fi
2381 if test $cf_cv_prog_CC_c_o = yes; then
2382   echo "$as_me:2382: result: yes" >&5
2383 echo "${ECHO_T}yes" >&6
2384 else
2385   echo "$as_me:2385: result: no" >&5
2386 echo "${ECHO_T}no" >&6
2387 fi
2388
2389 echo "$as_me:2389: checking for POSIXized ISC" >&5
2390 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2391 if test -d /etc/conf/kconfig.d &&
2392    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2393 then
2394   echo "$as_me:2394: result: yes" >&5
2395 echo "${ECHO_T}yes" >&6
2396   ISC=yes # If later tests want to check for ISC.
2397
2398 cat >>confdefs.h <<\EOF
2399 #define _POSIX_SOURCE 1
2400 EOF
2401
2402   if test "$GCC" = yes; then
2403     CC="$CC -posix"
2404   else
2405     CC="$CC -Xp"
2406   fi
2407 else
2408   echo "$as_me:2408: result: no" >&5
2409 echo "${ECHO_T}no" >&6
2410   ISC=
2411 fi
2412
2413 echo "$as_me:2413: checking for ${CC-cc} option to accept ANSI C" >&5
2414 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2415 if test "${cf_cv_ansi_cc+set}" = set; then
2416   echo $ECHO_N "(cached) $ECHO_C" >&6
2417 else
2418
2419 cf_cv_ansi_cc=no
2420 cf_save_CFLAGS="$CFLAGS"
2421 cf_save_CPPFLAGS="$CPPFLAGS"
2422 # Don't try gcc -ansi; that turns off useful extensions and
2423 # breaks some systems' header files.
2424 # AIX                   -qlanglvl=ansi
2425 # Ultrix and OSF/1      -std1
2426 # HP-UX                 -Aa -D_HPUX_SOURCE
2427 # SVR4                  -Xc
2428 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2429 for cf_arg in "-DCC_HAS_PROTOS" \
2430         "" \
2431         -qlanglvl=ansi \
2432         -std1 \
2433         -Ae \
2434         "-Aa -D_HPUX_SOURCE" \
2435         -Xc
2436 do
2437
2438 cf_fix_cppflags=no
2439 cf_new_cflags=
2440 cf_new_cppflags=
2441 cf_new_extra_cppflags=
2442
2443 for cf_add_cflags in $cf_arg
2444 do
2445 case $cf_fix_cppflags in
2446 no)
2447         case $cf_add_cflags in #(vi
2448         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2449                 case $cf_add_cflags in
2450                 -D*)
2451                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2452
2453                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2454                         && test -z "${cf_tst_cflags}" \
2455                         && cf_fix_cppflags=yes
2456
2457                         if test $cf_fix_cppflags = yes ; then
2458                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2459                                 continue
2460                         elif test "${cf_tst_cflags}" = "\"'" ; then
2461                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2462                                 continue
2463                         fi
2464                         ;;
2465                 esac
2466                 case "$CPPFLAGS" in
2467                 *$cf_add_cflags) #(vi
2468                         ;;
2469                 *) #(vi
2470                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2471                         ;;
2472                 esac
2473                 ;;
2474         *)
2475                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2476                 ;;
2477         esac
2478         ;;
2479 yes)
2480         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2481
2482         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2483
2484         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2485         && test -z "${cf_tst_cflags}" \
2486         && cf_fix_cppflags=no
2487         ;;
2488 esac
2489 done
2490
2491 if test -n "$cf_new_cflags" ; then
2492
2493         CFLAGS="$CFLAGS $cf_new_cflags"
2494 fi
2495
2496 if test -n "$cf_new_cppflags" ; then
2497
2498         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2499 fi
2500
2501 if test -n "$cf_new_extra_cppflags" ; then
2502
2503         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2504 fi
2505
2506         cat >conftest.$ac_ext <<_ACEOF
2507 #line 2507 "configure"
2508 #include "confdefs.h"
2509
2510 #ifndef CC_HAS_PROTOS
2511 #if !defined(__STDC__) || (__STDC__ != 1)
2512 choke me
2513 #endif
2514 #endif
2515
2516 int
2517 main ()
2518 {
2519
2520         int test (int i, double x);
2521         struct s1 {int (*f) (int a);};
2522         struct s2 {int (*f) (double a);};
2523   ;
2524   return 0;
2525 }
2526 _ACEOF
2527 rm -f conftest.$ac_objext
2528 if { (eval echo "$as_me:2528: \"$ac_compile\"") >&5
2529   (eval $ac_compile) 2>&5
2530   ac_status=$?
2531   echo "$as_me:2531: \$? = $ac_status" >&5
2532   (exit $ac_status); } &&
2533          { ac_try='test -s conftest.$ac_objext'
2534   { (eval echo "$as_me:2534: \"$ac_try\"") >&5
2535   (eval $ac_try) 2>&5
2536   ac_status=$?
2537   echo "$as_me:2537: \$? = $ac_status" >&5
2538   (exit $ac_status); }; }; then
2539   cf_cv_ansi_cc="$cf_arg"; break
2540 else
2541   echo "$as_me: failed program was:" >&5
2542 cat conftest.$ac_ext >&5
2543 fi
2544 rm -f conftest.$ac_objext conftest.$ac_ext
2545 done
2546 CFLAGS="$cf_save_CFLAGS"
2547 CPPFLAGS="$cf_save_CPPFLAGS"
2548
2549 fi
2550 echo "$as_me:2550: result: $cf_cv_ansi_cc" >&5
2551 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2552
2553 if test "$cf_cv_ansi_cc" != "no"; then
2554 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2555
2556 cf_fix_cppflags=no
2557 cf_new_cflags=
2558 cf_new_cppflags=
2559 cf_new_extra_cppflags=
2560
2561 for cf_add_cflags in $cf_cv_ansi_cc
2562 do
2563 case $cf_fix_cppflags in
2564 no)
2565         case $cf_add_cflags in #(vi
2566         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2567                 case $cf_add_cflags in
2568                 -D*)
2569                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2570
2571                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2572                         && test -z "${cf_tst_cflags}" \
2573                         && cf_fix_cppflags=yes
2574
2575                         if test $cf_fix_cppflags = yes ; then
2576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2577                                 continue
2578                         elif test "${cf_tst_cflags}" = "\"'" ; then
2579                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2580                                 continue
2581                         fi
2582                         ;;
2583                 esac
2584                 case "$CPPFLAGS" in
2585                 *$cf_add_cflags) #(vi
2586                         ;;
2587                 *) #(vi
2588                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2589                         ;;
2590                 esac
2591                 ;;
2592         *)
2593                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2594                 ;;
2595         esac
2596         ;;
2597 yes)
2598         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2599
2600         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2601
2602         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2603         && test -z "${cf_tst_cflags}" \
2604         && cf_fix_cppflags=no
2605         ;;
2606 esac
2607 done
2608
2609 if test -n "$cf_new_cflags" ; then
2610
2611         CFLAGS="$CFLAGS $cf_new_cflags"
2612 fi
2613
2614 if test -n "$cf_new_cppflags" ; then
2615
2616         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2617 fi
2618
2619 if test -n "$cf_new_extra_cppflags" ; then
2620
2621         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2622 fi
2623
2624 else
2625         cat >>confdefs.h <<\EOF
2626 #define CC_HAS_PROTOS 1
2627 EOF
2628
2629 fi
2630 fi
2631
2632 if test "$cf_cv_ansi_cc" = "no"; then
2633         { { echo "$as_me:2633: error: Your compiler does not appear to recognize prototypes.
2634 You have the following choices:
2635         a. adjust your compiler options
2636         b. get an up-to-date compiler
2637         c. use a wrapper such as unproto" >&5
2638 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2639 You have the following choices:
2640         a. adjust your compiler options
2641         b. get an up-to-date compiler
2642         c. use a wrapper such as unproto" >&2;}
2643    { (exit 1); exit 1; }; }
2644 fi
2645
2646 case $cf_cv_system_name in
2647 os2*)
2648     CFLAGS="$CFLAGS -Zmt"
2649     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2650     CXXFLAGS="$CXXFLAGS -Zmt"
2651     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2652     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2653     ac_cv_exeext=.exe
2654     ;;
2655 esac
2656
2657 PROG_EXT="$EXEEXT"
2658
2659 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2660 #define PROG_EXT "$PROG_EXT"
2661 EOF
2662
2663 if test "$cross_compiling" = yes ; then
2664   LDCONFIG=:
2665 else
2666 case "$cf_cv_system_name" in #(vi
2667 freebsd*) #(vi
2668   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2669   ;;
2670 *) LDPATH=$PATH:/sbin:/usr/sbin
2671   # Extract the first word of "ldconfig", so it can be a program name with args.
2672 set dummy ldconfig; ac_word=$2
2673 echo "$as_me:2673: checking for $ac_word" >&5
2674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2675 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2676   echo $ECHO_N "(cached) $ECHO_C" >&6
2677 else
2678   case $LDCONFIG in
2679   [\\/]* | ?:[\\/]*)
2680   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2681   ;;
2682   *)
2683   ac_save_IFS=$IFS; IFS=$ac_path_separator
2684 ac_dummy="$LDPATH"
2685 for ac_dir in $ac_dummy; do
2686   IFS=$ac_save_IFS
2687   test -z "$ac_dir" && ac_dir=.
2688   if $as_executable_p "$ac_dir/$ac_word"; then
2689    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2690    echo "$as_me:2690: found $ac_dir/$ac_word" >&5
2691    break
2692 fi
2693 done
2694
2695   ;;
2696 esac
2697 fi
2698 LDCONFIG=$ac_cv_path_LDCONFIG
2699
2700 if test -n "$LDCONFIG"; then
2701   echo "$as_me:2701: result: $LDCONFIG" >&5
2702 echo "${ECHO_T}$LDCONFIG" >&6
2703 else
2704   echo "$as_me:2704: result: no" >&5
2705 echo "${ECHO_T}no" >&6
2706 fi
2707
2708   ;;
2709 esac
2710 fi
2711
2712 echo "$as_me:2712: checking if you want to ensure bool is consistent with C++" >&5
2713 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2714
2715 # Check whether --with-cxx or --without-cxx was given.
2716 if test "${with_cxx+set}" = set; then
2717   withval="$with_cxx"
2718   cf_with_cxx=$withval
2719 else
2720   cf_with_cxx=yes
2721 fi;
2722 echo "$as_me:2722: result: $cf_with_cxx" >&5
2723 echo "${ECHO_T}$cf_with_cxx" >&6
2724 if test "X$cf_with_cxx" = Xno ; then
2725         CXX=""
2726         GXX=""
2727 else
2728         # with autoconf 2.13, we can change the error to a warning:
2729                 ac_ext=cc
2730 ac_cpp='$CXXCPP $CPPFLAGS'
2731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2734 ac_main_return=return
2735 if test -n "$ac_tool_prefix"; then
2736   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2737   do
2738     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2739 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2740 echo "$as_me:2740: checking for $ac_word" >&5
2741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2742 if test "${ac_cv_prog_CXX+set}" = set; then
2743   echo $ECHO_N "(cached) $ECHO_C" >&6
2744 else
2745   if test -n "$CXX"; then
2746   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2747 else
2748   ac_save_IFS=$IFS; IFS=$ac_path_separator
2749 ac_dummy="$PATH"
2750 for ac_dir in $ac_dummy; do
2751   IFS=$ac_save_IFS
2752   test -z "$ac_dir" && ac_dir=.
2753   $as_executable_p "$ac_dir/$ac_word" || continue
2754 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2755 echo "$as_me:2755: found $ac_dir/$ac_word" >&5
2756 break
2757 done
2758
2759 fi
2760 fi
2761 CXX=$ac_cv_prog_CXX
2762 if test -n "$CXX"; then
2763   echo "$as_me:2763: result: $CXX" >&5
2764 echo "${ECHO_T}$CXX" >&6
2765 else
2766   echo "$as_me:2766: result: no" >&5
2767 echo "${ECHO_T}no" >&6
2768 fi
2769
2770     test -n "$CXX" && break
2771   done
2772 fi
2773 if test -z "$CXX"; then
2774   ac_ct_CXX=$CXX
2775   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2776 do
2777   # Extract the first word of "$ac_prog", so it can be a program name with args.
2778 set dummy $ac_prog; ac_word=$2
2779 echo "$as_me:2779: checking for $ac_word" >&5
2780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2781 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2782   echo $ECHO_N "(cached) $ECHO_C" >&6
2783 else
2784   if test -n "$ac_ct_CXX"; then
2785   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2786 else
2787   ac_save_IFS=$IFS; IFS=$ac_path_separator
2788 ac_dummy="$PATH"
2789 for ac_dir in $ac_dummy; do
2790   IFS=$ac_save_IFS
2791   test -z "$ac_dir" && ac_dir=.
2792   $as_executable_p "$ac_dir/$ac_word" || continue
2793 ac_cv_prog_ac_ct_CXX="$ac_prog"
2794 echo "$as_me:2794: found $ac_dir/$ac_word" >&5
2795 break
2796 done
2797
2798 fi
2799 fi
2800 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2801 if test -n "$ac_ct_CXX"; then
2802   echo "$as_me:2802: result: $ac_ct_CXX" >&5
2803 echo "${ECHO_T}$ac_ct_CXX" >&6
2804 else
2805   echo "$as_me:2805: result: no" >&5
2806 echo "${ECHO_T}no" >&6
2807 fi
2808
2809   test -n "$ac_ct_CXX" && break
2810 done
2811 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2812
2813   CXX=$ac_ct_CXX
2814 fi
2815
2816 # Provide some information about the compiler.
2817 echo "$as_me:2817:" \
2818      "checking for C++ compiler version" >&5
2819 ac_compiler=`set X $ac_compile; echo $2`
2820 { (eval echo "$as_me:2820: \"$ac_compiler --version </dev/null >&5\"") >&5
2821   (eval $ac_compiler --version </dev/null >&5) 2>&5
2822   ac_status=$?
2823   echo "$as_me:2823: \$? = $ac_status" >&5
2824   (exit $ac_status); }
2825 { (eval echo "$as_me:2825: \"$ac_compiler -v </dev/null >&5\"") >&5
2826   (eval $ac_compiler -v </dev/null >&5) 2>&5
2827   ac_status=$?
2828   echo "$as_me:2828: \$? = $ac_status" >&5
2829   (exit $ac_status); }
2830 { (eval echo "$as_me:2830: \"$ac_compiler -V </dev/null >&5\"") >&5
2831   (eval $ac_compiler -V </dev/null >&5) 2>&5
2832   ac_status=$?
2833   echo "$as_me:2833: \$? = $ac_status" >&5
2834   (exit $ac_status); }
2835
2836 echo "$as_me:2836: checking whether we are using the GNU C++ compiler" >&5
2837 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2838 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2839   echo $ECHO_N "(cached) $ECHO_C" >&6
2840 else
2841   cat >conftest.$ac_ext <<_ACEOF
2842 #line 2842 "configure"
2843 #include "confdefs.h"
2844
2845 int
2846 main ()
2847 {
2848 #ifndef __GNUC__
2849        choke me
2850 #endif
2851
2852   ;
2853   return 0;
2854 }
2855 _ACEOF
2856 rm -f conftest.$ac_objext
2857 if { (eval echo "$as_me:2857: \"$ac_compile\"") >&5
2858   (eval $ac_compile) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); } &&
2862          { ac_try='test -s conftest.$ac_objext'
2863   { (eval echo "$as_me:2863: \"$ac_try\"") >&5
2864   (eval $ac_try) 2>&5
2865   ac_status=$?
2866   echo "$as_me:2866: \$? = $ac_status" >&5
2867   (exit $ac_status); }; }; then
2868   ac_compiler_gnu=yes
2869 else
2870   echo "$as_me: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872 ac_compiler_gnu=no
2873 fi
2874 rm -f conftest.$ac_objext conftest.$ac_ext
2875 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2876
2877 fi
2878 echo "$as_me:2878: result: $ac_cv_cxx_compiler_gnu" >&5
2879 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2880 GXX=`test $ac_compiler_gnu = yes && echo yes`
2881 ac_test_CXXFLAGS=${CXXFLAGS+set}
2882 ac_save_CXXFLAGS=$CXXFLAGS
2883 CXXFLAGS="-g"
2884 echo "$as_me:2884: checking whether $CXX accepts -g" >&5
2885 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2886 if test "${ac_cv_prog_cxx_g+set}" = set; then
2887   echo $ECHO_N "(cached) $ECHO_C" >&6
2888 else
2889   cat >conftest.$ac_ext <<_ACEOF
2890 #line 2890 "configure"
2891 #include "confdefs.h"
2892
2893 int
2894 main ()
2895 {
2896
2897   ;
2898   return 0;
2899 }
2900 _ACEOF
2901 rm -f conftest.$ac_objext
2902 if { (eval echo "$as_me:2902: \"$ac_compile\"") >&5
2903   (eval $ac_compile) 2>&5
2904   ac_status=$?
2905   echo "$as_me:2905: \$? = $ac_status" >&5
2906   (exit $ac_status); } &&
2907          { ac_try='test -s conftest.$ac_objext'
2908   { (eval echo "$as_me:2908: \"$ac_try\"") >&5
2909   (eval $ac_try) 2>&5
2910   ac_status=$?
2911   echo "$as_me:2911: \$? = $ac_status" >&5
2912   (exit $ac_status); }; }; then
2913   ac_cv_prog_cxx_g=yes
2914 else
2915   echo "$as_me: failed program was:" >&5
2916 cat conftest.$ac_ext >&5
2917 ac_cv_prog_cxx_g=no
2918 fi
2919 rm -f conftest.$ac_objext conftest.$ac_ext
2920 fi
2921 echo "$as_me:2921: result: $ac_cv_prog_cxx_g" >&5
2922 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2923 if test "$ac_test_CXXFLAGS" = set; then
2924   CXXFLAGS=$ac_save_CXXFLAGS
2925 elif test $ac_cv_prog_cxx_g = yes; then
2926   if test "$GXX" = yes; then
2927     CXXFLAGS="-g -O2"
2928   else
2929     CXXFLAGS="-g"
2930   fi
2931 else
2932   if test "$GXX" = yes; then
2933     CXXFLAGS="-O2"
2934   else
2935     CXXFLAGS=
2936   fi
2937 fi
2938 for ac_declaration in \
2939    ''\
2940    '#include <stdlib.h>' \
2941    'extern "C" void std::exit (int) throw (); using std::exit;' \
2942    'extern "C" void std::exit (int); using std::exit;' \
2943    'extern "C" void exit (int) throw ();' \
2944    'extern "C" void exit (int);' \
2945    'void exit (int);'
2946 do
2947   cat >conftest.$ac_ext <<_ACEOF
2948 #line 2948 "configure"
2949 #include "confdefs.h"
2950 #include <stdlib.h>
2951 $ac_declaration
2952 int
2953 main ()
2954 {
2955 exit (42);
2956   ;
2957   return 0;
2958 }
2959 _ACEOF
2960 rm -f conftest.$ac_objext
2961 if { (eval echo "$as_me:2961: \"$ac_compile\"") >&5
2962   (eval $ac_compile) 2>&5
2963   ac_status=$?
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit $ac_status); } &&
2966          { ac_try='test -s conftest.$ac_objext'
2967   { (eval echo "$as_me:2967: \"$ac_try\"") >&5
2968   (eval $ac_try) 2>&5
2969   ac_status=$?
2970   echo "$as_me:2970: \$? = $ac_status" >&5
2971   (exit $ac_status); }; }; then
2972   :
2973 else
2974   echo "$as_me: failed program was:" >&5
2975 cat conftest.$ac_ext >&5
2976 continue
2977 fi
2978 rm -f conftest.$ac_objext conftest.$ac_ext
2979   cat >conftest.$ac_ext <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982 $ac_declaration
2983 int
2984 main ()
2985 {
2986 exit (42);
2987   ;
2988   return 0;
2989 }
2990 _ACEOF
2991 rm -f conftest.$ac_objext
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993   (eval $ac_compile) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); } &&
2997          { ac_try='test -s conftest.$ac_objext'
2998   { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999   (eval $ac_try) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003   break
3004 else
3005   echo "$as_me: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 fi
3008 rm -f conftest.$ac_objext conftest.$ac_ext
3009 done
3010 rm -f conftest*
3011 if test -n "$ac_declaration"; then
3012   echo '#ifdef __cplusplus' >>confdefs.h
3013   echo $ac_declaration      >>confdefs.h
3014   echo '#endif'             >>confdefs.h
3015 fi
3016
3017 ac_ext=c
3018 ac_cpp='$CPP $CPPFLAGS'
3019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3022 ac_main_return=return
3023
3024                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3025         if test "$CXX" = "g++" ; then
3026                 # Extract the first word of "g++", so it can be a program name with args.
3027 set dummy g++; ac_word=$2
3028 echo "$as_me:3028: checking for $ac_word" >&5
3029 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3030 if test "${ac_cv_path_CXX+set}" = set; then
3031   echo $ECHO_N "(cached) $ECHO_C" >&6
3032 else
3033   case $CXX in
3034   [\\/]* | ?:[\\/]*)
3035   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3036   ;;
3037   *)
3038   ac_save_IFS=$IFS; IFS=$ac_path_separator
3039 ac_dummy="$PATH"
3040 for ac_dir in $ac_dummy; do
3041   IFS=$ac_save_IFS
3042   test -z "$ac_dir" && ac_dir=.
3043   if $as_executable_p "$ac_dir/$ac_word"; then
3044    ac_cv_path_CXX="$ac_dir/$ac_word"
3045    echo "$as_me:3045: found $ac_dir/$ac_word" >&5
3046    break
3047 fi
3048 done
3049
3050   ;;
3051 esac
3052 fi
3053 CXX=$ac_cv_path_CXX
3054
3055 if test -n "$CXX"; then
3056   echo "$as_me:3056: result: $CXX" >&5
3057 echo "${ECHO_T}$CXX" >&6
3058 else
3059   echo "$as_me:3059: result: no" >&5
3060 echo "${ECHO_T}no" >&6
3061 fi
3062
3063         fi
3064         if test "$CXX" = "g++" ; then
3065                 { echo "$as_me:3065: WARNING: ignoring hardcoded g++" >&5
3066 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3067                 cf_with_cxx=no; CXX=""; GXX="";
3068         fi
3069 fi
3070
3071 GXX_VERSION=none
3072 if test "$GXX" = yes; then
3073         echo "$as_me:3073: checking version of g++" >&5
3074 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3075         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3076         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3077         echo "$as_me:3077: result: $GXX_VERSION" >&5
3078 echo "${ECHO_T}$GXX_VERSION" >&6
3079 fi
3080
3081 case $GXX_VERSION in
3082 1*|2.[0-6]*)
3083         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3084         # cf_cxx_library=no
3085         { echo "$as_me:3085: WARNING: templates do not work" >&5
3086 echo "$as_me: WARNING: templates do not work" >&2;}
3087         ;;
3088 esac
3089
3090 echo "$as_me:3090: checking if you want to build C++ binding and demo" >&5
3091 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3092
3093 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3094 if test "${with_cxx_binding+set}" = set; then
3095   withval="$with_cxx_binding"
3096   cf_with_cxx_binding=$withval
3097 else
3098   cf_with_cxx_binding=$cf_with_cxx
3099 fi;
3100 echo "$as_me:3100: result: $cf_with_cxx_binding" >&5
3101 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3102
3103 echo "$as_me:3103: checking if you want to build with Ada95" >&5
3104 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3105
3106 # Check whether --with-ada or --without-ada was given.
3107 if test "${with_ada+set}" = set; then
3108   withval="$with_ada"
3109   cf_with_ada=$withval
3110 else
3111   cf_with_ada=yes
3112 fi;
3113 echo "$as_me:3113: result: $cf_with_ada" >&5
3114 echo "${ECHO_T}$cf_with_ada" >&6
3115
3116 echo "$as_me:3116: checking if you want to install manpages" >&5
3117 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3118
3119 # Check whether --with-manpages or --without-manpages was given.
3120 if test "${with_manpages+set}" = set; then
3121   withval="$with_manpages"
3122   cf_with_manpages=$withval
3123 else
3124   cf_with_manpages=yes
3125 fi;
3126 echo "$as_me:3126: result: $cf_with_manpages" >&5
3127 echo "${ECHO_T}$cf_with_manpages" >&6
3128
3129 echo "$as_me:3129: checking if you want to build programs such as tic" >&5
3130 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3131
3132 # Check whether --with-progs or --without-progs was given.
3133 if test "${with_progs+set}" = set; then
3134   withval="$with_progs"
3135   cf_with_progs=$withval
3136 else
3137   cf_with_progs=yes
3138 fi;
3139 echo "$as_me:3139: result: $cf_with_progs" >&5
3140 echo "${ECHO_T}$cf_with_progs" >&6
3141
3142 echo "$as_me:3142: checking if you wish to install curses.h" >&5
3143 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3144
3145 # Check whether --with-curses-h or --without-curses-h was given.
3146 if test "${with_curses_h+set}" = set; then
3147   withval="$with_curses_h"
3148   with_curses_h=$withval
3149 else
3150   with_curses_h=yes
3151 fi;
3152 echo "$as_me:3152: result: $with_curses_h" >&5
3153 echo "${ECHO_T}$with_curses_h" >&6
3154
3155 modules_to_build="ncurses"
3156 if test "X$cf_with_progs" != Xno ; then
3157 modules_to_build="$modules_to_build progs tack"
3158 fi
3159 modules_to_build="$modules_to_build panel menu form"
3160
3161 test "$program_prefix" != NONE &&
3162   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3163 # Use a double $ so make ignores it.
3164 test "$program_suffix" != NONE &&
3165   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3166 # Double any \ or $.  echo might interpret backslashes.
3167 # By default was `s,x,x', remove it if useless.
3168 cat <<\_ACEOF >conftest.sed
3169 s/[\\$]/&&/g;s/;s,x,x,$//
3170 _ACEOF
3171 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3172 rm conftest.sed
3173
3174 for ac_prog in mawk gawk nawk awk
3175 do
3176   # Extract the first word of "$ac_prog", so it can be a program name with args.
3177 set dummy $ac_prog; ac_word=$2
3178 echo "$as_me:3178: checking for $ac_word" >&5
3179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3180 if test "${ac_cv_prog_AWK+set}" = set; then
3181   echo $ECHO_N "(cached) $ECHO_C" >&6
3182 else
3183   if test -n "$AWK"; then
3184   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3185 else
3186   ac_save_IFS=$IFS; IFS=$ac_path_separator
3187 ac_dummy="$PATH"
3188 for ac_dir in $ac_dummy; do
3189   IFS=$ac_save_IFS
3190   test -z "$ac_dir" && ac_dir=.
3191   $as_executable_p "$ac_dir/$ac_word" || continue
3192 ac_cv_prog_AWK="$ac_prog"
3193 echo "$as_me:3193: found $ac_dir/$ac_word" >&5
3194 break
3195 done
3196
3197 fi
3198 fi
3199 AWK=$ac_cv_prog_AWK
3200 if test -n "$AWK"; then
3201   echo "$as_me:3201: result: $AWK" >&5
3202 echo "${ECHO_T}$AWK" >&6
3203 else
3204   echo "$as_me:3204: result: no" >&5
3205 echo "${ECHO_T}no" >&6
3206 fi
3207
3208   test -n "$AWK" && break
3209 done
3210
3211 test -z "$AWK" && { { echo "$as_me:3211: error: No awk program found" >&5
3212 echo "$as_me: error: No awk program found" >&2;}
3213    { (exit 1); exit 1; }; }
3214
3215 echo "$as_me:3215: checking for egrep" >&5
3216 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3217 if test "${ac_cv_prog_egrep+set}" = set; then
3218   echo $ECHO_N "(cached) $ECHO_C" >&6
3219 else
3220   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3221     then ac_cv_prog_egrep='grep -E'
3222     else ac_cv_prog_egrep='egrep'
3223     fi
3224 fi
3225 echo "$as_me:3225: result: $ac_cv_prog_egrep" >&5
3226 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3227  EGREP=$ac_cv_prog_egrep
3228
3229 test -z "$EGREP" && { { echo "$as_me:3229: error: No egrep program found" >&5
3230 echo "$as_me: error: No egrep program found" >&2;}
3231    { (exit 1); exit 1; }; }
3232
3233 # Find a good install program.  We prefer a C program (faster),
3234 # so one script is as good as another.  But avoid the broken or
3235 # incompatible versions:
3236 # SysV /etc/install, /usr/sbin/install
3237 # SunOS /usr/etc/install
3238 # IRIX /sbin/install
3239 # AIX /bin/install
3240 # AmigaOS /C/install, which installs bootblocks on floppy discs
3241 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3242 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3243 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3244 # ./install, which can be erroneously created by make from ./install.sh.
3245 echo "$as_me:3245: checking for a BSD compatible install" >&5
3246 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3247 if test -z "$INSTALL"; then
3248 if test "${ac_cv_path_install+set}" = set; then
3249   echo $ECHO_N "(cached) $ECHO_C" >&6
3250 else
3251     ac_save_IFS=$IFS; IFS=$ac_path_separator
3252   for ac_dir in $PATH; do
3253     IFS=$ac_save_IFS
3254     # Account for people who put trailing slashes in PATH elements.
3255     case $ac_dir/ in
3256     / | ./ | .// | /cC/* \
3257     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3258     | /usr/ucb/* ) ;;
3259     *)
3260       # OSF1 and SCO ODT 3.0 have their own names for install.
3261       # Don't use installbsd from OSF since it installs stuff as root
3262       # by default.
3263       for ac_prog in ginstall scoinst install; do
3264         if $as_executable_p "$ac_dir/$ac_prog"; then
3265           if test $ac_prog = install &&
3266             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3267             # AIX install.  It has an incompatible calling convention.
3268             :
3269           elif test $ac_prog = install &&
3270             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3271             # program-specific install script used by HP pwplus--don't use.
3272             :
3273           else
3274             ac_cv_path_install="$ac_dir/$ac_prog -c"
3275             break 2
3276           fi
3277         fi
3278       done
3279       ;;
3280     esac
3281   done
3282
3283 fi
3284   if test "${ac_cv_path_install+set}" = set; then
3285     INSTALL=$ac_cv_path_install
3286   else
3287     # As a last resort, use the slow shell script.  We don't cache a
3288     # path for INSTALL within a source directory, because that will
3289     # break other packages using the cache if that directory is
3290     # removed, or if the path is relative.
3291     INSTALL=$ac_install_sh
3292   fi
3293 fi
3294 echo "$as_me:3294: result: $INSTALL" >&5
3295 echo "${ECHO_T}$INSTALL" >&6
3296
3297 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3298 # It thinks the first close brace ends the variable substitution.
3299 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3300
3301 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3302
3303 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3304
3305 case $INSTALL in
3306 /*)
3307   ;;
3308 *)
3309   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3310   test -z "$cf_dir" && cf_dir=.
3311   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3312   ;;
3313 esac
3314
3315 for ac_prog in tdlint lint alint
3316 do
3317   # Extract the first word of "$ac_prog", so it can be a program name with args.
3318 set dummy $ac_prog; ac_word=$2
3319 echo "$as_me:3319: checking for $ac_word" >&5
3320 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3321 if test "${ac_cv_prog_LINT+set}" = set; then
3322   echo $ECHO_N "(cached) $ECHO_C" >&6
3323 else
3324   if test -n "$LINT"; then
3325   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3326 else
3327   ac_save_IFS=$IFS; IFS=$ac_path_separator
3328 ac_dummy="$PATH"
3329 for ac_dir in $ac_dummy; do
3330   IFS=$ac_save_IFS
3331   test -z "$ac_dir" && ac_dir=.
3332   $as_executable_p "$ac_dir/$ac_word" || continue
3333 ac_cv_prog_LINT="$ac_prog"
3334 echo "$as_me:3334: found $ac_dir/$ac_word" >&5
3335 break
3336 done
3337
3338 fi
3339 fi
3340 LINT=$ac_cv_prog_LINT
3341 if test -n "$LINT"; then
3342   echo "$as_me:3342: result: $LINT" >&5
3343 echo "${ECHO_T}$LINT" >&6
3344 else
3345   echo "$as_me:3345: result: no" >&5
3346 echo "${ECHO_T}no" >&6
3347 fi
3348
3349   test -n "$LINT" && break
3350 done
3351
3352 echo "$as_me:3352: checking whether ln -s works" >&5
3353 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3354 LN_S=$as_ln_s
3355 if test "$LN_S" = "ln -s"; then
3356   echo "$as_me:3356: result: yes" >&5
3357 echo "${ECHO_T}yes" >&6
3358 else
3359   echo "$as_me:3359: result: no, using $LN_S" >&5
3360 echo "${ECHO_T}no, using $LN_S" >&6
3361 fi
3362
3363 echo "$as_me:3363: checking for long file names" >&5
3364 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3365 if test "${ac_cv_sys_long_file_names+set}" = set; then
3366   echo $ECHO_N "(cached) $ECHO_C" >&6
3367 else
3368   ac_cv_sys_long_file_names=yes
3369 # Test for long file names in all the places we know might matter:
3370 #      .                the current directory, where building will happen
3371 #      $prefix/lib      where we will be installing things
3372 #      $exec_prefix/lib likewise
3373 # eval it to expand exec_prefix.
3374 #      $TMPDIR          if set, where it might want to write temporary files
3375 # if $TMPDIR is not set:
3376 #      /tmp             where it might want to write temporary files
3377 #      /var/tmp         likewise
3378 #      /usr/tmp         likewise
3379 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3380   ac_tmpdirs=$TMPDIR
3381 else
3382   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3383 fi
3384 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3385   test -d $ac_dir || continue
3386   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3387   ac_xdir=$ac_dir/cf$$
3388   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3389   ac_tf1=$ac_xdir/conftest9012345
3390   ac_tf2=$ac_xdir/conftest9012346
3391   (echo 1 >$ac_tf1) 2>/dev/null
3392   (echo 2 >$ac_tf2) 2>/dev/null
3393   ac_val=`cat $ac_tf1 2>/dev/null`
3394   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3395     ac_cv_sys_long_file_names=no
3396     rm -rf $ac_xdir 2>/dev/null
3397     break
3398   fi
3399   rm -rf $ac_xdir 2>/dev/null
3400 done
3401 fi
3402 echo "$as_me:3402: result: $ac_cv_sys_long_file_names" >&5
3403 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3404 if test $ac_cv_sys_long_file_names = yes; then
3405
3406 cat >>confdefs.h <<\EOF
3407 #define HAVE_LONG_FILE_NAMES 1
3408 EOF
3409
3410 fi
3411
3412 echo "$as_me:3412: checking if we should assume mixed-case filenames" >&5
3413 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3414
3415 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3416 if test "${enable_mixed_case+set}" = set; then
3417   enableval="$enable_mixed_case"
3418   enable_mixedcase=$enableval
3419 else
3420   enable_mixedcase=auto
3421 fi;
3422 echo "$as_me:3422: result: $enable_mixedcase" >&5
3423 echo "${ECHO_T}$enable_mixedcase" >&6
3424 if test "$enable_mixedcase" = "auto" ; then
3425
3426 echo "$as_me:3426: checking if filesystem supports mixed-case filenames" >&5
3427 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3428 if test "${cf_cv_mixedcase+set}" = set; then
3429   echo $ECHO_N "(cached) $ECHO_C" >&6
3430 else
3431
3432 if test "$cross_compiling" = yes ; then
3433         case $target_alias in #(vi
3434         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3435                 cf_cv_mixedcase=no
3436                 ;;
3437         *)
3438                 cf_cv_mixedcase=yes
3439                 ;;
3440         esac
3441 else
3442         rm -f conftest CONFTEST
3443         echo test >conftest
3444         if test -f CONFTEST ; then
3445                 cf_cv_mixedcase=no
3446         else
3447                 cf_cv_mixedcase=yes
3448         fi
3449         rm -f conftest CONFTEST
3450 fi
3451
3452 fi
3453 echo "$as_me:3453: result: $cf_cv_mixedcase" >&5
3454 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3455 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3456 #define MIXEDCASE_FILENAMES 1
3457 EOF
3458
3459 else
3460     cf_cv_mixedcase=$enable_mixedcase
3461     if test "$enable_mixedcase" = "yes" ; then
3462         cat >>confdefs.h <<\EOF
3463 #define MIXEDCASE_FILENAMES 1
3464 EOF
3465
3466     fi
3467 fi
3468
3469 # do this after mixed-case option (tags/TAGS is not as important as tic).
3470 echo "$as_me:3470: checking whether ${MAKE-make} sets \${MAKE}" >&5
3471 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3472 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3473 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3474   echo $ECHO_N "(cached) $ECHO_C" >&6
3475 else
3476   cat >conftest.make <<\EOF
3477 all:
3478         @echo 'ac_maketemp="${MAKE}"'
3479 EOF
3480 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3481 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3482 if test -n "$ac_maketemp"; then
3483   eval ac_cv_prog_make_${ac_make}_set=yes
3484 else
3485   eval ac_cv_prog_make_${ac_make}_set=no
3486 fi
3487 rm -f conftest.make
3488 fi
3489 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3490   echo "$as_me:3490: result: yes" >&5
3491 echo "${ECHO_T}yes" >&6
3492   SET_MAKE=
3493 else
3494   echo "$as_me:3494: result: no" >&5
3495 echo "${ECHO_T}no" >&6
3496   SET_MAKE="MAKE=${MAKE-make}"
3497 fi
3498
3499 # Extract the first word of "ctags", so it can be a program name with args.
3500 set dummy ctags; ac_word=$2
3501 echo "$as_me:3501: checking for $ac_word" >&5
3502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3503 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3504   echo $ECHO_N "(cached) $ECHO_C" >&6
3505 else
3506   if test -n "$MAKE_LOWER_TAGS"; then
3507   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3508 else
3509   ac_save_IFS=$IFS; IFS=$ac_path_separator
3510 ac_dummy="$PATH"
3511 for ac_dir in $ac_dummy; do
3512   IFS=$ac_save_IFS
3513   test -z "$ac_dir" && ac_dir=.
3514   $as_executable_p "$ac_dir/$ac_word" || continue
3515 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3516 echo "$as_me:3516: found $ac_dir/$ac_word" >&5
3517 break
3518 done
3519
3520   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3521 fi
3522 fi
3523 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3524 if test -n "$MAKE_LOWER_TAGS"; then
3525   echo "$as_me:3525: result: $MAKE_LOWER_TAGS" >&5
3526 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3527 else
3528   echo "$as_me:3528: result: no" >&5
3529 echo "${ECHO_T}no" >&6
3530 fi
3531
3532 if test "$cf_cv_mixedcase" = yes ; then
3533         # Extract the first word of "etags", so it can be a program name with args.
3534 set dummy etags; ac_word=$2
3535 echo "$as_me:3535: checking for $ac_word" >&5
3536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3537 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3538   echo $ECHO_N "(cached) $ECHO_C" >&6
3539 else
3540   if test -n "$MAKE_UPPER_TAGS"; then
3541   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3542 else
3543   ac_save_IFS=$IFS; IFS=$ac_path_separator
3544 ac_dummy="$PATH"
3545 for ac_dir in $ac_dummy; do
3546   IFS=$ac_save_IFS
3547   test -z "$ac_dir" && ac_dir=.
3548   $as_executable_p "$ac_dir/$ac_word" || continue
3549 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3550 echo "$as_me:3550: found $ac_dir/$ac_word" >&5
3551 break
3552 done
3553
3554   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3555 fi
3556 fi
3557 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3558 if test -n "$MAKE_UPPER_TAGS"; then
3559   echo "$as_me:3559: result: $MAKE_UPPER_TAGS" >&5
3560 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3561 else
3562   echo "$as_me:3562: result: no" >&5
3563 echo "${ECHO_T}no" >&6
3564 fi
3565
3566 else
3567         MAKE_UPPER_TAGS=no
3568 fi
3569
3570 if test "$MAKE_UPPER_TAGS" = yes ; then
3571         MAKE_UPPER_TAGS=
3572 else
3573         MAKE_UPPER_TAGS="#"
3574 fi
3575
3576 if test "$MAKE_LOWER_TAGS" = yes ; then
3577         MAKE_LOWER_TAGS=
3578 else
3579         MAKE_LOWER_TAGS="#"
3580 fi
3581
3582 echo "$as_me:3582: checking for makeflags variable" >&5
3583 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3584 if test "${cf_cv_makeflags+set}" = set; then
3585   echo $ECHO_N "(cached) $ECHO_C" >&6
3586 else
3587
3588         cf_cv_makeflags=''
3589         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3590         do
3591                 cat >cf_makeflags.tmp <<CF_EOF
3592 SHELL = /bin/sh
3593 all :
3594         @ echo '.$cf_option'
3595 CF_EOF
3596                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3597                 case "$cf_result" in
3598                 .*k)
3599                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3600                         case "$cf_result" in
3601                         .*CC=*) cf_cv_makeflags=
3602                                 ;;
3603                         *)      cf_cv_makeflags=$cf_option
3604                                 ;;
3605                         esac
3606                         break
3607                         ;;
3608                 .-)     ;;
3609                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3610                         ;;
3611                 esac
3612         done
3613         rm -f cf_makeflags.tmp
3614
3615 fi
3616 echo "$as_me:3616: result: $cf_cv_makeflags" >&5
3617 echo "${ECHO_T}$cf_cv_makeflags" >&6
3618
3619 if test -n "$ac_tool_prefix"; then
3620   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3621 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3622 echo "$as_me:3622: checking for $ac_word" >&5
3623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3624 if test "${ac_cv_prog_RANLIB+set}" = set; then
3625   echo $ECHO_N "(cached) $ECHO_C" >&6
3626 else
3627   if test -n "$RANLIB"; then
3628   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3629 else
3630   ac_save_IFS=$IFS; IFS=$ac_path_separator
3631 ac_dummy="$PATH"
3632 for ac_dir in $ac_dummy; do
3633   IFS=$ac_save_IFS
3634   test -z "$ac_dir" && ac_dir=.
3635   $as_executable_p "$ac_dir/$ac_word" || continue
3636 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3637 echo "$as_me:3637: found $ac_dir/$ac_word" >&5
3638 break
3639 done
3640
3641 fi
3642 fi
3643 RANLIB=$ac_cv_prog_RANLIB
3644 if test -n "$RANLIB"; then
3645   echo "$as_me:3645: result: $RANLIB" >&5
3646 echo "${ECHO_T}$RANLIB" >&6
3647 else
3648   echo "$as_me:3648: result: no" >&5
3649 echo "${ECHO_T}no" >&6
3650 fi
3651
3652 fi
3653 if test -z "$ac_cv_prog_RANLIB"; then
3654   ac_ct_RANLIB=$RANLIB
3655   # Extract the first word of "ranlib", so it can be a program name with args.
3656 set dummy ranlib; 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_ac_ct_RANLIB+set}" = set; then
3660   echo $ECHO_N "(cached) $ECHO_C" >&6
3661 else
3662   if test -n "$ac_ct_RANLIB"; then
3663   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_ac_ct_RANLIB="ranlib"
3672 echo "$as_me:3672: found $ac_dir/$ac_word" >&5
3673 break
3674 done
3675
3676   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3677 fi
3678 fi
3679 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3680 if test -n "$ac_ct_RANLIB"; then
3681   echo "$as_me:3681: result: $ac_ct_RANLIB" >&5
3682 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3683 else
3684   echo "$as_me:3684: result: no" >&5
3685 echo "${ECHO_T}no" >&6
3686 fi
3687
3688   RANLIB=$ac_ct_RANLIB
3689 else
3690   RANLIB="$ac_cv_prog_RANLIB"
3691 fi
3692
3693 if test -n "$ac_tool_prefix"; then
3694   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3695 set dummy ${ac_tool_prefix}ld; ac_word=$2
3696 echo "$as_me:3696: checking for $ac_word" >&5
3697 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3698 if test "${ac_cv_prog_LD+set}" = set; then
3699   echo $ECHO_N "(cached) $ECHO_C" >&6
3700 else
3701   if test -n "$LD"; then
3702   ac_cv_prog_LD="$LD" # Let the user override the test.
3703 else
3704   ac_save_IFS=$IFS; IFS=$ac_path_separator
3705 ac_dummy="$PATH"
3706 for ac_dir in $ac_dummy; do
3707   IFS=$ac_save_IFS
3708   test -z "$ac_dir" && ac_dir=.
3709   $as_executable_p "$ac_dir/$ac_word" || continue
3710 ac_cv_prog_LD="${ac_tool_prefix}ld"
3711 echo "$as_me:3711: found $ac_dir/$ac_word" >&5
3712 break
3713 done
3714
3715 fi
3716 fi
3717 LD=$ac_cv_prog_LD
3718 if test -n "$LD"; then
3719   echo "$as_me:3719: result: $LD" >&5
3720 echo "${ECHO_T}$LD" >&6
3721 else
3722   echo "$as_me:3722: result: no" >&5
3723 echo "${ECHO_T}no" >&6
3724 fi
3725
3726 fi
3727 if test -z "$ac_cv_prog_LD"; then
3728   ac_ct_LD=$LD
3729   # Extract the first word of "ld", so it can be a program name with args.
3730 set dummy ld; ac_word=$2
3731 echo "$as_me:3731: checking for $ac_word" >&5
3732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3733 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3734   echo $ECHO_N "(cached) $ECHO_C" >&6
3735 else
3736   if test -n "$ac_ct_LD"; then
3737   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3738 else
3739   ac_save_IFS=$IFS; IFS=$ac_path_separator
3740 ac_dummy="$PATH"
3741 for ac_dir in $ac_dummy; do
3742   IFS=$ac_save_IFS
3743   test -z "$ac_dir" && ac_dir=.
3744   $as_executable_p "$ac_dir/$ac_word" || continue
3745 ac_cv_prog_ac_ct_LD="ld"
3746 echo "$as_me:3746: found $ac_dir/$ac_word" >&5
3747 break
3748 done
3749
3750   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3751 fi
3752 fi
3753 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3754 if test -n "$ac_ct_LD"; then
3755   echo "$as_me:3755: result: $ac_ct_LD" >&5
3756 echo "${ECHO_T}$ac_ct_LD" >&6
3757 else
3758   echo "$as_me:3758: result: no" >&5
3759 echo "${ECHO_T}no" >&6
3760 fi
3761
3762   LD=$ac_ct_LD
3763 else
3764   LD="$ac_cv_prog_LD"
3765 fi
3766
3767 if test -n "$ac_tool_prefix"; then
3768   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3769 set dummy ${ac_tool_prefix}ar; ac_word=$2
3770 echo "$as_me:3770: checking for $ac_word" >&5
3771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3772 if test "${ac_cv_prog_AR+set}" = set; then
3773   echo $ECHO_N "(cached) $ECHO_C" >&6
3774 else
3775   if test -n "$AR"; then
3776   ac_cv_prog_AR="$AR" # Let the user override the test.
3777 else
3778   ac_save_IFS=$IFS; IFS=$ac_path_separator
3779 ac_dummy="$PATH"
3780 for ac_dir in $ac_dummy; do
3781   IFS=$ac_save_IFS
3782   test -z "$ac_dir" && ac_dir=.
3783   $as_executable_p "$ac_dir/$ac_word" || continue
3784 ac_cv_prog_AR="${ac_tool_prefix}ar"
3785 echo "$as_me:3785: found $ac_dir/$ac_word" >&5
3786 break
3787 done
3788
3789 fi
3790 fi
3791 AR=$ac_cv_prog_AR
3792 if test -n "$AR"; then
3793   echo "$as_me:3793: result: $AR" >&5
3794 echo "${ECHO_T}$AR" >&6
3795 else
3796   echo "$as_me:3796: result: no" >&5
3797 echo "${ECHO_T}no" >&6
3798 fi
3799
3800 fi
3801 if test -z "$ac_cv_prog_AR"; then
3802   ac_ct_AR=$AR
3803   # Extract the first word of "ar", so it can be a program name with args.
3804 set dummy ar; ac_word=$2
3805 echo "$as_me:3805: checking for $ac_word" >&5
3806 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3807 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3808   echo $ECHO_N "(cached) $ECHO_C" >&6
3809 else
3810   if test -n "$ac_ct_AR"; then
3811   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3812 else
3813   ac_save_IFS=$IFS; IFS=$ac_path_separator
3814 ac_dummy="$PATH"
3815 for ac_dir in $ac_dummy; do
3816   IFS=$ac_save_IFS
3817   test -z "$ac_dir" && ac_dir=.
3818   $as_executable_p "$ac_dir/$ac_word" || continue
3819 ac_cv_prog_ac_ct_AR="ar"
3820 echo "$as_me:3820: found $ac_dir/$ac_word" >&5
3821 break
3822 done
3823
3824   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3825 fi
3826 fi
3827 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3828 if test -n "$ac_ct_AR"; then
3829   echo "$as_me:3829: result: $ac_ct_AR" >&5
3830 echo "${ECHO_T}$ac_ct_AR" >&6
3831 else
3832   echo "$as_me:3832: result: no" >&5
3833 echo "${ECHO_T}no" >&6
3834 fi
3835
3836   AR=$ac_ct_AR
3837 else
3838   AR="$ac_cv_prog_AR"
3839 fi
3840
3841 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3842   echo $ECHO_N "(cached) $ECHO_C" >&6
3843 else
3844
3845 echo "$as_me:3845: checking for archiver options (symbol AR_OPTS)" >&5
3846 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3847
3848 if test -z "$AR_OPTS" ; then
3849         AR_OPTS=rv
3850
3851 fi
3852
3853 cf_cv_subst_AR_OPTS=$AR_OPTS
3854 echo "$as_me:3854: result: $AR_OPTS" >&5
3855 echo "${ECHO_T}$AR_OPTS" >&6
3856
3857 fi
3858
3859 echo "$as_me:3859: checking if you have specified an install-prefix" >&5
3860 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3861
3862 # Check whether --with-install-prefix or --without-install-prefix was given.
3863 if test "${with_install_prefix+set}" = set; then
3864   withval="$with_install_prefix"
3865   case "$withval" in #(vi
3866         yes|no) #(vi
3867                 ;;
3868         *)      DESTDIR="$withval"
3869                 ;;
3870         esac
3871 fi;
3872 echo "$as_me:3872: result: $DESTDIR" >&5
3873 echo "${ECHO_T}$DESTDIR" >&6
3874
3875 ###############################################################################
3876
3877 # If we're cross-compiling, allow the user to override the tools and their
3878 # options.  The configure script is oriented toward identifying the host
3879 # compiler, etc., but we need a build compiler to generate parts of the source.
3880
3881 if test "$cross_compiling" = yes ; then
3882
3883         # defaults that we might want to override
3884         : ${BUILD_CFLAGS:=''}
3885         : ${BUILD_CPPFLAGS:=''}
3886         : ${BUILD_LDFLAGS:=''}
3887         : ${BUILD_LIBS:=''}
3888         : ${BUILD_EXEEXT:='$x'}
3889         : ${BUILD_OBJEXT:='o'}
3890
3891 # Check whether --with-build-cc or --without-build-cc was given.
3892 if test "${with_build_cc+set}" = set; then
3893   withval="$with_build_cc"
3894   BUILD_CC="$withval"
3895 else
3896   for ac_prog in gcc cc cl
3897 do
3898   # Extract the first word of "$ac_prog", so it can be a program name with args.
3899 set dummy $ac_prog; ac_word=$2
3900 echo "$as_me:3900: checking for $ac_word" >&5
3901 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3902 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3903   echo $ECHO_N "(cached) $ECHO_C" >&6
3904 else
3905   if test -n "$BUILD_CC"; then
3906   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3907 else
3908   ac_save_IFS=$IFS; IFS=$ac_path_separator
3909 ac_dummy="$PATH"
3910 for ac_dir in $ac_dummy; do
3911   IFS=$ac_save_IFS
3912   test -z "$ac_dir" && ac_dir=.
3913   $as_executable_p "$ac_dir/$ac_word" || continue
3914 ac_cv_prog_BUILD_CC="$ac_prog"
3915 echo "$as_me:3915: found $ac_dir/$ac_word" >&5
3916 break
3917 done
3918
3919 fi
3920 fi
3921 BUILD_CC=$ac_cv_prog_BUILD_CC
3922 if test -n "$BUILD_CC"; then
3923   echo "$as_me:3923: result: $BUILD_CC" >&5
3924 echo "${ECHO_T}$BUILD_CC" >&6
3925 else
3926   echo "$as_me:3926: result: no" >&5
3927 echo "${ECHO_T}no" >&6
3928 fi
3929
3930   test -n "$BUILD_CC" && break
3931 done
3932
3933 fi;
3934         echo "$as_me:3934: checking for native build C compiler" >&5
3935 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3936         echo "$as_me:3936: result: $BUILD_CC" >&5
3937 echo "${ECHO_T}$BUILD_CC" >&6
3938
3939         echo "$as_me:3939: checking for native build C preprocessor" >&5
3940 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3941
3942 # Check whether --with-build-cpp or --without-build-cpp was given.
3943 if test "${with_build_cpp+set}" = set; then
3944   withval="$with_build_cpp"
3945   BUILD_CPP="$withval"
3946 else
3947   BUILD_CPP='${BUILD_CC} -E'
3948 fi;
3949         echo "$as_me:3949: result: $BUILD_CPP" >&5
3950 echo "${ECHO_T}$BUILD_CPP" >&6
3951
3952         echo "$as_me:3952: checking for native build C flags" >&5
3953 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3954
3955 # Check whether --with-build-cflags or --without-build-cflags was given.
3956 if test "${with_build_cflags+set}" = set; then
3957   withval="$with_build_cflags"
3958   BUILD_CFLAGS="$withval"
3959 fi;
3960         echo "$as_me:3960: result: $BUILD_CFLAGS" >&5
3961 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3962
3963         echo "$as_me:3963: checking for native build C preprocessor-flags" >&5
3964 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3965
3966 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3967 if test "${with_build_cppflags+set}" = set; then
3968   withval="$with_build_cppflags"
3969   BUILD_CPPFLAGS="$withval"
3970 fi;
3971         echo "$as_me:3971: result: $BUILD_CPPFLAGS" >&5
3972 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3973
3974         echo "$as_me:3974: checking for native build linker-flags" >&5
3975 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3976
3977 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3978 if test "${with_build_ldflags+set}" = set; then
3979   withval="$with_build_ldflags"
3980   BUILD_LDFLAGS="$withval"
3981 fi;
3982         echo "$as_me:3982: result: $BUILD_LDFLAGS" >&5
3983 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3984
3985         echo "$as_me:3985: checking for native build linker-libraries" >&5
3986 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3987
3988 # Check whether --with-build-libs or --without-build-libs was given.
3989 if test "${with_build_libs+set}" = set; then
3990   withval="$with_build_libs"
3991   BUILD_LIBS="$withval"
3992 fi;
3993         echo "$as_me:3993: result: $BUILD_LIBS" >&5
3994 echo "${ECHO_T}$BUILD_LIBS" >&6
3995
3996         # this assumes we're on Unix.
3997         BUILD_EXEEXT=
3998         BUILD_OBJEXT=o
3999
4000         : ${BUILD_CC:='${CC}'}
4001
4002         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4003                 { { echo "$as_me:4003: error: Cross-build requires two compilers.
4004 Use --with-build-cc to specify the native compiler." >&5
4005 echo "$as_me: error: Cross-build requires two compilers.
4006 Use --with-build-cc to specify the native compiler." >&2;}
4007    { (exit 1); exit 1; }; }
4008         fi
4009
4010 else
4011         : ${BUILD_CC:='${CC}'}
4012         : ${BUILD_CPP:='${CPP}'}
4013         : ${BUILD_CFLAGS:='${CFLAGS}'}
4014         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4015         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4016         : ${BUILD_LIBS:='${LIBS}'}
4017         : ${BUILD_EXEEXT:='$x'}
4018         : ${BUILD_OBJEXT:='o'}
4019 fi
4020
4021 ###############################################################################
4022
4023 ### Options to allow the user to specify the set of libraries which are used.
4024 ### Use "--without-normal --with-shared" to allow the default model to be
4025 ### shared, for example.
4026 cf_list_models=""
4027
4028 LIBTOOL=
4029
4030 # common library maintenance symbols that are convenient for libtool scripts:
4031 LIB_CREATE='${AR} -cr'
4032 LIB_OBJECT='${OBJECTS}'
4033 LIB_SUFFIX=.a
4034 LIB_PREP="$RANLIB"
4035
4036 # symbols used to prop libtool up to enable it to determine what it should be
4037 # doing:
4038 LIB_CLEAN=
4039 LIB_COMPILE=
4040 LIB_LINK='${CC}'
4041 LIB_INSTALL=
4042 LIB_UNINSTALL=
4043
4044 echo "$as_me:4044: checking if you want to build libraries with libtool" >&5
4045 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4046
4047 # Check whether --with-libtool or --without-libtool was given.
4048 if test "${with_libtool+set}" = set; then
4049   withval="$with_libtool"
4050   with_libtool=$withval
4051 else
4052   with_libtool=no
4053 fi;
4054 echo "$as_me:4054: result: $with_libtool" >&5
4055 echo "${ECHO_T}$with_libtool" >&6
4056 if test "$with_libtool" != "no"; then
4057
4058         if test "$with_libtool" != "yes" ; then
4059
4060 if test "x$prefix" != xNONE; then
4061   cf_path_syntax="$prefix"
4062 else
4063   cf_path_syntax="$ac_default_prefix"
4064 fi
4065
4066 case ".$with_libtool" in #(vi
4067 .\$\(*\)*|.\'*\'*) #(vi
4068   ;;
4069 ..|./*|.\\*) #(vi
4070   ;;
4071 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4072   ;;
4073 .\${*prefix}*) #(vi
4074   eval with_libtool="$with_libtool"
4075   case ".$with_libtool" in #(vi
4076   .NONE/*)
4077     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4078     ;;
4079   esac
4080   ;; #(vi
4081 .no|.NONE/*)
4082   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4083   ;;
4084 *)
4085   { { echo "$as_me:4085: error: expected a pathname, not \"$with_libtool\"" >&5
4086 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4087    { (exit 1); exit 1; }; }
4088   ;;
4089 esac
4090
4091                 LIBTOOL=$with_libtool
4092         else
4093                 # Extract the first word of "libtool", so it can be a program name with args.
4094 set dummy libtool; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4098   echo $ECHO_N "(cached) $ECHO_C" >&6
4099 else
4100   case $LIBTOOL in
4101   [\\/]* | ?:[\\/]*)
4102   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4103   ;;
4104   *)
4105   ac_save_IFS=$IFS; IFS=$ac_path_separator
4106 ac_dummy="$PATH"
4107 for ac_dir in $ac_dummy; do
4108   IFS=$ac_save_IFS
4109   test -z "$ac_dir" && ac_dir=.
4110   if $as_executable_p "$ac_dir/$ac_word"; then
4111    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4112    echo "$as_me:4112: found $ac_dir/$ac_word" >&5
4113    break
4114 fi
4115 done
4116
4117   ;;
4118 esac
4119 fi
4120 LIBTOOL=$ac_cv_path_LIBTOOL
4121
4122 if test -n "$LIBTOOL"; then
4123   echo "$as_me:4123: result: $LIBTOOL" >&5
4124 echo "${ECHO_T}$LIBTOOL" >&6
4125 else
4126   echo "$as_me:4126: result: no" >&5
4127 echo "${ECHO_T}no" >&6
4128 fi
4129
4130         fi
4131         if test -z "$LIBTOOL" ; then
4132                 { { echo "$as_me:4132: error: Cannot find libtool" >&5
4133 echo "$as_me: error: Cannot find libtool" >&2;}
4134    { (exit 1); exit 1; }; }
4135         fi
4136         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4137         LIB_OBJECT='${OBJECTS:.o=.lo}'
4138         LIB_SUFFIX=.la
4139         LIB_CLEAN='${LIBTOOL} --mode=clean'
4140         LIB_COMPILE='${LIBTOOL} --mode=compile'
4141         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4142         LIB_INSTALL='${LIBTOOL} --mode=install'
4143         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4144         LIB_PREP=:
4145
4146         # Show the version of libtool
4147         echo "$as_me:4147: checking version of libtool" >&5
4148 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4149
4150         # Save the version in a cache variable - this is not entirely a good
4151         # thing, but the version string from libtool is very ugly, and for
4152         # bug reports it might be useful to have the original string.
4153         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.].*//'`
4154         echo "$as_me:4154: result: $cf_cv_libtool_version" >&5
4155 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4156         if test -z "$cf_cv_libtool_version" ; then
4157                 { { echo "$as_me:4157: error: This is not GNU libtool" >&5
4158 echo "$as_me: error: This is not GNU libtool" >&2;}
4159    { (exit 1); exit 1; }; }
4160         fi
4161
4162         # special hack to add --tag option for C++ compiler
4163         case $cf_cv_libtool_version in
4164         1.[5-9]*|[2-9]*)
4165                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4166                 LIBTOOL="$LIBTOOL --tag=CC"
4167                 ;;
4168         *)
4169                 LIBTOOL_CXX="$LIBTOOL"
4170                 ;;
4171         esac
4172 else
4173         LIBTOOL=""
4174         LIBTOOL_CXX=""
4175 fi
4176
4177 test -z "$LIBTOOL" && ECHO_LT=
4178
4179 if test "$with_libtool" != "no" ; then
4180
4181 cf_list_models="$cf_list_models libtool"
4182
4183 else
4184
4185 echo "$as_me:4185: checking if you want to build shared libraries" >&5
4186 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4187
4188 # Check whether --with-shared or --without-shared was given.
4189 if test "${with_shared+set}" = set; then
4190   withval="$with_shared"
4191   with_shared=$withval
4192 else
4193   with_shared=no
4194 fi;
4195 echo "$as_me:4195: result: $with_shared" >&5
4196 echo "${ECHO_T}$with_shared" >&6
4197 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4198
4199 echo "$as_me:4199: checking if you want to build static libraries" >&5
4200 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-normal or --without-normal was given.
4203 if test "${with_normal+set}" = set; then
4204   withval="$with_normal"
4205   with_normal=$withval
4206 else
4207   with_normal=yes
4208 fi;
4209 echo "$as_me:4209: result: $with_normal" >&5
4210 echo "${ECHO_T}$with_normal" >&6
4211 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4212
4213 echo "$as_me:4213: checking if you want to build debug libraries" >&5
4214 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4215
4216 # Check whether --with-debug or --without-debug was given.
4217 if test "${with_debug+set}" = set; then
4218   withval="$with_debug"
4219   with_debug=$withval
4220 else
4221   with_debug=yes
4222 fi;
4223 echo "$as_me:4223: result: $with_debug" >&5
4224 echo "${ECHO_T}$with_debug" >&6
4225 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4226
4227 echo "$as_me:4227: checking if you want to build profiling libraries" >&5
4228 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4229
4230 # Check whether --with-profile or --without-profile was given.
4231 if test "${with_profile+set}" = set; then
4232   withval="$with_profile"
4233   with_profile=$withval
4234 else
4235   with_profile=no
4236 fi;
4237 echo "$as_me:4237: result: $with_profile" >&5
4238 echo "${ECHO_T}$with_profile" >&6
4239 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4240
4241 fi
4242
4243 ###############################################################################
4244
4245 echo "$as_me:4245: checking for specified models" >&5
4246 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4247 test -z "$cf_list_models" && cf_list_models=normal
4248 test "$with_libtool" != "no" && cf_list_models=libtool
4249 echo "$as_me:4249: result: $cf_list_models" >&5
4250 echo "${ECHO_T}$cf_list_models" >&6
4251
4252 ### Use the first model as the default, and save its suffix for use in building
4253 ### up test-applications.
4254 echo "$as_me:4254: checking for default model" >&5
4255 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4256 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4257 echo "$as_me:4257: result: $DFT_LWR_MODEL" >&5
4258 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4259
4260 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4261
4262 TICS_NAME=tic
4263
4264 TINFO_NAME=tinfo
4265
4266 LIB_NAME=ncurses
4267
4268 LIB_DIR=../lib
4269 LIB_2ND=../../lib
4270
4271         case $cf_cv_system_name in #(vi
4272         OS/2*|os2*) #(vi
4273         LIB_PREFIX=''
4274         ;;
4275         *)      LIB_PREFIX='lib'
4276         ;;
4277         esac
4278 cf_prefix=$LIB_PREFIX
4279
4280 LIB_PREFIX=$cf_prefix
4281
4282 LIB_SUFFIX=
4283
4284 ###############################################################################
4285
4286 echo "$as_me:4286: checking if you want to build a separate terminfo library" >&5
4287 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4288
4289 # Check whether --with-termlib or --without-termlib was given.
4290 if test "${with_termlib+set}" = set; then
4291   withval="$with_termlib"
4292   with_termlib=$withval
4293 else
4294   with_termlib=no
4295 fi;
4296 echo "$as_me:4296: result: $with_termlib" >&5
4297 echo "${ECHO_T}$with_termlib" >&6
4298
4299 echo "$as_me:4299: checking if you want to build a separate tic library" >&5
4300 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4301
4302 # Check whether --with-ticlib or --without-ticlib was given.
4303 if test "${with_ticlib+set}" = set; then
4304   withval="$with_ticlib"
4305   with_ticlib=$withval
4306 else
4307   with_ticlib=no
4308 fi;
4309 echo "$as_me:4309: result: $with_ticlib" >&5
4310 echo "${ECHO_T}$with_ticlib" >&6
4311
4312 ### Checks for special libraries, must be done up-front.
4313 SHLIB_LIST=""
4314
4315 echo "$as_me:4315: checking if you want to link with the GPM mouse library" >&5
4316 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4317
4318 # Check whether --with-gpm or --without-gpm was given.
4319 if test "${with_gpm+set}" = set; then
4320   withval="$with_gpm"
4321   with_gpm=$withval
4322 else
4323   with_gpm=maybe
4324 fi;
4325 echo "$as_me:4325: result: $with_gpm" >&5
4326 echo "${ECHO_T}$with_gpm" >&6
4327
4328 if test "$with_gpm" != no ; then
4329         echo "$as_me:4329: checking for gpm.h" >&5
4330 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4331 if test "${ac_cv_header_gpm_h+set}" = set; then
4332   echo $ECHO_N "(cached) $ECHO_C" >&6
4333 else
4334   cat >conftest.$ac_ext <<_ACEOF
4335 #line 4335 "configure"
4336 #include "confdefs.h"
4337 #include <gpm.h>
4338 _ACEOF
4339 if { (eval echo "$as_me:4339: \"$ac_cpp conftest.$ac_ext\"") >&5
4340   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4341   ac_status=$?
4342   egrep -v '^ *\+' conftest.er1 >conftest.err
4343   rm -f conftest.er1
4344   cat conftest.err >&5
4345   echo "$as_me:4345: \$? = $ac_status" >&5
4346   (exit $ac_status); } >/dev/null; then
4347   if test -s conftest.err; then
4348     ac_cpp_err=$ac_c_preproc_warn_flag
4349   else
4350     ac_cpp_err=
4351   fi
4352 else
4353   ac_cpp_err=yes
4354 fi
4355 if test -z "$ac_cpp_err"; then
4356   ac_cv_header_gpm_h=yes
4357 else
4358   echo "$as_me: failed program was:" >&5
4359   cat conftest.$ac_ext >&5
4360   ac_cv_header_gpm_h=no
4361 fi
4362 rm -f conftest.err conftest.$ac_ext
4363 fi
4364 echo "$as_me:4364: result: $ac_cv_header_gpm_h" >&5
4365 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4366 if test $ac_cv_header_gpm_h = yes; then
4367
4368                 cat >>confdefs.h <<\EOF
4369 #define HAVE_GPM_H 1
4370 EOF
4371
4372                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4373                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4374
4375 echo "${as_me-configure}:4375: testing assuming we really have GPM library ..." 1>&5
4376
4377                         cat >>confdefs.h <<\EOF
4378 #define HAVE_LIBGPM 1
4379 EOF
4380
4381                 else
4382                         echo "$as_me:4382: checking for Gpm_Open in -lgpm" >&5
4383 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4384 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4385   echo $ECHO_N "(cached) $ECHO_C" >&6
4386 else
4387   ac_check_lib_save_LIBS=$LIBS
4388 LIBS="-lgpm  $LIBS"
4389 cat >conftest.$ac_ext <<_ACEOF
4390 #line 4390 "configure"
4391 #include "confdefs.h"
4392
4393 /* Override any gcc2 internal prototype to avoid an error.  */
4394 #ifdef __cplusplus
4395 extern "C"
4396 #endif
4397 /* We use char because int might match the return type of a gcc2
4398    builtin and then its argument prototype would still apply.  */
4399 char Gpm_Open ();
4400 int
4401 main ()
4402 {
4403 Gpm_Open ();
4404   ;
4405   return 0;
4406 }
4407 _ACEOF
4408 rm -f conftest.$ac_objext conftest$ac_exeext
4409 if { (eval echo "$as_me:4409: \"$ac_link\"") >&5
4410   (eval $ac_link) 2>&5
4411   ac_status=$?
4412   echo "$as_me:4412: \$? = $ac_status" >&5
4413   (exit $ac_status); } &&
4414          { ac_try='test -s conftest$ac_exeext'
4415   { (eval echo "$as_me:4415: \"$ac_try\"") >&5
4416   (eval $ac_try) 2>&5
4417   ac_status=$?
4418   echo "$as_me:4418: \$? = $ac_status" >&5
4419   (exit $ac_status); }; }; then
4420   ac_cv_lib_gpm_Gpm_Open=yes
4421 else
4422   echo "$as_me: failed program was:" >&5
4423 cat conftest.$ac_ext >&5
4424 ac_cv_lib_gpm_Gpm_Open=no
4425 fi
4426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4427 LIBS=$ac_check_lib_save_LIBS
4428 fi
4429 echo "$as_me:4429: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4430 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4431 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4432   :
4433 else
4434
4435                                 { { echo "$as_me:4435: error: Cannot link with GPM library" >&5
4436 echo "$as_me: error: Cannot link with GPM library" >&2;}
4437    { (exit 1); exit 1; }; }
4438                 fi
4439                 with_gpm=yes
4440
4441 fi
4442
4443 else
4444
4445                 test "$with_gpm" != maybe && { echo "$as_me:4445: WARNING: Cannot find GPM header" >&5
4446 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4447                 with_gpm=no
4448
4449 fi
4450
4451 fi
4452
4453 if test "$with_gpm" != no ; then
4454         echo "$as_me:4454: checking if you want to load GPM dynamically" >&5
4455 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4456
4457 # Check whether --with-dlsym or --without-dlsym was given.
4458 if test "${with_dlsym+set}" = set; then
4459   withval="$with_dlsym"
4460   with_dlsym=$withval
4461 else
4462   with_dlsym=yes
4463 fi;
4464         echo "$as_me:4464: result: $with_dlsym" >&5
4465 echo "${ECHO_T}$with_dlsym" >&6
4466         if test "$with_dlsym" = yes ; then
4467
4468 cf_have_dlsym=no
4469 echo "$as_me:4469: checking for dlsym" >&5
4470 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4471 if test "${ac_cv_func_dlsym+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   cat >conftest.$ac_ext <<_ACEOF
4475 #line 4475 "configure"
4476 #include "confdefs.h"
4477 /* System header to define __stub macros and hopefully few prototypes,
4478     which can conflict with char dlsym (); below.  */
4479 #include <assert.h>
4480 /* Override any gcc2 internal prototype to avoid an error.  */
4481 #ifdef __cplusplus
4482 extern "C"
4483 #endif
4484 /* We use char because int might match the return type of a gcc2
4485    builtin and then its argument prototype would still apply.  */
4486 char dlsym ();
4487 char (*f) ();
4488
4489 int
4490 main ()
4491 {
4492 /* The GNU C library defines this for functions which it implements
4493     to always fail with ENOSYS.  Some functions are actually named
4494     something starting with __ and the normal name is an alias.  */
4495 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4496 choke me
4497 #else
4498 f = dlsym;
4499 #endif
4500
4501   ;
4502   return 0;
4503 }
4504 _ACEOF
4505 rm -f conftest.$ac_objext conftest$ac_exeext
4506 if { (eval echo "$as_me:4506: \"$ac_link\"") >&5
4507   (eval $ac_link) 2>&5
4508   ac_status=$?
4509   echo "$as_me:4509: \$? = $ac_status" >&5
4510   (exit $ac_status); } &&
4511          { ac_try='test -s conftest$ac_exeext'
4512   { (eval echo "$as_me:4512: \"$ac_try\"") >&5
4513   (eval $ac_try) 2>&5
4514   ac_status=$?
4515   echo "$as_me:4515: \$? = $ac_status" >&5
4516   (exit $ac_status); }; }; then
4517   ac_cv_func_dlsym=yes
4518 else
4519   echo "$as_me: failed program was:" >&5
4520 cat conftest.$ac_ext >&5
4521 ac_cv_func_dlsym=no
4522 fi
4523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4524 fi
4525 echo "$as_me:4525: result: $ac_cv_func_dlsym" >&5
4526 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4527 if test $ac_cv_func_dlsym = yes; then
4528   cf_have_dlsym=yes
4529 else
4530
4531 cf_have_libdl=no
4532 echo "$as_me:4532: checking for dlsym in -ldl" >&5
4533 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4534 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4535   echo $ECHO_N "(cached) $ECHO_C" >&6
4536 else
4537   ac_check_lib_save_LIBS=$LIBS
4538 LIBS="-ldl  $LIBS"
4539 cat >conftest.$ac_ext <<_ACEOF
4540 #line 4540 "configure"
4541 #include "confdefs.h"
4542
4543 /* Override any gcc2 internal prototype to avoid an error.  */
4544 #ifdef __cplusplus
4545 extern "C"
4546 #endif
4547 /* We use char because int might match the return type of a gcc2
4548    builtin and then its argument prototype would still apply.  */
4549 char dlsym ();
4550 int
4551 main ()
4552 {
4553 dlsym ();
4554   ;
4555   return 0;
4556 }
4557 _ACEOF
4558 rm -f conftest.$ac_objext conftest$ac_exeext
4559 if { (eval echo "$as_me:4559: \"$ac_link\"") >&5
4560   (eval $ac_link) 2>&5
4561   ac_status=$?
4562   echo "$as_me:4562: \$? = $ac_status" >&5
4563   (exit $ac_status); } &&
4564          { ac_try='test -s conftest$ac_exeext'
4565   { (eval echo "$as_me:4565: \"$ac_try\"") >&5
4566   (eval $ac_try) 2>&5
4567   ac_status=$?
4568   echo "$as_me:4568: \$? = $ac_status" >&5
4569   (exit $ac_status); }; }; then
4570   ac_cv_lib_dl_dlsym=yes
4571 else
4572   echo "$as_me: failed program was:" >&5
4573 cat conftest.$ac_ext >&5
4574 ac_cv_lib_dl_dlsym=no
4575 fi
4576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4577 LIBS=$ac_check_lib_save_LIBS
4578 fi
4579 echo "$as_me:4579: result: $ac_cv_lib_dl_dlsym" >&5
4580 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4581 if test $ac_cv_lib_dl_dlsym = yes; then
4582
4583         cf_have_dlsym=yes
4584         cf_have_libdl=yes
4585 fi
4586
4587 fi
4588
4589 if test "$cf_have_dlsym" = yes ; then
4590         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4591
4592         echo "$as_me:4592: checking whether able to link to dl*() functions" >&5
4593 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4594         cat >conftest.$ac_ext <<_ACEOF
4595 #line 4595 "configure"
4596 #include "confdefs.h"
4597 #include <dlfcn.h>
4598 int
4599 main ()
4600 {
4601
4602                 void *obj;
4603                 if ((obj = dlopen("filename", 0)) != 0) {
4604                         if (dlsym(obj, "symbolname") == 0) {
4605                         dlclose(obj);
4606                         }
4607                 }
4608   ;
4609   return 0;
4610 }
4611 _ACEOF
4612 rm -f conftest.$ac_objext conftest$ac_exeext
4613 if { (eval echo "$as_me:4613: \"$ac_link\"") >&5
4614   (eval $ac_link) 2>&5
4615   ac_status=$?
4616   echo "$as_me:4616: \$? = $ac_status" >&5
4617   (exit $ac_status); } &&
4618          { ac_try='test -s conftest$ac_exeext'
4619   { (eval echo "$as_me:4619: \"$ac_try\"") >&5
4620   (eval $ac_try) 2>&5
4621   ac_status=$?
4622   echo "$as_me:4622: \$? = $ac_status" >&5
4623   (exit $ac_status); }; }; then
4624
4625                 cat >>confdefs.h <<\EOF
4626 #define HAVE_LIBDL 1
4627 EOF
4628
4629 else
4630   echo "$as_me: failed program was:" >&5
4631 cat conftest.$ac_ext >&5
4632
4633                 { { echo "$as_me:4633: error: Cannot link test program for libdl" >&5
4634 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4635    { (exit 1); exit 1; }; }
4636 fi
4637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4638         echo "$as_me:4638: result: ok" >&5
4639 echo "${ECHO_T}ok" >&6
4640 else
4641         { { echo "$as_me:4641: error: Cannot find dlsym function" >&5
4642 echo "$as_me: error: Cannot find dlsym function" >&2;}
4643    { (exit 1); exit 1; }; }
4644 fi
4645
4646                 if test "$with_gpm" != yes ; then
4647                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4648
4649 echo "${as_me-configure}:4649: testing assuming soname for gpm is $with_gpm ..." 1>&5
4650
4651                         cf_cv_gpm_soname="$with_gpm"
4652                 else
4653
4654 echo "$as_me:4654: checking for soname of gpm library" >&5
4655 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4656 if test "${cf_cv_gpm_soname+set}" = set; then
4657   echo $ECHO_N "(cached) $ECHO_C" >&6
4658 else
4659
4660 cf_cv_gpm_soname=unknown
4661 if test "$cross_compiling" != yes ; then
4662 cat >conftest.$ac_ext <<CF_EOF
4663 #include <gpm.h>
4664 int main()
4665 {
4666 if (Gpm_Open(0,0)) Gpm_Close();
4667         ${cf_cv_main_return:-return}(0);
4668 }
4669 CF_EOF
4670 cf_save_LIBS="$LIBS"
4671         LIBS="-lgpm $LIBS"
4672         if { (eval echo "$as_me:4672: \"$ac_compile\"") >&5
4673   (eval $ac_compile) 2>&5
4674   ac_status=$?
4675   echo "$as_me:4675: \$? = $ac_status" >&5
4676   (exit $ac_status); } ; then
4677                 if { (eval echo "$as_me:4677: \"$ac_link\"") >&5
4678   (eval $ac_link) 2>&5
4679   ac_status=$?
4680   echo "$as_me:4680: \$? = $ac_status" >&5
4681   (exit $ac_status); } ; then
4682                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4683                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4684                 fi
4685         fi
4686 rm -f conftest*
4687 LIBS="$cf_save_LIBS"
4688 fi
4689
4690 fi
4691 echo "$as_me:4691: result: $cf_cv_gpm_soname" >&5
4692 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4693
4694                 fi
4695                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4696 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4697 EOF
4698
4699                 SHLIB_LIST="-ldl $SHLIB_LIST"
4700         else
4701                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4702         fi
4703         cat >>confdefs.h <<\EOF
4704 #define HAVE_LIBGPM 1
4705 EOF
4706
4707 echo "$as_me:4707: checking for Gpm_Wgetch in -lgpm" >&5
4708 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4709 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4710   echo $ECHO_N "(cached) $ECHO_C" >&6
4711 else
4712   ac_check_lib_save_LIBS=$LIBS
4713 LIBS="-lgpm  $LIBS"
4714 cat >conftest.$ac_ext <<_ACEOF
4715 #line 4715 "configure"
4716 #include "confdefs.h"
4717
4718 /* Override any gcc2 internal prototype to avoid an error.  */
4719 #ifdef __cplusplus
4720 extern "C"
4721 #endif
4722 /* We use char because int might match the return type of a gcc2
4723    builtin and then its argument prototype would still apply.  */
4724 char Gpm_Wgetch ();
4725 int
4726 main ()
4727 {
4728 Gpm_Wgetch ();
4729   ;
4730   return 0;
4731 }
4732 _ACEOF
4733 rm -f conftest.$ac_objext conftest$ac_exeext
4734 if { (eval echo "$as_me:4734: \"$ac_link\"") >&5
4735   (eval $ac_link) 2>&5
4736   ac_status=$?
4737   echo "$as_me:4737: \$? = $ac_status" >&5
4738   (exit $ac_status); } &&
4739          { ac_try='test -s conftest$ac_exeext'
4740   { (eval echo "$as_me:4740: \"$ac_try\"") >&5
4741   (eval $ac_try) 2>&5
4742   ac_status=$?
4743   echo "$as_me:4743: \$? = $ac_status" >&5
4744   (exit $ac_status); }; }; then
4745   ac_cv_lib_gpm_Gpm_Wgetch=yes
4746 else
4747   echo "$as_me: failed program was:" >&5
4748 cat conftest.$ac_ext >&5
4749 ac_cv_lib_gpm_Gpm_Wgetch=no
4750 fi
4751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4752 LIBS=$ac_check_lib_save_LIBS
4753 fi
4754 echo "$as_me:4754: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4755 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4756 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4757
4758 echo "$as_me:4758: checking if GPM is weakly bound to curses library" >&5
4759 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4760 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4761   echo $ECHO_N "(cached) $ECHO_C" >&6
4762 else
4763
4764 cf_cv_check_gpm_wgetch=unknown
4765 if test "$cross_compiling" != yes ; then
4766
4767 cat >conftest.$ac_ext <<CF_EOF
4768 #include <gpm.h>
4769 int main()
4770 {
4771         Gpm_Wgetch();
4772         ${cf_cv_main_return:-return}(0);
4773 }
4774 CF_EOF
4775
4776         cf_save_LIBS="$LIBS"
4777         # This only works if we can look at the symbol table.  If a shared
4778         # library is stripped for install, we cannot use that.  So we're forced
4779         # to rely on the static library, noting that some packagers may not
4780         # include it.
4781         LIBS="-static -lgpm -dynamic $LIBS"
4782         if { (eval echo "$as_me:4782: \"$ac_compile\"") >&5
4783   (eval $ac_compile) 2>&5
4784   ac_status=$?
4785   echo "$as_me:4785: \$? = $ac_status" >&5
4786   (exit $ac_status); } ; then
4787                 if { (eval echo "$as_me:4787: \"$ac_link\"") >&5
4788   (eval $ac_link) 2>&5
4789   ac_status=$?
4790   echo "$as_me:4790: \$? = $ac_status" >&5
4791   (exit $ac_status); } ; then
4792                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
4793                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
4794                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
4795                 fi
4796         fi
4797         rm -f conftest*
4798         LIBS="$cf_save_LIBS"
4799 fi
4800
4801 fi
4802 echo "$as_me:4802: result: $cf_cv_check_gpm_wgetch" >&5
4803 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
4804
4805 if test "$cf_cv_check_gpm_wgetch" != yes ; then
4806         { echo "$as_me:4806: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4807 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4808 fi
4809
4810 fi
4811
4812 fi
4813
4814 # not everyone has "test -c"
4815 if test -c /dev/sysmouse 2>/dev/null ; then
4816 echo "$as_me:4816: checking if you want to use sysmouse" >&5
4817 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4818
4819 # Check whether --with-sysmouse or --without-sysmouse was given.
4820 if test "${with_sysmouse+set}" = set; then
4821   withval="$with_sysmouse"
4822   cf_with_sysmouse=$withval
4823 else
4824   cf_with_sysmouse=maybe
4825 fi;
4826         if test "$cf_with_sysmouse" != no ; then
4827         cat >conftest.$ac_ext <<_ACEOF
4828 #line 4828 "configure"
4829 #include "confdefs.h"
4830
4831 #include <osreldate.h>
4832 #if (__FreeBSD_version >= 400017)
4833 #include <sys/consio.h>
4834 #include <sys/fbio.h>
4835 #else
4836 #include <machine/console.h>
4837 #endif
4838
4839 int
4840 main ()
4841 {
4842
4843         struct mouse_info the_mouse;
4844         ioctl(0, CONS_MOUSECTL, &the_mouse);
4845
4846   ;
4847   return 0;
4848 }
4849 _ACEOF
4850 rm -f conftest.$ac_objext
4851 if { (eval echo "$as_me:4851: \"$ac_compile\"") >&5
4852   (eval $ac_compile) 2>&5
4853   ac_status=$?
4854   echo "$as_me:4854: \$? = $ac_status" >&5
4855   (exit $ac_status); } &&
4856          { ac_try='test -s conftest.$ac_objext'
4857   { (eval echo "$as_me:4857: \"$ac_try\"") >&5
4858   (eval $ac_try) 2>&5
4859   ac_status=$?
4860   echo "$as_me:4860: \$? = $ac_status" >&5
4861   (exit $ac_status); }; }; then
4862   cf_with_sysmouse=yes
4863 else
4864   echo "$as_me: failed program was:" >&5
4865 cat conftest.$ac_ext >&5
4866 cf_with_sysmouse=no
4867 fi
4868 rm -f conftest.$ac_objext conftest.$ac_ext
4869         fi
4870 echo "$as_me:4870: result: $cf_with_sysmouse" >&5
4871 echo "${ECHO_T}$cf_with_sysmouse" >&6
4872 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4873 #define USE_SYSMOUSE 1
4874 EOF
4875
4876 fi
4877
4878 if test X"$CC_G_OPT" = X"" ; then
4879         CC_G_OPT='-g'
4880         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4881 fi
4882
4883 if test X"$CXX_G_OPT" = X"" ; then
4884         CXX_G_OPT='-g'
4885         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4886 fi
4887
4888 echo "$as_me:4888: checking for default loader flags" >&5
4889 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4890 case $DFT_LWR_MODEL in
4891 libtool) LD_MODEL=''   ;;
4892 normal)  LD_MODEL=''   ;;
4893 debug)   LD_MODEL=$CC_G_OPT ;;
4894 profile) LD_MODEL='-pg';;
4895 shared)  LD_MODEL=''   ;;
4896 esac
4897 echo "$as_me:4897: result: $LD_MODEL" >&5
4898 echo "${ECHO_T}$LD_MODEL" >&6
4899
4900 case $DFT_LWR_MODEL in
4901 shared)
4902
4903 echo "$as_me:4903: checking if rpath option should be used" >&5
4904 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4905
4906 # Check whether --enable-rpath or --disable-rpath was given.
4907 if test "${enable_rpath+set}" = set; then
4908   enableval="$enable_rpath"
4909   cf_cv_ld_rpath=$enableval
4910 else
4911   cf_cv_ld_rpath=no
4912 fi;
4913 echo "$as_me:4913: result: $cf_cv_ld_rpath" >&5
4914 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4915
4916 echo "$as_me:4916: checking if shared libraries should be relinked during install" >&5
4917 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
4918
4919 # Check whether --enable-relink or --disable-relink was given.
4920 if test "${enable_relink+set}" = set; then
4921   enableval="$enable_relink"
4922   cf_cv_do_relink=$enableval
4923 else
4924   cf_cv_do_relink=yes
4925 fi;
4926 echo "$as_me:4926: result: $cf_cv_do_relink" >&5
4927 echo "${ECHO_T}$cf_cv_do_relink" >&6
4928         ;;
4929 esac
4930
4931         LOCAL_LDFLAGS=
4932         LOCAL_LDFLAGS2=
4933         LD_SHARED_OPTS=
4934         INSTALL_LIB="-m 644"
4935
4936         cf_cv_do_symlinks=no
4937
4938         echo "$as_me:4938: checking if release/abi version should be used for shared libs" >&5
4939 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4940
4941 # Check whether --with-shlib-version or --without-shlib-version was given.
4942 if test "${with_shlib_version+set}" = set; then
4943   withval="$with_shlib_version"
4944   test -z "$withval" && withval=auto
4945         case $withval in #(vi
4946         yes) #(vi
4947                 cf_cv_shlib_version=auto
4948                 ;;
4949         rel|abi|auto|no) #(vi
4950                 cf_cv_shlib_version=$withval
4951                 ;;
4952         *)
4953                 { { echo "$as_me:4953: error: option value must be one of: rel, abi, auto or no" >&5
4954 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4955    { (exit 1); exit 1; }; }
4956                 ;;
4957         esac
4958
4959 else
4960   cf_cv_shlib_version=auto
4961 fi;
4962         echo "$as_me:4962: result: $cf_cv_shlib_version" >&5
4963 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4964
4965         cf_cv_rm_so_locs=no
4966
4967         # Some less-capable ports of gcc support only -fpic
4968         CC_SHARED_OPTS=
4969         if test "$GCC" = yes
4970         then
4971                 echo "$as_me:4971: checking which $CC option to use" >&5
4972 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4973                 cf_save_CFLAGS="$CFLAGS"
4974                 for CC_SHARED_OPTS in -fPIC -fpic ''
4975                 do
4976                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4977                         cat >conftest.$ac_ext <<_ACEOF
4978 #line 4978 "configure"
4979 #include "confdefs.h"
4980 #include <stdio.h>
4981 int
4982 main ()
4983 {
4984 int x = 1
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 rm -f conftest.$ac_objext
4990 if { (eval echo "$as_me:4990: \"$ac_compile\"") >&5
4991   (eval $ac_compile) 2>&5
4992   ac_status=$?
4993   echo "$as_me:4993: \$? = $ac_status" >&5
4994   (exit $ac_status); } &&
4995          { ac_try='test -s conftest.$ac_objext'
4996   { (eval echo "$as_me:4996: \"$ac_try\"") >&5
4997   (eval $ac_try) 2>&5
4998   ac_status=$?
4999   echo "$as_me:4999: \$? = $ac_status" >&5
5000   (exit $ac_status); }; }; then
5001   break
5002 else
5003   echo "$as_me: failed program was:" >&5
5004 cat conftest.$ac_ext >&5
5005 fi
5006 rm -f conftest.$ac_objext conftest.$ac_ext
5007                 done
5008                 echo "$as_me:5008: result: $CC_SHARED_OPTS" >&5
5009 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5010                 CFLAGS="$cf_save_CFLAGS"
5011         fi
5012
5013         cf_cv_shlib_version_infix=no
5014
5015         case $cf_cv_system_name in
5016         beos*)
5017                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5018                 ;;
5019         cygwin*)
5020                 CC_SHARED_OPTS=
5021                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5022                 cf_cv_shlib_version=cygdll
5023                 cf_cv_shlib_version_infix=cygdll
5024                 cat >mk_shared_lib.sh <<-CF_EOF
5025                 #!/bin/sh
5026                 SHARED_LIB=\$1
5027                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5028                 shift
5029                 cat <<-EOF
5030                 Linking shared library
5031                 ** SHARED_LIB \$SHARED_LIB
5032                 ** IMPORT_LIB \$IMPORT_LIB
5033 EOF
5034                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5035 CF_EOF
5036                 chmod +x mk_shared_lib.sh
5037                 ;;
5038         darwin*)
5039                 EXTRA_CFLAGS="-no-cpp-precomp"
5040                 CC_SHARED_OPTS="-dynamic"
5041                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5042                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5043                 cf_cv_shlib_version_infix=yes
5044                 echo "$as_me:5044: checking if ld -search_paths_first works" >&5
5045 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5046 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5047   echo $ECHO_N "(cached) $ECHO_C" >&6
5048 else
5049
5050                         cf_save_LDFLAGS=$LDFLAGS
5051                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5052                         cat >conftest.$ac_ext <<_ACEOF
5053 #line 5053 "configure"
5054 #include "confdefs.h"
5055
5056 int
5057 main ()
5058 {
5059 int i;
5060   ;
5061   return 0;
5062 }
5063 _ACEOF
5064 rm -f conftest.$ac_objext conftest$ac_exeext
5065 if { (eval echo "$as_me:5065: \"$ac_link\"") >&5
5066   (eval $ac_link) 2>&5
5067   ac_status=$?
5068   echo "$as_me:5068: \$? = $ac_status" >&5
5069   (exit $ac_status); } &&
5070          { ac_try='test -s conftest$ac_exeext'
5071   { (eval echo "$as_me:5071: \"$ac_try\"") >&5
5072   (eval $ac_try) 2>&5
5073   ac_status=$?
5074   echo "$as_me:5074: \$? = $ac_status" >&5
5075   (exit $ac_status); }; }; then
5076   cf_cv_ldflags_search_paths_first=yes
5077 else
5078   echo "$as_me: failed program was:" >&5
5079 cat conftest.$ac_ext >&5
5080 cf_cv_ldflags_search_paths_first=no
5081 fi
5082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5083                                 LDFLAGS=$cf_save_LDFLAGS
5084 fi
5085 echo "$as_me:5085: result: $cf_cv_ldflags_search_paths_first" >&5
5086 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5087                 if test $cf_cv_ldflags_search_paths_first = yes; then
5088                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5089                 fi
5090                 ;;
5091         hpux*)
5092                 # (tested with gcc 2.7.2 -- I don't have c89)
5093                 if test "$GCC" = yes; then
5094                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5095                 else
5096                         CC_SHARED_OPTS='+Z'
5097                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5098                 fi
5099                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5100                 # HP-UX shared libraries must be executable, and should be
5101                 # readonly to exploit a quirk in the memory manager.
5102                 INSTALL_LIB="-m 555"
5103                 ;;
5104         irix*)
5105                 if test "$cf_cv_ld_rpath" = yes ; then
5106                         if test "$GCC" = yes; then
5107                                 cf_ld_rpath_opt="-Wl,-rpath,"
5108                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5109                         else
5110                                 cf_ld_rpath_opt="-rpath "
5111                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5112                         fi
5113                 fi
5114                 # tested with IRIX 5.2 and 'cc'.
5115                 if test "$GCC" != yes; then
5116                         CC_SHARED_OPTS='-KPIC'
5117                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5118                 else
5119                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5120                 fi
5121                 cf_cv_rm_so_locs=yes
5122                 ;;
5123         linux*|gnu*|k*bsd*-gnu)
5124                 if test "$DFT_LWR_MODEL" = "shared" ; then
5125                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5126                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5127                 fi
5128                 if test "$cf_cv_ld_rpath" = yes ; then
5129                         cf_ld_rpath_opt="-Wl,-rpath,"
5130                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5131                 fi
5132
5133         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5134         if test "$cf_cv_shlib_version" = rel; then
5135                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5136         else
5137                 cf_cv_shared_soname='`basename $@`'
5138         fi
5139
5140                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5141                 ;;
5142         openbsd[2-9].*)
5143                 if test "$DFT_LWR_MODEL" = "shared" ; then
5144                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5145                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5146                 fi
5147                 if test "$cf_cv_ld_rpath" = yes ; then
5148                         cf_ld_rpath_opt="-Wl,-rpath,"
5149                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5150                 fi
5151                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5152
5153         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5154         if test "$cf_cv_shlib_version" = rel; then
5155                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5156         else
5157                 cf_cv_shared_soname='`basename $@`'
5158         fi
5159
5160                 MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5161                 ;;
5162         nto-qnx*|openbsd*|freebsd[12].*)
5163                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5164                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5165                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5166                 ;;
5167         freebsd*)
5168                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5169                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5170                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5171                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5172                         cf_ld_rpath_opt="-rpath "
5173                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5174                 fi
5175
5176         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5177         if test "$cf_cv_shlib_version" = rel; then
5178                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5179         else
5180                 cf_cv_shared_soname='`basename $@`'
5181         fi
5182
5183                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5184                 ;;
5185         netbsd*)
5186                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5187                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5188                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5189                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5190                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5191                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5192                         if test "$cf_cv_shlib_version" = auto; then
5193                         if test -f /usr/libexec/ld.elf_so; then
5194                                 cf_cv_shlib_version=abi
5195                         else
5196                                 cf_cv_shlib_version=rel
5197                         fi
5198                         fi
5199
5200         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5201         if test "$cf_cv_shlib_version" = rel; then
5202                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5203         else
5204                 cf_cv_shared_soname='`basename $@`'
5205         fi
5206
5207                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5208                 else
5209                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5210                 fi
5211                 ;;
5212         osf*|mls+*)
5213                 # tested with OSF/1 V3.2 and 'cc'
5214                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5215                 # link with shared libs).
5216                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5217                 case $host_os in
5218                 osf4*)
5219                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5220                         ;;
5221                 esac
5222                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5223                 if test "$DFT_LWR_MODEL" = "shared" ; then
5224                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5225                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5226                 fi
5227                 if test "$cf_cv_ld_rpath" = yes ; then
5228                         cf_ld_rpath_opt="-rpath"
5229                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5230                 fi
5231                 cf_cv_rm_so_locs=yes
5232                 ;;
5233         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5234                 # tested with osr5.0.5
5235                 if test "$GCC" != yes; then
5236                         CC_SHARED_OPTS='-belf -KPIC'
5237                 fi
5238                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5239                 if test "$cf_cv_ld_rpath" = yes ; then
5240                         # only way is to set LD_RUN_PATH but no switch for it
5241                         RUN_PATH=$libdir
5242                 fi
5243                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5244                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5245                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5246                 ;;
5247         sunos4*)
5248                 # tested with SunOS 4.1.1 and gcc 2.7.0
5249                 if test "$GCC" != yes; then
5250                         CC_SHARED_OPTS='-KPIC'
5251                 fi
5252                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5253                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5254                 ;;
5255         solaris2*)
5256                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5257                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5258                 if test "$DFT_LWR_MODEL" = "shared" ; then
5259                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5260                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5261                 fi
5262                 if test "$cf_cv_ld_rpath" = yes ; then
5263                         cf_ld_rpath_opt="-R"
5264                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5265                 fi
5266
5267         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5268         if test "$cf_cv_shlib_version" = rel; then
5269                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5270         else
5271                 cf_cv_shared_soname='`basename $@`'
5272         fi
5273
5274                 if test "$GCC" != yes; then
5275                         CC_SHARED_OPTS='-xcode=pic32'
5276                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5277                 else
5278                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5279                 fi
5280                 ;;
5281         sysv5uw7*|unix_sv*)
5282                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5283                 if test "$GCC" != yes; then
5284                         CC_SHARED_OPTS='-KPIC'
5285                 fi
5286                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5287                 ;;
5288         *)
5289                 CC_SHARED_OPTS='unknown'
5290                 MK_SHARED_LIB='echo unknown'
5291                 ;;
5292         esac
5293
5294         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5295         case "$cf_cv_shlib_version" in #(vi
5296         rel|abi)
5297                 case "$MK_SHARED_LIB" in #(vi
5298                 *'-o $@')
5299                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5300                         ;;
5301                 *)
5302                         { echo "$as_me:5302: WARNING: ignored --with-shlib-version" >&5
5303 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5304                         ;;
5305                 esac
5306                 ;;
5307         esac
5308
5309         if test -n "$cf_ld_rpath_opt" ; then
5310                 echo "$as_me:5310: checking if we need a space after rpath option" >&5
5311 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5312                 cf_save_LIBS="$LIBS"
5313                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5314                 cat >conftest.$ac_ext <<_ACEOF
5315 #line 5315 "configure"
5316 #include "confdefs.h"
5317
5318 int
5319 main ()
5320 {
5321
5322   ;
5323   return 0;
5324 }
5325 _ACEOF
5326 rm -f conftest.$ac_objext conftest$ac_exeext
5327 if { (eval echo "$as_me:5327: \"$ac_link\"") >&5
5328   (eval $ac_link) 2>&5
5329   ac_status=$?
5330   echo "$as_me:5330: \$? = $ac_status" >&5
5331   (exit $ac_status); } &&
5332          { ac_try='test -s conftest$ac_exeext'
5333   { (eval echo "$as_me:5333: \"$ac_try\"") >&5
5334   (eval $ac_try) 2>&5
5335   ac_status=$?
5336   echo "$as_me:5336: \$? = $ac_status" >&5
5337   (exit $ac_status); }; }; then
5338   cf_rpath_space=no
5339 else
5340   echo "$as_me: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 cf_rpath_space=yes
5343 fi
5344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5345                 LIBS="$cf_save_LIBS"
5346                 echo "$as_me:5346: result: $cf_rpath_space" >&5
5347 echo "${ECHO_T}$cf_rpath_space" >&6
5348                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5349                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5350         fi
5351
5352 if test "$CC_SHARED_OPTS" = "unknown"; then
5353         for model in $cf_list_models; do
5354                 if test "$model" = "shared"; then
5355                         { { echo "$as_me:5355: error: Shared libraries are not supported in this version" >&5
5356 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5357    { (exit 1); exit 1; }; }
5358                 fi
5359         done
5360 fi
5361
5362 ###############################################################################
5363
5364 ###     use option --disable-overwrite to leave out the link to -lcurses
5365 echo "$as_me:5365: checking if you wish to install ncurses overwriting curses" >&5
5366 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5367
5368 # Check whether --enable-overwrite or --disable-overwrite was given.
5369 if test "${enable_overwrite+set}" = set; then
5370   enableval="$enable_overwrite"
5371   with_overwrite=$enableval
5372 else
5373   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5374 fi;
5375 echo "$as_me:5375: result: $with_overwrite" >&5
5376 echo "${ECHO_T}$with_overwrite" >&6
5377
5378 echo "$as_me:5378: checking if external terminfo-database is used" >&5
5379 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5380
5381 # Check whether --enable-database or --disable-database was given.
5382 if test "${enable_database+set}" = set; then
5383   enableval="$enable_database"
5384   use_database=$enableval
5385 else
5386   use_database=yes
5387 fi;
5388 echo "$as_me:5388: result: $use_database" >&5
5389 echo "${ECHO_T}$use_database" >&6
5390
5391 case $host_os in #(vi
5392 os2*) #(vi
5393         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5394         ;;
5395 *) #(vi
5396         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5397         ;;
5398 esac
5399
5400         case $cf_cv_system_name in
5401         os2*)   PATHSEP=';'  ;;
5402         *)      PATHSEP=':'  ;;
5403         esac
5404
5405 if test "$use_database" != no ; then
5406         cat >>confdefs.h <<\EOF
5407 #define USE_DATABASE 1
5408 EOF
5409
5410         echo "$as_me:5410: checking which terminfo source-file will be installed" >&5
5411 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5412
5413 # Check whether --enable-database or --disable-database was given.
5414 if test "${enable_database+set}" = set; then
5415   enableval="$enable_database"
5416   TERMINFO_SRC=$withval
5417 fi;
5418         echo "$as_me:5418: result: $TERMINFO_SRC" >&5
5419 echo "${ECHO_T}$TERMINFO_SRC" >&6
5420
5421         echo "$as_me:5421: checking whether to use hashed database instead of directory/tree" >&5
5422 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5423
5424 # Check whether --with-hashed-db or --without-hashed-db was given.
5425 if test "${with_hashed_db+set}" = set; then
5426   withval="$with_hashed_db"
5427
5428 else
5429   with_hashed_db=no
5430 fi;
5431         echo "$as_me:5431: result: $with_hashed_db" >&5
5432 echo "${ECHO_T}$with_hashed_db" >&6
5433 else
5434         with_hashed_db=no
5435 fi
5436
5437 echo "$as_me:5437: checking for list of fallback descriptions" >&5
5438 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5439
5440 # Check whether --with-fallbacks or --without-fallbacks was given.
5441 if test "${with_fallbacks+set}" = set; then
5442   withval="$with_fallbacks"
5443   with_fallback=$withval
5444 else
5445   with_fallback=
5446 fi;
5447 echo "$as_me:5447: result: $with_fallback" >&5
5448 echo "${ECHO_T}$with_fallback" >&6
5449 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5450
5451 echo "$as_me:5451: checking if you want modern xterm or antique" >&5
5452 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5453
5454 # Check whether --with-xterm-new or --without-xterm-new was given.
5455 if test "${with_xterm_new+set}" = set; then
5456   withval="$with_xterm_new"
5457   with_xterm_new=$withval
5458 else
5459   with_xterm_new=yes
5460 fi;
5461 case $with_xterm_new in
5462 no)     with_xterm_new=xterm-old;;
5463 *)      with_xterm_new=xterm-new;;
5464 esac
5465 echo "$as_me:5465: result: $with_xterm_new" >&5
5466 echo "${ECHO_T}$with_xterm_new" >&6
5467 WHICH_XTERM=$with_xterm_new
5468
5469 MAKE_TERMINFO=
5470 if test "$use_database" = no ; then
5471         TERMINFO="${datadir}/terminfo"
5472         MAKE_TERMINFO="#"
5473 else
5474
5475 echo "$as_me:5475: checking for list of terminfo directories" >&5
5476 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5477
5478 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5479 if test "${with_terminfo_dirs+set}" = set; then
5480   withval="$with_terminfo_dirs"
5481
5482 else
5483   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5484 fi;
5485 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5486 cf_dst_path=
5487 for cf_src_path in $withval
5488 do
5489
5490 if test "x$prefix" != xNONE; then
5491   cf_path_syntax="$prefix"
5492 else
5493   cf_path_syntax="$ac_default_prefix"
5494 fi
5495
5496 case ".$cf_src_path" in #(vi
5497 .\$\(*\)*|.\'*\'*) #(vi
5498   ;;
5499 ..|./*|.\\*) #(vi
5500   ;;
5501 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5502   ;;
5503 .\${*prefix}*) #(vi
5504   eval cf_src_path="$cf_src_path"
5505   case ".$cf_src_path" in #(vi
5506   .NONE/*)
5507     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5508     ;;
5509   esac
5510   ;; #(vi
5511 .no|.NONE/*)
5512   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5513   ;;
5514 *)
5515   { { echo "$as_me:5515: error: expected a pathname, not \"$cf_src_path\"" >&5
5516 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5517    { (exit 1); exit 1; }; }
5518   ;;
5519 esac
5520
5521   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5522   cf_dst_path="${cf_dst_path}${cf_src_path}"
5523 done
5524 IFS="$ac_save_ifs"
5525
5526 eval 'TERMINFO_DIRS="$cf_dst_path"'
5527
5528 echo "$as_me:5528: result: $TERMINFO_DIRS" >&5
5529 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5530 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5531 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5532 EOF
5533
5534 echo "$as_me:5534: checking for default terminfo directory" >&5
5535 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5536
5537 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5538 if test "${with_default_terminfo_dir+set}" = set; then
5539   withval="$with_default_terminfo_dir"
5540
5541 else
5542   withval="${TERMINFO-${datadir}/terminfo}"
5543 fi; if test -n "${datadir}/terminfo" ; then
5544
5545 if test "x$prefix" != xNONE; then
5546   cf_path_syntax="$prefix"
5547 else
5548   cf_path_syntax="$ac_default_prefix"
5549 fi
5550
5551 case ".$withval" in #(vi
5552 .\$\(*\)*|.\'*\'*) #(vi
5553   ;;
5554 ..|./*|.\\*) #(vi
5555   ;;
5556 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5557   ;;
5558 .\${*prefix}*) #(vi
5559   eval withval="$withval"
5560   case ".$withval" in #(vi
5561   .NONE/*)
5562     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5563     ;;
5564   esac
5565   ;; #(vi
5566 .no|.NONE/*)
5567   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5568   ;;
5569 *)
5570   { { echo "$as_me:5570: error: expected a pathname, not \"$withval\"" >&5
5571 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5572    { (exit 1); exit 1; }; }
5573   ;;
5574 esac
5575
5576 fi
5577 TERMINFO="$withval"
5578
5579 echo "$as_me:5579: result: $TERMINFO" >&5
5580 echo "${ECHO_T}$TERMINFO" >&6
5581 cat >>confdefs.h <<EOF
5582 #define TERMINFO "$TERMINFO"
5583 EOF
5584
5585 fi
5586
5587 ###     use option --disable-big-core to make tic run on small machines
5588 ###     We need 4Mb, check if we can allocate 50% more than that.
5589 echo "$as_me:5589: checking if big-core option selected" >&5
5590 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5591
5592 # Check whether --enable-big-core or --disable-big-core was given.
5593 if test "${enable_big_core+set}" = set; then
5594   enableval="$enable_big_core"
5595   with_big_core=$enableval
5596 else
5597   if test "$cross_compiling" = yes; then
5598   with_big_core=no
5599 else
5600   cat >conftest.$ac_ext <<_ACEOF
5601 #line 5601 "configure"
5602 #include "confdefs.h"
5603
5604 #include <stdlib.h>
5605 #include <string.h>
5606 int main() {
5607         unsigned long n = 6000000L;
5608         char *s = malloc(n);
5609         if (s != 0)
5610                 s[0] = s[n-1] = 0;
5611         ${cf_cv_main_return:-return}(s == 0);
5612 }
5613 _ACEOF
5614 rm -f conftest$ac_exeext
5615 if { (eval echo "$as_me:5615: \"$ac_link\"") >&5
5616   (eval $ac_link) 2>&5
5617   ac_status=$?
5618   echo "$as_me:5618: \$? = $ac_status" >&5
5619   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5620   { (eval echo "$as_me:5620: \"$ac_try\"") >&5
5621   (eval $ac_try) 2>&5
5622   ac_status=$?
5623   echo "$as_me:5623: \$? = $ac_status" >&5
5624   (exit $ac_status); }; }; then
5625   with_big_core=yes
5626 else
5627   echo "$as_me: program exited with status $ac_status" >&5
5628 echo "$as_me: failed program was:" >&5
5629 cat conftest.$ac_ext >&5
5630 with_big_core=no
5631 fi
5632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5633 fi
5634 fi;
5635 echo "$as_me:5635: result: $with_big_core" >&5
5636 echo "${ECHO_T}$with_big_core" >&6
5637 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5638 #define HAVE_BIG_CORE 1
5639 EOF
5640
5641 ### ISO C only guarantees 512-char strings, we have tables which load faster
5642 ### when constructed using "big" strings.  More than the C compiler, the awk
5643 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5644 echo "$as_me:5644: checking if big-strings option selected" >&5
5645 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5646
5647 # Check whether --enable-big-strings or --disable-big-strings was given.
5648 if test "${enable_big_strings+set}" = set; then
5649   enableval="$enable_big_strings"
5650   with_big_strings=$enableval
5651 else
5652
5653     case x$AWK in #(vi
5654     x)
5655         eval with_big_strings=no
5656         ;;
5657     *) #(vi
5658         if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5659             | $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
5660             eval with_big_strings=yes
5661         else
5662             eval with_big_strings=no
5663         fi
5664         ;;
5665     esac
5666
5667 fi;
5668 echo "$as_me:5668: result: $with_big_strings" >&5
5669 echo "${ECHO_T}$with_big_strings" >&6
5670
5671 USE_BIG_STRINGS=0
5672 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5673
5674 ###     use option --enable-termcap to compile in the termcap fallback support
5675 echo "$as_me:5675: checking if you want termcap-fallback support" >&5
5676 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5677
5678 # Check whether --enable-termcap or --disable-termcap was given.
5679 if test "${enable_termcap+set}" = set; then
5680   enableval="$enable_termcap"
5681   with_termcap=$enableval
5682 else
5683   with_termcap=no
5684 fi;
5685 echo "$as_me:5685: result: $with_termcap" >&5
5686 echo "${ECHO_T}$with_termcap" >&6
5687
5688 if test "$with_termcap" != "yes" ; then
5689         if test "$use_database" = no ; then
5690                 if test -z "$with_fallback" ; then
5691                         { { echo "$as_me:5691: error: You have disabled the database w/o specifying fallbacks" >&5
5692 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5693    { (exit 1); exit 1; }; }
5694                 fi
5695         fi
5696         cat >>confdefs.h <<\EOF
5697 #define PURE_TERMINFO 1
5698 EOF
5699
5700 else
5701
5702 if test "$with_ticlib" != no ; then
5703         { { echo "$as_me:5703: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5704 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5705    { (exit 1); exit 1; }; }
5706 fi
5707
5708 cat >>confdefs.h <<\EOF
5709 #define USE_TERMCAP 1
5710 EOF
5711
5712 echo "$as_me:5712: checking for list of termcap files" >&5
5713 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5714
5715 # Check whether --with-termpath or --without-termpath was given.
5716 if test "${with_termpath+set}" = set; then
5717   withval="$with_termpath"
5718
5719 else
5720   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5721 fi;
5722 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5723 cf_dst_path=
5724 for cf_src_path in $withval
5725 do
5726
5727 if test "x$prefix" != xNONE; then
5728   cf_path_syntax="$prefix"
5729 else
5730   cf_path_syntax="$ac_default_prefix"
5731 fi
5732
5733 case ".$cf_src_path" in #(vi
5734 .\$\(*\)*|.\'*\'*) #(vi
5735   ;;
5736 ..|./*|.\\*) #(vi
5737   ;;
5738 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5739   ;;
5740 .\${*prefix}*) #(vi
5741   eval cf_src_path="$cf_src_path"
5742   case ".$cf_src_path" in #(vi
5743   .NONE/*)
5744     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5745     ;;
5746   esac
5747   ;; #(vi
5748 .no|.NONE/*)
5749   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5750   ;;
5751 *)
5752   { { echo "$as_me:5752: error: expected a pathname, not \"$cf_src_path\"" >&5
5753 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5754    { (exit 1); exit 1; }; }
5755   ;;
5756 esac
5757
5758   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5759   cf_dst_path="${cf_dst_path}${cf_src_path}"
5760 done
5761 IFS="$ac_save_ifs"
5762
5763 eval 'TERMPATH="$cf_dst_path"'
5764
5765 echo "$as_me:5765: result: $TERMPATH" >&5
5766 echo "${ECHO_T}$TERMPATH" >&6
5767 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5768 #define TERMPATH "$TERMPATH"
5769 EOF
5770
5771 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5772 echo "$as_me:5772: checking if fast termcap-loader is needed" >&5
5773 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5774
5775 # Check whether --enable-getcap or --disable-getcap was given.
5776 if test "${enable_getcap+set}" = set; then
5777   enableval="$enable_getcap"
5778   with_getcap=$enableval
5779 else
5780   with_getcap=no
5781 fi;
5782 echo "$as_me:5782: result: $with_getcap" >&5
5783 echo "${ECHO_T}$with_getcap" >&6
5784 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5785 #define USE_GETCAP 1
5786 EOF
5787
5788 echo "$as_me:5788: checking if translated termcaps will be cached in ~/.terminfo" >&5
5789 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5790
5791 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5792 if test "${enable_getcap_cache+set}" = set; then
5793   enableval="$enable_getcap_cache"
5794   with_getcap_cache=$enableval
5795 else
5796   with_getcap_cache=no
5797 fi;
5798 echo "$as_me:5798: result: $with_getcap_cache" >&5
5799 echo "${ECHO_T}$with_getcap_cache" >&6
5800 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5801 #define USE_GETCAP_CACHE 1
5802 EOF
5803
5804 fi
5805
5806 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5807 echo "$as_me:5807: checking if ~/.terminfo is wanted" >&5
5808 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5809
5810 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5811 if test "${enable_home_terminfo+set}" = set; then
5812   enableval="$enable_home_terminfo"
5813   with_home_terminfo=$enableval
5814 else
5815   with_home_terminfo=yes
5816 fi;
5817 echo "$as_me:5817: result: $with_home_terminfo" >&5
5818 echo "${ECHO_T}$with_home_terminfo" >&6
5819 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5820 #define USE_HOME_TERMINFO 1
5821 EOF
5822
5823 echo "$as_me:5823: checking if you want to use restricted environment when running as root" >&5
5824 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5825
5826 # Check whether --enable-root-environ or --disable-root-environ was given.
5827 if test "${enable_root_environ+set}" = set; then
5828   enableval="$enable_root_environ"
5829   with_root_environ=$enableval
5830 else
5831   with_root_environ=yes
5832 fi;
5833 echo "$as_me:5833: result: $with_root_environ" >&5
5834 echo "${ECHO_T}$with_root_environ" >&6
5835 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5836 #define USE_ROOT_ENVIRON 1
5837 EOF
5838
5839 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5840 ###   to reduce storage requirements for the terminfo database.
5841
5842 for ac_func in \
5843         remove \
5844         unlink
5845 do
5846 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5847 echo "$as_me:5847: checking for $ac_func" >&5
5848 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5849 if eval "test \"\${$as_ac_var+set}\" = set"; then
5850   echo $ECHO_N "(cached) $ECHO_C" >&6
5851 else
5852   cat >conftest.$ac_ext <<_ACEOF
5853 #line 5853 "configure"
5854 #include "confdefs.h"
5855 /* System header to define __stub macros and hopefully few prototypes,
5856     which can conflict with char $ac_func (); below.  */
5857 #include <assert.h>
5858 /* Override any gcc2 internal prototype to avoid an error.  */
5859 #ifdef __cplusplus
5860 extern "C"
5861 #endif
5862 /* We use char because int might match the return type of a gcc2
5863    builtin and then its argument prototype would still apply.  */
5864 char $ac_func ();
5865 char (*f) ();
5866
5867 int
5868 main ()
5869 {
5870 /* The GNU C library defines this for functions which it implements
5871     to always fail with ENOSYS.  Some functions are actually named
5872     something starting with __ and the normal name is an alias.  */
5873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5874 choke me
5875 #else
5876 f = $ac_func;
5877 #endif
5878
5879   ;
5880   return 0;
5881 }
5882 _ACEOF
5883 rm -f conftest.$ac_objext conftest$ac_exeext
5884 if { (eval echo "$as_me:5884: \"$ac_link\"") >&5
5885   (eval $ac_link) 2>&5
5886   ac_status=$?
5887   echo "$as_me:5887: \$? = $ac_status" >&5
5888   (exit $ac_status); } &&
5889          { ac_try='test -s conftest$ac_exeext'
5890   { (eval echo "$as_me:5890: \"$ac_try\"") >&5
5891   (eval $ac_try) 2>&5
5892   ac_status=$?
5893   echo "$as_me:5893: \$? = $ac_status" >&5
5894   (exit $ac_status); }; }; then
5895   eval "$as_ac_var=yes"
5896 else
5897   echo "$as_me: failed program was:" >&5
5898 cat conftest.$ac_ext >&5
5899 eval "$as_ac_var=no"
5900 fi
5901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5902 fi
5903 echo "$as_me:5903: result: `eval echo '${'$as_ac_var'}'`" >&5
5904 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5905 if test `eval echo '${'$as_ac_var'}'` = yes; then
5906   cat >>confdefs.h <<EOF
5907 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5908 EOF
5909
5910 fi
5911 done
5912
5913 if test "$cross_compiling" = yes ; then
5914
5915 for ac_func in \
5916                 link \
5917                 symlink
5918 do
5919 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5920 echo "$as_me:5920: checking for $ac_func" >&5
5921 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5922 if eval "test \"\${$as_ac_var+set}\" = set"; then
5923   echo $ECHO_N "(cached) $ECHO_C" >&6
5924 else
5925   cat >conftest.$ac_ext <<_ACEOF
5926 #line 5926 "configure"
5927 #include "confdefs.h"
5928 /* System header to define __stub macros and hopefully few prototypes,
5929     which can conflict with char $ac_func (); below.  */
5930 #include <assert.h>
5931 /* Override any gcc2 internal prototype to avoid an error.  */
5932 #ifdef __cplusplus
5933 extern "C"
5934 #endif
5935 /* We use char because int might match the return type of a gcc2
5936    builtin and then its argument prototype would still apply.  */
5937 char $ac_func ();
5938 char (*f) ();
5939
5940 int
5941 main ()
5942 {
5943 /* The GNU C library defines this for functions which it implements
5944     to always fail with ENOSYS.  Some functions are actually named
5945     something starting with __ and the normal name is an alias.  */
5946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5947 choke me
5948 #else
5949 f = $ac_func;
5950 #endif
5951
5952   ;
5953   return 0;
5954 }
5955 _ACEOF
5956 rm -f conftest.$ac_objext conftest$ac_exeext
5957 if { (eval echo "$as_me:5957: \"$ac_link\"") >&5
5958   (eval $ac_link) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); } &&
5962          { ac_try='test -s conftest$ac_exeext'
5963   { (eval echo "$as_me:5963: \"$ac_try\"") >&5
5964   (eval $ac_try) 2>&5
5965   ac_status=$?
5966   echo "$as_me:5966: \$? = $ac_status" >&5
5967   (exit $ac_status); }; }; then
5968   eval "$as_ac_var=yes"
5969 else
5970   echo "$as_me: failed program was:" >&5
5971 cat conftest.$ac_ext >&5
5972 eval "$as_ac_var=no"
5973 fi
5974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5975 fi
5976 echo "$as_me:5976: result: `eval echo '${'$as_ac_var'}'`" >&5
5977 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5978 if test `eval echo '${'$as_ac_var'}'` = yes; then
5979   cat >>confdefs.h <<EOF
5980 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5981 EOF
5982
5983 fi
5984 done
5985
5986 else
5987         echo "$as_me:5987: checking if link/symlink functions work" >&5
5988 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5989 if test "${cf_cv_link_funcs+set}" = set; then
5990   echo $ECHO_N "(cached) $ECHO_C" >&6
5991 else
5992
5993                 cf_cv_link_funcs=
5994                 for cf_func in link symlink ; do
5995                         if test "$cross_compiling" = yes; then
5996
5997                         eval 'ac_cv_func_'$cf_func'=error'
5998 else
5999   cat >conftest.$ac_ext <<_ACEOF
6000 #line 6000 "configure"
6001 #include "confdefs.h"
6002
6003 #include <sys/types.h>
6004 #include <sys/stat.h>
6005 #ifdef HAVE_UNISTD_H
6006 #include <unistd.h>
6007 #endif
6008 int main()
6009 {
6010         int fail = 0;
6011         char *src = "config.log";
6012         char *dst = "conftest.chk";
6013         struct stat src_sb;
6014         struct stat dst_sb;
6015
6016         stat(src, &src_sb);
6017         fail = ($cf_func("config.log", "conftest.chk") < 0)
6018             || (stat(dst, &dst_sb) < 0)
6019             || (dst_sb.st_mtime != src_sb.st_mtime);
6020 #ifdef HAVE_UNLINK
6021         unlink(dst);
6022 #else
6023         remove(dst);
6024 #endif
6025         ${cf_cv_main_return:-return} (fail);
6026 }
6027
6028 _ACEOF
6029 rm -f conftest$ac_exeext
6030 if { (eval echo "$as_me:6030: \"$ac_link\"") >&5
6031   (eval $ac_link) 2>&5
6032   ac_status=$?
6033   echo "$as_me:6033: \$? = $ac_status" >&5
6034   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6035   { (eval echo "$as_me:6035: \"$ac_try\"") >&5
6036   (eval $ac_try) 2>&5
6037   ac_status=$?
6038   echo "$as_me:6038: \$? = $ac_status" >&5
6039   (exit $ac_status); }; }; then
6040
6041                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6042                         eval 'ac_cv_func_'$cf_func'=yes'
6043 else
6044   echo "$as_me: program exited with status $ac_status" >&5
6045 echo "$as_me: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047
6048                         eval 'ac_cv_func_'$cf_func'=no'
6049 fi
6050 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6051 fi
6052                 done
6053                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6054
6055 fi
6056 echo "$as_me:6056: result: $cf_cv_link_funcs" >&5
6057 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6058         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6059 #define HAVE_LINK 1
6060 EOF
6061
6062         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6063 #define HAVE_SYMLINK 1
6064 EOF
6065
6066 fi
6067
6068 with_links=no
6069 with_symlinks=no
6070
6071 # soft links (symbolic links) are useful for some systems where hard links do
6072 # not work, or to make it simpler to copy terminfo trees around.
6073 if test "$ac_cv_func_symlink" = yes ; then
6074     echo "$as_me:6074: checking if tic should use symbolic links" >&5
6075 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6076
6077 # Check whether --enable-symlinks or --disable-symlinks was given.
6078 if test "${enable_symlinks+set}" = set; then
6079   enableval="$enable_symlinks"
6080   with_symlinks=$enableval
6081 else
6082   with_symlinks=no
6083 fi;
6084     echo "$as_me:6084: result: $with_symlinks" >&5
6085 echo "${ECHO_T}$with_symlinks" >&6
6086 fi
6087
6088 # If we have hard links and did not choose to use soft links instead, there is
6089 # no reason to make this choice optional - use the hard links.
6090 if test "$with_symlinks" = no ; then
6091     echo "$as_me:6091: checking if tic should use hard links" >&5
6092 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6093     if test "$ac_cv_func_link" = yes ; then
6094         with_links=yes
6095     else
6096         with_links=no
6097     fi
6098     echo "$as_me:6098: result: $with_links" >&5
6099 echo "${ECHO_T}$with_links" >&6
6100 fi
6101
6102 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6103 #define USE_LINKS 1
6104 EOF
6105
6106 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6107 #define USE_SYMLINKS 1
6108 EOF
6109
6110 ###   use option --enable-broken-linker to force on use of broken-linker support
6111 echo "$as_me:6111: checking if you want broken-linker support code" >&5
6112 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6113
6114 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6115 if test "${enable_broken_linker+set}" = set; then
6116   enableval="$enable_broken_linker"
6117   with_broken_linker=$enableval
6118 else
6119   with_broken_linker=${BROKEN_LINKER-no}
6120 fi;
6121 echo "$as_me:6121: result: $with_broken_linker" >&5
6122 echo "${ECHO_T}$with_broken_linker" >&6
6123
6124 BROKEN_LINKER=0
6125 if test "$with_broken_linker" = yes ; then
6126         cat >>confdefs.h <<\EOF
6127 #define BROKEN_LINKER 1
6128 EOF
6129
6130         BROKEN_LINKER=1
6131 elif test "$DFT_LWR_MODEL" = shared ; then
6132         case $cf_cv_system_name in #(vi
6133         cygwin*)
6134                 cat >>confdefs.h <<\EOF
6135 #define BROKEN_LINKER 1
6136 EOF
6137
6138                 BROKEN_LINKER=1
6139                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6140
6141 echo "${as_me-configure}:6141: testing cygwin linker is broken anyway ..." 1>&5
6142
6143                 ;;
6144         esac
6145 fi
6146
6147 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6148 echo "$as_me:6148: checking if tputs should process BSD-style prefix padding" >&5
6149 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6150
6151 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6152 if test "${enable_bsdpad+set}" = set; then
6153   enableval="$enable_bsdpad"
6154   with_bsdpad=$enableval
6155 else
6156   with_bsdpad=no
6157 fi;
6158 echo "$as_me:6158: result: $with_bsdpad" >&5
6159 echo "${ECHO_T}$with_bsdpad" >&6
6160 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6161 #define BSD_TPUTS 1
6162 EOF
6163
6164 ###   use option --enable-widec to turn on use of wide-character support
6165 NCURSES_CH_T=chtype
6166 NCURSES_LIBUTF8=0
6167
6168 NEED_WCHAR_H=0
6169 NCURSES_MBSTATE_T=0
6170 NCURSES_WCHAR_T=0
6171 NCURSES_WINT_T=0
6172
6173 # Check to define _XOPEN_SOURCE "automatically"
6174
6175 echo "$as_me:6175: checking if $CC -U and -D options work together" >&5
6176 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6177 if test "${cf_cv_cc_u_d_options+set}" = set; then
6178   echo $ECHO_N "(cached) $ECHO_C" >&6
6179 else
6180
6181         cf_save_CPPFLAGS="$CPPFLAGS"
6182         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6183         cat >conftest.$ac_ext <<_ACEOF
6184 #line 6184 "configure"
6185 #include "confdefs.h"
6186
6187 int
6188 main ()
6189 {
6190
6191 #ifndef U_D_OPTIONS
6192 make an undefined-error
6193 #endif
6194 #ifdef  D_U_OPTIONS
6195 make a defined-error
6196 #endif
6197
6198   ;
6199   return 0;
6200 }
6201 _ACEOF
6202 rm -f conftest.$ac_objext
6203 if { (eval echo "$as_me:6203: \"$ac_compile\"") >&5
6204   (eval $ac_compile) 2>&5
6205   ac_status=$?
6206   echo "$as_me:6206: \$? = $ac_status" >&5
6207   (exit $ac_status); } &&
6208          { ac_try='test -s conftest.$ac_objext'
6209   { (eval echo "$as_me:6209: \"$ac_try\"") >&5
6210   (eval $ac_try) 2>&5
6211   ac_status=$?
6212   echo "$as_me:6212: \$? = $ac_status" >&5
6213   (exit $ac_status); }; }; then
6214
6215         cf_cv_cc_u_d_options=yes
6216 else
6217   echo "$as_me: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
6219
6220         cf_cv_cc_u_d_options=no
6221 fi
6222 rm -f conftest.$ac_objext conftest.$ac_ext
6223         CPPFLAGS="$cf_save_CPPFLAGS"
6224
6225 fi
6226 echo "$as_me:6226: result: $cf_cv_cc_u_d_options" >&5
6227 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6228
6229 cf_XOPEN_SOURCE=500
6230 cf_POSIX_C_SOURCE=199506L
6231
6232 case $host_os in #(vi
6233 aix[45]*) #(vi
6234         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6235         ;;
6236 freebsd*|dragonfly*) #(vi
6237         # 5.x headers associate
6238         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6239         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6240         cf_POSIX_C_SOURCE=200112L
6241         cf_XOPEN_SOURCE=600
6242         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6243         ;;
6244 hpux*) #(vi
6245         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6246         ;;
6247 irix[56].*) #(vi
6248         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6249         ;;
6250 linux*|gnu*|k*bsd*-gnu) #(vi
6251
6252 echo "$as_me:6252: checking if we must define _GNU_SOURCE" >&5
6253 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6254 if test "${cf_cv_gnu_source+set}" = set; then
6255   echo $ECHO_N "(cached) $ECHO_C" >&6
6256 else
6257
6258 cat >conftest.$ac_ext <<_ACEOF
6259 #line 6259 "configure"
6260 #include "confdefs.h"
6261 #include <sys/types.h>
6262 int
6263 main ()
6264 {
6265
6266 #ifndef _XOPEN_SOURCE
6267 make an error
6268 #endif
6269   ;
6270   return 0;
6271 }
6272 _ACEOF
6273 rm -f conftest.$ac_objext
6274 if { (eval echo "$as_me:6274: \"$ac_compile\"") >&5
6275   (eval $ac_compile) 2>&5
6276   ac_status=$?
6277   echo "$as_me:6277: \$? = $ac_status" >&5
6278   (exit $ac_status); } &&
6279          { ac_try='test -s conftest.$ac_objext'
6280   { (eval echo "$as_me:6280: \"$ac_try\"") >&5
6281   (eval $ac_try) 2>&5
6282   ac_status=$?
6283   echo "$as_me:6283: \$? = $ac_status" >&5
6284   (exit $ac_status); }; }; then
6285   cf_cv_gnu_source=no
6286 else
6287   echo "$as_me: failed program was:" >&5
6288 cat conftest.$ac_ext >&5
6289 cf_save="$CPPFLAGS"
6290          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6291          cat >conftest.$ac_ext <<_ACEOF
6292 #line 6292 "configure"
6293 #include "confdefs.h"
6294 #include <sys/types.h>
6295 int
6296 main ()
6297 {
6298
6299 #ifdef _XOPEN_SOURCE
6300 make an error
6301 #endif
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 rm -f conftest.$ac_objext
6307 if { (eval echo "$as_me:6307: \"$ac_compile\"") >&5
6308   (eval $ac_compile) 2>&5
6309   ac_status=$?
6310   echo "$as_me:6310: \$? = $ac_status" >&5
6311   (exit $ac_status); } &&
6312          { ac_try='test -s conftest.$ac_objext'
6313   { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6314   (eval $ac_try) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); }; }; then
6318   cf_cv_gnu_source=no
6319 else
6320   echo "$as_me: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6322 cf_cv_gnu_source=yes
6323 fi
6324 rm -f conftest.$ac_objext conftest.$ac_ext
6325         CPPFLAGS="$cf_save"
6326
6327 fi
6328 rm -f conftest.$ac_objext conftest.$ac_ext
6329
6330 fi
6331 echo "$as_me:6331: result: $cf_cv_gnu_source" >&5
6332 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6333 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6334
6335         ;;
6336 mirbsd*) #(vi
6337         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6338         ;;
6339 netbsd*) #(vi
6340         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6341         ;;
6342 openbsd*) #(vi
6343         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6344         ;;
6345 osf[45]*) #(vi
6346         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6347         ;;
6348 nto-qnx*) #(vi
6349         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6350         ;;
6351 sco*) #(vi
6352         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6353         ;;
6354 solaris*) #(vi
6355         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6356         ;;
6357 *)
6358         echo "$as_me:6358: checking if we should define _XOPEN_SOURCE" >&5
6359 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6360 if test "${cf_cv_xopen_source+set}" = set; then
6361   echo $ECHO_N "(cached) $ECHO_C" >&6
6362 else
6363
6364         cat >conftest.$ac_ext <<_ACEOF
6365 #line 6365 "configure"
6366 #include "confdefs.h"
6367 #include <sys/types.h>
6368 int
6369 main ()
6370 {
6371
6372 #ifndef _XOPEN_SOURCE
6373 make an error
6374 #endif
6375   ;
6376   return 0;
6377 }
6378 _ACEOF
6379 rm -f conftest.$ac_objext
6380 if { (eval echo "$as_me:6380: \"$ac_compile\"") >&5
6381   (eval $ac_compile) 2>&5
6382   ac_status=$?
6383   echo "$as_me:6383: \$? = $ac_status" >&5
6384   (exit $ac_status); } &&
6385          { ac_try='test -s conftest.$ac_objext'
6386   { (eval echo "$as_me:6386: \"$ac_try\"") >&5
6387   (eval $ac_try) 2>&5
6388   ac_status=$?
6389   echo "$as_me:6389: \$? = $ac_status" >&5
6390   (exit $ac_status); }; }; then
6391   cf_cv_xopen_source=no
6392 else
6393   echo "$as_me: failed program was:" >&5
6394 cat conftest.$ac_ext >&5
6395 cf_save="$CPPFLAGS"
6396          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6397          cat >conftest.$ac_ext <<_ACEOF
6398 #line 6398 "configure"
6399 #include "confdefs.h"
6400 #include <sys/types.h>
6401 int
6402 main ()
6403 {
6404
6405 #ifdef _XOPEN_SOURCE
6406 make an error
6407 #endif
6408   ;
6409   return 0;
6410 }
6411 _ACEOF
6412 rm -f conftest.$ac_objext
6413 if { (eval echo "$as_me:6413: \"$ac_compile\"") >&5
6414   (eval $ac_compile) 2>&5
6415   ac_status=$?
6416   echo "$as_me:6416: \$? = $ac_status" >&5
6417   (exit $ac_status); } &&
6418          { ac_try='test -s conftest.$ac_objext'
6419   { (eval echo "$as_me:6419: \"$ac_try\"") >&5
6420   (eval $ac_try) 2>&5
6421   ac_status=$?
6422   echo "$as_me:6422: \$? = $ac_status" >&5
6423   (exit $ac_status); }; }; then
6424   cf_cv_xopen_source=no
6425 else
6426   echo "$as_me: failed program was:" >&5
6427 cat conftest.$ac_ext >&5
6428 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6429 fi
6430 rm -f conftest.$ac_objext conftest.$ac_ext
6431         CPPFLAGS="$cf_save"
6432
6433 fi
6434 rm -f conftest.$ac_objext conftest.$ac_ext
6435
6436 fi
6437 echo "$as_me:6437: result: $cf_cv_xopen_source" >&5
6438 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6439         if test "$cf_cv_xopen_source" != no ; then
6440
6441 # remove _XOPEN_SOURCE symbol from $CFLAGS
6442 CFLAGS=`echo "$CFLAGS" | \
6443         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6444                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6445
6446 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6447 CPPFLAGS=`echo "$CPPFLAGS" | \
6448         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6449                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6450
6451                 test "$cf_cv_cc_u_d_options" = yes && \
6452                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6453                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6454         fi
6455
6456 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6457
6458 cf_save_CFLAGS="$CFLAGS"
6459 cf_save_CPPFLAGS="$CPPFLAGS"
6460
6461 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6462 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6463         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6464                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6465
6466 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6467 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6468         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6469                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6470
6471 echo "$as_me:6471: checking if we should define _POSIX_C_SOURCE" >&5
6472 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6473 if test "${cf_cv_posix_c_source+set}" = set; then
6474   echo $ECHO_N "(cached) $ECHO_C" >&6
6475 else
6476
6477 echo "${as_me-configure}:6477: testing if the symbol is already defined go no further ..." 1>&5
6478
6479         cat >conftest.$ac_ext <<_ACEOF
6480 #line 6480 "configure"
6481 #include "confdefs.h"
6482 #include <sys/types.h>
6483 int
6484 main ()
6485 {
6486
6487 #ifndef _POSIX_C_SOURCE
6488 make an error
6489 #endif
6490   ;
6491   return 0;
6492 }
6493 _ACEOF
6494 rm -f conftest.$ac_objext
6495 if { (eval echo "$as_me:6495: \"$ac_compile\"") >&5
6496   (eval $ac_compile) 2>&5
6497   ac_status=$?
6498   echo "$as_me:6498: \$? = $ac_status" >&5
6499   (exit $ac_status); } &&
6500          { ac_try='test -s conftest.$ac_objext'
6501   { (eval echo "$as_me:6501: \"$ac_try\"") >&5
6502   (eval $ac_try) 2>&5
6503   ac_status=$?
6504   echo "$as_me:6504: \$? = $ac_status" >&5
6505   (exit $ac_status); }; }; then
6506   cf_cv_posix_c_source=no
6507 else
6508   echo "$as_me: failed program was:" >&5
6509 cat conftest.$ac_ext >&5
6510 cf_want_posix_source=no
6511          case .$cf_POSIX_C_SOURCE in #(vi
6512          .[12]??*) #(vi
6513                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6514                 ;;
6515          .2) #(vi
6516                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6517                 cf_want_posix_source=yes
6518                 ;;
6519          .*)
6520                 cf_want_posix_source=yes
6521                 ;;
6522          esac
6523          if test "$cf_want_posix_source" = yes ; then
6524                 cat >conftest.$ac_ext <<_ACEOF
6525 #line 6525 "configure"
6526 #include "confdefs.h"
6527 #include <sys/types.h>
6528 int
6529 main ()
6530 {
6531
6532 #ifdef _POSIX_SOURCE
6533 make an error
6534 #endif
6535   ;
6536   return 0;
6537 }
6538 _ACEOF
6539 rm -f conftest.$ac_objext
6540 if { (eval echo "$as_me:6540: \"$ac_compile\"") >&5
6541   (eval $ac_compile) 2>&5
6542   ac_status=$?
6543   echo "$as_me:6543: \$? = $ac_status" >&5
6544   (exit $ac_status); } &&
6545          { ac_try='test -s conftest.$ac_objext'
6546   { (eval echo "$as_me:6546: \"$ac_try\"") >&5
6547   (eval $ac_try) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); }; }; then
6551   :
6552 else
6553   echo "$as_me: failed program was:" >&5
6554 cat conftest.$ac_ext >&5
6555 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6556 fi
6557 rm -f conftest.$ac_objext conftest.$ac_ext
6558          fi
6559
6560 echo "${as_me-configure}:6560: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6561
6562          CFLAGS="$cf_trim_CFLAGS"
6563          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6564
6565 echo "${as_me-configure}:6565: testing if the second compile does not leave our definition intact error ..." 1>&5
6566
6567          cat >conftest.$ac_ext <<_ACEOF
6568 #line 6568 "configure"
6569 #include "confdefs.h"
6570 #include <sys/types.h>
6571 int
6572 main ()
6573 {
6574
6575 #ifndef _POSIX_C_SOURCE
6576 make an error
6577 #endif
6578   ;
6579   return 0;
6580 }
6581 _ACEOF
6582 rm -f conftest.$ac_objext
6583 if { (eval echo "$as_me:6583: \"$ac_compile\"") >&5
6584   (eval $ac_compile) 2>&5
6585   ac_status=$?
6586   echo "$as_me:6586: \$? = $ac_status" >&5
6587   (exit $ac_status); } &&
6588          { ac_try='test -s conftest.$ac_objext'
6589   { (eval echo "$as_me:6589: \"$ac_try\"") >&5
6590   (eval $ac_try) 2>&5
6591   ac_status=$?
6592   echo "$as_me:6592: \$? = $ac_status" >&5
6593   (exit $ac_status); }; }; then
6594   :
6595 else
6596   echo "$as_me: failed program was:" >&5
6597 cat conftest.$ac_ext >&5
6598 cf_cv_posix_c_source=no
6599 fi
6600 rm -f conftest.$ac_objext conftest.$ac_ext
6601          CFLAGS="$cf_save_CFLAGS"
6602          CPPFLAGS="$cf_save_CPPFLAGS"
6603
6604 fi
6605 rm -f conftest.$ac_objext conftest.$ac_ext
6606
6607 fi
6608 echo "$as_me:6608: result: $cf_cv_posix_c_source" >&5
6609 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6610
6611 if test "$cf_cv_posix_c_source" != no ; then
6612         CFLAGS="$cf_trim_CFLAGS"
6613         CPPFLAGS="$cf_trim_CPPFLAGS"
6614         if test "$cf_cv_cc_u_d_options" = yes ; then
6615                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6616                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6617                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6618         fi
6619         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6620 fi
6621
6622         ;;
6623 esac
6624
6625 # Work around breakage on OS X
6626
6627 echo "$as_me:6627: checking if SIGWINCH is defined" >&5
6628 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6629 if test "${cf_cv_define_sigwinch+set}" = set; then
6630   echo $ECHO_N "(cached) $ECHO_C" >&6
6631 else
6632
6633         cat >conftest.$ac_ext <<_ACEOF
6634 #line 6634 "configure"
6635 #include "confdefs.h"
6636
6637 #include <sys/types.h>
6638 #include <sys/signal.h>
6639
6640 int
6641 main ()
6642 {
6643 int x = SIGWINCH
6644   ;
6645   return 0;
6646 }
6647 _ACEOF
6648 rm -f conftest.$ac_objext
6649 if { (eval echo "$as_me:6649: \"$ac_compile\"") >&5
6650   (eval $ac_compile) 2>&5
6651   ac_status=$?
6652   echo "$as_me:6652: \$? = $ac_status" >&5
6653   (exit $ac_status); } &&
6654          { ac_try='test -s conftest.$ac_objext'
6655   { (eval echo "$as_me:6655: \"$ac_try\"") >&5
6656   (eval $ac_try) 2>&5
6657   ac_status=$?
6658   echo "$as_me:6658: \$? = $ac_status" >&5
6659   (exit $ac_status); }; }; then
6660   cf_cv_define_sigwinch=yes
6661 else
6662   echo "$as_me: failed program was:" >&5
6663 cat conftest.$ac_ext >&5
6664 cat >conftest.$ac_ext <<_ACEOF
6665 #line 6665 "configure"
6666 #include "confdefs.h"
6667
6668 #undef _XOPEN_SOURCE
6669 #undef _POSIX_SOURCE
6670 #undef _POSIX_C_SOURCE
6671 #include <sys/types.h>
6672 #include <sys/signal.h>
6673
6674 int
6675 main ()
6676 {
6677 int x = SIGWINCH
6678   ;
6679   return 0;
6680 }
6681 _ACEOF
6682 rm -f conftest.$ac_objext
6683 if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5
6684   (eval $ac_compile) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); } &&
6688          { ac_try='test -s conftest.$ac_objext'
6689   { (eval echo "$as_me:6689: \"$ac_try\"") >&5
6690   (eval $ac_try) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); }; }; then
6694   cf_cv_define_sigwinch=maybe
6695 else
6696   echo "$as_me: failed program was:" >&5
6697 cat conftest.$ac_ext >&5
6698 cf_cv_define_sigwinch=no
6699 fi
6700 rm -f conftest.$ac_objext conftest.$ac_ext
6701
6702 fi
6703 rm -f conftest.$ac_objext conftest.$ac_ext
6704
6705 fi
6706 echo "$as_me:6706: result: $cf_cv_define_sigwinch" >&5
6707 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6708
6709 if test "$cf_cv_define_sigwinch" = maybe ; then
6710 echo "$as_me:6710: checking for actual SIGWINCH definition" >&5
6711 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6712 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6713   echo $ECHO_N "(cached) $ECHO_C" >&6
6714 else
6715
6716 cf_cv_fixup_sigwinch=unknown
6717 cf_sigwinch=32
6718 while test $cf_sigwinch != 1
6719 do
6720         cat >conftest.$ac_ext <<_ACEOF
6721 #line 6721 "configure"
6722 #include "confdefs.h"
6723
6724 #undef _XOPEN_SOURCE
6725 #undef _POSIX_SOURCE
6726 #undef _POSIX_C_SOURCE
6727 #include <sys/types.h>
6728 #include <sys/signal.h>
6729
6730 int
6731 main ()
6732 {
6733
6734 #if SIGWINCH != $cf_sigwinch
6735 make an error
6736 #endif
6737 int x = SIGWINCH
6738   ;
6739   return 0;
6740 }
6741 _ACEOF
6742 rm -f conftest.$ac_objext
6743 if { (eval echo "$as_me:6743: \"$ac_compile\"") >&5
6744   (eval $ac_compile) 2>&5
6745   ac_status=$?
6746   echo "$as_me:6746: \$? = $ac_status" >&5
6747   (exit $ac_status); } &&
6748          { ac_try='test -s conftest.$ac_objext'
6749   { (eval echo "$as_me:6749: \"$ac_try\"") >&5
6750   (eval $ac_try) 2>&5
6751   ac_status=$?
6752   echo "$as_me:6752: \$? = $ac_status" >&5
6753   (exit $ac_status); }; }; then
6754   cf_cv_fixup_sigwinch=$cf_sigwinch
6755          break
6756 else
6757   echo "$as_me: failed program was:" >&5
6758 cat conftest.$ac_ext >&5
6759 fi
6760 rm -f conftest.$ac_objext conftest.$ac_ext
6761
6762 cf_sigwinch=`expr $cf_sigwinch - 1`
6763 done
6764
6765 fi
6766 echo "$as_me:6766: result: $cf_cv_fixup_sigwinch" >&5
6767 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6768
6769         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6770                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6771         fi
6772 fi
6773
6774 # Checks for CODESET support.
6775
6776   echo "$as_me:6776: checking for nl_langinfo and CODESET" >&5
6777 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6778 if test "${am_cv_langinfo_codeset+set}" = set; then
6779   echo $ECHO_N "(cached) $ECHO_C" >&6
6780 else
6781   cat >conftest.$ac_ext <<_ACEOF
6782 #line 6782 "configure"
6783 #include "confdefs.h"
6784 #include <langinfo.h>
6785 int
6786 main ()
6787 {
6788 char* cs = nl_langinfo(CODESET);
6789   ;
6790   return 0;
6791 }
6792 _ACEOF
6793 rm -f conftest.$ac_objext conftest$ac_exeext
6794 if { (eval echo "$as_me:6794: \"$ac_link\"") >&5
6795   (eval $ac_link) 2>&5
6796   ac_status=$?
6797   echo "$as_me:6797: \$? = $ac_status" >&5
6798   (exit $ac_status); } &&
6799          { ac_try='test -s conftest$ac_exeext'
6800   { (eval echo "$as_me:6800: \"$ac_try\"") >&5
6801   (eval $ac_try) 2>&5
6802   ac_status=$?
6803   echo "$as_me:6803: \$? = $ac_status" >&5
6804   (exit $ac_status); }; }; then
6805   am_cv_langinfo_codeset=yes
6806 else
6807   echo "$as_me: failed program was:" >&5
6808 cat conftest.$ac_ext >&5
6809 am_cv_langinfo_codeset=no
6810 fi
6811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6812
6813 fi
6814 echo "$as_me:6814: result: $am_cv_langinfo_codeset" >&5
6815 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6816   if test $am_cv_langinfo_codeset = yes; then
6817
6818 cat >>confdefs.h <<\EOF
6819 #define HAVE_LANGINFO_CODESET 1
6820 EOF
6821
6822   fi
6823
6824 # use these variables to work around a defect in gcc's fixincludes.
6825 NCURSES_OK_WCHAR_T=
6826 NCURSES_OK_WINT_T=
6827
6828 echo "$as_me:6828: checking if you want wide-character code" >&5
6829 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6830
6831 # Check whether --enable-widec or --disable-widec was given.
6832 if test "${enable_widec+set}" = set; then
6833   enableval="$enable_widec"
6834   with_widec=$enableval
6835 else
6836   with_widec=no
6837 fi;
6838 echo "$as_me:6838: result: $with_widec" >&5
6839 echo "${ECHO_T}$with_widec" >&6
6840 if test "$with_widec" = yes ; then
6841         LIB_SUFFIX="w${LIB_SUFFIX}"
6842         cat >>confdefs.h <<\EOF
6843 #define USE_WIDEC_SUPPORT 1
6844 EOF
6845
6846 echo "$as_me:6846: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6847 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6848 cat >conftest.$ac_ext <<_ACEOF
6849 #line 6849 "configure"
6850 #include "confdefs.h"
6851 #include <sys/types.h>
6852
6853 int
6854 main ()
6855 {
6856
6857 #ifndef _XOPEN_SOURCE_EXTENDED
6858 make an error
6859 #endif
6860   ;
6861   return 0;
6862 }
6863 _ACEOF
6864 rm -f conftest.$ac_objext
6865 if { (eval echo "$as_me:6865: \"$ac_compile\"") >&5
6866   (eval $ac_compile) 2>&5
6867   ac_status=$?
6868   echo "$as_me:6868: \$? = $ac_status" >&5
6869   (exit $ac_status); } &&
6870          { ac_try='test -s conftest.$ac_objext'
6871   { (eval echo "$as_me:6871: \"$ac_try\"") >&5
6872   (eval $ac_try) 2>&5
6873   ac_status=$?
6874   echo "$as_me:6874: \$? = $ac_status" >&5
6875   (exit $ac_status); }; }; then
6876   cf_result=no
6877 else
6878   echo "$as_me: failed program was:" >&5
6879 cat conftest.$ac_ext >&5
6880 cf_result=yes
6881 fi
6882 rm -f conftest.$ac_objext conftest.$ac_ext
6883 echo "$as_me:6883: result: $cf_result" >&5
6884 echo "${ECHO_T}$cf_result" >&6
6885
6886 if test "$cf_result" = yes ; then
6887         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6888 elif test "x" != "x" ; then
6889         echo "$as_me:6889: checking checking for compatible value versus " >&5
6890 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6891         cat >conftest.$ac_ext <<_ACEOF
6892 #line 6892 "configure"
6893 #include "confdefs.h"
6894 #include <sys/types.h>
6895
6896 int
6897 main ()
6898 {
6899
6900 #if _XOPEN_SOURCE_EXTENDED- < 0
6901 make an error
6902 #endif
6903   ;
6904   return 0;
6905 }
6906 _ACEOF
6907 rm -f conftest.$ac_objext
6908 if { (eval echo "$as_me:6908: \"$ac_compile\"") >&5
6909   (eval $ac_compile) 2>&5
6910   ac_status=$?
6911   echo "$as_me:6911: \$? = $ac_status" >&5
6912   (exit $ac_status); } &&
6913          { ac_try='test -s conftest.$ac_objext'
6914   { (eval echo "$as_me:6914: \"$ac_try\"") >&5
6915   (eval $ac_try) 2>&5
6916   ac_status=$?
6917   echo "$as_me:6917: \$? = $ac_status" >&5
6918   (exit $ac_status); }; }; then
6919   cf_result=yes
6920 else
6921   echo "$as_me: failed program was:" >&5
6922 cat conftest.$ac_ext >&5
6923 cf_result=no
6924 fi
6925 rm -f conftest.$ac_objext conftest.$ac_ext
6926         echo "$as_me:6926: result: $cf_result" >&5
6927 echo "${ECHO_T}$cf_result" >&6
6928         if test "$cf_result" = no ; then
6929                 # perhaps we can override it - try...
6930                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6931         fi
6932 fi
6933
6934         # with_overwrite=no
6935         NCURSES_CH_T=cchar_t
6936
6937 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
6938 do
6939 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6940 echo "$as_me:6940: checking for $ac_func" >&5
6941 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6942 if eval "test \"\${$as_ac_var+set}\" = set"; then
6943   echo $ECHO_N "(cached) $ECHO_C" >&6
6944 else
6945   cat >conftest.$ac_ext <<_ACEOF
6946 #line 6946 "configure"
6947 #include "confdefs.h"
6948 /* System header to define __stub macros and hopefully few prototypes,
6949     which can conflict with char $ac_func (); below.  */
6950 #include <assert.h>
6951 /* Override any gcc2 internal prototype to avoid an error.  */
6952 #ifdef __cplusplus
6953 extern "C"
6954 #endif
6955 /* We use char because int might match the return type of a gcc2
6956    builtin and then its argument prototype would still apply.  */
6957 char $ac_func ();
6958 char (*f) ();
6959
6960 int
6961 main ()
6962 {
6963 /* The GNU C library defines this for functions which it implements
6964     to always fail with ENOSYS.  Some functions are actually named
6965     something starting with __ and the normal name is an alias.  */
6966 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6967 choke me
6968 #else
6969 f = $ac_func;
6970 #endif
6971
6972   ;
6973   return 0;
6974 }
6975 _ACEOF
6976 rm -f conftest.$ac_objext conftest$ac_exeext
6977 if { (eval echo "$as_me:6977: \"$ac_link\"") >&5
6978   (eval $ac_link) 2>&5
6979   ac_status=$?
6980   echo "$as_me:6980: \$? = $ac_status" >&5
6981   (exit $ac_status); } &&
6982          { ac_try='test -s conftest$ac_exeext'
6983   { (eval echo "$as_me:6983: \"$ac_try\"") >&5
6984   (eval $ac_try) 2>&5
6985   ac_status=$?
6986   echo "$as_me:6986: \$? = $ac_status" >&5
6987   (exit $ac_status); }; }; then
6988   eval "$as_ac_var=yes"
6989 else
6990   echo "$as_me: failed program was:" >&5
6991 cat conftest.$ac_ext >&5
6992 eval "$as_ac_var=no"
6993 fi
6994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6995 fi
6996 echo "$as_me:6996: result: `eval echo '${'$as_ac_var'}'`" >&5
6997 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6998 if test `eval echo '${'$as_ac_var'}'` = yes; then
6999   cat >>confdefs.h <<EOF
7000 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7001 EOF
7002
7003 fi
7004 done
7005
7006         if test "$ac_cv_func_putwc" != yes ; then
7007
7008 echo "$as_me:7008: checking for multibyte character support" >&5
7009 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7010 if test "${cf_cv_utf8_lib+set}" = set; then
7011   echo $ECHO_N "(cached) $ECHO_C" >&6
7012 else
7013
7014         cf_save_LIBS="$LIBS"
7015         cat >conftest.$ac_ext <<_ACEOF
7016 #line 7016 "configure"
7017 #include "confdefs.h"
7018
7019 #include <stdlib.h>
7020 int
7021 main ()
7022 {
7023 putwc(0,0);
7024   ;
7025   return 0;
7026 }
7027 _ACEOF
7028 rm -f conftest.$ac_objext conftest$ac_exeext
7029 if { (eval echo "$as_me:7029: \"$ac_link\"") >&5
7030   (eval $ac_link) 2>&5
7031   ac_status=$?
7032   echo "$as_me:7032: \$? = $ac_status" >&5
7033   (exit $ac_status); } &&
7034          { ac_try='test -s conftest$ac_exeext'
7035   { (eval echo "$as_me:7035: \"$ac_try\"") >&5
7036   (eval $ac_try) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); }; }; then
7040   cf_cv_utf8_lib=yes
7041 else
7042   echo "$as_me: failed program was:" >&5
7043 cat conftest.$ac_ext >&5
7044
7045 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7046 # will be set on completion of the AC_TRY_LINK below.
7047 cf_cv_header_path_utf8=
7048 cf_cv_library_path_utf8=
7049
7050 echo "${as_me-configure}:7050: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7051
7052 cat >conftest.$ac_ext <<_ACEOF
7053 #line 7053 "configure"
7054 #include "confdefs.h"
7055
7056 #include <libutf8.h>
7057 int
7058 main ()
7059 {
7060 putwc(0,0);
7061   ;
7062   return 0;
7063 }
7064 _ACEOF
7065 rm -f conftest.$ac_objext conftest$ac_exeext
7066 if { (eval echo "$as_me:7066: \"$ac_link\"") >&5
7067   (eval $ac_link) 2>&5
7068   ac_status=$?
7069   echo "$as_me:7069: \$? = $ac_status" >&5
7070   (exit $ac_status); } &&
7071          { ac_try='test -s conftest$ac_exeext'
7072   { (eval echo "$as_me:7072: \"$ac_try\"") >&5
7073   (eval $ac_try) 2>&5
7074   ac_status=$?
7075   echo "$as_me:7075: \$? = $ac_status" >&5
7076   (exit $ac_status); }; }; then
7077   cf_cv_find_linkage_utf8=yes
7078 else
7079   echo "$as_me: failed program was:" >&5
7080 cat conftest.$ac_ext >&5
7081
7082     cf_cv_find_linkage_utf8=no
7083
7084 echo "${as_me-configure}:7084: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7085
7086     cf_save_CPPFLAGS="$CPPFLAGS"
7087     cf_test_CPPFLAGS="$CPPFLAGS"
7088
7089     cf_search=""
7090
7091 test "/usr" != "$prefix" && \
7092 test -d "/usr" && \
7093 (test $prefix = NONE || test -d $prefix) && {
7094         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7095         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7096         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7097         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7098         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7099         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7100 }
7101
7102 test "$prefix" != "NONE" && \
7103 test -d "$prefix" && \
7104  {
7105         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7106         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7107         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7108         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7109         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7110         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7111 }
7112
7113 test "/usr/local" != "$prefix" && \
7114 test -d "/usr/local" && \
7115 (test $prefix = NONE || test -d $prefix) && {
7116         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7117         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7118         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7119         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7120         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7121         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7122 }
7123
7124 test "/opt" != "$prefix" && \
7125 test -d "/opt" && \
7126 (test $prefix = NONE || test -d $prefix) && {
7127         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7128         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7129         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7130         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7131         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7132         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7133 }
7134
7135 test "$HOME" != "$prefix" && \
7136 test -d "$HOME" && \
7137 (test $prefix = NONE || test -d $prefix) && {
7138         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7139         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7140         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7141         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7142         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7143         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7144 }
7145
7146 test "$includedir" != NONE && \
7147 test "$includedir" != "/usr/include" && \
7148 test -d "$includedir" && {
7149         test -d $includedir &&    cf_search="$cf_search $includedir"
7150         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7151 }
7152
7153 test "$oldincludedir" != NONE && \
7154 test "$oldincludedir" != "/usr/include" && \
7155 test -d "$oldincludedir" && {
7156         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7157         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7158 }
7159
7160     for cf_cv_header_path_utf8 in $cf_search
7161     do
7162       if test -d $cf_cv_header_path_utf8 ; then
7163         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7164
7165 echo "${as_me-configure}:7165: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7166
7167         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7168         cat >conftest.$ac_ext <<_ACEOF
7169 #line 7169 "configure"
7170 #include "confdefs.h"
7171
7172 #include <libutf8.h>
7173 int
7174 main ()
7175 {
7176 putwc(0,0);
7177   ;
7178   return 0;
7179 }
7180 _ACEOF
7181 rm -f conftest.$ac_objext
7182 if { (eval echo "$as_me:7182: \"$ac_compile\"") >&5
7183   (eval $ac_compile) 2>&5
7184   ac_status=$?
7185   echo "$as_me:7185: \$? = $ac_status" >&5
7186   (exit $ac_status); } &&
7187          { ac_try='test -s conftest.$ac_objext'
7188   { (eval echo "$as_me:7188: \"$ac_try\"") >&5
7189   (eval $ac_try) 2>&5
7190   ac_status=$?
7191   echo "$as_me:7191: \$? = $ac_status" >&5
7192   (exit $ac_status); }; }; then
7193
7194             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7195
7196 echo "${as_me-configure}:7196: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7197
7198             cf_cv_find_linkage_utf8=maybe
7199             cf_test_CPPFLAGS="$CPPFLAGS"
7200             break
7201 else
7202   echo "$as_me: failed program was:" >&5
7203 cat conftest.$ac_ext >&5
7204
7205             CPPFLAGS="$cf_save_CPPFLAGS"
7206
7207 fi
7208 rm -f conftest.$ac_objext conftest.$ac_ext
7209       fi
7210     done
7211
7212     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7213
7214 echo "${as_me-configure}:7214: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7215
7216       cf_save_LIBS="$LIBS"
7217       cf_save_LDFLAGS="$LDFLAGS"
7218
7219       if test "$cf_cv_find_linkage_utf8" != yes ; then
7220         cf_search=""
7221
7222 test "/usr" != "$prefix" && \
7223 test -d "/usr" && \
7224 (test $prefix = NONE || test -d $prefix) && {
7225         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7226         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7227         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7228         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7229         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7230         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7231 }
7232
7233 test "$prefix" != "NONE" && \
7234 test -d "$prefix" && \
7235  {
7236         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7237         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7238         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7239         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7240         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7241         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7242 }
7243
7244 test "/usr/local" != "$prefix" && \
7245 test -d "/usr/local" && \
7246 (test $prefix = NONE || test -d $prefix) && {
7247         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7248         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7249         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7250         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7251         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7252         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7253 }
7254
7255 test "/opt" != "$prefix" && \
7256 test -d "/opt" && \
7257 (test $prefix = NONE || test -d $prefix) && {
7258         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7259         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7260         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7261         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7262         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7263         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7264 }
7265
7266 test "$HOME" != "$prefix" && \
7267 test -d "$HOME" && \
7268 (test $prefix = NONE || test -d $prefix) && {
7269         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7270         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7271         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7272         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7273         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7274         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7275 }
7276
7277         for cf_cv_library_path_utf8 in $cf_search
7278         do
7279           if test -d $cf_cv_library_path_utf8 ; then
7280             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7281
7282 echo "${as_me-configure}:7282: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7283
7284             CPPFLAGS="$cf_test_CPPFLAGS"
7285             LIBS="-lutf8  $cf_save_LIBS"
7286             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7287             cat >conftest.$ac_ext <<_ACEOF
7288 #line 7288 "configure"
7289 #include "confdefs.h"
7290
7291 #include <libutf8.h>
7292 int
7293 main ()
7294 {
7295 putwc(0,0);
7296   ;
7297   return 0;
7298 }
7299 _ACEOF
7300 rm -f conftest.$ac_objext conftest$ac_exeext
7301 if { (eval echo "$as_me:7301: \"$ac_link\"") >&5
7302   (eval $ac_link) 2>&5
7303   ac_status=$?
7304   echo "$as_me:7304: \$? = $ac_status" >&5
7305   (exit $ac_status); } &&
7306          { ac_try='test -s conftest$ac_exeext'
7307   { (eval echo "$as_me:7307: \"$ac_try\"") >&5
7308   (eval $ac_try) 2>&5
7309   ac_status=$?
7310   echo "$as_me:7310: \$? = $ac_status" >&5
7311   (exit $ac_status); }; }; then
7312
7313                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7314
7315 echo "${as_me-configure}:7315: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7316
7317                 cf_cv_find_linkage_utf8=yes
7318                 cf_cv_library_file_utf8="-lutf8"
7319                 break
7320 else
7321   echo "$as_me: failed program was:" >&5
7322 cat conftest.$ac_ext >&5
7323
7324                 CPPFLAGS="$cf_save_CPPFLAGS"
7325                 LIBS="$cf_save_LIBS"
7326                 LDFLAGS="$cf_save_LDFLAGS"
7327
7328 fi
7329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7330           fi
7331         done
7332         LIBS="$cf_save_LIBS"
7333         CPPFLAGS="$cf_save_CPPFLAGS"
7334         LDFLAGS="$cf_save_LDFLAGS"
7335       fi
7336
7337     else
7338       cf_cv_find_linkage_utf8=no
7339     fi
7340
7341 fi
7342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7343
7344 if test "$cf_cv_find_linkage_utf8" = yes ; then
7345 cf_cv_utf8_lib=add-on
7346 else
7347 cf_cv_utf8_lib=no
7348 fi
7349
7350 fi
7351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7352 fi
7353 echo "$as_me:7353: result: $cf_cv_utf8_lib" >&5
7354 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7355
7356 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7357 # ncurses/ncursesw:
7358 if test "$cf_cv_utf8_lib" = "add-on" ; then
7359         cat >>confdefs.h <<\EOF
7360 #define HAVE_LIBUTF8_H 1
7361 EOF
7362
7363 if test -n "$cf_cv_header_path_utf8" ; then
7364   for cf_add_incdir in $cf_cv_header_path_utf8
7365   do
7366         while test $cf_add_incdir != /usr/include
7367         do
7368           if test -d $cf_add_incdir
7369           then
7370                 cf_have_incdir=no
7371                 if test -n "$CFLAGS$CPPFLAGS" ; then
7372                   # a loop is needed to ensure we can add subdirs of existing dirs
7373                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7374                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7375                           cf_have_incdir=yes; break
7376                         fi
7377                   done
7378                 fi
7379
7380                 if test "$cf_have_incdir" = no ; then
7381           if test "$cf_add_incdir" = /usr/local/include ; then
7382                         if test "$GCC" = yes
7383                         then
7384                           cf_save_CPPFLAGS=$CPPFLAGS
7385                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7386                           cat >conftest.$ac_ext <<_ACEOF
7387 #line 7387 "configure"
7388 #include "confdefs.h"
7389 #include <stdio.h>
7390 int
7391 main ()
7392 {
7393 printf("Hello")
7394   ;
7395   return 0;
7396 }
7397 _ACEOF
7398 rm -f conftest.$ac_objext
7399 if { (eval echo "$as_me:7399: \"$ac_compile\"") >&5
7400   (eval $ac_compile) 2>&5
7401   ac_status=$?
7402   echo "$as_me:7402: \$? = $ac_status" >&5
7403   (exit $ac_status); } &&
7404          { ac_try='test -s conftest.$ac_objext'
7405   { (eval echo "$as_me:7405: \"$ac_try\"") >&5
7406   (eval $ac_try) 2>&5
7407   ac_status=$?
7408   echo "$as_me:7408: \$? = $ac_status" >&5
7409   (exit $ac_status); }; }; then
7410   :
7411 else
7412   echo "$as_me: failed program was:" >&5
7413 cat conftest.$ac_ext >&5
7414 cf_have_incdir=yes
7415 fi
7416 rm -f conftest.$ac_objext conftest.$ac_ext
7417                           CPPFLAGS=$cf_save_CPPFLAGS
7418                         fi
7419                   fi
7420                 fi
7421
7422                 if test "$cf_have_incdir" = no ; then
7423                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7424
7425 echo "${as_me-configure}:7425: testing adding $cf_add_incdir to include-path ..." 1>&5
7426
7427                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
7428
7429           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7430           test "$cf_top_incdir" = "$cf_add_incdir" && break
7431           cf_add_incdir="$cf_top_incdir"
7432                 else
7433                   break
7434                 fi
7435           fi
7436         done
7437   done
7438 fi
7439
7440 if test -n "$cf_cv_library_path_utf8" ; then
7441   for cf_add_libdir in $cf_cv_library_path_utf8
7442   do
7443     if test $cf_add_libdir = /usr/lib ; then
7444       :
7445     elif test -d $cf_add_libdir
7446     then
7447       cf_have_libdir=no
7448       if test -n "$LDFLAGS$LIBS" ; then
7449         # a loop is needed to ensure we can add subdirs of existing dirs
7450         for cf_test_libdir in $LDFLAGS $LIBS ; do
7451           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7452             cf_have_libdir=yes; break
7453           fi
7454         done
7455       fi
7456       if test "$cf_have_libdir" = no ; then
7457         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7458
7459 echo "${as_me-configure}:7459: testing adding $cf_add_libdir to library-path ..." 1>&5
7460
7461         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7462       fi
7463     fi
7464   done
7465 fi
7466
7467         LIBS="-lutf8 $LIBS"
7468 fi
7469
7470                 if test "$cf_cv_utf8_lib" != no ; then
7471                         NCURSES_LIBUTF8=1
7472                 fi
7473         fi
7474
7475 # This is needed on Tru64 5.0 to declare mbstate_t
7476 echo "$as_me:7476: checking if we must include wchar.h to declare mbstate_t" >&5
7477 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7478 if test "${cf_cv_mbstate_t+set}" = set; then
7479   echo $ECHO_N "(cached) $ECHO_C" >&6
7480 else
7481
7482 cat >conftest.$ac_ext <<_ACEOF
7483 #line 7483 "configure"
7484 #include "confdefs.h"
7485
7486 #include <stdlib.h>
7487 #include <stdarg.h>
7488 #include <stdio.h>
7489 #ifdef HAVE_LIBUTF8_H
7490 #include <libutf8.h>
7491 #endif
7492 int
7493 main ()
7494 {
7495 mbstate_t state
7496   ;
7497   return 0;
7498 }
7499 _ACEOF
7500 rm -f conftest.$ac_objext
7501 if { (eval echo "$as_me:7501: \"$ac_compile\"") >&5
7502   (eval $ac_compile) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); } &&
7506          { ac_try='test -s conftest.$ac_objext'
7507   { (eval echo "$as_me:7507: \"$ac_try\"") >&5
7508   (eval $ac_try) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); }; }; then
7512   cf_cv_mbstate_t=no
7513 else
7514   echo "$as_me: failed program was:" >&5
7515 cat conftest.$ac_ext >&5
7516 cat >conftest.$ac_ext <<_ACEOF
7517 #line 7517 "configure"
7518 #include "confdefs.h"
7519
7520 #include <stdlib.h>
7521 #include <stdarg.h>
7522 #include <stdio.h>
7523 #include <wchar.h>
7524 #ifdef HAVE_LIBUTF8_H
7525 #include <libutf8.h>
7526 #endif
7527 int
7528 main ()
7529 {
7530 mbstate_t value
7531   ;
7532   return 0;
7533 }
7534 _ACEOF
7535 rm -f conftest.$ac_objext
7536 if { (eval echo "$as_me:7536: \"$ac_compile\"") >&5
7537   (eval $ac_compile) 2>&5
7538   ac_status=$?
7539   echo "$as_me:7539: \$? = $ac_status" >&5
7540   (exit $ac_status); } &&
7541          { ac_try='test -s conftest.$ac_objext'
7542   { (eval echo "$as_me:7542: \"$ac_try\"") >&5
7543   (eval $ac_try) 2>&5
7544   ac_status=$?
7545   echo "$as_me:7545: \$? = $ac_status" >&5
7546   (exit $ac_status); }; }; then
7547   cf_cv_mbstate_t=yes
7548 else
7549   echo "$as_me: failed program was:" >&5
7550 cat conftest.$ac_ext >&5
7551 cf_cv_mbstate_t=unknown
7552 fi
7553 rm -f conftest.$ac_objext conftest.$ac_ext
7554 fi
7555 rm -f conftest.$ac_objext conftest.$ac_ext
7556 fi
7557 echo "$as_me:7557: result: $cf_cv_mbstate_t" >&5
7558 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7559
7560 if test "$cf_cv_mbstate_t" = yes ; then
7561         cat >>confdefs.h <<\EOF
7562 #define NEED_WCHAR_H 1
7563 EOF
7564
7565         NEED_WCHAR_H=1
7566 fi
7567
7568 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7569 if test "$cf_cv_mbstate_t" = unknown ; then
7570         NCURSES_MBSTATE_T=1
7571 fi
7572
7573 # This is needed on Tru64 5.0 to declare wchar_t
7574 echo "$as_me:7574: checking if we must include wchar.h to declare wchar_t" >&5
7575 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7576 if test "${cf_cv_wchar_t+set}" = set; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579
7580 cat >conftest.$ac_ext <<_ACEOF
7581 #line 7581 "configure"
7582 #include "confdefs.h"
7583
7584 #include <stdlib.h>
7585 #include <stdarg.h>
7586 #include <stdio.h>
7587 #ifdef HAVE_LIBUTF8_H
7588 #include <libutf8.h>
7589 #endif
7590 int
7591 main ()
7592 {
7593 wchar_t state
7594   ;
7595   return 0;
7596 }
7597 _ACEOF
7598 rm -f conftest.$ac_objext
7599 if { (eval echo "$as_me:7599: \"$ac_compile\"") >&5
7600   (eval $ac_compile) 2>&5
7601   ac_status=$?
7602   echo "$as_me:7602: \$? = $ac_status" >&5
7603   (exit $ac_status); } &&
7604          { ac_try='test -s conftest.$ac_objext'
7605   { (eval echo "$as_me:7605: \"$ac_try\"") >&5
7606   (eval $ac_try) 2>&5
7607   ac_status=$?
7608   echo "$as_me:7608: \$? = $ac_status" >&5
7609   (exit $ac_status); }; }; then
7610   cf_cv_wchar_t=no
7611 else
7612   echo "$as_me: failed program was:" >&5
7613 cat conftest.$ac_ext >&5
7614 cat >conftest.$ac_ext <<_ACEOF
7615 #line 7615 "configure"
7616 #include "confdefs.h"
7617
7618 #include <stdlib.h>
7619 #include <stdarg.h>
7620 #include <stdio.h>
7621 #include <wchar.h>
7622 #ifdef HAVE_LIBUTF8_H
7623 #include <libutf8.h>
7624 #endif
7625 int
7626 main ()
7627 {
7628 wchar_t value
7629   ;
7630   return 0;
7631 }
7632 _ACEOF
7633 rm -f conftest.$ac_objext
7634 if { (eval echo "$as_me:7634: \"$ac_compile\"") >&5
7635   (eval $ac_compile) 2>&5
7636   ac_status=$?
7637   echo "$as_me:7637: \$? = $ac_status" >&5
7638   (exit $ac_status); } &&
7639          { ac_try='test -s conftest.$ac_objext'
7640   { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit $ac_status); }; }; then
7645   cf_cv_wchar_t=yes
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 cat conftest.$ac_ext >&5
7649 cf_cv_wchar_t=unknown
7650 fi
7651 rm -f conftest.$ac_objext conftest.$ac_ext
7652 fi
7653 rm -f conftest.$ac_objext conftest.$ac_ext
7654 fi
7655 echo "$as_me:7655: result: $cf_cv_wchar_t" >&5
7656 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7657
7658 if test "$cf_cv_wchar_t" = yes ; then
7659         cat >>confdefs.h <<\EOF
7660 #define NEED_WCHAR_H 1
7661 EOF
7662
7663         NEED_WCHAR_H=1
7664 fi
7665
7666 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7667 if test "$cf_cv_wchar_t" = unknown ; then
7668         NCURSES_WCHAR_T=1
7669 fi
7670
7671 # if we find wchar_t in either place, use substitution to provide a fallback.
7672 if test "$cf_cv_wchar_t" != unknown ; then
7673         NCURSES_OK_WCHAR_T=1
7674 fi
7675
7676 # This is needed on Tru64 5.0 to declare wint_t
7677 echo "$as_me:7677: checking if we must include wchar.h to declare wint_t" >&5
7678 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7679 if test "${cf_cv_wint_t+set}" = set; then
7680   echo $ECHO_N "(cached) $ECHO_C" >&6
7681 else
7682
7683 cat >conftest.$ac_ext <<_ACEOF
7684 #line 7684 "configure"
7685 #include "confdefs.h"
7686
7687 #include <stdlib.h>
7688 #include <stdarg.h>
7689 #include <stdio.h>
7690 #ifdef HAVE_LIBUTF8_H
7691 #include <libutf8.h>
7692 #endif
7693 int
7694 main ()
7695 {
7696 wint_t state
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 rm -f conftest.$ac_objext
7702 if { (eval echo "$as_me:7702: \"$ac_compile\"") >&5
7703   (eval $ac_compile) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit $ac_status); } &&
7707          { ac_try='test -s conftest.$ac_objext'
7708   { (eval echo "$as_me:7708: \"$ac_try\"") >&5
7709   (eval $ac_try) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit $ac_status); }; }; then
7713   cf_cv_wint_t=no
7714 else
7715   echo "$as_me: failed program was:" >&5
7716 cat conftest.$ac_ext >&5
7717 cat >conftest.$ac_ext <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7720
7721 #include <stdlib.h>
7722 #include <stdarg.h>
7723 #include <stdio.h>
7724 #include <wchar.h>
7725 #ifdef HAVE_LIBUTF8_H
7726 #include <libutf8.h>
7727 #endif
7728 int
7729 main ()
7730 {
7731 wint_t value
7732   ;
7733   return 0;
7734 }
7735 _ACEOF
7736 rm -f conftest.$ac_objext
7737 if { (eval echo "$as_me:7737: \"$ac_compile\"") >&5
7738   (eval $ac_compile) 2>&5
7739   ac_status=$?
7740   echo "$as_me:7740: \$? = $ac_status" >&5
7741   (exit $ac_status); } &&
7742          { ac_try='test -s conftest.$ac_objext'
7743   { (eval echo "$as_me:7743: \"$ac_try\"") >&5
7744   (eval $ac_try) 2>&5
7745   ac_status=$?
7746   echo "$as_me:7746: \$? = $ac_status" >&5
7747   (exit $ac_status); }; }; then
7748   cf_cv_wint_t=yes
7749 else
7750   echo "$as_me: failed program was:" >&5
7751 cat conftest.$ac_ext >&5
7752 cf_cv_wint_t=unknown
7753 fi
7754 rm -f conftest.$ac_objext conftest.$ac_ext
7755 fi
7756 rm -f conftest.$ac_objext conftest.$ac_ext
7757 fi
7758 echo "$as_me:7758: result: $cf_cv_wint_t" >&5
7759 echo "${ECHO_T}$cf_cv_wint_t" >&6
7760
7761 if test "$cf_cv_wint_t" = yes ; then
7762         cat >>confdefs.h <<\EOF
7763 #define NEED_WCHAR_H 1
7764 EOF
7765
7766         NEED_WCHAR_H=1
7767 fi
7768
7769 # if we do not find wint_t in either place, use substitution to provide a fallback.
7770 if test "$cf_cv_wint_t" = unknown ; then
7771         NCURSES_WINT_T=1
7772 fi
7773
7774 # if we find wint_t in either place, use substitution to provide a fallback.
7775 if test "$cf_cv_wint_t" != unknown ; then
7776         NCURSES_OK_WINT_T=1
7777 fi
7778
7779         if test "$NCURSES_MBSTATE_T" != 0; then
7780                 cat >>confdefs.h <<\EOF
7781 #define NEED_MBSTATE_T_DEF 1
7782 EOF
7783
7784         fi
7785 fi
7786
7787 ###   use option --disable-lp64 to allow long chtype
7788 case $cf_cv_abi_version in
7789 [345]*)
7790         default_with_lp64=no
7791         ;;
7792 *)
7793         default_with_lp64=yes
7794         ;;
7795 esac
7796
7797 echo "$as_me:7797: checking whether to enable _LP64 definition in curses.h" >&5
7798 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7799
7800 # Check whether --enable-lp64 or --disable-lp64 was given.
7801 if test "${enable_lp64+set}" = set; then
7802   enableval="$enable_lp64"
7803   with_lp64=$enableval
7804 else
7805   with_lp64=$default_with_lp64
7806 fi;
7807 echo "$as_me:7807: result: $with_lp64" >&5
7808 echo "${ECHO_T}$with_lp64" >&6
7809
7810 if test "$with_lp64" = yes ; then
7811         cf_cv_enable_lp64=1
7812 else
7813         cf_cv_enable_lp64=0
7814 fi
7815
7816 # Check whether --enable-largefile or --disable-largefile was given.
7817 if test "${enable_largefile+set}" = set; then
7818   enableval="$enable_largefile"
7819
7820 fi;
7821 if test "$enable_largefile" != no; then
7822
7823   echo "$as_me:7823: checking for special C compiler options needed for large files" >&5
7824 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7825 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7826   echo $ECHO_N "(cached) $ECHO_C" >&6
7827 else
7828   ac_cv_sys_largefile_CC=no
7829      if test "$GCC" != yes; then
7830        ac_save_CC=$CC
7831        while :; do
7832          # IRIX 6.2 and later do not support large files by default,
7833          # so use the C compiler's -n32 option if that helps.
7834          cat >conftest.$ac_ext <<_ACEOF
7835 #line 7835 "configure"
7836 #include "confdefs.h"
7837 #include <sys/types.h>
7838  /* Check that off_t can represent 2**63 - 1 correctly.
7839     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7840     since some C++ compilers masquerading as C compilers
7841     incorrectly reject 9223372036854775807.  */
7842 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7843   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7844                        && LARGE_OFF_T % 2147483647 == 1)
7845                       ? 1 : -1];
7846 int
7847 main ()
7848 {
7849
7850   ;
7851   return 0;
7852 }
7853 _ACEOF
7854          rm -f conftest.$ac_objext
7855 if { (eval echo "$as_me:7855: \"$ac_compile\"") >&5
7856   (eval $ac_compile) 2>&5
7857   ac_status=$?
7858   echo "$as_me:7858: \$? = $ac_status" >&5
7859   (exit $ac_status); } &&
7860          { ac_try='test -s conftest.$ac_objext'
7861   { (eval echo "$as_me:7861: \"$ac_try\"") >&5
7862   (eval $ac_try) 2>&5
7863   ac_status=$?
7864   echo "$as_me:7864: \$? = $ac_status" >&5
7865   (exit $ac_status); }; }; then
7866   break
7867 else
7868   echo "$as_me: failed program was:" >&5
7869 cat conftest.$ac_ext >&5
7870 fi
7871 rm -f conftest.$ac_objext
7872          CC="$CC -n32"
7873          rm -f conftest.$ac_objext
7874 if { (eval echo "$as_me:7874: \"$ac_compile\"") >&5
7875   (eval $ac_compile) 2>&5
7876   ac_status=$?
7877   echo "$as_me:7877: \$? = $ac_status" >&5
7878   (exit $ac_status); } &&
7879          { ac_try='test -s conftest.$ac_objext'
7880   { (eval echo "$as_me:7880: \"$ac_try\"") >&5
7881   (eval $ac_try) 2>&5
7882   ac_status=$?
7883   echo "$as_me:7883: \$? = $ac_status" >&5
7884   (exit $ac_status); }; }; then
7885   ac_cv_sys_largefile_CC=' -n32'; break
7886 else
7887   echo "$as_me: failed program was:" >&5
7888 cat conftest.$ac_ext >&5
7889 fi
7890 rm -f conftest.$ac_objext
7891          break
7892        done
7893        CC=$ac_save_CC
7894        rm -f conftest.$ac_ext
7895     fi
7896 fi
7897 echo "$as_me:7897: result: $ac_cv_sys_largefile_CC" >&5
7898 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7899   if test "$ac_cv_sys_largefile_CC" != no; then
7900     CC=$CC$ac_cv_sys_largefile_CC
7901   fi
7902
7903   echo "$as_me:7903: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7904 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7905 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7906   echo $ECHO_N "(cached) $ECHO_C" >&6
7907 else
7908   while :; do
7909   ac_cv_sys_file_offset_bits=no
7910   cat >conftest.$ac_ext <<_ACEOF
7911 #line 7911 "configure"
7912 #include "confdefs.h"
7913 #include <sys/types.h>
7914  /* Check that off_t can represent 2**63 - 1 correctly.
7915     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7916     since some C++ compilers masquerading as C compilers
7917     incorrectly reject 9223372036854775807.  */
7918 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7919   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7920                        && LARGE_OFF_T % 2147483647 == 1)
7921                       ? 1 : -1];
7922 int
7923 main ()
7924 {
7925
7926   ;
7927   return 0;
7928 }
7929 _ACEOF
7930 rm -f conftest.$ac_objext
7931 if { (eval echo "$as_me:7931: \"$ac_compile\"") >&5
7932   (eval $ac_compile) 2>&5
7933   ac_status=$?
7934   echo "$as_me:7934: \$? = $ac_status" >&5
7935   (exit $ac_status); } &&
7936          { ac_try='test -s conftest.$ac_objext'
7937   { (eval echo "$as_me:7937: \"$ac_try\"") >&5
7938   (eval $ac_try) 2>&5
7939   ac_status=$?
7940   echo "$as_me:7940: \$? = $ac_status" >&5
7941   (exit $ac_status); }; }; then
7942   break
7943 else
7944   echo "$as_me: failed program was:" >&5
7945 cat conftest.$ac_ext >&5
7946 fi
7947 rm -f conftest.$ac_objext conftest.$ac_ext
7948   cat >conftest.$ac_ext <<_ACEOF
7949 #line 7949 "configure"
7950 #include "confdefs.h"
7951 #define _FILE_OFFSET_BITS 64
7952 #include <sys/types.h>
7953  /* Check that off_t can represent 2**63 - 1 correctly.
7954     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7955     since some C++ compilers masquerading as C compilers
7956     incorrectly reject 9223372036854775807.  */
7957 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7958   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7959                        && LARGE_OFF_T % 2147483647 == 1)
7960                       ? 1 : -1];
7961 int
7962 main ()
7963 {
7964
7965   ;
7966   return 0;
7967 }
7968 _ACEOF
7969 rm -f conftest.$ac_objext
7970 if { (eval echo "$as_me:7970: \"$ac_compile\"") >&5
7971   (eval $ac_compile) 2>&5
7972   ac_status=$?
7973   echo "$as_me:7973: \$? = $ac_status" >&5
7974   (exit $ac_status); } &&
7975          { ac_try='test -s conftest.$ac_objext'
7976   { (eval echo "$as_me:7976: \"$ac_try\"") >&5
7977   (eval $ac_try) 2>&5
7978   ac_status=$?
7979   echo "$as_me:7979: \$? = $ac_status" >&5
7980   (exit $ac_status); }; }; then
7981   ac_cv_sys_file_offset_bits=64; break
7982 else
7983   echo "$as_me: failed program was:" >&5
7984 cat conftest.$ac_ext >&5
7985 fi
7986 rm -f conftest.$ac_objext conftest.$ac_ext
7987   break
7988 done
7989 fi
7990 echo "$as_me:7990: result: $ac_cv_sys_file_offset_bits" >&5
7991 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7992 if test "$ac_cv_sys_file_offset_bits" != no; then
7993
7994 cat >>confdefs.h <<EOF
7995 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7996 EOF
7997
7998 fi
7999 rm -f conftest*
8000   echo "$as_me:8000: checking for _LARGE_FILES value needed for large files" >&5
8001 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8002 if test "${ac_cv_sys_large_files+set}" = set; then
8003   echo $ECHO_N "(cached) $ECHO_C" >&6
8004 else
8005   while :; do
8006   ac_cv_sys_large_files=no
8007   cat >conftest.$ac_ext <<_ACEOF
8008 #line 8008 "configure"
8009 #include "confdefs.h"
8010 #include <sys/types.h>
8011  /* Check that off_t can represent 2**63 - 1 correctly.
8012     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8013     since some C++ compilers masquerading as C compilers
8014     incorrectly reject 9223372036854775807.  */
8015 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8016   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8017                        && LARGE_OFF_T % 2147483647 == 1)
8018                       ? 1 : -1];
8019 int
8020 main ()
8021 {
8022
8023   ;
8024   return 0;
8025 }
8026 _ACEOF
8027 rm -f conftest.$ac_objext
8028 if { (eval echo "$as_me:8028: \"$ac_compile\"") >&5
8029   (eval $ac_compile) 2>&5
8030   ac_status=$?
8031   echo "$as_me:8031: \$? = $ac_status" >&5
8032   (exit $ac_status); } &&
8033          { ac_try='test -s conftest.$ac_objext'
8034   { (eval echo "$as_me:8034: \"$ac_try\"") >&5
8035   (eval $ac_try) 2>&5
8036   ac_status=$?
8037   echo "$as_me:8037: \$? = $ac_status" >&5
8038   (exit $ac_status); }; }; then
8039   break
8040 else
8041   echo "$as_me: failed program was:" >&5
8042 cat conftest.$ac_ext >&5
8043 fi
8044 rm -f conftest.$ac_objext conftest.$ac_ext
8045   cat >conftest.$ac_ext <<_ACEOF
8046 #line 8046 "configure"
8047 #include "confdefs.h"
8048 #define _LARGE_FILES 1
8049 #include <sys/types.h>
8050  /* Check that off_t can represent 2**63 - 1 correctly.
8051     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8052     since some C++ compilers masquerading as C compilers
8053     incorrectly reject 9223372036854775807.  */
8054 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8055   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8056                        && LARGE_OFF_T % 2147483647 == 1)
8057                       ? 1 : -1];
8058 int
8059 main ()
8060 {
8061
8062   ;
8063   return 0;
8064 }
8065 _ACEOF
8066 rm -f conftest.$ac_objext
8067 if { (eval echo "$as_me:8067: \"$ac_compile\"") >&5
8068   (eval $ac_compile) 2>&5
8069   ac_status=$?
8070   echo "$as_me:8070: \$? = $ac_status" >&5
8071   (exit $ac_status); } &&
8072          { ac_try='test -s conftest.$ac_objext'
8073   { (eval echo "$as_me:8073: \"$ac_try\"") >&5
8074   (eval $ac_try) 2>&5
8075   ac_status=$?
8076   echo "$as_me:8076: \$? = $ac_status" >&5
8077   (exit $ac_status); }; }; then
8078   ac_cv_sys_large_files=1; break
8079 else
8080   echo "$as_me: failed program was:" >&5
8081 cat conftest.$ac_ext >&5
8082 fi
8083 rm -f conftest.$ac_objext conftest.$ac_ext
8084   break
8085 done
8086 fi
8087 echo "$as_me:8087: result: $ac_cv_sys_large_files" >&5
8088 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8089 if test "$ac_cv_sys_large_files" != no; then
8090
8091 cat >>confdefs.h <<EOF
8092 #define _LARGE_FILES $ac_cv_sys_large_files
8093 EOF
8094
8095 fi
8096 rm -f conftest*
8097 fi
8098
8099     if test "$enable_largefile" != no ; then
8100         echo "$as_me:8100: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8101 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8102 if test "${ac_cv_sys_largefile_source+set}" = set; then
8103   echo $ECHO_N "(cached) $ECHO_C" >&6
8104 else
8105   while :; do
8106   ac_cv_sys_largefile_source=no
8107   cat >conftest.$ac_ext <<_ACEOF
8108 #line 8108 "configure"
8109 #include "confdefs.h"
8110 #include <stdio.h>
8111 int
8112 main ()
8113 {
8114 return !fseeko;
8115   ;
8116   return 0;
8117 }
8118 _ACEOF
8119 rm -f conftest.$ac_objext
8120 if { (eval echo "$as_me:8120: \"$ac_compile\"") >&5
8121   (eval $ac_compile) 2>&5
8122   ac_status=$?
8123   echo "$as_me:8123: \$? = $ac_status" >&5
8124   (exit $ac_status); } &&
8125          { ac_try='test -s conftest.$ac_objext'
8126   { (eval echo "$as_me:8126: \"$ac_try\"") >&5
8127   (eval $ac_try) 2>&5
8128   ac_status=$?
8129   echo "$as_me:8129: \$? = $ac_status" >&5
8130   (exit $ac_status); }; }; then
8131   break
8132 else
8133   echo "$as_me: failed program was:" >&5
8134 cat conftest.$ac_ext >&5
8135 fi
8136 rm -f conftest.$ac_objext conftest.$ac_ext
8137   cat >conftest.$ac_ext <<_ACEOF
8138 #line 8138 "configure"
8139 #include "confdefs.h"
8140 #define _LARGEFILE_SOURCE 1
8141 #include <stdio.h>
8142 int
8143 main ()
8144 {
8145 return !fseeko;
8146   ;
8147   return 0;
8148 }
8149 _ACEOF
8150 rm -f conftest.$ac_objext
8151 if { (eval echo "$as_me:8151: \"$ac_compile\"") >&5
8152   (eval $ac_compile) 2>&5
8153   ac_status=$?
8154   echo "$as_me:8154: \$? = $ac_status" >&5
8155   (exit $ac_status); } &&
8156          { ac_try='test -s conftest.$ac_objext'
8157   { (eval echo "$as_me:8157: \"$ac_try\"") >&5
8158   (eval $ac_try) 2>&5
8159   ac_status=$?
8160   echo "$as_me:8160: \$? = $ac_status" >&5
8161   (exit $ac_status); }; }; then
8162   ac_cv_sys_largefile_source=1; break
8163 else
8164   echo "$as_me: failed program was:" >&5
8165 cat conftest.$ac_ext >&5
8166 fi
8167 rm -f conftest.$ac_objext conftest.$ac_ext
8168   break
8169 done
8170 fi
8171 echo "$as_me:8171: result: $ac_cv_sys_largefile_source" >&5
8172 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8173 if test "$ac_cv_sys_largefile_source" != no; then
8174
8175 cat >>confdefs.h <<EOF
8176 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8177 EOF
8178
8179 fi
8180 rm -f conftest*
8181
8182 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8183 # in glibc 2.1.3, but that breaks too many other things.
8184 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8185 echo "$as_me:8185: checking for fseeko" >&5
8186 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8187 if test "${ac_cv_func_fseeko+set}" = set; then
8188   echo $ECHO_N "(cached) $ECHO_C" >&6
8189 else
8190   cat >conftest.$ac_ext <<_ACEOF
8191 #line 8191 "configure"
8192 #include "confdefs.h"
8193 #include <stdio.h>
8194 int
8195 main ()
8196 {
8197 return fseeko && fseeko (stdin, 0, 0);
8198   ;
8199   return 0;
8200 }
8201 _ACEOF
8202 rm -f conftest.$ac_objext conftest$ac_exeext
8203 if { (eval echo "$as_me:8203: \"$ac_link\"") >&5
8204   (eval $ac_link) 2>&5
8205   ac_status=$?
8206   echo "$as_me:8206: \$? = $ac_status" >&5
8207   (exit $ac_status); } &&
8208          { ac_try='test -s conftest$ac_exeext'
8209   { (eval echo "$as_me:8209: \"$ac_try\"") >&5
8210   (eval $ac_try) 2>&5
8211   ac_status=$?
8212   echo "$as_me:8212: \$? = $ac_status" >&5
8213   (exit $ac_status); }; }; then
8214   ac_cv_func_fseeko=yes
8215 else
8216   echo "$as_me: failed program was:" >&5
8217 cat conftest.$ac_ext >&5
8218 ac_cv_func_fseeko=no
8219 fi
8220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8221 fi
8222 echo "$as_me:8222: result: $ac_cv_func_fseeko" >&5
8223 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8224 if test $ac_cv_func_fseeko = yes; then
8225
8226 cat >>confdefs.h <<\EOF
8227 #define HAVE_FSEEKO 1
8228 EOF
8229
8230 fi
8231
8232         # Normally we would collect these definitions in the config.h,
8233         # but (like _XOPEN_SOURCE), some environments rely on having these
8234         # defined before any of the system headers are included.  Another
8235         # case comes up with C++, e.g., on AIX the compiler compiles the
8236         # header files by themselves before looking at the body files it is
8237         # told to compile.  For ncurses, those header files do not include
8238         # the config.h
8239         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8240         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8241         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8242
8243         echo "$as_me:8243: checking whether to use struct dirent64" >&5
8244 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8245 if test "${cf_cv_struct_dirent64+set}" = set; then
8246   echo $ECHO_N "(cached) $ECHO_C" >&6
8247 else
8248
8249                 cat >conftest.$ac_ext <<_ACEOF
8250 #line 8250 "configure"
8251 #include "confdefs.h"
8252
8253 #include <sys/types.h>
8254 #include <dirent.h>
8255
8256 int
8257 main ()
8258 {
8259
8260                 /* if transitional largefile support is setup, this is true */
8261                 extern struct dirent64 * readdir(DIR *);
8262                 struct dirent64 *x = readdir((DIR *)0);
8263                 struct dirent *y = readdir((DIR *)0);
8264                 int z = x - y;
8265
8266   ;
8267   return 0;
8268 }
8269 _ACEOF
8270 rm -f conftest.$ac_objext
8271 if { (eval echo "$as_me:8271: \"$ac_compile\"") >&5
8272   (eval $ac_compile) 2>&5
8273   ac_status=$?
8274   echo "$as_me:8274: \$? = $ac_status" >&5
8275   (exit $ac_status); } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:8277: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   cf_cv_struct_dirent64=yes
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 cat conftest.$ac_ext >&5
8286 cf_cv_struct_dirent64=no
8287 fi
8288 rm -f conftest.$ac_objext conftest.$ac_ext
8289
8290 fi
8291 echo "$as_me:8291: result: $cf_cv_struct_dirent64" >&5
8292 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8293         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8294 #define HAVE_STRUCT_DIRENT64 1
8295 EOF
8296
8297     fi
8298
8299 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8300 echo "$as_me:8300: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8301 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8302
8303 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8304 if test "${enable_tparm_varargs+set}" = set; then
8305   enableval="$enable_tparm_varargs"
8306   with_tparm_varargs=$enableval
8307 else
8308   with_tparm_varargs=yes
8309 fi;
8310 echo "$as_me:8310: result: $with_tparm_varargs" >&5
8311 echo "${ECHO_T}$with_tparm_varargs" >&6
8312 NCURSES_TPARM_VARARGS=0
8313 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8314
8315 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8316 if test "$with_ticlib" != no ; then
8317 echo "$as_me:8317: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8318 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8319
8320 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8321 if test "${enable_tic_depends+set}" = set; then
8322   enableval="$enable_tic_depends"
8323   with_tic_depends=$enableval
8324 else
8325   with_tic_depends=yes
8326 fi;
8327 echo "$as_me:8327: result: $with_tic_depends" >&5
8328 echo "${ECHO_T}$with_tic_depends" >&6
8329 else
8330         with_tic_depends=no
8331 fi
8332
8333 ###   use option --with-bool to override bool's type
8334 echo "$as_me:8334: checking for type of bool" >&5
8335 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8336
8337 # Check whether --with-bool or --without-bool was given.
8338 if test "${with_bool+set}" = set; then
8339   withval="$with_bool"
8340   NCURSES_BOOL="$withval"
8341 else
8342   NCURSES_BOOL=auto
8343 fi;
8344 echo "$as_me:8344: result: $NCURSES_BOOL" >&5
8345 echo "${ECHO_T}$NCURSES_BOOL" >&6
8346
8347 echo "$as_me:8347: checking for alternate terminal capabilities file" >&5
8348 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8349
8350 # Check whether --with-caps or --without-caps was given.
8351 if test "${with_caps+set}" = set; then
8352   withval="$with_caps"
8353   TERMINFO_CAPS=Caps.$withval
8354 else
8355   TERMINFO_CAPS=Caps
8356 fi;
8357 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8358 echo "$as_me:8358: result: $TERMINFO_CAPS" >&5
8359 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8360
8361 ###   use option --with-chtype to override chtype's type
8362 echo "$as_me:8362: checking for type of chtype" >&5
8363 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8364
8365 # Check whether --with-chtype or --without-chtype was given.
8366 if test "${with_chtype+set}" = set; then
8367   withval="$with_chtype"
8368   NCURSES_CHTYPE="$withval"
8369 else
8370   NCURSES_CHTYPE=auto
8371 fi;
8372 echo "$as_me:8372: result: $NCURSES_CHTYPE" >&5
8373 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8374
8375 ###   use option --with-ospeed to override ospeed's type
8376 echo "$as_me:8376: checking for type of ospeed" >&5
8377 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8378
8379 # Check whether --with-ospeed or --without-ospeed was given.
8380 if test "${with_ospeed+set}" = set; then
8381   withval="$with_ospeed"
8382   NCURSES_OSPEED="$withval"
8383 else
8384   NCURSES_OSPEED=short
8385 fi;
8386 echo "$as_me:8386: result: $NCURSES_OSPEED" >&5
8387 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8388
8389 ###   use option --with-mmask-t to override mmask_t's type
8390 echo "$as_me:8390: checking for type of mmask_t" >&5
8391 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8392
8393 # Check whether --with-mmask-t or --without-mmask-t was given.
8394 if test "${with_mmask_t+set}" = set; then
8395   withval="$with_mmask_t"
8396   NCURSES_MMASK_T="$withval"
8397 else
8398   NCURSES_MMASK_T=auto
8399 fi;
8400 echo "$as_me:8400: result: $NCURSES_MMASK_T" >&5
8401 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8402
8403 ### Enable compiling-in rcs id's
8404 echo "$as_me:8404: checking if RCS identifiers should be compiled-in" >&5
8405 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8406
8407 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8408 if test "${with_rcs_ids+set}" = set; then
8409   withval="$with_rcs_ids"
8410   with_rcs_ids=$withval
8411 else
8412   with_rcs_ids=no
8413 fi;
8414 echo "$as_me:8414: result: $with_rcs_ids" >&5
8415 echo "${ECHO_T}$with_rcs_ids" >&6
8416 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8417 #define USE_RCS_IDS 1
8418 EOF
8419
8420 ###############################################################################
8421
8422 echo "$as_me:8422: checking format of man-pages" >&5
8423 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8424
8425 # Check whether --with-manpage-format or --without-manpage-format was given.
8426 if test "${with_manpage_format+set}" = set; then
8427   withval="$with_manpage_format"
8428   MANPAGE_FORMAT=$withval
8429 else
8430   MANPAGE_FORMAT=unknown
8431 fi;
8432
8433 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8434 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8435
8436 cf_unknown=
8437
8438 case $MANPAGE_FORMAT in
8439 unknown)
8440   if test -z "$MANPATH" ; then
8441     MANPATH="/usr/man:/usr/share/man"
8442   fi
8443
8444   # look for the 'date' man-page (it's most likely to be installed!)
8445   MANPAGE_FORMAT=
8446   cf_preform=no
8447   cf_catonly=yes
8448   cf_example=date
8449
8450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
8451   for cf_dir in $MANPATH; do
8452     test -z "$cf_dir" && cf_dir=/usr/man
8453     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
8454     do
8455       cf_test=`echo $cf_name | sed -e 's/*//'`
8456       if test "x$cf_test" = "x$cf_name" ; then
8457
8458         case "$cf_name" in
8459         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8460         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8461         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8462         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8463         esac
8464
8465         case "$cf_name" in
8466         $cf_dir/man*)
8467           cf_catonly=no
8468           ;;
8469         $cf_dir/cat*)
8470           cf_preform=yes
8471           ;;
8472         esac
8473         break
8474       fi
8475
8476       # if we found a match in either man* or cat*, stop looking
8477       if test -n "$MANPAGE_FORMAT" ; then
8478         cf_found=no
8479         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8480         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8481         case "$cf_name" in
8482         $cf_dir/cat*)
8483           cf_found=yes
8484           ;;
8485         esac
8486         test $cf_found=yes && break
8487       fi
8488     done
8489     # only check the first directory in $MANPATH where we find manpages
8490     if test -n "$MANPAGE_FORMAT" ; then
8491        break
8492     fi
8493   done
8494   # if we did not find the example, just assume it is normal
8495   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8496   IFS="$ac_save_ifs"
8497   ;;
8498 *)
8499   for cf_option in $MANPAGE_FORMAT; do
8500      case $cf_option in #(vi
8501      gzip|compress|BSDI|normal|formatted|catonly)
8502        ;;
8503      *)
8504        cf_unknown="$cf_unknown $cf_option"
8505        ;;
8506      esac
8507   done
8508   ;;
8509 esac
8510
8511 echo "$as_me:8511: result: $MANPAGE_FORMAT" >&5
8512 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8513 if test -n "$cf_unknown" ; then
8514   { echo "$as_me:8514: WARNING: Unexpected manpage-format $cf_unknown" >&5
8515 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8516 fi
8517
8518 echo "$as_me:8518: checking for manpage renaming" >&5
8519 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8520
8521 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8522 if test "${with_manpage_renames+set}" = set; then
8523   withval="$with_manpage_renames"
8524   MANPAGE_RENAMES=$withval
8525 else
8526   MANPAGE_RENAMES=yes
8527 fi;
8528
8529 case ".$MANPAGE_RENAMES" in #(vi
8530 .no) #(vi
8531   ;;
8532 .|.yes)
8533   # Debian 'man' program?
8534   if test -f /etc/debian_version ; then
8535     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8536   else
8537     MANPAGE_RENAMES=no
8538   fi
8539   ;;
8540 esac
8541
8542 if test "$MANPAGE_RENAMES" != no ; then
8543   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8544     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8545   elif test ! -f $MANPAGE_RENAMES ; then
8546     { { echo "$as_me:8546: error: not a filename: $MANPAGE_RENAMES" >&5
8547 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8548    { (exit 1); exit 1; }; }
8549   fi
8550
8551   test ! -d man && mkdir man
8552
8553   # Construct a sed-script to perform renaming within man-pages
8554   if test -n "$MANPAGE_RENAMES" ; then
8555     test ! -d man && mkdir man
8556     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8557   fi
8558 fi
8559
8560 echo "$as_me:8560: result: $MANPAGE_RENAMES" >&5
8561 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8562
8563 echo "$as_me:8563: checking if manpage aliases will be installed" >&5
8564 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8565
8566 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8567 if test "${with_manpage_aliases+set}" = set; then
8568   withval="$with_manpage_aliases"
8569   MANPAGE_ALIASES=$withval
8570 else
8571   MANPAGE_ALIASES=yes
8572 fi;
8573
8574 echo "$as_me:8574: result: $MANPAGE_ALIASES" >&5
8575 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8576
8577 if test "$LN_S" = "ln -s"; then
8578         cf_use_symlinks=yes
8579 else
8580         cf_use_symlinks=no
8581 fi
8582
8583 MANPAGE_SYMLINKS=no
8584 if test "$MANPAGE_ALIASES" = yes ; then
8585 echo "$as_me:8585: checking if manpage symlinks should be used" >&5
8586 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8587
8588 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8589 if test "${with_manpage_symlinks+set}" = set; then
8590   withval="$with_manpage_symlinks"
8591   MANPAGE_SYMLINKS=$withval
8592 else
8593   MANPAGE_SYMLINKS=$cf_use_symlinks
8594 fi;
8595
8596 if test "$$cf_use_symlinks" = no; then
8597 if test "$MANPAGE_SYMLINKS" = yes ; then
8598         { echo "$as_me:8598: WARNING: cannot make symlinks" >&5
8599 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8600         MANPAGE_SYMLINKS=no
8601 fi
8602 fi
8603
8604 echo "$as_me:8604: result: $MANPAGE_SYMLINKS" >&5
8605 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8606 fi
8607
8608 echo "$as_me:8608: checking for manpage tbl" >&5
8609 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8610
8611 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8612 if test "${with_manpage_tbl+set}" = set; then
8613   withval="$with_manpage_tbl"
8614   MANPAGE_TBL=$withval
8615 else
8616   MANPAGE_TBL=no
8617 fi;
8618
8619 echo "$as_me:8619: result: $MANPAGE_TBL" >&5
8620 echo "${ECHO_T}$MANPAGE_TBL" >&6
8621
8622   if test "$prefix" = "NONE" ; then
8623      cf_prefix="$ac_default_prefix"
8624   else
8625      cf_prefix="$prefix"
8626   fi
8627
8628   case "$MANPAGE_FORMAT" in # (vi
8629   *catonly*) # (vi
8630     cf_format=yes
8631     cf_inboth=no
8632     ;;
8633   *formatted*) # (vi
8634     cf_format=yes
8635     cf_inboth=yes
8636     ;;
8637   *)
8638     cf_format=no
8639     cf_inboth=no
8640     ;;
8641   esac
8642
8643 test ! -d man && mkdir man
8644
8645 cf_so_strip=
8646 cf_compress=
8647 case "$MANPAGE_FORMAT" in #(vi
8648 *compress*) #(vi
8649         cf_so_strip="Z"
8650         cf_compress=compress
8651   ;;
8652 *gzip*) #(vi
8653         cf_so_strip="gz"
8654         cf_compress=gzip
8655   ;;
8656 esac
8657
8658 cf_edit_man=./edit_man.sh
8659 cf_man_alias=`pwd`/man_alias.sed
8660
8661 cat >$cf_edit_man <<CF_EOF
8662 #! /bin/sh
8663 # this script is generated by the configure-script CF_MAN_PAGES macro.
8664
8665 prefix="$cf_prefix"
8666 datadir="$datadir"
8667
8668 NCURSES_MAJOR="$NCURSES_MAJOR"
8669 NCURSES_MINOR="$NCURSES_MINOR"
8670 NCURSES_PATCH="$NCURSES_PATCH"
8671
8672 NCURSES_OSPEED="$NCURSES_OSPEED"
8673 TERMINFO="$TERMINFO"
8674
8675 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
8676
8677 INSTALL="$INSTALL"
8678 INSTALL_DATA="$INSTALL_DATA"
8679
8680 transform="$program_transform_name"
8681
8682 TMP=\${TMPDIR-/tmp}/man\$\$
8683 trap "rm -f \$TMP" 0 1 2 5 15
8684
8685 form=\$1
8686 shift || exit 1
8687
8688 verb=\$1
8689 shift || exit 1
8690
8691 mandir=\$1
8692 shift || exit 1
8693
8694 srcdir=\$1
8695 top_srcdir=\$srcdir/..
8696 shift || exit 1
8697
8698 if test "\$form" = normal ; then
8699         if test "$cf_format" = yes ; then
8700         if test "$cf_inboth" = no ; then
8701                 sh \$0 format \$verb \$mandir \$srcdir \$*
8702                 exit $?
8703         fi
8704         fi
8705         cf_subdir=\$mandir/man
8706         cf_tables=$MANPAGE_TBL
8707 else
8708         cf_subdir=\$mandir/cat
8709         cf_tables=yes
8710 fi
8711
8712 # process the list of source-files
8713 for i in \$* ; do
8714 case \$i in #(vi
8715 *.orig|*.rej) ;; #(vi
8716 *.[0-9]*)
8717         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8718         if test \$verb = installing ; then
8719         if test ! -d \$cf_subdir\${section} ; then
8720                 \$MKDIRS \$cf_subdir\$section
8721         fi
8722         fi
8723
8724         # replace variables in man page
8725         if test ! -f $cf_man_alias ; then
8726 cat >>$cf_man_alias <<-CF_EOF2
8727                 s,@DATADIR@,\$datadir,g
8728                 s,@TERMINFO@,\$TERMINFO,g
8729                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
8730                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
8731                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
8732                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
8733 CF_EOF
8734
8735         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
8736         do
8737                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8738                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8739 cat >>$cf_edit_man <<-CF_EOF
8740                 s,@$cf_NAME@,$cf_name,
8741 CF_EOF
8742         done
8743
8744 cat >>$cf_edit_man <<CF_EOF
8745 CF_EOF2
8746                 echo "...made $cf_man_alias"
8747         fi
8748
8749         aliases=
8750         cf_source=\`basename \$i\`
8751         inalias=\$cf_source
8752         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8753         if test ! -f \$inalias ; then
8754                 echo .. skipped \$cf_source
8755                 continue
8756         fi
8757 CF_EOF
8758
8759 if test "$MANPAGE_ALIASES" != no ; then
8760 cat >>$cf_edit_man <<CF_EOF
8761         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8762 CF_EOF
8763 fi
8764
8765 if test "$MANPAGE_RENAMES" = no ; then
8766 cat >>$cf_edit_man <<CF_EOF
8767         # perform program transformations for section 1 man pages
8768         if test \$section = 1 ; then
8769                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8770         else
8771                 cf_target=\$cf_subdir\${section}/\$cf_source
8772         fi
8773 CF_EOF
8774 else
8775 cat >>$cf_edit_man <<CF_EOF
8776         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8777         if test -z "\$cf_target" ; then
8778                 echo '? missing rename for '\$cf_source
8779                 cf_target="\$cf_source"
8780         fi
8781         cf_target="\$cf_subdir\${section}/\${cf_target}"
8782
8783 CF_EOF
8784 fi
8785
8786 cat >>$cf_edit_man <<CF_EOF
8787         sed     -f $cf_man_alias \\
8788 CF_EOF
8789
8790 if test -f $MANPAGE_RENAMES ; then
8791 cat >>$cf_edit_man <<CF_EOF
8792                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8793 CF_EOF
8794 else
8795 cat >>$cf_edit_man <<CF_EOF
8796                 < \$i >\$TMP
8797 CF_EOF
8798 fi
8799
8800 cat >>$cf_edit_man <<CF_EOF
8801 if test \$cf_tables = yes ; then
8802         tbl \$TMP >\$TMP.out
8803         mv \$TMP.out \$TMP
8804 fi
8805 CF_EOF
8806
8807 if test $with_curses_h != yes ; then
8808 cat >>$cf_edit_man <<CF_EOF
8809         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8810         mv \$TMP.out \$TMP
8811 CF_EOF
8812 fi
8813
8814 cat >>$cf_edit_man <<CF_EOF
8815         if test \$form = format ; then
8816                 nroff -man \$TMP >\$TMP.out
8817                 mv \$TMP.out \$TMP
8818         fi
8819 CF_EOF
8820
8821 if test -n "$cf_compress" ; then
8822 cat >>$cf_edit_man <<CF_EOF
8823         if test \$verb = installing ; then
8824         if ( $cf_compress -f \$TMP )
8825         then
8826                 mv \$TMP.$cf_so_strip \$TMP
8827         fi
8828         fi
8829         cf_target="\$cf_target.$cf_so_strip"
8830 CF_EOF
8831 fi
8832
8833 case "$MANPAGE_FORMAT" in #(vi
8834 *BSDI*)
8835 cat >>$cf_edit_man <<CF_EOF
8836         if test \$form = format ; then
8837                 # BSDI installs only .0 suffixes in the cat directories
8838                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8839         fi
8840 CF_EOF
8841   ;;
8842 esac
8843
8844 cat >>$cf_edit_man <<CF_EOF
8845         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8846         if test \$verb = installing ; then
8847                 echo \$verb \$cf_target
8848                 \$INSTALL_DATA \$TMP \$cf_target
8849                 test -d \$cf_subdir\${section} &&
8850                 test -n "\$aliases" && (
8851                         cd \$cf_subdir\${section} && (
8852                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8853                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8854                                 cf_target=\`basename \$cf_target\`
8855                                 for cf_alias in \$aliases
8856                                 do
8857                                         if test \$section = 1 ; then
8858                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8859                                         fi
8860
8861                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8862                                                 if test -f \$cf_alias\${suffix} ; then
8863                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8864                                                         then
8865                                                                 continue
8866                                                         fi
8867                                                 fi
8868                                                 echo .. \$verb alias \$cf_alias\${suffix}
8869                                                 rm -f \$cf_alias\${suffix}
8870                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8871                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8872                                                 echo ".so \$cf_source" >\$TMP
8873 CF_EOF
8874 if test -n "$cf_compress" ; then
8875 cat >>$cf_edit_man <<CF_EOF
8876                                                 if test -n "$cf_so_strip" ; then
8877                                                         $cf_compress -f \$TMP
8878                                                         mv \$TMP.$cf_so_strip \$TMP
8879                                                 fi
8880 CF_EOF
8881 fi
8882 cat >>$cf_edit_man <<CF_EOF
8883                                                 echo .. \$verb alias \$cf_alias\${suffix}
8884                                                 rm -f \$cf_alias\${suffix}
8885                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8886                                         fi
8887                                 done
8888                         )
8889                 )
8890         elif test \$verb = removing ; then
8891                 test -f \$cf_target && (
8892                         echo \$verb \$cf_target
8893                         rm -f \$cf_target
8894                 )
8895                 test -d \$cf_subdir\${section} &&
8896                 test -n "\$aliases" && (
8897                         cd \$cf_subdir\${section} && (
8898                                 for cf_alias in \$aliases
8899                                 do
8900                                         if test \$section = 1 ; then
8901                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8902                                         fi
8903
8904                                         echo .. \$verb alias \$cf_alias\${suffix}
8905                                         rm -f \$cf_alias\${suffix}
8906                                 done
8907                         )
8908                 )
8909         else
8910 #               echo ".hy 0"
8911                 cat \$TMP
8912         fi
8913         ;;
8914 esac
8915 done
8916
8917 if test $cf_inboth = yes ; then
8918 if test \$form != format ; then
8919         sh \$0 format \$verb \$mandir \$srcdir \$*
8920 fi
8921 fi
8922
8923 exit 0
8924 CF_EOF
8925 chmod 755 $cf_edit_man
8926
8927 ###############################################################################
8928
8929 ### Note that some functions (such as const) are normally disabled anyway.
8930 echo "$as_me:8930: checking if you want to build with function extensions" >&5
8931 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8932
8933 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8934 if test "${enable_ext_funcs+set}" = set; then
8935   enableval="$enable_ext_funcs"
8936   with_ext_funcs=$enableval
8937 else
8938   with_ext_funcs=yes
8939 fi;
8940 echo "$as_me:8940: result: $with_ext_funcs" >&5
8941 echo "${ECHO_T}$with_ext_funcs" >&6
8942 if test "$with_ext_funcs" = yes ; then
8943         NCURSES_EXT_FUNCS=1
8944         cat >>confdefs.h <<\EOF
8945 #define HAVE_CURSES_VERSION 1
8946 EOF
8947
8948         cat >>confdefs.h <<\EOF
8949 #define HAVE_HAS_KEY 1
8950 EOF
8951
8952         cat >>confdefs.h <<\EOF
8953 #define HAVE_RESIZETERM 1
8954 EOF
8955
8956         cat >>confdefs.h <<\EOF
8957 #define HAVE_RESIZE_TERM 1
8958 EOF
8959
8960         cat >>confdefs.h <<\EOF
8961 #define HAVE_USE_DEFAULT_COLORS 1
8962 EOF
8963
8964         cat >>confdefs.h <<\EOF
8965 #define HAVE_WRESIZE 1
8966 EOF
8967
8968         cat >>confdefs.h <<\EOF
8969 #define NCURSES_EXT_FUNCS 1
8970 EOF
8971
8972 else
8973         NCURSES_EXT_FUNCS=0
8974 fi
8975
8976 ###   use option --enable-const to turn on use of const beyond that in XSI.
8977 echo "$as_me:8977: checking for extended use of const keyword" >&5
8978 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8979
8980 # Check whether --enable-const or --disable-const was given.
8981 if test "${enable_const+set}" = set; then
8982   enableval="$enable_const"
8983   with_ext_const=$enableval
8984 else
8985   with_ext_const=no
8986 fi;
8987 echo "$as_me:8987: result: $with_ext_const" >&5
8988 echo "${ECHO_T}$with_ext_const" >&6
8989 NCURSES_CONST='/*nothing*/'
8990 if test "$with_ext_const" = yes ; then
8991         NCURSES_CONST=const
8992 fi
8993
8994 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8995 echo "$as_me:8995: checking if you want to use extended colors" >&5
8996 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
8997
8998 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8999 if test "${enable_ext_colors+set}" = set; then
9000   enableval="$enable_ext_colors"
9001   with_ext_colors=$enableval
9002 else
9003   with_ext_colors=no
9004 fi;
9005 echo "$as_me:9005: result: $with_ext_colors" >&5
9006 echo "${ECHO_T}$with_ext_colors" >&6
9007 NCURSES_EXT_COLORS=0
9008 if test "$with_ext_colors" = yes ; then
9009         if test "$with_widec" != yes ; then
9010                 { { echo "$as_me:9010: error: This option applies only to wide-character library" >&5
9011 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9012    { (exit 1); exit 1; }; }
9013         else
9014                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9015
9016 if test "${with_abi_version+set}" != set; then
9017         case $cf_cv_rel_version in
9018         5.*)
9019                 cf_cv_rel_version=6.0
9020                 cf_cv_abi_version=6
9021                 { echo "$as_me:9021: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9022 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9023                 ;;
9024         esac
9025 fi
9026
9027         fi
9028         NCURSES_EXT_COLORS=1
9029         cat >>confdefs.h <<\EOF
9030 #define NCURSES_EXT_COLORS 1
9031 EOF
9032
9033 fi
9034
9035 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9036 echo "$as_me:9036: checking if you want to use extended mouse encoding" >&5
9037 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9038
9039 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9040 if test "${enable_ext_mouse+set}" = set; then
9041   enableval="$enable_ext_mouse"
9042   with_ext_mouse=$enableval
9043 else
9044   with_ext_mouse=no
9045 fi;
9046 echo "$as_me:9046: result: $with_ext_mouse" >&5
9047 echo "${ECHO_T}$with_ext_mouse" >&6
9048 NCURSES_MOUSE_VERSION=1
9049 if test "$with_ext_mouse" = yes ; then
9050         NCURSES_MOUSE_VERSION=2
9051
9052 if test "${with_abi_version+set}" != set; then
9053         case $cf_cv_rel_version in
9054         5.*)
9055                 cf_cv_rel_version=6.0
9056                 cf_cv_abi_version=6
9057                 { echo "$as_me:9057: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9058 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9059                 ;;
9060         esac
9061 fi
9062
9063 fi
9064
9065 echo "$as_me:9065: checking if you want \$NCURSES_NO_PADDING code" >&5
9066 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9067
9068 # Check whether --enable-no-padding or --disable-no-padding was given.
9069 if test "${enable_no_padding+set}" = set; then
9070   enableval="$enable_no_padding"
9071   with_no_padding=$enableval
9072 else
9073   with_no_padding=$with_ext_funcs
9074 fi;
9075 echo "$as_me:9075: result: $with_no_padding" >&5
9076 echo "${ECHO_T}$with_no_padding" >&6
9077 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9078 #define NCURSES_NO_PADDING 1
9079 EOF
9080
9081 echo "$as_me:9081: checking for ANSI C header files" >&5
9082 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9083 if test "${ac_cv_header_stdc+set}" = set; then
9084   echo $ECHO_N "(cached) $ECHO_C" >&6
9085 else
9086   cat >conftest.$ac_ext <<_ACEOF
9087 #line 9087 "configure"
9088 #include "confdefs.h"
9089 #include <stdlib.h>
9090 #include <stdarg.h>
9091 #include <string.h>
9092 #include <float.h>
9093
9094 _ACEOF
9095 if { (eval echo "$as_me:9095: \"$ac_cpp conftest.$ac_ext\"") >&5
9096   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9097   ac_status=$?
9098   egrep -v '^ *\+' conftest.er1 >conftest.err
9099   rm -f conftest.er1
9100   cat conftest.err >&5
9101   echo "$as_me:9101: \$? = $ac_status" >&5
9102   (exit $ac_status); } >/dev/null; then
9103   if test -s conftest.err; then
9104     ac_cpp_err=$ac_c_preproc_warn_flag
9105   else
9106     ac_cpp_err=
9107   fi
9108 else
9109   ac_cpp_err=yes
9110 fi
9111 if test -z "$ac_cpp_err"; then
9112   ac_cv_header_stdc=yes
9113 else
9114   echo "$as_me: failed program was:" >&5
9115   cat conftest.$ac_ext >&5
9116   ac_cv_header_stdc=no
9117 fi
9118 rm -f conftest.err conftest.$ac_ext
9119
9120 if test $ac_cv_header_stdc = yes; then
9121   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9122   cat >conftest.$ac_ext <<_ACEOF
9123 #line 9123 "configure"
9124 #include "confdefs.h"
9125 #include <string.h>
9126
9127 _ACEOF
9128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9129   egrep "memchr" >/dev/null 2>&1; then
9130   :
9131 else
9132   ac_cv_header_stdc=no
9133 fi
9134 rm -f conftest*
9135
9136 fi
9137
9138 if test $ac_cv_header_stdc = yes; then
9139   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9140   cat >conftest.$ac_ext <<_ACEOF
9141 #line 9141 "configure"
9142 #include "confdefs.h"
9143 #include <stdlib.h>
9144
9145 _ACEOF
9146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9147   egrep "free" >/dev/null 2>&1; then
9148   :
9149 else
9150   ac_cv_header_stdc=no
9151 fi
9152 rm -f conftest*
9153
9154 fi
9155
9156 if test $ac_cv_header_stdc = yes; then
9157   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9158   if test "$cross_compiling" = yes; then
9159   :
9160 else
9161   cat >conftest.$ac_ext <<_ACEOF
9162 #line 9162 "configure"
9163 #include "confdefs.h"
9164 #include <ctype.h>
9165 #if ((' ' & 0x0FF) == 0x020)
9166 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9167 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9168 #else
9169 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9170                      || ('j' <= (c) && (c) <= 'r') \
9171                      || ('s' <= (c) && (c) <= 'z'))
9172 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9173 #endif
9174
9175 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9176 int
9177 main ()
9178 {
9179   int i;
9180   for (i = 0; i < 256; i++)
9181     if (XOR (islower (i), ISLOWER (i))
9182         || toupper (i) != TOUPPER (i))
9183       $ac_main_return(2);
9184   $ac_main_return (0);
9185 }
9186 _ACEOF
9187 rm -f conftest$ac_exeext
9188 if { (eval echo "$as_me:9188: \"$ac_link\"") >&5
9189   (eval $ac_link) 2>&5
9190   ac_status=$?
9191   echo "$as_me:9191: \$? = $ac_status" >&5
9192   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9193   { (eval echo "$as_me:9193: \"$ac_try\"") >&5
9194   (eval $ac_try) 2>&5
9195   ac_status=$?
9196   echo "$as_me:9196: \$? = $ac_status" >&5
9197   (exit $ac_status); }; }; then
9198   :
9199 else
9200   echo "$as_me: program exited with status $ac_status" >&5
9201 echo "$as_me: failed program was:" >&5
9202 cat conftest.$ac_ext >&5
9203 ac_cv_header_stdc=no
9204 fi
9205 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9206 fi
9207 fi
9208 fi
9209 echo "$as_me:9209: result: $ac_cv_header_stdc" >&5
9210 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9211 if test $ac_cv_header_stdc = yes; then
9212
9213 cat >>confdefs.h <<\EOF
9214 #define STDC_HEADERS 1
9215 EOF
9216
9217 fi
9218
9219 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9220
9221 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9222                   inttypes.h stdint.h unistd.h
9223 do
9224 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9225 echo "$as_me:9225: checking for $ac_header" >&5
9226 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9227 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9228   echo $ECHO_N "(cached) $ECHO_C" >&6
9229 else
9230   cat >conftest.$ac_ext <<_ACEOF
9231 #line 9231 "configure"
9232 #include "confdefs.h"
9233 $ac_includes_default
9234 #include <$ac_header>
9235 _ACEOF
9236 rm -f conftest.$ac_objext
9237 if { (eval echo "$as_me:9237: \"$ac_compile\"") >&5
9238   (eval $ac_compile) 2>&5
9239   ac_status=$?
9240   echo "$as_me:9240: \$? = $ac_status" >&5
9241   (exit $ac_status); } &&
9242          { ac_try='test -s conftest.$ac_objext'
9243   { (eval echo "$as_me:9243: \"$ac_try\"") >&5
9244   (eval $ac_try) 2>&5
9245   ac_status=$?
9246   echo "$as_me:9246: \$? = $ac_status" >&5
9247   (exit $ac_status); }; }; then
9248   eval "$as_ac_Header=yes"
9249 else
9250   echo "$as_me: failed program was:" >&5
9251 cat conftest.$ac_ext >&5
9252 eval "$as_ac_Header=no"
9253 fi
9254 rm -f conftest.$ac_objext conftest.$ac_ext
9255 fi
9256 echo "$as_me:9256: result: `eval echo '${'$as_ac_Header'}'`" >&5
9257 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9258 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9259   cat >>confdefs.h <<EOF
9260 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9261 EOF
9262
9263 fi
9264 done
9265
9266 echo "$as_me:9266: checking for signed char" >&5
9267 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9268 if test "${ac_cv_type_signed_char+set}" = set; then
9269   echo $ECHO_N "(cached) $ECHO_C" >&6
9270 else
9271   cat >conftest.$ac_ext <<_ACEOF
9272 #line 9272 "configure"
9273 #include "confdefs.h"
9274 $ac_includes_default
9275 int
9276 main ()
9277 {
9278 if ((signed char *) 0)
9279   return 0;
9280 if (sizeof (signed char))
9281   return 0;
9282   ;
9283   return 0;
9284 }
9285 _ACEOF
9286 rm -f conftest.$ac_objext
9287 if { (eval echo "$as_me:9287: \"$ac_compile\"") >&5
9288   (eval $ac_compile) 2>&5
9289   ac_status=$?
9290   echo "$as_me:9290: \$? = $ac_status" >&5
9291   (exit $ac_status); } &&
9292          { ac_try='test -s conftest.$ac_objext'
9293   { (eval echo "$as_me:9293: \"$ac_try\"") >&5
9294   (eval $ac_try) 2>&5
9295   ac_status=$?
9296   echo "$as_me:9296: \$? = $ac_status" >&5
9297   (exit $ac_status); }; }; then
9298   ac_cv_type_signed_char=yes
9299 else
9300   echo "$as_me: failed program was:" >&5
9301 cat conftest.$ac_ext >&5
9302 ac_cv_type_signed_char=no
9303 fi
9304 rm -f conftest.$ac_objext conftest.$ac_ext
9305 fi
9306 echo "$as_me:9306: result: $ac_cv_type_signed_char" >&5
9307 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9308
9309 echo "$as_me:9309: checking size of signed char" >&5
9310 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9311 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9312   echo $ECHO_N "(cached) $ECHO_C" >&6
9313 else
9314   if test "$ac_cv_type_signed_char" = yes; then
9315   if test "$cross_compiling" = yes; then
9316   # Depending upon the size, compute the lo and hi bounds.
9317 cat >conftest.$ac_ext <<_ACEOF
9318 #line 9318 "configure"
9319 #include "confdefs.h"
9320 $ac_includes_default
9321 int
9322 main ()
9323 {
9324 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9325   ;
9326   return 0;
9327 }
9328 _ACEOF
9329 rm -f conftest.$ac_objext
9330 if { (eval echo "$as_me:9330: \"$ac_compile\"") >&5
9331   (eval $ac_compile) 2>&5
9332   ac_status=$?
9333   echo "$as_me:9333: \$? = $ac_status" >&5
9334   (exit $ac_status); } &&
9335          { ac_try='test -s conftest.$ac_objext'
9336   { (eval echo "$as_me:9336: \"$ac_try\"") >&5
9337   (eval $ac_try) 2>&5
9338   ac_status=$?
9339   echo "$as_me:9339: \$? = $ac_status" >&5
9340   (exit $ac_status); }; }; then
9341   ac_lo=0 ac_mid=0
9342   while :; do
9343     cat >conftest.$ac_ext <<_ACEOF
9344 #line 9344 "configure"
9345 #include "confdefs.h"
9346 $ac_includes_default
9347 int
9348 main ()
9349 {
9350 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9351   ;
9352   return 0;
9353 }
9354 _ACEOF
9355 rm -f conftest.$ac_objext
9356 if { (eval echo "$as_me:9356: \"$ac_compile\"") >&5
9357   (eval $ac_compile) 2>&5
9358   ac_status=$?
9359   echo "$as_me:9359: \$? = $ac_status" >&5
9360   (exit $ac_status); } &&
9361          { ac_try='test -s conftest.$ac_objext'
9362   { (eval echo "$as_me:9362: \"$ac_try\"") >&5
9363   (eval $ac_try) 2>&5
9364   ac_status=$?
9365   echo "$as_me:9365: \$? = $ac_status" >&5
9366   (exit $ac_status); }; }; then
9367   ac_hi=$ac_mid; break
9368 else
9369   echo "$as_me: failed program was:" >&5
9370 cat conftest.$ac_ext >&5
9371 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9372 fi
9373 rm -f conftest.$ac_objext conftest.$ac_ext
9374   done
9375 else
9376   echo "$as_me: failed program was:" >&5
9377 cat conftest.$ac_ext >&5
9378 ac_hi=-1 ac_mid=-1
9379   while :; do
9380     cat >conftest.$ac_ext <<_ACEOF
9381 #line 9381 "configure"
9382 #include "confdefs.h"
9383 $ac_includes_default
9384 int
9385 main ()
9386 {
9387 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9388   ;
9389   return 0;
9390 }
9391 _ACEOF
9392 rm -f conftest.$ac_objext
9393 if { (eval echo "$as_me:9393: \"$ac_compile\"") >&5
9394   (eval $ac_compile) 2>&5
9395   ac_status=$?
9396   echo "$as_me:9396: \$? = $ac_status" >&5
9397   (exit $ac_status); } &&
9398          { ac_try='test -s conftest.$ac_objext'
9399   { (eval echo "$as_me:9399: \"$ac_try\"") >&5
9400   (eval $ac_try) 2>&5
9401   ac_status=$?
9402   echo "$as_me:9402: \$? = $ac_status" >&5
9403   (exit $ac_status); }; }; then
9404   ac_lo=$ac_mid; break
9405 else
9406   echo "$as_me: failed program was:" >&5
9407 cat conftest.$ac_ext >&5
9408 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9409 fi
9410 rm -f conftest.$ac_objext conftest.$ac_ext
9411   done
9412 fi
9413 rm -f conftest.$ac_objext conftest.$ac_ext
9414 # Binary search between lo and hi bounds.
9415 while test "x$ac_lo" != "x$ac_hi"; do
9416   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9417   cat >conftest.$ac_ext <<_ACEOF
9418 #line 9418 "configure"
9419 #include "confdefs.h"
9420 $ac_includes_default
9421 int
9422 main ()
9423 {
9424 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9425   ;
9426   return 0;
9427 }
9428 _ACEOF
9429 rm -f conftest.$ac_objext
9430 if { (eval echo "$as_me:9430: \"$ac_compile\"") >&5
9431   (eval $ac_compile) 2>&5
9432   ac_status=$?
9433   echo "$as_me:9433: \$? = $ac_status" >&5
9434   (exit $ac_status); } &&
9435          { ac_try='test -s conftest.$ac_objext'
9436   { (eval echo "$as_me:9436: \"$ac_try\"") >&5
9437   (eval $ac_try) 2>&5
9438   ac_status=$?
9439   echo "$as_me:9439: \$? = $ac_status" >&5
9440   (exit $ac_status); }; }; then
9441   ac_hi=$ac_mid
9442 else
9443   echo "$as_me: failed program was:" >&5
9444 cat conftest.$ac_ext >&5
9445 ac_lo=`expr $ac_mid + 1`
9446 fi
9447 rm -f conftest.$ac_objext conftest.$ac_ext
9448 done
9449 ac_cv_sizeof_signed_char=$ac_lo
9450 else
9451   if test "$cross_compiling" = yes; then
9452   { { echo "$as_me:9452: error: cannot run test program while cross compiling" >&5
9453 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9454    { (exit 1); exit 1; }; }
9455 else
9456   cat >conftest.$ac_ext <<_ACEOF
9457 #line 9457 "configure"
9458 #include "confdefs.h"
9459 $ac_includes_default
9460 int
9461 main ()
9462 {
9463 FILE *f = fopen ("conftest.val", "w");
9464 if (!f)
9465   $ac_main_return (1);
9466 fprintf (f, "%d", (sizeof (signed char)));
9467 fclose (f);
9468   ;
9469   return 0;
9470 }
9471 _ACEOF
9472 rm -f conftest$ac_exeext
9473 if { (eval echo "$as_me:9473: \"$ac_link\"") >&5
9474   (eval $ac_link) 2>&5
9475   ac_status=$?
9476   echo "$as_me:9476: \$? = $ac_status" >&5
9477   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9478   { (eval echo "$as_me:9478: \"$ac_try\"") >&5
9479   (eval $ac_try) 2>&5
9480   ac_status=$?
9481   echo "$as_me:9481: \$? = $ac_status" >&5
9482   (exit $ac_status); }; }; then
9483   ac_cv_sizeof_signed_char=`cat conftest.val`
9484 else
9485   echo "$as_me: program exited with status $ac_status" >&5
9486 echo "$as_me: failed program was:" >&5
9487 cat conftest.$ac_ext >&5
9488 fi
9489 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9490 fi
9491 fi
9492 rm -f conftest.val
9493 else
9494   ac_cv_sizeof_signed_char=0
9495 fi
9496 fi
9497 echo "$as_me:9497: result: $ac_cv_sizeof_signed_char" >&5
9498 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9499 cat >>confdefs.h <<EOF
9500 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9501 EOF
9502
9503 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9504         NCURSES_SBOOL="signed char"
9505 else
9506         NCURSES_SBOOL="char"
9507 fi
9508 echo "$as_me:9508: checking if you want to use signed Boolean array in term.h" >&5
9509 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9510
9511 # Check whether --enable-signed-char or --disable-signed-char was given.
9512 if test "${enable_signed_char+set}" = set; then
9513   enableval="$enable_signed_char"
9514   with_signed_char=$enableval
9515 else
9516   with_signed_char=no
9517 fi;
9518 echo "$as_me:9518: result: $with_signed_char" >&5
9519 echo "${ECHO_T}$with_signed_char" >&6
9520 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9521
9522 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9523 echo "$as_me:9523: checking if you want SIGWINCH handler" >&5
9524 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9525
9526 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9527 if test "${enable_sigwinch+set}" = set; then
9528   enableval="$enable_sigwinch"
9529   with_sigwinch=$enableval
9530 else
9531   with_sigwinch=$with_ext_funcs
9532 fi;
9533 echo "$as_me:9533: result: $with_sigwinch" >&5
9534 echo "${ECHO_T}$with_sigwinch" >&6
9535 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9536 #define USE_SIGWINCH 1
9537 EOF
9538
9539 ###   use option --enable-tcap-names to allow user to define new capabilities
9540 echo "$as_me:9540: checking if you want user-definable terminal capabilities like termcap" >&5
9541 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9542
9543 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9544 if test "${enable_tcap_names+set}" = set; then
9545   enableval="$enable_tcap_names"
9546   with_tcap_names=$enableval
9547 else
9548   with_tcap_names=$with_ext_funcs
9549 fi;
9550 echo "$as_me:9550: result: $with_tcap_names" >&5
9551 echo "${ECHO_T}$with_tcap_names" >&6
9552 NCURSES_XNAMES=0
9553 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9554
9555 ###############################################################################
9556 # These options are relatively safe to experiment with.
9557
9558 echo "$as_me:9558: checking if you want all development code" >&5
9559 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9560
9561 # Check whether --with-develop or --without-develop was given.
9562 if test "${with_develop+set}" = set; then
9563   withval="$with_develop"
9564   with_develop=$withval
9565 else
9566   with_develop=no
9567 fi;
9568 echo "$as_me:9568: result: $with_develop" >&5
9569 echo "${ECHO_T}$with_develop" >&6
9570
9571 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9572 echo "$as_me:9572: checking if you want hard-tabs code" >&5
9573 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9574
9575 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9576 if test "${enable_hard_tabs+set}" = set; then
9577   enableval="$enable_hard_tabs"
9578
9579 else
9580   enable_hard_tabs=$with_develop
9581 fi;
9582 echo "$as_me:9582: result: $enable_hard_tabs" >&5
9583 echo "${ECHO_T}$enable_hard_tabs" >&6
9584 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9585 #define USE_HARD_TABS 1
9586 EOF
9587
9588 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9589 echo "$as_me:9589: checking if you want limited support for xmc" >&5
9590 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9591
9592 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9593 if test "${enable_xmc_glitch+set}" = set; then
9594   enableval="$enable_xmc_glitch"
9595
9596 else
9597   enable_xmc_glitch=$with_develop
9598 fi;
9599 echo "$as_me:9599: result: $enable_xmc_glitch" >&5
9600 echo "${ECHO_T}$enable_xmc_glitch" >&6
9601 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9602 #define USE_XMC_SUPPORT 1
9603 EOF
9604
9605 ###############################################################################
9606 # These are just experimental, probably should not be in a package:
9607
9608 echo "$as_me:9608: checking if you do not want to assume colors are white-on-black" >&5
9609 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9610
9611 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9612 if test "${enable_assumed_color+set}" = set; then
9613   enableval="$enable_assumed_color"
9614   with_assumed_color=$enableval
9615 else
9616   with_assumed_color=yes
9617 fi;
9618 echo "$as_me:9618: result: $with_assumed_color" >&5
9619 echo "${ECHO_T}$with_assumed_color" >&6
9620 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9621 #define USE_ASSUMED_COLOR 1
9622 EOF
9623
9624 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9625 echo "$as_me:9625: checking if you want hashmap scrolling-optimization code" >&5
9626 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9627
9628 # Check whether --enable-hashmap or --disable-hashmap was given.
9629 if test "${enable_hashmap+set}" = set; then
9630   enableval="$enable_hashmap"
9631   with_hashmap=$enableval
9632 else
9633   with_hashmap=yes
9634 fi;
9635 echo "$as_me:9635: result: $with_hashmap" >&5
9636 echo "${ECHO_T}$with_hashmap" >&6
9637 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9638 #define USE_HASHMAP 1
9639 EOF
9640
9641 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9642 echo "$as_me:9642: checking if you want colorfgbg code" >&5
9643 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9644
9645 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9646 if test "${enable_colorfgbg+set}" = set; then
9647   enableval="$enable_colorfgbg"
9648   with_colorfgbg=$enableval
9649 else
9650   with_colorfgbg=no
9651 fi;
9652 echo "$as_me:9652: result: $with_colorfgbg" >&5
9653 echo "${ECHO_T}$with_colorfgbg" >&6
9654 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9655 #define USE_COLORFGBG 1
9656 EOF
9657
9658 # This is still experimental (20080329), but should ultimately be moved to
9659 # the script-block --with-normal, etc.
9660
9661 echo "$as_me:9661: checking if you want to link with the pthread library" >&5
9662 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9663
9664 # Check whether --with-pthread or --without-pthread was given.
9665 if test "${with_pthread+set}" = set; then
9666   withval="$with_pthread"
9667   with_pthread=$withval
9668 else
9669   with_pthread=no
9670 fi;
9671 echo "$as_me:9671: result: $with_pthread" >&5
9672 echo "${ECHO_T}$with_pthread" >&6
9673
9674 if test "$with_pthread" != no ; then
9675     echo "$as_me:9675: checking for pthread.h" >&5
9676 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9677 if test "${ac_cv_header_pthread_h+set}" = set; then
9678   echo $ECHO_N "(cached) $ECHO_C" >&6
9679 else
9680   cat >conftest.$ac_ext <<_ACEOF
9681 #line 9681 "configure"
9682 #include "confdefs.h"
9683 #include <pthread.h>
9684 _ACEOF
9685 if { (eval echo "$as_me:9685: \"$ac_cpp conftest.$ac_ext\"") >&5
9686   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9687   ac_status=$?
9688   egrep -v '^ *\+' conftest.er1 >conftest.err
9689   rm -f conftest.er1
9690   cat conftest.err >&5
9691   echo "$as_me:9691: \$? = $ac_status" >&5
9692   (exit $ac_status); } >/dev/null; then
9693   if test -s conftest.err; then
9694     ac_cpp_err=$ac_c_preproc_warn_flag
9695   else
9696     ac_cpp_err=
9697   fi
9698 else
9699   ac_cpp_err=yes
9700 fi
9701 if test -z "$ac_cpp_err"; then
9702   ac_cv_header_pthread_h=yes
9703 else
9704   echo "$as_me: failed program was:" >&5
9705   cat conftest.$ac_ext >&5
9706   ac_cv_header_pthread_h=no
9707 fi
9708 rm -f conftest.err conftest.$ac_ext
9709 fi
9710 echo "$as_me:9710: result: $ac_cv_header_pthread_h" >&5
9711 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9712 if test $ac_cv_header_pthread_h = yes; then
9713
9714         cat >>confdefs.h <<\EOF
9715 #define HAVE_PTHREADS_H 1
9716 EOF
9717
9718         echo "$as_me:9718: checking if we can link with the pthread library" >&5
9719 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9720         cf_save_LIBS="$LIBS"
9721         LIBS="-lpthread $LIBS"
9722         cat >conftest.$ac_ext <<_ACEOF
9723 #line 9723 "configure"
9724 #include "confdefs.h"
9725
9726 #include <pthread.h>
9727
9728 int
9729 main ()
9730 {
9731
9732         int rc = pthread_create(0,0,0,0);
9733
9734   ;
9735   return 0;
9736 }
9737 _ACEOF
9738 rm -f conftest.$ac_objext conftest$ac_exeext
9739 if { (eval echo "$as_me:9739: \"$ac_link\"") >&5
9740   (eval $ac_link) 2>&5
9741   ac_status=$?
9742   echo "$as_me:9742: \$? = $ac_status" >&5
9743   (exit $ac_status); } &&
9744          { ac_try='test -s conftest$ac_exeext'
9745   { (eval echo "$as_me:9745: \"$ac_try\"") >&5
9746   (eval $ac_try) 2>&5
9747   ac_status=$?
9748   echo "$as_me:9748: \$? = $ac_status" >&5
9749   (exit $ac_status); }; }; then
9750   with_pthread=yes
9751 else
9752   echo "$as_me: failed program was:" >&5
9753 cat conftest.$ac_ext >&5
9754 with_pthread=no
9755 fi
9756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9757         LIBS="$cf_save_LIBS"
9758         echo "$as_me:9758: result: $with_pthread" >&5
9759 echo "${ECHO_T}$with_pthread" >&6
9760
9761         if test "$with_pthread" = yes ; then
9762             LIBS="-lpthread $LIBS"
9763             cat >>confdefs.h <<\EOF
9764 #define HAVE_LIBPTHREADS 1
9765 EOF
9766
9767         else
9768             { { echo "$as_me:9768: error: Cannot link with pthread library" >&5
9769 echo "$as_me: error: Cannot link with pthread library" >&2;}
9770    { (exit 1); exit 1; }; }
9771         fi
9772
9773 fi
9774
9775 fi
9776
9777 echo "$as_me:9777: checking if you want to use weak-symbols for pthreads" >&5
9778 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9779
9780 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9781 if test "${enable_weak_symbols+set}" = set; then
9782   enableval="$enable_weak_symbols"
9783   use_weak_symbols=$withval
9784 else
9785   use_weak_symbols=no
9786 fi;
9787 echo "$as_me:9787: result: $use_weak_symbols" >&5
9788 echo "${ECHO_T}$use_weak_symbols" >&6
9789 if test "$use_weak_symbols" = yes ; then
9790
9791 echo "$as_me:9791: checking if $CC supports weak symbols" >&5
9792 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9793 if test "${cf_cv_weak_symbols+set}" = set; then
9794   echo $ECHO_N "(cached) $ECHO_C" >&6
9795 else
9796
9797 cat >conftest.$ac_ext <<_ACEOF
9798 #line 9798 "configure"
9799 #include "confdefs.h"
9800
9801 #include <stdio.h>
9802 int
9803 main ()
9804 {
9805
9806 #if defined(__GNUC__)
9807 #  if defined __USE_ISOC99
9808 #    define _cat_pragma(exp)    _Pragma(#exp)
9809 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9810 #  else
9811 #    define _weak_pragma(exp)
9812 #  endif
9813 #  define _declare(name)        __extension__ extern __typeof__(name) name
9814 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9815 #endif
9816
9817 weak_symbol(fopen);
9818
9819   ;
9820   return 0;
9821 }
9822 _ACEOF
9823 rm -f conftest.$ac_objext
9824 if { (eval echo "$as_me:9824: \"$ac_compile\"") >&5
9825   (eval $ac_compile) 2>&5
9826   ac_status=$?
9827   echo "$as_me:9827: \$? = $ac_status" >&5
9828   (exit $ac_status); } &&
9829          { ac_try='test -s conftest.$ac_objext'
9830   { (eval echo "$as_me:9830: \"$ac_try\"") >&5
9831   (eval $ac_try) 2>&5
9832   ac_status=$?
9833   echo "$as_me:9833: \$? = $ac_status" >&5
9834   (exit $ac_status); }; }; then
9835   cf_cv_weak_symbols=yes
9836 else
9837   echo "$as_me: failed program was:" >&5
9838 cat conftest.$ac_ext >&5
9839 cf_cv_weak_symbols=no
9840 fi
9841 rm -f conftest.$ac_objext conftest.$ac_ext
9842
9843 fi
9844 echo "$as_me:9844: result: $cf_cv_weak_symbols" >&5
9845 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9846
9847 else
9848     cf_cv_weak_symbols=no
9849 fi
9850
9851 if test $cf_cv_weak_symbols = yes ; then
9852     cat >>confdefs.h <<\EOF
9853 #define USE_WEAK_SYMBOLS 1
9854 EOF
9855
9856 fi
9857
9858 PTHREAD=
9859 if test "$with_pthread" = "yes" ; then
9860     cat >>confdefs.h <<\EOF
9861 #define USE_PTHREADS 1
9862 EOF
9863
9864     enable_reentrant=yes
9865     if test $cf_cv_weak_symbols = yes ; then
9866         PTHREAD=-lpthread
9867     fi
9868 fi
9869
9870 # Reentrant code has to be opaque; there's little advantage to making ncurses
9871 # opaque outside of that, so there is no --enable-opaque option.  We can use
9872 # this option without --with-pthreads, but this will be always set for
9873 # pthreads.
9874 echo "$as_me:9874: checking if you want experimental reentrant code" >&5
9875 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9876
9877 # Check whether --enable-reentrant or --disable-reentrant was given.
9878 if test "${enable_reentrant+set}" = set; then
9879   enableval="$enable_reentrant"
9880   with_reentrant=$enableval
9881 else
9882   with_reentrant=no
9883 fi;
9884 echo "$as_me:9884: result: $with_reentrant" >&5
9885 echo "${ECHO_T}$with_reentrant" >&6
9886 if test "$with_reentrant" = yes ; then
9887         cf_cv_enable_reentrant=1
9888         cf_cv_enable_opaque="NCURSES_INTERNALS"
9889         NCURSES_OPAQUE=1
9890         NCURSES_SIZE_T=int
9891     if test $cf_cv_weak_symbols = yes ; then
9892
9893 # remove pthread library from $LIBS
9894 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9895
9896     else
9897         LIB_SUFFIX="t${LIB_SUFFIX}"
9898     fi
9899         cat >>confdefs.h <<\EOF
9900 #define USE_REENTRANT 1
9901 EOF
9902
9903 if test "${with_abi_version+set}" != set; then
9904         case $cf_cv_rel_version in
9905         5.*)
9906                 cf_cv_rel_version=6.0
9907                 cf_cv_abi_version=6
9908                 { echo "$as_me:9908: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9909 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9910                 ;;
9911         esac
9912 fi
9913
9914 else
9915         cf_cv_enable_reentrant=0
9916         cf_cv_enable_opaque="NCURSES_OPAQUE"
9917         NCURSES_OPAQUE=0
9918         NCURSES_SIZE_T=short
9919 fi
9920
9921 echo "$as_me:9921: checking if you want experimental safe-sprintf code" >&5
9922 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9923
9924 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9925 if test "${enable_safe_sprintf+set}" = set; then
9926   enableval="$enable_safe_sprintf"
9927   with_safe_sprintf=$enableval
9928 else
9929   with_safe_sprintf=no
9930 fi;
9931 echo "$as_me:9931: result: $with_safe_sprintf" >&5
9932 echo "${ECHO_T}$with_safe_sprintf" >&6
9933 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9934 #define USE_SAFE_SPRINTF 1
9935 EOF
9936
9937 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9938 # when hashmap is used scroll hints are useless
9939 if test "$with_hashmap" = no ; then
9940 echo "$as_me:9940: checking if you want to experiment without scrolling-hints code" >&5
9941 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9942
9943 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9944 if test "${enable_scroll_hints+set}" = set; then
9945   enableval="$enable_scroll_hints"
9946   with_scroll_hints=$enableval
9947 else
9948   with_scroll_hints=yes
9949 fi;
9950 echo "$as_me:9950: result: $with_scroll_hints" >&5
9951 echo "${ECHO_T}$with_scroll_hints" >&6
9952 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9953 #define USE_SCROLL_HINTS 1
9954 EOF
9955
9956 fi
9957
9958 echo "$as_me:9958: checking if you want experimental wgetch-events code" >&5
9959 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9960
9961 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9962 if test "${enable_wgetch_events+set}" = set; then
9963   enableval="$enable_wgetch_events"
9964   with_wgetch_events=$enableval
9965 else
9966   with_wgetch_events=no
9967 fi;
9968 echo "$as_me:9968: result: $with_wgetch_events" >&5
9969 echo "${ECHO_T}$with_wgetch_events" >&6
9970 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9971 #define NCURSES_WGETCH_EVENTS 1
9972 EOF
9973
9974 ###############################################################################
9975
9976 ###     use option --disable-echo to suppress full display compiling commands
9977 echo "$as_me:9977: checking if you want to display full commands during build" >&5
9978 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9979
9980 # Check whether --enable-echo or --disable-echo was given.
9981 if test "${enable_echo+set}" = set; then
9982   enableval="$enable_echo"
9983   with_echo=$enableval
9984 else
9985   with_echo=yes
9986 fi;
9987 if test "$with_echo" = yes; then
9988         ECHO_LINK=
9989 else
9990         ECHO_LINK='@ echo linking $@ ... ;'
9991         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9992         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
9993 fi
9994 echo "$as_me:9994: result: $with_echo" >&5
9995 echo "${ECHO_T}$with_echo" >&6
9996
9997 ###     use option --enable-warnings to turn on all gcc warnings
9998 echo "$as_me:9998: checking if you want to see compiler warnings" >&5
9999 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10000
10001 # Check whether --enable-warnings or --disable-warnings was given.
10002 if test "${enable_warnings+set}" = set; then
10003   enableval="$enable_warnings"
10004   with_warnings=$enableval
10005 fi;
10006 echo "$as_me:10006: result: $with_warnings" >&5
10007 echo "${ECHO_T}$with_warnings" >&6
10008
10009 if test "x$with_warnings" = "xyes"; then
10010         ADAFLAGS="$ADAFLAGS -gnatg"
10011
10012 INTEL_COMPILER=no
10013
10014 if test "$GCC" = yes ; then
10015         case $host_os in
10016         linux*|gnu*)
10017                 echo "$as_me:10017: checking if this is really Intel C compiler" >&5
10018 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10019                 cf_save_CFLAGS="$CFLAGS"
10020                 CFLAGS="$CFLAGS -no-gcc"
10021                 cat >conftest.$ac_ext <<_ACEOF
10022 #line 10022 "configure"
10023 #include "confdefs.h"
10024
10025 int
10026 main ()
10027 {
10028
10029 #ifdef __INTEL_COMPILER
10030 #else
10031 make an error
10032 #endif
10033
10034   ;
10035   return 0;
10036 }
10037 _ACEOF
10038 rm -f conftest.$ac_objext
10039 if { (eval echo "$as_me:10039: \"$ac_compile\"") >&5
10040   (eval $ac_compile) 2>&5
10041   ac_status=$?
10042   echo "$as_me:10042: \$? = $ac_status" >&5
10043   (exit $ac_status); } &&
10044          { ac_try='test -s conftest.$ac_objext'
10045   { (eval echo "$as_me:10045: \"$ac_try\"") >&5
10046   (eval $ac_try) 2>&5
10047   ac_status=$?
10048   echo "$as_me:10048: \$? = $ac_status" >&5
10049   (exit $ac_status); }; }; then
10050   INTEL_COMPILER=yes
10051 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10052
10053 else
10054   echo "$as_me: failed program was:" >&5
10055 cat conftest.$ac_ext >&5
10056 fi
10057 rm -f conftest.$ac_objext conftest.$ac_ext
10058                 CFLAGS="$cf_save_CFLAGS"
10059                 echo "$as_me:10059: result: $INTEL_COMPILER" >&5
10060 echo "${ECHO_T}$INTEL_COMPILER" >&6
10061                 ;;
10062         esac
10063 fi
10064
10065 cat > conftest.$ac_ext <<EOF
10066 #line 10066 "${as_me-configure}"
10067 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10068 EOF
10069
10070 if test "$INTEL_COMPILER" = yes
10071 then
10072 # The "-wdXXX" options suppress warnings:
10073 # remark #1419: external declaration in primary source file
10074 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10075 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10076 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10077 # remark #193: zero used for undefined preprocessing identifier
10078 # remark #593: variable "curs_sb_left_arrow" was set but never used
10079 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10080 # remark #869: parameter "tw" was never referenced
10081 # remark #981: operands are evaluated in unspecified order
10082 # warning #269: invalid format string conversion
10083
10084         { echo "$as_me:10084: checking for $CC warning options..." >&5
10085 echo "$as_me: checking for $CC warning options..." >&6;}
10086         cf_save_CFLAGS="$CFLAGS"
10087         EXTRA_CFLAGS="-Wall"
10088         for cf_opt in \
10089                 wd1419 \
10090                 wd1682 \
10091                 wd1683 \
10092                 wd1684 \
10093                 wd193 \
10094                 wd279 \
10095                 wd593 \
10096                 wd810 \
10097                 wd869 \
10098                 wd981
10099         do
10100                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10101                 if { (eval echo "$as_me:10101: \"$ac_compile\"") >&5
10102   (eval $ac_compile) 2>&5
10103   ac_status=$?
10104   echo "$as_me:10104: \$? = $ac_status" >&5
10105   (exit $ac_status); }; then
10106                         test -n "$verbose" && echo "$as_me:10106: result: ... -$cf_opt" >&5
10107 echo "${ECHO_T}... -$cf_opt" >&6
10108                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10109                 fi
10110         done
10111         CFLAGS="$cf_save_CFLAGS"
10112
10113 elif test "$GCC" = yes
10114 then
10115         { echo "$as_me:10115: checking for $CC warning options..." >&5
10116 echo "$as_me: checking for $CC warning options..." >&6;}
10117         cf_save_CFLAGS="$CFLAGS"
10118         EXTRA_CFLAGS="-W -Wall"
10119         cf_warn_CONST=""
10120         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10121         for cf_opt in \
10122                 Wbad-function-cast \
10123                 Wcast-align \
10124                 Wcast-qual \
10125                 Winline \
10126                 Wmissing-declarations \
10127                 Wmissing-prototypes \
10128                 Wnested-externs \
10129                 Wpointer-arith \
10130                 Wshadow \
10131                 Wstrict-prototypes \
10132                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10133         do
10134                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10135                 if { (eval echo "$as_me:10135: \"$ac_compile\"") >&5
10136   (eval $ac_compile) 2>&5
10137   ac_status=$?
10138   echo "$as_me:10138: \$? = $ac_status" >&5
10139   (exit $ac_status); }; then
10140                         test -n "$verbose" && echo "$as_me:10140: result: ... -$cf_opt" >&5
10141 echo "${ECHO_T}... -$cf_opt" >&6
10142                         case $cf_opt in #(vi
10143                         Wcast-qual) #(vi
10144                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10145                                 ;;
10146                         Winline) #(vi
10147                                 case $GCC_VERSION in
10148                                 [34].*)
10149                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10150
10151 echo "${as_me-configure}:10151: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10152
10153                                         continue;;
10154                                 esac
10155                                 ;;
10156                         esac
10157                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10158                 fi
10159         done
10160         CFLAGS="$cf_save_CFLAGS"
10161 fi
10162 rm -f conftest*
10163
10164         if test "$cf_with_cxx" = yes ; then
10165
10166 INTEL_CPLUSPLUS=no
10167
10168 if test "$GCC" = yes ; then
10169         case $host_os in
10170         linux*|gnu*)
10171                 echo "$as_me:10171: checking if this is really Intel C++ compiler" >&5
10172 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10173                 cf_save_CFLAGS="$CXXFLAGS"
10174                 CXXFLAGS="$CXXFLAGS -no-gcc"
10175                 cat >conftest.$ac_ext <<_ACEOF
10176 #line 10176 "configure"
10177 #include "confdefs.h"
10178
10179 int
10180 main ()
10181 {
10182
10183 #ifdef __INTEL_COMPILER
10184 #else
10185 make an error
10186 #endif
10187
10188   ;
10189   return 0;
10190 }
10191 _ACEOF
10192 rm -f conftest.$ac_objext
10193 if { (eval echo "$as_me:10193: \"$ac_compile\"") >&5
10194   (eval $ac_compile) 2>&5
10195   ac_status=$?
10196   echo "$as_me:10196: \$? = $ac_status" >&5
10197   (exit $ac_status); } &&
10198          { ac_try='test -s conftest.$ac_objext'
10199   { (eval echo "$as_me:10199: \"$ac_try\"") >&5
10200   (eval $ac_try) 2>&5
10201   ac_status=$?
10202   echo "$as_me:10202: \$? = $ac_status" >&5
10203   (exit $ac_status); }; }; then
10204   INTEL_CPLUSPLUS=yes
10205 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10206
10207 else
10208   echo "$as_me: failed program was:" >&5
10209 cat conftest.$ac_ext >&5
10210 fi
10211 rm -f conftest.$ac_objext conftest.$ac_ext
10212                 CXXFLAGS="$cf_save_CFLAGS"
10213                 echo "$as_me:10213: result: $INTEL_CPLUSPLUS" >&5
10214 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10215                 ;;
10216         esac
10217 fi
10218
10219 ac_ext=cc
10220 ac_cpp='$CXXCPP $CPPFLAGS'
10221 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10222 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10223 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10224 ac_main_return=return
10225
10226 cat > conftest.$ac_ext <<EOF
10227 #line 10227 "configure"
10228 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10229 EOF
10230
10231 if test "$INTEL_CPLUSPLUS" = yes
10232 then
10233 # The "-wdXXX" options suppress warnings:
10234 # remark #1419: external declaration in primary source file
10235 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10236 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10237 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10238 # remark #193: zero used for undefined preprocessing identifier
10239 # remark #593: variable "curs_sb_left_arrow" was set but never used
10240 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10241 # remark #869: parameter "tw" was never referenced
10242 # remark #981: operands are evaluated in unspecified order
10243 # warning #269: invalid format string conversion
10244
10245         { echo "$as_me:10245: checking for $CC warning options..." >&5
10246 echo "$as_me: checking for $CC warning options..." >&6;}
10247         cf_save_CXXFLAGS="$CXXFLAGS"
10248         EXTRA_CXXFLAGS="-Wall"
10249         for cf_opt in \
10250                 wd1419 \
10251                 wd1682 \
10252                 wd1683 \
10253                 wd1684 \
10254                 wd193 \
10255                 wd279 \
10256                 wd593 \
10257                 wd810 \
10258                 wd869 \
10259                 wd981
10260         do
10261                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10262                 if { (eval echo "$as_me:10262: \"$ac_compile\"") >&5
10263   (eval $ac_compile) 2>&5
10264   ac_status=$?
10265   echo "$as_me:10265: \$? = $ac_status" >&5
10266   (exit $ac_status); }; then
10267                         test -n "$verbose" && echo "$as_me:10267: result: ... -$cf_opt" >&5
10268 echo "${ECHO_T}... -$cf_opt" >&6
10269                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10270                 fi
10271         done
10272         CXXFLAGS="$cf_save_CXXFLAGS"
10273
10274 elif test "$GXX" = yes
10275 then
10276         { echo "$as_me:10276: checking for $CXX warning options..." >&5
10277 echo "$as_me: checking for $CXX warning options..." >&6;}
10278         cf_save_CXXFLAGS="$CXXFLAGS"
10279         EXTRA_CXXFLAGS="-W -Wall"
10280         cf_gxx_extra_warnings=""
10281         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10282         case "$GCC_VERSION" in
10283         [1-2].*)
10284                 ;;
10285         *)
10286                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10287                 ;;
10288         esac
10289         for cf_opt in \
10290                 Wabi \
10291                 fabi-version=0 \
10292                 Woverloaded-virtual \
10293                 Wsign-promo \
10294                 Wsynth \
10295                 Wold-style-cast \
10296                 Wcast-align \
10297                 Wcast-qual \
10298                 Wmissing-prototypes \
10299                 Wpointer-arith \
10300                 Wshadow \
10301                 Wstrict-prototypes \
10302                 Wundef $cf_gxx_extra_warnings Wno-unused
10303         do
10304                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10305                 if { (eval echo "$as_me:10305: \"$ac_compile\"") >&5
10306   (eval $ac_compile) 2>&5
10307   ac_status=$?
10308   echo "$as_me:10308: \$? = $ac_status" >&5
10309   (exit $ac_status); }; then
10310                         test -n "$verbose" && echo "$as_me:10310: result: ... -$cf_opt" >&5
10311 echo "${ECHO_T}... -$cf_opt" >&6
10312                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10313                 else
10314                         test -n "$verbose" && echo "$as_me:10314: result: ... no -$cf_opt" >&5
10315 echo "${ECHO_T}... no -$cf_opt" >&6
10316                 fi
10317         done
10318         CXXFLAGS="$cf_save_CXXFLAGS"
10319 fi
10320
10321 rm -f conftest*
10322 ac_ext=c
10323 ac_cpp='$CPP $CPPFLAGS'
10324 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10325 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10326 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10327 ac_main_return=return
10328
10329         fi
10330 fi
10331
10332 if test "$GCC" = yes
10333 then
10334 cat > conftest.i <<EOF
10335 #ifndef GCC_PRINTF
10336 #define GCC_PRINTF 0
10337 #endif
10338 #ifndef GCC_SCANF
10339 #define GCC_SCANF 0
10340 #endif
10341 #ifndef GCC_NORETURN
10342 #define GCC_NORETURN /* nothing */
10343 #endif
10344 #ifndef GCC_UNUSED
10345 #define GCC_UNUSED /* nothing */
10346 #endif
10347 EOF
10348 if test "$GCC" = yes
10349 then
10350         { echo "$as_me:10350: checking for $CC __attribute__ directives..." >&5
10351 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10352 cat > conftest.$ac_ext <<EOF
10353 #line 10353 "${as_me-configure}"
10354 #include "confdefs.h"
10355 #include "conftest.h"
10356 #include "conftest.i"
10357 #if     GCC_PRINTF
10358 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10359 #else
10360 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10361 #endif
10362 #if     GCC_SCANF
10363 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10364 #else
10365 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10366 #endif
10367 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10368 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10369 extern void foo(void) GCC_NORETURN;
10370 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10371 EOF
10372         for cf_attribute in scanf printf unused noreturn
10373         do
10374
10375 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10376
10377                 cf_directive="__attribute__(($cf_attribute))"
10378                 echo "checking for $CC $cf_directive" 1>&5
10379                 case $cf_attribute in
10380                 scanf|printf)
10381                 cat >conftest.h <<EOF
10382 #define GCC_$cf_ATTRIBUTE 1
10383 EOF
10384                         ;;
10385                 *)
10386                 cat >conftest.h <<EOF
10387 #define GCC_$cf_ATTRIBUTE $cf_directive
10388 EOF
10389                         ;;
10390                 esac
10391                 if { (eval echo "$as_me:10391: \"$ac_compile\"") >&5
10392   (eval $ac_compile) 2>&5
10393   ac_status=$?
10394   echo "$as_me:10394: \$? = $ac_status" >&5
10395   (exit $ac_status); }; then
10396                         test -n "$verbose" && echo "$as_me:10396: result: ... $cf_attribute" >&5
10397 echo "${ECHO_T}... $cf_attribute" >&6
10398                         cat conftest.h >>confdefs.h
10399                 fi
10400         done
10401 else
10402         fgrep define conftest.i >>confdefs.h
10403 fi
10404 rm -rf conftest*
10405 fi
10406
10407 ###     use option --enable-assertions to turn on generation of assertion code
10408 echo "$as_me:10408: checking if you want to enable runtime assertions" >&5
10409 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10410
10411 # Check whether --enable-assertions or --disable-assertions was given.
10412 if test "${enable_assertions+set}" = set; then
10413   enableval="$enable_assertions"
10414   with_assertions=$enableval
10415 else
10416   with_assertions=no
10417 fi;
10418 echo "$as_me:10418: result: $with_assertions" >&5
10419 echo "${ECHO_T}$with_assertions" >&6
10420 if test -n "$GCC"
10421 then
10422         if test "$with_assertions" = no
10423         then
10424                 cat >>confdefs.h <<\EOF
10425 #define NDEBUG 1
10426 EOF
10427
10428                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10429         else
10430                 ADAFLAGS="$ADAFLAGS -gnata"
10431         fi
10432 fi
10433
10434 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10435
10436 echo "$as_me:10436: checking if you want to use dmalloc for testing" >&5
10437 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10438
10439 # Check whether --with-dmalloc or --without-dmalloc was given.
10440 if test "${with_dmalloc+set}" = set; then
10441   withval="$with_dmalloc"
10442   cat >>confdefs.h <<\EOF
10443 #define USE_DMALLOC 1
10444 EOF
10445
10446         : ${with_cflags:=-g}
10447         : ${with_no_leaks:=yes}
10448          with_dmalloc=yes
10449 else
10450   with_dmalloc=
10451 fi;
10452 echo "$as_me:10452: result: ${with_dmalloc:-no}" >&5
10453 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10454
10455 case .$with_cflags in #(vi
10456 .*-g*)
10457         case .$CFLAGS in #(vi
10458         .*-g*) #(vi
10459                 ;;
10460         *)
10461
10462 cf_fix_cppflags=no
10463 cf_new_cflags=
10464 cf_new_cppflags=
10465 cf_new_extra_cppflags=
10466
10467 for cf_add_cflags in -g
10468 do
10469 case $cf_fix_cppflags in
10470 no)
10471         case $cf_add_cflags in #(vi
10472         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10473                 case $cf_add_cflags in
10474                 -D*)
10475                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10476
10477                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10478                         && test -z "${cf_tst_cflags}" \
10479                         && cf_fix_cppflags=yes
10480
10481                         if test $cf_fix_cppflags = yes ; then
10482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10483                                 continue
10484                         elif test "${cf_tst_cflags}" = "\"'" ; then
10485                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10486                                 continue
10487                         fi
10488                         ;;
10489                 esac
10490                 case "$CPPFLAGS" in
10491                 *$cf_add_cflags) #(vi
10492                         ;;
10493                 *) #(vi
10494                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10495                         ;;
10496                 esac
10497                 ;;
10498         *)
10499                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10500                 ;;
10501         esac
10502         ;;
10503 yes)
10504         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10505
10506         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10507
10508         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10509         && test -z "${cf_tst_cflags}" \
10510         && cf_fix_cppflags=no
10511         ;;
10512 esac
10513 done
10514
10515 if test -n "$cf_new_cflags" ; then
10516
10517         CFLAGS="$CFLAGS $cf_new_cflags"
10518 fi
10519
10520 if test -n "$cf_new_cppflags" ; then
10521
10522         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10523 fi
10524
10525 if test -n "$cf_new_extra_cppflags" ; then
10526
10527         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10528 fi
10529
10530                 ;;
10531         esac
10532         ;;
10533 esac
10534
10535 if test "$with_dmalloc" = yes ; then
10536         echo "$as_me:10536: checking for dmalloc.h" >&5
10537 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10538 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10539   echo $ECHO_N "(cached) $ECHO_C" >&6
10540 else
10541   cat >conftest.$ac_ext <<_ACEOF
10542 #line 10542 "configure"
10543 #include "confdefs.h"
10544 #include <dmalloc.h>
10545 _ACEOF
10546 if { (eval echo "$as_me:10546: \"$ac_cpp conftest.$ac_ext\"") >&5
10547   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10548   ac_status=$?
10549   egrep -v '^ *\+' conftest.er1 >conftest.err
10550   rm -f conftest.er1
10551   cat conftest.err >&5
10552   echo "$as_me:10552: \$? = $ac_status" >&5
10553   (exit $ac_status); } >/dev/null; then
10554   if test -s conftest.err; then
10555     ac_cpp_err=$ac_c_preproc_warn_flag
10556   else
10557     ac_cpp_err=
10558   fi
10559 else
10560   ac_cpp_err=yes
10561 fi
10562 if test -z "$ac_cpp_err"; then
10563   ac_cv_header_dmalloc_h=yes
10564 else
10565   echo "$as_me: failed program was:" >&5
10566   cat conftest.$ac_ext >&5
10567   ac_cv_header_dmalloc_h=no
10568 fi
10569 rm -f conftest.err conftest.$ac_ext
10570 fi
10571 echo "$as_me:10571: result: $ac_cv_header_dmalloc_h" >&5
10572 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10573 if test $ac_cv_header_dmalloc_h = yes; then
10574
10575 echo "$as_me:10575: checking for dmalloc_debug in -ldmalloc" >&5
10576 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10577 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10578   echo $ECHO_N "(cached) $ECHO_C" >&6
10579 else
10580   ac_check_lib_save_LIBS=$LIBS
10581 LIBS="-ldmalloc  $LIBS"
10582 cat >conftest.$ac_ext <<_ACEOF
10583 #line 10583 "configure"
10584 #include "confdefs.h"
10585
10586 /* Override any gcc2 internal prototype to avoid an error.  */
10587 #ifdef __cplusplus
10588 extern "C"
10589 #endif
10590 /* We use char because int might match the return type of a gcc2
10591    builtin and then its argument prototype would still apply.  */
10592 char dmalloc_debug ();
10593 int
10594 main ()
10595 {
10596 dmalloc_debug ();
10597   ;
10598   return 0;
10599 }
10600 _ACEOF
10601 rm -f conftest.$ac_objext conftest$ac_exeext
10602 if { (eval echo "$as_me:10602: \"$ac_link\"") >&5
10603   (eval $ac_link) 2>&5
10604   ac_status=$?
10605   echo "$as_me:10605: \$? = $ac_status" >&5
10606   (exit $ac_status); } &&
10607          { ac_try='test -s conftest$ac_exeext'
10608   { (eval echo "$as_me:10608: \"$ac_try\"") >&5
10609   (eval $ac_try) 2>&5
10610   ac_status=$?
10611   echo "$as_me:10611: \$? = $ac_status" >&5
10612   (exit $ac_status); }; }; then
10613   ac_cv_lib_dmalloc_dmalloc_debug=yes
10614 else
10615   echo "$as_me: failed program was:" >&5
10616 cat conftest.$ac_ext >&5
10617 ac_cv_lib_dmalloc_dmalloc_debug=no
10618 fi
10619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10620 LIBS=$ac_check_lib_save_LIBS
10621 fi
10622 echo "$as_me:10622: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10623 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10624 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10625   cat >>confdefs.h <<EOF
10626 #define HAVE_LIBDMALLOC 1
10627 EOF
10628
10629   LIBS="-ldmalloc $LIBS"
10630
10631 fi
10632
10633 fi
10634
10635 fi
10636
10637 echo "$as_me:10637: checking if you want to use dbmalloc for testing" >&5
10638 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10639
10640 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10641 if test "${with_dbmalloc+set}" = set; then
10642   withval="$with_dbmalloc"
10643   cat >>confdefs.h <<\EOF
10644 #define USE_DBMALLOC 1
10645 EOF
10646
10647         : ${with_cflags:=-g}
10648         : ${with_no_leaks:=yes}
10649          with_dbmalloc=yes
10650 else
10651   with_dbmalloc=
10652 fi;
10653 echo "$as_me:10653: result: ${with_dbmalloc:-no}" >&5
10654 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10655
10656 case .$with_cflags in #(vi
10657 .*-g*)
10658         case .$CFLAGS in #(vi
10659         .*-g*) #(vi
10660                 ;;
10661         *)
10662
10663 cf_fix_cppflags=no
10664 cf_new_cflags=
10665 cf_new_cppflags=
10666 cf_new_extra_cppflags=
10667
10668 for cf_add_cflags in -g
10669 do
10670 case $cf_fix_cppflags in
10671 no)
10672         case $cf_add_cflags in #(vi
10673         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10674                 case $cf_add_cflags in
10675                 -D*)
10676                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10677
10678                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10679                         && test -z "${cf_tst_cflags}" \
10680                         && cf_fix_cppflags=yes
10681
10682                         if test $cf_fix_cppflags = yes ; then
10683                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10684                                 continue
10685                         elif test "${cf_tst_cflags}" = "\"'" ; then
10686                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10687                                 continue
10688                         fi
10689                         ;;
10690                 esac
10691                 case "$CPPFLAGS" in
10692                 *$cf_add_cflags) #(vi
10693                         ;;
10694                 *) #(vi
10695                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10696                         ;;
10697                 esac
10698                 ;;
10699         *)
10700                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10701                 ;;
10702         esac
10703         ;;
10704 yes)
10705         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10706
10707         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10708
10709         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10710         && test -z "${cf_tst_cflags}" \
10711         && cf_fix_cppflags=no
10712         ;;
10713 esac
10714 done
10715
10716 if test -n "$cf_new_cflags" ; then
10717
10718         CFLAGS="$CFLAGS $cf_new_cflags"
10719 fi
10720
10721 if test -n "$cf_new_cppflags" ; then
10722
10723         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10724 fi
10725
10726 if test -n "$cf_new_extra_cppflags" ; then
10727
10728         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10729 fi
10730
10731                 ;;
10732         esac
10733         ;;
10734 esac
10735
10736 if test "$with_dbmalloc" = yes ; then
10737         echo "$as_me:10737: checking for dbmalloc.h" >&5
10738 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10739 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10740   echo $ECHO_N "(cached) $ECHO_C" >&6
10741 else
10742   cat >conftest.$ac_ext <<_ACEOF
10743 #line 10743 "configure"
10744 #include "confdefs.h"
10745 #include <dbmalloc.h>
10746 _ACEOF
10747 if { (eval echo "$as_me:10747: \"$ac_cpp conftest.$ac_ext\"") >&5
10748   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10749   ac_status=$?
10750   egrep -v '^ *\+' conftest.er1 >conftest.err
10751   rm -f conftest.er1
10752   cat conftest.err >&5
10753   echo "$as_me:10753: \$? = $ac_status" >&5
10754   (exit $ac_status); } >/dev/null; then
10755   if test -s conftest.err; then
10756     ac_cpp_err=$ac_c_preproc_warn_flag
10757   else
10758     ac_cpp_err=
10759   fi
10760 else
10761   ac_cpp_err=yes
10762 fi
10763 if test -z "$ac_cpp_err"; then
10764   ac_cv_header_dbmalloc_h=yes
10765 else
10766   echo "$as_me: failed program was:" >&5
10767   cat conftest.$ac_ext >&5
10768   ac_cv_header_dbmalloc_h=no
10769 fi
10770 rm -f conftest.err conftest.$ac_ext
10771 fi
10772 echo "$as_me:10772: result: $ac_cv_header_dbmalloc_h" >&5
10773 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10774 if test $ac_cv_header_dbmalloc_h = yes; then
10775
10776 echo "$as_me:10776: checking for debug_malloc in -ldbmalloc" >&5
10777 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10778 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10779   echo $ECHO_N "(cached) $ECHO_C" >&6
10780 else
10781   ac_check_lib_save_LIBS=$LIBS
10782 LIBS="-ldbmalloc  $LIBS"
10783 cat >conftest.$ac_ext <<_ACEOF
10784 #line 10784 "configure"
10785 #include "confdefs.h"
10786
10787 /* Override any gcc2 internal prototype to avoid an error.  */
10788 #ifdef __cplusplus
10789 extern "C"
10790 #endif
10791 /* We use char because int might match the return type of a gcc2
10792    builtin and then its argument prototype would still apply.  */
10793 char debug_malloc ();
10794 int
10795 main ()
10796 {
10797 debug_malloc ();
10798   ;
10799   return 0;
10800 }
10801 _ACEOF
10802 rm -f conftest.$ac_objext conftest$ac_exeext
10803 if { (eval echo "$as_me:10803: \"$ac_link\"") >&5
10804   (eval $ac_link) 2>&5
10805   ac_status=$?
10806   echo "$as_me:10806: \$? = $ac_status" >&5
10807   (exit $ac_status); } &&
10808          { ac_try='test -s conftest$ac_exeext'
10809   { (eval echo "$as_me:10809: \"$ac_try\"") >&5
10810   (eval $ac_try) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); }; }; then
10814   ac_cv_lib_dbmalloc_debug_malloc=yes
10815 else
10816   echo "$as_me: failed program was:" >&5
10817 cat conftest.$ac_ext >&5
10818 ac_cv_lib_dbmalloc_debug_malloc=no
10819 fi
10820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10821 LIBS=$ac_check_lib_save_LIBS
10822 fi
10823 echo "$as_me:10823: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10824 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10825 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10826   cat >>confdefs.h <<EOF
10827 #define HAVE_LIBDBMALLOC 1
10828 EOF
10829
10830   LIBS="-ldbmalloc $LIBS"
10831
10832 fi
10833
10834 fi
10835
10836 fi
10837
10838 echo "$as_me:10838: checking if you want to use valgrind for testing" >&5
10839 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10840
10841 # Check whether --with-valgrind or --without-valgrind was given.
10842 if test "${with_valgrind+set}" = set; then
10843   withval="$with_valgrind"
10844   cat >>confdefs.h <<\EOF
10845 #define USE_VALGRIND 1
10846 EOF
10847
10848         : ${with_cflags:=-g}
10849         : ${with_no_leaks:=yes}
10850          with_valgrind=yes
10851 else
10852   with_valgrind=
10853 fi;
10854 echo "$as_me:10854: result: ${with_valgrind:-no}" >&5
10855 echo "${ECHO_T}${with_valgrind:-no}" >&6
10856
10857 case .$with_cflags in #(vi
10858 .*-g*)
10859         case .$CFLAGS in #(vi
10860         .*-g*) #(vi
10861                 ;;
10862         *)
10863
10864 cf_fix_cppflags=no
10865 cf_new_cflags=
10866 cf_new_cppflags=
10867 cf_new_extra_cppflags=
10868
10869 for cf_add_cflags in -g
10870 do
10871 case $cf_fix_cppflags in
10872 no)
10873         case $cf_add_cflags in #(vi
10874         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10875                 case $cf_add_cflags in
10876                 -D*)
10877                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10878
10879                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10880                         && test -z "${cf_tst_cflags}" \
10881                         && cf_fix_cppflags=yes
10882
10883                         if test $cf_fix_cppflags = yes ; then
10884                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10885                                 continue
10886                         elif test "${cf_tst_cflags}" = "\"'" ; then
10887                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10888                                 continue
10889                         fi
10890                         ;;
10891                 esac
10892                 case "$CPPFLAGS" in
10893                 *$cf_add_cflags) #(vi
10894                         ;;
10895                 *) #(vi
10896                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10897                         ;;
10898                 esac
10899                 ;;
10900         *)
10901                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10902                 ;;
10903         esac
10904         ;;
10905 yes)
10906         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10907
10908         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10909
10910         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10911         && test -z "${cf_tst_cflags}" \
10912         && cf_fix_cppflags=no
10913         ;;
10914 esac
10915 done
10916
10917 if test -n "$cf_new_cflags" ; then
10918
10919         CFLAGS="$CFLAGS $cf_new_cflags"
10920 fi
10921
10922 if test -n "$cf_new_cppflags" ; then
10923
10924         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10925 fi
10926
10927 if test -n "$cf_new_extra_cppflags" ; then
10928
10929         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10930 fi
10931
10932                 ;;
10933         esac
10934         ;;
10935 esac
10936
10937 echo "$as_me:10937: checking if you want to perform memory-leak testing" >&5
10938 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10939
10940 # Check whether --enable-leaks or --disable-leaks was given.
10941 if test "${enable_leaks+set}" = set; then
10942   enableval="$enable_leaks"
10943   with_no_leaks=yes
10944 else
10945   : ${with_no_leaks:=no}
10946 fi;
10947 echo "$as_me:10947: result: $with_no_leaks" >&5
10948 echo "${ECHO_T}$with_no_leaks" >&6
10949
10950 if test "$with_no_leaks" = yes ; then
10951         cat >>confdefs.h <<\EOF
10952 #define NO_LEAKS 1
10953 EOF
10954
10955 fi
10956
10957 cat >>confdefs.h <<\EOF
10958 #define HAVE_NC_ALLOC_H 1
10959 EOF
10960
10961 ###     use option --enable-expanded to generate certain macros as functions
10962
10963 # Check whether --enable-expanded or --disable-expanded was given.
10964 if test "${enable_expanded+set}" = set; then
10965   enableval="$enable_expanded"
10966   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10967 #define NCURSES_EXPANDED 1
10968 EOF
10969
10970 fi;
10971
10972 ###     use option --disable-macros to suppress macros in favor of functions
10973
10974 # Check whether --enable-macros or --disable-macros was given.
10975 if test "${enable_macros+set}" = set; then
10976   enableval="$enable_macros"
10977   test "$enableval" = no && cat >>confdefs.h <<\EOF
10978 #define NCURSES_NOMACROS 1
10979 EOF
10980
10981 fi;
10982
10983 # Normally we only add trace() to the debug-library.  Allow this to be
10984 # extended to all models of the ncurses library:
10985 cf_all_traces=no
10986 case "$CFLAGS $CPPFLAGS" in
10987 *-DTRACE*)
10988         cf_all_traces=yes
10989         ;;
10990 esac
10991
10992 echo "$as_me:10992: checking whether to add trace feature to all models" >&5
10993 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10994
10995 # Check whether --with-trace or --without-trace was given.
10996 if test "${with_trace+set}" = set; then
10997   withval="$with_trace"
10998   cf_with_trace=$withval
10999 else
11000   cf_with_trace=$cf_all_traces
11001 fi;
11002 echo "$as_me:11002: result: $cf_with_trace" >&5
11003 echo "${ECHO_T}$cf_with_trace" >&6
11004
11005 if test "$cf_with_trace" = yes ; then
11006         LIB_TRACING=all
11007         ADA_TRACE=TRUE
11008
11009 cf_fix_cppflags=no
11010 cf_new_cflags=
11011 cf_new_cppflags=
11012 cf_new_extra_cppflags=
11013
11014 for cf_add_cflags in -DTRACE
11015 do
11016 case $cf_fix_cppflags in
11017 no)
11018         case $cf_add_cflags in #(vi
11019         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11020                 case $cf_add_cflags in
11021                 -D*)
11022                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11023
11024                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11025                         && test -z "${cf_tst_cflags}" \
11026                         && cf_fix_cppflags=yes
11027
11028                         if test $cf_fix_cppflags = yes ; then
11029                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11030                                 continue
11031                         elif test "${cf_tst_cflags}" = "\"'" ; then
11032                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11033                                 continue
11034                         fi
11035                         ;;
11036                 esac
11037                 case "$CPPFLAGS" in
11038                 *$cf_add_cflags) #(vi
11039                         ;;
11040                 *) #(vi
11041                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11042                         ;;
11043                 esac
11044                 ;;
11045         *)
11046                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11047                 ;;
11048         esac
11049         ;;
11050 yes)
11051         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11052
11053         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11054
11055         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11056         && test -z "${cf_tst_cflags}" \
11057         && cf_fix_cppflags=no
11058         ;;
11059 esac
11060 done
11061
11062 if test -n "$cf_new_cflags" ; then
11063
11064         CFLAGS="$CFLAGS $cf_new_cflags"
11065 fi
11066
11067 if test -n "$cf_new_cppflags" ; then
11068
11069         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11070 fi
11071
11072 if test -n "$cf_new_extra_cppflags" ; then
11073
11074         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11075 fi
11076
11077 else
11078         LIB_TRACING=DEBUG
11079         ADA_TRACE=FALSE
11080 fi
11081
11082 ###     Checks for libraries.
11083 echo "$as_me:11083: checking for gettimeofday" >&5
11084 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11085 if test "${ac_cv_func_gettimeofday+set}" = set; then
11086   echo $ECHO_N "(cached) $ECHO_C" >&6
11087 else
11088   cat >conftest.$ac_ext <<_ACEOF
11089 #line 11089 "configure"
11090 #include "confdefs.h"
11091 /* System header to define __stub macros and hopefully few prototypes,
11092     which can conflict with char gettimeofday (); below.  */
11093 #include <assert.h>
11094 /* Override any gcc2 internal prototype to avoid an error.  */
11095 #ifdef __cplusplus
11096 extern "C"
11097 #endif
11098 /* We use char because int might match the return type of a gcc2
11099    builtin and then its argument prototype would still apply.  */
11100 char gettimeofday ();
11101 char (*f) ();
11102
11103 int
11104 main ()
11105 {
11106 /* The GNU C library defines this for functions which it implements
11107     to always fail with ENOSYS.  Some functions are actually named
11108     something starting with __ and the normal name is an alias.  */
11109 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11110 choke me
11111 #else
11112 f = gettimeofday;
11113 #endif
11114
11115   ;
11116   return 0;
11117 }
11118 _ACEOF
11119 rm -f conftest.$ac_objext conftest$ac_exeext
11120 if { (eval echo "$as_me:11120: \"$ac_link\"") >&5
11121   (eval $ac_link) 2>&5
11122   ac_status=$?
11123   echo "$as_me:11123: \$? = $ac_status" >&5
11124   (exit $ac_status); } &&
11125          { ac_try='test -s conftest$ac_exeext'
11126   { (eval echo "$as_me:11126: \"$ac_try\"") >&5
11127   (eval $ac_try) 2>&5
11128   ac_status=$?
11129   echo "$as_me:11129: \$? = $ac_status" >&5
11130   (exit $ac_status); }; }; then
11131   ac_cv_func_gettimeofday=yes
11132 else
11133   echo "$as_me: failed program was:" >&5
11134 cat conftest.$ac_ext >&5
11135 ac_cv_func_gettimeofday=no
11136 fi
11137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11138 fi
11139 echo "$as_me:11139: result: $ac_cv_func_gettimeofday" >&5
11140 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11141 if test $ac_cv_func_gettimeofday = yes; then
11142   cat >>confdefs.h <<\EOF
11143 #define HAVE_GETTIMEOFDAY 1
11144 EOF
11145
11146 else
11147
11148 echo "$as_me:11148: checking for gettimeofday in -lbsd" >&5
11149 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11150 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11151   echo $ECHO_N "(cached) $ECHO_C" >&6
11152 else
11153   ac_check_lib_save_LIBS=$LIBS
11154 LIBS="-lbsd  $LIBS"
11155 cat >conftest.$ac_ext <<_ACEOF
11156 #line 11156 "configure"
11157 #include "confdefs.h"
11158
11159 /* Override any gcc2 internal prototype to avoid an error.  */
11160 #ifdef __cplusplus
11161 extern "C"
11162 #endif
11163 /* We use char because int might match the return type of a gcc2
11164    builtin and then its argument prototype would still apply.  */
11165 char gettimeofday ();
11166 int
11167 main ()
11168 {
11169 gettimeofday ();
11170   ;
11171   return 0;
11172 }
11173 _ACEOF
11174 rm -f conftest.$ac_objext conftest$ac_exeext
11175 if { (eval echo "$as_me:11175: \"$ac_link\"") >&5
11176   (eval $ac_link) 2>&5
11177   ac_status=$?
11178   echo "$as_me:11178: \$? = $ac_status" >&5
11179   (exit $ac_status); } &&
11180          { ac_try='test -s conftest$ac_exeext'
11181   { (eval echo "$as_me:11181: \"$ac_try\"") >&5
11182   (eval $ac_try) 2>&5
11183   ac_status=$?
11184   echo "$as_me:11184: \$? = $ac_status" >&5
11185   (exit $ac_status); }; }; then
11186   ac_cv_lib_bsd_gettimeofday=yes
11187 else
11188   echo "$as_me: failed program was:" >&5
11189 cat conftest.$ac_ext >&5
11190 ac_cv_lib_bsd_gettimeofday=no
11191 fi
11192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11193 LIBS=$ac_check_lib_save_LIBS
11194 fi
11195 echo "$as_me:11195: result: $ac_cv_lib_bsd_gettimeofday" >&5
11196 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11197 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11198   cat >>confdefs.h <<\EOF
11199 #define HAVE_GETTIMEOFDAY 1
11200 EOF
11201
11202         LIBS="$LIBS -lbsd"
11203 fi
11204
11205 fi
11206
11207 echo "$as_me:11207: checking if -lm needed for math functions" >&5
11208 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11209 if test "${cf_cv_need_libm+set}" = set; then
11210   echo $ECHO_N "(cached) $ECHO_C" >&6
11211 else
11212
11213         cat >conftest.$ac_ext <<_ACEOF
11214 #line 11214 "configure"
11215 #include "confdefs.h"
11216
11217         #include <stdio.h>
11218         #include <math.h>
11219
11220 int
11221 main ()
11222 {
11223 double x = rand(); printf("result = %g\n", sin(x))
11224   ;
11225   return 0;
11226 }
11227 _ACEOF
11228 rm -f conftest.$ac_objext conftest$ac_exeext
11229 if { (eval echo "$as_me:11229: \"$ac_link\"") >&5
11230   (eval $ac_link) 2>&5
11231   ac_status=$?
11232   echo "$as_me:11232: \$? = $ac_status" >&5
11233   (exit $ac_status); } &&
11234          { ac_try='test -s conftest$ac_exeext'
11235   { (eval echo "$as_me:11235: \"$ac_try\"") >&5
11236   (eval $ac_try) 2>&5
11237   ac_status=$?
11238   echo "$as_me:11238: \$? = $ac_status" >&5
11239   (exit $ac_status); }; }; then
11240   cf_cv_need_libm=no
11241 else
11242   echo "$as_me: failed program was:" >&5
11243 cat conftest.$ac_ext >&5
11244 cf_cv_need_libm=yes
11245 fi
11246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11247 fi
11248 echo "$as_me:11248: result: $cf_cv_need_libm" >&5
11249 echo "${ECHO_T}$cf_cv_need_libm" >&6
11250 if test "$cf_cv_need_libm" = yes
11251 then
11252 MATH_LIB=-lm
11253 fi
11254
11255 ###     Checks for header files.
11256 echo "$as_me:11256: checking for ANSI C header files" >&5
11257 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11258 if test "${ac_cv_header_stdc+set}" = set; then
11259   echo $ECHO_N "(cached) $ECHO_C" >&6
11260 else
11261   cat >conftest.$ac_ext <<_ACEOF
11262 #line 11262 "configure"
11263 #include "confdefs.h"
11264 #include <stdlib.h>
11265 #include <stdarg.h>
11266 #include <string.h>
11267 #include <float.h>
11268
11269 _ACEOF
11270 if { (eval echo "$as_me:11270: \"$ac_cpp conftest.$ac_ext\"") >&5
11271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11272   ac_status=$?
11273   egrep -v '^ *\+' conftest.er1 >conftest.err
11274   rm -f conftest.er1
11275   cat conftest.err >&5
11276   echo "$as_me:11276: \$? = $ac_status" >&5
11277   (exit $ac_status); } >/dev/null; then
11278   if test -s conftest.err; then
11279     ac_cpp_err=$ac_c_preproc_warn_flag
11280   else
11281     ac_cpp_err=
11282   fi
11283 else
11284   ac_cpp_err=yes
11285 fi
11286 if test -z "$ac_cpp_err"; then
11287   ac_cv_header_stdc=yes
11288 else
11289   echo "$as_me: failed program was:" >&5
11290   cat conftest.$ac_ext >&5
11291   ac_cv_header_stdc=no
11292 fi
11293 rm -f conftest.err conftest.$ac_ext
11294
11295 if test $ac_cv_header_stdc = yes; then
11296   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11297   cat >conftest.$ac_ext <<_ACEOF
11298 #line 11298 "configure"
11299 #include "confdefs.h"
11300 #include <string.h>
11301
11302 _ACEOF
11303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11304   egrep "memchr" >/dev/null 2>&1; then
11305   :
11306 else
11307   ac_cv_header_stdc=no
11308 fi
11309 rm -f conftest*
11310
11311 fi
11312
11313 if test $ac_cv_header_stdc = yes; then
11314   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11315   cat >conftest.$ac_ext <<_ACEOF
11316 #line 11316 "configure"
11317 #include "confdefs.h"
11318 #include <stdlib.h>
11319
11320 _ACEOF
11321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11322   egrep "free" >/dev/null 2>&1; then
11323   :
11324 else
11325   ac_cv_header_stdc=no
11326 fi
11327 rm -f conftest*
11328
11329 fi
11330
11331 if test $ac_cv_header_stdc = yes; then
11332   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11333   if test "$cross_compiling" = yes; then
11334   :
11335 else
11336   cat >conftest.$ac_ext <<_ACEOF
11337 #line 11337 "configure"
11338 #include "confdefs.h"
11339 #include <ctype.h>
11340 #if ((' ' & 0x0FF) == 0x020)
11341 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11342 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11343 #else
11344 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11345                      || ('j' <= (c) && (c) <= 'r') \
11346                      || ('s' <= (c) && (c) <= 'z'))
11347 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11348 #endif
11349
11350 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11351 int
11352 main ()
11353 {
11354   int i;
11355   for (i = 0; i < 256; i++)
11356     if (XOR (islower (i), ISLOWER (i))
11357         || toupper (i) != TOUPPER (i))
11358       $ac_main_return(2);
11359   $ac_main_return (0);
11360 }
11361 _ACEOF
11362 rm -f conftest$ac_exeext
11363 if { (eval echo "$as_me:11363: \"$ac_link\"") >&5
11364   (eval $ac_link) 2>&5
11365   ac_status=$?
11366   echo "$as_me:11366: \$? = $ac_status" >&5
11367   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11368   { (eval echo "$as_me:11368: \"$ac_try\"") >&5
11369   (eval $ac_try) 2>&5
11370   ac_status=$?
11371   echo "$as_me:11371: \$? = $ac_status" >&5
11372   (exit $ac_status); }; }; then
11373   :
11374 else
11375   echo "$as_me: program exited with status $ac_status" >&5
11376 echo "$as_me: failed program was:" >&5
11377 cat conftest.$ac_ext >&5
11378 ac_cv_header_stdc=no
11379 fi
11380 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11381 fi
11382 fi
11383 fi
11384 echo "$as_me:11384: result: $ac_cv_header_stdc" >&5
11385 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11386 if test $ac_cv_header_stdc = yes; then
11387
11388 cat >>confdefs.h <<\EOF
11389 #define STDC_HEADERS 1
11390 EOF
11391
11392 fi
11393
11394 ac_header_dirent=no
11395 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11396   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11397 echo "$as_me:11397: checking for $ac_hdr that defines DIR" >&5
11398 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11399 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11400   echo $ECHO_N "(cached) $ECHO_C" >&6
11401 else
11402   cat >conftest.$ac_ext <<_ACEOF
11403 #line 11403 "configure"
11404 #include "confdefs.h"
11405 #include <sys/types.h>
11406 #include <$ac_hdr>
11407
11408 int
11409 main ()
11410 {
11411 if ((DIR *) 0)
11412 return 0;
11413   ;
11414   return 0;
11415 }
11416 _ACEOF
11417 rm -f conftest.$ac_objext
11418 if { (eval echo "$as_me:11418: \"$ac_compile\"") >&5
11419   (eval $ac_compile) 2>&5
11420   ac_status=$?
11421   echo "$as_me:11421: \$? = $ac_status" >&5
11422   (exit $ac_status); } &&
11423          { ac_try='test -s conftest.$ac_objext'
11424   { (eval echo "$as_me:11424: \"$ac_try\"") >&5
11425   (eval $ac_try) 2>&5
11426   ac_status=$?
11427   echo "$as_me:11427: \$? = $ac_status" >&5
11428   (exit $ac_status); }; }; then
11429   eval "$as_ac_Header=yes"
11430 else
11431   echo "$as_me: failed program was:" >&5
11432 cat conftest.$ac_ext >&5
11433 eval "$as_ac_Header=no"
11434 fi
11435 rm -f conftest.$ac_objext conftest.$ac_ext
11436 fi
11437 echo "$as_me:11437: result: `eval echo '${'$as_ac_Header'}'`" >&5
11438 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11439 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11440   cat >>confdefs.h <<EOF
11441 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11442 EOF
11443
11444 ac_header_dirent=$ac_hdr; break
11445 fi
11446
11447 done
11448 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11449 if test $ac_header_dirent = dirent.h; then
11450   echo "$as_me:11450: checking for opendir in -ldir" >&5
11451 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11452 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11453   echo $ECHO_N "(cached) $ECHO_C" >&6
11454 else
11455   ac_check_lib_save_LIBS=$LIBS
11456 LIBS="-ldir  $LIBS"
11457 cat >conftest.$ac_ext <<_ACEOF
11458 #line 11458 "configure"
11459 #include "confdefs.h"
11460
11461 /* Override any gcc2 internal prototype to avoid an error.  */
11462 #ifdef __cplusplus
11463 extern "C"
11464 #endif
11465 /* We use char because int might match the return type of a gcc2
11466    builtin and then its argument prototype would still apply.  */
11467 char opendir ();
11468 int
11469 main ()
11470 {
11471 opendir ();
11472   ;
11473   return 0;
11474 }
11475 _ACEOF
11476 rm -f conftest.$ac_objext conftest$ac_exeext
11477 if { (eval echo "$as_me:11477: \"$ac_link\"") >&5
11478   (eval $ac_link) 2>&5
11479   ac_status=$?
11480   echo "$as_me:11480: \$? = $ac_status" >&5
11481   (exit $ac_status); } &&
11482          { ac_try='test -s conftest$ac_exeext'
11483   { (eval echo "$as_me:11483: \"$ac_try\"") >&5
11484   (eval $ac_try) 2>&5
11485   ac_status=$?
11486   echo "$as_me:11486: \$? = $ac_status" >&5
11487   (exit $ac_status); }; }; then
11488   ac_cv_lib_dir_opendir=yes
11489 else
11490   echo "$as_me: failed program was:" >&5
11491 cat conftest.$ac_ext >&5
11492 ac_cv_lib_dir_opendir=no
11493 fi
11494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11495 LIBS=$ac_check_lib_save_LIBS
11496 fi
11497 echo "$as_me:11497: result: $ac_cv_lib_dir_opendir" >&5
11498 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11499 if test $ac_cv_lib_dir_opendir = yes; then
11500   LIBS="$LIBS -ldir"
11501 fi
11502
11503 else
11504   echo "$as_me:11504: checking for opendir in -lx" >&5
11505 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11506 if test "${ac_cv_lib_x_opendir+set}" = set; then
11507   echo $ECHO_N "(cached) $ECHO_C" >&6
11508 else
11509   ac_check_lib_save_LIBS=$LIBS
11510 LIBS="-lx  $LIBS"
11511 cat >conftest.$ac_ext <<_ACEOF
11512 #line 11512 "configure"
11513 #include "confdefs.h"
11514
11515 /* Override any gcc2 internal prototype to avoid an error.  */
11516 #ifdef __cplusplus
11517 extern "C"
11518 #endif
11519 /* We use char because int might match the return type of a gcc2
11520    builtin and then its argument prototype would still apply.  */
11521 char opendir ();
11522 int
11523 main ()
11524 {
11525 opendir ();
11526   ;
11527   return 0;
11528 }
11529 _ACEOF
11530 rm -f conftest.$ac_objext conftest$ac_exeext
11531 if { (eval echo "$as_me:11531: \"$ac_link\"") >&5
11532   (eval $ac_link) 2>&5
11533   ac_status=$?
11534   echo "$as_me:11534: \$? = $ac_status" >&5
11535   (exit $ac_status); } &&
11536          { ac_try='test -s conftest$ac_exeext'
11537   { (eval echo "$as_me:11537: \"$ac_try\"") >&5
11538   (eval $ac_try) 2>&5
11539   ac_status=$?
11540   echo "$as_me:11540: \$? = $ac_status" >&5
11541   (exit $ac_status); }; }; then
11542   ac_cv_lib_x_opendir=yes
11543 else
11544   echo "$as_me: failed program was:" >&5
11545 cat conftest.$ac_ext >&5
11546 ac_cv_lib_x_opendir=no
11547 fi
11548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11549 LIBS=$ac_check_lib_save_LIBS
11550 fi
11551 echo "$as_me:11551: result: $ac_cv_lib_x_opendir" >&5
11552 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11553 if test $ac_cv_lib_x_opendir = yes; then
11554   LIBS="$LIBS -lx"
11555 fi
11556
11557 fi
11558
11559 echo "$as_me:11559: checking whether time.h and sys/time.h may both be included" >&5
11560 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11561 if test "${ac_cv_header_time+set}" = set; then
11562   echo $ECHO_N "(cached) $ECHO_C" >&6
11563 else
11564   cat >conftest.$ac_ext <<_ACEOF
11565 #line 11565 "configure"
11566 #include "confdefs.h"
11567 #include <sys/types.h>
11568 #include <sys/time.h>
11569 #include <time.h>
11570
11571 int
11572 main ()
11573 {
11574 if ((struct tm *) 0)
11575 return 0;
11576   ;
11577   return 0;
11578 }
11579 _ACEOF
11580 rm -f conftest.$ac_objext
11581 if { (eval echo "$as_me:11581: \"$ac_compile\"") >&5
11582   (eval $ac_compile) 2>&5
11583   ac_status=$?
11584   echo "$as_me:11584: \$? = $ac_status" >&5
11585   (exit $ac_status); } &&
11586          { ac_try='test -s conftest.$ac_objext'
11587   { (eval echo "$as_me:11587: \"$ac_try\"") >&5
11588   (eval $ac_try) 2>&5
11589   ac_status=$?
11590   echo "$as_me:11590: \$? = $ac_status" >&5
11591   (exit $ac_status); }; }; then
11592   ac_cv_header_time=yes
11593 else
11594   echo "$as_me: failed program was:" >&5
11595 cat conftest.$ac_ext >&5
11596 ac_cv_header_time=no
11597 fi
11598 rm -f conftest.$ac_objext conftest.$ac_ext
11599 fi
11600 echo "$as_me:11600: result: $ac_cv_header_time" >&5
11601 echo "${ECHO_T}$ac_cv_header_time" >&6
11602 if test $ac_cv_header_time = yes; then
11603
11604 cat >>confdefs.h <<\EOF
11605 #define TIME_WITH_SYS_TIME 1
11606 EOF
11607
11608 fi
11609
11610 echo "$as_me:11610: checking for regular-expression headers" >&5
11611 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11612 if test "${cf_cv_regex+set}" = set; then
11613   echo $ECHO_N "(cached) $ECHO_C" >&6
11614 else
11615
11616 cat >conftest.$ac_ext <<_ACEOF
11617 #line 11617 "configure"
11618 #include "confdefs.h"
11619 #include <sys/types.h>
11620 #include <regex.h>
11621 int
11622 main ()
11623 {
11624
11625         regex_t *p;
11626         int x = regcomp(p, "", 0);
11627         int y = regexec(p, "", 0, 0, 0);
11628         regfree(p);
11629
11630   ;
11631   return 0;
11632 }
11633 _ACEOF
11634 rm -f conftest.$ac_objext conftest$ac_exeext
11635 if { (eval echo "$as_me:11635: \"$ac_link\"") >&5
11636   (eval $ac_link) 2>&5
11637   ac_status=$?
11638   echo "$as_me:11638: \$? = $ac_status" >&5
11639   (exit $ac_status); } &&
11640          { ac_try='test -s conftest$ac_exeext'
11641   { (eval echo "$as_me:11641: \"$ac_try\"") >&5
11642   (eval $ac_try) 2>&5
11643   ac_status=$?
11644   echo "$as_me:11644: \$? = $ac_status" >&5
11645   (exit $ac_status); }; }; then
11646   cf_cv_regex="regex.h"
11647 else
11648   echo "$as_me: failed program was:" >&5
11649 cat conftest.$ac_ext >&5
11650
11651         cat >conftest.$ac_ext <<_ACEOF
11652 #line 11652 "configure"
11653 #include "confdefs.h"
11654 #include <regexp.h>
11655 int
11656 main ()
11657 {
11658
11659                 char *p = compile("", "", "", 0);
11660                 int x = step("", "");
11661
11662   ;
11663   return 0;
11664 }
11665 _ACEOF
11666 rm -f conftest.$ac_objext conftest$ac_exeext
11667 if { (eval echo "$as_me:11667: \"$ac_link\"") >&5
11668   (eval $ac_link) 2>&5
11669   ac_status=$?
11670   echo "$as_me:11670: \$? = $ac_status" >&5
11671   (exit $ac_status); } &&
11672          { ac_try='test -s conftest$ac_exeext'
11673   { (eval echo "$as_me:11673: \"$ac_try\"") >&5
11674   (eval $ac_try) 2>&5
11675   ac_status=$?
11676   echo "$as_me:11676: \$? = $ac_status" >&5
11677   (exit $ac_status); }; }; then
11678   cf_cv_regex="regexp.h"
11679 else
11680   echo "$as_me: failed program was:" >&5
11681 cat conftest.$ac_ext >&5
11682
11683                 cf_save_LIBS="$LIBS"
11684                 LIBS="-lgen $LIBS"
11685                 cat >conftest.$ac_ext <<_ACEOF
11686 #line 11686 "configure"
11687 #include "confdefs.h"
11688 #include <regexpr.h>
11689 int
11690 main ()
11691 {
11692
11693                         char *p = compile("", "", "");
11694                         int x = step("", "");
11695
11696   ;
11697   return 0;
11698 }
11699 _ACEOF
11700 rm -f conftest.$ac_objext conftest$ac_exeext
11701 if { (eval echo "$as_me:11701: \"$ac_link\"") >&5
11702   (eval $ac_link) 2>&5
11703   ac_status=$?
11704   echo "$as_me:11704: \$? = $ac_status" >&5
11705   (exit $ac_status); } &&
11706          { ac_try='test -s conftest$ac_exeext'
11707   { (eval echo "$as_me:11707: \"$ac_try\"") >&5
11708   (eval $ac_try) 2>&5
11709   ac_status=$?
11710   echo "$as_me:11710: \$? = $ac_status" >&5
11711   (exit $ac_status); }; }; then
11712   cf_cv_regex="regexpr.h"
11713 else
11714   echo "$as_me: failed program was:" >&5
11715 cat conftest.$ac_ext >&5
11716 LIBS="$cf_save_LIBS"
11717 fi
11718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11719 fi
11720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11721 fi
11722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11723
11724 fi
11725
11726 echo "$as_me:11726: result: $cf_cv_regex" >&5
11727 echo "${ECHO_T}$cf_cv_regex" >&6
11728 case $cf_cv_regex in
11729         regex.h)   cat >>confdefs.h <<\EOF
11730 #define HAVE_REGEX_H_FUNCS 1
11731 EOF
11732  ;;
11733         regexp.h)  cat >>confdefs.h <<\EOF
11734 #define HAVE_REGEXP_H_FUNCS 1
11735 EOF
11736  ;;
11737         regexpr.h) cat >>confdefs.h <<\EOF
11738 #define HAVE_REGEXPR_H_FUNCS 1
11739 EOF
11740  ;;
11741 esac
11742
11743 for ac_header in \
11744 fcntl.h \
11745 getopt.h \
11746 limits.h \
11747 locale.h \
11748 poll.h \
11749 sys/bsdtypes.h \
11750 sys/ioctl.h \
11751 sys/param.h \
11752 sys/poll.h \
11753 sys/select.h \
11754 sys/time.h \
11755 sys/times.h \
11756 ttyent.h \
11757 unistd.h \
11758 wctype.h \
11759
11760 do
11761 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11762 echo "$as_me:11762: checking for $ac_header" >&5
11763 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11764 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11765   echo $ECHO_N "(cached) $ECHO_C" >&6
11766 else
11767   cat >conftest.$ac_ext <<_ACEOF
11768 #line 11768 "configure"
11769 #include "confdefs.h"
11770 #include <$ac_header>
11771 _ACEOF
11772 if { (eval echo "$as_me:11772: \"$ac_cpp conftest.$ac_ext\"") >&5
11773   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11774   ac_status=$?
11775   egrep -v '^ *\+' conftest.er1 >conftest.err
11776   rm -f conftest.er1
11777   cat conftest.err >&5
11778   echo "$as_me:11778: \$? = $ac_status" >&5
11779   (exit $ac_status); } >/dev/null; then
11780   if test -s conftest.err; then
11781     ac_cpp_err=$ac_c_preproc_warn_flag
11782   else
11783     ac_cpp_err=
11784   fi
11785 else
11786   ac_cpp_err=yes
11787 fi
11788 if test -z "$ac_cpp_err"; then
11789   eval "$as_ac_Header=yes"
11790 else
11791   echo "$as_me: failed program was:" >&5
11792   cat conftest.$ac_ext >&5
11793   eval "$as_ac_Header=no"
11794 fi
11795 rm -f conftest.err conftest.$ac_ext
11796 fi
11797 echo "$as_me:11797: result: `eval echo '${'$as_ac_Header'}'`" >&5
11798 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11799 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11800   cat >>confdefs.h <<EOF
11801 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11802 EOF
11803
11804 fi
11805 done
11806
11807 # check for ISC (this may also define _POSIX_SOURCE)
11808 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
11809 if test "$ISC" = yes ; then
11810
11811 echo "$as_me:11811: checking for main in -lcposix" >&5
11812 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
11813 if test "${ac_cv_lib_cposix_main+set}" = set; then
11814   echo $ECHO_N "(cached) $ECHO_C" >&6
11815 else
11816   ac_check_lib_save_LIBS=$LIBS
11817 LIBS="-lcposix  $LIBS"
11818 cat >conftest.$ac_ext <<_ACEOF
11819 #line 11819 "configure"
11820 #include "confdefs.h"
11821
11822 int
11823 main ()
11824 {
11825 main ();
11826   ;
11827   return 0;
11828 }
11829 _ACEOF
11830 rm -f conftest.$ac_objext conftest$ac_exeext
11831 if { (eval echo "$as_me:11831: \"$ac_link\"") >&5
11832   (eval $ac_link) 2>&5
11833   ac_status=$?
11834   echo "$as_me:11834: \$? = $ac_status" >&5
11835   (exit $ac_status); } &&
11836          { ac_try='test -s conftest$ac_exeext'
11837   { (eval echo "$as_me:11837: \"$ac_try\"") >&5
11838   (eval $ac_try) 2>&5
11839   ac_status=$?
11840   echo "$as_me:11840: \$? = $ac_status" >&5
11841   (exit $ac_status); }; }; then
11842   ac_cv_lib_cposix_main=yes
11843 else
11844   echo "$as_me: failed program was:" >&5
11845 cat conftest.$ac_ext >&5
11846 ac_cv_lib_cposix_main=no
11847 fi
11848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11849 LIBS=$ac_check_lib_save_LIBS
11850 fi
11851 echo "$as_me:11851: result: $ac_cv_lib_cposix_main" >&5
11852 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
11853 if test $ac_cv_lib_cposix_main = yes; then
11854   cat >>confdefs.h <<EOF
11855 #define HAVE_LIBCPOSIX 1
11856 EOF
11857
11858   LIBS="-lcposix $LIBS"
11859
11860 fi
11861
11862         echo "$as_me:11862: checking for bzero in -linet" >&5
11863 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11864 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11865   echo $ECHO_N "(cached) $ECHO_C" >&6
11866 else
11867   ac_check_lib_save_LIBS=$LIBS
11868 LIBS="-linet  $LIBS"
11869 cat >conftest.$ac_ext <<_ACEOF
11870 #line 11870 "configure"
11871 #include "confdefs.h"
11872
11873 /* Override any gcc2 internal prototype to avoid an error.  */
11874 #ifdef __cplusplus
11875 extern "C"
11876 #endif
11877 /* We use char because int might match the return type of a gcc2
11878    builtin and then its argument prototype would still apply.  */
11879 char bzero ();
11880 int
11881 main ()
11882 {
11883 bzero ();
11884   ;
11885   return 0;
11886 }
11887 _ACEOF
11888 rm -f conftest.$ac_objext conftest$ac_exeext
11889 if { (eval echo "$as_me:11889: \"$ac_link\"") >&5
11890   (eval $ac_link) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit $ac_status); } &&
11894          { ac_try='test -s conftest$ac_exeext'
11895   { (eval echo "$as_me:11895: \"$ac_try\"") >&5
11896   (eval $ac_try) 2>&5
11897   ac_status=$?
11898   echo "$as_me:11898: \$? = $ac_status" >&5
11899   (exit $ac_status); }; }; then
11900   ac_cv_lib_inet_bzero=yes
11901 else
11902   echo "$as_me: failed program was:" >&5
11903 cat conftest.$ac_ext >&5
11904 ac_cv_lib_inet_bzero=no
11905 fi
11906 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11907 LIBS=$ac_check_lib_save_LIBS
11908 fi
11909 echo "$as_me:11909: result: $ac_cv_lib_inet_bzero" >&5
11910 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11911 if test $ac_cv_lib_inet_bzero = yes; then
11912   LIBS="$LIBS -linet"
11913 fi
11914 fi
11915
11916 echo "$as_me:11916: checking if sys/time.h works with sys/select.h" >&5
11917 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11918 if test "${cf_cv_sys_time_select+set}" = set; then
11919   echo $ECHO_N "(cached) $ECHO_C" >&6
11920 else
11921
11922 cat >conftest.$ac_ext <<_ACEOF
11923 #line 11923 "configure"
11924 #include "confdefs.h"
11925
11926 #include <sys/types.h>
11927 #ifdef HAVE_SYS_TIME_H
11928 #include <sys/time.h>
11929 #endif
11930 #ifdef HAVE_SYS_SELECT_H
11931 #include <sys/select.h>
11932 #endif
11933
11934 int
11935 main ()
11936 {
11937
11938   ;
11939   return 0;
11940 }
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:11943: \"$ac_compile\"") >&5
11944   (eval $ac_compile) 2>&5
11945   ac_status=$?
11946   echo "$as_me:11946: \$? = $ac_status" >&5
11947   (exit $ac_status); } &&
11948          { ac_try='test -s conftest.$ac_objext'
11949   { (eval echo "$as_me:11949: \"$ac_try\"") >&5
11950   (eval $ac_try) 2>&5
11951   ac_status=$?
11952   echo "$as_me:11952: \$? = $ac_status" >&5
11953   (exit $ac_status); }; }; then
11954   cf_cv_sys_time_select=yes
11955 else
11956   echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11958 cf_cv_sys_time_select=no
11959 fi
11960 rm -f conftest.$ac_objext conftest.$ac_ext
11961
11962 fi
11963
11964 echo "$as_me:11964: result: $cf_cv_sys_time_select" >&5
11965 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11966 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11967 #define HAVE_SYS_TIME_SELECT 1
11968 EOF
11969
11970 ###     checks for compiler characteristics
11971 ac_ext=c
11972 ac_cpp='$CPP $CPPFLAGS'
11973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11976 ac_main_return=return
11977
11978 echo "$as_me:11978: checking for $CC option to accept ANSI C" >&5
11979 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11980 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11981   echo $ECHO_N "(cached) $ECHO_C" >&6
11982 else
11983   ac_cv_prog_cc_stdc=no
11984 ac_save_CC=$CC
11985 cat >conftest.$ac_ext <<_ACEOF
11986 #line 11986 "configure"
11987 #include "confdefs.h"
11988 #include <stdarg.h>
11989 #include <stdio.h>
11990 #include <sys/types.h>
11991 #include <sys/stat.h>
11992 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11993 struct buf { int x; };
11994 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11995 static char *e (p, i)
11996      char **p;
11997      int i;
11998 {
11999   return p[i];
12000 }
12001 static char *f (char * (*g) (char **, int), char **p, ...)
12002 {
12003   char *s;
12004   va_list v;
12005   va_start (v,p);
12006   s = g (p, va_arg (v,int));
12007   va_end (v);
12008   return s;
12009 }
12010 int test (int i, double x);
12011 struct s1 {int (*f) (int a);};
12012 struct s2 {int (*f) (double a);};
12013 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12014 int argc;
12015 char **argv;
12016 int
12017 main ()
12018 {
12019 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12020   ;
12021   return 0;
12022 }
12023 _ACEOF
12024 # Don't try gcc -ansi; that turns off useful extensions and
12025 # breaks some systems' header files.
12026 # AIX                   -qlanglvl=ansi
12027 # Ultrix and OSF/1      -std1
12028 # HP-UX 10.20 and later -Ae
12029 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12030 # SVR4                  -Xc -D__EXTENSIONS__
12031 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12032 do
12033   CC="$ac_save_CC $ac_arg"
12034   rm -f conftest.$ac_objext
12035 if { (eval echo "$as_me:12035: \"$ac_compile\"") >&5
12036   (eval $ac_compile) 2>&5
12037   ac_status=$?
12038   echo "$as_me:12038: \$? = $ac_status" >&5
12039   (exit $ac_status); } &&
12040          { ac_try='test -s conftest.$ac_objext'
12041   { (eval echo "$as_me:12041: \"$ac_try\"") >&5
12042   (eval $ac_try) 2>&5
12043   ac_status=$?
12044   echo "$as_me:12044: \$? = $ac_status" >&5
12045   (exit $ac_status); }; }; then
12046   ac_cv_prog_cc_stdc=$ac_arg
12047 break
12048 else
12049   echo "$as_me: failed program was:" >&5
12050 cat conftest.$ac_ext >&5
12051 fi
12052 rm -f conftest.$ac_objext
12053 done
12054 rm -f conftest.$ac_ext conftest.$ac_objext
12055 CC=$ac_save_CC
12056
12057 fi
12058
12059 case "x$ac_cv_prog_cc_stdc" in
12060   x|xno)
12061     echo "$as_me:12061: result: none needed" >&5
12062 echo "${ECHO_T}none needed" >&6 ;;
12063   *)
12064     echo "$as_me:12064: result: $ac_cv_prog_cc_stdc" >&5
12065 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12066     CC="$CC $ac_cv_prog_cc_stdc" ;;
12067 esac
12068
12069 echo "$as_me:12069: checking for an ANSI C-conforming const" >&5
12070 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12071 if test "${ac_cv_c_const+set}" = set; then
12072   echo $ECHO_N "(cached) $ECHO_C" >&6
12073 else
12074   cat >conftest.$ac_ext <<_ACEOF
12075 #line 12075 "configure"
12076 #include "confdefs.h"
12077
12078 int
12079 main ()
12080 {
12081 /* FIXME: Include the comments suggested by Paul. */
12082 #ifndef __cplusplus
12083   /* Ultrix mips cc rejects this.  */
12084   typedef int charset[2];
12085   const charset x;
12086   /* SunOS 4.1.1 cc rejects this.  */
12087   char const *const *ccp;
12088   char **p;
12089   /* NEC SVR4.0.2 mips cc rejects this.  */
12090   struct point {int x, y;};
12091   static struct point const zero = {0,0};
12092   /* AIX XL C 1.02.0.0 rejects this.
12093      It does not let you subtract one const X* pointer from another in
12094      an arm of an if-expression whose if-part is not a constant
12095      expression */
12096   const char *g = "string";
12097   ccp = &g + (g ? g-g : 0);
12098   /* HPUX 7.0 cc rejects these. */
12099   ++ccp;
12100   p = (char**) ccp;
12101   ccp = (char const *const *) p;
12102   { /* SCO 3.2v4 cc rejects this.  */
12103     char *t;
12104     char const *s = 0 ? (char *) 0 : (char const *) 0;
12105
12106     *t++ = 0;
12107   }
12108   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12109     int x[] = {25, 17};
12110     const int *foo = &x[0];
12111     ++foo;
12112   }
12113   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12114     typedef const int *iptr;
12115     iptr p = 0;
12116     ++p;
12117   }
12118   { /* AIX XL C 1.02.0.0 rejects this saying
12119        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12120     struct s { int j; const int *ap[3]; };
12121     struct s *b; b->j = 5;
12122   }
12123   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12124     const int foo = 10;
12125   }
12126 #endif
12127
12128   ;
12129   return 0;
12130 }
12131 _ACEOF
12132 rm -f conftest.$ac_objext
12133 if { (eval echo "$as_me:12133: \"$ac_compile\"") >&5
12134   (eval $ac_compile) 2>&5
12135   ac_status=$?
12136   echo "$as_me:12136: \$? = $ac_status" >&5
12137   (exit $ac_status); } &&
12138          { ac_try='test -s conftest.$ac_objext'
12139   { (eval echo "$as_me:12139: \"$ac_try\"") >&5
12140   (eval $ac_try) 2>&5
12141   ac_status=$?
12142   echo "$as_me:12142: \$? = $ac_status" >&5
12143   (exit $ac_status); }; }; then
12144   ac_cv_c_const=yes
12145 else
12146   echo "$as_me: failed program was:" >&5
12147 cat conftest.$ac_ext >&5
12148 ac_cv_c_const=no
12149 fi
12150 rm -f conftest.$ac_objext conftest.$ac_ext
12151 fi
12152 echo "$as_me:12152: result: $ac_cv_c_const" >&5
12153 echo "${ECHO_T}$ac_cv_c_const" >&6
12154 if test $ac_cv_c_const = no; then
12155
12156 cat >>confdefs.h <<\EOF
12157 #define const
12158 EOF
12159
12160 fi
12161
12162 echo "$as_me:12162: checking for inline" >&5
12163 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12164 if test "${ac_cv_c_inline+set}" = set; then
12165   echo $ECHO_N "(cached) $ECHO_C" >&6
12166 else
12167   ac_cv_c_inline=no
12168 for ac_kw in inline __inline__ __inline; do
12169   cat >conftest.$ac_ext <<_ACEOF
12170 #line 12170 "configure"
12171 #include "confdefs.h"
12172 #ifndef __cplusplus
12173 static $ac_kw int static_foo () {return 0; }
12174 $ac_kw int foo () {return 0; }
12175 #endif
12176
12177 _ACEOF
12178 rm -f conftest.$ac_objext
12179 if { (eval echo "$as_me:12179: \"$ac_compile\"") >&5
12180   (eval $ac_compile) 2>&5
12181   ac_status=$?
12182   echo "$as_me:12182: \$? = $ac_status" >&5
12183   (exit $ac_status); } &&
12184          { ac_try='test -s conftest.$ac_objext'
12185   { (eval echo "$as_me:12185: \"$ac_try\"") >&5
12186   (eval $ac_try) 2>&5
12187   ac_status=$?
12188   echo "$as_me:12188: \$? = $ac_status" >&5
12189   (exit $ac_status); }; }; then
12190   ac_cv_c_inline=$ac_kw; break
12191 else
12192   echo "$as_me: failed program was:" >&5
12193 cat conftest.$ac_ext >&5
12194 fi
12195 rm -f conftest.$ac_objext conftest.$ac_ext
12196 done
12197
12198 fi
12199 echo "$as_me:12199: result: $ac_cv_c_inline" >&5
12200 echo "${ECHO_T}$ac_cv_c_inline" >&6
12201 case $ac_cv_c_inline in
12202   inline | yes) ;;
12203   no)
12204 cat >>confdefs.h <<\EOF
12205 #define inline
12206 EOF
12207  ;;
12208   *)  cat >>confdefs.h <<EOF
12209 #define inline $ac_cv_c_inline
12210 EOF
12211  ;;
12212 esac
12213
12214 NCURSES_INLINE=
12215 if test "$ac_cv_c_inline" != no ; then
12216   NCURSES_INLINE=inline
12217   if test "$INTEL_COMPILER" = yes
12218   then
12219     :
12220   elif test "$GCC" = yes
12221   then
12222     echo "$as_me:12222: checking if gcc supports options to tune inlining" >&5
12223 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12224 if test "${cf_cv_gcc_inline+set}" = set; then
12225   echo $ECHO_N "(cached) $ECHO_C" >&6
12226 else
12227
12228       cf_save_CFLAGS=$CFLAGS
12229       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12230       cat >conftest.$ac_ext <<_ACEOF
12231 #line 12231 "configure"
12232 #include "confdefs.h"
12233 inline int foo(void) { return 1; }
12234 int
12235 main ()
12236 {
12237 ${cf_cv_main_return:-return} foo()
12238   ;
12239   return 0;
12240 }
12241 _ACEOF
12242 rm -f conftest.$ac_objext
12243 if { (eval echo "$as_me:12243: \"$ac_compile\"") >&5
12244   (eval $ac_compile) 2>&5
12245   ac_status=$?
12246   echo "$as_me:12246: \$? = $ac_status" >&5
12247   (exit $ac_status); } &&
12248          { ac_try='test -s conftest.$ac_objext'
12249   { (eval echo "$as_me:12249: \"$ac_try\"") >&5
12250   (eval $ac_try) 2>&5
12251   ac_status=$?
12252   echo "$as_me:12252: \$? = $ac_status" >&5
12253   (exit $ac_status); }; }; then
12254   cf_cv_gcc_inline=yes
12255 else
12256   echo "$as_me: failed program was:" >&5
12257 cat conftest.$ac_ext >&5
12258 cf_cv_gcc_inline=no
12259 fi
12260 rm -f conftest.$ac_objext conftest.$ac_ext
12261       CFLAGS=$cf_save_CFLAGS
12262
12263 fi
12264 echo "$as_me:12264: result: $cf_cv_gcc_inline" >&5
12265 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12266     if test "$cf_cv_gcc_inline" = yes ; then
12267
12268 cf_fix_cppflags=no
12269 cf_new_cflags=
12270 cf_new_cppflags=
12271 cf_new_extra_cppflags=
12272
12273 for cf_add_cflags in --param max-inline-insns-single=1200
12274 do
12275 case $cf_fix_cppflags in
12276 no)
12277         case $cf_add_cflags in #(vi
12278         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12279                 case $cf_add_cflags in
12280                 -D*)
12281                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12282
12283                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12284                         && test -z "${cf_tst_cflags}" \
12285                         && cf_fix_cppflags=yes
12286
12287                         if test $cf_fix_cppflags = yes ; then
12288                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12289                                 continue
12290                         elif test "${cf_tst_cflags}" = "\"'" ; then
12291                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12292                                 continue
12293                         fi
12294                         ;;
12295                 esac
12296                 case "$CPPFLAGS" in
12297                 *$cf_add_cflags) #(vi
12298                         ;;
12299                 *) #(vi
12300                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12301                         ;;
12302                 esac
12303                 ;;
12304         *)
12305                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12306                 ;;
12307         esac
12308         ;;
12309 yes)
12310         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12311
12312         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12313
12314         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12315         && test -z "${cf_tst_cflags}" \
12316         && cf_fix_cppflags=no
12317         ;;
12318 esac
12319 done
12320
12321 if test -n "$cf_new_cflags" ; then
12322
12323         CFLAGS="$CFLAGS $cf_new_cflags"
12324 fi
12325
12326 if test -n "$cf_new_cppflags" ; then
12327
12328         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
12329 fi
12330
12331 if test -n "$cf_new_extra_cppflags" ; then
12332
12333         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12334 fi
12335
12336     fi
12337   fi
12338 fi
12339
12340 echo "$as_me:12340: checking for signal global datatype" >&5
12341 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12342 if test "${cf_cv_sig_atomic_t+set}" = set; then
12343   echo $ECHO_N "(cached) $ECHO_C" >&6
12344 else
12345
12346         for cf_type in \
12347                 "volatile sig_atomic_t" \
12348                 "sig_atomic_t" \
12349                 "int"
12350         do
12351         cat >conftest.$ac_ext <<_ACEOF
12352 #line 12352 "configure"
12353 #include "confdefs.h"
12354
12355 #include <sys/types.h>
12356 #include <signal.h>
12357 #include <stdio.h>
12358
12359 extern $cf_type x;
12360 $cf_type x;
12361 static void handler(int sig)
12362 {
12363         x = 5;
12364 }
12365 int
12366 main ()
12367 {
12368 signal(SIGINT, handler);
12369                  x = 1
12370   ;
12371   return 0;
12372 }
12373 _ACEOF
12374 rm -f conftest.$ac_objext
12375 if { (eval echo "$as_me:12375: \"$ac_compile\"") >&5
12376   (eval $ac_compile) 2>&5
12377   ac_status=$?
12378   echo "$as_me:12378: \$? = $ac_status" >&5
12379   (exit $ac_status); } &&
12380          { ac_try='test -s conftest.$ac_objext'
12381   { (eval echo "$as_me:12381: \"$ac_try\"") >&5
12382   (eval $ac_try) 2>&5
12383   ac_status=$?
12384   echo "$as_me:12384: \$? = $ac_status" >&5
12385   (exit $ac_status); }; }; then
12386   cf_cv_sig_atomic_t=$cf_type
12387 else
12388   echo "$as_me: failed program was:" >&5
12389 cat conftest.$ac_ext >&5
12390 cf_cv_sig_atomic_t=no
12391 fi
12392 rm -f conftest.$ac_objext conftest.$ac_ext
12393                 test "$cf_cv_sig_atomic_t" != no && break
12394         done
12395
12396 fi
12397
12398 echo "$as_me:12398: result: $cf_cv_sig_atomic_t" >&5
12399 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12400 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12401 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12402 EOF
12403
12404 if test $NCURSES_CHTYPE = auto ; then
12405
12406 echo "$as_me:12406: checking for type of chtype" >&5
12407 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12408 if test "${cf_cv_typeof_chtype+set}" = set; then
12409   echo $ECHO_N "(cached) $ECHO_C" >&6
12410 else
12411
12412                 if test "$cross_compiling" = yes; then
12413   cf_cv_typeof_chtype=long
12414 else
12415   cat >conftest.$ac_ext <<_ACEOF
12416 #line 12416 "configure"
12417 #include "confdefs.h"
12418
12419 #define WANT_BITS 31
12420 #include <stdio.h>
12421 int main()
12422 {
12423         FILE *fp = fopen("cf_test.out", "w");
12424         if (fp != 0) {
12425                 char *result = "long";
12426                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12427                         int n;
12428                         unsigned int x, y;
12429                         for (n = 0; n < WANT_BITS; n++) {
12430                                 x = (1 << n);
12431                                 y = (x >> n);
12432                                 if (y != 1 || x == 0) {
12433                                         x = 0;
12434                                         break;
12435                                 }
12436                         }
12437                         /*
12438                          * If x is nonzero, an int is big enough for the bits
12439                          * that we want.
12440                          */
12441                         result = (x != 0) ? "int" : "long";
12442                 }
12443                 fputs(result, fp);
12444                 fclose(fp);
12445         }
12446         ${cf_cv_main_return:-return}(0);
12447 }
12448
12449 _ACEOF
12450 rm -f conftest$ac_exeext
12451 if { (eval echo "$as_me:12451: \"$ac_link\"") >&5
12452   (eval $ac_link) 2>&5
12453   ac_status=$?
12454   echo "$as_me:12454: \$? = $ac_status" >&5
12455   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12456   { (eval echo "$as_me:12456: \"$ac_try\"") >&5
12457   (eval $ac_try) 2>&5
12458   ac_status=$?
12459   echo "$as_me:12459: \$? = $ac_status" >&5
12460   (exit $ac_status); }; }; then
12461   cf_cv_typeof_chtype=`cat cf_test.out`
12462 else
12463   echo "$as_me: program exited with status $ac_status" >&5
12464 echo "$as_me: failed program was:" >&5
12465 cat conftest.$ac_ext >&5
12466 cf_cv_typeof_chtype=long
12467 fi
12468 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12469 fi
12470                 rm -f cf_test.out
12471
12472 fi
12473
12474 echo "$as_me:12474: result: $cf_cv_typeof_chtype" >&5
12475 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12476
12477 cat >>confdefs.h <<EOF
12478 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12479 EOF
12480
12481 else
12482         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12483 fi
12484 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12485
12486 echo "$as_me:12486: checking if unsigned literals are legal" >&5
12487 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12488 if test "${cf_cv_unsigned_literals+set}" = set; then
12489   echo $ECHO_N "(cached) $ECHO_C" >&6
12490 else
12491
12492         cat >conftest.$ac_ext <<_ACEOF
12493 #line 12493 "configure"
12494 #include "confdefs.h"
12495
12496 int
12497 main ()
12498 {
12499 long x = 1L + 1UL + 1U + 1
12500   ;
12501   return 0;
12502 }
12503 _ACEOF
12504 rm -f conftest.$ac_objext
12505 if { (eval echo "$as_me:12505: \"$ac_compile\"") >&5
12506   (eval $ac_compile) 2>&5
12507   ac_status=$?
12508   echo "$as_me:12508: \$? = $ac_status" >&5
12509   (exit $ac_status); } &&
12510          { ac_try='test -s conftest.$ac_objext'
12511   { (eval echo "$as_me:12511: \"$ac_try\"") >&5
12512   (eval $ac_try) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); }; }; then
12516   cf_cv_unsigned_literals=yes
12517 else
12518   echo "$as_me: failed program was:" >&5
12519 cat conftest.$ac_ext >&5
12520 cf_cv_unsigned_literals=no
12521 fi
12522 rm -f conftest.$ac_objext conftest.$ac_ext
12523
12524 fi
12525
12526 echo "$as_me:12526: result: $cf_cv_unsigned_literals" >&5
12527 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12528
12529 cf_cv_1UL="1"
12530 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12531 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12532
12533 if test $NCURSES_MMASK_T = auto ; then
12534         cf_cv_typeof_mmask_t=long
12535 else
12536         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12537 fi
12538 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12539
12540 ###     Checks for external-data
12541
12542 echo "$as_me:12542: checking if external errno is declared" >&5
12543 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12544 if test "${cf_cv_dcl_errno+set}" = set; then
12545   echo $ECHO_N "(cached) $ECHO_C" >&6
12546 else
12547
12548     cat >conftest.$ac_ext <<_ACEOF
12549 #line 12549 "configure"
12550 #include "confdefs.h"
12551
12552 #ifdef HAVE_STDLIB_H
12553 #include <stdlib.h>
12554 #endif
12555 #include <stdio.h>
12556 #include <sys/types.h>
12557 #include <errno.h>
12558 int
12559 main ()
12560 {
12561 int x = (int) errno
12562   ;
12563   return 0;
12564 }
12565 _ACEOF
12566 rm -f conftest.$ac_objext
12567 if { (eval echo "$as_me:12567: \"$ac_compile\"") >&5
12568   (eval $ac_compile) 2>&5
12569   ac_status=$?
12570   echo "$as_me:12570: \$? = $ac_status" >&5
12571   (exit $ac_status); } &&
12572          { ac_try='test -s conftest.$ac_objext'
12573   { (eval echo "$as_me:12573: \"$ac_try\"") >&5
12574   (eval $ac_try) 2>&5
12575   ac_status=$?
12576   echo "$as_me:12576: \$? = $ac_status" >&5
12577   (exit $ac_status); }; }; then
12578   cf_cv_dcl_errno=yes
12579 else
12580   echo "$as_me: failed program was:" >&5
12581 cat conftest.$ac_ext >&5
12582 cf_cv_dcl_errno=no
12583 fi
12584 rm -f conftest.$ac_objext conftest.$ac_ext
12585
12586 fi
12587 echo "$as_me:12587: result: $cf_cv_dcl_errno" >&5
12588 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12589
12590 if test "$cf_cv_dcl_errno" = no ; then
12591
12592 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12593
12594     cat >>confdefs.h <<EOF
12595 #define $cf_result 1
12596 EOF
12597
12598 fi
12599
12600 # It's possible (for near-UNIX clones) that the data doesn't exist
12601
12602 echo "$as_me:12602: checking if external errno exists" >&5
12603 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12604 if test "${cf_cv_have_errno+set}" = set; then
12605   echo $ECHO_N "(cached) $ECHO_C" >&6
12606 else
12607
12608     cat >conftest.$ac_ext <<_ACEOF
12609 #line 12609 "configure"
12610 #include "confdefs.h"
12611
12612 #undef errno
12613 extern int errno;
12614
12615 int
12616 main ()
12617 {
12618 errno = 2
12619   ;
12620   return 0;
12621 }
12622 _ACEOF
12623 rm -f conftest.$ac_objext conftest$ac_exeext
12624 if { (eval echo "$as_me:12624: \"$ac_link\"") >&5
12625   (eval $ac_link) 2>&5
12626   ac_status=$?
12627   echo "$as_me:12627: \$? = $ac_status" >&5
12628   (exit $ac_status); } &&
12629          { ac_try='test -s conftest$ac_exeext'
12630   { (eval echo "$as_me:12630: \"$ac_try\"") >&5
12631   (eval $ac_try) 2>&5
12632   ac_status=$?
12633   echo "$as_me:12633: \$? = $ac_status" >&5
12634   (exit $ac_status); }; }; then
12635   cf_cv_have_errno=yes
12636 else
12637   echo "$as_me: failed program was:" >&5
12638 cat conftest.$ac_ext >&5
12639 cf_cv_have_errno=no
12640 fi
12641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12642
12643 fi
12644 echo "$as_me:12644: result: $cf_cv_have_errno" >&5
12645 echo "${ECHO_T}$cf_cv_have_errno" >&6
12646
12647 if test "$cf_cv_have_errno" = yes ; then
12648
12649 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12650
12651     cat >>confdefs.h <<EOF
12652 #define $cf_result 1
12653 EOF
12654
12655 fi
12656
12657 echo "$as_me:12657: checking if data-only library module links" >&5
12658 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12659 if test "${cf_cv_link_dataonly+set}" = set; then
12660   echo $ECHO_N "(cached) $ECHO_C" >&6
12661 else
12662
12663         rm -f conftest.a
12664         cat >conftest.$ac_ext <<EOF
12665 #line 12665 "configure"
12666 int     testdata[3] = { 123, 456, 789 };
12667 EOF
12668         if { (eval echo "$as_me:12668: \"$ac_compile\"") >&5
12669   (eval $ac_compile) 2>&5
12670   ac_status=$?
12671   echo "$as_me:12671: \$? = $ac_status" >&5
12672   (exit $ac_status); } ; then
12673                 mv conftest.o data.o && \
12674                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
12675         fi
12676         rm -f conftest.$ac_ext data.o
12677         cat >conftest.$ac_ext <<EOF
12678 #line 12678 "configure"
12679 int     testfunc()
12680 {
12681 #if defined(NeXT)
12682         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
12683 #else
12684         extern int testdata[3];
12685         return testdata[0] == 123
12686            &&  testdata[1] == 456
12687            &&  testdata[2] == 789;
12688 #endif
12689 }
12690 EOF
12691         if { (eval echo "$as_me:12691: \"$ac_compile\"") >&5
12692   (eval $ac_compile) 2>&5
12693   ac_status=$?
12694   echo "$as_me:12694: \$? = $ac_status" >&5
12695   (exit $ac_status); }; then
12696                 mv conftest.o func.o && \
12697                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
12698         fi
12699         rm -f conftest.$ac_ext func.o
12700         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12701         cf_saveLIBS="$LIBS"
12702         LIBS="conftest.a $LIBS"
12703         if test "$cross_compiling" = yes; then
12704   cf_cv_link_dataonly=unknown
12705 else
12706   cat >conftest.$ac_ext <<_ACEOF
12707 #line 12707 "configure"
12708 #include "confdefs.h"
12709
12710         int main()
12711         {
12712                 extern int testfunc();
12713                 ${cf_cv_main_return:-return} (!testfunc());
12714         }
12715
12716 _ACEOF
12717 rm -f conftest$ac_exeext
12718 if { (eval echo "$as_me:12718: \"$ac_link\"") >&5
12719   (eval $ac_link) 2>&5
12720   ac_status=$?
12721   echo "$as_me:12721: \$? = $ac_status" >&5
12722   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12723   { (eval echo "$as_me:12723: \"$ac_try\"") >&5
12724   (eval $ac_try) 2>&5
12725   ac_status=$?
12726   echo "$as_me:12726: \$? = $ac_status" >&5
12727   (exit $ac_status); }; }; then
12728   cf_cv_link_dataonly=yes
12729 else
12730   echo "$as_me: program exited with status $ac_status" >&5
12731 echo "$as_me: failed program was:" >&5
12732 cat conftest.$ac_ext >&5
12733 cf_cv_link_dataonly=no
12734 fi
12735 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12736 fi
12737         LIBS="$cf_saveLIBS"
12738
12739 fi
12740
12741 echo "$as_me:12741: result: $cf_cv_link_dataonly" >&5
12742 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
12743
12744 if test "$cf_cv_link_dataonly" = no ; then
12745         cat >>confdefs.h <<\EOF
12746 #define BROKEN_LINKER 1
12747 EOF
12748
12749         BROKEN_LINKER=1
12750 fi
12751
12752 ###     Checks for library functions.
12753
12754 for ac_func in \
12755 getcwd \
12756 getegid \
12757 geteuid \
12758 getttynam \
12759 issetugid \
12760 poll \
12761 remove \
12762 select \
12763 setbuf \
12764 setbuffer \
12765 setvbuf \
12766 sigaction \
12767 sigvec \
12768 strdup \
12769 strstr \
12770 tcgetpgrp \
12771 times \
12772 vsnprintf \
12773
12774 do
12775 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12776 echo "$as_me:12776: checking for $ac_func" >&5
12777 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12778 if eval "test \"\${$as_ac_var+set}\" = set"; then
12779   echo $ECHO_N "(cached) $ECHO_C" >&6
12780 else
12781   cat >conftest.$ac_ext <<_ACEOF
12782 #line 12782 "configure"
12783 #include "confdefs.h"
12784 /* System header to define __stub macros and hopefully few prototypes,
12785     which can conflict with char $ac_func (); below.  */
12786 #include <assert.h>
12787 /* Override any gcc2 internal prototype to avoid an error.  */
12788 #ifdef __cplusplus
12789 extern "C"
12790 #endif
12791 /* We use char because int might match the return type of a gcc2
12792    builtin and then its argument prototype would still apply.  */
12793 char $ac_func ();
12794 char (*f) ();
12795
12796 int
12797 main ()
12798 {
12799 /* The GNU C library defines this for functions which it implements
12800     to always fail with ENOSYS.  Some functions are actually named
12801     something starting with __ and the normal name is an alias.  */
12802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12803 choke me
12804 #else
12805 f = $ac_func;
12806 #endif
12807
12808   ;
12809   return 0;
12810 }
12811 _ACEOF
12812 rm -f conftest.$ac_objext conftest$ac_exeext
12813 if { (eval echo "$as_me:12813: \"$ac_link\"") >&5
12814   (eval $ac_link) 2>&5
12815   ac_status=$?
12816   echo "$as_me:12816: \$? = $ac_status" >&5
12817   (exit $ac_status); } &&
12818          { ac_try='test -s conftest$ac_exeext'
12819   { (eval echo "$as_me:12819: \"$ac_try\"") >&5
12820   (eval $ac_try) 2>&5
12821   ac_status=$?
12822   echo "$as_me:12822: \$? = $ac_status" >&5
12823   (exit $ac_status); }; }; then
12824   eval "$as_ac_var=yes"
12825 else
12826   echo "$as_me: failed program was:" >&5
12827 cat conftest.$ac_ext >&5
12828 eval "$as_ac_var=no"
12829 fi
12830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12831 fi
12832 echo "$as_me:12832: result: `eval echo '${'$as_ac_var'}'`" >&5
12833 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12834 if test `eval echo '${'$as_ac_var'}'` = yes; then
12835   cat >>confdefs.h <<EOF
12836 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12837 EOF
12838
12839 fi
12840 done
12841
12842 if test "$with_getcap" = "yes" ; then
12843
12844 echo "$as_me:12844: checking for terminal-capability database functions" >&5
12845 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
12846 if test "${cf_cv_cgetent+set}" = set; then
12847   echo $ECHO_N "(cached) $ECHO_C" >&6
12848 else
12849
12850 cat >conftest.$ac_ext <<_ACEOF
12851 #line 12851 "configure"
12852 #include "confdefs.h"
12853
12854 #include <stdlib.h>
12855 int
12856 main ()
12857 {
12858
12859         char temp[128];
12860         char *buf = temp;
12861         char *db_array = temp;
12862         cgetent(&buf, /* int *, */ &db_array, "vt100");
12863         cgetcap(buf, "tc", '=');
12864         cgetmatch(buf, "tc");
12865
12866   ;
12867   return 0;
12868 }
12869 _ACEOF
12870 rm -f conftest.$ac_objext conftest$ac_exeext
12871 if { (eval echo "$as_me:12871: \"$ac_link\"") >&5
12872   (eval $ac_link) 2>&5
12873   ac_status=$?
12874   echo "$as_me:12874: \$? = $ac_status" >&5
12875   (exit $ac_status); } &&
12876          { ac_try='test -s conftest$ac_exeext'
12877   { (eval echo "$as_me:12877: \"$ac_try\"") >&5
12878   (eval $ac_try) 2>&5
12879   ac_status=$?
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit $ac_status); }; }; then
12882   cf_cv_cgetent=yes
12883 else
12884   echo "$as_me: failed program was:" >&5
12885 cat conftest.$ac_ext >&5
12886 cf_cv_cgetent=no
12887 fi
12888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12889
12890 fi
12891
12892 echo "$as_me:12892: result: $cf_cv_cgetent" >&5
12893 echo "${ECHO_T}$cf_cv_cgetent" >&6
12894 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
12895 #define HAVE_BSD_CGETENT 1
12896 EOF
12897
12898 fi
12899
12900 echo "$as_me:12900: checking for isascii" >&5
12901 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
12902 if test "${cf_cv_have_isascii+set}" = set; then
12903   echo $ECHO_N "(cached) $ECHO_C" >&6
12904 else
12905
12906         cat >conftest.$ac_ext <<_ACEOF
12907 #line 12907 "configure"
12908 #include "confdefs.h"
12909 #include <ctype.h>
12910 int
12911 main ()
12912 {
12913 int x = isascii(' ')
12914   ;
12915   return 0;
12916 }
12917 _ACEOF
12918 rm -f conftest.$ac_objext conftest$ac_exeext
12919 if { (eval echo "$as_me:12919: \"$ac_link\"") >&5
12920   (eval $ac_link) 2>&5
12921   ac_status=$?
12922   echo "$as_me:12922: \$? = $ac_status" >&5
12923   (exit $ac_status); } &&
12924          { ac_try='test -s conftest$ac_exeext'
12925   { (eval echo "$as_me:12925: \"$ac_try\"") >&5
12926   (eval $ac_try) 2>&5
12927   ac_status=$?
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit $ac_status); }; }; then
12930   cf_cv_have_isascii=yes
12931 else
12932   echo "$as_me: failed program was:" >&5
12933 cat conftest.$ac_ext >&5
12934 cf_cv_have_isascii=no
12935 fi
12936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12937
12938 fi
12939 echo "$as_me:12939: result: $cf_cv_have_isascii" >&5
12940 echo "${ECHO_T}$cf_cv_have_isascii" >&6
12941 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
12942 #define HAVE_ISASCII 1
12943 EOF
12944
12945 if test "$ac_cv_func_sigaction" = yes; then
12946 echo "$as_me:12946: checking whether sigaction needs _POSIX_SOURCE" >&5
12947 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
12948 cat >conftest.$ac_ext <<_ACEOF
12949 #line 12949 "configure"
12950 #include "confdefs.h"
12951
12952 #include <sys/types.h>
12953 #include <signal.h>
12954 int
12955 main ()
12956 {
12957 struct sigaction act
12958   ;
12959   return 0;
12960 }
12961 _ACEOF
12962 rm -f conftest.$ac_objext
12963 if { (eval echo "$as_me:12963: \"$ac_compile\"") >&5
12964   (eval $ac_compile) 2>&5
12965   ac_status=$?
12966   echo "$as_me:12966: \$? = $ac_status" >&5
12967   (exit $ac_status); } &&
12968          { ac_try='test -s conftest.$ac_objext'
12969   { (eval echo "$as_me:12969: \"$ac_try\"") >&5
12970   (eval $ac_try) 2>&5
12971   ac_status=$?
12972   echo "$as_me:12972: \$? = $ac_status" >&5
12973   (exit $ac_status); }; }; then
12974   sigact_bad=no
12975 else
12976   echo "$as_me: failed program was:" >&5
12977 cat conftest.$ac_ext >&5
12978
12979 cat >conftest.$ac_ext <<_ACEOF
12980 #line 12980 "configure"
12981 #include "confdefs.h"
12982
12983 #define _POSIX_SOURCE
12984 #include <sys/types.h>
12985 #include <signal.h>
12986 int
12987 main ()
12988 {
12989 struct sigaction act
12990   ;
12991   return 0;
12992 }
12993 _ACEOF
12994 rm -f conftest.$ac_objext
12995 if { (eval echo "$as_me:12995: \"$ac_compile\"") >&5
12996   (eval $ac_compile) 2>&5
12997   ac_status=$?
12998   echo "$as_me:12998: \$? = $ac_status" >&5
12999   (exit $ac_status); } &&
13000          { ac_try='test -s conftest.$ac_objext'
13001   { (eval echo "$as_me:13001: \"$ac_try\"") >&5
13002   (eval $ac_try) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit $ac_status); }; }; then
13006   sigact_bad=yes
13007          cat >>confdefs.h <<\EOF
13008 #define SVR4_ACTION 1
13009 EOF
13010
13011 else
13012   echo "$as_me: failed program was:" >&5
13013 cat conftest.$ac_ext >&5
13014 sigact_bad=unknown
13015 fi
13016 rm -f conftest.$ac_objext conftest.$ac_ext
13017 fi
13018 rm -f conftest.$ac_objext conftest.$ac_ext
13019 echo "$as_me:13019: result: $sigact_bad" >&5
13020 echo "${ECHO_T}$sigact_bad" >&6
13021 fi
13022
13023 echo "$as_me:13023: checking if nanosleep really works" >&5
13024 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13025 if test "${cf_cv_func_nanosleep+set}" = set; then
13026   echo $ECHO_N "(cached) $ECHO_C" >&6
13027 else
13028
13029 if test "$cross_compiling" = yes; then
13030   cf_cv_func_nanosleep=unknown
13031 else
13032   cat >conftest.$ac_ext <<_ACEOF
13033 #line 13033 "configure"
13034 #include "confdefs.h"
13035
13036 #include <stdio.h>
13037 #include <errno.h>
13038 #include <time.h>
13039
13040 #ifdef HAVE_SYS_TIME_H
13041 #include <sys/time.h>
13042 #endif
13043
13044 int main() {
13045         struct timespec ts1, ts2;
13046         int code;
13047         ts1.tv_sec  = 0;
13048         ts1.tv_nsec = 750000000;
13049         ts2.tv_sec  = 0;
13050         ts2.tv_nsec = 0;
13051         errno = 0;
13052         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13053         ${cf_cv_main_return:-return}(code != 0);
13054 }
13055
13056 _ACEOF
13057 rm -f conftest$ac_exeext
13058 if { (eval echo "$as_me:13058: \"$ac_link\"") >&5
13059   (eval $ac_link) 2>&5
13060   ac_status=$?
13061   echo "$as_me:13061: \$? = $ac_status" >&5
13062   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13063   { (eval echo "$as_me:13063: \"$ac_try\"") >&5
13064   (eval $ac_try) 2>&5
13065   ac_status=$?
13066   echo "$as_me:13066: \$? = $ac_status" >&5
13067   (exit $ac_status); }; }; then
13068   cf_cv_func_nanosleep=yes
13069 else
13070   echo "$as_me: program exited with status $ac_status" >&5
13071 echo "$as_me: failed program was:" >&5
13072 cat conftest.$ac_ext >&5
13073 cf_cv_func_nanosleep=no
13074 fi
13075 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13076 fi
13077 fi
13078 echo "$as_me:13078: result: $cf_cv_func_nanosleep" >&5
13079 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13080
13081 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13082 #define HAVE_NANOSLEEP 1
13083 EOF
13084
13085 for ac_header in \
13086 termio.h \
13087 termios.h \
13088 unistd.h \
13089
13090 do
13091 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13092 echo "$as_me:13092: checking for $ac_header" >&5
13093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13094 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13095   echo $ECHO_N "(cached) $ECHO_C" >&6
13096 else
13097   cat >conftest.$ac_ext <<_ACEOF
13098 #line 13098 "configure"
13099 #include "confdefs.h"
13100 #include <$ac_header>
13101 _ACEOF
13102 if { (eval echo "$as_me:13102: \"$ac_cpp conftest.$ac_ext\"") >&5
13103   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13104   ac_status=$?
13105   egrep -v '^ *\+' conftest.er1 >conftest.err
13106   rm -f conftest.er1
13107   cat conftest.err >&5
13108   echo "$as_me:13108: \$? = $ac_status" >&5
13109   (exit $ac_status); } >/dev/null; then
13110   if test -s conftest.err; then
13111     ac_cpp_err=$ac_c_preproc_warn_flag
13112   else
13113     ac_cpp_err=
13114   fi
13115 else
13116   ac_cpp_err=yes
13117 fi
13118 if test -z "$ac_cpp_err"; then
13119   eval "$as_ac_Header=yes"
13120 else
13121   echo "$as_me: failed program was:" >&5
13122   cat conftest.$ac_ext >&5
13123   eval "$as_ac_Header=no"
13124 fi
13125 rm -f conftest.err conftest.$ac_ext
13126 fi
13127 echo "$as_me:13127: result: `eval echo '${'$as_ac_Header'}'`" >&5
13128 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13129 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13130   cat >>confdefs.h <<EOF
13131 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13132 EOF
13133
13134 fi
13135 done
13136
13137 if test "$ISC" = yes ; then
13138
13139 for ac_header in sys/termio.h
13140 do
13141 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13142 echo "$as_me:13142: checking for $ac_header" >&5
13143 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13144 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13145   echo $ECHO_N "(cached) $ECHO_C" >&6
13146 else
13147   cat >conftest.$ac_ext <<_ACEOF
13148 #line 13148 "configure"
13149 #include "confdefs.h"
13150 #include <$ac_header>
13151 _ACEOF
13152 if { (eval echo "$as_me:13152: \"$ac_cpp conftest.$ac_ext\"") >&5
13153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13154   ac_status=$?
13155   egrep -v '^ *\+' conftest.er1 >conftest.err
13156   rm -f conftest.er1
13157   cat conftest.err >&5
13158   echo "$as_me:13158: \$? = $ac_status" >&5
13159   (exit $ac_status); } >/dev/null; then
13160   if test -s conftest.err; then
13161     ac_cpp_err=$ac_c_preproc_warn_flag
13162   else
13163     ac_cpp_err=
13164   fi
13165 else
13166   ac_cpp_err=yes
13167 fi
13168 if test -z "$ac_cpp_err"; then
13169   eval "$as_ac_Header=yes"
13170 else
13171   echo "$as_me: failed program was:" >&5
13172   cat conftest.$ac_ext >&5
13173   eval "$as_ac_Header=no"
13174 fi
13175 rm -f conftest.err conftest.$ac_ext
13176 fi
13177 echo "$as_me:13177: result: `eval echo '${'$as_ac_Header'}'`" >&5
13178 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13180   cat >>confdefs.h <<EOF
13181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13182 EOF
13183
13184 fi
13185 done
13186
13187 fi
13188 if test "$ac_cv_header_termios_h" = yes ; then
13189         case "$CFLAGS $CPPFLAGS" in
13190         *-D_POSIX_SOURCE*)
13191                 termios_bad=dunno ;;
13192         *)      termios_bad=maybe ;;
13193         esac
13194         if test "$termios_bad" = maybe ; then
13195         echo "$as_me:13195: checking whether termios.h needs _POSIX_SOURCE" >&5
13196 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13197         cat >conftest.$ac_ext <<_ACEOF
13198 #line 13198 "configure"
13199 #include "confdefs.h"
13200 #include <termios.h>
13201 int
13202 main ()
13203 {
13204 struct termios foo; int x = foo.c_iflag
13205   ;
13206   return 0;
13207 }
13208 _ACEOF
13209 rm -f conftest.$ac_objext
13210 if { (eval echo "$as_me:13210: \"$ac_compile\"") >&5
13211   (eval $ac_compile) 2>&5
13212   ac_status=$?
13213   echo "$as_me:13213: \$? = $ac_status" >&5
13214   (exit $ac_status); } &&
13215          { ac_try='test -s conftest.$ac_objext'
13216   { (eval echo "$as_me:13216: \"$ac_try\"") >&5
13217   (eval $ac_try) 2>&5
13218   ac_status=$?
13219   echo "$as_me:13219: \$? = $ac_status" >&5
13220   (exit $ac_status); }; }; then
13221   termios_bad=no
13222 else
13223   echo "$as_me: failed program was:" >&5
13224 cat conftest.$ac_ext >&5
13225
13226                 cat >conftest.$ac_ext <<_ACEOF
13227 #line 13227 "configure"
13228 #include "confdefs.h"
13229
13230 #define _POSIX_SOURCE
13231 #include <termios.h>
13232 int
13233 main ()
13234 {
13235 struct termios foo; int x = foo.c_iflag
13236   ;
13237   return 0;
13238 }
13239 _ACEOF
13240 rm -f conftest.$ac_objext
13241 if { (eval echo "$as_me:13241: \"$ac_compile\"") >&5
13242   (eval $ac_compile) 2>&5
13243   ac_status=$?
13244   echo "$as_me:13244: \$? = $ac_status" >&5
13245   (exit $ac_status); } &&
13246          { ac_try='test -s conftest.$ac_objext'
13247   { (eval echo "$as_me:13247: \"$ac_try\"") >&5
13248   (eval $ac_try) 2>&5
13249   ac_status=$?
13250   echo "$as_me:13250: \$? = $ac_status" >&5
13251   (exit $ac_status); }; }; then
13252   termios_bad=unknown
13253 else
13254   echo "$as_me: failed program was:" >&5
13255 cat conftest.$ac_ext >&5
13256 termios_bad=yes cat >>confdefs.h <<\EOF
13257 #define SVR4_TERMIO 1
13258 EOF
13259
13260 fi
13261 rm -f conftest.$ac_objext conftest.$ac_ext
13262
13263 fi
13264 rm -f conftest.$ac_objext conftest.$ac_ext
13265         echo "$as_me:13265: result: $termios_bad" >&5
13266 echo "${ECHO_T}$termios_bad" >&6
13267         fi
13268 fi
13269
13270 echo "$as_me:13270: checking for tcgetattr" >&5
13271 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13272 if test "${cf_cv_have_tcgetattr+set}" = set; then
13273   echo $ECHO_N "(cached) $ECHO_C" >&6
13274 else
13275
13276 cat >conftest.$ac_ext <<_ACEOF
13277 #line 13277 "configure"
13278 #include "confdefs.h"
13279
13280 #include <sys/types.h>
13281 #ifdef HAVE_UNISTD_H
13282 #include <unistd.h>
13283 #endif
13284 #ifdef HAVE_TERMIOS_H
13285 #include <termios.h>
13286 #define TTY struct termios
13287 #else
13288 #ifdef HAVE_TERMIO_H
13289 #include <termio.h>
13290 #define TTY struct termio
13291 #endif
13292 #endif
13293
13294 int
13295 main ()
13296 {
13297
13298 TTY foo;
13299 tcgetattr(1, &foo);
13300   ;
13301   return 0;
13302 }
13303 _ACEOF
13304 rm -f conftest.$ac_objext conftest$ac_exeext
13305 if { (eval echo "$as_me:13305: \"$ac_link\"") >&5
13306   (eval $ac_link) 2>&5
13307   ac_status=$?
13308   echo "$as_me:13308: \$? = $ac_status" >&5
13309   (exit $ac_status); } &&
13310          { ac_try='test -s conftest$ac_exeext'
13311   { (eval echo "$as_me:13311: \"$ac_try\"") >&5
13312   (eval $ac_try) 2>&5
13313   ac_status=$?
13314   echo "$as_me:13314: \$? = $ac_status" >&5
13315   (exit $ac_status); }; }; then
13316   cf_cv_have_tcgetattr=yes
13317 else
13318   echo "$as_me: failed program was:" >&5
13319 cat conftest.$ac_ext >&5
13320 cf_cv_have_tcgetattr=no
13321 fi
13322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13323 fi
13324 echo "$as_me:13324: result: $cf_cv_have_tcgetattr" >&5
13325 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13326 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13327 #define HAVE_TCGETATTR 1
13328 EOF
13329
13330 echo "$as_me:13330: checking for vsscanf function or workaround" >&5
13331 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13332 if test "${cf_cv_func_vsscanf+set}" = set; then
13333   echo $ECHO_N "(cached) $ECHO_C" >&6
13334 else
13335
13336 cat >conftest.$ac_ext <<_ACEOF
13337 #line 13337 "configure"
13338 #include "confdefs.h"
13339
13340 #include <stdarg.h>
13341 #include <stdio.h>
13342 int
13343 main ()
13344 {
13345
13346         va_list ap;
13347         vsscanf("from", "%d", ap)
13348   ;
13349   return 0;
13350 }
13351 _ACEOF
13352 rm -f conftest.$ac_objext conftest$ac_exeext
13353 if { (eval echo "$as_me:13353: \"$ac_link\"") >&5
13354   (eval $ac_link) 2>&5
13355   ac_status=$?
13356   echo "$as_me:13356: \$? = $ac_status" >&5
13357   (exit $ac_status); } &&
13358          { ac_try='test -s conftest$ac_exeext'
13359   { (eval echo "$as_me:13359: \"$ac_try\"") >&5
13360   (eval $ac_try) 2>&5
13361   ac_status=$?
13362   echo "$as_me:13362: \$? = $ac_status" >&5
13363   (exit $ac_status); }; }; then
13364   cf_cv_func_vsscanf=vsscanf
13365 else
13366   echo "$as_me: failed program was:" >&5
13367 cat conftest.$ac_ext >&5
13368
13369 cat >conftest.$ac_ext <<_ACEOF
13370 #line 13370 "configure"
13371 #include "confdefs.h"
13372
13373 #include <stdarg.h>
13374 #include <stdio.h>
13375 int
13376 main ()
13377 {
13378
13379     FILE strbuf;
13380     char *str = "from";
13381
13382     strbuf._flag = _IOREAD;
13383     strbuf._ptr = strbuf._base = (unsigned char *) str;
13384     strbuf._cnt = strlen(str);
13385     strbuf._file = _NFILE;
13386     return (vfscanf(&strbuf, "%d", ap))
13387   ;
13388   return 0;
13389 }
13390 _ACEOF
13391 rm -f conftest.$ac_objext conftest$ac_exeext
13392 if { (eval echo "$as_me:13392: \"$ac_link\"") >&5
13393   (eval $ac_link) 2>&5
13394   ac_status=$?
13395   echo "$as_me:13395: \$? = $ac_status" >&5
13396   (exit $ac_status); } &&
13397          { ac_try='test -s conftest$ac_exeext'
13398   { (eval echo "$as_me:13398: \"$ac_try\"") >&5
13399   (eval $ac_try) 2>&5
13400   ac_status=$?
13401   echo "$as_me:13401: \$? = $ac_status" >&5
13402   (exit $ac_status); }; }; then
13403   cf_cv_func_vsscanf=vfscanf
13404 else
13405   echo "$as_me: failed program was:" >&5
13406 cat conftest.$ac_ext >&5
13407
13408 cat >conftest.$ac_ext <<_ACEOF
13409 #line 13409 "configure"
13410 #include "confdefs.h"
13411
13412 #include <stdarg.h>
13413 #include <stdio.h>
13414 int
13415 main ()
13416 {
13417
13418     FILE strbuf;
13419     char *str = "from";
13420
13421     strbuf._flag = _IOREAD;
13422     strbuf._ptr = strbuf._base = (unsigned char *) str;
13423     strbuf._cnt = strlen(str);
13424     strbuf._file = _NFILE;
13425     return (_doscan(&strbuf, "%d", ap))
13426   ;
13427   return 0;
13428 }
13429 _ACEOF
13430 rm -f conftest.$ac_objext conftest$ac_exeext
13431 if { (eval echo "$as_me:13431: \"$ac_link\"") >&5
13432   (eval $ac_link) 2>&5
13433   ac_status=$?
13434   echo "$as_me:13434: \$? = $ac_status" >&5
13435   (exit $ac_status); } &&
13436          { ac_try='test -s conftest$ac_exeext'
13437   { (eval echo "$as_me:13437: \"$ac_try\"") >&5
13438   (eval $ac_try) 2>&5
13439   ac_status=$?
13440   echo "$as_me:13440: \$? = $ac_status" >&5
13441   (exit $ac_status); }; }; then
13442   cf_cv_func_vsscanf=_doscan
13443 else
13444   echo "$as_me: failed program was:" >&5
13445 cat conftest.$ac_ext >&5
13446
13447 cf_cv_func_vsscanf=no
13448 fi
13449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13450 fi
13451 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13452 fi
13453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13454 fi
13455 echo "$as_me:13455: result: $cf_cv_func_vsscanf" >&5
13456 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13457
13458 case $cf_cv_func_vsscanf in #(vi
13459 vsscanf) cat >>confdefs.h <<\EOF
13460 #define HAVE_VSSCANF 1
13461 EOF
13462 ;; #(vi
13463 vfscanf) cat >>confdefs.h <<\EOF
13464 #define HAVE_VFSCANF 1
13465 EOF
13466 ;; #(vi
13467 _doscan) cat >>confdefs.h <<\EOF
13468 #define HAVE__DOSCAN 1
13469 EOF
13470 ;;
13471 esac
13472
13473 echo "$as_me:13473: checking for working mkstemp" >&5
13474 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13475 if test "${cf_cv_func_mkstemp+set}" = set; then
13476   echo $ECHO_N "(cached) $ECHO_C" >&6
13477 else
13478
13479 rm -f conftest*
13480 if test "$cross_compiling" = yes; then
13481   echo "$as_me:13481: checking for mkstemp" >&5
13482 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13483 if test "${ac_cv_func_mkstemp+set}" = set; then
13484   echo $ECHO_N "(cached) $ECHO_C" >&6
13485 else
13486   cat >conftest.$ac_ext <<_ACEOF
13487 #line 13487 "configure"
13488 #include "confdefs.h"
13489 /* System header to define __stub macros and hopefully few prototypes,
13490     which can conflict with char mkstemp (); below.  */
13491 #include <assert.h>
13492 /* Override any gcc2 internal prototype to avoid an error.  */
13493 #ifdef __cplusplus
13494 extern "C"
13495 #endif
13496 /* We use char because int might match the return type of a gcc2
13497    builtin and then its argument prototype would still apply.  */
13498 char mkstemp ();
13499 char (*f) ();
13500
13501 int
13502 main ()
13503 {
13504 /* The GNU C library defines this for functions which it implements
13505     to always fail with ENOSYS.  Some functions are actually named
13506     something starting with __ and the normal name is an alias.  */
13507 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13508 choke me
13509 #else
13510 f = mkstemp;
13511 #endif
13512
13513   ;
13514   return 0;
13515 }
13516 _ACEOF
13517 rm -f conftest.$ac_objext conftest$ac_exeext
13518 if { (eval echo "$as_me:13518: \"$ac_link\"") >&5
13519   (eval $ac_link) 2>&5
13520   ac_status=$?
13521   echo "$as_me:13521: \$? = $ac_status" >&5
13522   (exit $ac_status); } &&
13523          { ac_try='test -s conftest$ac_exeext'
13524   { (eval echo "$as_me:13524: \"$ac_try\"") >&5
13525   (eval $ac_try) 2>&5
13526   ac_status=$?
13527   echo "$as_me:13527: \$? = $ac_status" >&5
13528   (exit $ac_status); }; }; then
13529   ac_cv_func_mkstemp=yes
13530 else
13531   echo "$as_me: failed program was:" >&5
13532 cat conftest.$ac_ext >&5
13533 ac_cv_func_mkstemp=no
13534 fi
13535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13536 fi
13537 echo "$as_me:13537: result: $ac_cv_func_mkstemp" >&5
13538 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13539
13540 else
13541   cat >conftest.$ac_ext <<_ACEOF
13542 #line 13542 "configure"
13543 #include "confdefs.h"
13544
13545 #include <sys/types.h>
13546 #include <stdlib.h>
13547 #include <stdio.h>
13548 #include <string.h>
13549 #include <sys/stat.h>
13550 int main()
13551 {
13552         char *tmpl = "conftestXXXXXX";
13553         char name[2][80];
13554         int n;
13555         int result = 0;
13556         int fd;
13557         struct stat sb;
13558
13559         umask(077);
13560         for (n = 0; n < 2; ++n) {
13561                 strcpy(name[n], tmpl);
13562                 if ((fd = mkstemp(name[n])) >= 0) {
13563                         if (!strcmp(name[n], tmpl)
13564                          || stat(name[n], &sb) != 0
13565                          || (sb.st_mode & S_IFMT) != S_IFREG
13566                          || (sb.st_mode & 077) != 0) {
13567                                 result = 1;
13568                         }
13569                         close(fd);
13570                 }
13571         }
13572         if (result == 0
13573          && !strcmp(name[0], name[1]))
13574                 result = 1;
13575         ${cf_cv_main_return:-return}(result);
13576 }
13577
13578 _ACEOF
13579 rm -f conftest$ac_exeext
13580 if { (eval echo "$as_me:13580: \"$ac_link\"") >&5
13581   (eval $ac_link) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13585   { (eval echo "$as_me:13585: \"$ac_try\"") >&5
13586   (eval $ac_try) 2>&5
13587   ac_status=$?
13588   echo "$as_me:13588: \$? = $ac_status" >&5
13589   (exit $ac_status); }; }; then
13590   cf_cv_func_mkstemp=yes
13591
13592 else
13593   echo "$as_me: program exited with status $ac_status" >&5
13594 echo "$as_me: failed program was:" >&5
13595 cat conftest.$ac_ext >&5
13596 cf_cv_func_mkstemp=no
13597
13598 fi
13599 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13600 fi
13601
13602 fi
13603 echo "$as_me:13603: result: $cf_cv_func_mkstemp" >&5
13604 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13605 if test "$cf_cv_func_mkstemp" = yes ; then
13606         cat >>confdefs.h <<\EOF
13607 #define HAVE_MKSTEMP 1
13608 EOF
13609
13610 fi
13611
13612 # setup for prototype of fallback for vsscanf()
13613
13614 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13615         HAVE_VSSCANF=1
13616 else
13617         HAVE_VSSCANF=0
13618 fi
13619
13620 if test "$cross_compiling" = yes ; then
13621         { echo "$as_me:13621: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13622 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13623 else
13624         echo "$as_me:13624: checking whether setvbuf arguments are reversed" >&5
13625 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13626 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13627   echo $ECHO_N "(cached) $ECHO_C" >&6
13628 else
13629   if test "$cross_compiling" = yes; then
13630   { { echo "$as_me:13630: error: cannot run test program while cross compiling" >&5
13631 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13632    { (exit 1); exit 1; }; }
13633 else
13634   cat >conftest.$ac_ext <<_ACEOF
13635 #line 13635 "configure"
13636 #include "confdefs.h"
13637 #include <stdio.h>
13638 /* If setvbuf has the reversed format, exit 0. */
13639 int
13640 main ()
13641 {
13642   /* This call has the arguments reversed.
13643      A reversed system may check and see that the address of main
13644      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13645   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13646     $ac_main_return(1);
13647   putc('\r', stdout);
13648   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13649 }
13650 _ACEOF
13651 rm -f conftest$ac_exeext
13652 if { (eval echo "$as_me:13652: \"$ac_link\"") >&5
13653   (eval $ac_link) 2>&5
13654   ac_status=$?
13655   echo "$as_me:13655: \$? = $ac_status" >&5
13656   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13657   { (eval echo "$as_me:13657: \"$ac_try\"") >&5
13658   (eval $ac_try) 2>&5
13659   ac_status=$?
13660   echo "$as_me:13660: \$? = $ac_status" >&5
13661   (exit $ac_status); }; }; then
13662   ac_cv_func_setvbuf_reversed=yes
13663 else
13664   echo "$as_me: program exited with status $ac_status" >&5
13665 echo "$as_me: failed program was:" >&5
13666 cat conftest.$ac_ext >&5
13667 ac_cv_func_setvbuf_reversed=no
13668 fi
13669 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13670 fi
13671 rm -f core core.* *.core
13672 fi
13673 echo "$as_me:13673: result: $ac_cv_func_setvbuf_reversed" >&5
13674 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
13675 if test $ac_cv_func_setvbuf_reversed = yes; then
13676
13677 cat >>confdefs.h <<\EOF
13678 #define SETVBUF_REVERSED 1
13679 EOF
13680
13681 fi
13682
13683 fi
13684 echo "$as_me:13684: checking return type of signal handlers" >&5
13685 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13686 if test "${ac_cv_type_signal+set}" = set; then
13687   echo $ECHO_N "(cached) $ECHO_C" >&6
13688 else
13689   cat >conftest.$ac_ext <<_ACEOF
13690 #line 13690 "configure"
13691 #include "confdefs.h"
13692 #include <sys/types.h>
13693 #include <signal.h>
13694 #ifdef signal
13695 # undef signal
13696 #endif
13697 #ifdef __cplusplus
13698 extern "C" void (*signal (int, void (*)(int)))(int);
13699 #else
13700 void (*signal ()) ();
13701 #endif
13702
13703 int
13704 main ()
13705 {
13706 int i;
13707   ;
13708   return 0;
13709 }
13710 _ACEOF
13711 rm -f conftest.$ac_objext
13712 if { (eval echo "$as_me:13712: \"$ac_compile\"") >&5
13713   (eval $ac_compile) 2>&5
13714   ac_status=$?
13715   echo "$as_me:13715: \$? = $ac_status" >&5
13716   (exit $ac_status); } &&
13717          { ac_try='test -s conftest.$ac_objext'
13718   { (eval echo "$as_me:13718: \"$ac_try\"") >&5
13719   (eval $ac_try) 2>&5
13720   ac_status=$?
13721   echo "$as_me:13721: \$? = $ac_status" >&5
13722   (exit $ac_status); }; }; then
13723   ac_cv_type_signal=void
13724 else
13725   echo "$as_me: failed program was:" >&5
13726 cat conftest.$ac_ext >&5
13727 ac_cv_type_signal=int
13728 fi
13729 rm -f conftest.$ac_objext conftest.$ac_ext
13730 fi
13731 echo "$as_me:13731: result: $ac_cv_type_signal" >&5
13732 echo "${ECHO_T}$ac_cv_type_signal" >&6
13733
13734 cat >>confdefs.h <<EOF
13735 #define RETSIGTYPE $ac_cv_type_signal
13736 EOF
13737
13738 echo "$as_me:13738: checking for type sigaction_t" >&5
13739 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
13740 if test "${cf_cv_type_sigaction+set}" = set; then
13741   echo $ECHO_N "(cached) $ECHO_C" >&6
13742 else
13743
13744         cat >conftest.$ac_ext <<_ACEOF
13745 #line 13745 "configure"
13746 #include "confdefs.h"
13747
13748 #include <signal.h>
13749 int
13750 main ()
13751 {
13752 sigaction_t x
13753   ;
13754   return 0;
13755 }
13756 _ACEOF
13757 rm -f conftest.$ac_objext
13758 if { (eval echo "$as_me:13758: \"$ac_compile\"") >&5
13759   (eval $ac_compile) 2>&5
13760   ac_status=$?
13761   echo "$as_me:13761: \$? = $ac_status" >&5
13762   (exit $ac_status); } &&
13763          { ac_try='test -s conftest.$ac_objext'
13764   { (eval echo "$as_me:13764: \"$ac_try\"") >&5
13765   (eval $ac_try) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); }; }; then
13769   cf_cv_type_sigaction=yes
13770 else
13771   echo "$as_me: failed program was:" >&5
13772 cat conftest.$ac_ext >&5
13773 cf_cv_type_sigaction=no
13774 fi
13775 rm -f conftest.$ac_objext conftest.$ac_ext
13776 fi
13777
13778 echo "$as_me:13778: result: $cf_cv_type_sigaction" >&5
13779 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
13780 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
13781 #define HAVE_TYPE_SIGACTION 1
13782 EOF
13783
13784 echo "$as_me:13784: checking declaration of size-change" >&5
13785 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
13786 if test "${cf_cv_sizechange+set}" = set; then
13787   echo $ECHO_N "(cached) $ECHO_C" >&6
13788 else
13789
13790     cf_cv_sizechange=unknown
13791     cf_save_CPPFLAGS="$CPPFLAGS"
13792
13793 for cf_opts in "" "NEED_PTEM_H"
13794 do
13795
13796     CPPFLAGS="$cf_save_CPPFLAGS"
13797     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
13798     cat >conftest.$ac_ext <<_ACEOF
13799 #line 13799 "configure"
13800 #include "confdefs.h"
13801 #include <sys/types.h>
13802 #ifdef HAVE_TERMIOS_H
13803 #include <termios.h>
13804 #else
13805 #ifdef HAVE_TERMIO_H
13806 #include <termio.h>
13807 #endif
13808 #endif
13809 #ifdef NEED_PTEM_H
13810 /* This is a workaround for SCO:  they neglected to define struct winsize in
13811  * termios.h -- it's only in termio.h and ptem.h
13812  */
13813 #include        <sys/stream.h>
13814 #include        <sys/ptem.h>
13815 #endif
13816 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
13817 #include <sys/ioctl.h>
13818 #endif
13819
13820 int
13821 main ()
13822 {
13823
13824 #ifdef TIOCGSIZE
13825         struct ttysize win;     /* FIXME: what system is this? */
13826         int y = win.ts_lines;
13827         int x = win.ts_cols;
13828 #else
13829 #ifdef TIOCGWINSZ
13830         struct winsize win;
13831         int y = win.ws_row;
13832         int x = win.ws_col;
13833 #else
13834         no TIOCGSIZE or TIOCGWINSZ
13835 #endif /* TIOCGWINSZ */
13836 #endif /* TIOCGSIZE */
13837
13838   ;
13839   return 0;
13840 }
13841 _ACEOF
13842 rm -f conftest.$ac_objext
13843 if { (eval echo "$as_me:13843: \"$ac_compile\"") >&5
13844   (eval $ac_compile) 2>&5
13845   ac_status=$?
13846   echo "$as_me:13846: \$? = $ac_status" >&5
13847   (exit $ac_status); } &&
13848          { ac_try='test -s conftest.$ac_objext'
13849   { (eval echo "$as_me:13849: \"$ac_try\"") >&5
13850   (eval $ac_try) 2>&5
13851   ac_status=$?
13852   echo "$as_me:13852: \$? = $ac_status" >&5
13853   (exit $ac_status); }; }; then
13854   cf_cv_sizechange=yes
13855 else
13856   echo "$as_me: failed program was:" >&5
13857 cat conftest.$ac_ext >&5
13858 cf_cv_sizechange=no
13859 fi
13860 rm -f conftest.$ac_objext conftest.$ac_ext
13861
13862         CPPFLAGS="$cf_save_CPPFLAGS"
13863         if test "$cf_cv_sizechange" = yes ; then
13864                 echo "size-change succeeded ($cf_opts)" >&5
13865                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
13866                 break
13867         fi
13868 done
13869
13870 fi
13871 echo "$as_me:13871: result: $cf_cv_sizechange" >&5
13872 echo "${ECHO_T}$cf_cv_sizechange" >&6
13873 if test "$cf_cv_sizechange" != no ; then
13874         cat >>confdefs.h <<\EOF
13875 #define HAVE_SIZECHANGE 1
13876 EOF
13877
13878         case $cf_cv_sizechange in #(vi
13879         NEED*)
13880                 cat >>confdefs.h <<EOF
13881 #define $cf_cv_sizechange  1
13882 EOF
13883
13884                 ;;
13885         esac
13886 fi
13887
13888 echo "$as_me:13888: checking for memmove" >&5
13889 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13890 if test "${ac_cv_func_memmove+set}" = set; then
13891   echo $ECHO_N "(cached) $ECHO_C" >&6
13892 else
13893   cat >conftest.$ac_ext <<_ACEOF
13894 #line 13894 "configure"
13895 #include "confdefs.h"
13896 /* System header to define __stub macros and hopefully few prototypes,
13897     which can conflict with char memmove (); below.  */
13898 #include <assert.h>
13899 /* Override any gcc2 internal prototype to avoid an error.  */
13900 #ifdef __cplusplus
13901 extern "C"
13902 #endif
13903 /* We use char because int might match the return type of a gcc2
13904    builtin and then its argument prototype would still apply.  */
13905 char memmove ();
13906 char (*f) ();
13907
13908 int
13909 main ()
13910 {
13911 /* The GNU C library defines this for functions which it implements
13912     to always fail with ENOSYS.  Some functions are actually named
13913     something starting with __ and the normal name is an alias.  */
13914 #if defined (__stub_memmove) || defined (__stub___memmove)
13915 choke me
13916 #else
13917 f = memmove;
13918 #endif
13919
13920   ;
13921   return 0;
13922 }
13923 _ACEOF
13924 rm -f conftest.$ac_objext conftest$ac_exeext
13925 if { (eval echo "$as_me:13925: \"$ac_link\"") >&5
13926   (eval $ac_link) 2>&5
13927   ac_status=$?
13928   echo "$as_me:13928: \$? = $ac_status" >&5
13929   (exit $ac_status); } &&
13930          { ac_try='test -s conftest$ac_exeext'
13931   { (eval echo "$as_me:13931: \"$ac_try\"") >&5
13932   (eval $ac_try) 2>&5
13933   ac_status=$?
13934   echo "$as_me:13934: \$? = $ac_status" >&5
13935   (exit $ac_status); }; }; then
13936   ac_cv_func_memmove=yes
13937 else
13938   echo "$as_me: failed program was:" >&5
13939 cat conftest.$ac_ext >&5
13940 ac_cv_func_memmove=no
13941 fi
13942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13943 fi
13944 echo "$as_me:13944: result: $ac_cv_func_memmove" >&5
13945 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13946 if test $ac_cv_func_memmove = yes; then
13947   :
13948 else
13949
13950 echo "$as_me:13950: checking for bcopy" >&5
13951 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
13952 if test "${ac_cv_func_bcopy+set}" = set; then
13953   echo $ECHO_N "(cached) $ECHO_C" >&6
13954 else
13955   cat >conftest.$ac_ext <<_ACEOF
13956 #line 13956 "configure"
13957 #include "confdefs.h"
13958 /* System header to define __stub macros and hopefully few prototypes,
13959     which can conflict with char bcopy (); below.  */
13960 #include <assert.h>
13961 /* Override any gcc2 internal prototype to avoid an error.  */
13962 #ifdef __cplusplus
13963 extern "C"
13964 #endif
13965 /* We use char because int might match the return type of a gcc2
13966    builtin and then its argument prototype would still apply.  */
13967 char bcopy ();
13968 char (*f) ();
13969
13970 int
13971 main ()
13972 {
13973 /* The GNU C library defines this for functions which it implements
13974     to always fail with ENOSYS.  Some functions are actually named
13975     something starting with __ and the normal name is an alias.  */
13976 #if defined (__stub_bcopy) || defined (__stub___bcopy)
13977 choke me
13978 #else
13979 f = bcopy;
13980 #endif
13981
13982   ;
13983   return 0;
13984 }
13985 _ACEOF
13986 rm -f conftest.$ac_objext conftest$ac_exeext
13987 if { (eval echo "$as_me:13987: \"$ac_link\"") >&5
13988   (eval $ac_link) 2>&5
13989   ac_status=$?
13990   echo "$as_me:13990: \$? = $ac_status" >&5
13991   (exit $ac_status); } &&
13992          { ac_try='test -s conftest$ac_exeext'
13993   { (eval echo "$as_me:13993: \"$ac_try\"") >&5
13994   (eval $ac_try) 2>&5
13995   ac_status=$?
13996   echo "$as_me:13996: \$? = $ac_status" >&5
13997   (exit $ac_status); }; }; then
13998   ac_cv_func_bcopy=yes
13999 else
14000   echo "$as_me: failed program was:" >&5
14001 cat conftest.$ac_ext >&5
14002 ac_cv_func_bcopy=no
14003 fi
14004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14005 fi
14006 echo "$as_me:14006: result: $ac_cv_func_bcopy" >&5
14007 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14008 if test $ac_cv_func_bcopy = yes; then
14009
14010         echo "$as_me:14010: checking if bcopy does overlapping moves" >&5
14011 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14012 if test "${cf_cv_good_bcopy+set}" = set; then
14013   echo $ECHO_N "(cached) $ECHO_C" >&6
14014 else
14015
14016                 if test "$cross_compiling" = yes; then
14017   cf_cv_good_bcopy=unknown
14018 else
14019   cat >conftest.$ac_ext <<_ACEOF
14020 #line 14020 "configure"
14021 #include "confdefs.h"
14022
14023 int main() {
14024         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14025         char temp[40];
14026         bcopy(data, temp, sizeof(data));
14027         bcopy(temp+10, temp, 15);
14028         bcopy(temp+5, temp+15, 10);
14029         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14030 }
14031
14032 _ACEOF
14033 rm -f conftest$ac_exeext
14034 if { (eval echo "$as_me:14034: \"$ac_link\"") >&5
14035   (eval $ac_link) 2>&5
14036   ac_status=$?
14037   echo "$as_me:14037: \$? = $ac_status" >&5
14038   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14039   { (eval echo "$as_me:14039: \"$ac_try\"") >&5
14040   (eval $ac_try) 2>&5
14041   ac_status=$?
14042   echo "$as_me:14042: \$? = $ac_status" >&5
14043   (exit $ac_status); }; }; then
14044   cf_cv_good_bcopy=yes
14045 else
14046   echo "$as_me: program exited with status $ac_status" >&5
14047 echo "$as_me: failed program was:" >&5
14048 cat conftest.$ac_ext >&5
14049 cf_cv_good_bcopy=no
14050 fi
14051 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14052 fi
14053
14054 fi
14055 echo "$as_me:14055: result: $cf_cv_good_bcopy" >&5
14056 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14057
14058 else
14059   cf_cv_good_bcopy=no
14060 fi
14061
14062         if test "$cf_cv_good_bcopy" = yes ; then
14063                 cat >>confdefs.h <<\EOF
14064 #define USE_OK_BCOPY 1
14065 EOF
14066
14067         else
14068                 cat >>confdefs.h <<\EOF
14069 #define USE_MY_MEMMOVE 1
14070 EOF
14071
14072         fi
14073
14074 fi
14075
14076 echo "$as_me:14076: checking if poll really works" >&5
14077 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14078 if test "${cf_cv_working_poll+set}" = set; then
14079   echo $ECHO_N "(cached) $ECHO_C" >&6
14080 else
14081
14082 if test "$cross_compiling" = yes; then
14083   cf_cv_working_poll=unknown
14084 else
14085   cat >conftest.$ac_ext <<_ACEOF
14086 #line 14086 "configure"
14087 #include "confdefs.h"
14088
14089 #include <stdio.h>
14090 #ifdef HAVE_POLL_H
14091 #include <poll.h>
14092 #else
14093 #include <sys/poll.h>
14094 #endif
14095 int main() {
14096         struct pollfd myfds;
14097         int ret;
14098
14099         myfds.fd = 0;
14100         myfds.events = POLLIN;
14101
14102         ret = poll(&myfds, 1, 100);
14103         ${cf_cv_main_return:-return}(ret != 0);
14104 }
14105 _ACEOF
14106 rm -f conftest$ac_exeext
14107 if { (eval echo "$as_me:14107: \"$ac_link\"") >&5
14108   (eval $ac_link) 2>&5
14109   ac_status=$?
14110   echo "$as_me:14110: \$? = $ac_status" >&5
14111   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14112   { (eval echo "$as_me:14112: \"$ac_try\"") >&5
14113   (eval $ac_try) 2>&5
14114   ac_status=$?
14115   echo "$as_me:14115: \$? = $ac_status" >&5
14116   (exit $ac_status); }; }; then
14117   cf_cv_working_poll=yes
14118 else
14119   echo "$as_me: program exited with status $ac_status" >&5
14120 echo "$as_me: failed program was:" >&5
14121 cat conftest.$ac_ext >&5
14122 cf_cv_working_poll=no
14123 fi
14124 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14125 fi
14126 fi
14127 echo "$as_me:14127: result: $cf_cv_working_poll" >&5
14128 echo "${ECHO_T}$cf_cv_working_poll" >&6
14129 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14130 #define HAVE_WORKING_POLL 1
14131 EOF
14132
14133 # special check for test/ditto.c
14134
14135 echo "$as_me:14135: checking for openpty in -lutil" >&5
14136 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14137 if test "${ac_cv_lib_util_openpty+set}" = set; then
14138   echo $ECHO_N "(cached) $ECHO_C" >&6
14139 else
14140   ac_check_lib_save_LIBS=$LIBS
14141 LIBS="-lutil  $LIBS"
14142 cat >conftest.$ac_ext <<_ACEOF
14143 #line 14143 "configure"
14144 #include "confdefs.h"
14145
14146 /* Override any gcc2 internal prototype to avoid an error.  */
14147 #ifdef __cplusplus
14148 extern "C"
14149 #endif
14150 /* We use char because int might match the return type of a gcc2
14151    builtin and then its argument prototype would still apply.  */
14152 char openpty ();
14153 int
14154 main ()
14155 {
14156 openpty ();
14157   ;
14158   return 0;
14159 }
14160 _ACEOF
14161 rm -f conftest.$ac_objext conftest$ac_exeext
14162 if { (eval echo "$as_me:14162: \"$ac_link\"") >&5
14163   (eval $ac_link) 2>&5
14164   ac_status=$?
14165   echo "$as_me:14165: \$? = $ac_status" >&5
14166   (exit $ac_status); } &&
14167          { ac_try='test -s conftest$ac_exeext'
14168   { (eval echo "$as_me:14168: \"$ac_try\"") >&5
14169   (eval $ac_try) 2>&5
14170   ac_status=$?
14171   echo "$as_me:14171: \$? = $ac_status" >&5
14172   (exit $ac_status); }; }; then
14173   ac_cv_lib_util_openpty=yes
14174 else
14175   echo "$as_me: failed program was:" >&5
14176 cat conftest.$ac_ext >&5
14177 ac_cv_lib_util_openpty=no
14178 fi
14179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14180 LIBS=$ac_check_lib_save_LIBS
14181 fi
14182 echo "$as_me:14182: result: $ac_cv_lib_util_openpty" >&5
14183 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14184 if test $ac_cv_lib_util_openpty = yes; then
14185   cf_cv_lib_util=yes
14186 else
14187   cf_cv_lib_util=no
14188 fi
14189
14190 echo "$as_me:14190: checking for openpty header" >&5
14191 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14192 if test "${cf_cv_func_openpty+set}" = set; then
14193   echo $ECHO_N "(cached) $ECHO_C" >&6
14194 else
14195
14196     cf_save_LIBS="$LIBS"
14197     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14198     for cf_header in pty.h libutil.h util.h
14199     do
14200     cat >conftest.$ac_ext <<_ACEOF
14201 #line 14201 "configure"
14202 #include "confdefs.h"
14203
14204 #include <$cf_header>
14205
14206 int
14207 main ()
14208 {
14209
14210     int x = openpty((int *)0, (int *)0, (char *)0,
14211                    (struct termios *)0, (struct winsize *)0);
14212
14213   ;
14214   return 0;
14215 }
14216 _ACEOF
14217 rm -f conftest.$ac_objext conftest$ac_exeext
14218 if { (eval echo "$as_me:14218: \"$ac_link\"") >&5
14219   (eval $ac_link) 2>&5
14220   ac_status=$?
14221   echo "$as_me:14221: \$? = $ac_status" >&5
14222   (exit $ac_status); } &&
14223          { ac_try='test -s conftest$ac_exeext'
14224   { (eval echo "$as_me:14224: \"$ac_try\"") >&5
14225   (eval $ac_try) 2>&5
14226   ac_status=$?
14227   echo "$as_me:14227: \$? = $ac_status" >&5
14228   (exit $ac_status); }; }; then
14229
14230         cf_cv_func_openpty=$cf_header
14231         break
14232
14233 else
14234   echo "$as_me: failed program was:" >&5
14235 cat conftest.$ac_ext >&5
14236
14237         cf_cv_func_openpty=no
14238
14239 fi
14240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14241     done
14242     LIBS="$cf_save_LIBS"
14243
14244 fi
14245 echo "$as_me:14245: result: $cf_cv_func_openpty" >&5
14246 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14247
14248 if test "$cf_cv_func_openpty" != no ; then
14249     cat >>confdefs.h <<EOF
14250 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14251 EOF
14252
14253     cat >>confdefs.h <<\EOF
14254 #define USE_XTERM_PTY 1
14255 EOF
14256
14257     if test "$cf_cv_lib_util" = yes ; then
14258         TEST_LIBS="-lutil $TEST_LIBS"
14259     fi
14260 fi
14261
14262 if test "$with_hashed_db" != no ; then
14263         cat >>confdefs.h <<\EOF
14264 #define USE_HASHED_DB 1
14265 EOF
14266
14267 case $with_hashed_db in #(vi
14268 yes|*able*) #(vi
14269     ;;
14270 *)
14271     if test -d "$with_hashed_db" ; then
14272
14273 if test -n "$with_hashed_db/include" ; then
14274   for cf_add_incdir in $with_hashed_db/include
14275   do
14276         while test $cf_add_incdir != /usr/include
14277         do
14278           if test -d $cf_add_incdir
14279           then
14280                 cf_have_incdir=no
14281                 if test -n "$CFLAGS$CPPFLAGS" ; then
14282                   # a loop is needed to ensure we can add subdirs of existing dirs
14283                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14284                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14285                           cf_have_incdir=yes; break
14286                         fi
14287                   done
14288                 fi
14289
14290                 if test "$cf_have_incdir" = no ; then
14291           if test "$cf_add_incdir" = /usr/local/include ; then
14292                         if test "$GCC" = yes
14293                         then
14294                           cf_save_CPPFLAGS=$CPPFLAGS
14295                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14296                           cat >conftest.$ac_ext <<_ACEOF
14297 #line 14297 "configure"
14298 #include "confdefs.h"
14299 #include <stdio.h>
14300 int
14301 main ()
14302 {
14303 printf("Hello")
14304   ;
14305   return 0;
14306 }
14307 _ACEOF
14308 rm -f conftest.$ac_objext
14309 if { (eval echo "$as_me:14309: \"$ac_compile\"") >&5
14310   (eval $ac_compile) 2>&5
14311   ac_status=$?
14312   echo "$as_me:14312: \$? = $ac_status" >&5
14313   (exit $ac_status); } &&
14314          { ac_try='test -s conftest.$ac_objext'
14315   { (eval echo "$as_me:14315: \"$ac_try\"") >&5
14316   (eval $ac_try) 2>&5
14317   ac_status=$?
14318   echo "$as_me:14318: \$? = $ac_status" >&5
14319   (exit $ac_status); }; }; then
14320   :
14321 else
14322   echo "$as_me: failed program was:" >&5
14323 cat conftest.$ac_ext >&5
14324 cf_have_incdir=yes
14325 fi
14326 rm -f conftest.$ac_objext conftest.$ac_ext
14327                           CPPFLAGS=$cf_save_CPPFLAGS
14328                         fi
14329                   fi
14330                 fi
14331
14332                 if test "$cf_have_incdir" = no ; then
14333                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14334
14335 echo "${as_me-configure}:14335: testing adding $cf_add_incdir to include-path ..." 1>&5
14336
14337                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
14338
14339           cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14340           test "$cf_top_incdir" = "$cf_add_incdir" && break
14341           cf_add_incdir="$cf_top_incdir"
14342                 else
14343                   break
14344                 fi
14345           fi
14346         done
14347   done
14348 fi
14349
14350 if test -n "$with_hashed_db/lib" ; then
14351   for cf_add_libdir in $with_hashed_db/lib
14352   do
14353     if test $cf_add_libdir = /usr/lib ; then
14354       :
14355     elif test -d $cf_add_libdir
14356     then
14357       cf_have_libdir=no
14358       if test -n "$LDFLAGS$LIBS" ; then
14359         # a loop is needed to ensure we can add subdirs of existing dirs
14360         for cf_test_libdir in $LDFLAGS $LIBS ; do
14361           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14362             cf_have_libdir=yes; break
14363           fi
14364         done
14365       fi
14366       if test "$cf_have_libdir" = no ; then
14367         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14368
14369 echo "${as_me-configure}:14369: testing adding $cf_add_libdir to library-path ..." 1>&5
14370
14371         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14372       fi
14373     fi
14374   done
14375 fi
14376
14377     fi
14378 esac
14379
14380 echo "$as_me:14380: checking for db.h" >&5
14381 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14382 if test "${ac_cv_header_db_h+set}" = set; then
14383   echo $ECHO_N "(cached) $ECHO_C" >&6
14384 else
14385   cat >conftest.$ac_ext <<_ACEOF
14386 #line 14386 "configure"
14387 #include "confdefs.h"
14388 #include <db.h>
14389 _ACEOF
14390 if { (eval echo "$as_me:14390: \"$ac_cpp conftest.$ac_ext\"") >&5
14391   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14392   ac_status=$?
14393   egrep -v '^ *\+' conftest.er1 >conftest.err
14394   rm -f conftest.er1
14395   cat conftest.err >&5
14396   echo "$as_me:14396: \$? = $ac_status" >&5
14397   (exit $ac_status); } >/dev/null; then
14398   if test -s conftest.err; then
14399     ac_cpp_err=$ac_c_preproc_warn_flag
14400   else
14401     ac_cpp_err=
14402   fi
14403 else
14404   ac_cpp_err=yes
14405 fi
14406 if test -z "$ac_cpp_err"; then
14407   ac_cv_header_db_h=yes
14408 else
14409   echo "$as_me: failed program was:" >&5
14410   cat conftest.$ac_ext >&5
14411   ac_cv_header_db_h=no
14412 fi
14413 rm -f conftest.err conftest.$ac_ext
14414 fi
14415 echo "$as_me:14415: result: $ac_cv_header_db_h" >&5
14416 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14417 if test $ac_cv_header_db_h = yes; then
14418
14419 echo "$as_me:14419: checking for version of db" >&5
14420 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14421 if test "${cf_cv_hashed_db_version+set}" = set; then
14422   echo $ECHO_N "(cached) $ECHO_C" >&6
14423 else
14424
14425 cf_cv_hashed_db_version=unknown
14426
14427 for cf_db_version in 1 2 3 4 5
14428 do
14429
14430 echo "${as_me-configure}:14430: testing checking for db version $cf_db_version ..." 1>&5
14431
14432         cat >conftest.$ac_ext <<_ACEOF
14433 #line 14433 "configure"
14434 #include "confdefs.h"
14435
14436 $ac_includes_default
14437 #include <db.h>
14438
14439 #ifdef DB_VERSION_MAJOR
14440         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14441 #if $cf_db_version == DB_VERSION_MAJOR
14442         /* ok */
14443 #else
14444         make an error
14445 #endif
14446 #else
14447 #if $cf_db_version == 1
14448         /* ok: assuming this is DB 1.8.5 */
14449 #else
14450         make an error
14451 #endif
14452 #endif
14453
14454 int
14455 main ()
14456 {
14457 DBT *foo = 0
14458   ;
14459   return 0;
14460 }
14461 _ACEOF
14462 rm -f conftest.$ac_objext
14463 if { (eval echo "$as_me:14463: \"$ac_compile\"") >&5
14464   (eval $ac_compile) 2>&5
14465   ac_status=$?
14466   echo "$as_me:14466: \$? = $ac_status" >&5
14467   (exit $ac_status); } &&
14468          { ac_try='test -s conftest.$ac_objext'
14469   { (eval echo "$as_me:14469: \"$ac_try\"") >&5
14470   (eval $ac_try) 2>&5
14471   ac_status=$?
14472   echo "$as_me:14472: \$? = $ac_status" >&5
14473   (exit $ac_status); }; }; then
14474
14475         cf_cv_hashed_db_version=$cf_db_version
14476         break
14477
14478 else
14479   echo "$as_me: failed program was:" >&5
14480 cat conftest.$ac_ext >&5
14481 fi
14482 rm -f conftest.$ac_objext conftest.$ac_ext
14483 done
14484
14485 fi
14486 echo "$as_me:14486: result: $cf_cv_hashed_db_version" >&5
14487 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14488
14489 if test "$cf_cv_hashed_db_version" = unknown ; then
14490         { { echo "$as_me:14490: error: Cannot determine version of db" >&5
14491 echo "$as_me: error: Cannot determine version of db" >&2;}
14492    { (exit 1); exit 1; }; }
14493 else
14494
14495 echo "$as_me:14495: checking for db libraries" >&5
14496 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14497 if test "${cf_cv_hashed_db_libs+set}" = set; then
14498   echo $ECHO_N "(cached) $ECHO_C" >&6
14499 else
14500
14501 cf_cv_hashed_db_libs=unknown
14502 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14503 do
14504         cf_save_libs="$LIBS"
14505         if test -n "$cf_db_libs"; then
14506                 LIBS="-l$cf_db_libs $LIBS"
14507         fi
14508
14509 echo "${as_me-configure}:14509: testing checking for library "$cf_db_libs" ..." 1>&5
14510
14511         cat >conftest.$ac_ext <<_ACEOF
14512 #line 14512 "configure"
14513 #include "confdefs.h"
14514
14515 $ac_includes_default
14516 #include <db.h>
14517
14518 int
14519 main ()
14520 {
14521
14522         char *path = "/tmp/foo";
14523 #ifdef DB_VERSION_MAJOR
14524 #if DB_VERSION_MAJOR >= 4
14525         DB *result = 0;
14526         db_create(&result, NULL, 0);
14527         result->open(result,
14528                 NULL,
14529                 path,
14530                 path,
14531                 DB_HASH,
14532                 DB_CREATE,
14533                 0644);
14534 #elif DB_VERSION_MAJOR >= 3
14535         DB *result = 0;
14536         db_create(&result, NULL, 0);
14537         result->open(result,
14538                 path,
14539                 path,
14540                 DB_HASH,
14541                 DB_CREATE,
14542                 0644);
14543 #elif DB_VERSION_MAJOR >= 2
14544         DB *result = 0;
14545         db_open(path,
14546                 DB_HASH,
14547                 DB_CREATE,
14548                 0644,
14549                 (DB_ENV *) 0,
14550                 (DB_INFO *) 0,
14551                 &result);
14552 #endif /* DB_VERSION_MAJOR */
14553 #else
14554         DB *result = dbopen(path,
14555                      2,
14556                      0644,
14557                      DB_HASH,
14558                      0);
14559 #endif
14560         ${cf_cv_main_return:-return}(result != 0)
14561
14562   ;
14563   return 0;
14564 }
14565 _ACEOF
14566 rm -f conftest.$ac_objext conftest$ac_exeext
14567 if { (eval echo "$as_me:14567: \"$ac_link\"") >&5
14568   (eval $ac_link) 2>&5
14569   ac_status=$?
14570   echo "$as_me:14570: \$? = $ac_status" >&5
14571   (exit $ac_status); } &&
14572          { ac_try='test -s conftest$ac_exeext'
14573   { (eval echo "$as_me:14573: \"$ac_try\"") >&5
14574   (eval $ac_try) 2>&5
14575   ac_status=$?
14576   echo "$as_me:14576: \$? = $ac_status" >&5
14577   (exit $ac_status); }; }; then
14578
14579         if test -n "$cf_db_libs" ; then
14580                 cf_cv_hashed_db_libs=$cf_db_libs
14581         else
14582                 cf_cv_hashed_db_libs=default
14583         fi
14584         LIBS="$cf_save_libs"
14585         break
14586
14587 else
14588   echo "$as_me: failed program was:" >&5
14589 cat conftest.$ac_ext >&5
14590 fi
14591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14592         LIBS="$cf_save_libs"
14593 done
14594
14595 fi
14596 echo "$as_me:14596: result: $cf_cv_hashed_db_libs" >&5
14597 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14598
14599         if test "$cf_cv_hashed_db_libs" = unknown ; then
14600                 { { echo "$as_me:14600: error: Cannot determine library for db" >&5
14601 echo "$as_me: error: Cannot determine library for db" >&2;}
14602    { (exit 1); exit 1; }; }
14603         elif test "$cf_cv_hashed_db_libs" != default ; then
14604                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14605         fi
14606 fi
14607
14608 else
14609
14610         { { echo "$as_me:14610: error: Cannot find db.h" >&5
14611 echo "$as_me: error: Cannot find db.h" >&2;}
14612    { (exit 1); exit 1; }; }
14613
14614 fi
14615
14616 fi
14617
14618 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14619         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14620         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14621 fi
14622
14623 # Just in case, check if the C compiler has a bool type.
14624
14625 echo "$as_me:14625: checking if we should include stdbool.h" >&5
14626 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14627
14628 if test "${cf_cv_header_stdbool_h+set}" = set; then
14629   echo $ECHO_N "(cached) $ECHO_C" >&6
14630 else
14631
14632         cat >conftest.$ac_ext <<_ACEOF
14633 #line 14633 "configure"
14634 #include "confdefs.h"
14635
14636 int
14637 main ()
14638 {
14639 bool foo = false
14640   ;
14641   return 0;
14642 }
14643 _ACEOF
14644 rm -f conftest.$ac_objext
14645 if { (eval echo "$as_me:14645: \"$ac_compile\"") >&5
14646   (eval $ac_compile) 2>&5
14647   ac_status=$?
14648   echo "$as_me:14648: \$? = $ac_status" >&5
14649   (exit $ac_status); } &&
14650          { ac_try='test -s conftest.$ac_objext'
14651   { (eval echo "$as_me:14651: \"$ac_try\"") >&5
14652   (eval $ac_try) 2>&5
14653   ac_status=$?
14654   echo "$as_me:14654: \$? = $ac_status" >&5
14655   (exit $ac_status); }; }; then
14656   cf_cv_header_stdbool_h=0
14657 else
14658   echo "$as_me: failed program was:" >&5
14659 cat conftest.$ac_ext >&5
14660 cat >conftest.$ac_ext <<_ACEOF
14661 #line 14661 "configure"
14662 #include "confdefs.h"
14663
14664 #ifndef __BEOS__
14665 #include <stdbool.h>
14666 #endif
14667
14668 int
14669 main ()
14670 {
14671 bool foo = false
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 rm -f conftest.$ac_objext
14677 if { (eval echo "$as_me:14677: \"$ac_compile\"") >&5
14678   (eval $ac_compile) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit $ac_status); } &&
14682          { ac_try='test -s conftest.$ac_objext'
14683   { (eval echo "$as_me:14683: \"$ac_try\"") >&5
14684   (eval $ac_try) 2>&5
14685   ac_status=$?
14686   echo "$as_me:14686: \$? = $ac_status" >&5
14687   (exit $ac_status); }; }; then
14688   cf_cv_header_stdbool_h=1
14689 else
14690   echo "$as_me: failed program was:" >&5
14691 cat conftest.$ac_ext >&5
14692 cf_cv_header_stdbool_h=0
14693 fi
14694 rm -f conftest.$ac_objext conftest.$ac_ext
14695 fi
14696 rm -f conftest.$ac_objext conftest.$ac_ext
14697 fi
14698
14699 if test "$cf_cv_header_stdbool_h" = 1
14700 then    echo "$as_me:14700: result: yes" >&5
14701 echo "${ECHO_T}yes" >&6
14702 else    echo "$as_me:14702: result: no" >&5
14703 echo "${ECHO_T}no" >&6
14704 fi
14705
14706 echo "$as_me:14706: checking for builtin bool type" >&5
14707 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14708
14709 if test "${cf_cv_cc_bool_type+set}" = set; then
14710   echo $ECHO_N "(cached) $ECHO_C" >&6
14711 else
14712
14713         cat >conftest.$ac_ext <<_ACEOF
14714 #line 14714 "configure"
14715 #include "confdefs.h"
14716
14717 #include <stdio.h>
14718 #include <sys/types.h>
14719
14720 int
14721 main ()
14722 {
14723 bool x = false
14724   ;
14725   return 0;
14726 }
14727 _ACEOF
14728 rm -f conftest.$ac_objext
14729 if { (eval echo "$as_me:14729: \"$ac_compile\"") >&5
14730   (eval $ac_compile) 2>&5
14731   ac_status=$?
14732   echo "$as_me:14732: \$? = $ac_status" >&5
14733   (exit $ac_status); } &&
14734          { ac_try='test -s conftest.$ac_objext'
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   cf_cv_cc_bool_type=1
14741 else
14742   echo "$as_me: failed program was:" >&5
14743 cat conftest.$ac_ext >&5
14744 cf_cv_cc_bool_type=0
14745 fi
14746 rm -f conftest.$ac_objext conftest.$ac_ext
14747
14748 fi
14749
14750 if test "$cf_cv_cc_bool_type" = 1
14751 then    echo "$as_me:14751: result: yes" >&5
14752 echo "${ECHO_T}yes" >&6
14753 else    echo "$as_me:14753: result: no" >&5
14754 echo "${ECHO_T}no" >&6
14755 fi
14756
14757 # Check for C++ compiler characteristics (and ensure that it's there!)
14758 if test -n "$CXX" ; then
14759         ac_ext=cc
14760 ac_cpp='$CXXCPP $CPPFLAGS'
14761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14762 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14764 ac_main_return=return
14765
14766 if test -n "$GXX" ; then
14767 case $cf_cv_system_name in #(vi
14768 os2*) #(vi
14769         cf_stdcpp_libname=stdcpp
14770         ;;
14771 *)
14772         cf_stdcpp_libname=stdc++
14773         ;;
14774 esac
14775 echo "$as_me:14775: checking for library $cf_stdcpp_libname" >&5
14776 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
14777 if test "${cf_cv_libstdcpp+set}" = set; then
14778   echo $ECHO_N "(cached) $ECHO_C" >&6
14779 else
14780
14781         cf_save="$LIBS"
14782         LIBS="$LIBS -l$cf_stdcpp_libname"
14783 cat >conftest.$ac_ext <<_ACEOF
14784 #line 14784 "configure"
14785 #include "confdefs.h"
14786
14787 #include <strstream.h>
14788 int
14789 main ()
14790 {
14791
14792 char buf[80];
14793 strstreambuf foo(buf, sizeof(buf))
14794
14795   ;
14796   return 0;
14797 }
14798 _ACEOF
14799 rm -f conftest.$ac_objext conftest$ac_exeext
14800 if { (eval echo "$as_me:14800: \"$ac_link\"") >&5
14801   (eval $ac_link) 2>&5
14802   ac_status=$?
14803   echo "$as_me:14803: \$? = $ac_status" >&5
14804   (exit $ac_status); } &&
14805          { ac_try='test -s conftest$ac_exeext'
14806   { (eval echo "$as_me:14806: \"$ac_try\"") >&5
14807   (eval $ac_try) 2>&5
14808   ac_status=$?
14809   echo "$as_me:14809: \$? = $ac_status" >&5
14810   (exit $ac_status); }; }; then
14811   cf_cv_libstdcpp=yes
14812 else
14813   echo "$as_me: failed program was:" >&5
14814 cat conftest.$ac_ext >&5
14815 cf_cv_libstdcpp=no
14816 fi
14817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14818         LIBS="$cf_save"
14819
14820 fi
14821 echo "$as_me:14821: result: $cf_cv_libstdcpp" >&5
14822 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
14823 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
14824 fi
14825
14826         echo "$as_me:14826: checking whether $CXX understands -c and -o together" >&5
14827 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
14828 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
14829   echo $ECHO_N "(cached) $ECHO_C" >&6
14830 else
14831
14832 cat > conftest.$ac_ext <<CF_EOF
14833 #include <stdio.h>
14834 int main()
14835 {
14836         ${cf_cv_main_return:-return}(0);
14837 }
14838 CF_EOF
14839 # We do the test twice because some compilers refuse to overwrite an
14840 # existing .o file with -o, though they will create one.
14841 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
14842 if { (eval echo "$as_me:14842: \"$ac_try\"") >&5
14843   (eval $ac_try) 2>&5
14844   ac_status=$?
14845   echo "$as_me:14845: \$? = $ac_status" >&5
14846   (exit $ac_status); } &&
14847   test -f conftest2.$ac_objext && { (eval echo "$as_me:14847: \"$ac_try\"") >&5
14848   (eval $ac_try) 2>&5
14849   ac_status=$?
14850   echo "$as_me:14850: \$? = $ac_status" >&5
14851   (exit $ac_status); };
14852 then
14853   eval cf_cv_prog_CXX_c_o=yes
14854 else
14855   eval cf_cv_prog_CXX_c_o=no
14856 fi
14857 rm -f conftest*
14858
14859 fi
14860 if test $cf_cv_prog_CXX_c_o = yes; then
14861   echo "$as_me:14861: result: yes" >&5
14862 echo "${ECHO_T}yes" >&6
14863 else
14864   echo "$as_me:14864: result: no" >&5
14865 echo "${ECHO_T}no" >&6
14866 fi
14867
14868         case $GXX_VERSION in
14869         1*|2.0-6*)
14870                 cf_cxx_library=yes
14871                 ;;
14872         *-2.7*|2.7*)
14873
14874 cf_cxx_library=unknown
14875 case $cf_cv_system_name in #(vi
14876 os2*) #(vi
14877         cf_gpp_libname=gpp
14878         ;;
14879 *)
14880         cf_gpp_libname=g++
14881         ;;
14882 esac
14883 if test "$GXX" = yes; then
14884         echo "$as_me:14884: checking for lib$cf_gpp_libname" >&5
14885 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
14886         cf_save="$LIBS"
14887         LIBS="$LIBS -l$cf_gpp_libname"
14888         cat >conftest.$ac_ext <<_ACEOF
14889 #line 14889 "configure"
14890 #include "confdefs.h"
14891
14892 #include <$cf_gpp_libname/builtin.h>
14893
14894 int
14895 main ()
14896 {
14897 two_arg_error_handler_t foo2 = lib_error_handler
14898   ;
14899   return 0;
14900 }
14901 _ACEOF
14902 rm -f conftest.$ac_objext conftest$ac_exeext
14903 if { (eval echo "$as_me:14903: \"$ac_link\"") >&5
14904   (eval $ac_link) 2>&5
14905   ac_status=$?
14906   echo "$as_me:14906: \$? = $ac_status" >&5
14907   (exit $ac_status); } &&
14908          { ac_try='test -s conftest$ac_exeext'
14909   { (eval echo "$as_me:14909: \"$ac_try\"") >&5
14910   (eval $ac_try) 2>&5
14911   ac_status=$?
14912   echo "$as_me:14912: \$? = $ac_status" >&5
14913   (exit $ac_status); }; }; then
14914   cf_cxx_library=yes
14915          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14916          if test "$cf_gpp_libname" = cpp ; then
14917             cat >>confdefs.h <<\EOF
14918 #define HAVE_GPP_BUILTIN_H 1
14919 EOF
14920
14921          else
14922             cat >>confdefs.h <<\EOF
14923 #define HAVE_GXX_BUILTIN_H 1
14924 EOF
14925
14926          fi
14927 else
14928   echo "$as_me: failed program was:" >&5
14929 cat conftest.$ac_ext >&5
14930 cat >conftest.$ac_ext <<_ACEOF
14931 #line 14931 "configure"
14932 #include "confdefs.h"
14933
14934 #include <builtin.h>
14935
14936 int
14937 main ()
14938 {
14939 two_arg_error_handler_t foo2 = lib_error_handler
14940   ;
14941   return 0;
14942 }
14943 _ACEOF
14944 rm -f conftest.$ac_objext conftest$ac_exeext
14945 if { (eval echo "$as_me:14945: \"$ac_link\"") >&5
14946   (eval $ac_link) 2>&5
14947   ac_status=$?
14948   echo "$as_me:14948: \$? = $ac_status" >&5
14949   (exit $ac_status); } &&
14950          { ac_try='test -s conftest$ac_exeext'
14951   { (eval echo "$as_me:14951: \"$ac_try\"") >&5
14952   (eval $ac_try) 2>&5
14953   ac_status=$?
14954   echo "$as_me:14954: \$? = $ac_status" >&5
14955   (exit $ac_status); }; }; then
14956   cf_cxx_library=yes
14957          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
14958          cat >>confdefs.h <<\EOF
14959 #define HAVE_BUILTIN_H 1
14960 EOF
14961
14962 else
14963   echo "$as_me: failed program was:" >&5
14964 cat conftest.$ac_ext >&5
14965 cf_cxx_library=no
14966 fi
14967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14968 fi
14969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14970         LIBS="$cf_save"
14971         echo "$as_me:14971: result: $cf_cxx_library" >&5
14972 echo "${ECHO_T}$cf_cxx_library" >&6
14973 fi
14974
14975                 ;;
14976         *)
14977                 cf_cxx_library=no
14978                 ;;
14979         esac
14980
14981         ac_ext=cc
14982 ac_cpp='$CXXCPP $CPPFLAGS'
14983 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14984 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14985 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14986 ac_main_return=return
14987 echo "$as_me:14987: checking how to run the C++ preprocessor" >&5
14988 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
14989 if test -z "$CXXCPP"; then
14990   if test "${ac_cv_prog_CXXCPP+set}" = set; then
14991   echo $ECHO_N "(cached) $ECHO_C" >&6
14992 else
14993       # Double quotes because CXXCPP needs to be expanded
14994     for CXXCPP in "$CXX -E" "/lib/cpp"
14995     do
14996       ac_preproc_ok=false
14997 for ac_cxx_preproc_warn_flag in '' yes
14998 do
14999   # Use a header file that comes with gcc, so configuring glibc
15000   # with a fresh cross-compiler works.
15001   # On the NeXT, cc -E runs the code through the compiler's parser,
15002   # not just through cpp. "Syntax error" is here to catch this case.
15003   cat >conftest.$ac_ext <<_ACEOF
15004 #line 15004 "configure"
15005 #include "confdefs.h"
15006 #include <assert.h>
15007                      Syntax error
15008 _ACEOF
15009 if { (eval echo "$as_me:15009: \"$ac_cpp conftest.$ac_ext\"") >&5
15010   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15011   ac_status=$?
15012   egrep -v '^ *\+' conftest.er1 >conftest.err
15013   rm -f conftest.er1
15014   cat conftest.err >&5
15015   echo "$as_me:15015: \$? = $ac_status" >&5
15016   (exit $ac_status); } >/dev/null; then
15017   if test -s conftest.err; then
15018     ac_cpp_err=$ac_cxx_preproc_warn_flag
15019   else
15020     ac_cpp_err=
15021   fi
15022 else
15023   ac_cpp_err=yes
15024 fi
15025 if test -z "$ac_cpp_err"; then
15026   :
15027 else
15028   echo "$as_me: failed program was:" >&5
15029   cat conftest.$ac_ext >&5
15030   # Broken: fails on valid input.
15031 continue
15032 fi
15033 rm -f conftest.err conftest.$ac_ext
15034
15035   # OK, works on sane cases.  Now check whether non-existent headers
15036   # can be detected and how.
15037   cat >conftest.$ac_ext <<_ACEOF
15038 #line 15038 "configure"
15039 #include "confdefs.h"
15040 #include <ac_nonexistent.h>
15041 _ACEOF
15042 if { (eval echo "$as_me:15042: \"$ac_cpp conftest.$ac_ext\"") >&5
15043   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15044   ac_status=$?
15045   egrep -v '^ *\+' conftest.er1 >conftest.err
15046   rm -f conftest.er1
15047   cat conftest.err >&5
15048   echo "$as_me:15048: \$? = $ac_status" >&5
15049   (exit $ac_status); } >/dev/null; then
15050   if test -s conftest.err; then
15051     ac_cpp_err=$ac_cxx_preproc_warn_flag
15052   else
15053     ac_cpp_err=
15054   fi
15055 else
15056   ac_cpp_err=yes
15057 fi
15058 if test -z "$ac_cpp_err"; then
15059   # Broken: success on invalid input.
15060 continue
15061 else
15062   echo "$as_me: failed program was:" >&5
15063   cat conftest.$ac_ext >&5
15064   # Passes both tests.
15065 ac_preproc_ok=:
15066 break
15067 fi
15068 rm -f conftest.err conftest.$ac_ext
15069
15070 done
15071 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15072 rm -f conftest.err conftest.$ac_ext
15073 if $ac_preproc_ok; then
15074   break
15075 fi
15076
15077     done
15078     ac_cv_prog_CXXCPP=$CXXCPP
15079
15080 fi
15081   CXXCPP=$ac_cv_prog_CXXCPP
15082 else
15083   ac_cv_prog_CXXCPP=$CXXCPP
15084 fi
15085 echo "$as_me:15085: result: $CXXCPP" >&5
15086 echo "${ECHO_T}$CXXCPP" >&6
15087 ac_preproc_ok=false
15088 for ac_cxx_preproc_warn_flag in '' yes
15089 do
15090   # Use a header file that comes with gcc, so configuring glibc
15091   # with a fresh cross-compiler works.
15092   # On the NeXT, cc -E runs the code through the compiler's parser,
15093   # not just through cpp. "Syntax error" is here to catch this case.
15094   cat >conftest.$ac_ext <<_ACEOF
15095 #line 15095 "configure"
15096 #include "confdefs.h"
15097 #include <assert.h>
15098                      Syntax error
15099 _ACEOF
15100 if { (eval echo "$as_me:15100: \"$ac_cpp conftest.$ac_ext\"") >&5
15101   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15102   ac_status=$?
15103   egrep -v '^ *\+' conftest.er1 >conftest.err
15104   rm -f conftest.er1
15105   cat conftest.err >&5
15106   echo "$as_me:15106: \$? = $ac_status" >&5
15107   (exit $ac_status); } >/dev/null; then
15108   if test -s conftest.err; then
15109     ac_cpp_err=$ac_cxx_preproc_warn_flag
15110   else
15111     ac_cpp_err=
15112   fi
15113 else
15114   ac_cpp_err=yes
15115 fi
15116 if test -z "$ac_cpp_err"; then
15117   :
15118 else
15119   echo "$as_me: failed program was:" >&5
15120   cat conftest.$ac_ext >&5
15121   # Broken: fails on valid input.
15122 continue
15123 fi
15124 rm -f conftest.err conftest.$ac_ext
15125
15126   # OK, works on sane cases.  Now check whether non-existent headers
15127   # can be detected and how.
15128   cat >conftest.$ac_ext <<_ACEOF
15129 #line 15129 "configure"
15130 #include "confdefs.h"
15131 #include <ac_nonexistent.h>
15132 _ACEOF
15133 if { (eval echo "$as_me:15133: \"$ac_cpp conftest.$ac_ext\"") >&5
15134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15135   ac_status=$?
15136   egrep -v '^ *\+' conftest.er1 >conftest.err
15137   rm -f conftest.er1
15138   cat conftest.err >&5
15139   echo "$as_me:15139: \$? = $ac_status" >&5
15140   (exit $ac_status); } >/dev/null; then
15141   if test -s conftest.err; then
15142     ac_cpp_err=$ac_cxx_preproc_warn_flag
15143   else
15144     ac_cpp_err=
15145   fi
15146 else
15147   ac_cpp_err=yes
15148 fi
15149 if test -z "$ac_cpp_err"; then
15150   # Broken: success on invalid input.
15151 continue
15152 else
15153   echo "$as_me: failed program was:" >&5
15154   cat conftest.$ac_ext >&5
15155   # Passes both tests.
15156 ac_preproc_ok=:
15157 break
15158 fi
15159 rm -f conftest.err conftest.$ac_ext
15160
15161 done
15162 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15163 rm -f conftest.err conftest.$ac_ext
15164 if $ac_preproc_ok; then
15165   :
15166 else
15167   { { echo "$as_me:15167: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15168 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15169    { (exit 1); exit 1; }; }
15170 fi
15171
15172 ac_ext=cc
15173 ac_cpp='$CXXCPP $CPPFLAGS'
15174 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15175 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15176 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15177 ac_main_return=return
15178
15179 for ac_header in iostream typeinfo
15180 do
15181 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15182 echo "$as_me:15182: checking for $ac_header" >&5
15183 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15184 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15185   echo $ECHO_N "(cached) $ECHO_C" >&6
15186 else
15187   cat >conftest.$ac_ext <<_ACEOF
15188 #line 15188 "configure"
15189 #include "confdefs.h"
15190 #include <$ac_header>
15191 _ACEOF
15192 if { (eval echo "$as_me:15192: \"$ac_cpp conftest.$ac_ext\"") >&5
15193   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15194   ac_status=$?
15195   egrep -v '^ *\+' conftest.er1 >conftest.err
15196   rm -f conftest.er1
15197   cat conftest.err >&5
15198   echo "$as_me:15198: \$? = $ac_status" >&5
15199   (exit $ac_status); } >/dev/null; then
15200   if test -s conftest.err; then
15201     ac_cpp_err=$ac_cxx_preproc_warn_flag
15202   else
15203     ac_cpp_err=
15204   fi
15205 else
15206   ac_cpp_err=yes
15207 fi
15208 if test -z "$ac_cpp_err"; then
15209   eval "$as_ac_Header=yes"
15210 else
15211   echo "$as_me: failed program was:" >&5
15212   cat conftest.$ac_ext >&5
15213   eval "$as_ac_Header=no"
15214 fi
15215 rm -f conftest.err conftest.$ac_ext
15216 fi
15217 echo "$as_me:15217: result: `eval echo '${'$as_ac_Header'}'`" >&5
15218 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15219 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15220   cat >>confdefs.h <<EOF
15221 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15222 EOF
15223
15224 fi
15225 done
15226
15227     if test x"$ac_cv_header_iostream" = xyes ; then
15228         echo "$as_me:15228: checking if iostream uses std-namespace" >&5
15229 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15230         cat >conftest.$ac_ext <<_ACEOF
15231 #line 15231 "configure"
15232 #include "confdefs.h"
15233
15234 #include <iostream>
15235 using std::endl;
15236 using std::cerr;
15237 int
15238 main ()
15239 {
15240
15241 cerr << "testing" << endl;
15242
15243   ;
15244   return 0;
15245 }
15246 _ACEOF
15247 rm -f conftest.$ac_objext
15248 if { (eval echo "$as_me:15248: \"$ac_compile\"") >&5
15249   (eval $ac_compile) 2>&5
15250   ac_status=$?
15251   echo "$as_me:15251: \$? = $ac_status" >&5
15252   (exit $ac_status); } &&
15253          { ac_try='test -s conftest.$ac_objext'
15254   { (eval echo "$as_me:15254: \"$ac_try\"") >&5
15255   (eval $ac_try) 2>&5
15256   ac_status=$?
15257   echo "$as_me:15257: \$? = $ac_status" >&5
15258   (exit $ac_status); }; }; then
15259   cf_iostream_namespace=yes
15260 else
15261   echo "$as_me: failed program was:" >&5
15262 cat conftest.$ac_ext >&5
15263 cf_iostream_namespace=no
15264 fi
15265 rm -f conftest.$ac_objext conftest.$ac_ext
15266         echo "$as_me:15266: result: $cf_iostream_namespace" >&5
15267 echo "${ECHO_T}$cf_iostream_namespace" >&6
15268         if test "$cf_iostream_namespace" = yes ; then
15269             cat >>confdefs.h <<\EOF
15270 #define IOSTREAM_NAMESPACE 1
15271 EOF
15272
15273         fi
15274     fi
15275
15276 echo "$as_me:15276: checking if we should include stdbool.h" >&5
15277 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15278
15279 if test "${cf_cv_header_stdbool_h+set}" = set; then
15280   echo $ECHO_N "(cached) $ECHO_C" >&6
15281 else
15282
15283         cat >conftest.$ac_ext <<_ACEOF
15284 #line 15284 "configure"
15285 #include "confdefs.h"
15286
15287 int
15288 main ()
15289 {
15290 bool foo = false
15291   ;
15292   return 0;
15293 }
15294 _ACEOF
15295 rm -f conftest.$ac_objext
15296 if { (eval echo "$as_me:15296: \"$ac_compile\"") >&5
15297   (eval $ac_compile) 2>&5
15298   ac_status=$?
15299   echo "$as_me:15299: \$? = $ac_status" >&5
15300   (exit $ac_status); } &&
15301          { ac_try='test -s conftest.$ac_objext'
15302   { (eval echo "$as_me:15302: \"$ac_try\"") >&5
15303   (eval $ac_try) 2>&5
15304   ac_status=$?
15305   echo "$as_me:15305: \$? = $ac_status" >&5
15306   (exit $ac_status); }; }; then
15307   cf_cv_header_stdbool_h=0
15308 else
15309   echo "$as_me: failed program was:" >&5
15310 cat conftest.$ac_ext >&5
15311 cat >conftest.$ac_ext <<_ACEOF
15312 #line 15312 "configure"
15313 #include "confdefs.h"
15314
15315 #ifndef __BEOS__
15316 #include <stdbool.h>
15317 #endif
15318
15319 int
15320 main ()
15321 {
15322 bool foo = false
15323   ;
15324   return 0;
15325 }
15326 _ACEOF
15327 rm -f conftest.$ac_objext
15328 if { (eval echo "$as_me:15328: \"$ac_compile\"") >&5
15329   (eval $ac_compile) 2>&5
15330   ac_status=$?
15331   echo "$as_me:15331: \$? = $ac_status" >&5
15332   (exit $ac_status); } &&
15333          { ac_try='test -s conftest.$ac_objext'
15334   { (eval echo "$as_me:15334: \"$ac_try\"") >&5
15335   (eval $ac_try) 2>&5
15336   ac_status=$?
15337   echo "$as_me:15337: \$? = $ac_status" >&5
15338   (exit $ac_status); }; }; then
15339   cf_cv_header_stdbool_h=1
15340 else
15341   echo "$as_me: failed program was:" >&5
15342 cat conftest.$ac_ext >&5
15343 cf_cv_header_stdbool_h=0
15344 fi
15345 rm -f conftest.$ac_objext conftest.$ac_ext
15346 fi
15347 rm -f conftest.$ac_objext conftest.$ac_ext
15348 fi
15349
15350 if test "$cf_cv_header_stdbool_h" = 1
15351 then    echo "$as_me:15351: result: yes" >&5
15352 echo "${ECHO_T}yes" >&6
15353 else    echo "$as_me:15353: result: no" >&5
15354 echo "${ECHO_T}no" >&6
15355 fi
15356
15357 echo "$as_me:15357: checking for builtin bool type" >&5
15358 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15359
15360 if test "${cf_cv_builtin_bool+set}" = set; then
15361   echo $ECHO_N "(cached) $ECHO_C" >&6
15362 else
15363
15364         cat >conftest.$ac_ext <<_ACEOF
15365 #line 15365 "configure"
15366 #include "confdefs.h"
15367
15368 #include <stdio.h>
15369 #include <sys/types.h>
15370
15371 int
15372 main ()
15373 {
15374 bool x = false
15375   ;
15376   return 0;
15377 }
15378 _ACEOF
15379 rm -f conftest.$ac_objext
15380 if { (eval echo "$as_me:15380: \"$ac_compile\"") >&5
15381   (eval $ac_compile) 2>&5
15382   ac_status=$?
15383   echo "$as_me:15383: \$? = $ac_status" >&5
15384   (exit $ac_status); } &&
15385          { ac_try='test -s conftest.$ac_objext'
15386   { (eval echo "$as_me:15386: \"$ac_try\"") >&5
15387   (eval $ac_try) 2>&5
15388   ac_status=$?
15389   echo "$as_me:15389: \$? = $ac_status" >&5
15390   (exit $ac_status); }; }; then
15391   cf_cv_builtin_bool=1
15392 else
15393   echo "$as_me: failed program was:" >&5
15394 cat conftest.$ac_ext >&5
15395 cf_cv_builtin_bool=0
15396 fi
15397 rm -f conftest.$ac_objext conftest.$ac_ext
15398
15399 fi
15400
15401 if test "$cf_cv_builtin_bool" = 1
15402 then    echo "$as_me:15402: result: yes" >&5
15403 echo "${ECHO_T}yes" >&6
15404 else    echo "$as_me:15404: result: no" >&5
15405 echo "${ECHO_T}no" >&6
15406 fi
15407
15408 echo "$as_me:15408: checking for size of bool" >&5
15409 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15410 if test "${cf_cv_type_of_bool+set}" = set; then
15411   echo $ECHO_N "(cached) $ECHO_C" >&6
15412 else
15413
15414         rm -f cf_test.out
15415         if test "$cross_compiling" = yes; then
15416   cf_cv_type_of_bool=unknown
15417 else
15418   cat >conftest.$ac_ext <<_ACEOF
15419 #line 15419 "configure"
15420 #include "confdefs.h"
15421
15422 #include <stdlib.h>
15423 #include <stdio.h>
15424
15425 #if defined(__cplusplus)
15426
15427 #ifdef HAVE_GXX_BUILTIN_H
15428 #include <g++/builtin.h>
15429 #elif HAVE_GPP_BUILTIN_H
15430 #include <gpp/builtin.h>
15431 #elif HAVE_BUILTIN_H
15432 #include <builtin.h>
15433 #endif
15434
15435 #else
15436
15437 #if $cf_cv_header_stdbool_h
15438 #include <stdbool.h>
15439 #endif
15440
15441 #endif
15442
15443 main()
15444 {
15445         FILE *fp = fopen("cf_test.out", "w");
15446         if (fp != 0) {
15447                 bool x = true;
15448                 if ((bool)(-x) >= 0)
15449                         fputs("unsigned ", fp);
15450                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15451                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15452                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15453                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15454                 fclose(fp);
15455         }
15456         ${cf_cv_main_return:-return}(0);
15457 }
15458
15459 _ACEOF
15460 rm -f conftest$ac_exeext
15461 if { (eval echo "$as_me:15461: \"$ac_link\"") >&5
15462   (eval $ac_link) 2>&5
15463   ac_status=$?
15464   echo "$as_me:15464: \$? = $ac_status" >&5
15465   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15466   { (eval echo "$as_me:15466: \"$ac_try\"") >&5
15467   (eval $ac_try) 2>&5
15468   ac_status=$?
15469   echo "$as_me:15469: \$? = $ac_status" >&5
15470   (exit $ac_status); }; }; then
15471   cf_cv_type_of_bool=`cat cf_test.out`
15472                  if test -z "$cf_cv_type_of_bool"; then
15473                    cf_cv_type_of_bool=unknown
15474                  fi
15475 else
15476   echo "$as_me: program exited with status $ac_status" >&5
15477 echo "$as_me: failed program was:" >&5
15478 cat conftest.$ac_ext >&5
15479 cf_cv_type_of_bool=unknown
15480 fi
15481 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15482 fi
15483
15484 fi
15485
15486         rm -f cf_test.out
15487 echo "$as_me:15487: result: $cf_cv_type_of_bool" >&5
15488 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15489 if test "$cf_cv_type_of_bool" = unknown ; then
15490         case .$NCURSES_BOOL in #(vi
15491         .auto|.) NCURSES_BOOL=unsigned;;
15492         esac
15493         { echo "$as_me:15493: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15494 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15495         cf_cv_type_of_bool=$NCURSES_BOOL
15496 fi
15497
15498 echo "$as_me:15498: checking for special defines needed for etip.h" >&5
15499 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15500 cf_save_CXXFLAGS="$CXXFLAGS"
15501 cf_result="none"
15502 for cf_math in "" MATH_H
15503 do
15504 for cf_excp in "" MATH_EXCEPTION
15505 do
15506         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15507         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15508         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15509 cat >conftest.$ac_ext <<_ACEOF
15510 #line 15510 "configure"
15511 #include "confdefs.h"
15512
15513 #include <etip.h.in>
15514
15515 int
15516 main ()
15517 {
15518
15519   ;
15520   return 0;
15521 }
15522 _ACEOF
15523 rm -f conftest.$ac_objext
15524 if { (eval echo "$as_me:15524: \"$ac_compile\"") >&5
15525   (eval $ac_compile) 2>&5
15526   ac_status=$?
15527   echo "$as_me:15527: \$? = $ac_status" >&5
15528   (exit $ac_status); } &&
15529          { ac_try='test -s conftest.$ac_objext'
15530   { (eval echo "$as_me:15530: \"$ac_try\"") >&5
15531   (eval $ac_try) 2>&5
15532   ac_status=$?
15533   echo "$as_me:15533: \$? = $ac_status" >&5
15534   (exit $ac_status); }; }; then
15535
15536         test -n "$cf_math" && cat >>confdefs.h <<EOF
15537 #define ETIP_NEEDS_${cf_math} 1
15538 EOF
15539
15540         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15541 #define ETIP_NEEDS_${cf_excp} 1
15542 EOF
15543
15544         cf_result="$cf_math $cf_excp"
15545         break
15546
15547 else
15548   echo "$as_me: failed program was:" >&5
15549 cat conftest.$ac_ext >&5
15550 fi
15551 rm -f conftest.$ac_objext conftest.$ac_ext
15552 done
15553 done
15554 echo "$as_me:15554: result: $cf_result" >&5
15555 echo "${ECHO_T}$cf_result" >&6
15556 CXXFLAGS="$cf_save_CXXFLAGS"
15557
15558 if test -n "$CXX"; then
15559 echo "$as_me:15559: checking if $CXX accepts parameter initialization" >&5
15560 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15561 if test "${cf_cv_cpp_param_init+set}" = set; then
15562   echo $ECHO_N "(cached) $ECHO_C" >&6
15563 else
15564
15565         ac_ext=cc
15566 ac_cpp='$CXXCPP $CPPFLAGS'
15567 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15568 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15569 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15570 ac_main_return=return
15571
15572         if test "$cross_compiling" = yes; then
15573   cf_cv_cpp_param_init=unknown
15574 else
15575   cat >conftest.$ac_ext <<_ACEOF
15576 #line 15576 "configure"
15577 #include "confdefs.h"
15578
15579 class TEST {
15580 private:
15581         int value;
15582 public:
15583         TEST(int x = 1);
15584         ~TEST();
15585 };
15586
15587 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15588 {
15589         value = x;
15590 }
15591 void main() { }
15592
15593 _ACEOF
15594 rm -f conftest$ac_exeext
15595 if { (eval echo "$as_me:15595: \"$ac_link\"") >&5
15596   (eval $ac_link) 2>&5
15597   ac_status=$?
15598   echo "$as_me:15598: \$? = $ac_status" >&5
15599   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15600   { (eval echo "$as_me:15600: \"$ac_try\"") >&5
15601   (eval $ac_try) 2>&5
15602   ac_status=$?
15603   echo "$as_me:15603: \$? = $ac_status" >&5
15604   (exit $ac_status); }; }; then
15605   cf_cv_cpp_param_init=yes
15606 else
15607   echo "$as_me: program exited with status $ac_status" >&5
15608 echo "$as_me: failed program was:" >&5
15609 cat conftest.$ac_ext >&5
15610 cf_cv_cpp_param_init=no
15611 fi
15612 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15613 fi
15614         ac_ext=cc
15615 ac_cpp='$CXXCPP $CPPFLAGS'
15616 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15617 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15618 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15619 ac_main_return=return
15620
15621 fi
15622 echo "$as_me:15622: result: $cf_cv_cpp_param_init" >&5
15623 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15624 fi
15625 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15626 #define CPP_HAS_PARAM_INIT 1
15627 EOF
15628
15629 if test -n "$CXX"; then
15630
15631 echo "$as_me:15631: checking if $CXX accepts static_cast" >&5
15632 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15633 if test "${cf_cv_cpp_static_cast+set}" = set; then
15634   echo $ECHO_N "(cached) $ECHO_C" >&6
15635 else
15636
15637         ac_ext=cc
15638 ac_cpp='$CXXCPP $CPPFLAGS'
15639 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15640 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15641 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15642 ac_main_return=return
15643
15644         cat >conftest.$ac_ext <<_ACEOF
15645 #line 15645 "configure"
15646 #include "confdefs.h"
15647
15648 class NCursesPanel
15649 {
15650 public:
15651   NCursesPanel(int nlines,
15652                int ncols,
15653                int begin_y = 0,
15654                int begin_x = 0)
15655   {
15656   }
15657
15658   ~NCursesPanel();
15659 };
15660
15661 template<class T> class NCursesUserPanel : public NCursesPanel
15662 {
15663 public:
15664   NCursesUserPanel (int nlines,
15665                     int ncols,
15666                     int begin_y = 0,
15667                     int begin_x = 0,
15668                     const T* p_UserData = static_cast<T*>(0))
15669     : NCursesPanel (nlines, ncols, begin_y, begin_x)
15670   {
15671   };
15672   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
15673   {
15674   };
15675
15676   virtual ~NCursesUserPanel() {};
15677 };
15678
15679 int
15680 main ()
15681 {
15682
15683         const char* p_UserData = static_cast<char*>(0)
15684   ;
15685   return 0;
15686 }
15687 _ACEOF
15688 rm -f conftest.$ac_objext
15689 if { (eval echo "$as_me:15689: \"$ac_compile\"") >&5
15690   (eval $ac_compile) 2>&5
15691   ac_status=$?
15692   echo "$as_me:15692: \$? = $ac_status" >&5
15693   (exit $ac_status); } &&
15694          { ac_try='test -s conftest.$ac_objext'
15695   { (eval echo "$as_me:15695: \"$ac_try\"") >&5
15696   (eval $ac_try) 2>&5
15697   ac_status=$?
15698   echo "$as_me:15698: \$? = $ac_status" >&5
15699   (exit $ac_status); }; }; then
15700   cf_cv_cpp_static_cast=yes
15701 else
15702   echo "$as_me: failed program was:" >&5
15703 cat conftest.$ac_ext >&5
15704 cf_cv_cpp_static_cast=no
15705 fi
15706 rm -f conftest.$ac_objext conftest.$ac_ext
15707
15708         ac_ext=cc
15709 ac_cpp='$CXXCPP $CPPFLAGS'
15710 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15711 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15712 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15713 ac_main_return=return
15714
15715 fi
15716 echo "$as_me:15716: result: $cf_cv_cpp_static_cast" >&5
15717 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
15718
15719 fi
15720
15721 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
15722 #define CPP_HAS_STATIC_CAST 1
15723 EOF
15724
15725         CXX_AR='$(AR)'
15726         CXX_AR_OPTS='$(AR_OPTS)'
15727         case $cf_cv_system_name in #(vi
15728         irix*) #(vi
15729             if test "$GXX" != yes ; then
15730                 CXX_AR='$(CXX)'
15731                 CXX_AR_OPTS='-ar -o'
15732             fi
15733             ;;
15734         sco3.2v5*) #(vi
15735             CXXLDFLAGS="-u main"
15736             ;;
15737         solaris2*)
15738             if test "$GXX" != yes ; then
15739                 CXX_AR='$(CXX)'
15740                 CXX_AR_OPTS='-xar -o'
15741             fi
15742             ;;
15743         esac
15744
15745 else
15746         cf_cxx_library=no
15747         cf_cv_builtin_bool=1
15748
15749         # Just because we are not configuring against C++ right now does not
15750         # mean that a user will not want to use C++.  Some distributors disable
15751         # the C++ portion of this configuration as a shortcut (or just to avoid
15752         # compiling the demo in the c++ directory).  So we need a reasonable
15753         # default for the 'bool' type.
15754         #
15755         # Caveat: since the storage of the bool type is not standardized, it
15756         # may change.
15757
15758         if test "$NCURSES_BOOL" != auto ; then
15759                 cf_cv_type_of_bool=$NCURSES_BOOL
15760                 cf_cv_header_stdbool_h=0
15761         else
15762                 if test "$cf_cv_header_stdbool_h" = 1 ; then
15763
15764 echo "$as_me:15764: checking for size of bool" >&5
15765 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15766 if test "${cf_cv_type_of_bool+set}" = set; then
15767   echo $ECHO_N "(cached) $ECHO_C" >&6
15768 else
15769
15770         rm -f cf_test.out
15771         if test "$cross_compiling" = yes; then
15772   cf_cv_type_of_bool=unknown
15773 else
15774   cat >conftest.$ac_ext <<_ACEOF
15775 #line 15775 "configure"
15776 #include "confdefs.h"
15777
15778 #include <stdlib.h>
15779 #include <stdio.h>
15780
15781 #if defined(__cplusplus)
15782
15783 #ifdef HAVE_GXX_BUILTIN_H
15784 #include <g++/builtin.h>
15785 #elif HAVE_GPP_BUILTIN_H
15786 #include <gpp/builtin.h>
15787 #elif HAVE_BUILTIN_H
15788 #include <builtin.h>
15789 #endif
15790
15791 #else
15792
15793 #if $cf_cv_header_stdbool_h
15794 #include <stdbool.h>
15795 #endif
15796
15797 #endif
15798
15799 main()
15800 {
15801         FILE *fp = fopen("cf_test.out", "w");
15802         if (fp != 0) {
15803                 bool x = true;
15804                 if ((bool)(-x) >= 0)
15805                         fputs("unsigned ", fp);
15806                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15807                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15808                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15809                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15810                 fclose(fp);
15811         }
15812         ${cf_cv_main_return:-return}(0);
15813 }
15814
15815 _ACEOF
15816 rm -f conftest$ac_exeext
15817 if { (eval echo "$as_me:15817: \"$ac_link\"") >&5
15818   (eval $ac_link) 2>&5
15819   ac_status=$?
15820   echo "$as_me:15820: \$? = $ac_status" >&5
15821   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15822   { (eval echo "$as_me:15822: \"$ac_try\"") >&5
15823   (eval $ac_try) 2>&5
15824   ac_status=$?
15825   echo "$as_me:15825: \$? = $ac_status" >&5
15826   (exit $ac_status); }; }; then
15827   cf_cv_type_of_bool=`cat cf_test.out`
15828                  if test -z "$cf_cv_type_of_bool"; then
15829                    cf_cv_type_of_bool=unknown
15830                  fi
15831 else
15832   echo "$as_me: program exited with status $ac_status" >&5
15833 echo "$as_me: failed program was:" >&5
15834 cat conftest.$ac_ext >&5
15835 cf_cv_type_of_bool=unknown
15836 fi
15837 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15838 fi
15839
15840 fi
15841
15842         rm -f cf_test.out
15843 echo "$as_me:15843: result: $cf_cv_type_of_bool" >&5
15844 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15845 if test "$cf_cv_type_of_bool" = unknown ; then
15846         case .$NCURSES_BOOL in #(vi
15847         .auto|.) NCURSES_BOOL=unsigned;;
15848         esac
15849         { echo "$as_me:15849: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15850 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15851         cf_cv_type_of_bool=$NCURSES_BOOL
15852 fi
15853
15854                 else
15855                         echo "$as_me:15855: checking for fallback type of bool" >&5
15856 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
15857                         case "$host_cpu" in #(vi
15858                         i?86)   cf_cv_type_of_bool=char ;; #(vi
15859                         *)      cf_cv_type_of_bool=int  ;;
15860                         esac
15861                         echo "$as_me:15861: result: $cf_cv_type_of_bool" >&5
15862 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15863                 fi
15864         fi
15865 fi
15866
15867 # If the C compiler did not declare bool, and we did not determine that the C++
15868 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
15869 # ncurses library use the same type as C++ bool.  Note that this allows one to
15870 # specify the type of bool in a configure-script option and postpone
15871 # integration with the C++ compiler provided that the types are compatible.
15872 USE_CXX_BOOL=1
15873 if test $cf_cv_cc_bool_type = 1
15874 then
15875         # oops: C has a bool.  Unlikely, but C++ could differ.
15876         USE_CXX_BOOL=0
15877 elif test $cf_cv_builtin_bool = 0
15878 then
15879         # C++ has no bool
15880         USE_CXX_BOOL=0
15881 else
15882         # this is the normal case
15883         USE_CXX_BOOL='defined(__cplusplus)'
15884 fi
15885
15886 if test -f "${srcdir}/Ada95/Makefile.in" ; then
15887
15888 if test "$cf_with_ada" != "no" ; then
15889     if test "$with_libtool" != "no"; then
15890         { echo "$as_me:15890: WARNING: libtool does not support Ada - disabling feature" >&5
15891 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
15892         cf_with_ada=no
15893     fi
15894 fi
15895
15896 if test "$cf_with_ada" != "no" ; then
15897 cf_ada_make=gnatmake
15898 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15899 set dummy $cf_ada_make; ac_word=$2
15900 echo "$as_me:15900: checking for $ac_word" >&5
15901 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15902 if test "${ac_cv_prog_gnat_exists+set}" = set; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   if test -n "$gnat_exists"; then
15906   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
15907 else
15908   ac_save_IFS=$IFS; IFS=$ac_path_separator
15909 ac_dummy="$PATH"
15910 for ac_dir in $ac_dummy; do
15911   IFS=$ac_save_IFS
15912   test -z "$ac_dir" && ac_dir=.
15913   $as_executable_p "$ac_dir/$ac_word" || continue
15914 ac_cv_prog_gnat_exists="yes"
15915 echo "$as_me:15915: found $ac_dir/$ac_word" >&5
15916 break
15917 done
15918
15919   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
15920 fi
15921 fi
15922 gnat_exists=$ac_cv_prog_gnat_exists
15923 if test -n "$gnat_exists"; then
15924   echo "$as_me:15924: result: $gnat_exists" >&5
15925 echo "${ECHO_T}$gnat_exists" >&6
15926 else
15927   echo "$as_me:15927: result: no" >&5
15928 echo "${ECHO_T}no" >&6
15929 fi
15930
15931 if test "$ac_cv_prog_gnat_exists" = no; then
15932    cf_ada_make=
15933 else
15934
15935 echo "$as_me:15935: checking for gnat version" >&5
15936 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15937 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
15938   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15939 echo "$as_me:15939: result: $cf_gnat_version" >&5
15940 echo "${ECHO_T}$cf_gnat_version" >&6
15941
15942 case $cf_gnat_version in
15943   3.1[1-9]*|3.[2-9]*|[4-9].*)
15944     cf_cv_prog_gnat_correct=yes
15945     ;;
15946   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
15947      cf_cv_prog_gnat_correct=no
15948      ;;
15949 esac
15950 case $cf_gnat_version in
15951   3.[1-9]*|[4-9].*)
15952       cf_compile_generics=generics
15953       cf_generic_objects="\${GENOBJS}"
15954       ;;
15955   *)  cf_compile_generics=
15956       cf_generic_objects=
15957       ;;
15958 esac
15959
15960    # Extract the first word of "m4", so it can be a program name with args.
15961 set dummy m4; ac_word=$2
15962 echo "$as_me:15962: checking for $ac_word" >&5
15963 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15964 if test "${ac_cv_prog_M4_exists+set}" = set; then
15965   echo $ECHO_N "(cached) $ECHO_C" >&6
15966 else
15967   if test -n "$M4_exists"; then
15968   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15969 else
15970   ac_save_IFS=$IFS; IFS=$ac_path_separator
15971 ac_dummy="$PATH"
15972 for ac_dir in $ac_dummy; do
15973   IFS=$ac_save_IFS
15974   test -z "$ac_dir" && ac_dir=.
15975   $as_executable_p "$ac_dir/$ac_word" || continue
15976 ac_cv_prog_M4_exists="yes"
15977 echo "$as_me:15977: found $ac_dir/$ac_word" >&5
15978 break
15979 done
15980
15981   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15982 fi
15983 fi
15984 M4_exists=$ac_cv_prog_M4_exists
15985 if test -n "$M4_exists"; then
15986   echo "$as_me:15986: result: $M4_exists" >&5
15987 echo "${ECHO_T}$M4_exists" >&6
15988 else
15989   echo "$as_me:15989: result: no" >&5
15990 echo "${ECHO_T}no" >&6
15991 fi
15992
15993    if test "$ac_cv_prog_M4_exists" = no; then
15994       cf_cv_prog_gnat_correct=no
15995       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15996    fi
15997    if test "$cf_cv_prog_gnat_correct" = yes; then
15998       echo "$as_me:15998: checking if GNAT works" >&5
15999 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16000
16001 rm -f conftest*
16002 cat >>conftest.ads <<CF_EOF
16003 procedure conftest;
16004 CF_EOF
16005 cat >>conftest.adb <<CF_EOF
16006 with Text_IO;
16007 with GNAT.OS_Lib;
16008 procedure conftest is
16009 begin
16010    Text_IO.Put ("Hello World");
16011    Text_IO.New_Line;
16012    GNAT.OS_Lib.OS_Exit (0);
16013 end conftest;
16014 CF_EOF
16015 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16016    if ( ./conftest 1>&5 2>&1 ) ; then
16017       cf_cv_prog_gnat_correct=yes
16018    else
16019       cf_cv_prog_gnat_correct=no
16020    fi
16021 else
16022    cf_cv_prog_gnat_correct=no
16023 fi
16024 rm -f conftest*
16025
16026       echo "$as_me:16026: result: $cf_cv_prog_gnat_correct" >&5
16027 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16028    fi
16029 fi
16030 if test "$cf_cv_prog_gnat_correct" = yes; then
16031    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16032
16033    echo "$as_me:16033: checking if GNAT pragma Unreferenced works" >&5
16034 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16035
16036 rm -f conftest*
16037 cat >>conftest.ads <<CF_EOF
16038 procedure conftest;
16039 CF_EOF
16040 cat >>conftest.adb <<CF_EOF
16041 with Text_IO;
16042 with GNAT.OS_Lib;
16043 procedure conftest is
16044    test : Integer;
16045    pragma Unreferenced (test);
16046 begin
16047    test := 1;
16048    Text_IO.Put ("Hello World");
16049    Text_IO.New_Line;
16050    GNAT.OS_Lib.OS_Exit (0);
16051 end conftest;
16052 CF_EOF
16053 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16054       cf_cv_pragma_unreferenced=yes
16055 else
16056    cf_cv_pragma_unreferenced=no
16057 fi
16058 rm -f conftest*
16059
16060    echo "$as_me:16060: result: $cf_cv_pragma_unreferenced" >&5
16061 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16062
16063    # if the pragma is supported, use it (needed in the Trace code).
16064    if test $cf_cv_pragma_unreferenced = yes ; then
16065       PRAGMA_UNREF=TRUE
16066    else
16067       PRAGMA_UNREF=FALSE
16068    fi
16069
16070 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16071 if test "${with_ada_compiler+set}" = set; then
16072   withval="$with_ada_compiler"
16073   cf_ada_compiler=$withval
16074 else
16075   cf_ada_compiler=gnatmake
16076 fi;
16077
16078    cf_ada_package=terminal_interface
16079
16080 # Check whether --with-ada-include or --without-ada-include was given.
16081 if test "${with_ada_include+set}" = set; then
16082   withval="$with_ada_include"
16083
16084 else
16085   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16086 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16087
16088 if test "x$prefix" != xNONE; then
16089   cf_path_syntax="$prefix"
16090 else
16091   cf_path_syntax="$ac_default_prefix"
16092 fi
16093
16094 case ".$withval" in #(vi
16095 .\$\(*\)*|.\'*\'*) #(vi
16096   ;;
16097 ..|./*|.\\*) #(vi
16098   ;;
16099 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16100   ;;
16101 .\${*prefix}*) #(vi
16102   eval withval="$withval"
16103   case ".$withval" in #(vi
16104   .NONE/*)
16105     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16106     ;;
16107   esac
16108   ;; #(vi
16109 .no|.NONE/*)
16110   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16111   ;;
16112 *)
16113   { { echo "$as_me:16113: error: expected a pathname, not \"$withval\"" >&5
16114 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16115    { (exit 1); exit 1; }; }
16116   ;;
16117 esac
16118
16119 fi
16120 ADA_INCLUDE="$withval"
16121
16122 # Check whether --with-ada-objects or --without-ada-objects was given.
16123 if test "${with_ada_objects+set}" = set; then
16124   withval="$with_ada_objects"
16125
16126 else
16127   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16128 fi; if test -n "$prefix/lib/ada/adalib" ; then
16129
16130 if test "x$prefix" != xNONE; then
16131   cf_path_syntax="$prefix"
16132 else
16133   cf_path_syntax="$ac_default_prefix"
16134 fi
16135
16136 case ".$withval" in #(vi
16137 .\$\(*\)*|.\'*\'*) #(vi
16138   ;;
16139 ..|./*|.\\*) #(vi
16140   ;;
16141 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16142   ;;
16143 .\${*prefix}*) #(vi
16144   eval withval="$withval"
16145   case ".$withval" in #(vi
16146   .NONE/*)
16147     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16148     ;;
16149   esac
16150   ;; #(vi
16151 .no|.NONE/*)
16152   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16153   ;;
16154 *)
16155   { { echo "$as_me:16155: error: expected a pathname, not \"$withval\"" >&5
16156 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16157    { (exit 1); exit 1; }; }
16158   ;;
16159 esac
16160
16161 fi
16162 ADA_OBJECTS="$withval"
16163
16164 fi
16165 fi
16166 else
16167    cf_with_ada=no
16168 fi
16169
16170 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16171 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16172 ###
16173 ### ticlib modules may be a separate library, otherwise contained in termlib.
16174 ### termlib modules may be a separate library, otherwise contained in ncurses.
16175 ###
16176 ### The of "+" or " " between the tokens controls the way the script
16177 ### chooses to split module lists into libraries.
16178 ###
16179 ### (see CF_LIB_RULES).
16180 echo "$as_me:16180: checking for library subsets" >&5
16181 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16182 LIB_SUBSETS=
16183
16184 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16185         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16186         if test "$with_ticlib" != no ; then
16187                 LIB_SUBSETS="${LIB_SUBSETS} "
16188         else
16189                 LIB_SUBSETS="${LIB_SUBSETS}+"
16190         fi
16191 fi
16192
16193 LIB_SUBSETS="${LIB_SUBSETS}termlib"
16194 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16195 if test "$with_termlib" != no ; then
16196         LIB_SUBSETS="${LIB_SUBSETS} "
16197 else
16198         LIB_SUBSETS="${LIB_SUBSETS}+"
16199 fi
16200
16201 LIB_SUBSETS="${LIB_SUBSETS}base"
16202 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16203 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16204
16205 echo "$as_me:16205: result: $LIB_SUBSETS" >&5
16206 echo "${ECHO_T}$LIB_SUBSETS" >&6
16207
16208 ### Construct the list of include-directories to be generated
16209
16210 CPPFLAGS="-I. -I../include $CPPFLAGS"
16211 if test "$srcdir" != "."; then
16212         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16213 fi
16214 if test "$GCC" != yes; then
16215         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16216 elif test "$includedir" != "/usr/include"; then
16217         if test "$includedir" = '${prefix}/include' ; then
16218                 if test $prefix != /usr ; then
16219                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16220                 fi
16221         else
16222                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16223         fi
16224 fi
16225
16226 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16227 if test "$srcdir" != "."; then
16228         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16229 fi
16230 if test "$GCC" != yes; then
16231         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16232 elif test "$includedir" != "/usr/include"; then
16233         if test "$includedir" = '${prefix}/include' ; then
16234                 if test $prefix != /usr ; then
16235                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16236                 fi
16237         else
16238                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16239         fi
16240 fi
16241
16242 ### Build up pieces for makefile rules
16243 echo "$as_me:16243: checking default library suffix" >&5
16244 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16245
16246         case $DFT_LWR_MODEL in
16247         libtool) DFT_ARG_SUFFIX=''   ;;
16248         normal)  DFT_ARG_SUFFIX=''   ;;
16249         debug)   DFT_ARG_SUFFIX='_g' ;;
16250         profile) DFT_ARG_SUFFIX='_p' ;;
16251         shared)  DFT_ARG_SUFFIX=''   ;;
16252         esac
16253         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16254 echo "$as_me:16254: result: $DFT_ARG_SUFFIX" >&5
16255 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16256
16257 echo "$as_me:16257: checking default library-dependency suffix" >&5
16258 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16259
16260         case $DFT_LWR_MODEL in
16261         libtool)
16262                 DFT_LIB_SUFFIX='.la'
16263                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16264                 ;;
16265         normal)
16266                 DFT_LIB_SUFFIX='.a'
16267                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16268                 ;;
16269         debug)
16270                 DFT_LIB_SUFFIX='_g.a'
16271                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16272                 ;;
16273         profile)
16274                 DFT_LIB_SUFFIX='_p.a'
16275                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16276                 ;;
16277         shared)
16278                 case $cf_cv_system_name in
16279                 cygwin*)
16280                         DFT_LIB_SUFFIX='.dll'
16281                         DFT_DEP_SUFFIX='.dll.a'
16282                         ;;
16283                 darwin*)
16284                         DFT_LIB_SUFFIX='.dylib'
16285                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16286                         ;;
16287                 hpux*)
16288                         case $target in
16289                         ia64*)
16290                                 DFT_LIB_SUFFIX='.so'
16291                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16292                                 ;;
16293                         *)
16294                                 DFT_LIB_SUFFIX='.sl'
16295                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16296                                 ;;
16297                         esac
16298                         ;;
16299                 *)      DFT_LIB_SUFFIX='.so'
16300                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16301                         ;;
16302                 esac
16303         esac
16304         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16305         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16306 echo "$as_me:16306: result: $DFT_DEP_SUFFIX" >&5
16307 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16308
16309 echo "$as_me:16309: checking default object directory" >&5
16310 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16311
16312         case $DFT_LWR_MODEL in
16313         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16314         normal)  DFT_OBJ_SUBDIR='objects' ;;
16315         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16316         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16317         shared)
16318                 case $cf_cv_system_name in #(vi
16319                 cygwin) #(vi
16320                         DFT_OBJ_SUBDIR='objects' ;;
16321                 *)
16322                         DFT_OBJ_SUBDIR='obj_s' ;;
16323                 esac
16324         esac
16325 echo "$as_me:16325: result: $DFT_OBJ_SUBDIR" >&5
16326 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16327
16328 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16329 if test "$cf_with_cxx" = yes ; then
16330 echo "$as_me:16330: checking c++ library-dependency suffix" >&5
16331 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16332 if test "$with_libtool" != "no"; then
16333         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16334 else
16335
16336         case normal in
16337         libtool)
16338                 CXX_LIB_SUFFIX='.la'
16339                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16340                 ;;
16341         normal)
16342                 CXX_LIB_SUFFIX='.a'
16343                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16344                 ;;
16345         debug)
16346                 CXX_LIB_SUFFIX='_g.a'
16347                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16348                 ;;
16349         profile)
16350                 CXX_LIB_SUFFIX='_p.a'
16351                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16352                 ;;
16353         shared)
16354                 case $cf_cv_system_name in
16355                 cygwin*)
16356                         CXX_LIB_SUFFIX='.dll'
16357                         CXX_DEP_SUFFIX='.dll.a'
16358                         ;;
16359                 darwin*)
16360                         CXX_LIB_SUFFIX='.dylib'
16361                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16362                         ;;
16363                 hpux*)
16364                         case $target in
16365                         ia64*)
16366                                 CXX_LIB_SUFFIX='.so'
16367                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16368                                 ;;
16369                         *)
16370                                 CXX_LIB_SUFFIX='.sl'
16371                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16372                                 ;;
16373                         esac
16374                         ;;
16375                 *)      CXX_LIB_SUFFIX='.so'
16376                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16377                         ;;
16378                 esac
16379         esac
16380         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16381         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16382 fi
16383 echo "$as_me:16383: result: $CXX_LIB_SUFFIX" >&5
16384 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16385
16386 fi
16387
16388 # do not want -ldl in build except as needed for -lncurses dependency
16389 if test "$with_dlsym" = yes ; then
16390 if test $DFT_LWR_MODEL = shared || \
16391    test $DFT_LWR_MODEL = libtool ; then
16392
16393 # remove dl library from $LIBS
16394 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16395
16396 fi
16397 fi
16398 ### Set up low-level terminfo dependencies for makefiles.
16399
16400 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16401 # do not need libdl
16402 TICS_LIST=
16403 if test "$with_dlsym" = yes ; then
16404
16405 # remove dl library from $SHLIB_LIST
16406 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16407
16408 fi
16409
16410 if test "$with_ticlib" != no ; then
16411
16412         if test "$with_ticlib" != yes ; then
16413                 TICS_NAME=$with_ticlib
16414                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16415                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16416                 TICS_LIB_SUFFIX="${with_ticlib}"
16417         else
16418                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16419                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16420                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16421         fi
16422         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16423 else
16424         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16425 fi
16426
16427 if test "$with_termlib" != no ; then
16428
16429         if test "$with_termlib" != yes ; then
16430                 TINFO_NAME=$with_termlib
16431                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16432                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16433                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16434                 TINFO_LIB_SUFFIX="${with_termlib}"
16435         else
16436                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16437                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16438                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16439                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16440         fi
16441
16442         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16443         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16444         if test "$DFT_LWR_MODEL" = "libtool"; then
16445                 TEST_ARGS="${TEST_DEPS}"
16446                 TEST_ARG2="${TEST_DEP2}"
16447                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16448         else
16449                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16450                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16451                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16452                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16453                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16454         fi
16455 else
16456         # the next lines are needed for linking libtic over libncurses
16457         TINFO_NAME=${LIB_NAME}
16458         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16459         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16460         if test "$with_tic_depends" = yes ; then
16461                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16462         else
16463                 TICS_LIST="$SHLIB_LIST"
16464         fi
16465
16466         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16467 fi
16468
16469 if test "$DFT_LWR_MODEL" = shared ; then
16470         case $cf_cv_system_name in #(vi
16471         cygwin*)
16472                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16473                 TINFO_SUFFIX=.dll
16474                 ;;
16475         esac
16476 fi
16477
16478 if test "$with_dlsym" = yes ; then
16479
16480 # remove dl library from $TICS_LIST
16481 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16482
16483 fi
16484
16485 if test "$DFT_LWR_MODEL" = "libtool"; then
16486     OBJEXT=lo
16487 fi
16488
16489 # needed for Ada95
16490 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16491
16492 case $DFT_LWR_MODEL in
16493 normal|debug|profile)
16494
16495 if test "$GCC" = yes ; then
16496         case $cf_cv_system_name in #(
16497         OS/2*|os2*|aix[45]*)    #( vi
16498                 LDFLAGS_STATIC=
16499                 LDFLAGS_SHARED=
16500                 ;;
16501     *)  #( normally, except when broken
16502         LDFLAGS_STATIC=-static
16503         LDFLAGS_SHARED=-dynamic
16504         ;;
16505     esac
16506 else
16507         case $cf_cv_system_name in #(
16508         aix[45]*)       #( from ld manpage
16509                 LDFLAGS_STATIC=-bstatic
16510                 LDFLAGS_SHARED=-bdynamic
16511                 ;;
16512         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16513                 # We could also use just "archive" and "shared".
16514                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16515                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16516                 ;;
16517         irix*)          #( from ld manpage IRIX64
16518                 LDFLAGS_STATIC=-Bstatic
16519                 LDFLAGS_SHARED=-Bdynamic
16520                 ;;
16521         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16522                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16523                 LDFLAGS_STATIC=-noso
16524                 LDFLAGS_SHARED=-so_archive
16525                 ;;
16526         solaris2*)
16527                 LDFLAGS_STATIC=-Bstatic
16528                 LDFLAGS_SHARED=-Bdynamic
16529                 ;;
16530         esac
16531 fi
16532
16533         ;;
16534 esac
16535
16536 echo "$as_me:16536: checking where we will install curses.h" >&5
16537 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16538 test "$with_overwrite" = no && \
16539 test "x$includedir" = 'x${prefix}/include' && \
16540         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16541 echo "$as_me:16541: result: $includedir" >&5
16542 echo "${ECHO_T}$includedir" >&6
16543
16544 ### Resolve a conflict between normal and wide-curses by forcing applications
16545 ### that will need libutf8 to add it to their configure script.
16546 if test "$with_overwrite" != no ; then
16547 if test "$NCURSES_LIBUTF8" = 1 ; then
16548         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16549         { echo "$as_me:16549: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16550 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16551 fi
16552 fi
16553
16554 # used to separate tack out of the tree
16555 NCURSES_TREE=
16556
16557 ### predefined stuff for the test programs
16558 cat >>confdefs.h <<\EOF
16559 #define HAVE_SLK_COLOR 1
16560 EOF
16561
16562 ### Construct the list of subdirectories for which we'll customize makefiles
16563 ### with the appropriate compile-rules.
16564
16565 echo "$as_me:16565: checking for src modules" >&5
16566 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16567
16568 # dependencies and linker-arguments for test-programs
16569 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16570 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16571 if test "$DFT_LWR_MODEL" = "libtool"; then
16572         TEST_ARGS="${TEST_DEPS}"
16573         TEST_ARG2="${TEST_DEP2}"
16574 else
16575         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16576         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16577 fi
16578
16579 cf_cv_src_modules=
16580 for cf_dir in $modules_to_build
16581 do
16582         if test -f $srcdir/$cf_dir/modules; then
16583
16584                 # We may/may not have tack in the distribution, though the
16585                 # makefile is.
16586                 if test $cf_dir = tack ; then
16587                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16588                                 continue
16589                         fi
16590                 fi
16591
16592                 if test -z "$cf_cv_src_modules"; then
16593                         cf_cv_src_modules=$cf_dir
16594                 else
16595                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16596                 fi
16597
16598                 # Make the ncurses_cfg.h file record the library interface files as
16599                 # well.  These are header files that are the same name as their
16600                 # directory.  Ncurses is the only library that does not follow
16601                 # that pattern.
16602                 if test $cf_dir = tack ; then
16603                         continue
16604                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16605
16606 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16607
16608                         cat >>confdefs.h <<EOF
16609 #define HAVE_${cf_have_include}_H 1
16610 EOF
16611
16612                         cat >>confdefs.h <<EOF
16613 #define HAVE_LIB${cf_have_include} 1
16614 EOF
16615
16616                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16617                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16618                         if test "$DFT_LWR_MODEL" = "libtool"; then
16619                                 TEST_ARGS="${TEST_DEPS}"
16620                                 TEST_ARG2="${TEST_DEP2}"
16621                         else
16622                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16623                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16624                         fi
16625                 fi
16626         fi
16627 done
16628 echo "$as_me:16628: result: $cf_cv_src_modules" >&5
16629 echo "${ECHO_T}$cf_cv_src_modules" >&6
16630
16631 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16632 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16633
16634 SRC_SUBDIRS="man include"
16635 for cf_dir in $cf_cv_src_modules
16636 do
16637         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16638 done
16639 SRC_SUBDIRS="$SRC_SUBDIRS test"
16640 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16641 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16642
16643 ADA_SUBDIRS=
16644 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16645    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16646    ADA_SUBDIRS="gen src samples"
16647 fi
16648
16649 SUB_MAKEFILES=
16650 for cf_dir in $SRC_SUBDIRS
16651 do
16652         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16653 done
16654
16655 if test -n "$ADA_SUBDIRS"; then
16656    for cf_dir in $ADA_SUBDIRS
16657    do
16658       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
16659    done
16660
16661 fi
16662
16663 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
16664    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
16665 fi
16666
16667 DIRS_TO_MAKE="lib"
16668 for cf_item in $cf_list_models
16669 do
16670
16671         case $cf_item in
16672         libtool) cf_subdir='obj_lo'  ;;
16673         normal)  cf_subdir='objects' ;;
16674         debug)   cf_subdir='obj_g' ;;
16675         profile) cf_subdir='obj_p' ;;
16676         shared)
16677                 case $cf_cv_system_name in #(vi
16678                 cygwin) #(vi
16679                         cf_subdir='objects' ;;
16680                 *)
16681                         cf_subdir='obj_s' ;;
16682                 esac
16683         esac
16684
16685         for cf_item2 in $DIRS_TO_MAKE
16686         do
16687                 test $cf_item2 = $cf_subdir && break
16688         done
16689         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
16690 done
16691 for cf_dir in $DIRS_TO_MAKE
16692 do
16693         test ! -d $cf_dir && mkdir $cf_dir
16694 done
16695
16696 cat >>confdefs.h <<EOF
16697 #define NCURSES_PATHSEP '$PATHSEP'
16698 EOF
16699
16700 cat >>confdefs.h <<EOF
16701 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
16702 EOF
16703
16704 ### Now that we're done running tests, add the compiler-warnings, if any
16705
16706 cf_fix_cppflags=no
16707 cf_new_cflags=
16708 cf_new_cppflags=
16709 cf_new_extra_cppflags=
16710
16711 for cf_add_cflags in $EXTRA_CFLAGS
16712 do
16713 case $cf_fix_cppflags in
16714 no)
16715         case $cf_add_cflags in #(vi
16716         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16717                 case $cf_add_cflags in
16718                 -D*)
16719                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16720
16721                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16722                         && test -z "${cf_tst_cflags}" \
16723                         && cf_fix_cppflags=yes
16724
16725                         if test $cf_fix_cppflags = yes ; then
16726                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16727                                 continue
16728                         elif test "${cf_tst_cflags}" = "\"'" ; then
16729                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16730                                 continue
16731                         fi
16732                         ;;
16733                 esac
16734                 case "$CPPFLAGS" in
16735                 *$cf_add_cflags) #(vi
16736                         ;;
16737                 *) #(vi
16738                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16739                         ;;
16740                 esac
16741                 ;;
16742         *)
16743                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16744                 ;;
16745         esac
16746         ;;
16747 yes)
16748         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16749
16750         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16751
16752         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16753         && test -z "${cf_tst_cflags}" \
16754         && cf_fix_cppflags=no
16755         ;;
16756 esac
16757 done
16758
16759 if test -n "$cf_new_cflags" ; then
16760
16761         CFLAGS="$CFLAGS $cf_new_cflags"
16762 fi
16763
16764 if test -n "$cf_new_cppflags" ; then
16765
16766         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
16767 fi
16768
16769 if test -n "$cf_new_extra_cppflags" ; then
16770
16771         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16772 fi
16773
16774 ### If we're building with rpath, try to link non-standard libs that way too.
16775 if test "$DFT_LWR_MODEL" = "shared"; then
16776
16777 echo "$as_me:16777: checking for updated LDFLAGS" >&5
16778 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16779 if test -n "$LDFLAGS" ; then
16780 echo "$as_me:16780: result: maybe" >&5
16781 echo "${ECHO_T}maybe" >&6
16782 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16783
16784 echo "${as_me-configure}:16784: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16785
16786 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16787
16788 echo "${as_me-configure}:16788: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16789
16790 case "$EXTRA_LDFLAGS" in #(vi
16791 -Wl,-rpath,*) #(vi
16792         cf_rpath_hack="-Wl,-rpath,"
16793         ;;
16794 -R\ *)
16795         cf_rpath_hack="-R "
16796         ;;
16797 -R*)
16798         cf_rpath_hack="-R"
16799         ;;
16800 *)
16801         cf_rpath_hack=
16802         ;;
16803 esac
16804 if test -n "$cf_rpath_hack" ; then
16805         cf_rpath_dst=
16806         for cf_rpath_src in $LDFLAGS
16807         do
16808                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
16809
16810 echo "${as_me-configure}:16810: testing Filtering $cf_rpath_src ..." 1>&5
16811
16812                 case $cf_rpath_src in #(vi
16813                 -L*) #(vi
16814                         if test "$cf_rpath_hack" = "-R " ; then
16815                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
16816                         else
16817                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
16818                         fi
16819                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
16820
16821 echo "${as_me-configure}:16821: testing ...Filter $cf_rpath_tmp ..." 1>&5
16822
16823                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16824                         ;;
16825                 esac
16826                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16827         done
16828         LDFLAGS=$cf_rpath_dst
16829         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16830
16831 echo "${as_me-configure}:16831: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16832
16833         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16834
16835 echo "${as_me-configure}:16835: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16836
16837 fi
16838 else
16839 echo "$as_me:16839: result: no" >&5
16840 echo "${ECHO_T}no" >&6
16841 fi
16842
16843 fi
16844
16845 ### Define substitutions for header files to avoid name-pollution
16846
16847 if test "$cf_cv_have_tcgetattr" = yes ; then
16848         HAVE_TCGETATTR=1
16849 else
16850         HAVE_TCGETATTR=0
16851 fi
16852
16853 if test "$ac_cv_header_termio_h" = yes ; then
16854         HAVE_TERMIO_H=1
16855 else
16856         HAVE_TERMIO_H=0
16857 fi
16858
16859 if test "$ac_cv_header_termios_h" = yes ; then
16860         HAVE_TERMIOS_H=1
16861 else
16862         HAVE_TERMIOS_H=0
16863 fi
16864
16865 ################################################################################
16866 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
16867 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
16868 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
16869 ac_config_commands="$ac_config_commands default"
16870 cat >confcache <<\_ACEOF
16871 # This file is a shell script that caches the results of configure
16872 # tests run on this system so they can be shared between configure
16873 # scripts and configure runs, see configure's option --config-cache.
16874 # It is not useful on other systems.  If it contains results you don't
16875 # want to keep, you may remove or edit it.
16876 #
16877 # config.status only pays attention to the cache file if you give it
16878 # the --recheck option to rerun configure.
16879 #
16880 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16881 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16882 # following values.
16883
16884 _ACEOF
16885
16886 # The following way of writing the cache mishandles newlines in values,
16887 # but we know of no workaround that is simple, portable, and efficient.
16888 # So, don't put newlines in cache variables' values.
16889 # Ultrix sh set writes to stderr and can't be redirected directly,
16890 # and sets the high bit in the cache file unless we assign to the vars.
16891 {
16892   (set) 2>&1 |
16893     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16894     *ac_space=\ *)
16895       # `set' does not quote correctly, so add quotes (double-quote
16896       # substitution turns \\\\ into \\, and sed turns \\ into \).
16897       sed -n \
16898         "s/'/'\\\\''/g;
16899           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16900       ;;
16901     *)
16902       # `set' quotes correctly as required by POSIX, so do not add quotes.
16903       sed -n \
16904         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16905       ;;
16906     esac;
16907 } |
16908   sed '
16909      t clear
16910      : clear
16911      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16912      t end
16913      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16914      : end' >>confcache
16915 if cmp -s $cache_file confcache; then :; else
16916   if test -w $cache_file; then
16917     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16918     cat confcache >$cache_file
16919   else
16920     echo "not updating unwritable cache $cache_file"
16921   fi
16922 fi
16923 rm -f confcache
16924
16925 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16926 # Let make expand exec_prefix.
16927 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16928
16929 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16930 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16931 # trailing colons and then remove the whole line if VPATH becomes empty
16932 # (actually we leave an empty line to preserve line numbers).
16933 if test "x$srcdir" = x.; then
16934   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16935 s/:*\$(srcdir):*/:/;
16936 s/:*\${srcdir}:*/:/;
16937 s/:*@srcdir@:*/:/;
16938 s/^\([^=]*=[    ]*\):*/\1/;
16939 s/:*$//;
16940 s/^[^=]*=[      ]*$//;
16941 }'
16942 fi
16943
16944 DEFS=-DHAVE_CONFIG_H
16945
16946 : ${CONFIG_STATUS=./config.status}
16947 ac_clean_files_save=$ac_clean_files
16948 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16949 { echo "$as_me:16949: creating $CONFIG_STATUS" >&5
16950 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16951 cat >$CONFIG_STATUS <<_ACEOF
16952 #! $SHELL
16953 # Generated automatically by configure.
16954 # Run this file to recreate the current configuration.
16955 # Compiler output produced by configure, useful for debugging
16956 # configure, is in config.log if it exists.
16957
16958 debug=false
16959 SHELL=\${CONFIG_SHELL-$SHELL}
16960 ac_cs_invocation="\$0 \$@"
16961
16962 _ACEOF
16963
16964 cat >>$CONFIG_STATUS <<\_ACEOF
16965 # Be Bourne compatible
16966 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16967   emulate sh
16968   NULLCMD=:
16969 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16970   set -o posix
16971 fi
16972
16973 # Name of the executable.
16974 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16975
16976 if expr a : '\(a\)' >/dev/null 2>&1; then
16977   as_expr=expr
16978 else
16979   as_expr=false
16980 fi
16981
16982 rm -f conf$$ conf$$.exe conf$$.file
16983 echo >conf$$.file
16984 if ln -s conf$$.file conf$$ 2>/dev/null; then
16985   # We could just check for DJGPP; but this test a) works b) is more generic
16986   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16987   if test -f conf$$.exe; then
16988     # Don't use ln at all; we don't have any links
16989     as_ln_s='cp -p'
16990   else
16991     as_ln_s='ln -s'
16992   fi
16993 elif ln conf$$.file conf$$ 2>/dev/null; then
16994   as_ln_s=ln
16995 else
16996   as_ln_s='cp -p'
16997 fi
16998 rm -f conf$$ conf$$.exe conf$$.file
16999
17000 as_executable_p="test -f"
17001
17002 # Support unset when possible.
17003 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17004   as_unset=unset
17005 else
17006   as_unset=false
17007 fi
17008
17009 # NLS nuisances.
17010 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17011 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17012 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17013 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17014 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17015 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17016 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17017 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17018
17019 # IFS
17020 # We need space, tab and new line, in precisely that order.
17021 as_nl='
17022 '
17023 IFS="   $as_nl"
17024
17025 # CDPATH.
17026 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17027
17028 exec 6>&1
17029
17030 _ACEOF
17031
17032 # Files that config.status was made for.
17033 if test -n "$ac_config_files"; then
17034   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17035 fi
17036
17037 if test -n "$ac_config_headers"; then
17038   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17039 fi
17040
17041 if test -n "$ac_config_links"; then
17042   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17043 fi
17044
17045 if test -n "$ac_config_commands"; then
17046   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17047 fi
17048
17049 cat >>$CONFIG_STATUS <<\EOF
17050
17051 ac_cs_usage="\
17052 \`$as_me' instantiates files from templates according to the
17053 current configuration.
17054
17055 Usage: $0 [OPTIONS] [FILE]...
17056
17057   -h, --help       print this help, then exit
17058   -V, --version    print version number, then exit
17059   -d, --debug      don't remove temporary files
17060       --recheck    update $as_me by reconfiguring in the same conditions
17061   --file=FILE[:TEMPLATE]
17062                    instantiate the configuration file FILE
17063   --header=FILE[:TEMPLATE]
17064                    instantiate the configuration header FILE
17065
17066 Configuration files:
17067 $config_files
17068
17069 Configuration headers:
17070 $config_headers
17071
17072 Configuration commands:
17073 $config_commands
17074
17075 Report bugs to <bug-autoconf@gnu.org>."
17076 EOF
17077
17078 cat >>$CONFIG_STATUS <<EOF
17079 ac_cs_version="\\
17080 config.status
17081 configured by $0, generated by GNU Autoconf 2.52.20080325,
17082   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17083
17084 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17085 Free Software Foundation, Inc.
17086 This config.status script is free software; the Free Software Foundation
17087 gives unlimited permission to copy, distribute and modify it."
17088 srcdir=$srcdir
17089 INSTALL="$INSTALL"
17090 EOF
17091
17092 cat >>$CONFIG_STATUS <<\EOF
17093 # If no file are specified by the user, then we need to provide default
17094 # value.  By we need to know if files were specified by the user.
17095 ac_need_defaults=:
17096 while test $# != 0
17097 do
17098   case $1 in
17099   --*=*)
17100     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17101     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17102     shift
17103     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17104     shift
17105     ;;
17106   -*);;
17107   *) # This is not an option, so the user has probably given explicit
17108      # arguments.
17109      ac_need_defaults=false;;
17110   esac
17111
17112   case $1 in
17113   # Handling of the options.
17114 EOF
17115 cat >>$CONFIG_STATUS <<EOF
17116   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17117     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17118     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17119 EOF
17120 cat >>$CONFIG_STATUS <<\EOF
17121   --version | --vers* | -V )
17122     echo "$ac_cs_version"; exit 0 ;;
17123   --he | --h)
17124     # Conflict between --help and --header
17125     { { echo "$as_me:17125: error: ambiguous option: $1
17126 Try \`$0 --help' for more information." >&5
17127 echo "$as_me: error: ambiguous option: $1
17128 Try \`$0 --help' for more information." >&2;}
17129    { (exit 1); exit 1; }; };;
17130   --help | --hel | -h )
17131     echo "$ac_cs_usage"; exit 0 ;;
17132   --debug | --d* | -d )
17133     debug=: ;;
17134   --file | --fil | --fi | --f )
17135     shift
17136     CONFIG_FILES="$CONFIG_FILES $1"
17137     ac_need_defaults=false;;
17138   --header | --heade | --head | --hea )
17139     shift
17140     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17141     ac_need_defaults=false;;
17142
17143   # This is an error.
17144   -*) { { echo "$as_me:17144: error: unrecognized option: $1
17145 Try \`$0 --help' for more information." >&5
17146 echo "$as_me: error: unrecognized option: $1
17147 Try \`$0 --help' for more information." >&2;}
17148    { (exit 1); exit 1; }; } ;;
17149
17150   *) ac_config_targets="$ac_config_targets $1" ;;
17151
17152   esac
17153   shift
17154 done
17155
17156 exec 5>>config.log
17157 cat >&5 << _ACEOF
17158
17159 ## ----------------------- ##
17160 ## Running config.status.  ##
17161 ## ----------------------- ##
17162
17163 This file was extended by $as_me 2.52.20080325, executed with
17164   CONFIG_FILES    = $CONFIG_FILES
17165   CONFIG_HEADERS  = $CONFIG_HEADERS
17166   CONFIG_LINKS    = $CONFIG_LINKS
17167   CONFIG_COMMANDS = $CONFIG_COMMANDS
17168   > $ac_cs_invocation
17169 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17170
17171 _ACEOF
17172 EOF
17173
17174 cat >>$CONFIG_STATUS <<EOF
17175 #
17176 # INIT-COMMANDS section.
17177 #
17178
17179 ### Special initialization commands, used to pass information from the
17180 ### configuration-run into config.status
17181
17182 AWK="$AWK"
17183 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17184 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17185 ECHO_LINK="$ECHO_LINK"
17186 LDCONFIG="$LDCONFIG"
17187 LIB_NAME="$LIB_NAME"
17188 LIB_SUBSETS="$LIB_SUBSETS"
17189 LIB_SUFFIX="$LIB_SUFFIX"
17190 LIB_TRACING="$LIB_TRACING"
17191 MAKE_TERMINFO="$MAKE_TERMINFO"
17192 NCURSES_MAJOR="$NCURSES_MAJOR"
17193 NCURSES_MINOR="$NCURSES_MINOR"
17194 NCURSES_OSPEED="$NCURSES_OSPEED"
17195 NCURSES_PATCH="$NCURSES_PATCH"
17196 SRC_SUBDIRS="$SRC_SUBDIRS"
17197 TERMINFO="$TERMINFO"
17198 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17199 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17200 TINFO_NAME="$TINFO_NAME"
17201 TINFO_SUFFIX="$TINFO_SUFFIX"
17202 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17203 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17204 TICS_NAME="$TICS_NAME"
17205 WITH_CURSES_H="$with_curses_h"
17206 WITH_ECHO="$with_echo"
17207 WITH_OVERWRITE="$with_overwrite"
17208 cf_LIST_MODELS="$cf_list_models"
17209 cf_cv_abi_version="$cf_cv_abi_version"
17210 cf_cv_do_relink="$cf_cv_do_relink"
17211 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17212 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17213 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17214 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17215 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17216 cf_cv_rel_version="$cf_cv_rel_version"
17217 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17218 cf_cv_shared_soname='$cf_cv_shared_soname'
17219 cf_cv_shlib_version="$cf_cv_shlib_version"
17220 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17221 cf_cv_system_name="$cf_cv_system_name"
17222 cf_with_cxx_binding="$cf_with_cxx_binding"
17223 cf_with_manpages="$cf_with_manpages"
17224 host="$host"
17225 target="$target"
17226
17227 EOF
17228
17229 cat >>$CONFIG_STATUS <<\EOF
17230 for ac_config_target in $ac_config_targets
17231 do
17232   case "$ac_config_target" in
17233   # Handling of arguments.
17234   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17235   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17236   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17237   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17238   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17239   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17240   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17241   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17242   *) { { echo "$as_me:17242: error: invalid argument: $ac_config_target" >&5
17243 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17244    { (exit 1); exit 1; }; };;
17245   esac
17246 done
17247
17248 # If the user did not use the arguments to specify the items to instantiate,
17249 # then the envvar interface is used.  Set only those that are not.
17250 # We use the long form for the default assignment because of an extremely
17251 # bizarre bug on SunOS 4.1.3.
17252 if $ac_need_defaults; then
17253   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17254   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17255   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17256 fi
17257
17258 # Create a temporary directory, and hook for its removal unless debugging.
17259 $debug ||
17260 {
17261   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17262   trap '{ (exit 1); exit 1; }' 1 2 13 15
17263 }
17264
17265 # Create a (secure) tmp directory for tmp files.
17266 : ${TMPDIR=/tmp}
17267 {
17268   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17269   test -n "$tmp" && test -d "$tmp"
17270 }  ||
17271 {
17272   tmp=$TMPDIR/cs$$-$RANDOM
17273   (umask 077 && mkdir $tmp)
17274 } ||
17275 {
17276    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17277    { (exit 1); exit 1; }
17278 }
17279
17280 EOF
17281
17282 cat >>$CONFIG_STATUS <<EOF
17283
17284 #
17285 # CONFIG_FILES section.
17286 #
17287
17288 # No need to generate the scripts if there are no CONFIG_FILES.
17289 # This happens for instance when ./config.status config.h
17290 if test -n "\$CONFIG_FILES"; then
17291   # Protect against being on the right side of a sed subst in config.status.
17292   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17293    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17294 s,@SHELL@,$SHELL,;t t
17295 s,@exec_prefix@,$exec_prefix,;t t
17296 s,@prefix@,$prefix,;t t
17297 s,@program_transform_name@,$program_transform_name,;t t
17298 s,@bindir@,$bindir,;t t
17299 s,@sbindir@,$sbindir,;t t
17300 s,@libexecdir@,$libexecdir,;t t
17301 s,@datadir@,$datadir,;t t
17302 s,@sysconfdir@,$sysconfdir,;t t
17303 s,@sharedstatedir@,$sharedstatedir,;t t
17304 s,@localstatedir@,$localstatedir,;t t
17305 s,@libdir@,$libdir,;t t
17306 s,@includedir@,$includedir,;t t
17307 s,@oldincludedir@,$oldincludedir,;t t
17308 s,@infodir@,$infodir,;t t
17309 s,@mandir@,$mandir,;t t
17310 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17311 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17312 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17313 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17314 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17315 s,@build_alias@,$build_alias,;t t
17316 s,@host_alias@,$host_alias,;t t
17317 s,@target_alias@,$target_alias,;t t
17318 s,@ECHO_C@,$ECHO_C,;t t
17319 s,@ECHO_N@,$ECHO_N,;t t
17320 s,@ECHO_T@,$ECHO_T,;t t
17321 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17322 s,@DEFS@,$DEFS,;t t
17323 s,@LIBS@,$LIBS,;t t
17324 s,@top_builddir@,$top_builddir,;t t
17325 s,@EGREP@,$EGREP,;t t
17326 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17327 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17328 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17329 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17330 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17331 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17332 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17333 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17334 s,@build@,$build,;t t
17335 s,@build_cpu@,$build_cpu,;t t
17336 s,@build_vendor@,$build_vendor,;t t
17337 s,@build_os@,$build_os,;t t
17338 s,@host@,$host,;t t
17339 s,@host_cpu@,$host_cpu,;t t
17340 s,@host_vendor@,$host_vendor,;t t
17341 s,@host_os@,$host_os,;t t
17342 s,@target@,$target,;t t
17343 s,@target_cpu@,$target_cpu,;t t
17344 s,@target_vendor@,$target_vendor,;t t
17345 s,@target_os@,$target_os,;t t
17346 s,@CC@,$CC,;t t
17347 s,@CFLAGS@,$CFLAGS,;t t
17348 s,@LDFLAGS@,$LDFLAGS,;t t
17349 s,@CPPFLAGS@,$CPPFLAGS,;t t
17350 s,@ac_ct_CC@,$ac_ct_CC,;t t
17351 s,@EXEEXT@,$EXEEXT,;t t
17352 s,@OBJEXT@,$OBJEXT,;t t
17353 s,@CPP@,$CPP,;t t
17354 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17355 s,@PROG_EXT@,$PROG_EXT,;t t
17356 s,@LDCONFIG@,$LDCONFIG,;t t
17357 s,@CXX@,$CXX,;t t
17358 s,@CXXFLAGS@,$CXXFLAGS,;t t
17359 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17360 s,@AWK@,$AWK,;t t
17361 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17362 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17363 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17364 s,@LINT@,$LINT,;t t
17365 s,@LINT_OPTS@,$LINT_OPTS,;t t
17366 s,@LN_S@,$LN_S,;t t
17367 s,@SET_MAKE@,$SET_MAKE,;t t
17368 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17369 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17370 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17371 s,@RANLIB@,$RANLIB,;t t
17372 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17373 s,@LD@,$LD,;t t
17374 s,@ac_ct_LD@,$ac_ct_LD,;t t
17375 s,@AR@,$AR,;t t
17376 s,@ac_ct_AR@,$ac_ct_AR,;t t
17377 s,@AR_OPTS@,$AR_OPTS,;t t
17378 s,@DESTDIR@,$DESTDIR,;t t
17379 s,@BUILD_CC@,$BUILD_CC,;t t
17380 s,@BUILD_CPP@,$BUILD_CPP,;t t
17381 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17382 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17383 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17384 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17385 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17386 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17387 s,@cf_list_models@,$cf_list_models,;t t
17388 s,@LIBTOOL@,$LIBTOOL,;t t
17389 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17390 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17391 s,@LIB_CREATE@,$LIB_CREATE,;t t
17392 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17393 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17394 s,@LIB_PREP@,$LIB_PREP,;t t
17395 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17396 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17397 s,@LIB_LINK@,$LIB_LINK,;t t
17398 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17399 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17400 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17401 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17402 s,@TICS_NAME@,$TICS_NAME,;t t
17403 s,@TINFO_NAME@,$TINFO_NAME,;t t
17404 s,@LIB_NAME@,$LIB_NAME,;t t
17405 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17406 s,@CC_G_OPT@,$CC_G_OPT,;t t
17407 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17408 s,@LD_MODEL@,$LD_MODEL,;t t
17409 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17410 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17411 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17412 s,@LINK_PROGS@,$LINK_PROGS,;t t
17413 s,@LINK_TESTS@,$LINK_TESTS,;t t
17414 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17415 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17416 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17417 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17418 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17419 s,@PATHSEP@,$PATHSEP,;t t
17420 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17421 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17422 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17423 s,@TERMINFO@,$TERMINFO,;t t
17424 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17425 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17426 s,@TERMPATH@,$TERMPATH,;t t
17427 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17428 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17429 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17430 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17431 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17432 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17433 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17434 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17435 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17436 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17437 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17438 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17439 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17440 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17441 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17442 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17443 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17444 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17445 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17446 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17447 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17448 s,@PTHREAD@,$PTHREAD,;t t
17449 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17450 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17451 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17452 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17453 s,@ECHO_LINK@,$ECHO_LINK,;t t
17454 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17455 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17456 s,@ADA_TRACE@,$ADA_TRACE,;t t
17457 s,@MATH_LIB@,$MATH_LIB,;t t
17458 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17459 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17460 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17461 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17462 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17463 s,@TEST_LIBS@,$TEST_LIBS,;t t
17464 s,@CXXCPP@,$CXXCPP,;t t
17465 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17466 s,@CXX_AR@,$CXX_AR,;t t
17467 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
17468 s,@CXXLIBS@,$CXXLIBS,;t t
17469 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17470 s,@gnat_exists@,$gnat_exists,;t t
17471 s,@M4_exists@,$M4_exists,;t t
17472 s,@cf_ada_make@,$cf_ada_make,;t t
17473 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17474 s,@cf_ada_package@,$cf_ada_package,;t t
17475 s,@ADAFLAGS@,$ADAFLAGS,;t t
17476 s,@cf_compile_generics@,$cf_compile_generics,;t t
17477 s,@cf_generic_objects@,$cf_generic_objects,;t t
17478 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17479 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17480 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17481 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17482 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17483 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17484 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17485 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17486 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17487 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17488 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17489 s,@TICS_ARGS@,$TICS_ARGS,;t t
17490 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17491 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17492 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17493 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17494 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17495 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17496 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17497 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17498 s,@TICS_LIST@,$TICS_LIST,;t t
17499 s,@TINFO_LIST@,$TINFO_LIST,;t t
17500 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17501 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17502 s,@TEST_ARGS@,$TEST_ARGS,;t t
17503 s,@TEST_DEPS@,$TEST_DEPS,;t t
17504 s,@TEST_ARG2@,$TEST_ARG2,;t t
17505 s,@TEST_DEP2@,$TEST_DEP2,;t t
17506 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17507 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17508 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17509 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17510 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17511 CEOF
17512
17513 EOF
17514
17515   cat >>$CONFIG_STATUS <<\EOF
17516   # Split the substitutions into bite-sized pieces for seds with
17517   # small command number limits, like on Digital OSF/1 and HP-UX.
17518   ac_max_sed_lines=48
17519   ac_sed_frag=1 # Number of current file.
17520   ac_beg=1 # First line for current file.
17521   ac_end=$ac_max_sed_lines # Line after last line for current file.
17522   ac_more_lines=:
17523   ac_sed_cmds=
17524   while $ac_more_lines; do
17525     if test $ac_beg -gt 1; then
17526       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17527     else
17528       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17529     fi
17530     if test ! -s $tmp/subs.frag; then
17531       ac_more_lines=false
17532     else
17533       # The purpose of the label and of the branching condition is to
17534       # speed up the sed processing (if there are no `@' at all, there
17535       # is no need to browse any of the substitutions).
17536       # These are the two extra sed commands mentioned above.
17537       (echo ':t
17538   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17539       if test -z "$ac_sed_cmds"; then
17540         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17541       else
17542         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17543       fi
17544       ac_sed_frag=`expr $ac_sed_frag + 1`
17545       ac_beg=$ac_end
17546       ac_end=`expr $ac_end + $ac_max_sed_lines`
17547     fi
17548   done
17549   if test -z "$ac_sed_cmds"; then
17550     ac_sed_cmds=cat
17551   fi
17552 fi # test -n "$CONFIG_FILES"
17553
17554 EOF
17555 cat >>$CONFIG_STATUS <<\EOF
17556 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17557   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17558   case $ac_file in
17559   - | *:- | *:-:* ) # input from stdin
17560         cat >$tmp/stdin
17561         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17562         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17563   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17564         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17565   * )   ac_file_in=$ac_file.in ;;
17566   esac
17567
17568   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17569   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17570          X"$ac_file" : 'X\(//\)[^/]' \| \
17571          X"$ac_file" : 'X\(//\)$' \| \
17572          X"$ac_file" : 'X\(/\)' \| \
17573          .     : '\(.\)' 2>/dev/null ||
17574 echo X"$ac_file" |
17575     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17576           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17577           /^X\(\/\/\)$/{ s//\1/; q; }
17578           /^X\(\/\).*/{ s//\1/; q; }
17579           s/.*/./; q'`
17580   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17581     { case "$ac_dir" in
17582   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17583   *)                      as_incr_dir=.;;
17584 esac
17585 as_dummy="$ac_dir"
17586 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17587   case $as_mkdir_dir in
17588     # Skip DOS drivespec
17589     ?:) as_incr_dir=$as_mkdir_dir ;;
17590     *)
17591       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17592       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17593     ;;
17594   esac
17595 done; }
17596
17597     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17598     # A "../" for each directory in $ac_dir_suffix.
17599     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17600   else
17601     ac_dir_suffix= ac_dots=
17602   fi
17603
17604   case $srcdir in
17605   .)  ac_srcdir=.
17606       if test -z "$ac_dots"; then
17607          ac_top_srcdir=.
17608       else
17609          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17610       fi ;;
17611   [\\/]* | ?:[\\/]* )
17612       ac_srcdir=$srcdir$ac_dir_suffix;
17613       ac_top_srcdir=$srcdir ;;
17614   *) # Relative path.
17615     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17616     ac_top_srcdir=$ac_dots$srcdir ;;
17617   esac
17618
17619   case $INSTALL in
17620   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17621   *) ac_INSTALL=$ac_dots$INSTALL ;;
17622   esac
17623
17624   if test x"$ac_file" != x-; then
17625     { echo "$as_me:17625: creating $ac_file" >&5
17626 echo "$as_me: creating $ac_file" >&6;}
17627     rm -f "$ac_file"
17628   fi
17629   # Let's still pretend it is `configure' which instantiates (i.e., don't
17630   # use $as_me), people would be surprised to read:
17631   #    /* config.h.  Generated automatically by config.status.  */
17632   configure_input="Generated automatically from `echo $ac_file_in |
17633                                                  sed 's,.*/,,'` by configure."
17634
17635   # First look for the input files in the build tree, otherwise in the
17636   # src tree.
17637   ac_file_inputs=`IFS=:
17638     for f in $ac_file_in; do
17639       case $f in
17640       -) echo $tmp/stdin ;;
17641       [\\/$]*)
17642          # Absolute (can't be DOS-style, as IFS=:)
17643          test -f "$f" || { { echo "$as_me:17643: error: cannot find input file: $f" >&5
17644 echo "$as_me: error: cannot find input file: $f" >&2;}
17645    { (exit 1); exit 1; }; }
17646          echo $f;;
17647       *) # Relative
17648          if test -f "$f"; then
17649            # Build tree
17650            echo $f
17651          elif test -f "$srcdir/$f"; then
17652            # Source tree
17653            echo $srcdir/$f
17654          else
17655            # /dev/null tree
17656            { { echo "$as_me:17656: error: cannot find input file: $f" >&5
17657 echo "$as_me: error: cannot find input file: $f" >&2;}
17658    { (exit 1); exit 1; }; }
17659          fi;;
17660       esac
17661     done` || { (exit 1); exit 1; }
17662 EOF
17663 cat >>$CONFIG_STATUS <<EOF
17664   sed "$ac_vpsub
17665 $extrasub
17666 EOF
17667 cat >>$CONFIG_STATUS <<\EOF
17668 :t
17669 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17670 s,@configure_input@,$configure_input,;t t
17671 s,@srcdir@,$ac_srcdir,;t t
17672 s,@top_srcdir@,$ac_top_srcdir,;t t
17673 s,@INSTALL@,$ac_INSTALL,;t t
17674 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17675   rm -f $tmp/stdin
17676   if test x"$ac_file" != x-; then
17677     mv $tmp/out $ac_file
17678   else
17679     cat $tmp/out
17680     rm -f $tmp/out
17681   fi
17682
17683 done
17684 EOF
17685 cat >>$CONFIG_STATUS <<\EOF
17686
17687 #
17688 # CONFIG_HEADER section.
17689 #
17690
17691 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17692 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17693 #
17694 # ac_d sets the value in "#define NAME VALUE" lines.
17695 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17696 ac_dB='[        ].*$,\1#\2'
17697 ac_dC=' '
17698 ac_dD=',;t'
17699 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17700 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17701 ac_iB='\([      ]\),\1#\2define\3'
17702 ac_iC=' '
17703 ac_iD='\4,;t'
17704 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17705 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17706 ac_uB='$,\1#\2define\3'
17707 ac_uC=' '
17708 ac_uD=',;t'
17709
17710 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17711   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17712   case $ac_file in
17713   - | *:- | *:-:* ) # input from stdin
17714         cat >$tmp/stdin
17715         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17716         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17717   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17718         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17719   * )   ac_file_in=$ac_file.in ;;
17720   esac
17721
17722   test x"$ac_file" != x- && { echo "$as_me:17722: creating $ac_file" >&5
17723 echo "$as_me: creating $ac_file" >&6;}
17724
17725   # First look for the input files in the build tree, otherwise in the
17726   # src tree.
17727   ac_file_inputs=`IFS=:
17728     for f in $ac_file_in; do
17729       case $f in
17730       -) echo $tmp/stdin ;;
17731       [\\/$]*)
17732          # Absolute (can't be DOS-style, as IFS=:)
17733          test -f "$f" || { { echo "$as_me:17733: error: cannot find input file: $f" >&5
17734 echo "$as_me: error: cannot find input file: $f" >&2;}
17735    { (exit 1); exit 1; }; }
17736          echo $f;;
17737       *) # Relative
17738          if test -f "$f"; then
17739            # Build tree
17740            echo $f
17741          elif test -f "$srcdir/$f"; then
17742            # Source tree
17743            echo $srcdir/$f
17744          else
17745            # /dev/null tree
17746            { { echo "$as_me:17746: error: cannot find input file: $f" >&5
17747 echo "$as_me: error: cannot find input file: $f" >&2;}
17748    { (exit 1); exit 1; }; }
17749          fi;;
17750       esac
17751     done` || { (exit 1); exit 1; }
17752   # Remove the trailing spaces.
17753   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17754
17755 EOF
17756
17757 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17758 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17759 # be either 'cat' or 'sort'.
17760 cat confdefs.h | uniq >conftest.vals
17761
17762 # Break up conftest.vals because some shells have a limit on
17763 # the size of here documents, and old seds have small limits too.
17764
17765 rm -f conftest.tail
17766 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17767 while grep . conftest.vals >/dev/null
17768 do
17769   # Write chunks of a limited-size here document to conftest.frag.
17770   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17771   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17772   echo 'CEOF' >> $CONFIG_STATUS
17773   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17774   rm -f conftest.vals
17775   mv conftest.tail conftest.vals
17776 done
17777 rm -f conftest.vals
17778
17779 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17780 # marker @DEFS@.
17781 echo '  cat >> conftest.edit <<CEOF
17782 /@DEFS@/r conftest.frag
17783 /@DEFS@/d
17784 CEOF
17785 sed -f conftest.edit $tmp/in > $tmp/out
17786 rm -f $tmp/in
17787 mv $tmp/out $tmp/in
17788 rm -f conftest.edit conftest.frag
17789 ' >> $CONFIG_STATUS
17790
17791 cat >>$CONFIG_STATUS <<\EOF
17792   # Let's still pretend it is `configure' which instantiates (i.e., don't
17793   # use $as_me), people would be surprised to read:
17794   #    /* config.h.  Generated automatically by config.status.  */
17795   if test x"$ac_file" = x-; then
17796     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17797   else
17798     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17799   fi
17800   cat $tmp/in >>$tmp/config.h
17801   rm -f $tmp/in
17802   if test x"$ac_file" != x-; then
17803     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17804       { echo "$as_me:17804: $ac_file is unchanged" >&5
17805 echo "$as_me: $ac_file is unchanged" >&6;}
17806     else
17807       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17808          X"$ac_file" : 'X\(//\)[^/]' \| \
17809          X"$ac_file" : 'X\(//\)$' \| \
17810          X"$ac_file" : 'X\(/\)' \| \
17811          .     : '\(.\)' 2>/dev/null ||
17812 echo X"$ac_file" |
17813     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17814           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17815           /^X\(\/\/\)$/{ s//\1/; q; }
17816           /^X\(\/\).*/{ s//\1/; q; }
17817           s/.*/./; q'`
17818       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17819         { case "$ac_dir" in
17820   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17821   *)                      as_incr_dir=.;;
17822 esac
17823 as_dummy="$ac_dir"
17824 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17825   case $as_mkdir_dir in
17826     # Skip DOS drivespec
17827     ?:) as_incr_dir=$as_mkdir_dir ;;
17828     *)
17829       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17830       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17831     ;;
17832   esac
17833 done; }
17834
17835       fi
17836       rm -f $ac_file
17837       mv $tmp/config.h $ac_file
17838     fi
17839   else
17840     cat $tmp/config.h
17841     rm -f $tmp/config.h
17842   fi
17843 done
17844 EOF
17845 cat >>$CONFIG_STATUS <<\EOF
17846
17847 #
17848 # CONFIG_COMMANDS section.
17849 #
17850 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17851   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17852   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17853
17854   case $ac_dest in
17855     default )
17856
17857 for cf_dir in test
17858 do
17859         if test ! -d $srcdir/$cf_dir; then
17860                 continue
17861         elif test -f $srcdir/$cf_dir/programs; then
17862                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17863         fi
17864 done
17865
17866         case $cf_cv_system_name in #(vi
17867         OS/2*|os2*) #(vi
17868         LIB_PREFIX=''
17869         ;;
17870         *)      LIB_PREFIX='lib'
17871         ;;
17872         esac
17873 cf_prefix=$LIB_PREFIX
17874
17875 if test $cf_cv_shlib_version = cygdll ; then
17876         TINFO_NAME=$TINFO_ARG_SUFFIX
17877         TINFO_SUFFIX=.dll
17878 fi
17879
17880 for cf_dir in $SRC_SUBDIRS
17881 do
17882         if test ! -d $srcdir/$cf_dir ; then
17883                 continue
17884         elif test -f $srcdir/$cf_dir/modules; then
17885
17886                 SHARED_LIB=
17887                 LIBS_TO_MAKE=
17888                 for cf_item in $cf_LIST_MODELS
17889                 do
17890
17891         case $cf_item in
17892         libtool)
17893                 cf_suffix='.la'
17894                 cf_depsuf=$cf_suffix
17895                 ;;
17896         normal)
17897                 cf_suffix='.a'
17898                 cf_depsuf=$cf_suffix
17899                 ;;
17900         debug)
17901                 cf_suffix='_g.a'
17902                 cf_depsuf=$cf_suffix
17903                 ;;
17904         profile)
17905                 cf_suffix='_p.a'
17906                 cf_depsuf=$cf_suffix
17907                 ;;
17908         shared)
17909                 case $cf_cv_system_name in
17910                 cygwin*)
17911                         cf_suffix='.dll'
17912                         cf_depsuf='.dll.a'
17913                         ;;
17914                 darwin*)
17915                         cf_suffix='.dylib'
17916                         cf_depsuf=$cf_suffix
17917                         ;;
17918                 hpux*)
17919                         case $target in
17920                         ia64*)
17921                                 cf_suffix='.so'
17922                                 cf_depsuf=$cf_suffix
17923                                 ;;
17924                         *)
17925                                 cf_suffix='.sl'
17926                                 cf_depsuf=$cf_suffix
17927                                 ;;
17928                         esac
17929                         ;;
17930                 *)      cf_suffix='.so'
17931                         cf_depsuf=$cf_suffix
17932                         ;;
17933                 esac
17934         esac
17935         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
17936         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
17937
17938                         if test $cf_item = shared ; then
17939                         if test "$cf_cv_do_symlinks" = yes ; then
17940                                 case "$cf_cv_shlib_version" in #(vi
17941                                 rel) #(vi
17942                                         case "$cf_cv_system_name" in #(vi
17943                                         darwin*)
17944                                         case .${LIB_SUFFIX} in
17945                                         .w*)
17946                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17947                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
17948                                                 ;;
17949                                         *)
17950                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
17951                                                 ;;
17952                                         esac
17953                                         ;; #(vi
17954                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
17955                                         esac
17956                                         ;;
17957                                 abi)
17958                                         case "$cf_cv_system_name" in #(vi
17959                                         darwin*)
17960                                         case .${LIB_SUFFIX} in
17961                                         .w*)
17962                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
17963                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
17964                                                 ;;
17965                                         *)
17966                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
17967                                                 ;;
17968                                         esac
17969                                         ;; #(vi
17970                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
17971                                         esac
17972                                         ;;
17973                                 esac
17974                         fi
17975                         # cygwin needs import library, and has unique naming convention
17976                         # use autodetected ${cf_prefix} for import lib and static lib, but
17977                         # use 'cyg' prefix for shared lib.
17978                         if test $cf_cv_shlib_version = cygdll ; then
17979                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
17980                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
17981                                 continue
17982                         fi
17983                         fi
17984                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
17985                 done
17986
17987                 if test $cf_dir = ncurses ; then
17988                         cf_subsets="$LIB_SUBSETS"
17989                         cf_r_parts="$cf_subsets"
17990                         cf_liblist="$LIBS_TO_MAKE"
17991
17992                         while test -n "$cf_r_parts"
17993                         do
17994                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
17995                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
17996                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
17997                                         cf_item=
17998                                         case $cf_l_parts in #(vi
17999                                         *termlib*) #(vi
18000                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18001                                                 ;;
18002                                         *ticlib*)
18003                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18004                                                 ;;
18005                                         *)
18006                                                 break
18007                                                 ;;
18008                                         esac
18009                                         if test -n "$cf_item"; then
18010                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18011                                         fi
18012                                 else
18013                                         break
18014                                 fi
18015                         done
18016                 else
18017                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18018                 fi
18019
18020                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18021                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18022                         $cf_dir/Makefile >$cf_dir/Makefile.out
18023                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18024
18025                 $AWK -f $srcdir/mk-0th.awk \
18026                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18027                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18028
18029                 for cf_subset in $cf_subsets
18030                 do
18031                         cf_subdirs=
18032                         for cf_item in $cf_LIST_MODELS
18033                         do
18034                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18035
18036 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18037
18038         case $cf_item in
18039         libtool)
18040                 cf_suffix='.la'
18041                 cf_depsuf=$cf_suffix
18042                 ;;
18043         normal)
18044                 cf_suffix='.a'
18045                 cf_depsuf=$cf_suffix
18046                 ;;
18047         debug)
18048                 cf_suffix='_g.a'
18049                 cf_depsuf=$cf_suffix
18050                 ;;
18051         profile)
18052                 cf_suffix='_p.a'
18053                 cf_depsuf=$cf_suffix
18054                 ;;
18055         shared)
18056                 case $cf_cv_system_name in
18057                 cygwin*)
18058                         cf_suffix='.dll'
18059                         cf_depsuf='.dll.a'
18060                         ;;
18061                 darwin*)
18062                         cf_suffix='.dylib'
18063                         cf_depsuf=$cf_suffix
18064                         ;;
18065                 hpux*)
18066                         case $target in
18067                         ia64*)
18068                                 cf_suffix='.so'
18069                                 cf_depsuf=$cf_suffix
18070                                 ;;
18071                         *)
18072                                 cf_suffix='.sl'
18073                                 cf_depsuf=$cf_suffix
18074                                 ;;
18075                         esac
18076                         ;;
18077                 *)      cf_suffix='.so'
18078                         cf_depsuf=$cf_suffix
18079                         ;;
18080                 esac
18081         esac
18082         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18083         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18084
18085         case $cf_item in
18086         libtool) cf_subdir='obj_lo'  ;;
18087         normal)  cf_subdir='objects' ;;
18088         debug)   cf_subdir='obj_g' ;;
18089         profile) cf_subdir='obj_p' ;;
18090         shared)
18091                 case $cf_cv_system_name in #(vi
18092                 cygwin) #(vi
18093                         cf_subdir='objects' ;;
18094                 *)
18095                         cf_subdir='obj_s' ;;
18096                 esac
18097         esac
18098
18099                         # Test for case where we build libtinfo with a different name.
18100                         cf_libname=$cf_dir
18101                         if test $cf_dir = ncurses ; then
18102                                 case $cf_subset in
18103                                 *base*)
18104                                         cf_libname=${cf_libname}$LIB_SUFFIX
18105                                         ;;
18106                                 *termlib*)
18107                                         cf_libname=$TINFO_LIB_SUFFIX
18108                                         ;;
18109                                 ticlib*)
18110                                         cf_libname=$TICS_LIB_SUFFIX
18111                                         ;;
18112                                 esac
18113                         else
18114                                 cf_libname=${cf_libname}$LIB_SUFFIX
18115                         fi
18116                         if test -n "${DFT_ARG_SUFFIX}" ; then
18117                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18118                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18119                         fi
18120
18121                         # These dependencies really are for development, not
18122                         # builds, but they are useful in porting, too.
18123                         cf_depend="../include/ncurses_cfg.h"
18124                         if test "$srcdir" = "."; then
18125                                 cf_reldir="."
18126                         else
18127                                 cf_reldir="\${srcdir}"
18128                         fi
18129
18130                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18131                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18132                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18133                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18134                         fi
18135
18136                         cf_dir_suffix=
18137                         old_cf_suffix="$cf_suffix"
18138                         if test "$cf_cv_shlib_version_infix" = yes ; then
18139                         if test -n "$LIB_SUFFIX" ; then
18140                                 case $LIB_SUFFIX in
18141                                 w*)
18142                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18143                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18144                                         cf_dir_suffix=w
18145                                         ;;
18146                                 esac
18147                         fi
18148                         fi
18149
18150                         $AWK -f $srcdir/mk-1st.awk \
18151                                 name=${cf_libname}${cf_dir_suffix} \
18152                                 traces=$LIB_TRACING \
18153                                 MODEL=$cf_ITEM \
18154                                 model=$cf_subdir \
18155                                 prefix=$cf_prefix \
18156                                 suffix=$cf_suffix \
18157                                 subset=$cf_subset \
18158                                 TermlibRoot=$TINFO_NAME \
18159                                 TermlibSuffix=$TINFO_SUFFIX \
18160                                 ShlibVer=$cf_cv_shlib_version \
18161                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18162                                 ReLink=${cf_cv_do_relink-no} \
18163                                 DoLinks=$cf_cv_do_symlinks \
18164                                 rmSoLocs=$cf_cv_rm_so_locs \
18165                                 ldconfig="$LDCONFIG" \
18166                                 overwrite=$WITH_OVERWRITE \
18167                                 depend="$cf_depend" \
18168                                 host="$host" \
18169                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18170
18171                         cf_suffix="$old_cf_suffix"
18172
18173                         for cf_subdir2 in $cf_subdirs lib
18174                         do
18175                                 test $cf_subdir = $cf_subdir2 && break
18176                         done
18177                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18178                         $AWK -f $srcdir/mk-2nd.awk \
18179                                 name=$cf_dir \
18180                                 traces=$LIB_TRACING \
18181                                 MODEL=$cf_ITEM \
18182                                 model=$cf_subdir \
18183                                 subset=$cf_subset \
18184                                 srcdir=$srcdir \
18185                                 echo=$WITH_ECHO \
18186                                 crenames=$cf_cv_prog_CC_c_o \
18187                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18188                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18189                         cf_subdirs="$cf_subdirs $cf_subdir"
18190                         done
18191                 done
18192         fi
18193
18194         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18195 done
18196
18197 for cf_dir in $SRC_SUBDIRS
18198 do
18199         if test ! -d $srcdir/$cf_dir ; then
18200                 continue
18201         fi
18202
18203         if test -f $cf_dir/Makefile ; then
18204                 case "$cf_dir" in
18205                 Ada95) #(vi
18206                         echo 'libs \' >> Makefile
18207                         echo 'install.libs \' >> Makefile
18208                         echo 'uninstall.libs ::' >> Makefile
18209                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18210                         ;;
18211                 esac
18212         fi
18213
18214         if test -f $srcdir/$cf_dir/modules; then
18215                 echo >> Makefile
18216                 if test -f $srcdir/$cf_dir/headers; then
18217 cat >> Makefile <<CF_EOF
18218 install.includes \\
18219 uninstall.includes \\
18220 CF_EOF
18221                 fi
18222 if test "$cf_dir" != "c++" ; then
18223 echo 'lint \' >> Makefile
18224 fi
18225 cat >> Makefile <<CF_EOF
18226 libs \\
18227 lintlib \\
18228 install.libs \\
18229 uninstall.libs \\
18230 install.$cf_dir \\
18231 uninstall.$cf_dir ::
18232         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18233 CF_EOF
18234         elif test -f $srcdir/$cf_dir/headers; then
18235 cat >> Makefile <<CF_EOF
18236
18237 libs \\
18238 install.libs \\
18239 uninstall.libs \\
18240 install.includes \\
18241 uninstall.includes ::
18242         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18243 CF_EOF
18244 fi
18245 done
18246
18247 cat >> Makefile <<CF_EOF
18248
18249 install.libs uninstall.libs \\
18250 install.data uninstall.data ::
18251 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18252 CF_EOF
18253
18254 if test "x$cf_with_manpages" = xyes; then
18255 cat >> Makefile <<CF_EOF
18256
18257 install.man \\
18258 uninstall.man ::
18259         cd man && \${MAKE} \${CF_MFLAGS} \$@
18260 CF_EOF
18261 fi
18262
18263 cat >> Makefile <<CF_EOF
18264
18265 distclean ::
18266         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18267         rm -f headers.sh headers.sed mk_shared_lib.sh
18268         rm -rf \${DIRS_TO_MAKE}
18269 CF_EOF
18270
18271 # Special case: tack's manpage lives in its own directory.
18272 if test "x$cf_with_manpages" = xyes; then
18273 if test -d tack ; then
18274 if test -f $srcdir/$tack.h; then
18275 cat >> Makefile <<CF_EOF
18276
18277 install.man \\
18278 uninstall.man ::
18279         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18280 CF_EOF
18281 fi
18282 fi
18283 fi
18284
18285 rm -f headers.sed headers.sh
18286
18287 echo creating headers.sh
18288 cat >headers.sh <<CF_EOF
18289 #! /bin/sh
18290 # This shell script is generated by the 'configure' script.  It is invoked in a
18291 # subdirectory of the build tree.  It generates a sed-script in the parent
18292 # directory that is used to adjust includes for header files that reside in a
18293 # subdirectory of /usr/include, etc.
18294 PRG=""
18295 while test \$# != 3
18296 do
18297 PRG="\$PRG \$1"; shift
18298 done
18299 DST=\$1
18300 REF=\$2
18301 SRC=\$3
18302 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18303 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18304 echo installing \$SRC in \$DST
18305 CF_EOF
18306
18307 if test $WITH_CURSES_H = yes; then
18308         cat >>headers.sh <<CF_EOF
18309 case \$DST in
18310 /*/include/*)
18311         END=\`basename \$DST\`
18312         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18313         do
18314                 NAME=\`basename \$i\`
18315                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18316         done
18317         ;;
18318 *)
18319         echo "" >> \$TMPSED
18320         ;;
18321 esac
18322 CF_EOF
18323
18324 else
18325         cat >>headers.sh <<CF_EOF
18326 case \$DST in
18327 /*/include/*)
18328         END=\`basename \$DST\`
18329         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18330         do
18331                 NAME=\`basename \$i\`
18332                 if test "\$NAME" = "curses.h"
18333                 then
18334                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18335                         NAME=ncurses.h
18336                 fi
18337                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18338         done
18339         ;;
18340 *)
18341         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18342         ;;
18343 esac
18344 CF_EOF
18345 fi
18346 cat >>headers.sh <<CF_EOF
18347 rm -f \$TMPSRC
18348 sed -f \$TMPSED \$SRC > \$TMPSRC
18349 NAME=\`basename \$SRC\`
18350 CF_EOF
18351 if test $WITH_CURSES_H != yes; then
18352         cat >>headers.sh <<CF_EOF
18353 test "\$NAME" = "curses.h" && NAME=ncurses.h
18354 CF_EOF
18355 fi
18356 cat >>headers.sh <<CF_EOF
18357 # Just in case someone gzip'd manpages, remove the conflicting copy.
18358 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18359
18360 eval \$PRG \$TMPSRC \$DST/\$NAME
18361 rm -f \$TMPSRC \$TMPSED
18362 CF_EOF
18363
18364 chmod 0755 headers.sh
18365
18366 for cf_dir in $SRC_SUBDIRS
18367 do
18368         if test ! -d $srcdir/$cf_dir ; then
18369                 continue
18370         fi
18371
18372         if test -f $srcdir/$cf_dir/headers; then
18373                 $AWK -f $srcdir/mk-hdr.awk \
18374                         subset="$LIB_SUBSETS" \
18375                         compat="$WITH_CURSES_H" \
18376                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18377         fi
18378
18379         if test -f $srcdir/$cf_dir/modules; then
18380                 if test "$cf_dir" != "c++" ; then
18381                         cat >>$cf_dir/Makefile <<"CF_EOF"
18382 depend : ${AUTO_SRC}
18383         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18384
18385 # DO NOT DELETE THIS LINE -- make depend depends on it.
18386 CF_EOF
18387                 fi
18388         fi
18389 done
18390
18391  ;;
18392   esac
18393 done
18394 EOF
18395
18396 cat >>$CONFIG_STATUS <<\EOF
18397
18398 { (exit 0); exit 0; }
18399 EOF
18400 chmod +x $CONFIG_STATUS
18401 ac_clean_files=$ac_clean_files_save
18402
18403 # configure is writing to config.log, and then calls config.status.
18404 # config.status does its own redirection, appending to config.log.
18405 # Unfortunately, on DOS this fails, as config.log is still kept open
18406 # by configure, so config.status won't be able to write to it; its
18407 # output is simply discarded.  So we exec the FD to /dev/null,
18408 # effectively closing config.log, so it can be properly (re)opened and
18409 # appended to by config.status.  When coming back to configure, we
18410 # need to make the FD available again.
18411 if test "$no_create" != yes; then
18412   ac_cs_success=:
18413   exec 5>/dev/null
18414   $SHELL $CONFIG_STATUS || ac_cs_success=false
18415   exec 5>>config.log
18416   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18417   # would make configure fail if this is the last instruction.
18418   $ac_cs_success || { (exit 1); exit 1; }
18419 fi
18420 ${MAKE-make} preinstall